From nobody Mon Jan 8 05:41: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 4T7jby2hBHz5710P; Mon, 8 Jan 2024 05:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7jby1cgDz4Mqw; Mon, 8 Jan 2024 05:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704692494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PW6/SS9FjLTKNxHMID+c3XhO08Jj8+BTaqh8xqiyif4=; b=tYyMGpe1aZ7qc6ZCI6Xrm5a+EIN3arFR3A5m4KjwqrLS2bRHcdkzPIGnA0euC36yw668NY vPKP6hmpUNnTpkppr4BQWgR3qTo/2M34Rk2D9uId5HzS91H4B4OuIQnYIs2TflwL7BpQC4 k4isYHG3/SKBjJdwWyc/N1S+NEQ/Tqs9GTjyw60Fn0P3g+WpXXHOtb86n8tnMt5c23zu59 8D9iraufdoVZ+j0SiHBSvCAapbpxWawcdU4bG3YK+S433uYt+WQl2wix/vr5YklcCWzJq+ urG+BX9NoRwvMHswJ03jcQ099OCBFg7692syVr6AB3Dip0GAcLez2NGVwXvQGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704692494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PW6/SS9FjLTKNxHMID+c3XhO08Jj8+BTaqh8xqiyif4=; b=mq6UL8mnNPi04cs4NArigVRL7u9uq1zecj5DPhF8tAd8mcyqmKfGB3k9tb1epexQjnVkaV ixEohieUoYbVsn5BJ7EepSGvEYY03WBAIfFWcaoV2JXezkVAkLTxu63vPH+6AhcCgD1m83 ljxehBo5cZ8LTh+iljOGkOCUROPDqFC7oPm1esWp6yJMmAcFUCwAv9g9ByVWX0Gg6KC3Bw 4wXTYJfWywNbj3ZXbp85M5T9RbwQ/GaVWqeFzudLJ6rIaGZQy87+hjRDXvvrltl2OIY4nU CrBWYh6pSzO9L8jOJLcxNNe9i7OOYdj6wTgEIXqxye2ogTDKrveFXk7IRRXTFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704692494; a=rsa-sha256; cv=none; b=uqIVJUNkLIrp7pwi4nNAmKm/G9g2dGHYxoU8kHJmpvQ+wgSzG9c4/5ZWavtni7wTcqBt+/ 6FWKlC6SbC2f9sg/mpcVNJ2m1Is58zUHLKePyhU+lnqrcMahhjDRzaXkRpUx+sLvvJugkH +1DTUlVA8e1V5jDfGIs4TL0TMi8yciM27NyxHKWN6InjuMneVN7fTIxZJ+u6dhL1k/md2s +JQ4toYfBKM4W9luuSIU5qr7j9KgNNuEiGMDnlTSekVOmFy0BvEUrD5vgqMo8Vt91RLZnf vKPLxGUQTliv16uA/jyj8XDBedvK0PLEqYJXb0qpzj01i+s9OxtgJ9ovuEAYNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7jby0gFqzvDF; Mon, 8 Jan 2024 05:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4085fX1G024043; Mon, 8 Jan 2024 05:41:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4085fXnt024040; Mon, 8 Jan 2024 05:41:33 GMT (envelope-from git) Date: Mon, 8 Jan 2024 05:41:33 GMT Message-Id: <202401080541.4085fXnt024040@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: 8a4577423e82 - main - ffs/ffs_rawread.c: clean up includes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a4577423e82c54942a9390658d059f1169187b1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8a4577423e82c54942a9390658d059f1169187b1 commit 8a4577423e82c54942a9390658d059f1169187b1 Author: Konstantin Belousov AuthorDate: 2024-01-08 05:36:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-08 05:41:15 +0000 ffs/ffs_rawread.c: clean up includes Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_rawread.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index affdd7095151..ef93c1ab6783 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -26,22 +26,21 @@ * SUCH DAMAGE. */ -#include #include +#include +#include +#include #include -#include -#include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include +#include #include +#include +#include +#include + #include #include #include @@ -53,8 +52,6 @@ #include #include #include -#include -#include static int ffs_rawread_readahead(struct vnode *vp, caddr_t udata, From nobody Mon Jan 8 06:34: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 4T7knb6KMDz576Hl; Mon, 8 Jan 2024 06:34: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 4T7knb5mf4z4RcY; Mon, 8 Jan 2024 06:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704695699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VIDjRcKpWIUTn2jTJqmR1BnTjVW0KPjcHnday6KSnBw=; b=ZJZ77UJpr3ej3uwEte5M0nd+slEMhgH74k7ZrSMOqXNin7EAoo4nLbyQELOQ9frMZI71kb eWnV8I/VlMaRvSupEvuNmZf7NYdbgC5jIyZ5nnaVW9SdbvjcgAIxDyPw3tdStD3YBumB+l v+JXFBPKyxRCISxsHI9mAW39ZHfQNmOqmEnFvHOnT2F7Tx4PBVywX7zHpCfoEnIOyRBb9b tGXEkyeCZp8E1EYPop/0fc5fpnRqN4dV/hSuWG7SDWeN2EdZLSD/9eyzvaTRtiwQQxG4xY 8IT9VbSAJ2ZQ2KvActba/enA3XCS8cHxVbI6x2gyx3PGllP5u/VZAq0otNX1Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704695699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VIDjRcKpWIUTn2jTJqmR1BnTjVW0KPjcHnday6KSnBw=; b=NaccoNRpFG/XyBwbkIRf2z90a2lnOchHY9gZYEdeR7wP7jHTNuCVTS/J3SzFm4ngMc0LOi LMcwcRnVPn9/hbIMz3A4buAU+8bbV3Zy4E8asU9w+k3blMvFkFYuKXGfD+LkFQtI06P4xe 1HrOF/mjZQo5cQJx9u0eVBnh2cRaU9bqZx8kO8W/06LET5mxA8O5SRDOveV8FMl0xorgRN ilNdH+DNhy2Mj8ZvYEQga8+R/iCy7RQA9Enu7sZM2p+hTgNcjAs41vajx6PmEYHxV2igGs wnQuvJVjQwdibEwWzSPQlYXEh89FMTH2KH/Br7TtZkkFrW/hucEbK3ie/LwI1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704695699; a=rsa-sha256; cv=none; b=plIO/0GCUlui1gdJPf9kbxdmTBfpS6ODCXVLFJgaVMbQJ8/MJW7r7ylSrizbXr61SKWkOR CV643WG2nzDEkWffX/iEBYuE0DLaHRJdLm7NLaCvTAxjGzjWIebwthvPeMEod7BFaMUY0l tmDaCVX524ACKiSSbl64L+fCSFTRcANARcoL23/tTAvNxef6HwM9A+Nr27Up7bBLPZB+qe sm0BIer3B+aq2QZ/ftWxteBzyQVldr/qhdfgd2uRQkzZGjTg4n+9KKybwqsDeXGzsIWVIM Nn3CevVJU3OZ34BUpmO3vtcJZwvpku1vkXPzXbiWK574LZor6PFMwnGPBKrsRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7knb4pyKzwnJ; Mon, 8 Jan 2024 06:34: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 4086YxTc009613; Mon, 8 Jan 2024 06:34:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4086YxFQ009610; Mon, 8 Jan 2024 06:34:59 GMT (envelope-from git) Date: Mon, 8 Jan 2024 06:34:59 GMT Message-Id: <202401080634.4086YxFQ009610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 5704277ae58b - main - puc: Add support for Exar XR17V354 Quad PCI Express UART. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5704277ae58b3498fbee2d041cd18d2444f5cf98 Auto-Submitted: auto-generated The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=5704277ae58b3498fbee2d041cd18d2444f5cf98 commit 5704277ae58b3498fbee2d041cd18d2444f5cf98 Author: Teerayut Hiruntaraporn AuthorDate: 2024-01-08 06:31:19 +0000 Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 06:31:19 +0000 puc: Add support for Exar XR17V354 Quad PCI Express UART. PR: 257207 MFC after: 1 week --- sys/dev/puc/pucdata.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index 3114202c3a5a..f127e27e7b08 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -694,6 +694,13 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_exar_pcie }, + { 0x13a8, 0x0354, 0xffff, 0, + "Exar XR17V354", + 125000000, + PUC_PORT_4S, 0x10, 0, -1, + .config_function = puc_config_exar_pcie + }, + /* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */ { 0x13a8, 0x0358, 0xffff, 0, "Exar XR17V358", From nobody Mon Jan 8 07:42: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 4T7mHS6lC1z57DDc; Mon, 8 Jan 2024 07:42: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 4T7mHS6H1Wz4Yj5; Mon, 8 Jan 2024 07:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704699748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=phxYVSvJ8Uab9J2MoOb9GQPJg47gGvperffTaxsAHgo=; b=lvBTftDnx7t8opblHY8zyF47pfH70xxHw71rSVM6WjRRVYPmk6FF/iO7uI7+9sNFuqdzsQ rdiNn+VobbuM7t6ZrIEtnlRpsQtUqBSE9294a4Zsp7qklfj06FUJb7EA7x/bugF+TfRu35 cS/68+YZP6HxwfOkWCqIX8CjBljOxMkYcwbpokCpjeAFmbgYliiOP9wkpR45En5Kw8h8n9 f+DN0JYQ8aNVCRdMLQcwmfvZqyE1neWiut7GyfCavgTPd9V5sGKyfu6PXpzBwGdP2fuF0M 0bFyDVW+1uMdoXkzLfsOKliw3mL1Pl99MAxlLxupXnM51kHTX6/7BE+7XABysQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704699748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=phxYVSvJ8Uab9J2MoOb9GQPJg47gGvperffTaxsAHgo=; b=LcmzlEra+wbXir+noj7x0AarJbU0hqgKACdm+/dT0GGM7Qloyy8G+O0JU0UnrxNDRasq54 EtNgYXpTgNwRBOsCy35LteKqlWBJ7gEz1Kio/oIjflbzLeqk9YMBVsvXirZE3Re1vhbw3b UknUOB2wVY8THK0o12yeMPA8a63QvGUVNSqth72HmZpqsloiBvA8y9Wms/iE4mqmAgrhMg T69Tqx93ntKVBbINkeAjDHlH1fEZ1D04E523HOXjXfEfwoIRR8UwCVk5abJmzhMMD9o3FB N53n9ZNeM79kCSyLbTsWwQMcbsVWqwyNulD0Gig3TdmgdFRDzCqrnTosS3KS1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704699748; a=rsa-sha256; cv=none; b=KMRRo7JVBWZ3TXPGFk2je1MGXwmYw+Ifxu+voskr6ndqg60QX9PurjKAchEYGLluKd22Zt IpqzsYdOhjc6uHGXK9LYWRH+r56XZdONqLTDxWPNZgYe8UZhaYbTA+2sVVBJF7cRIJHpq6 3B0WrT4QSFVAHZSkUZBi0lBv+TTajsbiqomVSo9DogdRYaWvcvwkn/kqNmINboTu16p/rB pJhESsw5aPYHFgjjo9e9TABygGfqoM10v5aX4lSjrvegHhW/OLMi9PzkC7t3kG1wlZygzg 0OIFyaDVy6cTUmB7w4wiWSpYtnN7SM8qI2NlKForumTY6pPNwj5cwbXBwCWzqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7mHS5L01zyJB; Mon, 8 Jan 2024 07:42: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 4087gSwq026292; Mon, 8 Jan 2024 07:42:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4087gSnw026289; Mon, 8 Jan 2024 07:42:28 GMT (envelope-from git) Date: Mon, 8 Jan 2024 07:42:28 GMT Message-Id: <202401080742.4087gSnw026289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 9a622787244c - main - mii: Fix memory leak in micphy. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a622787244c4cda76d1509b0eae168bf4fd1952 Auto-Submitted: auto-generated The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=9a622787244c4cda76d1509b0eae168bf4fd1952 commit 9a622787244c4cda76d1509b0eae168bf4fd1952 Author: Jiahao LI AuthorDate: 2024-01-08 07:39:56 +0000 Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 07:39:56 +0000 mii: Fix memory leak in micphy. PR: 270040 MFC after: 1 week --- sys/dev/mii/micphy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mii/micphy.c b/sys/dev/mii/micphy.c index fa212bf43655..4783398886f5 100644 --- a/sys/dev/mii/micphy.c +++ b/sys/dev/mii/micphy.c @@ -276,6 +276,8 @@ micphy_attach(device_t dev) else ksz9021_load_values(sc, cfg->phynode); + mii_fdt_free_config(cfg); + return (0); } From nobody Mon Jan 8 11:53: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 4T7ssL3Bpqz55T6N; Mon, 8 Jan 2024 11:53: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 4T7ssL2dJBz54lC; Mon, 8 Jan 2024 11:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704714822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wlvzKCcSil3S/pmLs+9HOLXSdzDGkdfhCyy6ocTR9MU=; b=RbXuOVUlF9+JcmxrHsF4jS2ntzHU++XIW6EG2UscArDXQVHS6qGZmZGCcbDNwLaaIaVyPq +hyB+flQCs4OH+jmN7Gwhi4I0NSX3YhT5tbTYmYqxHrKbhsdH4cL+TaDkk1KJAH7CdY9D5 LqsJbrc19E3KwPmuIFD/GCTLCrTDfuAf6w9JsDrCoeMK6GJcV/o9aX/wGlPt6z56ItzCFV klfUUHgpNhTdzRp+DZ5UXXK59BdEQ63hkcODI9xYS2lycBvGFWIu4zZA626KQIpH3HeMXu TUMIVPCGTCOfqvEPyZgEwTT8Z4wcRbCbw0tt1P+aOK1vqggZyHr1fObt9ewyVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704714822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wlvzKCcSil3S/pmLs+9HOLXSdzDGkdfhCyy6ocTR9MU=; b=FRMLQ9pBzyyUOtboeergCAupODSZxiOHI9SlfRC5DhM2M8iFzsedzLhBF2Xxm353tRs8yv qgqtvDkny9ALagn3ow90Y5Po6MhH+fZP7yHcYMp14iaSoKlQVovw+a60B/JPepvNnfLwFo boC6k9attoWJIZ2bspVacKY2rLqRRTSnF+xIcdPm728SddPc4ykW8yHsQ/E+6UbMTxmS8I llumLwD68E7iPN80ZJTnGVcNt4CH8Ku0oimgWDSFXyhifqwDYeXKL+EbMOOw475DVuv4jo mhOugaU2BAvnYqfXBUHtyGK/b3NMn88gdeJk6K5+SkSek2wsSwliew29X4J/NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704714822; a=rsa-sha256; cv=none; b=Roon0GAizHAbg1sBT8HSIMUk79AWbTYnBYEo+iMk/pvcuoBMjGUZlWZpSOX2MQAQPKz8Sx 1gc0+x4Lb1b/L5KzFJLADCgJSOEfgSE5fabaZbG+7dkOWpSb2T6cxlQhORE8spSyoJt1qE soWLBKruaJuazIcFBj92AoW2/uivcm06avEMwza6dEe5WA/CALEWg5FX1lZx8hUHXXKzR2 cTYJTdcuKTaF6RgLJCJ+movTAm4tRep2vVMI/3r7MqfrbHhmHdfVU6n9/cWMYdDt1iK8Pr GSWJRjoEfacCatGyEjE5JwCGDP5xxrPLKzJl267CFvHkIpHySvy4O+oefn4xlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7ssL1hLgz15t1; Mon, 8 Jan 2024 11:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 408BrgSu048102; Mon, 8 Jan 2024 11:53:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Brg3s048099; Mon, 8 Jan 2024 11:53:42 GMT (envelope-from git) Date: Mon, 8 Jan 2024 11:53:42 GMT Message-Id: <202401081153.408Brg3s048099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 58cf91d3b72a - main - resolv: Add a required include to resolv.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58cf91d3b72a01777bacf72d66a648a744ae3143 Auto-Submitted: auto-generated The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=58cf91d3b72a01777bacf72d66a648a744ae3143 commit 58cf91d3b72a01777bacf72d66a648a744ae3143 Author: Jan Beich AuthorDate: 2024-01-08 11:52:08 +0000 Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 11:52:08 +0000 resolv: Add a required include to resolv.h Add a required include to resolv.h for sockaddr_in. This should reduce patching required when porting code written with Linux or NetBSD in mind. PR: 182466 MFC after: 1 week --- include/resolv.h | 1 + lib/libc/net/resolver.3 | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/resolv.h b/include/resolv.h index 40ca2e8a467f..f32f52bab431 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -58,6 +58,7 @@ #include #include #include +#include #include /*% diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index 832fa05e994b..f1220dcf9b7f 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2022 +.Dd January 8, 2024 .Dt RESOLVER 3 .Os .Sh NAME @@ -45,9 +45,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In netinet/in.h -.In arpa/nameser.h .In resolv.h .Ft int .Fo res_query From nobody Mon Jan 8 15:38: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 4T7ys92Pydz566Mj; Mon, 8 Jan 2024 15:38: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 4T7ys91k7dz4PZv; Mon, 8 Jan 2024 15:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704728333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9W2vtwab5mgH2xJVrFVQJo2pWk8k6nEeF1H6VM8DP5A=; b=LAoUpaqDrMz5BLxvVucAtvtSrwWkDermK2tHE3hdHSwgE6JYYRaPc15OsYGRQEG8z2rHec kSizwi6BS0W/gNgfmlYTHNlPiIrfykNufa7Gc6lu/Unz8//nqgPytRg/6IHVvrZGTNrteU dcXQiXxIGRtMoAzx+Ni5SQOcPQoqvIISHXFPpPXz/P7DeYwHoC/bemVvpzQohom4y2pzct JqDkFIPyX5wwHrZXv+2pHqLdjP6ln6Dl7TUjq6YC8VIqrUbUMYY0/lucQj4oMhvWuA75Jg wej3mGRvjOBM0xv9otoh3OE23akS+jqXjDSz1tews6n1l1E/2fH/sGAs6nmk9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704728333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9W2vtwab5mgH2xJVrFVQJo2pWk8k6nEeF1H6VM8DP5A=; b=aOWTcZ7yb3r2Dhkjwzz5C5BymtErZIsYhhGjMi54kW8S9ImOg4SI5nnsvRsHIj2/yzCa2k Z6sAVTAet9HmesOYdFf9J1ecUFR7hXIkIg5SLlTC82eMp60rthQfWM5nOURZaZ0KZA20u9 FyeVbiPU/szY0VbKqU00Bg/DG3/UnIjgLIqd9JL4+ANt6M0NsBo+ywfRttKj2Nea0Sd60H mz8pJ2erI9JTDOu79/cVCk/yPQ96UNepxI/R5TLDmQMRYIAAMMwZoq/GbvhA9W906bIxqt 5evN4Tpv1PVIxm3szJIWyAqtIVqPJwX1eYLpO1aJJX1omrFLsiGhgx01dXIUpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704728333; a=rsa-sha256; cv=none; b=JgKywohnJtbXb05/YR+8hUogYOhHTy52XEXXTYYSo3w1afmKochKJfoBEYLDvee6EoxJ8n lXXuddgBPHaW8ByHbdMhfWWcRRAspy+6+PgIw7HBF3QCEU6N6TFckQRiR6aRr2DbFgR26n wVqDNzpTCDCnQmRlVOp/N+3IR0HSRufXw0xsFuvvFZjbu/9zQ7fLS/CQtxTIkJaYOJmxRp a6LFebO+E1HhEaquQOt+QbnawVIhjNznX29TBvN/UAQ+Xns9V45YfSIGpPNDs4C06Yh8HS V8INi8ZN04v2qWHCKwqlTm9nLof0Mlf3mZJ32+ByjmlW8bWvGEWgC1hGqTANrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7ys90gW7z1Bvq; Mon, 8 Jan 2024 15:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 408Fcr7t018502; Mon, 8 Jan 2024 15:38:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Fcric018499; Mon, 8 Jan 2024 15:38:53 GMT (envelope-from git) Date: Mon, 8 Jan 2024 15:38:53 GMT Message-Id: <202401081538.408Fcric018499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 118d0ff54d4f - main - rtw89: improve debugging and fix a sleep issue List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 118d0ff54d4f7cffe6a13a1e0cdb2fe23fbfce74 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=118d0ff54d4f7cffe6a13a1e0cdb2fe23fbfce74 commit 118d0ff54d4f7cffe6a13a1e0cdb2fe23fbfce74 Author: Bjoern A. Zeeb AuthorDate: 2023-09-06 16:47:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-01-08 15:38:22 +0000 rtw89: improve debugging and fix a sleep issue Improve log messages to be more helpful in error cases. Change one LinuxKPI sleep function as we cannot call the original one from a context we cannot sleep. Both cases were hit during testing. MFC after: 3 days --- sys/contrib/dev/rtw89/fw.c | 9 +++++++++ sys/contrib/dev/rtw89/phy.c | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/sys/contrib/dev/rtw89/fw.c b/sys/contrib/dev/rtw89/fw.c index 17e4ce7cd64a..c1dade182d88 100644 --- a/sys/contrib/dev/rtw89/fw.c +++ b/sys/contrib/dev/rtw89/fw.c @@ -903,7 +903,12 @@ static void rtw89_fw_prog_cnt_dump(struct rtw89_dev *rtwdev) for (index = 0; index < 15; index++) { val32 = rtw89_read32(rtwdev, R_AX_DBG_PORT_SEL); rtw89_err(rtwdev, "[ERR]fw PC = 0x%x\n", val32); +#if defined(__linux__) fsleep(10); +#elif defined(__FreeBSD__) + /* Seems we are called from a context we cannot sleep. */ + udelay(10); +#endif } } @@ -3890,7 +3895,11 @@ static int rtw89_hw_scan_prehandle(struct rtw89_dev *rtwdev, ret = rtw89_hw_scan_update_probe_req(rtwdev, rtwvif); if (ret) { +#if defined(__linux__) rtw89_err(rtwdev, "Update probe request failed\n"); +#elif defined(__FreeBSD__) + rtw89_err(rtwdev, "Update probe request failed: ret %d\n", ret); +#endif goto out; } ret = rtw89_hw_scan_add_chan_list(rtwdev, rtwvif, connected); diff --git a/sys/contrib/dev/rtw89/phy.c b/sys/contrib/dev/rtw89/phy.c index e2b8303d3f63..138788b2ed05 100644 --- a/sys/contrib/dev/rtw89/phy.c +++ b/sys/contrib/dev/rtw89/phy.c @@ -1439,7 +1439,11 @@ static void rtw89_phy_init_rf_nctl(struct rtw89_dev *rtwdev) ret = read_poll_timeout(rtw89_phy_nctl_poll, val, val == 0x4, 10, 1000, false, rtwdev); if (ret) +#if defined(__linux__) rtw89_err(rtwdev, "failed to poll nctl block\n"); +#elif defined(__FreeBSD__) + rtw89_err(rtwdev, "failed to poll nctl block: ret %d val %#06x\n", ret, val); +#endif nctl_table = elm_info->rf_nctl ? elm_info->rf_nctl : chip->nctl_table; rtw89_phy_init_reg(rtwdev, nctl_table, rtw89_phy_config_bb_reg, NULL); From nobody Mon Jan 8 15:38: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 4T7ysB5hyyz566Hs; Mon, 8 Jan 2024 15:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7ysB2V0Lz4PPh; Mon, 8 Jan 2024 15:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704728334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPC2y8t9B3QCh9K2T5BzXyvT2On9xHG2Qfp3mLi5v6Y=; b=DgYs6ir/T4o858IKDlqtPWzg8CS9epiaHXBj78kGxX5ngdtq1olf8sotdUdbLH2y78IDMH zyzv0QBs7BMfoySs4trOqXp6dIQSqi6uFkU0f9+4fSqlseKHdJ/lRBCj4nw1xj27slOy41 PIPm2Bs+hxIJnWZRvIS3GO3eJB6hVMt3cbubr5/YF2doZvbpbBf8xQoyBRIlVSbvRYn3Zi OyvT7QO4LCCD+oSw1rKaia1C1my4x2dJ0FyC9Xh82mylT6q/47hy6PUewFaZY5XjOWncvd 6fmnU/Xt8eKY1zoMWzQoSB/niDQOSktcDT1d+69gb2Irys8+/k5B6InNln/KzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704728334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPC2y8t9B3QCh9K2T5BzXyvT2On9xHG2Qfp3mLi5v6Y=; b=ZlDs5cbPGBNcwBlh6t6ak8ZN4XY6PbYhazc1BstsLcXyivVe3I0wNqT7qamLISKLTDBwf9 LMBdizyvZy0/TDFRcf8LJ1gvMci4uyUIRdl98gjdC+1yHUePEegzrLjoUIx73tSFepXc1X sg4xaOTDHFi/V25c3fLb/bOZwmd9TO2PzmOFA86xeY772+w872k14CyWDEiFuQgYbXtInf Kdqs/P7fTRxWmV1mrHQKxSWOF+gCwTZBIEQC1Z9FTSrqh7E7TOzMaXNSAO5MVUyOmMJ9+9 gxc2j5f8QRHJVhpmYiZkfH9vDqa3pr9TTqIwwCF/Tt//4hL9kFlpvook9+jfPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704728334; a=rsa-sha256; cv=none; b=M7TJCybX8ygvyhzKNBtC06Z3zGk0DJBCL8tH4MhWm3iWB3/fTtjVcnWvbWAs/VxOVc/lsy EI83alcXJCWU+0bNp/3kHHnnifBm/7w3XPm3EG0lRYEQlLRdkiRxWV4ldP3JhaGJ++2V0X nKogGqFK7Dv5Nn0O0zQ59K2Q8cAaJd96Y1Gd65thMSO3JXhz5KbhzupNiVwxvlNxmNt9Ee lY03+4JTENx3BLi3b0M7iB0rnPYR5ANsMu3YXQyvfOk1nkZ/1RsjTA/mnPTbQB5hGKkCLF KWST8c1+9HdTpUFxZXVda3E3AILUpZfQ0ILv1pG0UJ6zGq7KRknXjKVC6b74XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7ysB1bKHz1Bvr; Mon, 8 Jan 2024 15:38: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 408Fcslq018553; Mon, 8 Jan 2024 15:38:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408FcsnK018550; Mon, 8 Jan 2024 15:38:54 GMT (envelope-from git) Date: Mon, 8 Jan 2024 15:38:54 GMT Message-Id: <202401081538.408FcsnK018550@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c8e7f78a3d28 - main - ath10k/rtw89: make compile again after LinuxKPI changes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8e7f78a3d28ff6e6223ed136ada8e1e2f34965e Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c8e7f78a3d28ff6e6223ed136ada8e1e2f34965e commit c8e7f78a3d28ff6e6223ed136ada8e1e2f34965e Author: Bjoern A. Zeeb AuthorDate: 2024-01-08 15:29:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-01-08 15:38:22 +0000 ath10k/rtw89: make compile again after LinuxKPI changes Both drivers are not yet attached to the build so this change is for people currently trying them out. In 96ab16ebab6319dce9b3041961b0ab6e20a4fecc the sys/rman.h include was removed. In various wireless drivers we prefer to directly use bus_dma functions rather than io* LinuxKPI once. In order to cast the pointer we need sys/rman.h back for our native 'struct resource' in their pci.c implementations. Long-term we should consider providing some lkpi_-FreeBSD-specific wrapper functions to avoid this problem. MFC after: 3 days --- sys/contrib/dev/athk/ath10k/pci.c | 1 + sys/contrib/dev/rtw89/pci.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/contrib/dev/athk/ath10k/pci.c b/sys/contrib/dev/athk/ath10k/pci.c index 2b0b594b5466..23ff786fe45c 100644 --- a/sys/contrib/dev/athk/ath10k/pci.c +++ b/sys/contrib/dev/athk/ath10k/pci.c @@ -15,6 +15,7 @@ #include #if defined(__FreeBSD__) #include +#include #endif #include "core.h" diff --git a/sys/contrib/dev/rtw89/pci.c b/sys/contrib/dev/rtw89/pci.c index 9220f5b40d29..5639a52c2ddc 100644 --- a/sys/contrib/dev/rtw89/pci.c +++ b/sys/contrib/dev/rtw89/pci.c @@ -7,6 +7,9 @@ #endif #include +#if defined(__FreeBSD__) +#include +#endif #include "mac.h" #include "pci.h" From nobody Mon Jan 8 16:07: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 4T7zVF11dyz56Bl8; Mon, 8 Jan 2024 16:07: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 4T7zVF02kTz4VfM; Mon, 8 Jan 2024 16:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704730053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPjgjuWamQPMHaRN1isbQrAVD4uAfqmoh9nBhfWh5a8=; b=c8miXanKsUPUHTIpk4hHx7JxhIGe2wuyNq6+TBPiAgb86vVJnqTeR8Psb3EOhV1TkGyLGP cV7l/+T6MRXmgo4pSnoQ8DSv3O4eej73/v9XsbzD8PiA/0QCDQsewLCG9wbYZwxIvaeb4A IqiPBFFkdxN5+LFM+Mc9F+CzqaxefuQHTelvxSLzHROvn3Xzaj5mne4ErkS16oc9jBj96e Mq17RXW9kd04OMvAkuF7i3RoN2xLTxf9YerrHt2DazBspR+h2Gbyb1lLcgd9C4uJIAwkjU 8ZIeQFWZgPpJ4KvWfJkf4UI6YbBkoozbs+SmYUAAkZzBxrTQU87FFmHY7iyErA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704730053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPjgjuWamQPMHaRN1isbQrAVD4uAfqmoh9nBhfWh5a8=; b=oRr+RVZ2my0sJS8TTpvbiRXyCEfX/Qut9gm/HAFn15J+oezzvUL4WGS5ql7gRsAttJpw4z i41PViNDUGEQRjEZp0CS0UmaPnK0cLj8QK/zJ+nFUoWsiBx1bzGH+5oByNKMT50loP7tSH XEN9ZizTwON6uRboOrnMjVUCJtz4c835rkfWz0yDUEPHurpYI80C5frmikTGlEIuiuT6I9 DCVDzfFQ4+sDKYHfazZNh/lw/VEp3rEsuF2ILq0hYN5qKuzVn+qdgWq7q4mKYzwDuGen8p CZ3hbaE4DKxx2hEqITqNl5OHi1VICKyLfXM/wW5IElX/p9rpLlfKzn58EBhYFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704730053; a=rsa-sha256; cv=none; b=S67/QUhlGQSzvk0j5pj4zPT40PQ+h7xBzLfe3a1ZpKfQ5mxYZjmQk8An0IphylS8mRO0Wb uW5E10n0UruEeftOxBVZZfZVqWQoRtLtd9X4p5q5chMfgZ0LbWjguTBsuMKgJONa+vWXTP ow0DByHbaAwjNkdCOUMmE+4eZAv1KoTiteaKpyfBevPmuGZI17mMdN0ouV3cjz5woBjXng rTKYz9QNRfVtkLXbGm4tIPAOqUvIeiKfFPq25hUsSOSb9u5jKwRCUfo5nQgqqNzhiGcK89 IImNbm8Vk1fgdmnv+K2VUvYojnV/MCWbThy6MdU5VdGOdNEg7lnCzuCNeFM1jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7zVD6Dlmz1Cn1; Mon, 8 Jan 2024 16:07: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 408G7WGm068655; Mon, 8 Jan 2024 16:07:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408G7W27068652; Mon, 8 Jan 2024 16:07:32 GMT (envelope-from git) Date: Mon, 8 Jan 2024 16:07:32 GMT Message-Id: <202401081607.408G7W27068652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: 1e82d882ed33 - main - fix using man(1) with multiple pages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e82d882ed3372bcaf82451bfb865483a409ab1f Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=1e82d882ed3372bcaf82451bfb865483a409ab1f commit 1e82d882ed3372bcaf82451bfb865483a409ab1f Author: Wolfram Schneider AuthorDate: 2024-01-08 15:53:11 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-08 16:05:50 +0000 fix using man(1) with multiple pages PR: 275978 Reported by: Mohamed Akram Fixes: 789480702e490818244af11279868ba4f3dabe6b MFC after: 1 week --- usr.bin/man/man.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 66af46a36243..7e2151295ba7 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -1040,7 +1040,7 @@ do_man() { do_full_search "${REGEXP}" fi - for page in "$pages"; do + for page in "$@"; do decho "Searching for \"$page\"" man_find_and_display "$page" done From nobody Mon Jan 8 16:35:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T806s3HtCz56H6y; Mon, 8 Jan 2024 16:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T806s2gRYz4bFb; Mon, 8 Jan 2024 16:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704731749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=imWz5nne7wjiMXEOfvvvELglCPoPd0DPVFMVmagezAo=; b=Oi81NeF/t4hjRpgrXpFJ+maI6rXzTs0HQiVHyE5e7nUu8oYAAxpEjqCD0PEd/GwtMUGBWS lz3Bbt201ABsTSrS/NePr784V5yhZPPcEUYItgMnELo5OU8hfG23l/SUonR9vf1If2DFEc q3oDcQLOeWvwgU1B73yXh+CgDOw0a0vFUOyyP/6b7QtcnMTyIJlqSlmpD49CVfSWSBWrIs s/0amJGp2v59aYpFLzu7dr7gRKpQ8Ax4znmq+GAQEDkjqzICvBVr0SU7fJIuLPPnt3tn+R YYX6/1eVGewI89ya5U/sX3TzIaR5B49Pq6b7OwttFotdtlOKL+tkkgLcAs/icw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704731749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=imWz5nne7wjiMXEOfvvvELglCPoPd0DPVFMVmagezAo=; b=N8Dq8I1aRxnP/jgEWK/xKO+aTmhCGh+nmyTEeurpQBhl9y19O51tpe9CvsR9mxYucWGb69 rxSYgc/kpj5tCzieJxMpBzaM2Wq1zo7eEsY7bQvwCSxpYys1nkxoaHDIBLP/p1lC+No9oC mfQ88lOCzbKogl9bCFncD0hCewnCeCnilq/P2/7IEbqVeC27KER5fuZ2jq3QQj3gXa6B2c 3EdoKqAbVWbFnRmbjMc579+YkU6L8a+23Vgpqe2Umwkw9nGPJAScHnoWLNng5hiWKMkkDF FGDpmMTopeFYo3ZnvjErw59Vs6fM6J0tppHIJMRRi7wxS2V5x7lR1/f9QnYhGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704731749; a=rsa-sha256; cv=none; b=yovj6lH85UitGYKpIX1ylP10Z/NqYjZzjqaYZxN6DhVquHHYW9+MSQsNpdIQQ3vboYfeU0 eBBGw8ZJGNcSwE1b4YinFsl3vgfJT9jyNwe0hpD5TU87Yebwotd+VBd/AdWhAQStkUg42X 9XaNlOodWwmCg2mOpNh7zzbs4qthBvkSF40h48rtAWWby1zJhRGmeHeqBPGTJbG8KkZ8L4 /A7qP6XndoevWRPTTxSKdpi/UfA0qYwnhg1ciJv/Wm6QZzPcrJIhwdiesLYbNII9tfYb7C TmOGxETeugPfJB7yyXnCvivIYLBaawcd0bKOtECfAK6MIDEa4XPD70/+BfXxYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T806s1l3qzF68; Mon, 8 Jan 2024 16:35: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 408GZn9P018677; Mon, 8 Jan 2024 16:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408GZnaV018674; Mon, 8 Jan 2024 16:35:49 GMT (envelope-from git) Date: Mon, 8 Jan 2024 16:35:49 GMT Message-Id: <202401081635.408GZnaV018674@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: ba719a0fec8f - main - Fix "version introduced" in numerous manual pages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba719a0fec8f831aef4b23de0ff36fd47bb26651 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ba719a0fec8f831aef4b23de0ff36fd47bb26651 commit ba719a0fec8f831aef4b23de0ff36fd47bb26651 Author: Tom Hukins AuthorDate: 2023-09-25 15:22:51 +0000 Commit: Ed Maste CommitDate: 2024-01-08 16:35:16 +0000 Fix "version introduced" in numerous manual pages MFC after: 1 week Pull request: https://github.com/freebsd/freebsd-src/pull/853 --- bin/ls/ls.1 | 2 +- lib/libc/gen/posix_spawn_file_actions_addopen.3 | 2 +- lib/libc/sys/fork.2 | 2 +- sbin/mount/mntopts.3 | 2 +- share/man/man4/igc.4 | 2 +- share/man/man4/mac_priority.4 | 2 +- share/man/man4/tslog.4 | 2 +- share/man/man7/growfs.7 | 2 +- share/man/man9/kasan.9 | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/ls/ls.1 b/bin/ls/ls.1 index fdfcb50beb06..4f680d97ea0b 100644 --- a/bin/ls/ls.1 +++ b/bin/ls/ls.1 @@ -925,7 +925,7 @@ command appeared in The .Fl v option was added in -.Fx 14.0 . +.Fx 13.2 . .Sh BUGS To maintain backward compatibility, the relationships between the many options are quite complex. diff --git a/lib/libc/gen/posix_spawn_file_actions_addopen.3 b/lib/libc/gen/posix_spawn_file_actions_addopen.3 index ef6348daa4ba..80bc91454471 100644 --- a/lib/libc/gen/posix_spawn_file_actions_addopen.3 +++ b/lib/libc/gen/posix_spawn_file_actions_addopen.3 @@ -270,6 +270,6 @@ The and .Fn posix_spawn_file_actions_addclosefrom_np functions first appeared in -.Fx 14.0 . +.Fx 13.1 . .Sh AUTHORS .An \&Ed Schouten Aq Mt ed@FreeBSD.org diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index e4cd3deea512..32dbc7a39711 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -265,4 +265,4 @@ implementation must be async-signal safe. The .Fn _Fork function appeared in -.Fx 14.0 . +.Fx 13.1 . diff --git a/sbin/mount/mntopts.3 b/sbin/mount/mntopts.3 index fe2073c3dc71..2480be2bdc9e 100644 --- a/sbin/mount/mntopts.3 +++ b/sbin/mount/mntopts.3 @@ -376,4 +376,4 @@ The and .Fn chkdoreload functions were added in -.Fx 14.0 . +.Fx 13.2 . diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index 97b40b6ffb92..f77581edd00b 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -151,7 +151,7 @@ address. The .Nm device driver first appeared in -.Fx 14.0 . +.Fx 13.1 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/mac_priority.4 b/share/man/man4/mac_priority.4 index 868d027d5233..c63197d5fc29 100644 --- a/share/man/man4/mac_priority.4 +++ b/share/man/man4/mac_priority.4 @@ -125,4 +125,4 @@ MAC first appeared in and .Nm first appeared in -.Fx 14.0 . +.Fx 13.1 . diff --git a/share/man/man4/tslog.4 b/share/man/man4/tslog.4 index 40397d14c3e2..e7f69a8d6f3f 100644 --- a/share/man/man4/tslog.4 +++ b/share/man/man4/tslog.4 @@ -101,7 +101,7 @@ first appeared in .Fx 12.0 . Support for tracing boot loaders and userland process was added in -.Fx 14.0 . +.Fx 13.2 . .Ss TSLOG vs. Boottrace .Nm is oriented towards system developers while diff --git a/share/man/man7/growfs.7 b/share/man/man7/growfs.7 index 241c12cd28f1..43648d8d9f2b 100644 --- a/share/man/man7/growfs.7 +++ b/share/man/man7/growfs.7 @@ -132,7 +132,7 @@ The manual page first appeared in .Fx 10.1 . The ability to add a swap partition was added in -.Fx 14.0 . +.Fx 13.2 . .Sh AUTHORS The man page and script were written by .An John-Mark Gurney Aq Mt jmg@FreeBSD.org . diff --git a/share/man/man9/kasan.9 b/share/man/man9/kasan.9 index 209fbb06506c..77d7e8f46aa8 100644 --- a/share/man/man9/kasan.9 +++ b/share/man/man9/kasan.9 @@ -163,7 +163,7 @@ should be 0. was ported from .Nx and first appeared in -.Fx 14.0 . +.Fx 13.1 . .Sh BUGS Accesses to kernel memory outside of the kernel map are ignored by the .Nm From nobody Mon Jan 8 17:50:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T81mW1Q1Dz56FRQ; Mon, 8 Jan 2024 17:50: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 4T81mW0lF1z3xS0; Mon, 8 Jan 2024 17:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704736203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLqCQSnx8NwqYbh5C2BhoxXd1lVpFefAqty3JE0WJso=; b=wmk78iph9WPNqT6gnxyaVkZL7TvKTRuZX+wPwW4+8d8ckhu4hOZO9Au/5yl3py0Ypc1Ap7 /CRvREKgFF9/YrP04Cnn92ZiR3jO8YB/Bp/0oMdR65NlTdEXq+gI8JFsReINzjXc5mELO+ eccKI8ni1zgBkbOWi2goIOfXOFs523MkI0lyDgTUpi3Ld99m9NHnUquKeuIx6jsqRx3+Py 41mQd1lQy9NvioM25YoYFgt0wxOT7L7F7PBSh8xZJ81+v5uNAXZC5vxWDcC25cZwZnONu1 yNKXzQ3h3ekCxYvTw3FjIzDfG8f0gksEKSKG17vVYy46p0Gr229NN8Q0FnBMrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704736203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLqCQSnx8NwqYbh5C2BhoxXd1lVpFefAqty3JE0WJso=; b=VuW9WPMD7DEb7JQ7IqpYLI6PstZszKmkx4HzZVydFumdkyLC2qYeHEUdGWxXBL5EEp2D4f jfDGzgyjlpo/NAiCSrzG3FiTzedoo7YUSABtnZfz3zUvsGP7dqUmm6awn3+pCZu+KnqNqa bU1oWi1UkE5a+5V5wwkPoYJ+Gyv9/PhFMZK6alYj/ttKcBQ1rDHBL4hHt6QCcmU3kVV9bT VBQGtLgv8b7gk0DHXpp413DeWj+dtBbBdiN9IF7CPPA0BmvN3+Ype9hJWzzBR8dH7EPdZZ 5Or4Vu2WsNvxWRZwmw3mKNPlFzaeGdkklIf++BCw8QW93O7nR+4J/A03oKKMlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704736203; a=rsa-sha256; cv=none; b=PY62FV6HdHlhFC3QVQys0VH6ZKkOP6FsvFXLPNIw5QkJzKanlJ3EOSAQvA4lnvNq/m7jXx sWM4CQj8stfdD/bmPsyWmKzgbQTCtap2c3YjUBVMbPyloCCp4LOEvqMRbMotIZJsFkh+iT Gbv43SwrDDSIZtNoMba/OP5WB+w/mnTOELVQmZrRIIBdA1l8o0pvcd7rHxWurUwiipF2q5 lVrsj3iOMOKExZlZm5JzM+TzMwuwaKR/OTZ7Ufv1EQbedn8x5rqMem/a1dTnSK8acoS3uh BNAORwx6KAXYXnSIFtzU6YQ/awoV8OMv4KRKHxAXjupIdnZcWCWlHsJYmaiiLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T81mV6x4dzHFS; Mon, 8 Jan 2024 17:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 408Ho220041184; Mon, 8 Jan 2024 17:50:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Ho27l041179; Mon, 8 Jan 2024 17:50:02 GMT (envelope-from git) Date: Mon, 8 Jan 2024 17:50:02 GMT Message-Id: <202401081750.408Ho27l041179@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: a4a838a31ac2 - main - bhyveload: make error printing consistent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4a838a31ac24e19c8ee68d45cf5234615d0b958 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a4a838a31ac24e19c8ee68d45cf5234615d0b958 commit a4a838a31ac24e19c8ee68d45cf5234615d0b958 Author: Kyle Evans AuthorDate: 2024-01-08 17:49:40 +0000 Commit: Kyle Evans CommitDate: 2024-01-08 17:49:40 +0000 bhyveload: make error printing consistent Previously we used a mix of perror(3) + exit(3) and err(3); standardize on the latter instead. This does remove one free() in an error path, because we're decidedly leaking a lot more than just the loader name there (loader handle, vcpu, vmctx...) anyways. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43331 --- usr.sbin/bhyveload/bhyveload.c | 49 ++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c index 4f16f58bfc9f..4d89393424f4 100644 --- a/usr.sbin/bhyveload/bhyveload.c +++ b/usr.sbin/bhyveload/bhyveload.c @@ -861,18 +861,14 @@ main(int argc, char** argv) need_reinit = 0; error = vm_create(vmname); if (error) { - if (errno != EEXIST) { - perror("vm_create"); - exit(1); - } + if (errno != EEXIST) + err(1, "vm_create"); need_reinit = 1; } ctx = vm_open(vmname); - if (ctx == NULL) { - perror("vm_open"); - exit(1); - } + if (ctx == NULL) + err(1, "vm_open"); /* * If we weren't given an explicit loader to use, we need to support the @@ -882,10 +878,8 @@ main(int argc, char** argv) cap_rights_t rights; bootfd = open("/boot", O_DIRECTORY | O_PATH); - if (bootfd == -1) { - perror("open"); - exit(1); - } + if (bootfd == -1) + err(1, "open"); /* * bootfd will be used to do a lookup of our loader and do an @@ -893,19 +887,15 @@ main(int argc, char** argv) * to the more usual lookup rights. */ if (caph_rights_limit(bootfd, cap_rights_init(&rights, - CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_READ)) < 0) { - perror("caph_rights_limit"); - exit(1); - } + CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_READ)) < 0) + err(1, "caph_rights_limit"); } vcpu = vm_vcpu_open(ctx, BSP); caph_cache_catpages(); - if (caph_enter() < 0) { - perror("caph_enter"); - exit(1); - } + if (caph_enter() < 0) + err(1, "caph_enter"); /* * setjmp in the case the guest wants to swap out interpreter, @@ -921,26 +911,19 @@ main(int argc, char** argv) if (need_reinit) { error = vm_reinit(ctx); - if (error) { - perror("vm_reinit"); - exit(1); - } + if (error) + err(1, "vm_reinit"); } vm_set_memflags(ctx, memflags); error = vm_setup_memory(ctx, mem_size, VM_MMAP_ALL); - if (error) { - perror("vm_setup_memory"); - exit(1); - } + if (error) + err(1, "vm_setup_memory"); loader_open(bootfd); func = dlsym(loader_hdl, "loader_main"); - if (!func) { - printf("%s\n", dlerror()); - free(loader); - return (1); - } + if (!func) + errx(1, "dlsym: %s", dlerror()); tcgetattr(consout_fd, &term); oldterm = term; From nobody Mon Jan 8 18:39:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T82t653vlz56P5D; Mon, 8 Jan 2024 18:39: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 4T82t62x3Kz49WY; Mon, 8 Jan 2024 18:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704739198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y37I0X1cAbCHc6K40IptlPxNInojeZ8kte9CdoAjloA=; b=FqHEy5Hl7hX9w9/TRFKEB+R45QoCo1hqOOZ7xKJMRgoxs+tpx8bHdZJQMqIJeQl6c4hEG4 Nt4ccxt1V7rBZ+F5YSfCvB9sEfvJq0pH9F7ghWRNogXjnoCSAOAa5noCQDKjPyi6uUCU3p +1ge1XEMxKW3qsdgLpGuOjgq5Rfvkc/kymjDiB73SeIQ//yypySRFYmvCtv9hKcNYG9N4d GWcn/wre6lp43VeWV6P4C6oyFaIqJpVKtcTKpPeQC7cxB1ioPuXUSYCjkODnjXTIoZXbzk BXoAGfMK5JBsxgDsjJ3jhgbc3sYBjlzKMa11wJxx8NdJdKwUbLJMwJvvHKFKfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704739198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y37I0X1cAbCHc6K40IptlPxNInojeZ8kte9CdoAjloA=; b=mG/xrisG0PX5IDJgKFwhDVNTGh9wQNWC9Lutf9b9I35dUvntBMO/Q3mt1UVO1RXE6uTjNr GPpqpbqSkTGOxyTVDBfSFzP+FUNwC9CC376DwEIXr1fsDSIWGNUmLdCEkuQFhyM+/H1B9A 2Hpfm1gmEm4an01DhAfpMFXuHxd+1DxOoluw2DiEQwBmhqarjfd0bz2B6H/AiFdEJ6VYWR 1Nj9AADUyqQWZ8MfkTxqguqjnof1Gx1Qz6OIFCqASNoNA1dLlMaW26dsXr9a3uzT+a3VWW nf4LSKVAiZgqcteoepw5btx1UsBadD1tLzcDwVAP8TwzKwXGik94lkju0XNnrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704739198; a=rsa-sha256; cv=none; b=DSCgZUyCCq6HuqNJ7OfyASUYlJsDq7ti2xmtJA8Ymtui3wbmaDoKhjcq4W7Gl8CBugZu1m EtXQ7NFN+61NqOfu/B1uFYKIuvZbhcTxJa8yEqwBRXY1n+Rajf9G83iylCTZxXsBW5GvPC 5PUamkxTOaM870uRw1/K4uPIu6tlW+qVAFUBt6YqIHtSh8gKbYRQys1n2pE0YfUyUPOmdG 8sNqwb96GHJsuHBvOunVI+xfZwLEhY8JaiB7zWd3y+Vy7AESDN5Z7U8dNvPz/UZSl457oP kWmkb0pbOa92K+d39M/u5CdIIYUDYga0aRaq4b5Tni581Y42LjEMliVI2OItuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T82t61sTvzJYd; Mon, 8 Jan 2024 18:39: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 408IdwG7023992; Mon, 8 Jan 2024 18:39:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Idw03023989; Mon, 8 Jan 2024 18:39:58 GMT (envelope-from git) Date: Mon, 8 Jan 2024 18:39:58 GMT Message-Id: <202401081839.408Idw03023989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 429f14f83ae1 - main - tcp: clean PRR state after ECN congestion recovery. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 429f14f83ae1f6357a9455d4f075522420b01b03 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=429f14f83ae1f6357a9455d4f075522420b01b03 commit 429f14f83ae1f6357a9455d4f075522420b01b03 Author: Richard Scheffenegger AuthorDate: 2024-01-08 08:28:01 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-08 09:53:04 +0000 tcp: clean PRR state after ECN congestion recovery. PRR state was not properly reset on subsequent ECN CE events. Clean up after local transmission failures too. Reviewed by: tuexen, cc, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43170 --- sys/netinet/tcp_input.c | 1 + sys/netinet/tcp_output.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 0014c11d9daa..ed5f28490852 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -483,6 +483,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th) /* XXXLAS: EXIT_RECOVERY ? */ tp->t_bytes_acked = 0; tp->sackhint.delivered_data = 0; + tp->sackhint.prr_delivered = 0; tp->sackhint.prr_out = 0; } diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 8d863ffcf432..1ff6f5bee39a 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1663,6 +1663,8 @@ timer: if (flags & TH_FIN) tp->snd_nxt--; } + if (IN_RECOVERY(tp->t_flags)) + tp->sackhint.prr_out -= len; } SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) { From nobody Mon Jan 8 18:39: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 4T82t52tDvz56P59; Mon, 8 Jan 2024 18:39: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 4T82t52G1Qz49Kc; Mon, 8 Jan 2024 18:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704739197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MU5MgoSskyuyJNiJma12eJkWewmkX0eVUf8jTStsXKE=; b=S+APjGaYGSgPWnY9yxlbgT4OBpTQqe/VcPUywxFSobyXC5JzCJomVrtvptjAsv1X83kv+1 9a/HpNfSQtV20WEgci4pYmIjLKQ7vzbcX117d0zzlje4unbc5BjsDtGaSWbOL5o14xg5e4 6CLuO9+wtyRx5T8uussjzn3sQe7prcfiW5IzLs3TDMkbWqvjFkSWiCPUqyenwWTDKF4KBM XTiC2BF9qOuRIkg6Ahvb5ZNzboZcUo5O+30AJfr64PyCVOlNZ2WHdIGztbHUYueo5sx8yL jO2p6xda41zVr36RwZ6ytrE7v26mA2gio4YlkkGyw6HpheDtE976wyATVYWiQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704739197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MU5MgoSskyuyJNiJma12eJkWewmkX0eVUf8jTStsXKE=; b=Gf1v8ICiw4jZpmLWHVklvSKwBWFh6HttR+kwuou5+wtn+98GEKmWiIctV3QY/6qvfKd5gp 9VK/U2rY8zrU01sXqVgECHdOYUIGjB4/KwqUTFJjC+vBfzjYm4TtXxFbRU/O3s/U2eX7E6 3z4JXVz2VrCif0UUXB47gN3x/FcbIvy1ZgJa9h8u4T1XT7jVNcWbzRbWtjiLfD7HdWTwAg GVpRXQu+ljgp8ymsnBUZ2wNyqU0J+LdFW6jcGkLXSBdhqkhcOjGKmimzbrE52LAQ6WrlfL 4H9RqKVY3Da21zwRcU6B2/SY1XPThiKs6BOV1nanb/dkWWiEXnuEfr4sh+TLCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704739197; a=rsa-sha256; cv=none; b=o//9V69JW4gWJKaui+5rzMciVUyjTqxsV9Dhv4fAeAzS7KWXD0gR9kMKUPeU0/z5UzVkkw bbK6O9SZFjSEeKKr+QpfCha2Yer2+ibYNzWAgpKpGp7nlcYiLDbzibnFad3gqR+7ElwMLV TO/Iv9En9wtIJaKXByRaZBLyVnBgUENjbjJqs6oW4F/Qm1hw2fSQ8qOAwf6LDb73SYJN35 zN3mExVKCUV6pKNBF1IJOLh7WIDK6cD1suuLgJErLt4GeH9t8wdcKcgKlriFBQi9l8IaCH bSGBrE9KkVYZ7PXSvJixDYZOwwg2nYxlPrE2BuLVhNI2QpaXwQuTKUdTLsZp+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 4T82t518y4zJPb; Mon, 8 Jan 2024 18:39: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 408Idvfb023941; Mon, 8 Jan 2024 18:39:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Idvbr023938; Mon, 8 Jan 2024 18:39:57 GMT (envelope-from git) Date: Mon, 8 Jan 2024 18:39:57 GMT Message-Id: <202401081839.408Idvbr023938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: f4574e2dc5a4 - main - tcp: prevent spurious empty segments and fix uncommon panic List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4574e2dc5a4719379496338257526aba484751b Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=f4574e2dc5a4719379496338257526aba484751b commit f4574e2dc5a4719379496338257526aba484751b Author: Richard Scheffenegger AuthorDate: 2024-01-08 08:25:39 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-08 09:52:49 +0000 tcp: prevent spurious empty segments and fix uncommon panic Only try sending more data on pure ACKs when there is more data available in the send buffer. In the case of a retransmitted SYN not being sent due to an internal error, the snd_una/snd_nxt accounting could be off, leading to a panic. Pulling snd_nxt up to snd_una prevents this from happening. Reported by: fengdreamer@126.com Reviewed by: cc, tuexen, #transport MFC after: 1 week Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43343 --- sys/netinet/tcp_input.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 4a6100fc969b..0014c11d9daa 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1866,7 +1866,13 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, tcp_timer_activate(tp, TT_REXMT, TP_RXTCUR(tp)); sowwakeup(so); - if (sbavail(&so->so_snd)) + /* + * Only call tcp_output when there + * is new data available to be sent + * or we need to send an ACK. + */ + if (SEQ_GT(tp->snd_una + sbavail(&so->so_snd), + tp->snd_max) || tp->t_flags & TF_ACKNOW) (void) tcp_output(tp); goto check_delack; } @@ -2033,6 +2039,8 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN << tp->rcv_scale); tp->snd_una++; /* SYN is acked */ + if (SEQ_LT(tp->snd_nxt, tp->snd_una)) + tp->snd_nxt = tp->snd_una; /* * If not all the data that was sent in the TFO SYN * has been acked, resend the remainder right away. From nobody Mon Jan 8 19: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 4T841d002Tz56Wl1; Mon, 8 Jan 2024 19:31:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T841c6D0jz4KsJ; Mon, 8 Jan 2024 19: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=1704742292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ScmTeHF+qeWD4rRqp+DqpRBtl++laYKmtPj6KXuAyL4=; b=L2wLDOVlgi5tgjiOrm0S2qeBKivuiHYD07BDGUIt6+IFBSo9H2Vv8UZ8wNKBftL28xuYTP QDj3t8RmBgsI+9vpVCMqgkwQ+QQLnXQmYd8Ae47tcAFPALYktFGQqnVBKL/uwIehT7Vv9Q JxvNvlKRsksjq3gHa3kS5ZWbFvsI7WL/HQpbTVXHxUn5MNmgp1gmVJyYuSO/sgb0GHi1qr 3OgWGe79PLSH6zV+m1LaCMqpa+4pVrJ57lcwj5QgYZ5MR/TCG6KPbN5Gda9LsG1dSbAP+W q+4R9EnO4FEBSPQvEAdZ6wXHH0auzUjc02MElQecHx+F4kjqO53S7Q8/fsE9Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704742292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ScmTeHF+qeWD4rRqp+DqpRBtl++laYKmtPj6KXuAyL4=; b=PmaHxxQZQlyxHeqviyinhdUIAn478POnW8qpZVqNTNpg9ADz+ikPKFqQCr0f+NhmaWXjj2 CQi9hZ5fANrLp6iMhyKF4WBGeBcV9dApKN8ZZwjQziAZT/YEBDz9rdpDWYtU6A0/25FaRW HvJnQpb1vG+oA6XkI9E+3b4Mb46tshLtXwGGglLjupY4+sRiQn5ZSpJ62t6P0eF0CYu3Q+ /L+MzXoLb6Fg68fz5YEADt8FPqdt0UcgnArlPOgk81yWFqh15HDVRneXtyo2v9ax8dRmOC oudOdJgA7+H+ruUHoArzHVQZyI0T/un3nt71SVJvdMG8YZrxlTeNky7MexMLlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704742292; a=rsa-sha256; cv=none; b=y4jBt4pZrOA/fvWT+EpwrCAYso92LDObuIGHCws2wt3W/LK4I1kZn0htre8zfxRqY9fj3R zU7lA23kEZicCJYpJXYxeu68Dv9hBRgTrYbpLtVOyrjCX2lvaoPQneE5UTMOddh/rah0Ov roAg99cGK6PlzE0z9CWMd3yS9iAiSo3R2dRKo3HwYSow2ZGS1GfsuG4Q0hLL6opQSun8dN vNpk+TSMrH8x6olBQcmwUpBxgmtoaDvORoPwRGOBgqW4gDgkzLC2ktxIJ4dqwUcDOadlq9 4Mq/WAZvjdKq25HvYyYTA/ZZf1+FGC8Dkx9JMJzDHy4WU/e35KzmsWKBrIyyQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T841c5H1GzKkn; Mon, 8 Jan 2024 19: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 408JVWtv019120; Mon, 8 Jan 2024 19: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 408JVW9i019117; Mon, 8 Jan 2024 19:31:32 GMT (envelope-from git) Date: Mon, 8 Jan 2024 19:31:32 GMT Message-Id: <202401081931.408JVW9i019117@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: 20010b86fe0e - main - netlink: Add sysctl descriptions for net.netlink tree List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20010b86fe0e181bdad947449fced07bf3fb9cb6 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=20010b86fe0e181bdad947449fced07bf3fb9cb6 commit 20010b86fe0e181bdad947449fced07bf3fb9cb6 Author: Ed Maste AuthorDate: 2023-10-12 01:38:00 +0000 Commit: Ed Maste CommitDate: 2024-01-08 19:31:31 +0000 netlink: Add sysctl descriptions for net.netlink tree Reviewed by: markj, melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43368 --- sys/netlink/netlink_glue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netlink/netlink_glue.c b/sys/netlink/netlink_glue.c index e4b52ffb191b..164bea1aba61 100644 --- a/sys/netlink/netlink_glue.c +++ b/sys/netlink/netlink_glue.c @@ -50,8 +50,10 @@ #include /* Standard bits: built-in the kernel */ -SYSCTL_NODE(_net, OID_AUTO, netlink, CTLFLAG_RD, 0, ""); -SYSCTL_NODE(_net_netlink, OID_AUTO, debug, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); +SYSCTL_NODE(_net, OID_AUTO, netlink, CTLFLAG_RD, 0, + "RFC3549 Netlink network state socket family"); +SYSCTL_NODE(_net_netlink, OID_AUTO, debug, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Netlink per-subsystem debug levels"); MALLOC_DEFINE(M_NETLINK, "netlink", "Memory used for netlink packets"); From nobody Mon Jan 8 20:07: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 4T84px4KDmz56crc; Mon, 8 Jan 2024 20:07:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T84px3kP8z4Pf8; Mon, 8 Jan 2024 20:07:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704744441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGqfUn1JsPnOwtZZUMIQM37bQitYwu9TB68Du/++tOg=; b=WFjm+5LtzKltSEJbVfQoahmfH0rMATW3a1oZDPJuAXHbgrvibp6UOqXJnIUHZCaddYWO08 oeZBzUpKILsVTeapb1uqYM/5AxLUMfBVyZ4Teb325dY0KjcxR2tG3FnsNY6ZAp2y+/iZ4C 2mX7umyoiByLA2cX1gQ/qoAY9+ke4wLZutyre99bf4tjviL7jKTX1TQpXyVwqFEt5RO1rH TbKHiyDrvl259AJ8X2Xuhz9c9kNUyp0D0e00mFaGc09mnsD/WPRBL/iIv4b+DwdEkQUqc9 5IP1HG57RddCMKItJyRf8FTnc7e9Xq6HhZZCPCbSYMZtDSx29+FaczalgzGMYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704744441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGqfUn1JsPnOwtZZUMIQM37bQitYwu9TB68Du/++tOg=; b=ectGY1+YyCeYu8QtSgfKqtqaGA/7ZPux4e0ugb82Yik34bHnJ0CWza8YrOW1Dae58Xhzu1 ivu6BHAOdS9Ij9818rQWSIgJN5P9YD66RuC8dOZdnextbvie2JRErCo6JFyxSVgtvqSDp2 eAo/ODNKfiBpJbfVQTPxEAsEV0Bh7+UOEB4Q0HiKAx3L7BLYUyNWoZYoQQ9ZYRbOAy305W j9RXmla9MQBWWBcvUjgazWVN9nj8ky2GLDnSTtONW0HYbUJvvM9b/YBmzvu+Ur5EEvrm4E 0lHi3ldkG4LWswkexFqNpJM7PR5XXkdiKAHfU5+OkmsPfWitTgw/j1M3hIftQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704744441; a=rsa-sha256; cv=none; b=K3X5ky4dB1WZjUVUIdih8AROxW4NJPuFm6slqxVnjMw64wSebI9c5Q+oBz0WBFhW6TMTte FVyOdnjc5Pizb/IdAvY7kLrbb94nz+n+sYIpgjUNBxNh0ZRVii9Qm6k3CZHKUrNP65Wo3x dp21cus9/qxo9+NYPDvKW3QHrE+zn05hbcfVTUjLuIpbwP1BZ49YUbvAP/unIDAQQvSmh0 ofFIQQ1wnwvu2hWcgih7+VmtpMeG4llTCiQGzJxWZ0JyKURZ1BhcTqdDVDr9ppcZ9FAnqA L7GFjClI5raNX0PdpbXy8mp1CL/K9Q3jfdxgqVhaiBQgzq+H2e2N7OBZLXd/eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T84px2msLzLBW; Mon, 8 Jan 2024 20:07: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 408K7LrY074319; Mon, 8 Jan 2024 20:07:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408K7Ltc074316; Mon, 8 Jan 2024 20:07:21 GMT (envelope-from git) Date: Mon, 8 Jan 2024 20:07:21 GMT Message-Id: <202401082007.408K7Ltc074316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: df8a58b17a19 - main - cxgbe(4): Add support for netmap offsets. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df8a58b17a1907ed3b4597475d1cb8eacc9636de Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=df8a58b17a1907ed3b4597475d1cb8eacc9636de commit df8a58b17a1907ed3b4597475d1cb8eacc9636de Author: Navdeep Parhar AuthorDate: 2024-01-05 01:39:31 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-08 20:04:07 +0000 cxgbe(4): Add support for netmap offsets. PR: 253069 MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_netmap.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index 64fba4410364..0377f65acc3e 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -1003,7 +1003,7 @@ cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_txq, usgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | V_ULPTX_NSGE(1)); usgl->len0 = htobe32(slot->len); - usgl->addr0 = htobe64(ba); + usgl->addr0 = htobe64(ba + nm_get_offset(kring, slot)); slot->flags &= ~(NS_REPORT | NS_BUF_CHANGED); cpl = (void *)(usgl + 1); @@ -1269,7 +1269,7 @@ cxgbe_nm_attach(struct vi_info *vi) bzero(&na, sizeof(na)); na.ifp = vi->ifp; - na.na_flags = NAF_BDG_MAYSLEEP; + na.na_flags = NAF_BDG_MAYSLEEP | NAF_OFFSETS; /* Netmap doesn't know about the space reserved for the status page. */ na.num_tx_desc = vi->qsize_txq - sc->params.sge.spg_len / EQ_ESIZE; @@ -1286,7 +1286,7 @@ cxgbe_nm_attach(struct vi_info *vi) na.nm_register = cxgbe_netmap_reg; na.num_tx_rings = vi->nnmtxq; na.num_rx_rings = vi->nnmrxq; - na.rx_buf_maxsize = MAX_MTU; + na.rx_buf_maxsize = MAX_MTU + sc->params.sge.fl_pktshift; netmap_attach(&na); /* This adds IFCAP_NETMAP to if_capabilities */ } @@ -1368,6 +1368,14 @@ service_nm_rxq(struct sge_nm_rxq *nm_rxq) handle_nm_sge_egr_update(sc, ifp, cpl); break; case CPL_RX_PKT: + /* + * Note that the application must have netmap + * offsets (NETMAP_REQ_OPT_OFFSETS) enabled on + * the ring or its rx will not work correctly + * when fl_pktshift > 0. + */ + nm_write_offset(kring, &ring->slot[fl_cidx], + sc->params.sge.fl_pktshift); ring->slot[fl_cidx].len = G_RSPD_LEN(lq) - sc->params.sge.fl_pktshift; ring->slot[fl_cidx].flags = 0; From nobody Tue Jan 9 01:01:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8CLL09fTz55Rdq; Tue, 9 Jan 2024 01:01: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 4T8CLK6MnYz4LD5; Tue, 9 Jan 2024 01:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGZRcpk4ZvoXn+4whPiEuAOx/ctjhmAbSHL+dkuSUME=; b=Be+HNT1hsMcddm60Oamzmw4YmqKDfooMWFbQ3EPp/6kjlijBnPUhdr12pipTeMgZpvnoQn 7oocO3m96GVq9t36Zhg0BU12ogfI0c5Pgq5496mD2i8UZ7T9dIiLXzQlZdaq8fUY+Aeofz 1E8nct7i74aFOYe9MvutUqTcYA4YZvGMGGYihnImYdSVgPh9mitC07wXxmxDu2zWaa4YcV d26K4qp1OuLljlWaQUo+XzPSGNFxW4Sdw77fUd4R3HEFiIA1pc1cnOHhqbUyZYeGGVKzMK STyP4/MKYgu0O9g+Tx1gtaSLW0bvrj7n/XEQhrgnqOYslEbTl1deLz1dNI9vvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGZRcpk4ZvoXn+4whPiEuAOx/ctjhmAbSHL+dkuSUME=; b=Z69bYsb2+VPDRiE02MY+s5WiF7wKtiqKgGKoxLMkowGmmzBJp3eyNB1BFpYlc94VSbUBQf 270xjMSDCTJAluWh6wk7MYhmPS2AxG1fhgFCvPhybSk0bDaIz4EPr/uDYH2AruoTliQ0Yc TkzTdlqdip1NgSo/MNIel7AgnlL5IkzJQjRdsYD8kj5zFe1FDN+vfDFiGJTBRkpv/7eRfI YGBFGyfbtyNpqKM+TnYtTBiadq5YquIIsrH/m3tQ7bvru8vEKROO4OZZ1s+gL3Iio2Lfl9 CX2eeMSnqi8UDy2ZfUNW70WfAROKK6XGDngieS1VJGyKAoFOgrVwV7AgXpPuGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704762089; a=rsa-sha256; cv=none; b=jq+fYEkrKHafuH5xpCinoSgbjvH8SJ1d9RyJ3l9Fq84wijQsxN8vpC0D+oWW/lQQwTmvQV xWdAu2RDfa6jj6cNoUx12jFjlcYYASvjW1WLvrJpClF947ml1LWmc02gFUM/xdYnO/avRQ actDE5oBYdWbfSMvR7dSbz54dmZM1uXwtwSKQyr4YmvHQbKTZlCA3R0RrQY14XO+g5z7Gn uYdeWzbt+jFvTy73Rr+ncCCtVMmWT7RUKLDfEXB5tsjIcF734nNEd9nIzj2W1t0tZsRwbR fYkorjJX+aBRFiRvVCCObyyKFqgamd2GEN3NVTs1Fkxyri08EcYusBQf0vhhVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8CLK5RFQzVPY; Tue, 9 Jan 2024 01:01: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 40911TRp076219; Tue, 9 Jan 2024 01:01:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40911TcF076216; Tue, 9 Jan 2024 01:01:29 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:01:29 GMT Message-Id: <202401090101.40911TcF076216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 78258ee013cf - main - kldxref: Correct contract number in license ACK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78258ee013cfec2145060cc4c25d66f075db36d3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=78258ee013cfec2145060cc4c25d66f075db36d3 commit 78258ee013cfec2145060cc4c25d66f075db36d3 Author: John Baldwin AuthorDate: 2024-01-09 01:01:05 +0000 Commit: John Baldwin CommitDate: 2024-01-09 01:01:05 +0000 kldxref: Correct contract number in license ACK Reviewed by: brooks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43371 --- usr.sbin/kldxref/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/elf.c b/usr.sbin/kldxref/elf.c index cc9bf9e6cb38..e5fe90169d2c 100644 --- a/usr.sbin/kldxref/elf.c +++ b/usr.sbin/kldxref/elf.c @@ -7,7 +7,7 @@ * of Cambridge Computer Laboratory (Department of Computer Science * and Technology) under Defense Advanced Research Projects Agency * (DARPA) contract HR0011-18-C-0016 ("ECATS"), as part of the DARPA - * SSITH research programme and under DARPA Contract No. HR001122S0003 + * SSITH research programme and under DARPA Contract No. HR001123C0031 * ("MTSS"). * * Redistribution and use in source and binary forms, with or without From nobody Tue Jan 9 01:21: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 4T8Cmx4wstz55V0k; Tue, 9 Jan 2024 01:21: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 4T8Cmx3Dnbz4N1g; Tue, 9 Jan 2024 01:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704763265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBz/wcImfEYmc2NbWWos+bMu35012l8nrR0FDYIlBbI=; b=hi+JOz+UVLfiGZUJxjy+7lMhHKiWBNtUSXthX+QySzIduJshg9ITY1/4rwcQOGfDnA9htP BJRyy/SApux48uE1qaBo8wtgNJ6vXHCSxnnnyKQZUNWd2NF01E5Zqy8uVgvF9/YCt8s85/ BqEIlyRf7hxylgejDHj0bn5LdmUglpRu8w5XBc19OkltKGKrmDVNKTP2xWhMU9h9dk/tc5 psnZqeTYfMHsALwjSHbKJKs5DgNNihi0p0HI9dPHqIvLmfG7mEe2RMSaYGouaLhmCoNL/Q an+9dNsaMVFU/mOzNVMA7/OXtJ9EmznY8CX6w06Wi2VNgIugitTdOvyixB75EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704763265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBz/wcImfEYmc2NbWWos+bMu35012l8nrR0FDYIlBbI=; b=rP0wHKjuVt6WqSYyrtCVMSf8ewMMn82f3prrU/nNGqvEHLgx09JsTFOdxEDA3PvPR0CF6o AjSbaSFGLCBU3txlGIdpSC48BjQ2b05Ebn2+aoIaOFvoJTdYUlbu2azMgTVBvaLM3boYOJ Wy/dASvdsaEbsUAWIhrkUHEH/zxFIkNddPGLX3K3SKvof6ik36dB8Sm6e2X2hObzaZsWKc MrcvY7+wxRnpjFlMFnvMcHFyQpLnOqf6r01Cm5eHZbWuMh8NjHFIRVpMEHbdIV4+JWlBd5 OOemNrPgSxsZSSEVQ7301zoQ/wSYCizf+FlT402gE9uEKxeEC3Ht/7Y7eTHAQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704763265; a=rsa-sha256; cv=none; b=fecsmgXp+66qoHHGlFjEjoTBZ3BymfbnVViBiWCer9x99qAHQ+gYLxXTqC8E75cgXoiUEB hrJRS7azUGPqQjxu+pyQKgkylrBjI9Scf2OW8EeryYEFxrdhJ7SdE4zGabM6YtKMrA7Ir+ a/P6l7lQa6+04lb342bIqG7OKVmJ+wYjr9asYnSk0FUhikzQ4+UKr4Upp9NSw2NbJlLAtW fXUQI9ASpN8hBwWJEXP1J9f52WSsKu4HNQS8bk7IQEvN3FeiEOETNVBQy7hRDgm7zKe2yW R589Q/3OLmN1vD98YEM4Pjf5S+zZK05qveu7LBr9UgaBVuf0caRYw5qeB6Pi0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8Cmx2JkSzWvN; Tue, 9 Jan 2024 01:21: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 4091L58R009389; Tue, 9 Jan 2024 01:21:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4091L5nR009386; Tue, 9 Jan 2024 01:21:05 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:21:05 GMT Message-Id: <202401090121.4091L5nR009386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: af9f4ac57ade - main - netlink: just return EOPNOTSUPP on shutdown(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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af9f4ac57ade116293c0a65c5201658b5e424ff6 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=af9f4ac57ade116293c0a65c5201658b5e424ff6 commit af9f4ac57ade116293c0a65c5201658b5e424ff6 Author: Gleb Smirnoff AuthorDate: 2024-01-09 01:20:30 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 01:20:30 +0000 netlink: just return EOPNOTSUPP on shutdown(2) This matches what Linux does. Reviewed by: melifaro, tuexen Differential Revision: https://reviews.freebsd.org/D43366 --- sys/netlink/netlink_domain.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 4630c12b54a8..7660dcada103 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -545,15 +545,6 @@ nl_pru_disconnect(struct socket *so) return (ENOTCONN); } -static int -nl_pru_shutdown(struct socket *so) -{ - NL_LOG(LOG_DEBUG3, "socket %p, PID %d", so, curproc->p_pid); - MPASS(sotonlpcb(so) != NULL); - socantsendmore(so); - return (0); -} - static int nl_sockaddr(struct socket *so, struct sockaddr *sa) { @@ -990,7 +981,6 @@ nl_setsbopt(struct socket *so, struct sockopt *sopt) .pr_disconnect = nl_pru_disconnect, \ .pr_sosend = nl_sosend, \ .pr_soreceive = nl_soreceive, \ - .pr_shutdown = nl_pru_shutdown, \ .pr_sockaddr = nl_sockaddr, \ .pr_close = nl_close From nobody Tue Jan 9 01:21: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 4T8Cmy66kNz55VJs; Tue, 9 Jan 2024 01:21: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 4T8Cmy4Sz2z4Mqb; Tue, 9 Jan 2024 01:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704763266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=de5hE8J7ixn1ZE9+4Jd8EcdUT3/QgXvGDrtSc1B0M/k=; b=lVWwhM/zybYTcCNRdeCL+ylErRMmaZXThlJAUr97zcRzka4KnPmv9OUaD/2wgRNiGUcjjx rL0uBv4Oy8vK2qKgbQdf7Ol5GynhVdQihMes9Dhf+u3FNjdQuH9mav1kEe7ohY5zR3toX7 SuMUvX9erVbbworJZrL2fAgxrEWsQTa//TnfApVzVIYctPfop8maD+QUCdUh6VyOSq/fs8 MDGi6RFdPGrIGcZnhP7A+Mg6byazLJXfkJUo/Z0cSCI1m/WU8CQB02l4TET1CGVQLvnfcN o5R6xCo31yVQWyijIX668r4+1qAGRBaDCMg4WJuRU4RJAMmrQSqHzOyHxsLKmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704763266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=de5hE8J7ixn1ZE9+4Jd8EcdUT3/QgXvGDrtSc1B0M/k=; b=Z3/jDW8wDAWYV3Xgcu/3KZRiytnK2FDggzU0/IbXeNkuauRZ7rBpSril4OUj4K7Jyx49JS 2KLQogBEJojLTsP0nErUL2L/zGKAi9TbKxE10fap8nQTvOaIYkYBsBdSrXKwUJMAFEvjuc 4Ow6mVpmaAo6OU5JEuwBlORdt79LsSxeHJrkiRjVzFxJJE0/4RMDmFfCRMTrNtFIjLz1kT lxPSkfRvYSdnTei4J3cDiV2d8i49z8cSq/Vovx7NR480un+jiFxdvJmxdDnZUrue3ciDL5 qGh8mN3oOCJjEE8aBqa+R2uVwp/71+QlOSkeWkC/wNZjnW1iu6+LffiOF2Z8pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704763266; a=rsa-sha256; cv=none; b=YRfme55sPnJPV86fmIxWpFTQt1UweLp/AhiVmH9fIIvR8cO7pe7xtcx2hlws4kXebtxGtX JZVIioRcnBCe2dvkQPPK+5HUbRD9ZxQS++o7OrhjOAdqacjL8w4mS2S49xIxze9I23sH1u /fhhxy1vltCmmifld7kc+eLMcv99WeQsm90wNPse3Pfoq3DubosYSFafw1vsVqE/4+qA8a B0+epW7jJz/6fFAwaRK0//zYTQdENoadJyaN+n+cgvMAHoSolwr6NSqwQ+fHvO+39TU547 c9Jcc2CKT5vMDf1T65yut5swg+YzOijvlJlzFj/NdXoi/zsbGGnGClKZqgBsRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8Cmy3ZvwzWmg; Tue, 9 Jan 2024 01:21: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 4091L6Ds009455; Tue, 9 Jan 2024 01:21:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4091L6Gn009452; Tue, 9 Jan 2024 01:21:06 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:21:06 GMT Message-Id: <202401090121.4091L6Gn009452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 59ce044a7856 - main - sockets: on shutdown(2) do sorflush() only in case of generic sockbuf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59ce044a7856b16803f7eb0aa5c54cfe6e13cff7 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=59ce044a7856b16803f7eb0aa5c54cfe6e13cff7 commit 59ce044a7856b16803f7eb0aa5c54cfe6e13cff7 Author: Gleb Smirnoff AuthorDate: 2024-01-09 01:20:31 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 01:20:31 +0000 sockets: on shutdown(2) do sorflush() only in case of generic sockbuf This is a quick plug to fix panic with Netlink which has protocol specific buffers. Note that PF_UNIX/SOCK_DGRAM, which also has its own buffers, avoids the panic due to being SOCK_DGRAM. A correct but more complicated fix that needs to be done is to merge pr_shutdown, pr_flush and dom_dispose into one protocol method that may call sorflush for generic sockets or do their own stuff for protocol which has own buffers. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D43367 Reported-by: syzbot+a58e1615881c01a51653@syzkaller.appspotmail.com --- sys/kern/uipc_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index efa349d140ff..3409a7085df6 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -3007,7 +3007,7 @@ soshutdown(struct socket *so, int how) pr = so->so_proto; if (pr->pr_flush != NULL) pr->pr_flush(so, how); - if (how != SHUT_WR) + if (how != SHUT_WR && !(pr->pr_flags & PR_SOCKBUF)) sorflush(so); if (how != SHUT_RD) { error = pr->pr_shutdown(so); From nobody Tue Jan 9 03:08:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8G8r0l6zz55qSq; Tue, 9 Jan 2024 03:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8G8r0FyLz4bxC; Tue, 9 Jan 2024 03:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704769708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJmk4fP67Kl7W1PRY66o4zY+I/yiyN9Qpo19KL+M5AY=; b=ah6fEKetGwQD+4RwThlCrpcsY8BZ1ea7NgeAtkHpRzLuSaiymgx6Vgbzk5IKngE2j/1utf Rq+M0UyRtgwa9xCg7lEIkQCIJitznlcVMW4rCJgnM7QZId3pgvX6R4jsQZXnGx26884FPl LVQJh0jf6zP/lwcecxap6m07g305GMX9Ph98DaCF3M/768eI1VUp3Ko2ZpkcS78qPos75+ kk+XzJpAcWskDeYWy7pTMc/UAkYib3W5Xw8Yh7WlUVA+aAYmu6cDHnKnQKC3GOOtkCUQiX 0gFk+BL5OtdeiT16Tsz2OpK3pyGBuNCeM2pB2yh/QoCQCXpUsHsIiP8A2paCTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704769708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJmk4fP67Kl7W1PRY66o4zY+I/yiyN9Qpo19KL+M5AY=; b=gtDWnKnUV1I1XBQjVxV3iqoqLHBF7jZ7l9S5bEbI9jA2JRg6IueGo+edk3fK9bgulIirsp 1EZ62YKTHMQC2B1zo+qaO1iVVrzVxuWOjEO0OMxzYO0VYMzzJ3/z1SOB2lxT/Wc9A7858X 9hBCgq4jn9XmntX+is1Klpyuk632squ03G9BYvYoRsokxDGQ96ZBUSu9CEYLIm+xuAM+KX sq4ZfrMqkvFuv+pcp1GLmM/IsTPtip/1uDTvwKz6cMicFzTenAZgXFfDDRRAuD0m08kHa/ F++9Rkoo1WfaBx5f6lIjFIGhK478nIPMWIGNIZXVhAyAfihN6vUiz0K/vLbUoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704769708; a=rsa-sha256; cv=none; b=hYosPjisklVg7UGTdUu2HQfkPcqTru8uzKKyygRwzHK+25kx3kXms7ajD1kJRxHOW2OQNp fuvjS7JshsRfL2JhcMAec/hnxS4vQ05MZ2N/51aT2X4TQqFwwFIct7ZfD954BMm5jS3PBm eg6fcXfjV8gNO4k3O0KLizi6syEKx8057+jYXMysgSACbCeJGqGz0kjF5XbOS5a3SB/XdQ WFUwntLQ3WzZG3HLcsZGh3ivT71anjPoD0PmUSgOuQeVareJZh4++aZPXyozIQgt8Lh/kz R97ZSnuewls9ZhpCdQrjcbo9NUt1iotxeWEtjhlnYzKPGR/ap1l1lPgbs7rDCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8G8q6QWZzZNW; Tue, 9 Jan 2024 03:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40938RK9082383; Tue, 9 Jan 2024 03:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40938Rm4082380; Tue, 9 Jan 2024 03:08:27 GMT (envelope-from git) Date: Tue, 9 Jan 2024 03:08:27 GMT Message-Id: <202401090308.40938Rm4082380@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: cef5e56f3fea - main - bhyveload: add CAP_SEEK to our dirfd rights List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cef5e56f3fea33d6c421276af49f2967453ad4ff Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cef5e56f3fea33d6c421276af49f2967453ad4ff commit cef5e56f3fea33d6c421276af49f2967453ad4ff Author: Kyle Evans AuthorDate: 2024-01-09 03:08:16 +0000 Commit: Kyle Evans CommitDate: 2024-01-09 03:08:16 +0000 bhyveload: add CAP_SEEK to our dirfd rights In the case of hostbase_fd, this is infact a bug fix; we have a seek callback that the host: filesystem may use in loader, and we really don't have a good excuse to break it. bootfd-derived fds will only be used with fdlopen(3) and rtld doesn't seem to need pread / lseek at all for it today, but there's no reason to break if it finds a good reason to later. Suggested by: markj --- usr.sbin/bhyveload/bhyveload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c index 4d89393424f4..5250e2120938 100644 --- a/usr.sbin/bhyveload/bhyveload.c +++ b/usr.sbin/bhyveload/bhyveload.c @@ -755,7 +755,7 @@ hostbase_open(const char *base) err(EX_OSERR, "open"); if (caph_rights_limit(hostbase_fd, cap_rights_init(&rights, CAP_FSTATAT, - CAP_LOOKUP, CAP_READ)) < 0) + CAP_LOOKUP, CAP_PREAD)) < 0) err(EX_OSERR, "caph_rights_limit"); } @@ -887,7 +887,7 @@ main(int argc, char** argv) * to the more usual lookup rights. */ if (caph_rights_limit(bootfd, cap_rights_init(&rights, - CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_READ)) < 0) + CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_PREAD)) < 0) err(1, "caph_rights_limit"); } From nobody Tue Jan 9 04:22: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 4T8HpW3TQCz563lH; Tue, 9 Jan 2024 04:22: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 4T8HpW0S09z4lcn; Tue, 9 Jan 2024 04:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704774163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wU2aXlIUnITOmDVvHe/b8tN40+Aw9cSKP6Ik6/afJgw=; b=GhhNo6Te/qGd96wt17IP0NhPYmABuIugcF5NFfuOBY3upKw5z+y7UxC/b4blNebLIi87SM NXaDrgP1tysQEF3P3sWfhDRduP7C6GC89wLJnuRrRSIh41O3JeyRHqW/Q10KEs9h+4TU4O vJJlZWfgtY+tKzmBrrnOTScGepnQdli0eseXhc84LyG03olsPGzrstHf8ki2lwJln4LDfg YenLC9x+kA3/5G9uLoKeuRaCj1DPmf0DF95TBhZsbBX/CzE84TXT4Mk7M9ZGJ8AuSR9+9A sedl3xqVut/IGIajlNlIFiOyETfI/xCJe9xDaLQ7E8TobTLlcN0wWNMv8bRTbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704774163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wU2aXlIUnITOmDVvHe/b8tN40+Aw9cSKP6Ik6/afJgw=; b=EIrmP+8KJyEpbhdyYJ5VLWPmwEmT4UiOpafdue/6sMOrc07gks3mTGUa1UuVNNcneSaVc7 ac6v8cqYEvGiuOQk4hSXziXWcUACUyKq+q6eVnuY1JsoVi7rXWH7rQkF/FT/0p/97roUXv /gNkvvc5Hm71jMaK5LNgayRIGMIS3GkzklghepgvfPIr0uRSvqTvPvi+dnkTOW/nfHH6Z6 BZKIPMusDOZwCYzF5rdI3S6+m7Uqh74fNVo+RaKzkCv/9eyp5gA2OLLQWD8Bhrn2BoVmeu 1/exavkD7vdm9XkLaqkA/xRAieil8vpfV6eovhoPEKwBCcgtpFxoETSKGAgYyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704774163; a=rsa-sha256; cv=none; b=ZyJ5d/+/KztBZGPY36KK9QabdCP0WULvqdA/kifeMbbqY8wbYWw27mCp7ALkYfHhW6pO9K HRpfiKGaEZmgv4/TJHMWfFUyxG8T+e6fRlyEezazYIKE8h3I84WhBcmMiefExWuCaUVmeN OippB6v5AileWPGwdz2BZAdt7iBt8KX4EY0MfL60TVsWu0P/9Rod36jVdmYOEJF0fUZYLn abcwCKYACnHEbuvfXk7uYlrGFwBvENtnEZXfglrX9pD+gsDFSfrq2ll50wRFKqW69dIltC mEfn8ktnGAzpCFrfNlml/16IZw3NHRfXsXDtgherCFH1V1Gz6G+7daEI3QRlEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8HpV6dwRzcHc; Tue, 9 Jan 2024 04:22:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4094MgEW015281; Tue, 9 Jan 2024 04:22:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4094Mgd3015279; Tue, 9 Jan 2024 04:22:42 GMT (envelope-from git) Date: Tue, 9 Jan 2024 04:22:42 GMT Message-Id: <202401090422.4094Mgd3015279@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: 5d1ecf0b6184 - main - build: only inspect the first word of toolchain tools List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d1ecf0b6184748a51bca01b497c808c3e13aa67 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5d1ecf0b6184748a51bca01b497c808c3e13aa67 commit 5d1ecf0b6184748a51bca01b497c808c3e13aa67 Author: Kyle Evans AuthorDate: 2024-01-09 04:21:36 +0000 Commit: Kyle Evans CommitDate: 2024-01-09 04:22:25 +0000 build: only inspect the first word of toolchain tools CC/CXX/CPP/LD may all have arguments supplied in various circumstances, which break the logic here. We only need to determine which of these tools we're expecting to invoke from PATH, which just requires examination of the first word. Limit our scope to exactly that. Patch suggested by: jrtc27 Reviewed by: imp, jrtc27 Differential Revision: https://reviews.freebsd.org/D43372 --- tools/build/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index 187d5593564d..e60c8694d56d 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -370,9 +370,9 @@ _WRAP_HOST_TOOL= ${_LINK_HOST_TOOL} .endif .for var in CC CXX CPP LD .for X in $${_empty_var_} X -.if !empty(${X}${var}) && !${${X}${var}:M/*} && \ - !${_toolchain_tools_to_symlink:U:M${${X}${var}}} -_toolchain_tools_to_symlink+= ${${X}${var}} +.if !empty(${X}${var}) && !${${X}${var}:[1]:M/*} && \ + !${_toolchain_tools_to_symlink:U:M${${X}${var}:[1]}} +_toolchain_tools_to_symlink+= ${${X}${var}:[1]} .endif .endfor .endfor From nobody Tue Jan 9 10:19: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 4T8Rkl1tH7z571dR; Tue, 9 Jan 2024 10:19:59 +0000 (UTC) (envelope-from olce@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 4T8Rkl0Bjrz4V4l; Tue, 9 Jan 2024 10:19:59 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704795599; 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=z3YdflRZyBSeEL44OapQ6KDY+nqS8MTIvxlJ++jaaM4=; b=YtmYIDqeQM+9EjgPgNB+3cPfy0tPR/YMr0onQC1UNC5ZKWRIK/k9YpSKxfRw0t/+P+MS0o pE3xXGW6/mHzrh+BlJSSszktUR77ory4hcKQt74egVB5hmW0bKBNjYhDCyfa/tiDjJ2wpf M//YLtUwy9tfOSVxWFuCCh29XppTpDSy1KNO/XtpkvHgbmO/AyUO8GfXT0QNBXqlkSrNvq hRwYXFdjUe1czGHWz6YaJBFgM/tVxeuCQxSJBWW31YgZJ41vdUUzr+txSxQOSbY4nd63Ep BPYxhQnN2+R1SPxMaGs+GNp0cRLKPzbR2CPESNpJjNYbQsbu+B6pHTTjkMTu/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704795599; 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=z3YdflRZyBSeEL44OapQ6KDY+nqS8MTIvxlJ++jaaM4=; b=AqQDxxML7bnyBQGiO0HsKVPGS/d9uYbMHYrUXJO56rNgpXT+GJ7tv7V9wm1jHwM1T+9MH3 B2xqEdia9xhl3B2PsZVUWFIcc5OGCcT5I6xiKQGuedoq5h4KawDjH6UDmxz5Qzj5+h8qLi bhrfkz2Cwa+aIiJrNb3P3QgSukzdIWqVTME158HhmN9abbVjTjd9wvKbKxptM/Ybv0EDgO Nvk2u7RTlhOdrQp6XxaAzTcVDVlsJwggvZLRd/5k4uBEjLLwFzR6e0R9ZbolAb0jeuWTwz amNljoRoV/eEUOF+EYQZ1Yz7OKtxBFtzdoOKcLk1MWHZkgkcTos0l9x+z3K8Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704795599; a=rsa-sha256; cv=none; b=ga4dDMWQ4805mi2UIGlbib80kHGNpYNsnroy5jtb2Qk11FWg8qfK+Qiv6gwE37nRmBqu1a qK2GwQWuF3nMm5PRivJpJDEWSt7Qv1OGurFo6Cio0pEV8g4BDNJjNqC6fsu43m6sytcOTx 3v0KEBkGsdLd6X5x3iBKVwf05X0/PieMks/vU9uv7JcYN1hTSEQuChnaAX7kJarCzyr9ji IFKDVOup8bUINY6bs/alGDJZORq9ZIxqj/uuKmvCfL92BFO0iUOt0NdGBq7TSL8XDghwAB eWCvm0pJ3vHYQBN+8N7YtE/RCVxQjSLkDOo7jchMC3CKcB0zt5F6lage5SR7xQ== Received: from ravel.localnet (lfbn-nic-1-525-172.w90-118.abo.wanadoo.fr [90.118.140.172]) (using TLSv1.3 with cipher TLS_AES_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: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4T8Rkk1qXmzJw2; Tue, 9 Jan 2024 10:19:58 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Xin LI , Mike Karels Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). Date: Tue, 09 Jan 2024 11:19:48 +0100 Message-ID: <2683023.poxlI1A5LX@ravel> In-Reply-To: <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6134885.r39cKavRk3"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart6134885.r39cKavRk3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner To: Xin LI , Mike Karels Date: Tue, 09 Jan 2024 11:19:48 +0100 Message-ID: <2683023.poxlI1A5LX@ravel> In-Reply-To: <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> MIME-Version: 1.0 Hi, Sorry not to have gotten to that earlier. I had initially expressed on IRC that I found the newsyslog changes great, = but now reading Mike's arguments and proposals I have serious doubts on the= current approach. > Sorry not to have noticed this in the review; it was only when I saw this > message that it sunk in that we now have *three* ways to specify compress= ion, > and I'm not even sure what the precedence is. I would have thought that > would replace -c. It's a mess if the config file has entries > that specify J and X flags as well as none, the config file has > zstd, and the -c option is given as well. We now have a knob > to override the knob to override a knob. The only reason to keep -c that > I can think of is to specify a different compression in a single invocati= on, > but as noted, changing compression requires manual operations that make > it unreasonable to change it invocation by invocation. I agree. Two possibilies that I can think of from here: Remove '-c' or mak= e it enable compression regardless of the log files' individual settings. =20 > I still think it would be much better to add an option letter to select > the default compression as specified by . This would eliminate > the need for "legacy", and it would add the ability to have both a global > default and an exception. I think the redefinition of the existing flags > to have different meanings if is given is messy. I didn't think about that at first. I agree. If people want to be able to override compression settings globally, which = I find useful, one could introduce another directive such as taking a boolean to request to apply the option regardless= of the individual compression letters. Another possibility is just to rename "" to ""= (so, this time, not a boolean) and keep its current behavior. This would = match one of the suggestions above about '-c', but then there's the questio= n of which one takes precedence, and I think that the command-line specific= ation should prevail (for practical purposes and POLA). =20 > The entry for -c says that we plan to change the default to "none" in 15.= 0. > Hopefully that would be done via and not -c. However, there > was significant pushback on "none" being the default. I think the default should be "no ", i.e., no directive.= This may plea for having "none" mean "don't change anything" (as if the d= irective wasn't there) and have something else to deactivate compression, s= uch as "no_compression" (which is really an override). If "none" is confus= ing, then just forego it completely, and have 'newsyslog' plain fail on it = (but keep "no_compression" as just described). If there is consensus, I'd then change the 'J' flag currently used for all = log files to the new chosen flag for generic compression, and have set to "bzip2" in a first step (for POLA). Then, it could be c= hanged to something else, e.g., 'zstd'. Setting it to 'none' seems to me the worst solution (but far from being the= end of the world). More deeply, I remember having seen at least two claims that using filesyst= em's compression is better, without arguments. I don't agree with that in = practice. The only advantage of in-filesystem compression, besides the adm= inistrative simplification that you can also get with the override above, i= s to get O(1) random access to big log files, and I don't see any compellin= g and common use case for it. You certainly want to get to the end of the = current log quickly, but that one precisely is not handled by 'newsyslog' a= nd stays uncompressed (at the application level). When you want to search = for strings or patterns, you have to grep the whole file anyway. You may w= ant to immediately reach the end of some historical log file, e.g., when ma= nually going back in time from the current log, but this should have neglig= ible latency, and if it doesn't, than just use more and smaller log archive= s. Same thing if you have a more sophisticated setup with an index of log = text: Jumping to a particular location in the log file should have negligib= le latency, else apply the same recipe. If your setup with index requires = a single, never rotated, log file, then you're not even using 'newsyslog' i= n the first place (or should not). Although I agree that in this case usin= g a compressed filesystem (or a randomly accessible archive) can make sense= (if your index doesn't already cover the results expected from your search= es), I very much doubt this is a common setup. Moreover, using in-filesystem compression can lead to degrading the compres= sion ratio, since the compression method on ZFS is chosen per dataset, whic= h includes a bunch of other files and use cases preventing the administrato= r from choosing the best, and slowest, compression methods. To avoid this = problem, one can use a separate dataset for /var/log (anyone?), but changin= g this on already running systems is a greater burden than just changing th= e compression settings in the 'newsyslog' configuration files. I'd like people who disagree with this to present arguments for their case,= if for nothing else to share their experience and best practices on log ma= nagement. Thanks and regards. =2D-=20 Olivier Certner --nextPart6134885.r39cKavRk3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmWdHcQACgkQjKEwQJce JifhlA//ehOBZnBNEhdAuixFk+drmEXD5UMclOJZV84mpsZRH/McOZ6dKs1Maq9M 91gvyQI3waZADOWkPkE1iyTywm1GgpvUq7JuQ1QzITOLPl3shQCgn6sxUOCNG4ly wKh/L6w5bvAqaFN8zj/RBpSeXfPADFowZ7tUNPZQlr4sGpMO34fp0KEL29rQQVxI wyPTEepfYDDewhxtOOPwJXs3uwMfS3UHAHlnZv0FjYH/oEPXF2plc5X1mDuw1SGg nFE2kRrfA1kZf8yu4XspLRZ/ADaCHko0xw3DE11gxMElQ/9QKZ3vk1yOwtim8UVN h4maCUVo6QHylbIR8nhDu+VdSBZb2wavoVFom7zfBd5xWgzzzBKRVc48JSMMqXMb aRi8Jk4fDQqZ0heH5abtE8R1sFKxDojYHj57hKJXZvcrs7jEqwdL8N1UT4MHGbyA b9E0iroTdcDD7EGvm7wd3z24bPb9pj5mJ1XOa5CYvPqSlNMpAfxTlu/041is3xSh 82+mT2UckYtVlp71xzDFipFZ5sLdwZD8/JkD6yojzN7CphhsBBf+dbVzDi2KqZzP SR/7xr6+J4cqZlRXIPFL59aNLcwIBBg0hcjBc6T4yiG/qf85fvMbxveQI7tHz18g Gpq4izGlh/UFmXz91BoAn1FV7D/zzELTfrUbynLBsNM69MSz7/w= =PJpJ -----END PGP SIGNATURE----- --nextPart6134885.r39cKavRk3-- From nobody Tue Jan 9 10:31:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8S0Q1Rb4z573RB; Tue, 9 Jan 2024 10:31: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 4T8S0Q10KSz4XVH; Tue, 9 Jan 2024 10:31:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704796310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7FAwSBkj60VMMKIHbRI2S3WUr6Bt138eDrkMLWmol8=; b=ktyIO7qL9NPAK+mRPvUmmeDrPfEuRJQCQvMIJ3QDDLr0YaeITLE8Rjc4Yn8GFLKkYKd4uh tnYf5QhmknP4rQw8Z4R2vrBOZw8IhjHXWL9o0M+ZX1lf84FSzRAYNTABleghq7OvWB4Q/e UWerlnqOftW4hFpVKLLltjsOH0P+pX2dwPzvcHT4IIbT8bdiE9nxnX0td9wnxcNIkTeWnA af3AlicgiDIFiCDSxtcE+j5LVscasoBMLW0e17BDhJm3Wh3jxOkaifZ0kqlTCGT3rwkqWx rbq8ON+TlloGP1Vfpvj/KODGizYjeP/QC46CGCQ0WBf/gGzfpdg9evmKAcQHbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704796310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7FAwSBkj60VMMKIHbRI2S3WUr6Bt138eDrkMLWmol8=; b=V8NaFQJqgLuN5oONUBQI64bi+nkjpSZAGIWYmeHqn+A7KLxA83yFj22094k1/Py6dqo5bi XC2QOGs8XwpfahJwxxmp0DOBbcxSItD41lTRg0uSl2sy5LXcJdhtBwvhGuGnkqVMBOsI82 3Kjo0JxKbd9r6Fa/15er3LRHHKYV1qP/tLstK2YYUiVIHfGMaAHUhdeL1UVtItUnFdt6sJ ijTnN7F0etR6anU5dTs4soEj4evcV1YLTIwZFGVu7SMYwr/vrVPNR80xfUXCvGwOkOm+tx hoZzebHdb/fg3ifMcv+tKU23tQhQXSbNWFrOOUduDX/1VW0XL7DzJh0bH14kIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704796310; a=rsa-sha256; cv=none; b=OPR1/3V5C2MSHFG2DXloQ0sh46G1d1TFjxdbM54YXQ8xp11cgaHsdpfPSnX4PLA1mcPtkN lcDVwPyzKjWyps3VDXyfU5ZOmnb1sIqRqSZKBKq6NjxTZ8OYhtmeA4ViXB3n17xvmXMrOk vI5gyhbbNFt3SRZ2JGC3M0VYPHbOM5QfOD1OmOkFmgBeWqzkE3tPLp+dFycFtJNE1XQnOv j2xaCAYRGKfc5rOj+21QwbP6nrk8RwS7VQWR1DL3GfBJeDLmGZc8ZrijPfBOsQrXMpTlpS aimacZuJ+ofTe85QkqTMpgeM4jAlvT9UlL2YvSTPL5c1gWZ61J5/OuR1pnmaWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8S0Q05PJznK5; Tue, 9 Jan 2024 10:31: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 409AVnwc036130; Tue, 9 Jan 2024 10:31:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409AVn10036127; Tue, 9 Jan 2024 10:31:49 GMT (envelope-from git) Date: Tue, 9 Jan 2024 10:31:49 GMT Message-Id: <202401091031.409AVn10036127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: f1bc2f67a3e0 - main - stress2: Reduce idle time. Remove debug output List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1bc2f67a3e0dd5120c3345c11bd3205b4348b8a Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=f1bc2f67a3e0dd5120c3345c11bd3205b4348b8a commit f1bc2f67a3e0dd5120c3345c11bd3205b4348b8a Author: Peter Holm AuthorDate: 2024-01-09 10:28:26 +0000 Commit: Peter Holm CommitDate: 2024-01-09 10:28:26 +0000 stress2: Reduce idle time. Remove debug output --- tools/test/stress2/misc/mmap10.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/test/stress2/misc/mmap10.sh b/tools/test/stress2/misc/mmap10.sh index a29768c36691..0bb7845f4d15 100755 --- a/tools/test/stress2/misc/mmap10.sh +++ b/tools/test/stress2/misc/mmap10.sh @@ -40,18 +40,22 @@ sed '1,/^EOF/d' < $here/$0 > mmap10.c mycc -o mmap10 -Wall -Wextra -O2 -g mmap10.c -lpthread || exit 1 rm -f mmap10.c -daemon sh -c "(cd $here/../testcases/swap; ./swap -t 2m -i 20 -k)" +daemon sh -c "(cd $here/../testcases/swap; ./swap -t 2m -i 20 -k > /dev/null)" +ulimit -c 0 sleep `jot -r 1 0 9` for i in `jot 2`; do - /tmp/mmap10 & + su $testuser -c /tmp/mmap10 & done -sleep 300 +start=`date +%s` while pgrep -q mmap10; do - pkill -9 mmap10 + [ $((`date +%s` - start)) -ge 300 ] && break + sleep 2 +done +while pgrep -q 'mmap10|swap'; do + pkill -9 mmap10 swap sleep 2 done wait -killall -q swap rm -f /tmp/mmap10 /tmp/mmap10.core exit 0 @@ -76,6 +80,7 @@ EOF #define N (128 * 1024 / (int)sizeof(u_int32_t)) #define PARALLEL 50 +static int debug = 0; /* set to "1" for debug output */ void *p; u_int32_t r[N]; @@ -169,7 +174,7 @@ tmlock(void *arg __unused) if (munlock(makeptr(), len) == 0) n++; } - if (n < 10) + if (debug == 1 && n < 10) fprintf(stderr, "Note: tmlock() only succeeded %d times.\n", n); @@ -193,7 +198,7 @@ tmprotect(void *arg __unused) n++; usleep(1000); } - if (n < 10) + if (debug == 1 && n < 10) fprintf(stderr, "Note: tmprotect() only succeeded %d times.\n", n); @@ -215,7 +220,7 @@ tmlockall(void *arg __unused) munlockall(); usleep(1000); } - if (n < 10) + if (debug == 1 && n < 10) fprintf(stderr, "Note: tmlockall() only succeeded %d times.\n", n); From nobody Tue Jan 9 10:31: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 4T8S0R4ThKz573kB; Tue, 9 Jan 2024 10:31: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 4T8S0R1ccCz4XVJ; Tue, 9 Jan 2024 10:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704796311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mb0ZGZV/xAkcLrFc/emoook+fBnjOBeGsIfEmbZsYNg=; b=An38guzulnHMMKqUsYLFCQTSKz3FTWCQXDEnU5XFILgewDOGLYSjexneAuF3NdKXZBKdiZ D7d7wttwdbTgbM5C8QRoUU+fvbTIOrcszCkaf0ANfyf1CKh07x93lsy08kZ2lUVb1H6GAq WXuL21e4C/2SpAFa/A9zKkxJXc7rPCNxEr6fMPt5doWwMRy3ZuTbe5pOiZM59X9hZySTHo NetLu613eJLQEI43dGsc7E+rFA/Y8eWUrJN1d/jFPIXjgi0f9J7tultvVHiVa1/T4Y0pBL OFjBgp7LN+FRfjDuzfAyAwW+0vOA860Vl6IN0BN2kiLCSzwBna8K3TFZwyUegw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704796311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mb0ZGZV/xAkcLrFc/emoook+fBnjOBeGsIfEmbZsYNg=; b=GLEffbP4gwQy6YmJP05WQ0/TlDR3cB7h75xD+Q51mx9dcGDtc0jDH39fpxHFEM2dxme6uW FiPE4WGXUyYV7XMQXs8qd5vDbP7+43xtkr+tx9yjcOF//hPYJb0Xx//n6crJ51jwBgxUMc 34pKwdcbtiys1umhcHoCmCLFZioZQLWYdr/6cJGwRmsiUuwL+E75u6UWu60f9M0BBdYR/q bH4F38FMexIOiFeVk27D+0c0LW2G1/eW0/ouCl1MwSHVqZFa6YssjOM5bmAcRXjNcmLNVb yVfwf+SdhljxO0/w4dGUKayyK6Jldouz99qOvmEd6wY7WXjM212C3b1ivZa7QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704796311; a=rsa-sha256; cv=none; b=C2tdM0XVv067em7kf0Q8MKWdA3Dg8ABAmgSNje+Nn1dpDtxT9yhg0DQQfFUwfsaY2ROJjv aAmD0fUN8qyHhWfAh/81eeVyjsWIOQiJ7QwvrwEtyoksWc7QhfkkB054Z4JRLMW7XdQnPt c+aUPfCCr0eU3cgyNiu2gUPXFdO5aKP1JxcjK4AJWtjF85JtQT3ZqAe2EhJYmTNlK04CO2 GNCD/9fg8mzK3IybqXKbE/QWiZ6mAua4d212JQz8EKLLzG3cRZYYnl7Vgijj5ToFRvPVGi OLffx10hb3UwPxcCKjP6NE7QYzg8++jKU9Ob+X/Qma+eXif1bRDit+bD05+vRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8S0R0j8Tzmg9; Tue, 9 Jan 2024 10:31: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 409AVpIN036172; Tue, 9 Jan 2024 10:31:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409AVpbu036169; Tue, 9 Jan 2024 10:31:51 GMT (envelope-from git) Date: Tue, 9 Jan 2024 10:31:51 GMT Message-Id: <202401091031.409AVpbu036169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: bd9ddbc9cd25 - main - stress2: Remove useless test scenario List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd9ddbc9cd2543a417b22ca3f7705ed4e4eb59ca Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=bd9ddbc9cd2543a417b22ca3f7705ed4e4eb59ca commit bd9ddbc9cd2543a417b22ca3f7705ed4e4eb59ca Author: Peter Holm AuthorDate: 2024-01-09 10:31:05 +0000 Commit: Peter Holm CommitDate: 2024-01-09 10:31:05 +0000 stress2: Remove useless test scenario --- tools/test/stress2/misc/vmstat2.sh | 41 -------------------------------------- 1 file changed, 41 deletions(-) diff --git a/tools/test/stress2/misc/vmstat2.sh b/tools/test/stress2/misc/vmstat2.sh deleted file mode 100755 index f258b43719bb..000000000000 --- a/tools/test/stress2/misc/vmstat2.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# -# SPDX-License-Identifier: BSD-2-Clause -# -# Copyright (c) 2019 Dell EMC Isilon -# -# 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. -# - -# "0xFFFFFFFFFFFFFFFF in vmstat output" seen. - -(cd ../testcases/swap; ./swap -t 2m -i 20 -h -l 100 &) -sleep .5 -s=0 -while pgrep -q swap; do - vmstat -z | awk '{if (length($4) > 11) { print $0; exit 1}}' || - { pkill swap; s=1; } - sleep 2 -done -wait -exit $s From nobody Tue Jan 9 11:15:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8SzB2S4jz578jy; Tue, 9 Jan 2024 11:15: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 4T8SzB1bKVz4gmm; Tue, 9 Jan 2024 11:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704798950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m7SZqTYF1QVxS5z5pmt4ZtU9gPI4VcNjMgxvzlwBaho=; b=EiRpb4UytJJQBnMaHmkfBoCkBRnkvmFylBJrM7GoNSXUHJvmoPVSOF87bU0iX7FW1ie3g+ mI48Y0nK3QDkJDrivtdjmYELYo02lxiKGbJzmIFEw12LJTDiVeLqgEP0rgcZOyH3fdjJu7 VYrE1wIFAte5Q2lz84ypJMagpnWMxsFn9smAgt8byWA6fQ32C0bxcD6ySgTX0jBclzUbg6 n0w1oJvyLfRzPF19mYBLKoNuLblzVpVVTa37k73Bq8ksBToYljc30nABoMSxE8CztCUdyd X0UeKHID4/PxqecCI3K3y/AciYaciadSiFHMkGb6EdAMtH/ogxgWrhRx9Cd0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704798950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m7SZqTYF1QVxS5z5pmt4ZtU9gPI4VcNjMgxvzlwBaho=; b=xeDpWQeMUm3Vkt5p4Y8spAHQFFD22bIkurf3XcwVdMl15gYsPqOD1G4BkoG9+ZxWZDv0PK 4p+tt4V2Q091s++AEAzPVYwBNjgeB9TYoVqeobPX8bxutmWXLjx8kqTn7G7/8XNA+VbjvZ ODRJqWNmw1QG8NEwASnTxWt/1fiWEQOK8LKnQ20gbNJRhKoXhuTlaz1KfpNybvV7j5vTnK 5q3Y0wRCoufXIpxL+JNdfsUyNDjjTeanQjWGPobA7vzvV9ywiFOr3O3t0BoBZtAfSQ9mRn 8zn3YlvJ5ph1Al/Lejx2hEVdBMq4e09x1Y2/s2VKBaoVzOKcEbtljBYc4EmxwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704798950; a=rsa-sha256; cv=none; b=MZCFk8tO4UICUMdsg+FKTJhIaQv2R4z6di+GUv/yRzthhuIQIHzLIGDP2q1oOb0t34708N 51KiNX7mNhlb014QRhXTSPjQY0BiFmYBT/5ATt29cRh5boxbHLn3gIgBoRA1LVwzU592D2 yMpOEKVQ4fWGZfh0XemasdCE2N5maQLYR7mPn5Sw6IJCy+mAYDPLLvHvAezjMp0t0G69GD aSKxMJeQP2x38WRzEqb1iPOeVV++bp1EHVG47FemhLvFDSih9zhyql3+nWEzFW9EYBMO9m WaX4dx0skomtSM+aC1ntRPvQ9dGsI+XlHv3FFXxPfBXDCf+8YQvBXAIVIL56RA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8SzB0f7ZzpbT; Tue, 9 Jan 2024 11:15: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 409BFnGa006990; Tue, 9 Jan 2024 11:15:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409BFnUC006987; Tue, 9 Jan 2024 11:15:49 GMT (envelope-from git) Date: Tue, 9 Jan 2024 11:15:49 GMT Message-Id: <202401091115.409BFnUC006987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: c925f0720f58 - main - nfsv4(4): Belatedly bump .Dd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c925f0720f58bf6021aeeb4dd1fafbc7421b209c Auto-Submitted: auto-generated The branch main has been updated by debdrup: URL: https://cgit.FreeBSD.org/src/commit/?id=c925f0720f58bf6021aeeb4dd1fafbc7421b209c commit c925f0720f58bf6021aeeb4dd1fafbc7421b209c Author: Daniel Ebdrup Jensen AuthorDate: 2024-01-08 13:36:19 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2024-01-09 11:14:56 +0000 nfsv4(4): Belatedly bump .Dd I forgot to do it when making the commit, so hat-tip to asomers@ Reported by: asomers@ Fixes: fbbdfa2b8a42 (nfsv4(4): mention the nfsv4_server_only..) MFC with: fbbdfa2b8a42 --- usr.sbin/nfsd/nfsv4.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/nfsd/nfsv4.4 b/usr.sbin/nfsd/nfsv4.4 index aacb85c78ca2..13f4ec942eba 100644 --- a/usr.sbin/nfsd/nfsv4.4 +++ b/usr.sbin/nfsd/nfsv4.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 20, 2019 +.Dd January 8, 2024 .Dt NFSV4 4 .Os .Sh NAME From nobody Tue Jan 9 11:15: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 4T8SzC3FBgz5790M; Tue, 9 Jan 2024 11:15: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 4T8SzC2YKlz4gk6; Tue, 9 Jan 2024 11:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704798951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YmGMlkz0THnCtQ45efthSsaT8nYpBt0HeHkFeHmYInA=; b=t9ntiZU/Le5VifDMT0DdEjpO9cZ6zuBVgck8qHNGYgxNWXUIgerVqQ4ElS6fr89peS4Z/8 5wVu8HREi7G45OlKlVbfCoTDYaDLnxnjAbPfSb85GQnHuYTdPf11wmuzdPkMu5vWsNHyab ljZdGDuHkbse9RtoI8c8DIGW/ZtQUebbKEYtWL3NeELwPyZ+sDEcQHeOzckXrjBvQnOJxD N7i1Hbe2brimoTnU1X+6rxPY7R3Ve1m21DKhfbsd92DFQiJnavxa9V+pUGI6rmgLDgFqIL AVO+CrQMYtVaHHsfxIT2ADKK6ug3WvaQpAkW/pIkVleatfoMLCMx4lAGrcq9vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704798951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YmGMlkz0THnCtQ45efthSsaT8nYpBt0HeHkFeHmYInA=; b=etw/xEi3yR1KXk2bXIGau2ezuJXdedzvMKuuxGb2zMO3eE0KwbzTW2ertxUw7mvQJxm/BE NCdKd2QsCA+A4z+KfSXp9dYAojnublkFQ0ZQ4KGH5pcD+5DMW+OOaGCRbfFSYUEfLWf+8t xWye/UGdXdkrLjiHD1p9CLlEwzuQ/84Uyycgcge0mQ4+qsuAinBFgEZFvBjpmIA6WCs32q tpG7/qtDtc49I8lsQRbpOpR0Fvv2TZUPg3lsZN4oFOmIwIGjywzGBQmmsUpe6bv+yz5GO6 8xB8BbMZ/JOX2l2Iv0ztC4vUxgWCeD38cFqaBOqlmgensgHWPnRyHxQkfw8iQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704798951; a=rsa-sha256; cv=none; b=H1I7cKYNDbbbNdll6h+ul6qnlk4R9ug9YBpF1Uc3ZEZmZNcfUEcSAlnOw8x1IoT3iiTmGH cT7ZtngOG5ri0BtPHTWnlXUt97XAsZk8xTKo8HOqKKG+jdytLMypkwW4fzIdyTKPnYlAQp ioyuBQnvoK+BY4doDI9et+1aSg6mWkxBsEM92TEUaZfy2qI50YuXyAjz7fEbYDWNKspT3P q0S7BwEk45/X7yP/wIDBJlaPw23a0Q5v0tBLaz7uy/tvEnAXfYXPH/doGL0A1DCpwINeZ4 9numyv1DRtcYLVLpCy74/cIRNa7CqhYidFXbdUIhqHqkpnfJAgcGtUEHlVgnqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8SzC1fDBzpZL; Tue, 9 Jan 2024 11:15: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 409BFpuk007044; Tue, 9 Jan 2024 11:15:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409BFp7G007041; Tue, 9 Jan 2024 11:15:51 GMT (envelope-from git) Date: Tue, 9 Jan 2024 11:15:51 GMT Message-Id: <202401091115.409BFp7G007041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: 45486372ca8d - main - nfsv4(4): Reflow lines to 80 character limit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45486372ca8da6385bee3eaed2f0279c94db0476 Auto-Submitted: auto-generated The branch main has been updated by debdrup: URL: https://cgit.FreeBSD.org/src/commit/?id=45486372ca8da6385bee3eaed2f0279c94db0476 commit 45486372ca8da6385bee3eaed2f0279c94db0476 Author: Daniel Ebdrup Jensen AuthorDate: 2024-01-08 13:50:10 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2024-01-09 11:14:57 +0000 nfsv4(4): Reflow lines to 80 character limit In belatedly fixing a mistake made in fbbdfa2b8a42, I noticed that igor and mandoc -Tlint had a few more things to say. As such, I'm reflowing a few lines and fixing a contraction. MFC with: fbbdfa2b8a42 --- usr.sbin/nfsd/nfsv4.4 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/nfsd/nfsv4.4 b/usr.sbin/nfsd/nfsv4.4 index 13f4ec942eba..e96e507e23ad 100644 --- a/usr.sbin/nfsd/nfsv4.4 +++ b/usr.sbin/nfsd/nfsv4.4 @@ -154,8 +154,8 @@ either client or server, this daemon must be running. The form where the numbers are in the strings can only be used for AUTH_SYS. To configure your systems this way, the .Xr nfsuserd 8 -daemon does not need to be running on the server, but the following sysctls need to be -set to 1 on the server. +daemon does not need to be running on the server, but the following sysctls +need to be set to 1 on the server. .sp .Bd -literal -offset indent -compact vfs.nfs.enable_uidtostring @@ -177,8 +177,8 @@ report a lot of ``nobody'' and ``nogroup'' ownerships. .Pp Although uid/gid numbers are no longer used in the .Nm -protocol except optionally in the above strings, they will still be in the RPC authentication fields when -using AUTH_SYS (sec=sys), which is the default. +protocol except optionally in the above strings, they will still be in the RPC +authentication fields when using AUTH_SYS (sec=sys), which is the default. As such, in this case both the user/group name and number spaces must be consistent between the client and server. .Pp @@ -306,7 +306,8 @@ are set in Without a functioning callback path, a server will never issue Delegations to a client. .sp -For NFSv4.0, by default, the callback address will be set to the IP address acquired via +For NFSv4.0, by default, the callback address will be set to the IP address +acquired via .Fn rtalloc in the kernel and port# 7745. To override the default port#, a command line option for @@ -324,9 +325,9 @@ N.N.N.N.N.N where the first 4 Ns are the host IP address and the last two are the port# in network byte order (all decimal #s in the range 0-255). .Pp -For NFSv4.1 and NFSv4.2, the callback path (called a backchannel) uses the same TCP connection as the mount, -so none of the above applies and should work through gateways without -any issues. +For NFSv4.1 and NFSv4.2, the callback path (called a backchannel) uses the +same TCP connection as the mount, so none of the above applies and should +work through gateways without any issues. .Pp To build a kernel with the client that supports .Nm @@ -354,7 +355,7 @@ It occurs when an nfsd thread tries to do an NFSv4 .Fn VOP_RECLAIM / Close RPC as part of acquiring a new vnode. If all other nfsd threads are blocked waiting for lock(s) held by this nfsd -thread, then there isn't an nfsd thread to service the Close RPC. +thread, then there is no nfsd thread to service the Close RPC. .Sh FILES .Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart From nobody Tue Jan 9 13:30: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 4T8WyL5MBXz57TVY; Tue, 9 Jan 2024 13:30: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 4T8WyL4YRSz51QJ; Tue, 9 Jan 2024 13:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704807018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0R0qFnwZTV5G2Ule9d+O9l8XPiioarJmHliKDA1xl+0=; b=bUJHQb4eJRmwung5l2Vi/5g6EGLLlX0BqzFdi5ulRYADyFjaZy9SbvQJBIF2w3BYxP/fjH 2DF+aMAUTB9MqSfDV5Q5+Kq8mLUC7oo9cjdTEpZxGKFQraiv71vHeVYWFi/rzzHC5cnZMb XMtFLeBqjWfrLdFFT9J/J6pxgg7sUoWrMxmpJ0q70GRpvoZnJrE1sBJOl2JRffsfnaPKhj e1EZXUM4rCFPcZMPtsbkve5up1KFOwBUfJACyf6lI03sumXCBqpni0bTPMnRt2u9sh8+/b CkGSz2tdkeVlfxpOB36ywUUSvkVbaoBkS2ePmjzkkU9lpzGxsJqTlZ1hhMp1Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704807018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0R0qFnwZTV5G2Ule9d+O9l8XPiioarJmHliKDA1xl+0=; b=VQGcK4DLwx9EE8ipgi3SIr+NINA8wNXiEGgNUFVkHJ13JgIP0nTkxa6jf3bndukonAN9Lx XG87FsexP6Ua1D26fnbQFbzdQKoB/TniwuqBn+wJ/tnmXkoEgp1PfQtjHpcd/TptA+lqCR igni5F+JenPPRHIvIpAkPbzVsmUus6VSO628z5Q85Js92TCXXlcFszeUowmtGaTer9eyEY kehEKO18jgC7RSAZPGdpEV2VieoTNLIS+D32fM96oaq1sCBlgea2r4uh6LOpM3B/9YBenZ 5vOmbD/lbkG8E6uDf5C0t/09IfpS18v2QsxTInDEReMa8/jbLKAyenNAgEs1bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704807018; a=rsa-sha256; cv=none; b=pbutu8ZoOLugInINkP0i8vZI+5VFvbhogo6/N+0Tes2Hv04y0Zv/SlMqLti6mw+/+WiNUV cKcPuWvtPv/ZwdpljXVv6pO3IeeDzlUFprvQuzxr6ZcaKx1BcDedW3Vb+4kZEsDrcVzB4Y /qfHK+5o80/Q4BxxSQ5v3Gkr+1NQnhp8FsLql+1RCM5dnn1lL92Y5QvNIZxmGintIRjJ8b 1ToOq7KiAk6BPQDU02mmNAJIpZVa4MhGkRasbQIxCPQRPuEJIWvvF4KpLGhIdWQba2yipn xKvt3oEzX55Jkircl1I2ihTz3hO7QAVNPYOLwuSbVtDfOLgr5uVCT/AyFf+/Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8WyL3dhCzsLl; Tue, 9 Jan 2024 13:30: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 409DUIZf035751; Tue, 9 Jan 2024 13:30:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409DUIbv035748; Tue, 9 Jan 2024 13:30:18 GMT (envelope-from git) Date: Tue, 9 Jan 2024 13:30:18 GMT Message-Id: <202401091330.409DUIbv035748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4d312aa05141 - main - libthr: thr_attr.c: More style and clarity fixes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d312aa051414ad77d3515f258230d01ad11d6dc Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4d312aa051414ad77d3515f258230d01ad11d6dc commit 4d312aa051414ad77d3515f258230d01ad11d6dc Author: Olivier Certner AuthorDate: 2024-01-04 15:10:40 +0000 Commit: Olivier Certner CommitDate: 2024-01-09 13:29:25 +0000 libthr: thr_attr.c: More style and clarity fixes The change of argument for sizeof() (from a type to an object) is to be consistent with the change done for the malloc() code just above in the preceding commit touching this file. Consider bit flags as integers and test whether they are set with an explicit comparison with 0. Use an explicit flag value (PTHREAD_SCOPE_SYSTEM) in place of a variable that has this value at point of substitution. All other changes are straightforward. Suggested by: kib Reviewed by: kib Approved by: emaste (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43327 --- lib/libthr/thread/thr_attr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index 0ccc31b22c13..bbb143da1a7d 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -117,8 +117,7 @@ _thr_attr_destroy(pthread_attr_t *attr) if (attr == NULL || *attr == NULL) return (EINVAL); - if ((*attr)->cpuset != NULL) - free((*attr)->cpuset); + free((*attr)->cpuset); free(*attr); *attr = NULL; return (0); @@ -151,7 +150,7 @@ _thr_attr_get_np(pthread_t pthread, pthread_attr_t *dstattr) return (error); attr = pthread->attr; - if (pthread->flags & THR_FLAGS_DETACHED) + if ((pthread->flags & THR_FLAGS_DETACHED) != 0) attr.flags |= PTHREAD_DETACHED; error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, TID(pthread), @@ -180,7 +179,7 @@ _thr_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) if (attr == NULL || *attr == NULL || detachstate == NULL) return (EINVAL); - if ((*attr)->flags & PTHREAD_DETACHED) + if (((*attr)->flags & PTHREAD_DETACHED) != 0) *detachstate = PTHREAD_CREATE_DETACHED; else *detachstate = PTHREAD_CREATE_JOINABLE; @@ -258,7 +257,7 @@ _thr_attr_getscope(const pthread_attr_t * __restrict attr, if (attr == NULL || *attr == NULL || contentionscope == NULL) return (EINVAL); - *contentionscope = (*attr)->flags & PTHREAD_SCOPE_SYSTEM ? + *contentionscope = ((*attr)->flags & PTHREAD_SCOPE_SYSTEM) != 0 ? PTHREAD_SCOPE_SYSTEM : PTHREAD_SCOPE_PROCESS; return (0); } @@ -321,7 +320,7 @@ _thr_attr_init(pthread_attr_t *attr) if ((pattr = malloc(sizeof(*pattr))) == NULL) return (ENOMEM); - memcpy(pattr, &_pthread_attr_default, sizeof(struct pthread_attr)); + memcpy(pattr, &_pthread_attr_default, sizeof(*pattr)); *attr = pattr; return (0); } @@ -449,7 +448,7 @@ _thr_attr_setscope(pthread_attr_t *attr, int contentionscope) return (EINVAL); if (contentionscope == PTHREAD_SCOPE_SYSTEM) - (*attr)->flags |= contentionscope; + (*attr)->flags |= PTHREAD_SCOPE_SYSTEM; else (*attr)->flags &= ~PTHREAD_SCOPE_SYSTEM; return (0); @@ -546,6 +545,7 @@ _pthread_attr_setaffinity_np(pthread_attr_t *pattr, size_t cpusetsize, if (cpusetsize > kern_size) { /* Kernel checks invalid bits, we check it here too. */ size_t i; + for (i = kern_size; i < cpusetsize; ++i) if (((const char *)cpusetp)[i] != 0) return (EINVAL); From nobody Tue Jan 9 13:30:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8WyM6Qdbz57Th5; Tue, 9 Jan 2024 13:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8WyM5g8wz51T4; Tue, 9 Jan 2024 13:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704807019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uNcywDGOJElVWHNsNbA40ZclSpMRg0UDqxB3I2lOvq8=; b=IVak+dOx+p62nIkFu0+SMYtzzABt1MqvPQQ2SOh9Gfs2bOmhKvD3zq8KRAH1WxQEIBGgA6 hQrj41s0loiu+qm71F0fOtZ3iHayF0k3t0d3gwOCljDhA7XitA8NgZ7ZLdRCHolxSr71NO 018Fuif7hHDbMIu5b4mN7CVdk7X8BCT8Q7YLULbU0NFHuj9RQ8U2OTFIf0efGiwOdVALvo o+mcxT38vUAjQkn5HPUnjbz5B5bZnF7BRRdiwN31xPYdp2/TkcQzaZ+aXfkAybmID+c8Ef 2SbpQDt59Kas9jqmvlPASFoFaCXuMp4WFX/xkJac4lDl6HXaslf6LJf3RQMplA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704807019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uNcywDGOJElVWHNsNbA40ZclSpMRg0UDqxB3I2lOvq8=; b=vTFNPmo/ffw4+jTB6tHEYW0cYbJevpeD/8jbZriUMh+VW9r8u5q1MgqgMVj/ar77Dx9C2s PMuXTwJ4s5Q4LV5nTjboc3C3ERq0KKiJNZdbC4JsYHoKW0thORo40GYetUmnEy6gMnpCzS v+MKTGP6vcbqmzUC7sNkhXler087ygDNZHQEWWJhMRVvChZrFVS0obE+4skoN+UuC5HrE3 9kQ3Ku/LqzDVndS+8ctTopczSnS7hBuH8t1IOQK6x1B81nOLrEp4zozRMYAkl6Ia4nW/AF 2UtG2Ct/LdzX6rDhVNrGRphQejRNMydMjpocvQc15sohoSrma58hdYVpjPwpIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704807019; a=rsa-sha256; cv=none; b=rUp+DUkU4krME5pN9ZuXh8Px5sKrZXjl5csizp3XyqEvQoJ1yMbIYhxH9pKutrMgm1UOul zqnayf6FgNwQNrsDpU0SaQXSbNOnCO2I3l6B33SFfShVAOGPqk7A/fuMyoCma3wZ52wOOr xYZPnjgBZpD7d0lSPhojfYiaZKBf6/a1nqoN8ielU6LicYXYrxS06+GOdHkkId3VS0aXxs r+jsyNSZ4ocHRhm1vsyJZfOERgiqMrAxYO/nPSczmluyW2NAE3iqWWEoitlLyEDZRNcQY3 o86LoZqAZG1aPQdPpo6RUSQ6M6P4AcgXiowVvif5FaYcYZh1TTo78HanbAKOAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8WyM4l2vzsfr; Tue, 9 Jan 2024 13:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409DUJ8V035796; Tue, 9 Jan 2024 13:30:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409DUJXu035793; Tue, 9 Jan 2024 13:30:19 GMT (envelope-from git) Date: Tue, 9 Jan 2024 13:30:19 GMT Message-Id: <202401091330.409DUJXu035793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 15bb0300eeca - main - libhtr: pthread_attr_setaffinity_np(): Replace calloc() with malloc() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15bb0300eeca233827a6a13cd2ed883e0034979d Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=15bb0300eeca233827a6a13cd2ed883e0034979d commit 15bb0300eeca233827a6a13cd2ed883e0034979d Author: Olivier Certner AuthorDate: 2024-01-04 15:20:50 +0000 Commit: Olivier Certner CommitDate: 2024-01-09 13:29:26 +0000 libhtr: pthread_attr_setaffinity_np(): Replace calloc() with malloc() Using calloc() instead of malloc() is useless here since the allocated memory is to be wholly crushed by the memcpy() call that follows. Suggested by: kib Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43328 --- lib/libthr/thread/thr_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index bbb143da1a7d..561037fa5eb4 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -551,7 +551,7 @@ _pthread_attr_setaffinity_np(pthread_attr_t *pattr, size_t cpusetsize, return (EINVAL); } if (attr->cpuset == NULL) { - attr->cpuset = calloc(1, kern_size); + attr->cpuset = malloc(kern_size); if (attr->cpuset == NULL) return (errno); attr->cpusetsize = kern_size; From nobody Tue Jan 9 14:32: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 4T8YL04Qz0z55QHv; Tue, 9 Jan 2024 14:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8YL03Yv4z57n9; Tue, 9 Jan 2024 14:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704810744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SF0fq8QVeF/GosYLyejTOf5s/UW7jFFZTjOZe24RLl8=; b=qimItXZPCtxFf9/kNlQCj4uy7WHaSXt2d/7rIULe6SUNv9aZncJzVo138sSkpXGWOsUhcW E2IfH88Vy0taMn3+GeDb6BbSBy4Dp8QyyKVR6ApuH7O4YyNrYDtydcgmNUMRthcKObDPya /UCtJReAM/bSvuqmnHRA4gLG9a5I2TzvNwwcqB0ZdaN6UrdAbm6VpKQ3ed5elDgPqK4eqc 2ZCixVGFX/tBqP2z22h87tLkzCxhtizWXMqDVMFTUa7uw65lH/Cgn7/N9/BrI1jCm+LrKH BJU2bypZNNtVaGCAxbrJpovot2/iYmgOrMLiun+WPAJVgUggxMFbrQweOPZ0Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704810744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SF0fq8QVeF/GosYLyejTOf5s/UW7jFFZTjOZe24RLl8=; b=j2id3HabRh86Z9YHDnc3fS93rfY7owGOthW6JVC+DNZ0lUFx5QO+piU/0a/xoQSKjtoxQH Ehi0l1kjnnkuZrTRh/DaFXhC1XFunTwXj16PFV/N89oHx25kbRQpmHGlhlLJChgY+j67kR SmGYB4OzO+qLMjYyTnqdCi0m6b+9yyy1nY9SRTBVRLb77llbz3SeMVa3iNS+VnCgqshUuU gGu7/IOW/3pG+VeStLqS3wXZtW9sh2X0In2lw/1XB9VmWA05bX23ZrhX6sCJEwzXILRUs8 C4SP47jVXTOUmpyJsQy7543EP6GqkPsVDqxMDDcGuzpxU64f73kyYcdmF1sqmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704810744; a=rsa-sha256; cv=none; b=xdvD0oVWbmWTz4BEI1FUAgMDoJX9Tb9+dypcdykpLnTgWh4FmEKPO5qjTjGvUeMoVTQh5b gYQ3rLEjQ+VTzJHTrGXFHmO+0pqsvobYgeCf307ZnWQhKSEtK+yajjyfx2zHS3yticf63a qKY/3R2ne8C1r1wW9uruIBieZjaL2m0VdXeXbY+f8bNsksbB9WxAJHjiKW5IebMIs3pLw5 9UoKynjsHXAhlHLyyWpzgVMWNrvMtXs5UoyNy133JMpaSYwZLfeS973fODxz2Kc51elVJG jzJJKwczSuHrLpY+j1ZIqgJyQwS3X+OVQnIWmMdcxC6Mh46HQcsqeK3jvUNoUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8YL02f1TzvJp; Tue, 9 Jan 2024 14:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409EWOmO043708; Tue, 9 Jan 2024 14:32:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409EWOuv043705; Tue, 9 Jan 2024 14:32:24 GMT (envelope-from git) Date: Tue, 9 Jan 2024 14:32:24 GMT Message-Id: <202401091432.409EWOuv043705@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: ddf7fbbb57e2 - main - Intel FPGA: Support programming larger bitfiles. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddf7fbbb57e271b392d1aea4866bf5df800a7cf9 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=ddf7fbbb57e271b392d1aea4866bf5df800a7cf9 commit ddf7fbbb57e271b392d1aea4866bf5df800a7cf9 Author: Ruslan Bukin AuthorDate: 2024-01-09 14:18:53 +0000 Commit: Ruslan Bukin CommitDate: 2024-01-09 14:18:53 +0000 Intel FPGA: Support programming larger bitfiles. Issue data claim command after every chunk of data programmed, so we can reuse the SVC buffer for the next chunk. Tested on Terasic DE10 Pro. Sponsored by: UKRI --- sys/arm64/intel/stratix10-soc-fpga-mgr.c | 82 +++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/sys/arm64/intel/stratix10-soc-fpga-mgr.c b/sys/arm64/intel/stratix10-soc-fpga-mgr.c index 177fb694c870..baa35b9a85a6 100644 --- a/sys/arm64/intel/stratix10-soc-fpga-mgr.c +++ b/sys/arm64/intel/stratix10-soc-fpga-mgr.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2019 Ruslan Bukin + * Copyright (c) 2019-2024 Ruslan Bukin * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and @@ -32,6 +32,9 @@ /* * Intel Stratix 10 FPGA Manager. + * + * FPGA Programming Example: + * dd if=cheri.core.rbf of=/dev/fpga_partial0 bs=512k */ #include @@ -57,7 +60,7 @@ #include #include -#define SVC_BUF_SIZE (2 * 1024 * 1024) +#define SVC_BUF_SIZE (512 * 1024) struct fpgamgr_s10_softc { struct cdev *mgr_cdev; @@ -109,12 +112,45 @@ fpga_open(struct cdev *dev, int flags __unused, return (0); } +static int +fpga_submit(struct cdev *dev) +{ + struct fpgamgr_s10_softc *sc; + struct s10_svc_msg msg; + int ret; + + sc = dev->si_drv1; + + bzero(&msg, sizeof(struct s10_svc_msg)); + msg.command = COMMAND_RECONFIG_DATA_SUBMIT; + msg.payload = (void *)sc->mem.paddr; + msg.payload_length = sc->mem.fill; + ret = s10_svc_send(sc->s10_svc_dev, &msg); + if (ret != 0) { + device_printf(sc->dev, "Failed to submit data\n"); + s10_svc_free_memory(sc->s10_svc_dev, &sc->mem); + sc->opened = 0; + return (ENXIO); + } + + /* Claim memory buffer back. */ + bzero(&msg, sizeof(struct s10_svc_msg)); + msg.command = COMMAND_RECONFIG_DATA_CLAIM; + ret = s10_svc_send(sc->s10_svc_dev, &msg); + if (ret) + device_printf(sc->dev, "Can't claim buffer back.\n"); + + return (ret); +} + static int fpga_write(struct cdev *dev, struct uio *uio, int ioflag) { struct fpgamgr_s10_softc *sc; vm_offset_t addr; + int error; int amnt; + int ret; sc = dev->si_drv1; @@ -127,11 +163,22 @@ fpga_write(struct cdev *dev, struct uio *uio, int ioflag) while (uio->uio_resid > 0) { addr = sc->mem.vaddr + sc->mem.fill; - if (sc->mem.fill >= SVC_BUF_SIZE) - return (ENOMEM); amnt = MIN(uio->uio_resid, (SVC_BUF_SIZE - sc->mem.fill)); - uiomove((void *)addr, amnt, uio); + error = uiomove((void *)addr, amnt, uio); + if (error) { + device_printf(sc->dev, "uiomove returned error %d\n", + error); + break; + } sc->mem.fill += amnt; + if (sc->mem.fill == SVC_BUF_SIZE) { + ret = fpga_submit(dev); + if (ret) { + sx_xunlock(&sc->sx); + return (ret); + } + sc->mem.fill = 0; + } } sx_xunlock(&sc->sx); @@ -144,7 +191,6 @@ fpga_close(struct cdev *dev, int flags __unused, int fmt __unused, struct thread *td __unused) { struct fpgamgr_s10_softc *sc; - struct s10_svc_msg msg; int ret; sc = dev->si_drv1; @@ -156,25 +202,15 @@ fpga_close(struct cdev *dev, int flags __unused, return (ENXIO); } - /* Submit bitstream */ - bzero(&msg, sizeof(struct s10_svc_msg)); - msg.command = COMMAND_RECONFIG_DATA_SUBMIT; - msg.payload = (void *)sc->mem.paddr; - msg.payload_length = sc->mem.fill; - ret = s10_svc_send(sc->s10_svc_dev, &msg); - if (ret != 0) { - device_printf(sc->dev, "Failed to submit data\n"); - s10_svc_free_memory(sc->s10_svc_dev, &sc->mem); - sc->opened = 0; - sx_xunlock(&sc->sx); - return (0); + if (sc->mem.fill > 0) { + ret = fpga_submit(dev); + if (ret) { + sx_xunlock(&sc->sx); + return (ret); + } + sc->mem.fill = 0; } - /* Claim memory buffer back */ - bzero(&msg, sizeof(struct s10_svc_msg)); - msg.command = COMMAND_RECONFIG_DATA_CLAIM; - s10_svc_send(sc->s10_svc_dev, &msg); - s10_svc_free_memory(sc->s10_svc_dev, &sc->mem); sc->opened = 0; sx_xunlock(&sc->sx); From nobody Tue Jan 9 16:27: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 4T8bty4Grkz55nWR; Tue, 9 Jan 2024 16:27: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 4T8bty3BYVz47q4; Tue, 9 Jan 2024 16:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704817658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX0Y9FUDkC1HHPlJ9W64UwkEThnD+bHDQZqiRdfauec=; b=fGnwge6vDcbIoQYJWg1/vtzUbLPsqYBrSefpaRozAuzZdCBpcbGGFFG6MpQDq3wC/+oUyk O4jXnpYQa/H2G9RxGEsXJbwx9jLzrshAhnrQZx5j2a1Wz2y2R9ZmLN3nAXJOzxkCvR1CJh ZMhWxN2UKGahQkS6mkOQuH8Ajk0RnLNHzAkS4UzaK8N0qGSn7IAOYLrjpL48uQhUtevX16 qLz7f3FYg0OOld6c3Dyvc3yqk3JXuUdxGSP473x6WsRck+tvygpf16twpbS30fcgwlGDXT HZUvJSxm2hxKI4mDZWTAEf/wCOc8D4+Ypa/4YSXE74kNuCLS+0lj6c1JuRYTTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704817658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX0Y9FUDkC1HHPlJ9W64UwkEThnD+bHDQZqiRdfauec=; b=o/AyyNJyiBfy8w4k7WF+JYE64SC+fgJF973wnpLIpC3b1QeQSmyRRYrJzu9+iuJ5hze7TR 0DmhKlRfgBFRTYT7zEg6uXApL/f1jT5A4IIKU0CwfU0tWVwf2ZAM1AsOuWrH7zsvr2GF4x HX/ubo09usrwwQl3+8CewRYvlfGRqWj3OfjyiwDh+ikQaPTv7awHLCZaLp5I5XmBm86J2a jzsF+6sEIT0smCVL8ibyrjmL9JzUlitMrOZwIhA40/Y8mh77lE5jeme+dGiwiE/NLdDnIV Izn66Bmrsw1At6diLxEHQBzOwWGimHj3dBUhVGzG/5va9RTGUq4uzDpzcivhxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704817658; a=rsa-sha256; cv=none; b=MDU+xnrAq7VVjPAJt8M6T0o7lkrDMVJ+l9TyTfqRX8hTeDG/1jIg+2eiFXYgGcaQ+s5T3e /150XWx/rzOFswQl7nJGED49X469SX25z+gMetHjVHsOklS4PzpRyU2GcEjNiTStc4Xrw9 seZ1gTdPZ7C6M+GmnTgSaB89Q/89vPBYJ1E9IWFWHAjp7rfgqF6J4vkS+SafQZxoGWwqLG /bae7rQ8duQJQZzD43st5ftv2Ml5SOtfF8EKpgvvBTHesDKQcAPfhfUXul+919Xvf6S8xz HVIhOtIwNpIMRhHygwEP6q4D/WkSsZNdY52aZQ6Swe4/bDS994a5ykOE/q509g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8bty2Gh8zy0x; Tue, 9 Jan 2024 16:27: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 409GRcgo028834; Tue, 9 Jan 2024 16:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409GRcI0028831; Tue, 9 Jan 2024 16:27:38 GMT (envelope-from git) Date: Tue, 9 Jan 2024 16:27:38 GMT Message-Id: <202401091627.409GRcI0028831@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: c2356a440db9 - main - asa: Rewrite to fix line termination issue. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2356a440db91c106867d45c94b3d6d7bc0e50f0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c2356a440db91c106867d45c94b3d6d7bc0e50f0 commit c2356a440db91c106867d45c94b3d6d7bc0e50f0 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-09 14:09:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-09 16:27:15 +0000 asa: Rewrite to fix line termination issue. The standard is somewhat unclear, but on the balance, I believe that the phrase “the rest of the input line” should be interpreted to mean the rest of the input line including the terminating newline if and only if there is one. This means the current implementation is incorrect on two points: - First, it suppresses the previous line's newline in the '1' case. - Second, it unconditionally emits a newline at the end of the output for non-empty input, even if the input did not end with a newline. Resolve this by rewriting the main loop. Instead of special-casing the first line and then assuming that every line ends with a newline, we remember how each line ends and emit that either at the beginning of the next line or at the end of the file except in the one case ('+') where the standard explicitly says not to. While here, try to reduce diff to upstream a little and update their RCS tag to reflect the fact that while we've diverged significantly from them, we've incorporated all their changes. Remove the useless second RCS tag. We also update the tests to account for the change in interpretation of the '1' case and add a test case for unterminated input. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43326 --- usr.bin/asa/asa.c | 102 +++++++++++++++++++----------------------- usr.bin/asa/tests/asa_test.sh | 15 ++++++- 2 files changed, 59 insertions(+), 58 deletions(-) diff --git a/usr.bin/asa/asa.c b/usr.bin/asa/asa.c index 757278442a52..9839dbf8a722 100644 --- a/usr.bin/asa/asa.c +++ b/usr.bin/asa/asa.c @@ -1,4 +1,4 @@ -/* $NetBSD: asa.c,v 1.11 1997/09/20 14:55:00 lukem Exp $ */ +/* $NetBSD: asa.c,v 1.17 2016/09/05 00:40:28 sevan Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -32,13 +32,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#if 0 -#ifndef lint -__RCSID("$NetBSD: asa.c,v 1.11 1997/09/20 14:55:00 lukem Exp $"); -#endif -#endif #include +#include #include #include #include @@ -50,38 +45,33 @@ static void usage(void) __dead2; int main(int argc, char *argv[]) { - int ch, exval; FILE *fp; - const char *fn; + int ch, exval; while ((ch = getopt(argc, argv, "")) != -1) { switch (ch) { - case '?': default: usage(); - /*NOTREACHED*/ } } argc -= optind; argv += optind; exval = 0; - if (argc == 0) + if (*argv == NULL) { asa(stdin); - else { - while ((fn = *argv++) != NULL) { - if (strcmp(fn, "-") == 0) { + } else { + do { + if (strcmp(*argv, "-") == 0) { asa(stdin); + } else if ((fp = fopen(*argv, "r")) == NULL) { + warn("%s", *argv); + exval = 1; } else { - if ((fp = fopen(fn, "r")) == NULL) { - warn("%s", fn); - exval = 1; - continue; - } asa(fp); fclose(fp); } - } + } while (*++argv != NULL); } if (fflush(stdout) != 0) @@ -93,7 +83,6 @@ main(int argc, char *argv[]) static void usage(void) { - fprintf(stderr, "usage: asa [file ...]\n"); exit(1); } @@ -101,52 +90,53 @@ usage(void) static void asa(FILE *f) { - size_t len; char *buf; + size_t len; + bool eol = false; - if ((buf = fgetln(f, &len)) != NULL) { - if (buf[len - 1] == '\n') - buf[--len] = '\0'; - /* special case the first line */ + while ((buf = fgetln(f, &len)) != NULL) { + /* in all cases but '+', terminate previous line, if any */ + if (buf[0] != '+' && eol) + putchar('\n'); + /* examine and translate the control character */ switch (buf[0]) { + default: + /* + * “It is suggested that implementations treat + * characters other than 0, 1, and '+' as + * in the absence of any compelling reason to do + * otherwise” (POSIX.1-2017) + */ + case ' ': + /* nothing */ + break; case '0': putchar('\n'); break; case '1': putchar('\f'); break; - } - - if (len > 1 && buf[0] && buf[1]) - printf("%.*s", (int)(len - 1), buf + 1); - - while ((buf = fgetln(f, &len)) != NULL) { - if (buf[len - 1] == '\n') - buf[--len] = '\0'; - switch (buf[0]) { - default: - case ' ': - putchar('\n'); - break; - case '0': - putchar('\n'); - putchar('\n'); - break; - case '1': - putchar('\f'); - break; - case '+': + case '+': + /* + * “If the '+' is the first character in the + * input, it shall be equivalent to .” + * (POSIX.1-2017) + */ + if (eol) putchar('\r'); - break; - } - - if (len > 1 && buf[0] && buf[1]) - printf("%.*s", (int)(len - 1), buf + 1); + break; } - - putchar('\n'); + /* trim newline if there is one */ + if ((eol = (buf[len - 1] == '\n'))) + --len; + /* print the rest of the input line */ + if (len > 1 && buf[0] && buf[1]) + fwrite(buf + 1, 1, len - 1, stdout); } - + /* terminate the last line, if any */ + if (eol) + putchar('\n'); + /* check for output errors */ if (ferror(stdout) != 0) err(1, "stdout"); } diff --git a/usr.bin/asa/tests/asa_test.sh b/usr.bin/asa/tests/asa_test.sh index 429342d530e4..91515bb55d95 100644 --- a/usr.bin/asa/tests/asa_test.sh +++ b/usr.bin/asa/tests/asa_test.sh @@ -38,8 +38,8 @@ one_head() { atf_set descr "First character on line is '1'" } one_body() { - printf " %s\n1%s\n" "$a" "$b" >infile - printf "%s\f%s\n" "$a" "$b" >outfile + printf "1%s\n1%s\n" "$a" "$b" >infile + printf "\f%s\n\f%s\n" "$a" "$b" >outfile atf_check_asa infile outfile } @@ -87,6 +87,16 @@ dashdash_body() { atf_check -o inline:"$a $b\n" asa -- -infile } +atf_test_case unterminated +unterminated_head() { + atf_set descr "Unterminated input" +} +unterminated_body() { + printf " %s\n %s" "$a" "$b" >infile + printf "%s\n%s" "$a" "$b" >outfile + atf_check_asa infile outfile +} + atf_init_test_cases() { atf_add_test_case space @@ -96,4 +106,5 @@ atf_init_test_cases() atf_add_test_case plus_top atf_add_test_case stdout atf_add_test_case dashdash + atf_add_test_case unterminated } From nobody Tue Jan 9 17: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 4T8dqg2dq6z564Tc; Tue, 9 Jan 2024 17:54:55 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8dqf3RkXz4PDb; Tue, 9 Jan 2024 17:54:54 +0000 (UTC) (envelope-from delphij@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=lRPldvO7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of delphij@gmail.com designates 2a00:1450:4864:20::12a as permitted sender) smtp.mailfrom=delphij@gmail.com Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50e759ece35so3507777e87.3; Tue, 09 Jan 2024 09:54:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704822891; x=1705427691; 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=5mZsy/JTUe+sTCTNaF1cZMd04lfgT7jHMhpTfTfIa30=; b=lRPldvO7m7q4P0yV0Btujq6v8aSDEImgf5gJIuwq1pch8XHKIn1+8oYfxQUOLL3yQY pL13onNo4+siUPV70vxpenTlWmKu2vVYRMe9DAFVDVumsM/bgDSvEmW6E9VhFzb1Ffsc 7dgx5iAbw8oHtzpqitde7sMtk3Nt25DiYKl7XG5LIBDhsh/4Vu/hinALMmiW1GBN1bzb 019//eMkQlHkPOyljUPPIoPkZ0yRXwWZxqKoXJuMu0EOQ+zTWtftOF6w0SogXXfujIOY +muwNuz4Y63CCvEyPirynWKcW62Nfn1tX/OPz0Yy5YMLnKq4RmX5DL/L7hSLkLfpZD3u TSqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704822891; x=1705427691; 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=5mZsy/JTUe+sTCTNaF1cZMd04lfgT7jHMhpTfTfIa30=; b=mfMhAxe18iDCHxU/8oQS+/Ly5rPdiSWMWA4GM+tzUtMahU5WjhtvVIAyedRuhNcWiN /PxcdoE/glUNODN8XIjaHOb6N1Kfb7QmK7rO6NXmsgRjBjGHa1KJOpHH/q8/ByWihjom uMwZuLspbyCvOto44wKuI1vjxrc1GzEt0Atl2u3pNiaRGUdNIsFqtP9Kgm2IHiysXCzz AThU5jQ/BnUQClIa5omcotZAHjO9i2JnSJCQFL04vPfjswdC5wKDrh2KN8xhfYFJ1rC1 3vgvQOIbuxvtDEJCPwku+xut16J2dVwI8Tt0MRn54SvkyXE0lNdo7RU2xNE8+gj1OoKs kNGQ== X-Gm-Message-State: AOJu0YyJxMr+aVLepMdCPB3Ba68vE1Im/ldJGF1OJPgyGniij1jYO8ND j+mLtNxa47PI+kUEGEWB05c318saVBFtSmoT8V+DynzrPFE= X-Google-Smtp-Source: AGHT+IG8aXxgrVvl2Wd1LwlER1KlD2iwoAucSXli1V7r6SC4sKK5TUyHgSLM1viGlY9PskjVeB8giFoi+FuQEy6HwV4= X-Received: by 2002:a05:6512:312d:b0:50e:7224:ad4f with SMTP id p13-20020a056512312d00b0050e7224ad4fmr1940673lfd.59.1704822890939; Tue, 09 Jan 2024 09:54:50 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> In-Reply-To: <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> From: Xin LI Date: Tue, 9 Jan 2024 09:54:39 -0800 Message-ID: Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). To: Mike Karels Cc: Xin LI , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000d1cc79060e870261" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.95)[-0.954]; 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)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::12a:from]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FREEFALL_USER(0.00)[delphij]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCPT_COUNT_FIVE(0.00)[5]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4T8dqf3RkXz4PDb --000000000000d1cc79060e870261 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Mike, On Fri, Dec 29, 2023 at 7:25=E2=80=AFAM Mike Karels wrote= : > On 29 Dec 2023, at 2:46, Xin LI wrote: > > > The branch main has been updated by delphij: > [...] > > > +61174ad88e33: > > + newsyslog(8) now supports specifying a global compression method > directly > > + at the beginning of the newsyslog.conf file, which will make > newsyslog(8) > > + to behave like the corresponding option was passed to the newly > added > > + '-c' option. For example: > > + > > + none > > + > > +906748d208d3: > > + newsyslog(8) now accepts a new option, '-c' which overrides all > historical > > + compression flags by treating their meaning as "treat the file as > compressible" > > + rather than "compress the file with that specific method." > > + > > + The following choices are available: > > + * none: Do not compress, regardless of flag. > > + * legacy: Historical behavior (J=3Dbzip2, X=3Dxz, Y=3Dzstd, Z=3D= gzip). > > + * bzip2, xz, zstd, gzip: apply the specified compression method. > > + > > + We plan to change the default to 'none' in FreeBSD 15.0. > > Sorry not to have noticed this in the review; it was only when I saw this > message that it sunk in that we now have *three* ways to specify > compression, > and I'm not even sure what the precedence is. I would have thought that > The current precedence is that command line takes highest priority; when it's not present, overrides all lines with any compression method. The meaning of J/X/Y/Z is changed to "this file is compressible", unless newsyslog is in legacy mode. It's intentional to discourage the use of different compression types for different files (because the current newsyslog.conf(5) format uses one character to represent compression method and without a change to e.g. UCL or some other configuration language, supporting additional compression methods would be much more messier). > would replace -c. It's a mess if the config file has entries > that specify J and X flags as well as none, the config file has > zstd, and the -c option is given as well. We now have a knob > newsyslog would issue a warning if both -c is given and the configuration file has . Part of the reason to introduce was that it would move the configuration to one place (newsyslog.conf) and there were concerns that having -c in newsyslog in /etc/crontab is counterintuitive (as raised in some earlier discussion). > to override the knob to override a knob. The only reason to keep -c that > I can think of is to specify a different compression in a single > invocation, > but as noted, changing compression requires manual operations that make > it unreasonable to change it invocation by invocation. > The intention of -c was to be added to /etc/crontab, but with the introduction of it's probably a good idea to just remove the command line option or at least leave it undocumented? > Also, using the -c option or (except with legacy) loses the > ability to specify different compression types for different files. > This (the ability of specifying different compression types for different files) is what I deliberately wanted to get rid of. Compression types only make a meaningful difference when files are sufficiently large, and the purpose of newsyslog is to not allow log files to grow to an unmanageable size. Rotating files when they are large and also requesting to compress them means the system would have prolonged "bursts" of CPU workload at integral hours, which would be even worse for busy systems where logs tend to have more contents. > People have objected to the term "legacy" as well. > I don't agree. Calling it "legacy" would send a clear signal that the historical way is discouraged (for people who are using a different compression method, merging upstream change would be a very painful process). We already have 4 letters to represent 4 different compression methods, that's almost 1/3 of all valid configuration letters, and we should stop doing that because the legacy way is causing problems and won't scale when new compression methods are added. > I still think it would be much better to add an option letter to select > the default compression as specified by . This would eliminate > the need for "legacy", and it would add the ability to have both a global > default and an exception. I think the redefinition of the existing flags > to have different meanings if is given is messy. > I insist the default should be anything except "legacy" -- legacy is for backward compatibility and should serve that purpose only. The entry for -c says that we plan to change the default to "none" in 15.0. > Hopefully that would be done via and not -c. However, there > Yes, my intention was to add a line to newsyslog.conf ( https://reviews.freebsd.org/D43169 ) instead of adding it to /etc/crontab. > was significant pushback on "none" being the default. > I think we should provide a reasonable default. Compression was useful back in the 90's, but not so much nowadays and makes grep'ing the logs harder (and for those who want compression, they could choose e.g. 'bzip2' anyways). This change would also make porter's lives a lot easier as they could install their newsyslog.conf.d files with e.g. 'J' to indicate that the file can be compressed, without messing up with the administrator's decision to not compress or compress it with some other compressor. --000000000000d1cc79060e870261 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Mike,

On Fri, Dec 29, 2023 at 7:25= =E2=80=AFAM Mike Karels <mike@karels.= net> wrote:
On 29 Dec 2023, at 2:46, Xin LI wrote:

> The branch main has been updated by delphij:
[..= .]=C2=A0
>
> +61174ad88e33:
> +=C2=A0 =C2=A0 =C2=A0newsyslog(8) now supports specifying a global com= pression method directly
> +=C2=A0 =C2=A0 =C2=A0at the beginning of the newsyslog.conf file, whic= h will make newsyslog(8)
> +=C2=A0 =C2=A0 =C2=A0to behave like the corresponding option was passe= d to the newly added
> +=C2=A0 =C2=A0 =C2=A0'-c' option. For example:
> +
> +=C2=A0 =C2=A0 =C2=A0<compress> none
> +
> +906748d208d3:
> +=C2=A0 =C2=A0 =C2=A0newsyslog(8) now accepts a new option, '-c= 9; which overrides all historical
> +=C2=A0 =C2=A0 =C2=A0compression flags by treating their meaning as &q= uot;treat the file as compressible"
> +=C2=A0 =C2=A0 =C2=A0rather than "compress the file with that spe= cific method."
> +
> +=C2=A0 =C2=A0 =C2=A0The following choices are available:
> +=C2=A0 =C2=A0 =C2=A0 * none: Do not compress, regardless of flag.
> +=C2=A0 =C2=A0 =C2=A0 * legacy: Historical behavior (J=3Dbzip2, X=3Dxz= , Y=3Dzstd, Z=3Dgzip).
> +=C2=A0 =C2=A0 =C2=A0 * bzip2, xz, zstd, gzip: apply the specified com= pression method.
> +
> +=C2=A0 =C2=A0 =C2=A0We plan to change the default to 'none' i= n FreeBSD 15.0.

Sorry not to have noticed this in the review; it was only when I saw this message that it sunk in that we now have *three* ways to specify compressio= n,
and I'm not even sure what the precedence is.=C2=A0 I would have though= t that

The current precedence is that comma= nd line takes highest priority; when it's not present, <compress>= overrides all lines with any compression method.

The meaning of J/X= /Y/Z is changed to "this file is compressible", unless newsyslog = is in legacy mode.=C2=A0 It's intentional to discourage the use of diff= erent compression types for different files (because the current newsyslog.= conf(5) format uses one character to represent compression method and witho= ut a change to e.g. UCL or some other configuration language, supporting ad= ditional compression methods would be much more messier).
= =C2=A0
<compress> would replace -c.=C2=A0 It's a mess if the config file= has entries
that specify J and X flags as well as none, the config file has
<compress> zstd, and the -c option is given as well.=C2=A0 We now hav= e a knob

newsyslog would issue a warning if= both -c is given and the configuration file has <compress>.
<= br>
Part of the reason to introduce <compress> was that it would mov= e the configuration to one place (newsyslog.conf) and there were concerns t= hat having -c in newsyslog in /etc/crontab is counterintuitive=C2=A0(as rai= sed in some earlier discussion).
=C2=A0
to override the knob to override a knob. The only reason to keep -c that I can think of is to specify a different compression in a single invocation= ,
but as noted, changing compression requires manual operations that make
it unreasonable to change it invocation by invocation.

The intention of -c was to be added to /etc/crontab, but with t= he introduction of <compress> it's probably a good idea to just r= emove the command line option or at least leave it undocumented?=C2=A0
= =C2=A0
Also, using the -c option or <compress> (except with legacy) loses th= e
ability to specify different compression types for different files.

This (the ability of specifying different=C2=A0com= pression types for different files) is what I deliberately wanted to get ri= d of.

Compression types only make a meaningful difference when= files are sufficiently large, and the purpose of newsyslog is to not allow= log files to grow to an unmanageable size.=C2=A0 Rotating files when they = are large and also requesting to compress them means the system would have = prolonged "bursts" of CPU workload at integral hours, which would= be even worse for busy systems where logs tend to have more contents.
=C2=A0
People have objected to the term "legacy" as well.

I don't agree.

Calling it "legacy" w= ould send a clear signal that the historical way is discouraged (for people= who are using a different compression method, merging upstream change woul= d be a very painful process).=C2=A0 We already have 4 letters to represent = 4 different compression methods, that's almost 1/3 of all valid configu= ration letters, and we should stop doing that because the legacy way is cau= sing problems and won't scale when new compression methods are added.
=C2=A0
I insist the default should be anything except "= ;legacy" -- legacy is for backward compatibility and should serve that= purpose only.

The entry for -c says that we plan to change the default to= "none" in 15.0.
Hopefully that would be done via <compress> and not -c.=C2=A0 However= , there

Yes, my intention was to add a line= to newsyslog.conf ( https:/= /reviews.freebsd.org/D43169 ) instead of adding it to /etc/crontab.
=C2=A0
was significant pushback on "none" being the default.

I think we should provide a reasonable default.=C2=A0 Compr= ession was useful back in the 90's, but not so much nowadays and makes = grep'ing=C2=A0the logs harder (and for those who want compression, they= could choose e.g. 'bzip2' anyways).=C2=A0 This change would also m= ake porter's lives a lot easier as they could install their newsyslog.c= onf.d files with e.g. 'J' to indicate that the file can be compress= ed, without messing up with the administrator's decision to not compres= s or compress it with some other compressor.
--000000000000d1cc79060e870261-- From nobody Tue Jan 9 18:05: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 4T8fBg1PBdz566s6; Tue, 9 Jan 2024 18:11:23 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_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 4T8fBf6J0pz4Stn; Tue, 9 Jan 2024 18:11:22 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Tue, 09 Jan 2024 19:05:54 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c2356a440db9 - main - asa: Rewrite to fix line termination issue. Message-ID: <20240109180554.UYZwm9Yl@steffen%sdaoden.eu> In-Reply-To: <202401091627.409GRcI0028831@gitrepo.freebsd.org> References: <202401091627.409GRcI0028831@gitrepo.freebsd.org> Mail-Followup-To: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org User-Agent: s-nail v14.9.24-585-g9999e323b6 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4T8fBf6J0pz4Stn 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:15987, ipnet:217.144.128.0/20, country:DE] Dag-Erling Sm=C3=B8rgrav wrote in <202401091627.409GRcI0028831@gitrepo.freebsd.org>: |The branch main has been updated by des: | |URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc2356a440db91c106867d45c94= b\ |3d6d7bc0e50f0 | |commit c2356a440db91c106867d45c94b3d6d7bc0e50f0 |Author: Dag-Erling Sm=C3=B8rgrav |AuthorDate: 2024-01-09 14:09:41 +0000 |Commit: Dag-Erling Sm=C3=B8rgrav |CommitDate: 2024-01-09 16:27:15 +0000 | | asa: Rewrite to fix line termination issue. | =20 | The standard is somewhat unclear, but on the balance, I believe \ ... | - Second, it unconditionally emits a newline at the end of the output | for non-empty input, even if the input did not end with a newline. ... I want to point out that POSIX only knows about text files which end with a LF newline. Otherwise it is not a text file. (I think Stallman and emacs joke on this by allowing something else, iirc from before Y2K when i shortly used it, and, funnily, from some thread on another ML just last week or so, where it was claimed that this could have roots in emacse not rooting in UNIX.) That is (sorry for that) "3.387 Text File" is a "file that contains characters organized into zero or more lines. The lines do not contain NUL characters and none can exceed {LINE_MAX} bytes in length, including the character". And "3.185 Line" is a "sequence of zero or more non- characters plus a terminating character". Crystal clear thus (:)). P.S.: numbers are from Draft 4 of upcoming POSIX standard. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From nobody Tue Jan 9 18:17: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 4T8fL92rFLz567qk; Tue, 9 Jan 2024 18:17: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 4T8fL92BvTz4Vwt; Tue, 9 Jan 2024 18:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704824273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IQy8e/1CHw5ex2aAnNS7VZ4rPSyfcpUBwARRhIioEFE=; b=WiUMJQnne1T0zRvVvLpHl9dyWpy4Urcl8gwoJ0lVWcymwJDLqgBhiqWVR+uxitFcg3+uO0 gkqBuIgZ1EjurKU5qAuHQOAXELLkAa5jOtnHzQvCL9gofDisejxLTTWhjn/tZhVd/KAAtn SY45EHCgpBkEVhTnkhnqAyud/jZmSJNckJiX9bhm3exyoK0ndokqhNRir9xhmfBNs12n5X GGpwFJPGGOVywiSH9Vg99v7lTMVLPf4+bB3Z4YpywXXGDeziKCdD5GKVXDfhZgEfFdgK74 O+iBNMcky0Ccwmagd7dFC8N/kGMal2eBTls1BA01ITPPEm+jBZtmz+9fBOBDIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704824273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IQy8e/1CHw5ex2aAnNS7VZ4rPSyfcpUBwARRhIioEFE=; b=hcaTUVM/jKi7VZKWZFfp3hwbhPl92lq44JLJq3lwfKBBJcHxl25G/hHyloOuwC6/FQSazN cWvCSldfHfkB5DO3JMjyjMQOxL9a6looNTVVjcv09ATlj4tJFVcIJtmShhumK5xBE070Pq aBEOure7mYeXNLjEE8MHJXqvMY3AKPZwUhtsLNFIr+ewxyaHbQks+BYAMAxp40bajAycfH l19c4Rw5GDwnumlCNuqjrtMS6i2p1Xaysc379t4/KcmfFcKR3nRLurwTUykH4fQcb1312N ybox9cvEPX5tTxDcjmCYUzT5n6LVY55OkGz8+TODWcy3Y1sNv9hvj3BaLGNAGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704824273; a=rsa-sha256; cv=none; b=e0n7eA5CrGIo0U6xfJZGU+V0XZ4KbeULCXfDK4EYXSqyS+hi4OV3oLm8B6PWDuubMBkq7g +m8F1dVdoanMyJ79jBp4aN3h3xjm2MmXlsleO7L2HqByMZ8I6F61gamN9eyzElrqhstCuV UwChzHctN8nyNDxPUp8Zkh4WoMioya9rbymE3zOmU990mrLqH/cXGdmcAFHkJAmMDaUx1c 9LNe4P5kW/bOMojVhm4/BJL6/8bZ0hfjGJZJGVs/pavoFKMwzrpVDiY1F+HpuEeWR2aSoX mDwNFQ3qcNaTNjr2ybUAfNivR0G2AmxbNP6lcvNeTxy8XOiZ9OfSVvkKibS2XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8fL90g76z11tk; Tue, 9 Jan 2024 18:17: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 409IHqua015123; Tue, 9 Jan 2024 18:17:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409IHqik015121; Tue, 9 Jan 2024 18:17:52 GMT (envelope-from git) Date: Tue, 9 Jan 2024 18:17:52 GMT Message-Id: <202401091817.409IHqik015121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Gmelin Subject: git: 731704f5ea2f - main - bsdinstall: Fix installation script splitting List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 731704f5ea2f6f9d7e3c4b5ed2ad1a3cba703f42 Auto-Submitted: auto-generated The branch main has been updated by grembo: URL: https://cgit.FreeBSD.org/src/commit/?id=731704f5ea2f6f9d7e3c4b5ed2ad1a3cba703f42 commit 731704f5ea2f6f9d7e3c4b5ed2ad1a3cba703f42 Author: Michael Gmelin AuthorDate: 2024-01-06 16:55:31 +0000 Commit: Michael Gmelin CommitDate: 2024-01-09 18:14:17 +0000 bsdinstall: Fix installation script splitting This allows writing setup scripts that contain lines starting with "#!", e.g., a shebang when creating a shell script using cat: #!/bin/sh echo "Populate rc.local" cat >/etc/rc.local<pathb; else print}' \ + "$SCRIPT" $TMPDIR/bsdinstall-installscript-setup \ + >$TMPDIR/bsdinstall-installscript-preamble + + . $TMPDIR/bsdinstall-installscript-preamble fi test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR @@ -146,8 +151,9 @@ cp /etc/localtime $1/etc cp /var/db/zoneinfo $1/var/db # Run post-install script -if [ -f $TMPDIR/bsdinstall-installscript-ab ]; then - cp $TMPDIR/bsdinstall-installscript-ab $BSDINSTALL_CHROOT/tmp/installscript +if [ -f $TMPDIR/bsdinstall-installscript-setup ]; then + cp $TMPDIR/bsdinstall-installscript-setup \ + $BSDINSTALL_CHROOT/tmp/installscript chmod a+x $BSDINSTALL_CHROOT/tmp/installscript mount -t devfs devfs "$BSDINSTALL_CHROOT/dev" chroot $BSDINSTALL_CHROOT /tmp/installscript $@ 2>&1 diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script index ae1c6b3011fa..00ded5f8e24d 100755 --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -88,10 +88,15 @@ shift f_dprintf "Began Installation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC +rm -f $TMPDIR/bsdinstall-installscript-setup -split -a 2 -p '^#!.*' "$SCRIPT" $TMPDIR/bsdinstall-installscript- +# split script into preamble and setup script at first shebang +awk 'BEGIN {pathb=ARGV[2]; ARGV[2]=""} /^#!/{b=1} { + if (b) print >pathb; else print}' \ + "$SCRIPT" $TMPDIR/bsdinstall-installscript-setup \ + >$TMPDIR/bsdinstall-installscript-preamble -. $TMPDIR/bsdinstall-installscript-aa +. $TMPDIR/bsdinstall-installscript-preamble : ${DISTRIBUTIONS="kernel.txz base.txz"}; export DISTRIBUTIONS export BSDINSTALL_DISTDIR @@ -158,8 +163,9 @@ if [ ! -f $BSDINSTALL_CHROOT/etc/resolv.conf -a -f /etc/resolv.conf ]; then fi # Run post-install script -if [ -f $TMPDIR/bsdinstall-installscript-ab ]; then - cp $TMPDIR/bsdinstall-installscript-ab $BSDINSTALL_CHROOT/tmp/installscript +if [ -f $TMPDIR/bsdinstall-installscript-setup ]; then + cp $TMPDIR/bsdinstall-installscript-setup \ + $BSDINSTALL_CHROOT/tmp/installscript chmod a+x $BSDINSTALL_CHROOT/tmp/installscript chroot $BSDINSTALL_CHROOT /tmp/installscript $@ 2>&1 rm $BSDINSTALL_CHROOT/tmp/installscript From nobody Tue Jan 9 18:43: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 4T8fw16Snrz56Cr0; Tue, 9 Jan 2024 18:43:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8fw152mZz4ZFx; Tue, 9 Jan 2024 18:43:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704825825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yarCYYJdDDb0pAsYIBZCUrwMmqXJ3aLC53zh8Mkbd98=; b=wt4QCJWeRuFHMgDJy50CAwEED/ud+VYlVcacbAkbooH7xomIJnIBRIOd2l3cqRhQlbo/L0 uzTXpqq0v6bA13zR6H642M7YlGbTbZ67Yy27mwE5T5H63WAEK8UHXleWISAUrJ8iBZ381O ElY2cdPKtg3Ual92UD7dnvaOFNiG80umCRMZAFI5fcvd44hXgUtk4qD9uaLiLMkp+TmOgH BEDZAfVU51BmEM17CwhcSa+qNSY/XnxSG/TrFTtJNx4eTU6fd3i7vxhhd30PdKFBuDn9PI Df3lp1+pZn1G25kRuX66HbxE2fJ46QC1mgkHzehuXpqwZp9RKtQq14ps6O60hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704825825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yarCYYJdDDb0pAsYIBZCUrwMmqXJ3aLC53zh8Mkbd98=; b=Ri2LeIn55vPlUUNHac66yHTzu217J+168VF36mk9VvipCq1rkR1j+u6adzW0XzbCVXPVGO 1Oss/qpLkBVQoQfC3Ol7yW9YwV5TFfMhL8jqqFjJFL5lH316QI/4i3NhK1wP9YgkOQrIFU 6EM5AYwJYujAWa5Opz9CxCHKjTKLByD/8KfkaPXRWyqY5F3gZrTTmqdJvK6HYrqBnJzInl veNz2uctGSvVXjJmvC8NBzq03fsPQYziB+eO36esVrSj5lJqBrOG3dzlx6Wf45X9yphHRN Vi0gqaY1/O8dAeCXwQYPxFdgN4XVde8S8D9qyiZjnFPJYnfp5Q/iYksIh1Y+zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704825825; a=rsa-sha256; cv=none; b=kA9SaZJht7O3UEImIt8ISeNP44unJE28O6h5mp0kXVbXZl6bvzRvW55bGXY+RW76FU4BKn hCuaG9LhGIvDceU5ILetT1YDyTX395zW1uE4HulbQ2ymgzZ/qVM35Qp29iAM/RHiDxMafM v44DisT+3Pth6zrQ3PNfx6etyaHSHI5bXSIe4ODexC+Qmn6emHDP89kByh/ebbpX4OKdQ0 IvS6nhi5oA7MA0Cs3msJl/GALJZlRywXCbwtxA/Q9cicGnlvQB5LEaql8n9PCIEIDII6gG oeQgW81L+HZNxMQ3B+CM3J2g/2n93FZHOX06lAbSauN6xLBJqF9LxV59Z4I/2A== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4T8fw1203qzVDQ; Tue, 9 Jan 2024 18:43:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org> Date: Tue, 9 Jan 2024 12:43:44 -0600 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: c2356a440db9 - main - asa: Rewrite to fix line termination issue. Content-Language: en-US To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202401091627.409GRcI0028831@gitrepo.freebsd.org> <20240109180554.UYZwm9Yl@steffen%sdaoden.eu> From: Kyle Evans In-Reply-To: <20240109180554.UYZwm9Yl@steffen%sdaoden.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/9/24 12:05, Steffen Nurpmeso wrote: > Dag-Erling Smørgrav wrote in > <202401091627.409GRcI0028831@gitrepo.freebsd.org>: > |The branch main has been updated by des: > | > |URL: https://cgit.FreeBSD.org/src/commit/?id=c2356a440db91c106867d45c94b\ > |3d6d7bc0e50f0 > | > |commit c2356a440db91c106867d45c94b3d6d7bc0e50f0 > |Author: Dag-Erling Smørgrav > |AuthorDate: 2024-01-09 14:09:41 +0000 > |Commit: Dag-Erling Smørgrav > |CommitDate: 2024-01-09 16:27:15 +0000 > | > | asa: Rewrite to fix line termination issue. > | > | The standard is somewhat unclear, but on the balance, I believe \ > ... > | - Second, it unconditionally emits a newline at the end of the output > | for non-empty input, even if the input did not end with a newline. > ... > > I want to point out that POSIX only knows about text files which > end with a LF newline. Otherwise it is not a text file. (I think > Stallman and emacs joke on this by allowing something else, iirc > from before Y2K when i shortly used it, and, funnily, from some > thread on another ML just last week or so, where it was claimed > that this could have roots in emacse not rooting in UNIX.) > It notably defines a text file as zero or more lines, and doesn't say anything about incomplete lines -- just that none of the lines contain NUL characters. One can conclude without further information that a trailing LF is not at all required in any circumstance, it's just an incomplete line. From nobody Tue Jan 9 18:58: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 4T8gDs1V75z56FxQ; Tue, 9 Jan 2024 18:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8gDs10W9z4bpp; Tue, 9 Jan 2024 18:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ywSNpW5bRnt9NtlUVSegyRoL1DBvRJ0GFFWMCDIj/T8=; b=OTvSJuZhJliVrWiZ9rYOI/MgTlMy99H9e/Cemwx6IX/ISb3TWcAfVGWLJLwFiRVUKKiIfC RmZ0wQfYJUJHPyt0JKjI947ks3AVm6/cNw+NxL4IH4Ni6DfH+5ikaY0DH9BI8FMUA4zbwS b86xwZOMIsg5DCmZMt6FNXwIk3UXaT3r4B2kJgs5RVMpWtvLI6lLxGtp5DA0kW9XGqxQl4 eg1i5OZNlajpvr4HEfv8YvSMJTE/ig7Jg0JWbUEEjvB8VMa3o0kfo5k1ruVrciS6kWTf0P X0LLNwwJZyKwbEvKkak5vKe4slCtE+5iZFwpxaP5IU73Lty5SBic4RPhavEfig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ywSNpW5bRnt9NtlUVSegyRoL1DBvRJ0GFFWMCDIj/T8=; b=SxexQP8JY+fwDHyKgkXJI3dqNt7b+e1UF5onW6QEqVR4Ll5Nf3bqQ8ZWTQ5kPl+Y1nSM3L 8fAbOLlhr04Q604/N0c68P4qOUzaR9L+CtVfWU1/XJFL3CASTaNF0XiwgHNyzqktJ9VTXN TJ1HmskC113WxAFWxpVFWeFd9SmYRCcK54kov83ljzEkYK1U54wnWLWdnAtp3F7HKviseu b6DyP4bTY0/f6cQigblHo14P2RfhSoj26oK4nuOG/zYSfcH/TebydYhF75okXWXa3GEJWb XBzKoCB0Ry9zeOy0n+qQEYQfQHA+/Hx8H4Jle5owx2dTcSVji8D/Ocp+30TAzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826701; a=rsa-sha256; cv=none; b=ScqhbHj99gOpr5Epazwc3K3MvX7esiItTpgC03rkVv5dH1AvbcOjbi+rrDWrs7SGE8e8Ud m7ooTwkPmFotzR427zUG99Oi434f2vMosfMPGF7zniTakW86RiIqkwpF8byCU5Ejd3uHR/ tPVBZ13wGKB95Mdjh0/uQ2hUyFJgQ6MHYb/7GsKOceDYrY0wIGGvhEHxzcHeYQZ3kv/+UU gnZsaafMHZ2oRrEhkYzzc+X/YqY9QM+ekTUVU4/Gf1LlGmGbVHsL47/BshilLWO8clZapt l7n/1b4IvKtM07XO/SBA/Vn4CiKrsq0h6+Wk5hX8/3vXCUgofEpDbbTKsQ3P9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8gDs033Jz12hl; Tue, 9 Jan 2024 18:58: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 409IwK29081455; Tue, 9 Jan 2024 18:58:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409IwKlf081453; Tue, 9 Jan 2024 18:58:20 GMT (envelope-from git) Date: Tue, 9 Jan 2024 18:58:20 GMT Message-Id: <202401091858.409IwKlf081453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6631e2f9b49e - main - kldxref: Workaround incorrect PT_DYNAMIC in existing powerpc kernels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6631e2f9b49e08f53c7beb560ee8509c343b3927 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6631e2f9b49e08f53c7beb560ee8509c343b3927 commit 6631e2f9b49e08f53c7beb560ee8509c343b3927 Author: John Baldwin AuthorDate: 2024-01-09 18:57:48 +0000 Commit: John Baldwin CommitDate: 2024-01-09 18:57:48 +0000 kldxref: Workaround incorrect PT_DYNAMIC in existing powerpc kernels Existing powerpc kernels include additional sections beyond .dynamic in the PT_DYNAMIC segment. Relax the requirement for an exact size match of the section and segment for PowerPC files as a workaround. Reported by: jrtc27 Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43123 --- usr.sbin/kldxref/ef.c | 11 ++++++++++- usr.sbin/kldxref/ef.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/ef.c b/usr.sbin/kldxref/ef.c index fd0782ff1dd0..1ef27f2bc54a 100644 --- a/usr.sbin/kldxref/ef.c +++ b/usr.sbin/kldxref/ef.c @@ -248,8 +248,17 @@ ef_parse_dynamic(elf_file_t ef, const GElf_Phdr *phdyn) dynamic_idx = -1; for (i = 0; i < nshdr; i++) { if (shdr[i].sh_type == SHT_DYNAMIC) { + /* + * PowerPC kernels contain additional sections + * beyond .dynamic in PT_DYNAMIC due to a linker + * script bug. Permit a section with a smaller + * size as a workaround. + */ if (shdr[i].sh_offset != phdyn->p_offset || - shdr[i].sh_size != phdyn->p_filesz) { + ((elf_machine(ef->ef_efile) == EM_PPC || + elf_machine(ef->ef_efile) == EM_PPC64) ? + shdr[i].sh_size > phdyn->p_filesz : + shdr[i].sh_size != phdyn->p_filesz)) { warnx(".dynamic section doesn't match phdr"); error = EFTYPE; goto out; diff --git a/usr.sbin/kldxref/ef.h b/usr.sbin/kldxref/ef.h index 2909704bf2d1..25dc5216b169 100644 --- a/usr.sbin/kldxref/ef.h +++ b/usr.sbin/kldxref/ef.h @@ -100,6 +100,7 @@ struct elf_file { int ef_fd; }; +#define elf_machine(ef) ((ef)->ef_hdr.e_machine) #define elf_class(ef) ((ef)->ef_hdr.e_ident[EI_CLASS]) #define elf_encoding(ef) ((ef)->ef_hdr.e_ident[EI_DATA]) From nobody Tue Jan 9 19:02: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 4T8gL36xv9z56Gvx; Tue, 9 Jan 2024 19:02: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 4T8gL36P3yz4cP1; Tue, 9 Jan 2024 19:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXkxKF84jE31J3t/1bjdfwLM3UY3eF+ScoVOz+JAKDU=; b=lG2yJMBT7laSrXUqT9y7Nwzuq9nNB40hiYOyUAkBO3PmHP3A7/mcDqm11XveCq8sMtm1Bn hc+ukxP1pMr6iu8pjbiL+AY4a/SQWu2RPr3cxYZVbHp96OkbE9UqxpL6Jkb+6MO70KSECs /hn/AUW4XbjIQmSXb+ftrXyn6ji+3/RKlQl+Vg/ioPfv6j2qw7TQhEesRWcRfZp+6Ah9dm amS7Fvyhm+a4ugf0aOggDQ0JJNIQG84uJw5jOU1V1dV39zVIkD/P4HOSxNhLt4cdhPXCg+ 1urP6r69zmrFsuV70uYhX6az+ySDM5+CyZDtkD1oc6Z4HuI14pAqPqAwTIwF+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXkxKF84jE31J3t/1bjdfwLM3UY3eF+ScoVOz+JAKDU=; b=VPMtaTh8liNZFpZC4bamxGtGNyulblHZXYk2H6+FNf6mdWkHKWdu638paDDrjTJ2zfi93N 3BeGh+w+pw1efWdBF5dkGCrw7Okyhddy0LxNom/L/sWt6NVtf+TFgjJu1mb/gh1n4BMCnz 14XN00sPqW1aMTKxrCwMqGJpgDCYSlqcEDcyrGQDw3CX1GA63Uj56beOIIv/T4lx45vEAY oT7Udz/e8Wp+0texafhlf1OJAyl8goBoLmrvYzCQR7bPbDgikMUWNYyxiue+z7Dvbkh9Du 6pTB9HCkKI4GwqdbodSQn0G6gYWGtsLCen+k6znfHJV/hVzsyKY79cJmZq69XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826971; a=rsa-sha256; cv=none; b=imZbR8bvW/QlIYjCFpcj25ResMBYjxKfKW3bcfmhKQ74EDSt3+6glEd7BMF6XzhmXzcbqE mCfyNcKy7iVPWetZc9d9IgSMeS8Gh6JBB0zhqspjI9+HqiaNNNyhngK2mIYe3Bke+Ww4K3 jhxK6KDqJRr1vL381AZw1wiM1YIMFvqWgrB1EafqUK7Yf4I60rRdFFp7/rFB3PHEO5wmyo KnZM5XbU93rX58/kDZQuwuhKoB/5SPWD/mc4kjW2Q4ltD263j//B+6srTdewsyBoc79XkN cT9DPRPwM6c4xHnRFZ0rJMD7PCa9FtvBGcKSAlNa6SAnO9hVMkS9d9K0U9VkzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8gL35S2wz136n; Tue, 9 Jan 2024 19:02: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 409J2phd098614; Tue, 9 Jan 2024 19:02:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J2pkj098611; Tue, 9 Jan 2024 19:02:51 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:02:51 GMT Message-Id: <202401091902.409J2pkj098611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6977311633c7 - main - net80211 amdpu: Simplify a few loops that drain an mbufq List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6977311633c73f594ff3dae150d6d1fe06105a8f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6977311633c73f594ff3dae150d6d1fe06105a8f commit 6977311633c73f594ff3dae150d6d1fe06105a8f Author: John Baldwin AuthorDate: 2024-01-09 18:59:48 +0000 Commit: John Baldwin CommitDate: 2024-01-09 18:59:48 +0000 net80211 amdpu: Simplify a few loops that drain an mbufq These loops already handled a NULL return from mbufq_dequeue when the queue was empty, so remove a redundant check of mbufq_len before dequeueing. Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43336 --- sys/net80211/ieee80211_ht.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index ea59bb622dd8..5297b741d9b9 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -517,7 +517,7 @@ ampdu_rx_purge_slot(struct ieee80211_rx_ampdu *rap, int i) struct mbuf *m; /* Walk the queue, removing frames as appropriate */ - while (mbufq_len(&rap->rxa_mq[i]) != 0) { + for (;;) { m = mbufq_dequeue(&rap->rxa_mq[i]); if (m == NULL) break; @@ -812,7 +812,7 @@ ampdu_dispatch_slot(struct ieee80211_rx_ampdu *rap, struct ieee80211_node *ni, struct mbuf *m; int n = 0; - while (mbufq_len(&rap->rxa_mq[i]) != 0) { + for (;;) { m = mbufq_dequeue(&rap->rxa_mq[i]); if (m == NULL) break; From nobody Tue Jan 9 19:02: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 4T8gL50kqxz56GdG; Tue, 9 Jan 2024 19:02: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 4T8gL473skz4ckn; Tue, 9 Jan 2024 19:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDP5Dgy1R37w2f2HXF9SDv8Y5QuttzXjWOyUte0tyvA=; b=pqNox7y1+Jdm7o7r9CpdzwDMgb2CvbTL/r5eJC9VNwvV7VHxhwemKYbb+N9hCu2Z2jhFG8 G3SCnQe4BhASLQ5UgCTYsLS3WoTAEVcaXXeUPF0IOA5vzVbQpcBJGN1pqc5sw7wyik+o+7 oksNkSIjbmXI/AMvFJIYzBHwdNmoF6o4olrW/kglblm2QpcGzGPPWnESBAIV6v7ETuutT4 oKTk4Kh/XwUjEhwpzl2F/pHYAApPwcBF+jX8MRkufaU8ZyVxaPtVFQ/vLUezA5MYRNnmH3 d29u4qehziNEgnsE5G3dFJDnq20wVoIkNZw6E2dvv8IuINRM9eWCuV9aNxRXWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDP5Dgy1R37w2f2HXF9SDv8Y5QuttzXjWOyUte0tyvA=; b=VOGRYUgzu+G0eh9J99rgnTLx+EfCavuPi9IGFWPdKKjz5GBODQsXJHD/k+kaJ6jeKDmzmt Kcrbyqw+FS96zy5Ld0GEpWGFZtTEeAcs8ijVSJRrBbKFhXmd2vojUOzK99qqc/h2H0sDdd sIDDZxRbog4XxbCLONT7SN6raqgehG9forhg6PD8MQ8ePSGhJ/QguNqe4ue5GEAjm0bldp mWHKDYlpTuHJt0OoN0/WwRrE/mfI4+pGB2dSCRXWB+nQoDvmiQ10cKN74KsSQR5aPlzUEf gntaNOC2iRtTYZSrFk3p6T77iCuOmj0cixPuAAfVn0lMvrcU1SjLFA2JcGbmIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826973; a=rsa-sha256; cv=none; b=p0h59+ofeYugAwRCk6qhYN+vjmXXRsLICFte7M3RNuO3G6vOTMsuIAqwcLdJclfXr6GFJU 69Al8FLtEWmrAOPyKqgfVfCbRrwzxOPgzocI+vGEksIzonPdsOVgTiuGK8hLuzmRQ7FI+O RqtMCuCIMGmqtZSAxEJJygsYOfNl//oMbmOGidiVENnnFg2WbrErot6vdojipx3PX1l8Wk 1iiJXFGERNt8g5zt8rs0h4TXdctEDG/7QzWLFSmQZWiHx6g0MXfxSwh9uM8wwbjkU8rKAi Vwuw92hMyU0B6w4/LucfTQnMZMfnsSWYcnvPkSZGYw45hZbxfSqFtxvRbQj0KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8gL466X8z134k; Tue, 9 Jan 2024 19:02: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 409J2qNS098650; Tue, 9 Jan 2024 19:02:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J2qJw098647; Tue, 9 Jan 2024 19:02:52 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:02:52 GMT Message-Id: <202401091902.409J2qJw098647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 76f405ed6354 - main - mbuf: Add mbufq_empty List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76f405ed63540aa2d989c231f70277062e76ccfb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=76f405ed63540aa2d989c231f70277062e76ccfb commit 76f405ed63540aa2d989c231f70277062e76ccfb Author: John Baldwin AuthorDate: 2024-01-09 19:00:19 +0000 Commit: John Baldwin CommitDate: 2024-01-09 19:00:19 +0000 mbuf: Add mbufq_empty Complement to the existing mbufq_full Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43337 --- sys/sys/mbuf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index bb15557b5b6c..b84898fc268e 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1607,6 +1607,12 @@ mbufq_last(const struct mbufq *mq) return (STAILQ_LAST(&mq->mq_head, mbuf, m_stailqpkt)); } +static inline bool +mbufq_empty(const struct mbufq *mq) +{ + return (mq->mq_len == 0); +} + static inline int mbufq_full(const struct mbufq *mq) { From nobody Tue Jan 9 19:02: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 4T8gL649F2z56GXc; Tue, 9 Jan 2024 19:02: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 4T8gL61QMfz4cl1; Tue, 9 Jan 2024 19:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826974; h=from:from:reply-to:subject:subject: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/BIjG+Gsmpkfpmh+r59IadWo510p0jaVFq3NRsCjmY=; b=nio2bXr2jffzuLw4W84prCloV5XpTgZZDIkQb8m6JsKpNxPPZV61TLZvRsqg7IwtSy/Vt+ pj1+pPWC0CmPowG+Dojw8I1j10MrvEBAFeHswNiz8hM8PLLBSePqJjrvjT03EU24Ingq2n toBK9aLkzBblgSrVmGuWVxp7Aji6N/ROvB6bnRA5AbMLhRZN+/g6ZCSpnutNojN/mPJP4o bVMPL4xd3ypB4gvI62yaX7b86SrkHSDi01yN5xP4AYlgrrHtxiDX/TP4mS2qkXQyDhKQ2w +obckwxB7D3XmxpKuQiNXbKW4I/7fBIKYais/2HX7rnDikh+d3EqISmHcEjCrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826974; h=from:from:reply-to:subject:subject: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/BIjG+Gsmpkfpmh+r59IadWo510p0jaVFq3NRsCjmY=; b=b/QeO1piJTugGf8Bu3KsCyLam4aXB/4BfRSxdxOPOOinzpy6rdGS9EU534UGAmq3LB0/dM rYQQAYmqnU6LWIfpXcXk2vZKbXysekcOyGp0PpmBe5so8FkZz9cQLrKB6/SRA2CURqpnfl xyuDoeJb5NZ8VqTD+naTAX2lBiichrTrlUGfR4GE74C3UafMDDjcGCKxNl6wzOUyv6VT0+ rlqv9ybBOw/VtOi4i/H2k0dURBFkYCaKzCcPE9DoxFHST5Wln4IksNqKpvVWjOFY5BCDTc NvZAO4juyMorN1cShV4tSH0ql3XbiPra2Jy/Z/h8+QCMFB0XJeddUIm7Fv4cZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826974; a=rsa-sha256; cv=none; b=OMRq5Dh9dVdqVLUz+3aEs1z0q7aUclS7NIMgz90nGCrfr/KfHS6waf5YSn15/+NOgqbg+K l0dJLUTM446iMTuqR6OiysSjzpnTtfcWsT60Ct4IOzX+Q//yFZ3+XGq4q4Omm3gP2SekPc cioLSbw53eDJJYeenXEyIju+CorrvLT30V8573J4clI3eFp+HCjeV9vwHpbSKE3i0ejk3k rOOhlNavCWyoxpP02kLclAvzIoe95CarpdNQA2VvI4rsOtw/+YwC+Fk+UjAvtzc5nM8aEX 58Pipw1eNdWF4qACC0o3qMgVy+mN/M0ZIfm0OQWUmMLkR9gCV0zG2lBhIxH99A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8gL60TZkz12Sk; Tue, 9 Jan 2024 19:02: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 409J2r8i098706; Tue, 9 Jan 2024 19:02:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J2rNO098703; Tue, 9 Jan 2024 19:02:53 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:02:53 GMT Message-Id: <202401091902.409J2rNO098703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8cb9b68f5821 - main - sys: Use mbufq_empty instead of comparing mbufq_len against 0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cb9b68f5821e45c63ee08d8ee3029ca523ac174 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8cb9b68f5821e45c63ee08d8ee3029ca523ac174 commit 8cb9b68f5821e45c63ee08d8ee3029ca523ac174 Author: John Baldwin AuthorDate: 2024-01-09 19:00:46 +0000 Commit: John Baldwin CommitDate: 2024-01-09 19:00:46 +0000 sys: Use mbufq_empty instead of comparing mbufq_len against 0 Reviewed by: bz, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43338 --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 +- sys/dev/cxgb/cxgb_sge.c | 4 ++-- sys/dev/cxgbe/tom/t4_tom.c | 4 ++-- sys/net/if_epair.c | 2 +- sys/net80211/ieee80211_ddb.c | 2 +- sys/net80211/ieee80211_ht.c | 6 +++--- sys/netinet/igmp.c | 2 +- sys/netinet6/mld6.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index aa90100a328c..edd2423c59b5 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3346,7 +3346,7 @@ lkpi_ic_node_free(struct ieee80211_node *ni) /* Flush mbufq (make sure to release ni refs!). */ #ifdef __notyet__ - KASSERT(mbufq_len(&lsta->txq) == 0, ("%s: lsta %p has txq len %d != 0\n", + KASSERT(mbufq_empty(&lsta->txq), ("%s: lsta %p has txq len %d != 0\n", __func__, lsta, mbufq_len(&lsta->txq))); #endif /* Drain taskq. */ diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index ca5ff3f1d417..f57494065aec 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -1838,7 +1838,7 @@ check_desc_avail(adapter_t *adap, struct sge_txq *q, * the control queue is only used for binding qsets which happens * at init time so we are guaranteed enough descriptors */ - if (__predict_false(mbufq_len(&q->sendq))) { + if (__predict_false(!mbufq_empty(&q->sendq))) { addq_exit: (void )mbufq_enqueue(&q->sendq, m); return 1; } @@ -1954,7 +1954,7 @@ again: reclaim_completed_tx_imm(q); } q->in_use++; } - if (mbufq_len(&q->sendq)) { + if (!mbufq_empty(&q->sendq)) { setbit(&qs->txq_stopped, TXQ_CTRL); if (should_restart_tx(q) && diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index e5b173964451..77b6ba5d4032 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -323,8 +323,8 @@ release_offload_resources(struct toepcb *toep) * that a normal connection's socket's so_snd would have been purged or * drained. Do _not_ clean up here. */ - MPASS(mbufq_len(&toep->ulp_pduq) == 0); - MPASS(mbufq_len(&toep->ulp_pdu_reclaimq) == 0); + MPASS(mbufq_empty(&toep->ulp_pduq)); + MPASS(mbufq_empty(&toep->ulp_pdu_reclaimq)); #ifdef INVARIANTS if (ulp_mode(toep) == ULP_MODE_TCPDDP) ddp_assert_empty(toep); diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 2fa016c8f35c..7bc218321f01 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -177,7 +177,7 @@ epair_tx_start_deferred(void *arg, int pending) * end up starving ourselves in a multi-epair routing configuration. */ mtx_lock(&q->mtx); - if (mbufq_len(&q->q) > 0) { + if (!mbufq_empty(&q->q)) { resched = true; q->state = EPAIR_QUEUE_WAKING; } else { diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index cd4a4f191745..0042d5d4aeb6 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -222,7 +222,7 @@ _db_show_rxampdu(const char *sep, int ix, const struct ieee80211_rx_ampdu *rap) db_printf("%s age %d nframes %d\n", sep, rap->rxa_age, rap->rxa_nframes); for (i = 0; i < IEEE80211_AGGR_BAWMAX; i++) - if (mbufq_len(&rap->rxa_mq[i]) > 0) { + if (!mbufq_empty(&rap->rxa_mq[i])) { db_printf("%s m[%2u:%4u] ", sep, i, IEEE80211_SEQ_ADD(rap->rxa_start, i)); STAILQ_FOREACH(m, &rap->rxa_mq[i].mq_head, diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 5297b741d9b9..c747d29735a6 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -567,7 +567,7 @@ ampdu_rx_add_slot(struct ieee80211_rx_ampdu *rap, int off, int tid, /* * Get the rxs of the final mbuf in the slot, if one exists. */ - if (mbufq_len(&rap->rxa_mq[off]) != 0) { + if (!mbufq_empty(&rap->rxa_mq[off])) { rxs_final = ieee80211_get_rx_params_ptr(mbufq_last(&rap->rxa_mq[off])); } @@ -597,7 +597,7 @@ ampdu_rx_add_slot(struct ieee80211_rx_ampdu *rap, int off, int tid, * If the list is empty OR we have determined we can put more * driver decap'ed AMSDU frames in here, then insert. */ - if ((mbufq_len(&rap->rxa_mq[off]) == 0) || (toss_dup == 0)) { + if (mbufq_empty(&rap->rxa_mq[off]) || (toss_dup == 0)) { if (mbufq_enqueue(&rap->rxa_mq[off], m) != 0) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT | IEEE80211_MSG_11N, ni->ni_macaddr, @@ -1075,7 +1075,7 @@ again: /* * Dispatch as many packets as we can. */ - KASSERT((mbufq_len(&rap->rxa_mq[0]) == 0), ("unexpected dup")); + KASSERT(mbufq_empty(&rap->rxa_mq[0]), ("unexpected dup")); ampdu_dispatch(ni, m); ampdu_rx_dispatch(rap, ni); return CONSUMED; diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 74cf7a557d9a..1655963e6cff 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -3383,7 +3383,7 @@ igmp_v3_dispatch_general_query(struct igmp_ifsoftc *igi) * many packets, we should finish sending them before starting of * queuing the new reply. */ - if (mbufq_len(&igi->igi_gq) != 0) + if (!mbufq_empty(&igi->igi_gq)) goto send; ifp = igi->igi_ifp; diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index 3c07d6fa1d6b..5dd192a69fa9 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -2993,7 +2993,7 @@ mld_v2_dispatch_general_query(struct mld_ifsoftc *mli) * many packets, we should finish sending them before starting of * queuing the new reply. */ - if (mbufq_len(&mli->mli_gq) != 0) + if (!mbufq_empty(&mli->mli_gq)) goto send; ifp = mli->mli_ifp; From nobody Tue Jan 9 19:09: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 4T8gV65fJGz56HXl; Tue, 9 Jan 2024 19:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8gV65QNRz4dyh; Tue, 9 Jan 2024 19:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704827390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dl5Oyb/x/Iq6jgC6nu6GLPu/+Io+zGEi7awy8CW0Hw=; b=aDlkYbaQYKiP0CAN0B1GbtaNq28MWhm781Qi0KE0t7TodJlW+CWqPvxad/UCZOgi6rNG3R rSsnTFoMy2FAL/562UN4zj0fqn5HyA5SYlt9z2JyQldjVj0CYDirjZBYWAvVUi2JTbgPLj FSyF+0sgwJ6DgiCmYwkWfVtVLoPAdVEpFFhlhUUZ1FwOqC1xqWFQXD/4y9Mn7oQ+QgNNuH J+o+yI81L5se1koZcVMztKPwCLPDcvUCRMVzBHQWYLgfgrZtdDrfEsMfrLU74s+6cZgNwB TAm4MVb4QZldJUmAgxk6KIgZD1xUD45TnoylETsWBXd8BQTzA+WgJ5vF+GHdgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704827390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dl5Oyb/x/Iq6jgC6nu6GLPu/+Io+zGEi7awy8CW0Hw=; b=KQwnUlGMZaiJ/tSGJlA3ajpYGm6CQRMinGmDsEINJ6kFxLRZWigZfpCFNBut1PTo7l3sUG 3q9wYi1JQqefueF5Zkdadtu/nuaveTWHE+W9PQSdtvhNL3Jxt5fka1Cv2pg2qoxO7FOPvl KX2DodldaTSo6s2mA9/tEhaPbRpoFvXVbAx3XwtdEWZXjVxdsY/cHR1l22bu8ha75ozYuw bEpJ9TRde9j8fuYkn+c8+gsOYUJMdOkjkUYSsOyrqPXqZkiYeg4aYhted7DaDEubwOfE+N MrKh5BVWwXDnU/gb2ioUmf0IaDa+lVAckwESfNNijheMkvOkag6rmKTns0nK3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704827390; a=rsa-sha256; cv=none; b=TgeyWU+5ldY5QUjivkvujTSqSr9eZQsJ26nsgP/OiQ14rfjA9KZRcRNBFkNjTtwIVXRPxx qBm4u25cUu5107itaRMWmOsrAQ23wTlKnUDnlE6qkrsRrgRIXrvYysbxjfU/mF6QXi6jKr 53zmxSkQJgaRxV6t/pYPPYV2/83u91bI5LvNgWnsHVVhU7AvxEHFs6up7os4FaIe957OCe 76H4szWTj2vQWrHOBqKcCdKwdudIX99rsPWOM0qQ06iHSzBczQZlKoVx1JV8Oa+iPYkptA DlWJRlAiFYqamPILZdYoa1zrbb+Jm121wyjEq86uP/UJw38SIKTrZrgrauUadg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8gV64TBNz12Sv; Tue, 9 Jan 2024 19:09: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 409J9oGm099746; Tue, 9 Jan 2024 19:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J9orQ099743; Tue, 9 Jan 2024 19:09:50 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:09:50 GMT Message-Id: <202401091909.409J9orQ099743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a9b615120628 - main - memdesc: Helper function to construct mbuf chain backed by memdesc buffer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9b615120628411cc20af730edb291c52be02f66 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a9b615120628411cc20af730edb291c52be02f66 commit a9b615120628411cc20af730edb291c52be02f66 Author: John Baldwin AuthorDate: 2024-01-09 19:05:03 +0000 Commit: John Baldwin CommitDate: 2024-01-09 19:09:43 +0000 memdesc: Helper function to construct mbuf chain backed by memdesc buffer memdesc_alloc_ext_mbufs constructs a chain of external (M_EXT or M_EXTPG) mbufs backed by a data buffer described by a memory descriptor. Since memory descriptors are not an actual buffer just a description of a buffer, the caller is required to supply a couple of helper routines to manage allocation of the raw mbufs and associating them with a reference to the underlying buffer. Reviewed by: markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42933 --- sys/kern/subr_memdesc.c | 474 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/memdesc.h | 36 ++++ 2 files changed, 510 insertions(+) diff --git a/sys/kern/subr_memdesc.c b/sys/kern/subr_memdesc.c index 9ba9d7fe031b..ff8aad7731cd 100644 --- a/sys/kern/subr_memdesc.c +++ b/sys/kern/subr_memdesc.c @@ -33,9 +33,14 @@ #include #include #include +#include #include #include +/* + * memdesc_copyback copies data from a source buffer into a buffer + * described by a memory descriptor. + */ static void phys_copyback(vm_paddr_t pa, int off, int size, const void *src) { @@ -180,6 +185,10 @@ memdesc_copyback(struct memdesc *mem, int off, int size, const void *src) } } +/* + * memdesc_copydata copies data from a buffer described by a memory + * descriptor into a destination buffer. + */ static void phys_copydata(vm_paddr_t pa, int off, int size, void *dst) { @@ -323,3 +332,468 @@ memdesc_copydata(struct memdesc *mem, int off, int size, void *dst) __assert_unreachable(); } } + +/* + * memdesc_alloc_ext_mbufs allocates a chain of external mbufs backed + * by the storage of a memory descriptor's data buffer. + */ +static struct mbuf * +vaddr_ext_mbuf(memdesc_alloc_ext_mbuf_t *ext_alloc, void *cb_arg, int how, + void *buf, size_t len, size_t *actual_len) +{ + *actual_len = len; + return (ext_alloc(cb_arg, how, buf, len)); +} + +static bool +can_append_paddr(struct mbuf *m, vm_paddr_t pa) +{ + u_int last_len; + + /* Can always append to an empty mbuf. */ + if (m->m_epg_npgs == 0) + return (true); + + /* Can't append to a full mbuf. */ + if (m->m_epg_npgs == MBUF_PEXT_MAX_PGS) + return (false); + + /* Can't append a non-page-aligned address to a non-empty mbuf. */ + if ((pa & PAGE_MASK) != 0) + return (false); + + /* Can't append if the last page is not a full page. */ + last_len = m->m_epg_last_len; + if (m->m_epg_npgs == 1) + last_len += m->m_epg_1st_off; + return (last_len == PAGE_SIZE); +} + +/* + * Returns amount of data added to an M_EXTPG mbuf. + */ +static size_t +append_paddr_range(struct mbuf *m, vm_paddr_t pa, size_t len) +{ + size_t appended; + + appended = 0; + + /* Append the first page. */ + if (m->m_epg_npgs == 0) { + m->m_epg_pa[0] = trunc_page(pa); + m->m_epg_npgs = 1; + m->m_epg_1st_off = pa & PAGE_MASK; + m->m_epg_last_len = PAGE_SIZE - m->m_epg_1st_off; + if (m->m_epg_last_len > len) + m->m_epg_last_len = len; + m->m_len = m->m_epg_last_len; + len -= m->m_epg_last_len; + pa += m->m_epg_last_len; + appended += m->m_epg_last_len; + } + KASSERT(len == 0 || (pa & PAGE_MASK) == 0, + ("PA not aligned before full pages")); + + /* Full pages. */ + while (len >= PAGE_SIZE && m->m_epg_npgs < MBUF_PEXT_MAX_PGS) { + m->m_epg_pa[m->m_epg_npgs] = pa; + m->m_epg_npgs++; + m->m_epg_last_len = PAGE_SIZE; + m->m_len += PAGE_SIZE; + pa += PAGE_SIZE; + len -= PAGE_SIZE; + appended += PAGE_SIZE; + } + + /* Final partial page. */ + if (len > 0 && m->m_epg_npgs < MBUF_PEXT_MAX_PGS) { + KASSERT(len < PAGE_SIZE, ("final page is full page")); + m->m_epg_pa[m->m_epg_npgs] = pa; + m->m_epg_npgs++; + m->m_epg_last_len = len; + m->m_len += len; + appended += len; + } + + return (appended); +} + +static struct mbuf * +paddr_ext_mbuf(memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + vm_paddr_t pa, size_t len, size_t *actual_len, bool can_truncate) +{ + struct mbuf *m, *tail; + size_t appended; + + if (can_truncate) { + vm_paddr_t end; + + /* + * Trim any partial page at the end, but not if it's + * the only page. + */ + end = trunc_page(pa + len); + if (end > pa) + len = end - pa; + } + *actual_len = len; + + m = tail = extpg_alloc(cb_arg, how); + if (m == NULL) + return (NULL); + while (len > 0) { + if (!can_append_paddr(tail, pa)) { + MBUF_EXT_PGS_ASSERT_SANITY(tail); + tail->m_next = extpg_alloc(cb_arg, how); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + } + + appended = append_paddr_range(tail, pa, len); + KASSERT(appended > 0, ("did not append anything")); + KASSERT(appended <= len, ("appended too much")); + + pa += appended; + len -= appended; + } + + MBUF_EXT_PGS_ASSERT_SANITY(tail); + return (m); +error: + m_freem(m); + return (NULL); +} + +static struct mbuf * +vlist_ext_mbuf(memdesc_alloc_ext_mbuf_t *ext_alloc, void *cb_arg, int how, + struct bus_dma_segment *vlist, u_int sglist_cnt, size_t offset, + size_t len, size_t *actual_len) +{ + struct mbuf *m, *n, *tail; + size_t todo; + + *actual_len = len; + + while (vlist->ds_len <= offset) { + KASSERT(sglist_cnt > 1, ("out of sglist entries")); + + offset -= vlist->ds_len; + vlist++; + sglist_cnt--; + } + + m = tail = NULL; + while (len > 0) { + KASSERT(sglist_cnt >= 1, ("out of sglist entries")); + + todo = len; + if (todo > vlist->ds_len - offset) + todo = vlist->ds_len - offset; + + n = ext_alloc(cb_arg, how, (char *)(uintptr_t)vlist->ds_addr + + offset, todo); + if (n == NULL) + goto error; + + if (m == NULL) { + m = n; + tail = m; + } else { + tail->m_next = n; + tail = n; + } + + offset = 0; + vlist++; + sglist_cnt--; + len -= todo; + } + + return (m); +error: + m_freem(m); + return (NULL); +} + +static struct mbuf * +plist_ext_mbuf(memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + struct bus_dma_segment *plist, u_int sglist_cnt, size_t offset, size_t len, + size_t *actual_len, bool can_truncate) +{ + vm_paddr_t pa; + struct mbuf *m, *tail; + size_t appended, totlen, todo; + + while (plist->ds_len <= offset) { + KASSERT(sglist_cnt > 1, ("out of sglist entries")); + + offset -= plist->ds_len; + plist++; + sglist_cnt--; + } + + totlen = 0; + m = tail = extpg_alloc(cb_arg, how); + if (m == NULL) + return (NULL); + while (len > 0) { + KASSERT(sglist_cnt >= 1, ("out of sglist entries")); + + pa = plist->ds_addr + offset; + todo = len; + if (todo > plist->ds_len - offset) + todo = plist->ds_len - offset; + + /* + * If truncation is enabled, avoid sending a final + * partial page, but only if there is more data + * available in the current segment. Also, at least + * some data must be sent, so only drop the final page + * for this segment if the segment spans multiple + * pages or some other data is already queued. + */ + else if (can_truncate) { + vm_paddr_t end; + + end = trunc_page(pa + len); + if (end <= pa && totlen != 0) { + /* + * This last segment is only a partial + * page. + */ + len = 0; + break; + } + todo = end - pa; + } + + offset = 0; + len -= todo; + totlen += todo; + + while (todo > 0) { + if (!can_append_paddr(tail, pa)) { + MBUF_EXT_PGS_ASSERT_SANITY(tail); + tail->m_next = extpg_alloc(cb_arg, how); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + } + + appended = append_paddr_range(tail, pa, todo); + KASSERT(appended > 0, ("did not append anything")); + + pa += appended; + todo -= appended; + } + } + + MBUF_EXT_PGS_ASSERT_SANITY(tail); + *actual_len = totlen; + return (m); +error: + m_freem(m); + return (NULL); +} + +static struct mbuf * +vmpages_ext_mbuf(memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + vm_page_t *ma, size_t offset, size_t len, size_t *actual_len, + bool can_truncate) +{ + struct mbuf *m, *tail; + + while (offset >= PAGE_SIZE) { + ma++; + offset -= PAGE_SIZE; + } + + if (can_truncate) { + size_t end; + + /* + * Trim any partial page at the end, but not if it's + * the only page. + */ + end = trunc_page(offset + len); + if (end > offset) + len = end - offset; + } + *actual_len = len; + + m = tail = extpg_alloc(cb_arg, how); + if (m == NULL) + return (NULL); + + /* First page. */ + m->m_epg_pa[0] = VM_PAGE_TO_PHYS(*ma); + ma++; + m->m_epg_npgs = 1; + m->m_epg_1st_off = offset; + m->m_epg_last_len = PAGE_SIZE - offset; + if (m->m_epg_last_len > len) + m->m_epg_last_len = len; + m->m_len = m->m_epg_last_len; + len -= m->m_epg_last_len; + + /* Full pages. */ + while (len >= PAGE_SIZE) { + if (tail->m_epg_npgs == MBUF_PEXT_MAX_PGS) { + MBUF_EXT_PGS_ASSERT_SANITY(tail); + tail->m_next = extpg_alloc(cb_arg, how); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + } + + tail->m_epg_pa[tail->m_epg_npgs] = VM_PAGE_TO_PHYS(*ma); + ma++; + tail->m_epg_npgs++; + tail->m_epg_last_len = PAGE_SIZE; + tail->m_len += PAGE_SIZE; + len -= PAGE_SIZE; + } + + /* Last partial page. */ + if (len > 0) { + if (tail->m_epg_npgs == MBUF_PEXT_MAX_PGS) { + MBUF_EXT_PGS_ASSERT_SANITY(tail); + tail->m_next = extpg_alloc(cb_arg, how); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + } + + tail->m_epg_pa[tail->m_epg_npgs] = VM_PAGE_TO_PHYS(*ma); + ma++; + tail->m_epg_npgs++; + tail->m_epg_last_len = len; + tail->m_len += len; + } + + MBUF_EXT_PGS_ASSERT_SANITY(tail); + return (m); +error: + m_freem(m); + return (NULL); +} + +/* + * Somewhat similar to m_copym but optionally avoids a partial mbuf at + * the end. + */ +static struct mbuf * +mbuf_subchain(struct mbuf *m0, size_t offset, size_t len, + size_t *actual_len, bool can_truncate, int how) +{ + struct mbuf *m, *tail; + size_t totlen; + + while (offset >= m0->m_len) { + offset -= m0->m_len; + m0 = m0->m_next; + } + + /* Always return at least one mbuf. */ + totlen = m0->m_len - offset; + if (totlen > len) + totlen = len; + + m = m_get(how, MT_DATA); + if (m == NULL) + return (NULL); + m->m_len = totlen; + if (m0->m_flags & (M_EXT | M_EXTPG)) { + m->m_data = m0->m_data + offset; + mb_dupcl(m, m0); + } else + memcpy(mtod(m, void *), mtodo(m0, offset), m->m_len); + + tail = m; + m0 = m0->m_next; + len -= totlen; + while (len > 0) { + /* + * If truncation is enabled, don't send any partial + * mbufs besides the first one. + */ + if (can_truncate && m0->m_len > len) + break; + + tail->m_next = m_get(how, MT_DATA); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + tail->m_len = m0->m_len; + if (m0->m_flags & (M_EXT | M_EXTPG)) { + tail->m_data = m0->m_data; + mb_dupcl(tail, m0); + } else + memcpy(mtod(tail, void *), mtod(m0, void *), + tail->m_len); + + totlen += tail->m_len; + m0 = m0->m_next; + len -= tail->m_len; + } + *actual_len = totlen; + return (m); +error: + m_freem(m); + return (NULL); +} + +struct mbuf * +memdesc_alloc_ext_mbufs(struct memdesc *mem, + memdesc_alloc_ext_mbuf_t *ext_alloc, + memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + size_t offset, size_t len, size_t *actual_len, bool can_truncate) +{ + struct mbuf *m; + size_t done; + + switch (mem->md_type) { + case MEMDESC_VADDR: + m = vaddr_ext_mbuf(ext_alloc, cb_arg, how, + (char *)mem->u.md_vaddr + offset, len, &done); + break; + case MEMDESC_PADDR: + m = paddr_ext_mbuf(extpg_alloc, cb_arg, how, mem->u.md_paddr + + offset, len, &done, can_truncate); + break; + case MEMDESC_VLIST: + m = vlist_ext_mbuf(ext_alloc, cb_arg, how, mem->u.md_list, + mem->md_nseg, offset, len, &done); + break; + case MEMDESC_PLIST: + m = plist_ext_mbuf(extpg_alloc, cb_arg, how, mem->u.md_list, + mem->md_nseg, offset, len, &done, can_truncate); + break; + case MEMDESC_UIO: + panic("uio not supported"); + case MEMDESC_MBUF: + m = mbuf_subchain(mem->u.md_mbuf, offset, len, &done, + can_truncate, how); + break; + case MEMDESC_VMPAGES: + m = vmpages_ext_mbuf(extpg_alloc, cb_arg, how, mem->u.md_ma, + mem->md_offset + offset, len, &done, can_truncate); + break; + default: + __assert_unreachable(); + } + if (m == NULL) + return (NULL); + + if (can_truncate) { + KASSERT(done <= len, ("chain too long")); + } else { + KASSERT(done == len, ("short chain with no limit")); + } + KASSERT(m_length(m, NULL) == done, ("length mismatch")); + if (actual_len != NULL) + *actual_len = done; + return (m); +} diff --git a/sys/sys/memdesc.h b/sys/sys/memdesc.h index 24a2c2da6347..f1880fee2cda 100644 --- a/sys/sys/memdesc.h +++ b/sys/sys/memdesc.h @@ -163,4 +163,40 @@ void memdesc_copyback(struct memdesc *mem, int off, int size, const void *src); void memdesc_copydata(struct memdesc *mem, int off, int size, void *dst); +/* + * This routine constructs a chain of M_EXT mbufs backed by a data + * buffer described by a memory descriptor. Some buffers may require + * multiple mbufs. For memory descriptors using unmapped storage + * (e.g. memdesc_vmpages), M_EXTPG mbufs are used. + * + * Since memory descriptors are not an actual buffer, just a + * description of the buffer, the caller is required to supply a + * couple of helper routines to manage allocation of the raw mbufs and + * associate them with a reference to the underlying buffer. + * + * The memdesc_alloc_ext_mbuf_t callback is passed the callback + * argument as its first argument, the how flag as its second + * argument, and the pointer and length of a KVA buffer. This + * callback should allocate an mbuf for the KVA buffer, either by + * making a copy of the data or using m_extaddref(). + * + * The memdesc_alloc_extpg_mbuf_t callback is passed the callback + * argument as its first argument and the how flag as its second + * argument. It should return an empty mbuf allocated by + * mb_alloc_ext_pgs. + * + * If either of the callbacks returns NULL, any partially allocated + * chain is freed and this routine returns NULL. + * + * If can_truncate is true, then this function might return a short + * chain to avoid gratuitously splitting up a page. + */ +typedef struct mbuf *memdesc_alloc_ext_mbuf_t(void *, int, void *, size_t); +typedef struct mbuf *memdesc_alloc_extpg_mbuf_t(void *, int); + +struct mbuf *memdesc_alloc_ext_mbufs(struct memdesc *mem, + memdesc_alloc_ext_mbuf_t *ext_alloc, + memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + size_t offset, size_t len, size_t *actual_len, bool can_truncate); + #endif /* _SYS_MEMDESC_H_ */ From nobody Tue Jan 9 19:29:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gwG5bDdz56M3C; Tue, 9 Jan 2024 19:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8gwG4lWbz4hqH; Tue, 9 Jan 2024 19:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704828542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0jCaV/7D0MkQNYRHoVvhqPIXTTw5Er1RpfQ2+JUiJRc=; b=THYzobzwTTBqQND9RwxM6bskUrZPfpf9Xfv5mXlMKhHpqDVRCBN79Hl3rY+aj5Jq2YYkef /xBAOTp/UzIYIILoludm4vQMusAQdiqUayBeGZbYLUXrVCEJZdRA3/8THckxxzLso89tTF DFE+/z8POnfgCDPsnD0uvPCKGQkj7SRNEF0LkN5UzFRSavkn8EJrCbuOz6gZkDbligQetx 77/Vb3pL1x7CJoJq8fR6dJ+n2ou3XnEoV+KXiCE8juGO2Jj6yrZpsQQRvDk5JBh6ad74Fy 6UePZxq3+5QWBLUdYbL13Yr85E7SEoQtZeqeTT0N1D4dmqICpyfEBh0J7L0ZFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704828542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0jCaV/7D0MkQNYRHoVvhqPIXTTw5Er1RpfQ2+JUiJRc=; b=FDQYqXYnU6JPbTWZBCe1z7597Gca8oHZcRuHnA0iiw6JZb6v3qEg0kM58YreApOfddrZX0 S/0O6h3ZDCqKemsr9pCDsR+JCsDT+VX2MiMkoTa/tNRdQauzn51+GBP+0rtfbgjzCV5RO6 klgYHMwykexawkVATfOGrsHt1uTLCArUfFWpVQFWBqz9o8UydTtPVp7TRXq9+M/f/9dbuZ 2yTxFbw/dIng7GItz4uL6CtP5ctK0PQHqnAY/bJtSrthDERzulobwAM6+hgvjBtSvA6neR DGSr7TvR2Z9NnsHpqedp3Bg8qZsQKVKYFEPs7xf+ynJZLKhXTRWkX7O+PN++kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704828542; a=rsa-sha256; cv=none; b=MX8og5tIBGHUtIeEXHzcKny7yxz6GsBf2PYDPcDmLMqODD5MVOM8d5dd1Ep/i3M9wxrWcI QdnlJDi6y7SJs7ya9UYu83bZOIR4xO9VSW2GCvu4cUbBmNSSWdq/es2rqeGhmzwFIg5nk4 0qKfG+nur9j5vBRNX5s52RZZgOG3K5RD6+0EAaeIbCqGrQuT2I9idjFnHMO7LItrZBYeou Uf0AIqm4DQQfRbq1wVUsOpM1ltXQ5TrUKwWw80Gh1iOTFhOupcYzxQ/V1kcMHgAUcNzAIc cTz87m8fpXxuMMRwpwLfHO7mRIxPa859hbEAkzdV0ukQiDvaAfas4DCErPdRlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8gwG3pmlz13fP; Tue, 9 Jan 2024 19:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409JT2Tj032975; Tue, 9 Jan 2024 19:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409JT2F2032972; Tue, 9 Jan 2024 19:29:02 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:29:02 GMT Message-Id: <202401091929.409JT2F2032972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c6a488511ab1 - main - acpi: Only reserve resources enumerated via _CRS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6a488511ab1fbae8d16264b9e83c85024c9e1ce Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c6a488511ab1fbae8d16264b9e83c85024c9e1ce commit c6a488511ab1fbae8d16264b9e83c85024c9e1ce Author: John Baldwin AuthorDate: 2024-01-09 19:23:10 +0000 Commit: John Baldwin CommitDate: 2024-01-09 19:23:10 +0000 acpi: Only reserve resources enumerated via _CRS In particular, don't reserve resources added by drivers via other means (e.g. acpi_bus_alloc_gas which calls bus_alloc_resource right after adding the resource). The intention of reserved resources is to ensure that a resource range that a bus driver knows is assigned to a device is reserved by the system even if no driver is attached to the device. This prevents other "wildcard" resource requests from conflicting with these resources. For ACPI, the only resources the bus driver knows about for unattached devices are the resources returned from _CRS. All of these resources are already reserved now via acpi_reserve_resources called from acpi_probe_children. As such, remove the logic from acpi_set_resource to try to reserve resources when they are set. This permits RF_SHAREABLE to work with acpi_bus_alloc_gas without requiring hacks like the current one for CPU device resources in acpi_set_resource. Reported by: gallatin (RF_SHAREABLE not working) Diagnosed by: jrtc27 --- sys/dev/acpica/acpi.c | 36 ------------------------------------ sys/dev/acpica/acpivar.h | 1 - 2 files changed, 37 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 22d2b10ff905..9196c446ae80 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1376,11 +1376,9 @@ acpi_reserve_resources(device_t dev) struct resource_list_entry *rle; struct resource_list *rl; struct acpi_device *ad; - struct acpi_softc *sc; device_t *children; int child_count, i; - sc = device_get_softc(dev); if (device_get_children(dev, &children, &child_count) != 0) return; for (i = 0; i < child_count; i++) { @@ -1422,14 +1420,12 @@ acpi_reserve_resources(device_t dev) } } free(children, M_TEMP); - sc->acpi_resources_reserved = 1; } static int acpi_set_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t count) { - struct acpi_softc *sc = device_get_softc(dev); struct acpi_device *ad = device_get_ivars(child); struct resource_list *rl = &ad->ad_rl; ACPI_DEVICE_INFO *devinfo; @@ -1485,38 +1481,6 @@ acpi_set_resource(device_t dev, device_t child, int type, int rid, /* Add the resource. */ end = (start + count - 1); resource_list_add(rl, type, rid, start, end, count); - - /* Don't reserve resources until the system resources are allocated. */ - if (!sc->acpi_resources_reserved) - return (0); - - /* Don't reserve system resources. */ - if (ACPI_ID_PROBE(dev, child, sysres_ids, NULL) <= 0) - return (0); - - /* - * Don't reserve IRQ resources. There are many sticky things to - * get right otherwise (e.g. IRQs for psm, atkbd, and HPET when - * using legacy routing). - */ - if (type == SYS_RES_IRQ) - return (0); - - /* - * Don't reserve resources for CPU devices. Some of these - * resources need to be allocated as shareable, but reservations - * are always non-shareable. - */ - if (device_get_devclass(child) == devclass_find("cpu")) - return (0); - - /* - * Reserve the resource. - * - * XXX: Ignores failure for now. Failure here is probably a - * BIOS/firmware bug? - */ - resource_list_reserve(rl, dev, child, type, &rid, start, end, count, 0); return (0); } diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 5be0939ee6bb..4d76a77cdbf8 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -55,7 +55,6 @@ struct acpi_softc { int acpi_enabled; int acpi_sstate; int acpi_sleep_disabled; - int acpi_resources_reserved; struct sysctl_ctx_list acpi_sysctl_ctx; struct sysctl_oid *acpi_sysctl_tree; From nobody Tue Jan 9 19:29:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gx01WXyz56Lh2; Tue, 9 Jan 2024 19:29:40 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8gwz4kMPz4j0s; Tue, 9 Jan 2024 19:29:39 +0000 (UTC) (envelope-from delphij@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a28a6cef709so352774866b.1; Tue, 09 Jan 2024 11:29:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704828577; x=1705433377; 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=jy10zpfYdaHwHNgS/wEOKNr80eU6gbw3rVYx4vuB18Y=; b=DUzCRVPA6nCPG+O7AzZCCvqIrbx5jkjPct/DwVvmrMoSS4gV/XKw0RyZdbHjuaYZzI +56vfy4G1JE0b8BfVMZS7BpRlmMKjq8g9L1eX4kykXWB3N3xDi1AbT5hX32WQFc26dg8 ONGG2D47TlfeZzgvHYLQrUtLGOjIb2p9YT2/a3DVBAd0Lg7Fq+MWXE6DiJtpdjp44wYx 7I6p3JLYtyLOcIGzxbaLFogsTqAFMZOYF4s/ujBBjxjGFq8BnHSDwgaAQ240AbXPW9+U 3C4vdreAh1j95kUTGvje75LgNMOom8TlcAUHejPAWO/1Ae/O5ygeLtnnRPnoLsCh6Fyc WqRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704828577; x=1705433377; 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=jy10zpfYdaHwHNgS/wEOKNr80eU6gbw3rVYx4vuB18Y=; b=o3GY0qJ4envodwskyVqt3lq8dtq6nlVu/+UOu8oRF8ecPV1yF4VHu2yqGG1QEXs+V/ oAhobiXWvZianJ7UFAx4YV+z/RmlYIP8Lyx24ymlFdae5Ksyahcv1XikyfsKlxt95Z7B gIleAfyhw6B35DON1H9zNzp1/lQ/hMKWe1Ea++l5QRw1EzqNgtF0YmFeyqc5h36dVa/P l1lS5m3V/G7wC6yOaUeFXvaPmL1CNsV7WBWNS3ZlJxNf3QBatdHex0xZHL50rVMx/I2T kQFEKLHhbQBQZXwZX+YTgdVMkrDTBkJ9MWNylStDQnOBDogwbPCL8xe9+BU1dkz37ZQP 40Eg== X-Gm-Message-State: AOJu0Yx24mJ6mmpdJCXmTdup55MzfISL3/5aVPfEvEMec7TWsmoXB6hL IBUlBE/7QxSXYZJGIyfWIP3T7NgzXet3/U9PwNjNx+mPdhE= X-Google-Smtp-Source: AGHT+IF2q22F48sRef3W5UFcNIGuMx3+1w2B3AUCtY0jxJBlotyV148XLYo4riCM25fkvQeZ/MONpyiB1PQkzoKaz7k= X-Received: by 2002:a17:906:1cd:b0:a29:e2e7:8faa with SMTP id 13-20020a17090601cd00b00a29e2e78faamr825656ejj.101.1704828576684; Tue, 09 Jan 2024 11:29:36 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> <2683023.poxlI1A5LX@ravel> In-Reply-To: <2683023.poxlI1A5LX@ravel> From: Xin LI Date: Tue, 9 Jan 2024 11:29:25 -0800 Message-ID: Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). To: Olivier Certner Cc: Xin LI , Mike Karels , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b760b8060e8855d6" X-Rspamd-Queue-Id: 4T8gwz4kMPz4j0s 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] --000000000000b760b8060e8855d6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Olivier, On Tue, Jan 9, 2024 at 2:19=E2=80=AFAM Olivier Certner w= rote: > [...] > > Sorry not to have noticed this in the review; it was only when I saw th= is > > message that it sunk in that we now have *three* ways to specify > compression, > > and I'm not even sure what the precedence is. I would have thought tha= t > > would replace -c. It's a mess if the config file has entrie= s > > that specify J and X flags as well as none, the config file has > > zstd, and the -c option is given as well. We now have a kno= b > > to override the knob to override a knob. The only reason to keep -c tha= t > > I can think of is to specify a different compression in a single > invocation, > > but as noted, changing compression requires manual operations that make > > it unreasonable to change it invocation by invocation. > > I agree. Two possibilies that I can think of from here: Remove '-c' or > make it enable compression regardless of the log files' individual settin= gs. > I am open to removing '-c'. Could you please clarify what you mean by "make it enable compression" -- did you mean that we mark all log files to be compressible? (It's probably not a good idea as some "log" files may be binary and not really compressible). > > > I still think it would be much better to add an option letter to select > > the default compression as specified by . This would elimina= te > > the need for "legacy", and it would add the ability to have both a glob= al > > default and an exception. I think the redefinition of the existing fla= gs > > to have different meanings if is given is messy. > > I didn't think about that at first. I agree. > > If people want to be able to override compression settings globally, whic= h > I find useful, one could introduce another directive such as > taking a boolean to request to apply the > option regardless of the individual compression letters. > > Another possibility is just to rename "" to > "" (so, this time, not a boolean) and keep its current > behavior. This would match one of the suggestions above about '-c', but > then there's the question of which one takes precedence, and I think that > the command-line specification should prevail (for practical purposes and > POLA). > > > The entry for -c says that we plan to change the default to "none" in > 15.0. > > Hopefully that would be done via and not -c. However, there > > was significant pushback on "none" being the default. > > I think the default should be "no ", i.e., no > directive. This may plea for having "none" mean "don't change anything" > (as if the directive wasn't there) and have something else to deactivate > compression, such as "no_compression" (which is really an override). If > "none" is confusing, then just forego it completely, and have 'newsyslog' > plain fail on it (but keep "no_compression" as just described). > > If there is consensus, I'd then change the 'J' flag currently used for al= l > log files to the new chosen flag for generic compression, and have > set to "bzip2" in a first step (for POLA). Then, it > could be changed to something else, e.g., 'zstd'. > > Setting it to 'none' seems to me the worst solution (but far from being > the end of the world). > Changing the meaning of all four legacy compression type letters to "file is compressible" is part of the intention. The goal is to discourage using them as a way to specify a compression type, in favor of using the administrator configured value. That's said, 'none' is a reasonable default in many ways as explained before (it makes grep'ing easier, compression is not really that helpful in the modern world because hard drives are larger than the 90's and it reduces the times data gets rewritten to SSDs and avoids hourly CPU load bursts for busy systems). 'bzip2' could be a good second best default (because for most configurations it's how the log files are compressed with today's defaults), but if the administrator has already configured their systems to use a different method, this would break their configuration anyways. > More deeply, I remember having seen at least two claims that using > filesystem's compression is better, without arguments. I don't agree wit= h > that in practice. The only advantage of in-filesystem compression, besid= es > the administrative simplification that you can also get with the override > above, is to get O(1) random access to big log files, and I don't see any > compelling and common use case for it. You certainly want to get to the > end of the current log quickly, but that one precisely is not handled by > 'newsyslog' and stays uncompressed (at the application level). When you > want to search for strings or patterns, you have to grep the whole file > anyway. You may want to immediately reach the end of some historical log > file, e.g., when manually going back in time from the current log, but th= is > should have negligible latency, and if it doesn't, than just use more and > smaller log archives. Same thing if you have a more sophisticated setup > with an index of log text: Jumping to a particular location in the log fi= le > should have negligible latency, else apply the same recipe. If your setu= p > with index requires a single, never rotated, log file, then you're not ev= en > using 'newsyslog' in the first place (or should not). Although I agree > that in this case using a compressed filesystem (or a randomly accessible > archive) can make sense (if your index doesn't already cover the results > expected from your searches), I very much doubt this is a common setup. > There are other benefits of not compressing rotated logs. For busy systems, the hourly newsyslog run would process larger logs and cause CPU workload bursts. And when logs are compressed, the data is read back and compressed data is rewritten to disk / SSDs, causing additional wear of the flash storage, and all that comes with no significant benefit for modern hardware. (I don't think it's common to have log files indexed after rotation; a more common use case would be to use [u]grep to look up for a certain pattern). > Moreover, using in-filesystem compression can lead to degrading the > compression ratio, since the compression method on ZFS is chosen per > dataset, which includes a bunch of other files and use cases preventing t= he > administrator from choosing the best, and slowest, compression methods. = To > avoid this problem, one can use a separate dataset for /var/log (anyone?)= , > but changing this on already running systems is a greater burden than jus= t > changing the compression settings in the 'newsyslog' configuration files. > Yes, and that's not a big concern. Achieving the maximum compression ratio is probably never the goal for most scenarios (not limited to logs, but also other places) where compression is used, and one always has to balance between the cost and benefit. If the person is distributing a release image to many thousands of users over the Internet, it would make a lot of sense to try the best compression for an 5% reduction of size because that adds up to the bandwidth cost and optimizes the experience for users, but it doesn't make as much sense to save, let's say a few MBs of disk space at the expense of spending a few more minutes every hour, the added "bursts" of slower response time for a server, and that's usually undesirable for production. Cheers, --000000000000b760b8060e8855d6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Olivier,

On Tue, Jan 9, 2024 at 2:19= =E2=80=AFAM Olivier Certner <olce@fr= eebsd.org> wrote:
[...]
> Sorry not to have noticed this in the review; it was only when I saw t= his
> message that it sunk in that we now have *three* ways to specify compr= ession,
> and I'm not even sure what the precedence is.=C2=A0 I would have t= hought that
> <compress> would replace -c.=C2=A0 It's a mess if the config= file has entries
> that specify J and X flags as well as none, the config file has
> <compress> zstd, and the -c option is given as well.=C2=A0 We no= w have a knob
> to override the knob to override a knob. The only reason to keep -c th= at
> I can think of is to specify a different compression in a single invoc= ation,
> but as noted, changing compression requires manual operations that mak= e
> it unreasonable to change it invocation by invocation.

I agree.=C2=A0 Two possibilies that I can think of from here: Remove '-= c' or make it enable compression regardless of the log files' indiv= idual settings.

I am open to removing '= -c'.

Could you please clarify what you mean by "make it ena= ble compression" -- did you mean that we mark all log files to be comp= ressible?=C2=A0 (It's probably not a good idea as some "log" = files may be binary and not really compressible).=C2=A0

> I still think it would be much better to add an option letter to selec= t
> the default compression as specified by <compress>.=C2=A0 This w= ould eliminate
> the need for "legacy", and it would add the ability to have = both a global
> default and an exception.=C2=A0 I think the redefinition of the existi= ng flags
> to have different meanings if <compress> is given is messy.

I didn't think about that at first.=C2=A0 I agree.

If people want to be able to override compression settings globally, which = I find useful, one could introduce another directive such as <compress_o= verride> taking a boolean to request to apply the <compress> optio= n regardless of the individual compression letters.

Another possibility is just to rename "<compress>" to "= ;<compress_override>" (so, this time, not a boolean) and keep it= s current behavior.=C2=A0 This would match one of the suggestions above abo= ut '-c', but then there's the question of which one takes prece= dence, and I think that the command-line specification should prevail (for = practical purposes and POLA).

> The entry for -c says that we plan to change the default to "none= " in 15.0.
> Hopefully that would be done via <compress> and not -c.=C2=A0 Ho= wever, there
> was significant pushback on "none" being the default.

I think the default should be "no <compress_override>", i.e= ., no directive.=C2=A0 This may plea for having "none" mean "= ;don't change anything" (as if the directive wasn't there) and= have something else to deactivate compression, such as "no_compressio= n" (which is really an override).=C2=A0 If "none" is confusi= ng, then just forego it completely, and have 'newsyslog' plain fail= on it (but keep "no_compression" as just described).

If there is consensus, I'd then change the 'J' flag currently u= sed for all log files to the new chosen flag for generic compression, and h= ave <compress_override> set to "bzip2" in a first step (for= POLA).=C2=A0 Then, it could be changed to something else, e.g., 'zstd&= #39;.

Setting it to 'none' seems to me the worst solution (but far from b= eing the end of the world).

Changing the m= eaning of all four legacy compression type letters to "file is compres= sible" is part of the intention.=C2=A0 The goal is to discourage using= them as a way to specify a compression type, in favor of using the adminis= trator configured value.

That's said, 'none' is a = reasonable default in many ways as=C2=A0explained before (it makes grep'= ;ing easier, compression is not really that helpful in the modern world bec= ause hard drives are larger than the 90's and it reduces the times data= gets rewritten to SSDs and=C2=A0avoids hourly CPU load bursts for busy sys= tems).

'bzip2' could be a good second best default (because = for most configurations it's how the log files are compressed with toda= y's defaults), but if the administrator has already configured their sy= stems to use a different method, this would break their configuration anywa= ys.
=C2=A0
More deeply, I remember having seen at least two claims that using filesys= tem's compression is better, without arguments.=C2=A0 I don't agree= with that in practice.=C2=A0 The only advantage of in-filesystem compressi= on, besides the administrative simplification that you can also get with th= e override above, is to get O(1) random access to big log files, and I don&= #39;t see any compelling and common use case for it.=C2=A0 You certainly wa= nt to get to the end of the current log quickly, but that one precisely is = not handled by 'newsyslog' and stays uncompressed (at the applicati= on level).=C2=A0 When you want to search for strings or patterns, you have = to grep the whole file anyway.=C2=A0 You may want to immediately reach the = end of some historical log file, e.g., when manually going back in time fro= m the current log, but this should have negligible latency, and if it doesn= 't, than just use more and smaller log archives.=C2=A0 Same thing if yo= u have a more sophisticated setup with an index of log text: Jumping to a p= articular location in the log file should have negligible latency, else app= ly the same recipe.=C2=A0 If your setup with index requires a single, never= rotated, log file, then you're not even using 'newsyslog' in t= he first place (or should not).=C2=A0 Although I agree that in this case us= ing a compressed filesystem (or a randomly accessible archive) can make sen= se (if your index doesn't already cover the results expected from your = searches), I very much doubt this is a common setup.
<= br>
There are other benefits of not compressing rotated logs.=C2=A0 F= or busy systems, the hourly newsyslog run would process larger logs and cau= se CPU workload bursts.

And when logs are compressed, the data= is read back and compressed data is rewritten to disk / SSDs, causing addi= tional wear of the flash storage, and all that comes with no significant be= nefit for modern hardware.

(I don't think it's common to hav= e log files indexed after rotation; a more common use case would be to use = [u]grep to look up for a certain pattern).
=C2=A0
Moreover, using in-filesystem compression can lead to degrading the compres= sion ratio, since the compression method on ZFS is chosen per dataset, whic= h includes a bunch of other files and use cases preventing the administrato= r from choosing the best, and slowest, compression methods.=C2=A0 To avoid = this problem, one can use a separate dataset for /var/log (anyone?), but ch= anging this on already running systems is a greater burden than just changi= ng the compression settings in the 'newsyslog' configuration files.=

Yes, and that's not a big concern.=C2= =A0 Achieving the maximum compression ratio is probably never the goal for = most scenarios (not limited to logs, but also other places) where compressi= on is used, and one always has to balance between the cost and benefit.

If the person is distributing a release image to many thousa= nds of users over the Internet, it would make a lot of sense to try the bes= t compression for an 5% reduction of size because that adds up to the bandw= idth cost and optimizes the experience for users, but it doesn't make a= s much sense to save, let's say a few MBs of disk space at the expense = of spending a few more minutes every hour, the added "bursts" of = slower response time for a server, and that's usually undesirable for p= roduction.

Cheers,
--000000000000b760b8060e8855d6-- From nobody Tue Jan 9 20:23: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 4T8j6t6652z56Vdc; Tue, 9 Jan 2024 20:23: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 4T8j6t5DLkz4nwh; Tue, 9 Jan 2024 20:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704831798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSFChKjytCH6znT9zeEb7OY8LhO0Im9J2aQG0P00UVo=; b=it4VISxdkuSg4mpNuYbNAVeEcj/wjQB5HhCVt15rYU1S4dzNqq487UvpPG12g609xhEPh3 TGhnrCd1W3O4G5Vo82EVOe+KXIdJR3Nzk+nQ38fs5cP/nf6Y4BBE4oYenWLAZ0jy3h0Iu0 68WHEl3k34U8iKBJ62sSY8C2MGG6SPbC84xZFLYrSbx1gi7kNiBAfVavumscko5fWkPydF sXMVnPnS/Z11IL6cDux+2Uw1WHVurlerR+l4wLPMdIWGRCCOxIA66wXjs3VJeNtzBqLD2/ oJAIkp9E4sayKBVIgVd/u86mp7Ci+bHWbaZEm6uHHr0uVTy/N/HM4cZCT/PrLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704831798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSFChKjytCH6znT9zeEb7OY8LhO0Im9J2aQG0P00UVo=; b=shqQIvZIvZXpJCuruzOEeGjKlIGW/9X9Pg+5JJ4ebl8wMCiLoTafWg21KFpC7EFY88iufQ iaqsilN0vO+/w7v1MmDSeTEPPihn9lTiDoZZIQ0/+iOUL7tsixpoC6GtZ3C/TkA62iB9f9 U9td0pa6lhvIQlkwHJoqWPw6Xc/AD29qur+s/QY1UwHl3g9sHoFwb2IN11m5HpfRo9A0I8 1WSHgdebwLDQ5RbWIEyf9PsVImVtxBDHTUuN4QokrazIroqiP1bKVsosYFoQLP3B0CF87s ZT7iZZgemhU3nNPX7Qhhf6XUdZol9Xaj89+36g0jyE1dBsHjLfhgka6f04fTMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704831798; a=rsa-sha256; cv=none; b=JWQhuUeWAEphkh0bgZx3WYxbWdmhG2GqadDwIjPQ83bPNbnCN3VOk6c1wnvYAaIn9I/szl JDzCw3EoTFPPDhs1oHwwLuWlplNF8NxjtEybInk6M4JtFbpvwn4gG5JIygyWCPvwRZEqLY 3pf1cDsNBBL+2kXH6anyDDhbAuh7HOS7UKYLFBGTlBQwv7xrc1GIeh093ZZKd/3Qob1dT7 CilAAPRLnvdWOd2WzrvRqlDUFxH0E0hTO0bnw82LKEbn1kNwYnlYXsE2knFPzRuHr56M3o j+yqdTY9Nku44I1fH8fdT/Ch5aUeHeoaSjU/FzsIpt/11Yqe06g4ElyTHLszOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8j6t4HbDz14cg; Tue, 9 Jan 2024 20:23: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 409KNIfQ032490; Tue, 9 Jan 2024 20:23:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409KNImd032487; Tue, 9 Jan 2024 20:23:18 GMT (envelope-from git) Date: Tue, 9 Jan 2024 20:23:18 GMT Message-Id: <202401092023.409KNImd032487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 0013741108bc - main - powerpc_mmu_radix: add leaf page for wired mappings when pmap_enter(psind=1) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0013741108bc515dbaa56b2b9ca4043cdf6c9e5f Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=0013741108bc515dbaa56b2b9ca4043cdf6c9e5f commit 0013741108bc515dbaa56b2b9ca4043cdf6c9e5f Author: Robert Wing AuthorDate: 2024-01-09 20:12:38 +0000 Commit: Robert Wing CommitDate: 2024-01-09 20:23:18 +0000 powerpc_mmu_radix: add leaf page for wired mappings when pmap_enter(psind=1) This applies the fix to powerpc's pmap as was done in commit aa3bcaad51076ceb and d0941ed9b5c39d92 for amd64 and riscv pmaps, respectively. Reported by: Jenkins Reviewed by: bojan.novkovic_fer.hr, markj Fixes: e4078494f344bcba8709216bd601efa3dd05f6b3 Differential Revision: https://reviews.freebsd.org/D43339 --- sys/powerpc/aim/mmu_radix.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index abcb8ae151c4..45461b21dba1 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -607,6 +607,7 @@ static boolean_t pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struc static void pmap_invalidate_page(pmap_t pmap, vm_offset_t start); static void pmap_invalidate_all(pmap_t pmap); static int pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode, bool flush); +static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); /* * Internal flags for pmap_enter()'s helper functions. @@ -3183,6 +3184,7 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, struct spglist free; pml3_entry_t oldl3e, *l3e; vm_page_t mt, pdpg; + vm_page_t uwptpg; KASSERT((newpde & (PG_M | PG_RW)) != PG_RW, ("pmap_enter_pde: newpde is missing PG_M")); @@ -3237,6 +3239,26 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, KASSERT(be64toh(*l3e) == 0, ("pmap_enter_pde: non-zero pde %p", l3e)); } + + /* + * Allocate leaf ptpage for wired userspace pages. + */ + uwptpg = NULL; + if ((newpde & PG_W) != 0 && pmap != kernel_pmap) { + uwptpg = vm_page_alloc_noobj(VM_ALLOC_WIRED); + if (uwptpg == NULL) + return (KERN_RESOURCE_SHORTAGE); + uwptpg->pindex = pmap_l3e_pindex(va); + if (pmap_insert_pt_page(pmap, uwptpg)) { + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + return (KERN_RESOURCE_SHORTAGE); + } + pmap_resident_count_inc(pmap, 1); + uwptpg->ref_count = NPTEPG; + pmap_fill_ptp((pt_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(uwptpg)), + newpde); + } if ((newpde & PG_MANAGED) != 0) { /* * Abort this mapping if its PV entry could not be created. @@ -3253,6 +3275,16 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, pmap_invalidate_page(pmap, va); vm_page_free_pages_toq(&free, true); } + if (uwptpg != NULL) { + mt = pmap_remove_pt_page(pmap, va); + KASSERT(mt == uwptpg, + ("removed pt page %p, expected %p", mt, + uwptpg)); + pmap_resident_count_dec(pmap, 1); + uwptpg->ref_count = 1; + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + } CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" " in pmap %p", va, pmap); return (KERN_RESOURCE_SHORTAGE); From nobody Tue Jan 9 21:05:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8k3y0WLRz56NqP; Tue, 9 Jan 2024 21:05: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 4T8k3x6c4Gz3yvH; Tue, 9 Jan 2024 21:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iTsm+A1RVymSwJketEP/JZRayJtbhxO6M05KKy0/BNU=; b=OibkSeoXcBWp6XN7y8x9L/pc8ja1Mola0LWORQny2CjwyNUun74CPpdMIIaT6xEL4Mp9e7 HhrWk+Iuohl8EE0U5eXTFobqdbkOxoS7UYDCGxFnRZXhg8ULjutjsSpbh/BdjGJtO/0p8b oRIO6LDWmal+Psx4HfLaVfpGsD0ETMged7kA/rSiUULN2sxLM4m9mQxdzXYeEOVgq+aT6q K4WX5dp706wAB+kvbDLJ3rc1c4641tgrIkjCD1q9X9tuUjJK3rBiYOiXqgoS6V8ftFlN9s SEe8UX2gXpYpsa4c1bfad6oqjOCtpyawLlSapS8KzlJm910kghAQC+yufbotrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iTsm+A1RVymSwJketEP/JZRayJtbhxO6M05KKy0/BNU=; b=VeYD7E0s2it9CsMt2YTmqx+cCVM52gtfe9oCkOwE5qK7bmsp71RJnUAazomzBap9L/8Q5w MiVV6sV1STTkBfQVLlsiDIaDufgNykBfVR1VrqxQPVdXUQKyorsdEU5mNtS4tzsWySqG1o eCiypcSsB2kAO3ckYKm2XcbtRXlUIjQYh5eP2N+Rgyin16FfIm3nP0DEau/0dWA/9GOq3z uRcYmFTsqCliE0TeaVgwKBcV9dX49caIN7GQrH2NNym7LZVcL2NyhyCuuSpogNfJ0wNL9S OemXreNZ4ZY/0mXoDE4VN+Wjpn3c8syWvHTgNp4N47ptWSjeyKF0O+emXxKkGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704834349; a=rsa-sha256; cv=none; b=TyUsvbar+/LGSVbvRgdt+iubiV4toKDsFanAi//H6xZlBUTqjt12rwwMVworuREMGxf1HF 1OW8vsh9XNobFbAadcEdJ5W3XohLK+66+XmfiU3x/LqZIHKoK8UzVB+GmG+3sPK7NFBu2O sbo2IxgxDGfYx80ZcRlfAa+TAYsOGhFtuEyDPhSNkbUU7YAvPyGNMRZU20qNzRxVRCcOoN IhBMmXESvM2QHqFlsxxKSSJs2Es1ivKnl29IUFuVNjKhnf5+qRYtWJugudVlG7XuyMjp4N 8AyB/jiJeVepYVxS5quPqwJfeAWWGppVvg/k4P8ucJ1NAgufqPE1oio1RU6Otw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8k3x5g2xz15qd; Tue, 9 Jan 2024 21:05: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 409L5nSb000773; Tue, 9 Jan 2024 21:05:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409L5nUl000770; Tue, 9 Jan 2024 21:05:49 GMT (envelope-from git) Date: Tue, 9 Jan 2024 21:05:49 GMT Message-Id: <202401092105.409L5nUl000770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 09fa78d438a7 - main - netlink: fix regression with group writers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09fa78d438a7729f3fbe055d65f0fca4d05c0971 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=09fa78d438a7729f3fbe055d65f0fca4d05c0971 commit 09fa78d438a7729f3fbe055d65f0fca4d05c0971 Author: Gleb Smirnoff AuthorDate: 2024-01-09 21:01:28 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 21:01:28 +0000 netlink: fix regression with group writers Refactoring of argument list to nl_send_one() led to derefercing wrong union member. Rename nl_send_one() to a more generic name, isolate anew nl_send_one() as the callback only for the normal writer and provide correct argument to nl_send() from nl_send_group(). Fixes: ff5ad900d2a0793659241eee96be53e6053b5081 --- sys/netlink/netlink_domain.c | 4 ++-- sys/netlink/netlink_io.c | 3 +-- sys/netlink/netlink_message_writer.c | 7 +++++++ sys/netlink/netlink_var.h | 4 +--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 7660dcada103..4790845d1d31 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -233,7 +233,7 @@ nl_send_group(struct nl_writer *nw) copy = nl_buf_copy(nb); if (copy != NULL) { nw->buf = copy; - (void)nl_send_one(nw); + (void)nl_send(nw, nlp_last); } else { NLP_LOCK(nlp_last); if (nlp_last->nl_socket != NULL) @@ -246,7 +246,7 @@ nl_send_group(struct nl_writer *nw) } if (nlp_last != NULL) { nw->buf = nb; - (void)nl_send_one(nw); + (void)nl_send(nw, nlp_last); } else nl_buf_free(nb); diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index fb8e0a46e8dd..5f50c40f71d8 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -194,9 +194,8 @@ nl_taskqueue_handler(void *_arg, int pending) * If no queue overrunes happened, wakes up socket owner. */ bool -nl_send_one(struct nl_writer *nw) +nl_send(struct nl_writer *nw, struct nlpcb *nlp) { - struct nlpcb *nlp = nw->nlp; struct socket *so = nlp->nl_socket; struct sockbuf *sb = &so->so_rcv; struct nl_buf *nb; diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 0b85378b41b6..50305e3d9d80 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -65,6 +65,13 @@ nlmsg_get_buf(struct nl_writer *nw, u_int len, bool waitok) return (true); } +static bool +nl_send_one(struct nl_writer *nw) +{ + + return (nl_send(nw, nw->nlp)); +} + bool _nlmsg_get_unicast_writer(struct nl_writer *nw, int size, struct nlpcb *nlp) { diff --git a/sys/netlink/netlink_var.h b/sys/netlink/netlink_var.h index c8f0d02a0dab..ddf30b373446 100644 --- a/sys/netlink/netlink_var.h +++ b/sys/netlink/netlink_var.h @@ -130,9 +130,7 @@ void nl_osd_unregister(void); void nl_set_thread_nlp(struct thread *td, struct nlpcb *nlp); /* netlink_io.c */ -#define NL_IOF_UNTRANSLATED 0x01 -#define NL_IOF_IGNORE_LIMIT 0x02 -bool nl_send_one(struct nl_writer *); +bool nl_send(struct nl_writer *, struct nlpcb *); void nlmsg_ack(struct nlpcb *nlp, int error, struct nlmsghdr *nlmsg, struct nl_pstate *npt); void nl_on_transmit(struct nlpcb *nlp); From nobody Tue Jan 9 21:08:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8k6c5gxpz56P04; Tue, 9 Jan 2024 21:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8k6c56DYz40VC; Tue, 9 Jan 2024 21:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rcQ9wyFpANgQ3Vkb6s77ylG6tsZZHlcuJAoYXmPAsSg=; b=CouM9QbdUuABTBVnYH2hTHGmDzdqYxyWqJuWoP5cmpmkIaf0urtXA9DpDbcKGXym8UmYql NJXUFn2Zzj+L2Ps8GDTxUmqSxZ47+lv8M1/b6FjH7Y00fPBElImFLjnUwFfvlemMr5Sgyl 75ElGjq7Q2Hxte4snawCAkZ3B9oq73AajJLZIBINzIpRxUWVrMd3Ez6Ld2lLTWUugU2FON 0MVW6MkVO4PKglrQEOBn0rsDtTN6hKIN8w5dbYP3kMC4UJlAPQnwuU4tDP7VvOUZrI91Si MP575C9eE10e+ZBElw4mRn9up315LGTxg6PuwiHO/BFQ2r7ifuqOva/CNYAFyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rcQ9wyFpANgQ3Vkb6s77ylG6tsZZHlcuJAoYXmPAsSg=; b=B/weJtdlVshN5PDn6umZwOX5fAs4n29BWu7jwtRYJhLCfIcjcW6NWrBmvWqMUxlxfF84Ty 0+/QqKcd3c7d7sjaBP/upVxglW9aEEZVyW4ajt52zjtWlg4O6P7eClhVZOBdSiaCn7KGqj yc5eXd9oRJN8IUwQOIYFx4zMXnBdGEYzGo9EmsftnrfOLgxIxzc3dAUBUsQJE4OG38VQfh YFlQ6aHO/B+m2zCuwLPRz5IaaAqZWkPq5ph/iY5Bu+B2frBG1jrjUADc80Lua28JGINg4O hYVmBSa0dkDSHLHu0EbE4cZhKFbAOkdOObbtKG6PSM7YQSuJ8L1mzvog9Iattw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704834488; a=rsa-sha256; cv=none; b=nQjokicSSy/SNuv6kQ8RvNp4j2EX6iHQ7R78PfX5+v/f0ckpZ5DcCa2ECa/1SXJCwC8ISm DNw9v0uxGChK0MxVY4G1pESEipw1k32H5Vy8yFqo0O+Y9skfB0KNY2PN+eQJjn7Y6GYXZu KQ9dDs+vezRdUycpoA1Hx3oE52p/cbdkh3ZYg4V26c4NFIQnqqBx/WRZuWlCiI3/aeiUfx cV+2+VkpMa7ikqx08X5eXBvmp59qD0xfVBv9hjf9eUHdwtAUk9UFtXNABO73M6EwFWTZZt QxAG58W3obECm5UtqVxb23aivbpbiiQrIq3+nU42vyYMpUeNRn9OIE+Mro6EDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8k6c49tzz15tV; Tue, 9 Jan 2024 21:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409L88v4001234; Tue, 9 Jan 2024 21:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409L88aR001231; Tue, 9 Jan 2024 21:08:08 GMT (envelope-from git) Date: Tue, 9 Jan 2024 21:08:08 GMT Message-Id: <202401092108.409L88aR001231@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 5cd08d9ecf52 - main - apei: Mark ReadAckRegister resource as shareable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5cd08d9ecf52d37229f4888e38631cb91ce97eb9 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=5cd08d9ecf52d37229f4888e38631cb91ce97eb9 commit 5cd08d9ecf52d37229f4888e38631cb91ce97eb9 Author: Andrew Gallatin AuthorDate: 2024-01-09 20:52:07 +0000 Commit: Andrew Gallatin CommitDate: 2024-01-09 21:07:34 +0000 apei: Mark ReadAckRegister resource as shareable Work around vendors who use the same address for multiple ReadAckRegisters in their ACPI HEST table. This allows apei to attach cleanly on Ampere Altra servers. Note the issue is not specific to Ampere, I've run into it with at least one other vendor (whose server is not yet released). Sponsored by: Netflix Reviewed by: jhb --- sys/dev/acpica/acpi_apei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_apei.c b/sys/dev/acpica/acpi_apei.c index 6a3d9d10edd4..9cfd46c97430 100644 --- a/sys/dev/acpica/acpi_apei.c +++ b/sys/dev/acpica/acpi_apei.c @@ -711,7 +711,7 @@ apei_attach(device_t dev) if (ge->v1.Header.Type == ACPI_HEST_TYPE_GENERIC_ERROR_V2) { ge->res2_rid = rid++; acpi_bus_alloc_gas(dev, &ge->res2_type, &ge->res2_rid, - &ge->v2.ReadAckRegister, &ge->res2, 0); + &ge->v2.ReadAckRegister, &ge->res2, RF_SHAREABLE); if (ge->res2 == NULL) device_printf(dev, "Can't allocate ack resource.\n"); } From nobody Tue Jan 9 21:51: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 4T8l4g4XLkz56WxD; Tue, 9 Jan 2024 21:51: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 4T8l4g40HDz49WC; Tue, 9 Jan 2024 21:51:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704837091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIwwXqMi1IpUPUMlkJvavTblHBUXgXtqjkCiP+ns+io=; b=shy781xjXd8RbRMNe7tqFhRH2ikTMjVk27oQhWjCYN4aoPBkqk7F144Jnt07uSUKAtFLRm fNTwn/6bCbj24EHcdSjjZKIvII/ZKGXUzPLoydklkR+FAuNyiG7KAnfNEhKWrHpet9wJtF BY6ModCj79iPWKX1nn+Lvwf4Kc4V3LqBbN62Ywn5ohHIybI7K90Rq0LYYfsbPPEe25Qesm rbtqgnkS6LrPbfpemOs44u58XqEe51z8F0NPl5FtqN3FOGRU7Q0TOb1rc/0jgcSyyLUysT 9ZLCVTBSzHMe/VTO+AgTfNfg1EXiNl61P1GfI2BAtOFiakK7NlRDVWoJtZEX2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704837091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIwwXqMi1IpUPUMlkJvavTblHBUXgXtqjkCiP+ns+io=; b=DsOAeMHkJw++dURgCgVIkO3vgVZKaKzxMMrck7ZXVNkrYdxX9BAh0Zqg9pSrh7tqDvIiF7 86CvvEd1HM2f1SaOjOHUfr4z+UhGXd+RkyltSn8deicP7+6hzD+6t8OWmzrrn3thqkBGFK pBJGR69LzqaY4TQyN3E+UIXqw/GLbSk+OleuPtVId4XDZ7T4CVEr7QSsM8E2KoYIY36a1+ bIZUMF8oHAz8YJ9Lv3/cV2GtdlRvu0gdJAk4waBCKWmopgMQhOIMXIKkjHGeeWZRLW7c29 snVuzXjHEXPGTh0mKWMnlQoXaU/dgYvqtnJc45sz4bycETOKEq8Ef8MvBd7JZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704837091; a=rsa-sha256; cv=none; b=JPcITQ6Srgfejg4s/80XEETpeLwGfrH820u1I0/8yOfSTuM0GCkws2X9H2H56M5+cSOJ5H cWsk5OERcLIdEd7Btkxxy0NQZFuhwVYfbTqSiggOISKIrKuhwWtayZuJySavLuLKwTM43T 52ye0mSD+jmfewEOSFSef6TzIYorpbTT6fCkzHmCRRxOFow05nxq0klivucVdvLbcxwZxZ NBW7AX8JncpKoPek6sP0Bjk7CjnHK9OycWpsH4PjMbYYVXerZqZyU66TscL5p0dXBjfQVs eQwQov0eZ10yEDTNXby1H+XKbZgIrcDfPYnKLQ+MbAgvPmZeSKPc/tcczKZnfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8l4g33Txz17Lr; Tue, 9 Jan 2024 21:51: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 409LpVMg078296; Tue, 9 Jan 2024 21:51:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409LpVss078293; Tue, 9 Jan 2024 21:51:31 GMT (envelope-from git) Date: Tue, 9 Jan 2024 21:51:31 GMT Message-Id: <202401092151.409LpVss078293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 9ea86c8f67a6 - main - cxgbe(4): Use the correct size for the CIM LA on the T6. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ea86c8f67a65ca00f79f3cd83aa977b38589f39 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=9ea86c8f67a65ca00f79f3cd83aa977b38589f39 commit 9ea86c8f67a65ca00f79f3cd83aa977b38589f39 Author: Navdeep Parhar AuthorDate: 2024-01-09 21:22:16 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-09 21:27:00 +0000 cxgbe(4): Use the correct size for the CIM LA on the T6. The logic analyzer in the T6 CIM block has a different capture size than previous chips. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/common.h | 1 + sys/dev/cxgbe/common/t4_hw.c | 7 +++++-- sys/dev/cxgbe/common/t4_hw.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index cd1e648f8e59..0861e3df4bee 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -313,6 +313,7 @@ struct chip_params { u32 sge_fl_db; u16 mps_tcam_size; u16 rss_nentries; + u16 cim_la_size; }; /* VF-only parameters. */ diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 41063d5c7d76..c18243e4b681 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9303,6 +9303,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO, .mps_tcam_size = NUM_MPS_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T5 */ @@ -9317,6 +9318,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO | F_DBTYPE, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T6 */ @@ -9331,6 +9333,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = 0, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = T6_RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE_T6, }, }; @@ -9386,11 +9389,11 @@ int t4_prep_adapter(struct adapter *adapter, u32 *buf) /* Cards with real ASICs have the chipid in the PCIe device id */ t4_os_pci_read_cfg2(adapter, PCI_DEVICE_ID, &device_id); if (device_id >> 12 == chip_id(adapter)) - adapter->params.cim_la_size = CIMLA_SIZE; + adapter->params.cim_la_size = adapter->chip_params->cim_la_size; else { /* FPGA */ adapter->params.fpga = 1; - adapter->params.cim_la_size = 2 * CIMLA_SIZE; + adapter->params.cim_la_size = 2 * adapter->chip_params->cim_la_size; } ret = get_vpd_params(adapter, &adapter->params.vpd, device_id, buf); diff --git a/sys/dev/cxgbe/common/t4_hw.h b/sys/dev/cxgbe/common/t4_hw.h index e943acb8dec9..79ec690cd5e6 100644 --- a/sys/dev/cxgbe/common/t4_hw.h +++ b/sys/dev/cxgbe/common/t4_hw.h @@ -66,7 +66,8 @@ enum { CIM_NUM_IBQ = 6, /* # of CIM IBQs */ CIM_NUM_OBQ = 6, /* # of CIM OBQs */ CIM_NUM_OBQ_T5 = 8, /* # of CIM OBQs for T5 adapter */ - CIMLA_SIZE = 2048, /* # of 32-bit words in CIM LA */ + CIMLA_SIZE = 256 * 8, /* 256 rows * ceil(235/32) 32-bit words */ + CIMLA_SIZE_T6 = 256 * 10, /* 256 rows * ceil(311/32) 32-bit words */ CIM_PIFLA_SIZE = 64, /* # of 192-bit words in CIM PIF LA */ CIM_MALA_SIZE = 64, /* # of 160-bit words in CIM MA LA */ CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */ From nobody Tue Jan 9 22:16: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 4T8ldT0rdxz56bSV; Tue, 9 Jan 2024 22:16: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 4T8ldS5ydsz4GGL; Tue, 9 Jan 2024 22:16:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704838588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bFFHuXcRcOPiB9UWKQnJlLaIyuOC/eQX0OnKBPwWK1I=; b=C8O+CSnLa7SvuyRqv0yyHhJYsCrAOaaColIKph/Bpht4WG2SOuaeLrV2GD3OElNkUJC6zH CFeNtmqFNVXhrsnsVqRMY2331lmjEC8gl7qmFte3cfBPcsci3616SEnXrfm4H+2bujjND7 3zjIv9E6TuudGEmzFMp3m65YLx/LaiprXPuqq37k2aV5jJ/9M9mvpK27TsKACooIysXMli dVw7egF5A6XY6UewyjlK2KM55QLQWmQsXRDjYP9Uh8AWor+20w4wEFpEsoiS24XLJIxfx7 1GI7O7tWm0M0NF0O1LTNyiTgyOwJmZF7/mottUVN8Tmb5rG1jugYHLKqkmMbKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704838588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bFFHuXcRcOPiB9UWKQnJlLaIyuOC/eQX0OnKBPwWK1I=; b=EF8q32bruebvBLORtLpRI3QERk8xIs9aRwEAVWHxzKGxUVu1ZvELed/YQ5m+KJpdrDJMGv a3UMl2KLlX5E4AxNCvcll2PnPA13mtoYP3m50Q/yNtIFETT5pCSXxVck115LN0d5qe+7wP MsBK4kTsRSUr2opZvZ+4fKfDHOX4vN/6AOakUM75MSc55bPbU8rNLuhy3Mgqg+o6uE7GxV 36hOqxWS18kTdjw5j2AT1ShzjcOgTn8EUJSNs2Wo5FHcQFkGPqaXXUomKs6QnxAnVBUMl8 k9GO88W9ZH4BjeDRyYj8J0LblD5swtSjYGcqwHGl3ml6I6xnijSbhfJlps8W7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704838588; a=rsa-sha256; cv=none; b=ojnmd6KCri9F6j55xiLcdk6iLIm5g58H3gPeZszVgL0ey3lbCViigvwL8A2nV2jRt7tOW0 T+RR0mLpcK1FdkbtAHNb+vNLrUPJa+aXbKQBxheYiwRbnhyvjSgDJ+3a5NrKgQzVrxVGik LWF7xuWmuHD0j+SvhXfmlNqr377Lwm5e2GRp47WsuNoeglRbC8qwqH/MLIhwKhAwWpf6mA 9opcYuefMe/nOSTQJcvcSz6t+eMM/xkGfYmJLcQVicQGD41h3dY158BXSYwKZGp93XB5Vd ReMZmBxh9KmI2DNHBys0HAuZ4WWE+3ELR6TI6Jr1Ec+lJyr+Q+0U/Iuy1rDLmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8ldS525Lz17rF; Tue, 9 Jan 2024 22:16: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 409MGSIL019011; Tue, 9 Jan 2024 22:16:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409MGSc5019008; Tue, 9 Jan 2024 22:16:28 GMT (envelope-from git) Date: Tue, 9 Jan 2024 22:16:28 GMT Message-Id: <202401092216.409MGSc5019008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 0d6d28ce5650 - main - e1000(4): Remove disconnected SYSCTL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d6d28ce5650d1cd23dbe4bbac87fb103b3e2d3d Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=0d6d28ce5650d1cd23dbe4bbac87fb103b3e2d3d commit 0d6d28ce5650d1cd23dbe4bbac87fb103b3e2d3d Author: Marius Strobl AuthorDate: 2024-01-09 21:41:49 +0000 Commit: Marius Strobl CommitDate: 2024-01-09 22:15:44 +0000 e1000(4): Remove disconnected SYSCTL The global hw.em.rx_process_limit knob has been replaced by the device- specific dev.IF.N.iflib.rx_budget along with the conversion to iflib(4). While at it, remove the - besides initialization of tx_process_limit - unused {r,t}x_process_limit members. --- sys/dev/e1000/if_em.c | 11 ----------- sys/dev/e1000/if_em.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 8488f72c4cde..690d6dfa3218 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -542,13 +542,6 @@ static int em_debug_sbp = false; SYSCTL_INT(_hw_em, OID_AUTO, sbp, CTLFLAG_RDTUN, &em_debug_sbp, 0, "Show bad packets in promiscuous mode"); -/* How many packets rxeof tries to clean at a time */ -static int em_rx_process_limit = 100; -SYSCTL_INT(_hw_em, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, - &em_rx_process_limit, 0, - "Maximum number of received packets to process " - "at a time, -1 means unlimited"); - /* Energy efficient ethernet - default to OFF */ static int eee_setting = 1; SYSCTL_INT(_hw_em, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &eee_setting, 0, @@ -561,8 +554,6 @@ static int em_max_interrupt_rate = 8000; SYSCTL_INT(_hw_em, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &em_max_interrupt_rate, 0, "Maximum interrupts per second"); - - /* Global used in WOL setup with multiport cards */ static int global_quad_port_a = 0; @@ -832,8 +823,6 @@ em_if_attach_pre(if_ctx_t ctx) sc->media = iflib_get_media(ctx); hw = &sc->hw; - sc->tx_process_limit = scctx->isc_ntxd[0]; - /* Determine hardware and mac info */ em_identify_hardware(ctx); diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index ebf0be7426a0..244762e8ed0d 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -480,8 +480,6 @@ struct e1000_softc { u16 num_vlans; u32 txd_cmd; - u32 tx_process_limit; - u32 rx_process_limit; u32 rx_mbuf_sz; /* Management and WOL features */ From nobody Tue Jan 9 22:16:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8ldV1XzXz56bLC; Tue, 9 Jan 2024 22:16: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 4T8ldT6Tq5z4GRX; Tue, 9 Jan 2024 22:16:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704838589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSe0+Bdmykx3y9TGmIBEHhUkMoF6buOMegiB9XMn0lI=; b=Z+A0UiBORm+UfYbG9y1QlbOIk0JoX+AO2VPc6M7nvxm9yVMmbewSt6Vgeage3UmwtDCMWb djKaBQTP9mcCGhnPJAsdd+oL5XBNrLRC4pwjVAVDDou3Pp/6pPwy017wEcTx3bhVbGmyqe fV+0GqUXoJ3w2g3cpdxNVVOsO7j4K1B65svgErNsFHbm7uTOnhA35F5odeTBNNi65pxt7x 1HssL2R9vIDORAMpVyet7zW5Z/XAtiuSMWuzvyP9HgVTuI7gsZ+s0baArPfgSsSXQ+BfWr uVBIVmTwIefgfyRYW1EEE6UGDNuIUuBcf2qme1nyG4nUYN6uMcxkCNuTl1U4Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704838589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSe0+Bdmykx3y9TGmIBEHhUkMoF6buOMegiB9XMn0lI=; b=ltw59TH/XY2cSJgtL3FAxDPLMZwm+wTxPhO4W0QVLe8/tEDRccPHKGlPCcMLoy4JqETvtm JutwVN2DHN7Vwe4D0VEiYoKw0v7XDhC34i8YmKvw24msK0e/glxnDOu4kt3XTXkR22raRu Yo3TUrDnLSgi6kroVdnoHir3CTQlcIACm1X3ztQzUJill79cDDXWCxH24NMaB+jXd1qaJt r1M5Qj+FWIesNrql/EjypuT5FbSVnKDMrR9oVIf4Ql1I24y3w6TEYjtrgUEcLvRI1LcvKq LMJyH4yjWqlVsAbkHlnGh0E88g/crJAdw6cJeA0HSSU19vSL5fL1r5uqk5BNiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704838589; a=rsa-sha256; cv=none; b=MDNMfxU3AvRN7dh2eFO9hP1WEZBkEd/+W3aI5L7Dnj23U6VUF1xsLnKWuAaKmJ/jh6l2UP ZoewSAPOeetwrTjjS2W7vZnAn7slyJPEdhSUX8qp4t2MKOg2uqKol9vlgjjOwKWzm8tHzl 2ceGxMjEGN/1oQZx9ORBlQFX9fAj5R2sCsyzr5fcqyZsFYS9pRLculnujcD9LmR1iXZgVg pVY2mQXNT0DrEgYj/KWs1C8Qz7sBR+673V7aMv/YtglUhyF8a+BhEpfSub+de5SbTWKYWX 1xDKeUSmyoH+J/UxcAtTRGzGpZB0qMlCBlXQ5M1sygkbJK0JB85PyTxi7h1GgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8ldT5ZNSz17Wp; Tue, 9 Jan 2024 22:16: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 409MGTVr019057; Tue, 9 Jan 2024 22:16:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409MGTMA019054; Tue, 9 Jan 2024 22:16:29 GMT (envelope-from git) Date: Tue, 9 Jan 2024 22:16:29 GMT Message-Id: <202401092216.409MGTMA019054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: f221d35be7a5 - main - igb(4): Remove disconnected SYSCTL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f221d35be7a5749e2a1246c81adc9c03c1dc545c Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=f221d35be7a5749e2a1246c81adc9c03c1dc545c commit f221d35be7a5749e2a1246c81adc9c03c1dc545c Author: Marius Strobl AuthorDate: 2024-01-09 22:01:46 +0000 Commit: Marius Strobl CommitDate: 2024-01-09 22:15:44 +0000 igb(4): Remove disconnected SYSCTL The global hw.igb.rx_process_limit knob never was adhered to by the in-tree version of this driver but similar functionality is available via the device-specific dev.igb.N.iflib.rx_budget. While at it, remove the - besides initialization of tx_process_limit - unused {r,t}x_process_limit members. --- share/man/man4/igc.4 | 6 +----- sys/dev/igc/if_igc.c | 9 --------- sys/dev/igc/if_igc.h | 2 -- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index f77581edd00b..cf36e584a679 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -3,7 +3,7 @@ .\" Copyright 2021 Rubicon Communications, LLC (Netgate) .\" SPDX-License-Identifier: BSD-3-Clause .\" -.Dd May 10, 2021 +.Dd January 9, 2023 .Dt IGC 4 .Os .Sh NAME @@ -118,10 +118,6 @@ maximum delay in which a transmit interrupt is generated. .It Va hw.igc.sbp Show bad packets when in promiscuous mode. Default is false. -.It Va hw.igc.rx_process_limit -Maximum number of received packets to process at a time. -Default is 100. -A value of -1 means unlimited. .It Va hw.igc.eee_setting Disable or enable Energy Efficient Ethernet. Default 1 (disabled). diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index a0f0906e30da..bfa33c82f7ba 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -254,13 +254,6 @@ static int igc_debug_sbp = true; SYSCTL_INT(_hw_igc, OID_AUTO, sbp, CTLFLAG_RDTUN, &igc_debug_sbp, 0, "Show bad packets in promiscuous mode"); -/* How many packets rxeof tries to clean at a time */ -static int igc_rx_process_limit = 100; -SYSCTL_INT(_hw_igc, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, - &igc_rx_process_limit, 0, - "Maximum number of received packets to process " - "at a time, -1 means unlimited"); - /* Energy efficient ethernet - default to OFF */ static int igc_eee_setting = 1; SYSCTL_INT(_hw_igc, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &igc_eee_setting, 0, @@ -466,8 +459,6 @@ igc_if_attach_pre(if_ctx_t ctx) adapter->media = iflib_get_media(ctx); hw = &adapter->hw; - adapter->tx_process_limit = scctx->isc_ntxd[0]; - /* SYSCTL stuff */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index 7a30f5956016..0c22ce9f76f4 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -372,8 +372,6 @@ struct igc_adapter { u32 txd_cmd; - u32 tx_process_limit; - u32 rx_process_limit; u32 rx_mbuf_sz; /* Management and WOL features */ From nobody Tue Jan 9 23:00: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 4T8mc66mDrz56jKb; Tue, 9 Jan 2024 23:00: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 4T8mc66CtWz4LWt; Tue, 9 Jan 2024 23:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrxaW6p+ytZitJE80S723t681LJGXL0nmf24Pj6EiDc=; b=h2wSMuUYPUqTEtB9YC1xWXJiU8rwa/wZRjQrNC/zMEAjf++nHKIyKrPI3GFfd3LkZyGBs3 RfQZizl/RcfVekDF7ybBT2fC4GVUdhZvbp9YH2MMcP02ll48zEYqXKcdO+j4hdIUmhRfAR DVQlg44fc6rgqHKdEcv7dUw9J0cxasG3CUuFCuwX1iHC4KTtHQE5NAinAqjDvb1KaAEguQ ZsdYF7EIdgoP/r/eAETZkXR4KlPYgFYMpZTeYefjrBZ7ulQplHj/Br2S3DguGnVkgxHCgz R7P2mNPILmwstd9ipfQOPZkf6HhK2kuCqLbarmgJ9oCmkDGD09V8hmTcW5HuUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrxaW6p+ytZitJE80S723t681LJGXL0nmf24Pj6EiDc=; b=HQ6EaRVGdOQM7Tpd8Tgy4PkAXDjFGnu+T5pLKG4AJzFt+J5nzEXJ/4F8HP1ClDymvytj8J QUNxOLrLtxNpbcseYEX50dfyR2rMsGWDbmGbu7Vh+eYl4StKlzAI0TXEOmc6nvlt3uesxK Z6JVVdKi3aB6hpPsiZ/kTJMIIP5wTCS58S3ewlRraOrfdMVb9yibrjx2kRL3ysdOMb/oeg M3b7d3+Ep3GwFRrLEGdfru+Q4lx2mHQpHckOQyv1VjZQFzsCKIOTw5UuHNwl3wHsShqaSP EC2xXOWU4kcx4QFtTN8QepI7Evb6jSAH7SPQ1Wy3zh92w5eDFiPbyM02CMxUZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704841222; a=rsa-sha256; cv=none; b=BkXfSOWzAckimxZsWvJzeIgy21VWU7jSNCO13w3tWQhYX+vqm+okPORULyrEZ1jTUwWMFW qdNe88WT9b+RKt0A3MrHbQEcUg4bPxK9WgQlE7AgErRanHe7Ez8oWlO9knj/4/uOhYlhND iuHHju4R+XfZRvvjcm7hN4BKQ7YdQr1EsrklvQ/EJRYcjeCdswxVg6mJBAF229NLDCDCHa jngCdpP94VWue+PD6gN7gqefDsZL20PqpbP+jSfJhvm6EGZ8Q+Mv6ggGkzTFNsoVKeXxFR LyyPVHoBb+wMS/1LYCKl9wykVDLhy/KL3sE2SidF8Lwh2xzf7Ucfuc/GQH42Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8mc65GCFz18pP; Tue, 9 Jan 2024 23:00: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 409N0MnA095359; Tue, 9 Jan 2024 23:00:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409N0MdC095356; Tue, 9 Jan 2024 23:00:22 GMT (envelope-from git) Date: Tue, 9 Jan 2024 23:00:22 GMT Message-Id: <202401092300.409N0MdC095356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8e2c2992da7a - main - socket_msg_trunc: allocate a large enough buffer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e2c2992da7aab7213b6349ff54dbaf1dcc05678 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8e2c2992da7aab7213b6349ff54dbaf1dcc05678 commit 8e2c2992da7aab7213b6349ff54dbaf1dcc05678 Author: Brooks Davis AuthorDate: 2024-01-09 19:35:37 +0000 Commit: Brooks Davis CommitDate: 2024-01-09 22:59:29 +0000 socket_msg_trunc: allocate a large enough buffer Allocate 9000 bytes to match the largest requsted size. Add a check to prevent the list of sizes and buffer size from getting out of sync again. Reviewed by: markj Found with: CheriBSD Differential Revision: https://reviews.freebsd.org/D43340 --- tests/sys/kern/socket_msg_trunc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index ff0499c4540d..b0ea724f0de0 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -44,7 +44,7 @@ static void check_recvmsg(int cs, int ss, struct sockaddr *sa, const size_t sizes[], size_t nsizes) { - char buf[4096]; + char buf[9000]; memset(buf, 0xFF, sizeof(buf)); for (size_t i = 0; i < nsizes; i++) { @@ -52,6 +52,8 @@ check_recvmsg(int cs, int ss, struct sockaddr *sa, const size_t sizes[], size_t sz = sizes[i]; char tbuf[1]; + ATF_REQUIRE(sz <= sizeof(buf)); + rc = sendto(cs, buf, sz, 0, sa, sa->sa_len); ATF_REQUIRE_MSG(rc != -1, "sendto failed: %s", strerror(errno)); ATF_REQUIRE((size_t)rc == sz); From nobody Tue Jan 9 23:00: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 4T8mc81GQ9z56jKg; Tue, 9 Jan 2024 23:00:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8mc76wsGz4LPQ; Tue, 9 Jan 2024 23:00:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kWqJbMN8mDDyo8JJJesq6FRYZ5+sGMtQmq7tdde7ad0=; b=LemJOsozo1s8tkQsDyS4mojj4nfgbnYra6ya+VDBlcfBfE8rPmOXhFeHCuIXjRuQnBLuOo 2ZvAkxldGaIn1BKCmsy3ZfGL0J4R+lx899c+EwRkU4sv77LrxDdbwfRcX8US13KVmiENbW EkrK9Khltr9bupZENBkcs/0xMJj+TiONnD84mXaFFC++M1TDQHTX7NZIPGDWk5NCrboDNo ENYIMXCfky8W2NaBnvtiomkDQLnh6i7zbSwEYY/i7VKV76QV9afc4UU/z+PwadpagT+kUy IYK5qUW1VVXFnFni2TTKC6RUmq/QRG9i9DtAaFZdrN7Exd5VrC28OFUb8SE6dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kWqJbMN8mDDyo8JJJesq6FRYZ5+sGMtQmq7tdde7ad0=; b=RlytJ8PkPLiV1JIBS5FIIoYCcO6TFOUhK6VohpPOEyu1FWj2YuD6omOXP3EZ+gS2y5mI4a VWxkHwIjtv0FSLTT416t5k6VGs/+2vOlbLVeVntFnKgTtB0FD2ATiH5hPoAe43ZRxIvtBs i0jwoE7NWyFUWuZe5mCLX5x1bLRwzZV/av+9YusBm+/T8gO35xPU4AROhrfbRJ8kVFk5kG /9NASxG6+MYfgTI7/vgyCJGa3kWIKHtV3Su/OM4abgb3TpIj8Pq4yzrJ8t/MKWEAasigG1 kCryX0OfOLK+3+s0Z6KPE9QFnEyrFR2Bkvathd1r2NO4OaAzG28qQNB6FDGtsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704841224; a=rsa-sha256; cv=none; b=og+S7gJOjR013GSSRjNTqA2IRSyPDcGj8hjq0txaKi6fjATbJ/keUNHXpUqNv5NfAHqmVT 5kIFRGZjLpPCDi4NRq+KEQfaXN90iLxvAiQEKb2IgfRwQ48a6WtbzHd+bj97Lkqu/8J1xn traHRmf/SJ1X7ShIsFY7v6G0j6vaznwZDwvyaeVLSzCeOBxBwJjRYRhwxse4oUZ9++a8vr qKH9I/oFffhABBybxFr9rxmKf46OD3leTaG2Tu8GTpq7tiDfiXcPHacs0wvI6N18d/7Jdg 2BxsxGEtKAFyqBUs2E/UlQSHSSPzlpeP67tLPWqzq4CbpN7cD0FKEo35vGdSoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8mc7606Sz18pQ; Tue, 9 Jan 2024 23:00: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 409N0N0F095398; Tue, 9 Jan 2024 23:00:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409N0N7R095395; Tue, 9 Jan 2024 23:00:23 GMT (envelope-from git) Date: Tue, 9 Jan 2024 23:00:23 GMT Message-Id: <202401092300.409N0N7R095395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 13f345cdecd3 - main - powerpc64/SYS.h: implement _SYSCALL_BODY() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13f345cdecd3e208b9226e3b1dcc39737ab2881b Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=13f345cdecd3e208b9226e3b1dcc39737ab2881b commit 13f345cdecd3e208b9226e3b1dcc39737ab2881b Author: Brooks Davis AuthorDate: 2024-01-09 19:37:42 +0000 Commit: Brooks Davis CommitDate: 2024-01-09 22:59:29 +0000 powerpc64/SYS.h: implement _SYSCALL_BODY() macro Add _SYSCALL_BODY() macro which invokes the syscall via _SYCALL() and calls cerror as required. Use to implement PSEUDO() and RSYSCALL(). Reviewed by: jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43322 --- lib/libc/powerpc64/SYS.h | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/lib/libc/powerpc64/SYS.h b/lib/libc/powerpc64/SYS.h index dccd08b63541..bf8bc6cc0e27 100644 --- a/lib/libc/powerpc64/SYS.h +++ b/lib/libc/powerpc64/SYS.h @@ -40,11 +40,7 @@ li 0,(SYS_##name); \ sc -#define PSEUDO(name) \ - .text; \ - .align 2; \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ +#define _SYSCALL_BODY(name) \ _SYSCALL(name); \ bnslr; \ mflr %r0; \ @@ -55,7 +51,14 @@ ENTRY(__sys_##name); \ addi %r1,%r1,48; \ ld %r0,16(%r1); \ mtlr %r0; \ - blr; \ + blr + +#define PSEUDO(name) \ + .text; \ + .align 2; \ +ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + _SYSCALL_BODY(name); \ END(__sys_##name) #define RSYSCALL(name) \ @@ -64,16 +67,5 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnslr; \ - \ - mflr %r0; \ - std %r0,16(%r1); \ - stdu %r1,-48(%r1); \ - bl CNAME(HIDENAME(cerror)); \ - nop; \ - addi %r1,%r1,48; \ - ld %r0,16(%r1); \ - mtlr %r0; \ - blr; \ + _SYSCALL_BODY(name); \ END(__sys_##name) From nobody Wed Jan 10 00:05: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 4T8p3Z4XNdz56tJG; Wed, 10 Jan 2024 00:05:46 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_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 4T8p3Z2JfCz4SFL; Wed, 10 Jan 2024 00:05:46 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Wed, 10 Jan 2024 01:05:22 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Kyle Evans Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c2356a440db9 - main - asa: Rewrite to fix line termination issue. Message-ID: <20240110000522.BLC0pwdG@steffen%sdaoden.eu> In-Reply-To: <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org> References: <202401091627.409GRcI0028831@gitrepo.freebsd.org> <20240109180554.UYZwm9Yl@steffen%sdaoden.eu> <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org> Mail-Followup-To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org User-Agent: s-nail v14.9.24-588-g826cef48a3 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4T8p3Z2JfCz4SFL 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:15987, ipnet:217.144.128.0/20, country:DE] Kyle Evans wrote in <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org>: |On 1/9/24 12:05, Steffen Nurpmeso wrote: |> Dag-Erling Sm=C3=B8rgrav wrote in |> <202401091627.409GRcI0028831@gitrepo.freebsd.org>: |>|The branch main has been updated by des: |>| |>|URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc2356a440db91c106867d45c= 94b\ |>|3d6d7bc0e50f0 |>| |>|commit c2356a440db91c106867d45c94b3d6d7bc0e50f0 |>|Author: Dag-Erling Sm=C3=B8rgrav |>|AuthorDate: 2024-01-09 14:09:41 +0000 |>|Commit: Dag-Erling Sm=C3=B8rgrav |>|CommitDate: 2024-01-09 16:27:15 +0000 |>| |>| asa: Rewrite to fix line termination issue. |>| |>| The standard is somewhat unclear, but on the balance, I believe \ |> ... |>| - Second, it unconditionally emits a newline at the end of the outp= ut |>| for non-empty input, even if the input did not end with a newline. |> ... |>=20 |> I want to point out that POSIX only knows about text files which |> end with a LF newline. Otherwise it is not a text file. (I think |> Stallman and emacs joke on this by allowing something else, iirc |> from before Y2K when i shortly used it, and, funnily, from some |> thread on another ML just last week or so, where it was claimed |> that this could have roots in emacse not rooting in UNIX.) | |It notably defines a text file as zero or more lines, and doesn't say=20 |anything about incomplete lines -- just that none of the lines contain=20 |NUL characters. One can conclude without further information that a=20 |trailing LF is not at all required in any circumstance, it's just an=20 |incomplete line. I must admit i have not looked at the actual changeset code, only the commit message. (I have waited until the "ghost hour" passed until i answered this.) --End of <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org> --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From nobody Wed Jan 10 00:58: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 4T8qDK3TDCz5739d; Wed, 10 Jan 2024 00:58: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 4T8qDK2wGRz4ckj; Wed, 10 Jan 2024 00:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704848305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpJprHIl4F+uDzMu+o6T5IfZiZ8BEZ/QIGL+GRoGfLs=; b=r+xxP3kFVayoDsL0xQ5GvfFoK5CPsceSqZyEbk4ujHOxWSI80AmSPjyToWZpVLlP3dBRaW +e0jYosWT+xiTYzkUGX4AGsmLgpTLVNuxYug1kX0B9gt7b5+slIXA8zZc2JURW0SefzEVP Ez5gUswvyfoX0WvAKyeFHaIhlOlhM9lFKviHiiow9Ts0zNpNSpBygnw7HOtksd9hXZzO0a wsNyP4BzfEvRfTS9v7/uDbg6AHPtju443QrNvHCPsfRDZcAnFzUdLLWxi6u554yy0NhbuG KW18H2EOXbt6rSROgVwaQbtFLHY0DiUqkbj72OSdyybbRhh/EN++4vE4rYUZGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704848305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpJprHIl4F+uDzMu+o6T5IfZiZ8BEZ/QIGL+GRoGfLs=; b=uiTxnV/1TnQYkHMvXq64dSvzwOiwxzwg7ZxPziPQZVheuY5blVR7LdUKhKpuesXi1YGlYf nZ2Wm1WbyoqPlUsQjAar+c4NXYmE0qgHkBiVzSlzFxkS+mNzk4dFE7biNBkkfOmZq2iyLL o4+ZGjQV6NCkWrYWRCvK0cfJqR53B4DJJEulTDY6IOkmWoA+tJxCEFsAm3vn8VxKG9gz1a 2thsHe18vxyB+O4q930RWI74fVokHWFhr7DrHH2mDR57c9RYReRnl98b6JNNgrpyl1+3PB vncGyF455fITtp/pqtE4sUrB0Izkia02yvVyxDi6iItZUnAd5NB8rvoFwUBndA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704848305; a=rsa-sha256; cv=none; b=B4pOS9PpMAT2nyEWXCSRefE94XterUBk3BAFtBT5qKUpSICTLlM1uwN9nd7bgCkoUzZUHR wMMNFBeEcRl7jpWiDFy5YjAuIecdatJjzfUv1ZHoWnJMgxSBVlGNSZkesi2JbrpDbbR5nO WS5AnwDHS8p6MXaEacmMBIuswHUCSOQwxxEOKoVMuhmY82uAKKR0wqCGJUdByRCjI+v+MT 0WNoT1W+CKqe03dqvpxHgGoP5OKvyAGLLgk/aZGE0DTOahAqOYDxLkjEPceyoMfkjBkG2X 3qFwKQKrVDCIuC1yaMnUi1v1FmWzlTyNd5cG+dmpdK7RMasqosxkorrr7UrTPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8qDK1gl8z1CkS; Wed, 10 Jan 2024 00:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40A0wPki087538; Wed, 10 Jan 2024 00:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A0wPUS087535; Wed, 10 Jan 2024 00:58:25 GMT (envelope-from git) Date: Wed, 10 Jan 2024 00:58:25 GMT Message-Id: <202401100058.40A0wPUS087535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 8338ea1d3cc7 - main - tests/netlink: add minimal test for a group writer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8338ea1d3cc705f08674285a884d3aa485bf6290 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8338ea1d3cc705f08674285a884d3aa485bf6290 commit 8338ea1d3cc705f08674285a884d3aa485bf6290 Author: Gleb Smirnoff AuthorDate: 2024-01-10 00:56:51 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-10 00:56:51 +0000 tests/netlink: add minimal test for a group writer Subscribe a socket for RTNLGRP_IPV4_ROUTE announcements, add & delete a route and check that announcements came in. --- tests/sys/netlink/netlink_socket.c | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/sys/netlink/netlink_socket.c b/tests/sys/netlink/netlink_socket.c index 51a3824a31f2..3015a585199b 100644 --- a/tests/sys/netlink/netlink_socket.c +++ b/tests/sys/netlink/netlink_socket.c @@ -39,6 +39,9 @@ #include #include +#include +#include + #include static struct itimerval itv = { @@ -253,6 +256,51 @@ ATF_TC_BODY(sizes, tc) cmsg_check(&msg); } +/* + * Check that NETLINK_ADD_MEMBERSHIP subscribes us. Add & delete a temporary + * route and check if announcements came in. + */ +ATF_TC_WITHOUT_HEAD(membership); +ATF_TC_BODY(membership, tc) +{ + struct { + struct nlmsghdr hdr; + struct rtmsg rtm; + struct nlattr rta_dst; + struct in_addr dst; + struct nlattr rta_oif; + uint32_t oif; + } msg = { + .hdr.nlmsg_type = RTM_NEWROUTE, + .hdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL, + .hdr.nlmsg_len = sizeof(msg), + .rtm.rtm_family = AF_INET, + .rtm.rtm_protocol = RTPROT_STATIC, + .rtm.rtm_type = RTN_UNICAST, + .rtm.rtm_dst_len = 32, + .rta_dst.nla_type = RTA_DST, + .rta_dst.nla_len = sizeof(struct in_addr) + + sizeof(struct nlattr), + .dst.s_addr = inet_addr("127.0.0.127"), + .rta_oif.nla_type = RTA_OIF, + .rta_oif.nla_len = sizeof(uint32_t) + sizeof(struct nlattr), + .oif = 1, + }; + int fd; + + ATF_REQUIRE((fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) != -1); + ATF_REQUIRE(setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, + &(int){RTNLGRP_IPV4_ROUTE}, sizeof(int)) == 0); + ATF_REQUIRE(send(fd, &msg, sizeof(msg), 0) == sizeof(msg)); + msg.hdr.nlmsg_type = RTM_DELROUTE; + msg.hdr.nlmsg_len -= sizeof(struct nlattr) + sizeof(uint32_t); + ATF_REQUIRE(send(fd, &msg, msg.hdr.nlmsg_len, 0) == msg.hdr.nlmsg_len); + ATF_REQUIRE(recv(fd, &msg, sizeof(msg), 0) == sizeof(msg)); + ATF_REQUIRE(msg.hdr.nlmsg_type == RTM_NEWROUTE); + ATF_REQUIRE(recv(fd, &msg, sizeof(msg), 0) == sizeof(msg)); + ATF_REQUIRE(msg.hdr.nlmsg_type == RTM_DELROUTE); +} + ATF_TP_ADD_TCS(tp) { if (modfind("netlink") == -1) @@ -261,6 +309,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, overflow); ATF_TP_ADD_TC(tp, peek); ATF_TP_ADD_TC(tp, sizes); + ATF_TP_ADD_TC(tp, membership); return (atf_no_error()); } From nobody Wed Jan 10 06:10:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8y801yXZz562N6; Wed, 10 Jan 2024 06:10:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8y8004KGz4b78; Wed, 10 Jan 2024 06:10:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704867008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tr+tS2HsY3pDhAWOl0/9mkvUTMpRaUyeDk1dah0ZkfQ=; b=KupuUMAvD1RIfn4i1QLStuIeULAwwqZzupU3CousAhsdMz1YumJxu/x67gD1kpTQgzrQnP yre1Td48gI2SWb3obZ+OEU2i9V/qmA08zxNnRaDOGT/5kCClgYn9Y3VUnROD7ZRQXOH2YO qdsVXSB6z3MjqamiUU/xf/CFOP348FTUojPpU8f91JEG1+nM8wCnsMTAv9ityKzaY8yNdh AmCj9GiIPMGMzh0RUn1CqWF8eXs/OdOIlHs+T71w7kCAafdXBfPvJiibIFewq4nE1r8ujJ hxyVZi3PMp6d4iZOGfqPA0rqwPlYC/Tixem4wkllCnvxz57iO04FWhAq7ExMAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704867008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tr+tS2HsY3pDhAWOl0/9mkvUTMpRaUyeDk1dah0ZkfQ=; b=s6TDMls1Viqc9HQUsy8m0QJT3e/pE5Sv/vNcb8aPB9jm2Br8j65qujmazAg4mxM4gA9uh4 VmfZFuYQop+rfT73WFYV8HU1/EHcNbzwPOZxe76JZWZYHGpo4/GXu8c7fXJMSLjTMIIUot eFmB6NkG8AFTGwwD1jkNZ7TjVZIaSi3/zi2SJGdsBCUk2Y9yBVSa5ziVzwrZFG6fURFKKm z0m+qdSqJSnYoqpCkULueGlG7MXX9He9NjOCUrtmSbhN58Fl0jas0kpLHlyDX7fRxiXm5D fTXw02QFYCxT5ip2/9tVLfE1LDmTkp1K8vV1TDLv2p5zbWKKXVbqIv0IWKP1Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704867008; a=rsa-sha256; cv=none; b=QzlrzE0rrizttBzoZHCtSYWcfq41Ey9Z4675XGDYrLIXbl9FpPwfTicoLNYj1Sr4xwuphk 9I95wSqTqdEC790uLZpes6FXdxL87ksX1mL8WmWRZc2y7fKdO/W3HTVwqhA1HWJo38P1Me R5GyjPVZfyMVaXt/isSZLANv1zwt2h9OfLYMb0z3ZMx7fck+RHVsoyUkvo1LuqIW7v8u22 d5aYekxScalrY9OvMsv2EHoVqMWSb28UXJ11gHeWtC3WnEIZ43gy3FUw104sxGMMsKmV6/ doA4uBwBrDO2S/pCOtHP2t0162TH9GxREpzF1XglbLfaKWTRm4sMNJR7UkDJZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T8y7z6Gq0zNZY; Wed, 10 Jan 2024 06:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40A6A7OF012215; Wed, 10 Jan 2024 06:10:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A6A7te012210; Wed, 10 Jan 2024 06:10:07 GMT (envelope-from git) Date: Wed, 10 Jan 2024 06:10:07 GMT Message-Id: <202401100610.40A6A7te012210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: dafd0d685531 - main - History for arc4random_*() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dafd0d685531e8bc42d51b2128c287137791894b Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=dafd0d685531e8bc42d51b2128c287137791894b commit dafd0d685531e8bc42d51b2128c287137791894b Author: David E. O'Brien AuthorDate: 2024-01-06 06:01:00 +0000 Commit: David E. O'Brien CommitDate: 2024-01-10 06:09:47 +0000 History for arc4random_*() --- lib/libc/gen/arc4random.3 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/libc/gen/arc4random.3 b/lib/libc/gen/arc4random.3 index 62b62e883e9c..1d5b3b9f43cb 100644 --- a/lib/libc/gen/arc4random.3 +++ b/lib/libc/gen/arc4random.3 @@ -132,6 +132,17 @@ functions using .Sh HISTORY These functions first appeared in .Ox 2.1 . +.Fn arc4random +first appeared in +.Fx 3.0 . +.Fn arc4random_buf +and +.Fn arc4random_uniform +first appeared in +.Fx 8.0 . +.Fn arc4random_stir +was removed in +.Fx 12.0 . .Pp The original version of this random number generator used the RC4 (also known as ARC4) algorithm. From nobody Wed Jan 10 07:45: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 4T90GH5p9Jz56K80; Wed, 10 Jan 2024 07:45: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 4T90GH3zxKz4rdF; Wed, 10 Jan 2024 07:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704872743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F+pzVczgbZUOMvXRsv3VD0y2ndvSIN1nCv4DWL3CClM=; b=HP+4dyv0EiK/TFzAuIOk/MDJ1VgqBqvxoA+dIRFxJ2hEyieRZt6KIIb9cTUcjMzdF7D+T9 yCpGHpRok2zEhpGWmN03g9V4SIG8qIcPpFpG6Rd6qdeuF9Ik1Kl+/fYQfC6z+q5JsLtOTI 0eYcsBVDGP7J6DmEVYUytJ0sH4npf2w4h8hiyrCwRiGJ8RI+K01GP8mDB3n7xmlOsSlLL+ NETT44W7aKuNIuhxWzhjLXm0SB/IZq3FlRD/+w4Ovw4I1HQomr2BrSiFwd6794q1yUpjey URRz4fBpeXI/PKBpE71FVXmEvJ1k/RnbTVeG/VGU1STCySH/gSTLowXAdav44Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704872743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F+pzVczgbZUOMvXRsv3VD0y2ndvSIN1nCv4DWL3CClM=; b=jEdLLveWlshfX2PRZIeLRlLoU79jcteobKGOq+9dmgIkTLwXAz3VR13ojHznOGCV4Ewu/c D53GgZMdq57OLg+qqrtQ/7KZIvbKr0gW/tUCjZAHyDxeS6NefmP4v5knwsSGlWXoIK1eFf iZNl01DomGCpjEawvPdGQy/li7ru8N2eZ4kGspNk1r908n+snCOaFW3zT0E7q/FMRH9shC eLITW4PWxAzOQH2bGhzawLZJL3qsMnxyS1y+WHHewYi0B6Bbf2qEmU3nBXr/xiIo4VjMaE nVFog5dF3k+hSAadiH7CgYQeljvNbRStb5yIfkDpgf4O8+QmpE7HAcp63LwWBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704872743; a=rsa-sha256; cv=none; b=Dk/cDYrNQkon6dRN31m2JuZ+9QJLSWdiqe3f16VlATOAMejsVy+8phiXfVhP2FXXHbvmzA QrXVnORLzs/6DkqZzXE6QuXewRKyfbn5myjlk87WEaWi6wuRXX8Xnso27MazV2+QsjRaWT OpBBeBiG+w+zn/pD+WjBKXxWA5wxRLAcEiLsG004qOexcQ+9AS2WFpchPuMCQRjJ5s4eTD 40GNzYfjDq6xBfyyLn2tJ2Ra4w4z5AwgaUklEJ/ymfURv0LuIgnlH7pO3X94DWtTMEGNVh FdP9vEgeISD60hLoHq//YjhvxlkMlnRPsDN0OQWmiBzVdJfxRZK00XyLLoggAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T90GH34VvzR0Z; Wed, 10 Jan 2024 07:45: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 40A7jhob075354; Wed, 10 Jan 2024 07:45:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A7jhDe075351; Wed, 10 Jan 2024 07:45:43 GMT (envelope-from git) Date: Wed, 10 Jan 2024 07:45:43 GMT Message-Id: <202401100745.40A7jhDe075351@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: 13720136fbf9 - main - tcpsso: fix when used without -i option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13720136fbf951a7b472ce086c9cf2de702799ab Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=13720136fbf951a7b472ce086c9cf2de702799ab commit 13720136fbf951a7b472ce086c9cf2de702799ab Author: Michael Tuexen AuthorDate: 2024-01-10 07:33:09 +0000 Commit: Michael Tuexen CommitDate: 2024-01-10 07:33:09 +0000 tcpsso: fix when used without -i option Since fdb987bebddf it is not possible anymore to use inp_next iterator for bound, but unconnected sockets. This applies to TCP listening sockets. Therefore the metioned commit broke tcpsso on listening sockets if the -i option was not used. Fix this by iterating through all endpoints instead of only through the bound, but unconnected ones. Reviewed by: markj Fixes: fdb987bebddf ("inpcb: Split PCB hash tables") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43353 --- sys/netinet/in_pcb.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index fa0d7309058e..981654577deb 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2950,25 +2950,22 @@ sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, htons(params->sop_inc.inc6_zoneid & 0xffff); } #endif - if (params->sop_inc.inc_lport != htons(0)) { - if (params->sop_inc.inc_fport == htons(0)) - inpi.hash = INP_PCBHASH_WILD(params->sop_inc.inc_lport, + if (params->sop_inc.inc_lport != htons(0) && + params->sop_inc.inc_fport != htons(0)) { +#ifdef INET6 + if (params->sop_inc.inc_flags & INC_ISIPV6) + inpi.hash = INP6_PCBHASH( + ¶ms->sop_inc.inc6_faddr, + params->sop_inc.inc_lport, + params->sop_inc.inc_fport, pcbinfo->ipi_hashmask); else -#ifdef INET6 - if (params->sop_inc.inc_flags & INC_ISIPV6) - inpi.hash = INP6_PCBHASH( - ¶ms->sop_inc.inc6_faddr, - params->sop_inc.inc_lport, - params->sop_inc.inc_fport, - pcbinfo->ipi_hashmask); - else #endif - inpi.hash = INP_PCBHASH( - ¶ms->sop_inc.inc_faddr, - params->sop_inc.inc_lport, - params->sop_inc.inc_fport, - pcbinfo->ipi_hashmask); + inpi.hash = INP_PCBHASH( + ¶ms->sop_inc.inc_faddr, + params->sop_inc.inc_lport, + params->sop_inc.inc_fport, + pcbinfo->ipi_hashmask); } while ((inp = inp_next(&inpi)) != NULL) if (inp->inp_gencnt == params->sop_id) { From nobody Wed Jan 10 08:48:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T91fQ5K7Yz56Vjr; Wed, 10 Jan 2024 08:48: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 4T91fQ2sXlz421h; Wed, 10 Jan 2024 08:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704876494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+aZ/ZWPUKpFpXE5EFkV5MPSN6HPoURuiHEO0lUGH8Os=; b=gFVLfqAv1YEB0hIsdFi66MSQA+EqdXerLk/PyvhvhstNOE8A20Unp3iKQvEUn7NVuWLJso I2L/apuB9DyTJDLTzPCCSu9QLvJHAA6Uw+gXwJ7NjTUmMQgYCAoAp2FGcoXhnxYSobnrjq k2ytlOs5g8rqOggbwCH7RLzVnUrQvlXd9dAv4ehOkdyvRUXYpOPj9UjJUkbEMW4vLwQ1Ku /PMEQn3ne6YquY7I9foPcB5LmjbdQpMDSloVnKbgANGTSv6z/wOqZqgAAT4h7KDMhI3OEa ywqDrC2+nEGAp0+k7I7wu7OTgjGpLjSc5nAFdR03fmoXsGojbsa15XHuoGgpxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704876494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+aZ/ZWPUKpFpXE5EFkV5MPSN6HPoURuiHEO0lUGH8Os=; b=sVIInBmqIwVrOKVUMWY5pNSxXHqIFjl6fHUtChd+h5jePGRIDfE5541DOo+A2LWv4c7RUg gulToHHeBubFW1rV/Kd5VATGJxjeW6u2rh2/eWYkJQVsKZmmyhDjeilyeFwOz54YJQ/7hE Lg/d6IGF6kWKZjn4cR8p9cIbeXzSLeLGntTH+RqQC0NBlVBVNISqyTTPHWSk4I4ZplNHHf VaZ2rj+BnBK1D6trAvMAj7QyXih5KxGY8eDIQhuxSDjAQhF4HHzwGB3XTV8TfKxs4noofh hrK/JLS+BdJ3C/fg/eFswkHsYpeKwmTf0R/+lUhJSS+NGg4PXkBbPkT12GACvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704876494; a=rsa-sha256; cv=none; b=PH5AF6MOWmlg1qY9Ng39nt+Pa/9pDIrqdtk6QEMc4IEakbRA06DL8FLTB9abt7YQ7OOzVo eKtu6D4ZFkAPrcz2gpOskZ71eCaNa2U05F5nBpk4Crof2Us2EeykoeXuyCQO3ce7cgMh1L pV65kWi95M69E/t5d153C4Z0Zg23MdIlR0EbatwmqLC3CmapxjQOzRcQseEnqHxhLkKKJW IV345HilUIB+cGfUTwfNKu+V0aYLDKWolmpOu/RWj8d/4+Kxme8TKwPWdMHIXbGeCZAKqg F0ttvFVqwaCcezFRwgPFOu/lwCuNUg9g9FaYge5ZTnMVdIKhqkDziZcy0x7O6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T91fQ10M4zSQx; Wed, 10 Jan 2024 08:48: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 40A8mE0G077051; Wed, 10 Jan 2024 08:48:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A8mDMI077044; Wed, 10 Jan 2024 08:48:13 GMT (envelope-from git) Date: Wed, 10 Jan 2024 08:48:13 GMT Message-Id: <202401100848.40A8mDMI077044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: f552d7adebb1 - main - zfs: merge openzfs/zfs@a382e2119 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f552d7adebb13e24f65276a6c4822bffeeac3993 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f552d7adebb13e24f65276a6c4822bffeeac3993 commit f552d7adebb13e24f65276a6c4822bffeeac3993 Merge: 13720136fbf9 a382e21194c1 Author: Martin Matuska AuthorDate: 2024-01-10 08:07:45 +0000 Commit: Martin Matuska CommitDate: 2024-01-10 08:18:25 +0000 zfs: merge openzfs/zfs@a382e2119 Notable upstream pull request merges: #15693 a382e2119 Add Gotify notification support to ZED #15732 e78aca3b3 Fix livelist assertions for dedup and cloning #15733 7ecaa0758 make zdb_decompress_block check decompression reliably #15735 255741fc9 Improve block sizes checks during cloning Obtained from: OpenZFS OpenZFS commit: a382e21194c1690951d2eee8ebd98bc096f01c83 sys/contrib/openzfs/cmd/zdb/zdb.c | 11 ++- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 95 ++++++++++++++++++++++ sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 21 +++++ sys/contrib/openzfs/config/kernel-fpu.m4 | 23 +++++- .../include/os/linux/kernel/linux/simd_aarch64.h | 6 ++ .../include/os/linux/kernel/linux/simd_arm.h | 6 ++ .../openzfs/include/os/linux/zfs/sys/trace_zil.h | 14 +++- sys/contrib/openzfs/man/man7/zpoolprops.7 | 4 +- sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 31 ++++--- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 31 +++++-- sys/modules/zfs/zfs_config.h | 28 ++++++- sys/modules/zfs/zfs_gitrev.h | 2 +- 12 files changed, 233 insertions(+), 39 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index f6b8ad1fc472,000000000000..bd060bc882c9 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1152 -1,0 +1,1176 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* Define to 1 if you have the `execvpe' function. */ +/* #undef HAVE_EXECVPE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + ++/* inode_get_atime() exists in linux/fs.h */ ++/* #undef HAVE_INODE_GET_ATIME */ ++ +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + ++/* inode_get_mtime() exists in linux/fs.h */ ++/* #undef HAVE_INODE_GET_MTIME */ ++ +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + ++/* inode_set_atime_to_ts() exists in linux/fs.h */ ++/* #undef HAVE_INODE_SET_ATIME_TO_TS */ ++ +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + ++/* inode_set_mtime_to_ts() exists in linux/fs.h */ ++/* #undef HAVE_INODE_SET_MTIME_TO_TS */ ++ +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + ++/* kernel has kernel_neon_* functions */ ++/* #undef HAVE_KERNEL_NEON */ ++ +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + ++/* shrinker_register exists */ ++/* #undef HAVE_SHRINKER_REGISTER */ ++ +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + ++/* have super_block s_shrink */ ++/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ ++ ++/* have super_block s_shrink pointer */ ++/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ ++ +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* file_operations_extend takes .copy_file_range() and .clone_file_range() */ *** 241 LINES SKIPPED *** From nobody Wed Jan 10 11:51: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 4T95jc64gmz56lmR; Wed, 10 Jan 2024 11:51: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 4T95jc5cJMz4SB4; Wed, 10 Jan 2024 11:51:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704887476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3rICxalQZWJ8I8xyyAn2oI+gsyjsJwGogwrvA0Sii/0=; b=pyzj+IUU4l+WVpGsrDzyNLPndAWRsdUaMOGm87pMv923OVLrzPd8rAJrl61rt3vRv0/nxm r+SG0KIyH/AcDoX5+3c8fBudWtPLjN6YAZZxmfMM+HUhTFIGBqGw4Ps1rWL/HtOco6wDhT Z9wu9jTbSwa3eCeGxCKcowCyFrecJAvUqBAeJ74P9dvzg4yTqd482JDyp2+afH/gsNvP9P c2MDyenZurpQ2J2DuuV/Y/hxpGMFAIfg7lX3Mnwqa04EjHipVL9ZfPx5KV/KROBg/I428h 2J/pp5gdUExzG7QwhMzeEOI2SdcvGTy0JjS69TH+HFZREj7BRqRF4vy7FwoFcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704887476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3rICxalQZWJ8I8xyyAn2oI+gsyjsJwGogwrvA0Sii/0=; b=kpl6rA+VoDVNp4l9LsvVvgQjFxQ4StM0lF+rBbm2f8e25WifJm8m7oSeYdOM+tpHuMVKxt 8nH8sqPfdWV3PzxrjabtB2IkdUu1UP8l4f/CeTNhzY7idJCd4Sep3N0EsRpVt+cp/rP8tb AyKzQcrkXJ1h21QUufwXdEyMa1Wz8ZDoedRATKit3IhGbezPi5ekEDWC7l2nD3/PeZEGxs T14o3VpDAiejUlti1mv/3ZQBa0Cwe5Xvy18JyvGJkiKkk2KM2iqjysDnQI/GbAIA72dG8k rlN5xlY5QMS7JfXrgUn/Hb4DKJDaaNoJ8JyI513CzMLYF+tXBJX5/wmmtX8+jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704887476; a=rsa-sha256; cv=none; b=l4E2UWr/LEssE+p3MZLCEZC40wun6UQtZShpD7qCFNYbPJafjbKPEUJ4Yy7xrzncm8TcQo wVaW3i5wPry0Vyi8SE3M6EB7YzPMO7a9b1yA/+Ct0JsoVycckMb8qmIJf9XEed6j5dCq1T H2mUXOI8htMX+1NcmxtFIKsGxqO++6GPRrzTBw25+vcdiFdy1/i89ak1zoSeWWZER2LN4Q yjmJpBxxOHbrejUn935epbnb+tPrsaxXACIHRpw6I2LVlpO28+bf6SytKXxiSdjtUQ9a8/ arIEJ8CktgRt4yFGqBKzLJkJuMaf9nH1AWICs4OxiE2HR9C4BqtlHYK76hXMxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T95jc4glPzZZD; Wed, 10 Jan 2024 11:51: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 40ABpG32089034; Wed, 10 Jan 2024 11:51:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ABpG4x089031; Wed, 10 Jan 2024 11:51:16 GMT (envelope-from git) Date: Wed, 10 Jan 2024 11:51:16 GMT Message-Id: <202401101151.40ABpG4x089031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 1fa4ddcc6de6 - main - periodic: Fix periodic reports when log files are not compressed. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce Auto-Submitted: auto-generated The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce commit 1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce Author: Yoshihiro Takahashi AuthorDate: 2024-01-10 11:48:56 +0000 Commit: Yoshihiro Takahashi CommitDate: 2024-01-10 11:48:56 +0000 periodic: Fix periodic reports when log files are not compressed. The modern zcat(1) is capable of handling compressed and uncompressed text files, so we can simply use zcat command. PR: 253168 Reviewed by: delphij MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43357 --- usr.sbin/periodic/etc/security/800.loginfail | 7 +------ usr.sbin/periodic/etc/security/900.tcpwrap | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/usr.sbin/periodic/etc/security/800.loginfail b/usr.sbin/periodic/etc/security/800.loginfail index 4329728f9505..c5a3a972aaa1 100755 --- a/usr.sbin/periodic/etc/security/800.loginfail +++ b/usr.sbin/periodic/etc/security/800.loginfail @@ -49,12 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - *.xz) xzcat -f $f;; - *.zst) zstdcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/auth.log ] && cat $LOG/auth.log } diff --git a/usr.sbin/periodic/etc/security/900.tcpwrap b/usr.sbin/periodic/etc/security/900.tcpwrap index ae081ded6a95..55fa58f4df39 100755 --- a/usr.sbin/periodic/etc/security/900.tcpwrap +++ b/usr.sbin/periodic/etc/security/900.tcpwrap @@ -49,12 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - *.xz) xzcat -f $f;; - *.zst) zstdcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/messages ] && cat $LOG/messages } From nobody Wed Jan 10 13:50: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 4T98Ls1XKtz570xX; Wed, 10 Jan 2024 13:50:13 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T98Lr6Svlz4lgL; Wed, 10 Jan 2024 13:50:12 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.17.1/8.17.1) with ESMTP id 40ADo6rG045777; Wed, 10 Jan 2024 07:50:06 -0600 (CST) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1704894606; bh=r59yicVtm8ZWIkZfGFnnm3yQrKXhXrnHessHxH0vAi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nQWNyAGQR02AovNR1tPCjxM1px5xgKChqzSSrUfaVBJvfeSrshNgtmMcpcSpsZXt7 u13xD9oF2R8N2t7Q0IB1oRcp+7dD3fqG/SXsEKkOW9iwPbr0A77IKXH3INHLdjqfxD qUvbhZG1qx2VB0G9wB7zWVqA2/9fj9Hg1H974CSLWvvmRv4N+NdwIyv/uYC2H+Dsrb Ca69Rwj0R3riNvWXOenuFYDfGqJTfODtQ0iw34yHBbOIdIlEpzu1dhfRlc1KDEz+mi 91rYTRGwELsHJn3krXX6XxKZaPjJu2xr2TFLZkoCu1BAJ1yn1TTlHysSzYMK5wW9OU ALH+iKrn1otWQ== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id 8z13Eo6gnmXPsgAAs/W3XQ (envelope-from ); Wed, 10 Jan 2024 07:50:06 -0600 From: Mike Karels To: Xin LI Cc: Xin LI , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). Date: Wed, 10 Jan 2024 07:50:05 -0600 X-Mailer: MailMate (1.14r6015) Message-ID: In-Reply-To: References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4T98Lr6Svlz4lgL X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] On 9 Jan 2024, at 11:54, Xin LI wrote: > Hi, Mike, > > On Fri, Dec 29, 2023 at 7:25 AM Mike Karels wrote: > >> On 29 Dec 2023, at 2:46, Xin LI wrote: >> >>> The branch main has been updated by delphij: >> [...] > >> >>> +61174ad88e33: >>> + newsyslog(8) now supports specifying a global compression method >> directly >>> + at the beginning of the newsyslog.conf file, which will make >> newsyslog(8) >>> + to behave like the corresponding option was passed to the newly >> added >>> + '-c' option. For example: >>> + >>> + none >>> + >>> +906748d208d3: >>> + newsyslog(8) now accepts a new option, '-c' which overrides all >> historical >>> + compression flags by treating their meaning as "treat the file as >> compressible" >>> + rather than "compress the file with that specific method." >>> + >>> + The following choices are available: >>> + * none: Do not compress, regardless of flag. >>> + * legacy: Historical behavior (J=bzip2, X=xz, Y=zstd, Z=gzip). >>> + * bzip2, xz, zstd, gzip: apply the specified compression method. >>> + >>> + We plan to change the default to 'none' in FreeBSD 15.0. >> >> Sorry not to have noticed this in the review; it was only when I saw this >> message that it sunk in that we now have *three* ways to specify >> compression, >> and I'm not even sure what the precedence is. I would have thought that >> > > The current precedence is that command line takes highest priority; when > it's not present, overrides all lines with any compression > method. > > The meaning of J/X/Y/Z is changed to "this file is compressible", unless > newsyslog is in legacy mode. It's intentional to discourage the use of > different compression types for different files (because the current > newsyslog.conf(5) format uses one character to represent compression method > and without a change to e.g. UCL or some other configuration language, > supporting additional compression methods would be much more messier). Not if you adopted my suggestion of adding a letter to specify the default compression as specified by . And then J/X/Y/Z would not be overloaded. Why do you want to discourage the use of different compression types for different files? If the feature wasn't there and was being considered, I would say it wasn't worth doing. But it's there, and can't be removed anytime soon. I see no cost in retaining it indefinitely. >> would replace -c. It's a mess if the config file has entries >> that specify J and X flags as well as none, the config file has >> zstd, and the -c option is given as well. We now have a knob >> > > newsyslog would issue a warning if both -c is given and the configuration > file has . > > Part of the reason to introduce was that it would move the > configuration to one place (newsyslog.conf) and there were concerns that > having -c in newsyslog in /etc/crontab is counterintuitive (as raised in > some earlier discussion). > > >> to override the knob to override a knob. The only reason to keep -c that >> I can think of is to specify a different compression in a single >> invocation, >> but as noted, changing compression requires manual operations that make >> it unreasonable to change it invocation by invocation. >> > > The intention of -c was to be added to /etc/crontab, but with the > introduction of it's probably a good idea to just remove the > command line option or at least leave it undocumented? I agree that -c should be removed. Retaining it as an undocumented option seems like a recipe for confusion, and there is not much utility in varying the compression type from one invocation to the next. Mixing types without manually converting the existing files would lead to a mess. >> Also, using the -c option or (except with legacy) loses the >> ability to specify different compression types for different files. >> > > This (the ability of specifying different compression types for different > files) is what I deliberately wanted to get rid of. > > Compression types only make a meaningful difference when files are > sufficiently large, and the purpose of newsyslog is to not allow log files > to grow to an unmanageable size. Rotating files when they are large and > also requesting to compress them means the system would have prolonged > "bursts" of CPU workload at integral hours, which would be even worse for > busy systems where logs tend to have more contents. That's a tradeoff that different people (and systems) might differ on. For systems that produce large log files and are not CPU-constrained, it's a perfectly reasonable choice. I have a firewall that produces large logs and runs on a virtual machine, so the disk is not that large. >> People have objected to the term "legacy" as well. >> > > I don't agree. > > Calling it "legacy" would send a clear signal that the historical way is > discouraged (for people who are using a different compression method, > merging upstream change would be a very painful process). We already have > 4 letters to represent 4 different compression methods, that's almost 1/3 > of all valid configuration letters, and we should stop doing that because > the legacy way is causing problems and won't scale when new compression > methods are added. See my point above. If a new letter was adopted for "the default", then new compression methods would not require a letter, they could be limited to specification with . >> I still think it would be much better to add an option letter to select >> the default compression as specified by . This would eliminate >> the need for "legacy", and it would add the ability to have both a global >> default and an exception. I think the redefinition of the existing flags >> to have different meanings if is given is messy. >> > > I insist the default should be anything except "legacy" -- legacy is for > backward compatibility and should serve that purpose only. I think that bzip2 is the only reasonable default, as switching a system automatically on an upgrade would leave a mess of old compressed files unless people convert manually. Providing a conversion script would be a help though. I don't know why you are so determined to change the default. Changing to "none" is reasonable on many systems, changing to a better method is fine (with manual conversion), and "legacy" methods would include all currently- supported methods. That doesn't sound like legacy to me. It's mostly the configuration mechanism that would be legacy. > The entry for -c says that we plan to change the default to "none" in 15.0. >> Hopefully that would be done via and not -c. However, there >> > > Yes, my intention was to add a line to newsyslog.conf ( > https://reviews.freebsd.org/D43169 ) instead of adding it to /etc/crontab. > > >> was significant pushback on "none" being the default. >> > > I think we should provide a reasonable default. Compression was useful > back in the 90's, but not so much nowadays and makes grep'ing the logs > harder (and for those who want compression, they could choose e.g. 'bzip2' > anyways). This change would also make porter's lives a lot easier as they > could install their newsyslog.conf.d files with e.g. 'J' to indicate that > the file can be compressed, without messing up with the administrator's > decision to not compress or compress it with some other compressor. Or, using my proposal, they could use the new option letter for the default. I think the new default newsyslog.conf should have " bzip2" and use the a new option letter in all the existing entries. That would make it easier to change the default on individual systems without extra hassle in changing the default; only one line would change. As noted above, using compression is perfectly reasonable on many systems. Almost all of my servers run on virtual machines, so don't have unlimited disk space. And support for compression is unlikely to be removed, so pushing for its use to be reduced doesn't seem useful. Mike From nobody Wed Jan 10 14:33: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 4T99KH0Y9nz5754V; Wed, 10 Jan 2024 14:33:55 +0000 (UTC) (envelope-from olce@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 4T99KH03cwz4qvB; Wed, 10 Jan 2024 14:33:55 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704897235; 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=J+NRgPOifgI+ZPdoiiiw5BfKy+B2Fv2doCiSWvzU8q4=; b=ZqqLc4BGKd/6WNQA0jWVrmTSXv02LCHykVQLx6DrSLYlBqugHVB3lpLTU2XSNqe7PtPZGe u5vwd4n4V72zYtbBN5WioqMtowp2AT13C8pFGesbwpxzQKynKiUnpILNhfg5JqNBc9NC6H oDFbOJdimW7zH1pSQTaGmjsyve9FqYFf9T8aJig0WHdhDXkKMgtF+aqBzpboB+dKJ0oth2 7+so5bNx5ybs6H7kmkNtz4Ff0KDBl4wePajJLU+d40JDstnNU23A0+J4XB9W//GBeDxHD4 gUJUbQDO/2tFRKJlaHtyZFd3knDrlOXUQLNjQ71RbQlmLyBcj1rA96efXEwebA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704897235; 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=J+NRgPOifgI+ZPdoiiiw5BfKy+B2Fv2doCiSWvzU8q4=; b=wCjTzOT8tJwarFiYBNyp6TC9KsQCRxVL4HY1mHJkTLOs0qj5WRZN+PF/dICoB4WkQb9NE2 4rIfCvBir1wsXWcmIHj8fbOWncimzB8lkJwKzAQYLLObSwjk5Kf0TY5C5KcOXb3v5rU4hK 27XB8WPQ/MIBuzlBsdq8aChcB3VLn+BnIgHk7GNGfQR07XHMhrBUprXFIftTy2rg9tlv6j /78bBs8qTi3b0ikkQM+BUg3P0mVA5oKQJUuYKWf5IVdZT9vccfBXn9qvXsXgZAggOS05bt uSl/oVB7aQ3GS4iySuC4JLzJwwJEZgFXXnJYkBLz8x9t7P3GNNJPxGjApAn54A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704897235; a=rsa-sha256; cv=none; b=Ytt6xR6rXsxfcBobgcP7XMPtSPX6uS8W59RIoLKkg+Wosufsa/AQTG3yJO2/aN7StRRC2h f7jrNKbtMPJcYhep2Ep65ZijzDjVzWxA37WpEfYI4ptDQegbjtU3K6GP1TyW6MZmU7jzk/ v/bkjpHcAvvmrUDXnveIp2ZlTaDK/vOb92v3RRdXhSMl9X8Bv7XhDPKlEiK5m7wJOLHunu QQxUQGZH+IbxNI37BTreSQvtFDGueNz5pDSfVwFuwA/YrnRJMH9um31AV62t75QeNsQ8SA ED5oZXJerdJFW8aXKkyXc2btom2Q6/pJW89L2rAakaCdju1tRqyJfMsTZgjx6Q== Received: from ravel.localnet (lfbn-nic-1-525-172.w90-118.abo.wanadoo.fr [90.118.140.172]) (using TLSv1.3 with cipher TLS_AES_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: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4T99KF6Wlfz16ZZ; Wed, 10 Jan 2024 14:33:53 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Xin LI Cc: Xin LI , Mike Karels , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). Date: Wed, 10 Jan 2024 15:33:45 +0100 Message-ID: <3130778.jP0jbBhz4e@ravel> In-Reply-To: References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <2683023.poxlI1A5LX@ravel> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2003580.XuNk7dGF6U"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart2003580.XuNk7dGF6U Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner To: Xin LI Date: Wed, 10 Jan 2024 15:33:45 +0100 Message-ID: <3130778.jP0jbBhz4e@ravel> MIME-Version: 1.0 Hi Xin, Thanks for responding. There were several ideas in my mail, some of them contradictory, and at tim= es not grouped properly. I hope it still was intelligible enough. I was mostly concerned about the (future) change of default value, and stil= l am. But I'm also surprised by the premises some of your choices (includi= ng the default value) are based on. To me, they look generally weak, and e= ven for some do not seem to make sense. This is (also) what I would like t= o discuss. I'm probably far from having the most stringent or intensive us= e of log files in this community, and I'm not an expert of SSD wear-levelin= g either. So maybe it's just me, but then I'd ask for the minimum educatio= n to understand your reasoning and learn from it. > I am open to removing '-c'. An alternative I developed later in my initial mail (it was not apparent at= the point you responsed to) is to have '-c' (on the command-line) override= (in some configuration file), and I think this is what you've d= one (and responded to Mike). I'm fine with it since I have the feeling it'= s the general rule for most utilities where it's possible to request the sa= me behavior on the command-line and from configuration files (in other word= s, it respects POLA). My main concern here is that, if you keep '-c', you = document it, as well as its relation to . I'm saying this becaus= e you evoked the possibility of not documenting it on purpose in some other= message, which I think can't be justified here. =20 > Could you please clarify what you mean by "make it enable compression" -- > did you mean that we mark all log files to be compressible? (It's probab= ly > not a good idea as some "log" files may be binary and not really > compressible). Yes, I meant exactly that. In this alternative, you simply ignore compress= ion letters but also their absence, and compress everything the same. I un= derstand your point about binary files, but I would be surprised if that lo= gs even formatted as binary files aren't significantly compressible (albeit= less than text) in most cases, and even if they aren't, it would only be a= very minor annoyance (files are not going to get longer; for other (non-)a= nnoyances, see below). Moreover, all log files in base are text files, and= that is also the case for all ports/applications I use, so I find it stran= ge not to cater to what is probably the vast majority of use cases (or do y= ou disagree with that?). Doing so would have also the benefit that application writers just don't ha= ve to bother wondering whether their logs should be compressed or not. Wha= t would that decision based on? Basing it on format (text or binary) is mo= st probably flawed, as I've just said above. I don't think it can be based= on content either, which I suspect will always be compressible for log fil= es (there will be redundancy, like timestamps, identifiers, etc.). And I s= ee this more as an administrative decision (e.g., do I have plenty of disk = space or not?), which is independent. So shifting that decision to the adm= inistrator once and for all makes sense. If you don't like this way to mak= e it happen, I'm suggesting another one next. > Changing the meaning of all four legacy compression type letters to "file > is compressible" is part of the intention. The goal is to discourage usi= ng > them as a way to specify a compression type, in favor of using the > administrator configured value. As I've just explained, I see a lot of value in having an administrator dec= iding on a global behavior. I will use this functionality most likely. I had been hesitating between preserving the current meaning of the compres= sion letters, for POLA in general, and having the configuration directive o= verride them. That's why I mentioned an alternative where the override wou= ld have to be explicit, through an additional, different directive. This i= dea could be reused like this: Have '' affect only files without = compression letters, and have '' affect only those with = them, and perhaps also have the specified value of one of them used as the = default for the other (e.g., if '' is set, it also affec= ts by default files without compression letters). I'm mentioning this for = completeness in case it fulfills the needs of others. I probably won't use= this refinement personally. And, concerning POLA, there are different lev= els of it. Forgetting a moment about the change in default value, being ab= le to override compression letters with a directive in the configuration fi= le is a bit surprising, but after more pondering I now do not consider it t= o be terribly annoying if sufficiently publicized. > That's said, 'none' is a reasonable default in many ways as explained > before (it makes grep'ing easier, compression is not really that helpful = in > the modern world because hard drives are larger than the 90's and it > reduces the times data gets rewritten to SSDs and avoids hourly CPU load > bursts for busy systems). This is where my main disagreement is currently. Most arguments have been = addressed in my previous mails, so for each I'll do a small wrap-up and add= a few new thoughts. "it makes grep'ing easier": Our zgrep(1) works on any compressed file, and = even on uncompressed ones, so is a drop-in replacement for grep(1). I fail= to see anything hard about using it. Scripts already using grep(1) don't = even need to be modified, via a combination of PATH or symlink tweaking. W= e could even go so far as having grep(1) itself behave like zgrep(1), which= could be a great usability win for newcomers as well. "compression is not really that helpful in the modern world because hard dr= ives are larger than the 90's": I certainly don't think so. I manipulate G= Bs of (text) log files. On build logs, I typically see ratios of 1/10, whi= ch is huge. The space I'm saving is not only used to save more logs, but a= lso for unrelated purposes, and prevents me from having to buy or dedicate = more hard disks to this use. And I'm not even talking about embedded syste= ms, which are much more constrained, or virtual machines. "it reduces the times data gets rewritten to SSDs": Surely, but does it mat= ter? I don't think so. A single rewrite of log data in most use cases shou= ldn't have any visible effect on wear-leveling, except for SSDs where this = is the only and continuous job, but then you can have your equivalent to 's= yslog' compressing on the fly, or can use ZFS with compression. If really,= you're reaching the disk I/O limits on your machine and can't afford the e= xtra bandwidth for reading and compressing, shouldn't you be sending the lo= gs via network to another machine doing exactly that processing? And is th= is a use case common enough to warrant making non-compression the new newsy= slog(8)'s default? I don't think so. "avoids hourly CPU load bursts for busy systems": That can, and should, be = solved by configuration. You're free to choose a higher frequency, to avoi= d busy hours if there are less loaded ones, and to rotate logs on a smaller= size limit, all of which will mitigate the problem to the point of almost = non-existence. And if the "almost" is still significant to your workload, = then see the previous point. Again, is this common or important enough? F= or now, I doubt it. And there is an advantage of having application-contro= lled compression: At least you can control exactly when the bursts occur, w= hich you can't with ZFS (which has to compress blocks also). > 'bzip2' could be a good second best default (because for most > configurations it's how the log files are compressed with today's > defaults), but if the administrator has already configured their systems = to > use a different method, this would break their configuration anyways. Yes for 'bzip2' as a good default, for POLA. If the administrator configur= ed its system, then the best default would be 'legacy'. That's why I was h= esitating with always keeping the original meaning to the compression lette= rs. > There are other benefits of not compressing rotated logs. For busy > systems, the hourly newsyslog run would process larger logs and cause CPU > workload bursts. >=20 > And when logs are compressed, the data is read back and compressed data is > rewritten to disk / SSDs, causing additional wear of the flash storage, a= nd > all that comes with no significant benefit for modern hardware. >=20 > (I don't think it's common to have log files indexed after rotation; a mo= re > common use case would be to use [u]grep to look up for a certain pattern). I think I've already addressed most of these points in the previous mail an= d above. I've read and, I think, understood your points. So please save us time and= refrain from repeating them. This is not going to make me change my curre= nt mind that they all are weak at best. On the other hand, please, after a careful reading of my objections, respon= d with comments, critiques or rebuttals as you see fit. I may learn things= in the process, and you might as well too. =20 > Yes, and that's not a big concern. Achieving the maximum compression rat= io > is probably never the goal for most scenarios (not limited to logs, but > also other places) where compression is used, and one always has to balan= ce > between the cost and benefit. We are talking about logs, or at least use cases for newsyslog(8). A frequ= ent use case for it (it's certainly the primary for me) is long-term storag= e of old logs that are unfrequently read/processed. Achieving a high compr= ession ratio is important here, to save the space used in absolute terms *a= nd* with respect to the expected (in a statistical sense) utility of these = (i.e., low). > If the person is distributing a release image to many thousands of users > over the Internet, it would make a lot of sense to try the best compressi= on > for an 5% reduction of size because that adds up to the bandwidth cost and > optimizes the experience for users, but it doesn't make as much sense to > save, let's say a few MBs of disk space at the expense of spending a few > more minutes every hour, the added "bursts" of slower response time for a > server, and that's usually undesirable for production. Really, I don't see where these figures can come from. Here is a very quic= k example on a typical (for me) build log file of about ~70MB: * Method * Compression ratio * Elapsed time (s) * ************************************************************ gzip (default) | 95.3%, or / 21.2 | 0.426 xz (default) | 96.9%, or / 32.6 | 5.619 zstd (default) | 95.6%, or / 22.5 | 0.088 I could multiply them to convince you in a more serious manner statisticall= y. But already, I think you can agree that "a few MBs of disk space at the= expense of spending a few more minutes" is way, way off, even if you're still using xz(1). Thanks and regards. =2D-=20 Olivier Certner --nextPart2003580.XuNk7dGF6U Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmWeqskACgkQjKEwQJce JifYiBAAtUnuhiJBAeBwmCXFY3bHnIfipM8KGlfUdKbkzzhuU1zyDitZoc1r1e7P Nq25SclCV41JqIaY62bxFrLohGLDFfO1pIx98qIBL9/HTTAqiwnzDpUqL+u2zh6b ghYJpXW0q1E+yl0jFHYh6xhQjZV42jBeNROAgS2uM+V5u64AFyBM4xfz6txCb18O i6gNjP7KzZbh3qwG708YNx+gWHyt6JwzAYNebXsP+1SgdDpr7f6jKO6TXwBXaKo7 pJSJ1hgipzeC26H/zPgcFlUpQndWtnRGR6T4zaCRUr6Qy5jTxNBFLPG+1LzN9PiG PuXSVd69RAKLZ7nS4U2iTnN5tWg8JWuSH1XRUbxGukmM7fTfh98pAl246bgpgv1K bfng7W9UGV8YMoCJURhwDdXc9/9Xh9rJ9OhqGcBcu0yI5Y7p43TrG7713uGQBx3g xT34+PEgkAu9+Kf3VztPVyBe810RnCqNvZpQ1GW5TylzWipV8k4pReI2OI0e/KdM OXhOtbqkCXoAhhDcB5vRjLjQrLkRD5tE9dBRuHgPIxue6mRxWR97ty4A81Adr8fw n/tNt8ez8uB4W0fYFxfsFWZ+tqnqJqg3oDd8kBIapdpHS4jMXAb0c2sS5HrrP+9j luiEEDU4A2THRL7rOQdtFirM1zuKQBo0GcMte7l7gkmddfKJcOI= =3pjz -----END PGP SIGNATURE----- --nextPart2003580.XuNk7dGF6U-- From nobody Wed Jan 10 16:38: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 4T9D4l50s2z57K9F; Wed, 10 Jan 2024 16:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9D4l4kq0z58qv; Wed, 10 Jan 2024 16:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4s7eIC9WQUt8RmM8BekgMiTQlODY3evPEP1SWu7Kk9k=; b=aofwUCBnqGvp75BSj5WYDsI/Go0b+OWO3SDgW00DDXuL+mRWDbFT37otKAS5HMC5+WqhhC PdNyEysAdp1lz7SxV8eHxYGUhVUnLbsF1K9Rs8SVmGjGOsmnzE03AMjK9Hp+N691Vr+oUA 5UArlsU1KA2Oz2wnu7mV5DKkSrHP/ltjn+07KNFjQRFIjDUuK29wZO8W4rPwgO80hLzlU7 vA3yyoP2m07SDxQhT+0TaBspYWRR20sK1FLgzK5ddvlLMGlVa4dJVR+dHDi/cgq34p7kjh grGFZnf/1e7ztLGDCJykuOEkZQmPAF15zS1dR4tbGZAnbdWOGlUY3KLqI/LUcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4s7eIC9WQUt8RmM8BekgMiTQlODY3evPEP1SWu7Kk9k=; b=GHQD9zuE0bR01bXPxt6XKC9Vc3+jt6EPqqZQ6qN8liNKo6sxsDhHnyxcH33Ky73tyCw4XB dAnvZ7OiAOPHqQV51Z/hp7E37jlKrctGCD/SP/70+TnL4BLarD0deBDf3N8Oe8CDPLkWKh au5GUHwYql5UV0Rs+t8je5W9TMfzjW8J/WTB0SYGU7aG5g3ti1lDl/PC7SLenCJ8swgloJ kzMAPX/eBhNjo5RYegymXiXUyNysL/JXgnhWm12f4ZvXVSq/ZrRIjLa3boqovl6O16Uhqs lAavrUEF4784fZiS8qxmy/o08MfWHgsqpmcQI5OnPylQdtRf67dpALUA6KWi7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704904695; a=rsa-sha256; cv=none; b=LyNwtSYZM/lKiG4Gmw1PJmuUsfT/zZhU649PTUvk/4Hp9IfkpfX7aPkDv7SroegI+jLRbf 0McvV3FJL7BaODiJVxfHMaWm3wRLj9zME6fLnNEJGdXpUzUtp4M/Sn0COGNnKQpMHR6vTO BR66+BZhtOCAVSg4EyosyqxOaqQ+iybQVRdmwt+qt38LFG5xCd7t9A0M1aiswsoVjSsnBT IGzNJRZMLP/DRLxiz3v5b30b5NR7GTGKJRG1SHcZCY/eoaK1BQOe3eAg6pxBd2nbi1aNoJ ZrvtHuD3XkqbY/rBKICEYGl34sRW5/okqcmZkr7jE9N9iGBWEokB8OroZHnCkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9D4l3pN2zhtJ; Wed, 10 Jan 2024 16:38: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 40AGcFlM069220; Wed, 10 Jan 2024 16:38:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AGcFAv069217; Wed, 10 Jan 2024 16:38:15 GMT (envelope-from git) Date: Wed, 10 Jan 2024 16:38:15 GMT Message-Id: <202401101638.40AGcFAv069217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: aa339f1d5df9 - main - vendor/bc: upgrade to version 6.7.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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa339f1d5df9e38f36a34eb522355c4eebcae6c4 Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=aa339f1d5df9e38f36a34eb522355c4eebcae6c4 commit aa339f1d5df9e38f36a34eb522355c4eebcae6c4 Author: Stefan Eßer AuthorDate: 2023-10-30 09:10:24 +0000 Commit: Stefan Eßer CommitDate: 2024-01-10 16:34:49 +0000 vendor/bc: upgrade to version 6.7.2 This update improves the implementation of the power function p() and adds 3 new functions to the extended math library: min(), max(), and i2rand(). (cherry picked from commit 0b4a06ab29a0da80f6cb5c99189054cb8e2f756c) --- contrib/bc/Makefile.in | 2 +- contrib/bc/NEWS.md | 22 + contrib/bc/configure.sh | 8 +- contrib/bc/gen/lib2.bc | 45 +- contrib/bc/include/bcl.h | 3 - contrib/bc/include/version.h | 2 +- contrib/bc/manuals/algorithms.md | 69 +++ contrib/bc/manuals/bc/A.1 | 35 +- contrib/bc/manuals/bc/A.1.md | 28 +- contrib/bc/manuals/bc/E.1 | 3 +- contrib/bc/manuals/bc/E.1.md | 2 +- contrib/bc/manuals/bc/EH.1 | 3 +- contrib/bc/manuals/bc/EH.1.md | 2 +- contrib/bc/manuals/bc/EHN.1 | 3 +- contrib/bc/manuals/bc/EHN.1.md | 2 +- contrib/bc/manuals/bc/EN.1 | 3 +- contrib/bc/manuals/bc/EN.1.md | 2 +- contrib/bc/manuals/bc/H.1 | 35 +- contrib/bc/manuals/bc/H.1.md | 28 +- contrib/bc/manuals/bc/HN.1 | 35 +- contrib/bc/manuals/bc/HN.1.md | 28 +- contrib/bc/manuals/bc/N.1 | 35 +- contrib/bc/manuals/bc/N.1.md | 28 +- contrib/bc/src/num.c | 10 +- contrib/bc/src/vm.c | 2 +- contrib/bc/tests/bc/lib2.txt | 1 + contrib/bc/tests/bc/lib2_results.txt | 4 +- contrib/bc/tests/bc/scripts/all.txt | 1 + contrib/bc/tests/bc/scripts/i2rand.bc | 29 + contrib/bc/tests/bc/scripts/i2rand.txt | 1000 ++++++++++++++++++++++++++++++++ contrib/bc/tests/script.sh | 2 +- 31 files changed, 1390 insertions(+), 82 deletions(-) diff --git a/contrib/bc/Makefile.in b/contrib/bc/Makefile.in index 55e2e4a6270a..e1309cd6d6b3 100644 --- a/contrib/bc/Makefile.in +++ b/contrib/bc/Makefile.in @@ -554,7 +554,7 @@ clean_config: clean clean_benchmarks clean_coverage: @printf 'Cleaning coverage files...\n' @$(RM) -f *.gcov - @$(RM) -f *.html + @$(RM) -f *.html *.css @$(RM) -f *.gcda *.gcno @$(RM) -f *.profraw @$(RM) -f $(GCDA) $(GCNO) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index de3b35026fea..d4b160d74d35 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,27 @@ # News +## 6.7.2 + +This is a production release to remove some debugging code that I accidentally +committed. + +## 6.7.1 + +This is a production release with a bug fix for `SIGINT` only being handled +once. + +## 6.7.0 + +This is a production release with three new functions in the [extended math +library][16]: `min()`, `max()`, and `i2rand()`. + +## 6.6.1 + +This is a production release with an improved `p()` function in the [extended +math library][16]. + +Users who don't care do not need to upgrade. + ## 6.6.0 This is a production release with two bug fixes and one change. diff --git a/contrib/bc/configure.sh b/contrib/bc/configure.sh index 4ba957131d52..35d55058f8f1 100755 --- a/contrib/bc/configure.sh +++ b/contrib/bc/configure.sh @@ -1364,13 +1364,7 @@ if [ "$debug" -eq 1 ]; then CFLAGS="-O0" fi - ccbase=$(basename "$CC") - - if [ "$ccbase" = "clang" ]; then - CFLAGS="-gdwarf-4 $CFLAGS" - else - CFLAGS="-g $CFLAGS" - fi + CFLAGS="-g $CFLAGS" else diff --git a/contrib/bc/gen/lib2.bc b/contrib/bc/gen/lib2.bc index ba3f76b1803a..df51d0c07a8d 100644 --- a/contrib/bc/gen/lib2.bc +++ b/contrib/bc/gen/lib2.bc @@ -34,10 +34,34 @@ */ define p(x,y){ - auto a + auto a,i,s,z + if(y==0)return 1@scale + if(x==0){ + if(y>0)return 0 + return 1/0 + } a=y$ if(y==a)return(x^a)@scale - return e(y*l(x)) + z=0 + if(x<1){ + y=-y + a=-a + z=x + x=1/x + } + if(y<0){ + return e(y*l(x)) + } + i=x^a + s=scale + scale+=length(i)+5 + if(z){ + x=1/z + i=x^a + } + i*=e((y-a)*l(x)) + scale=s + return i@scale } define r(x,p){ auto t,n @@ -66,6 +90,14 @@ define f(n){ for(r=1;n>1;--n)r*=n return r } +define max(a,b){ + if(a>b)return a + return b +} +define min(a,b){ + if(an)return 0 @@ -242,6 +274,15 @@ define frand(p){ return irand(A^p)>>p } define ifrand(i,p){return irand(abs(i)$)+frand(p)} +define i2rand(a,b){ + auto n,x + a=a$ + b=b$ + if(a==b)return a + n=min(a,b) + x=max(a,b) + return irand(x-n+1)+n +} define srand(x){ if(irand(2))return -x return x diff --git a/contrib/bc/include/bcl.h b/contrib/bc/include/bcl.h index 0908e215182c..d3a9f42cdcf8 100644 --- a/contrib/bc/include/bcl.h +++ b/contrib/bc/include/bcl.h @@ -36,9 +36,6 @@ #ifndef BC_BCL_H #define BC_BCL_H -// TODO: Add a generation index when building with Valgrind to check for -// use-after-free's or double frees. - #include #include #include diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index a4df383e284a..1cd13e9878c1 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 6.6.0 +#define VERSION 6.7.2 #endif // BC_VERSION_H diff --git a/contrib/bc/manuals/algorithms.md b/contrib/bc/manuals/algorithms.md index 4d7a0edc54c4..ce27bf026b69 100644 --- a/contrib/bc/manuals/algorithms.md +++ b/contrib/bc/manuals/algorithms.md @@ -193,6 +193,74 @@ The algorithm used is to use the formula `e(y*l(x))`. It has a complexity of `O(n^3)` because both `e()` and `l()` do. +However, there are details to this algorithm, described by the author, +TediusTimmy, in GitHub issue [#69][12]. + +First, check if the exponent is 0. If it is, return 1 at the appropriate +`scale`. + +Next, check if the number is 0. If so, check if the exponent is greater than +zero; if it is, return 0. If the exponent is less than 0, error (with a divide +by 0) because that is undefined. + +Next, check if the exponent is actually an integer, and if it is, use the +exponentiation operator. + +At the `z=0` line is the start of the meat of the new code. + +`z` is set to zero as a flag and as a value. What I mean by that will be clear +later. + +Then we check if the number is less than 0. If it is, we negate the exponent +(and the integer version of the exponent, which we calculated earlier to check +if it was an integer). We also save the number in `z`; being non-zero is a flag +for later and a value to be used. Then we store the reciprocal of the number in +itself. + +All of the above paragraph will not make sense unless you remember the +relationship `l(x) == -l(1/x)`; we negated the exponent, which is equivalent to +the negative sign in that relationship, and we took the reciprocal of the +number, which is equivalent to the reciprocal in the relationship. + +But what if the number is negative? We ignore that for now because we eventually +call `l(x)`, which will raise an error if `x` is negative. + +Now, we can keep going. + +If at this point, the exponent is negative, we need to use the original formula +(`e(y * l(x))`) and return that result because the result will go to zero +anyway. + +But if we did *not* return, we know the exponent is *not* negative, so we can +get clever. + +We then compute the integral portion of the power by computing the number to +power of the integral portion of the exponent. + +Then we have the most clever trick: we add the length of that integer power (and +a little extra) to the `scale`. Why? Because this will ensure that the next part +is calculated to at least as many digits as should be in the integer *plus* any +extra `scale` that was wanted. + +Then we check `z`, which, if it is not zero, is the original value of the +number. If it is not zero, we need to take the take the reciprocal *again* +because now we have the correct `scale`. And we *also* have to calculate the +integer portion of the power again. + +Then we need to calculate the fractional portion of the number. We do this by +using the original formula, but we instead of calculating `e(y * l(x))`, we +calculate `e((y - a) * l(x))`, where `a` is the integer portion of `y`. It's +easy to see that `y - a` will be just the fractional portion of `y` (the +exponent), so this makes sense. + +But then we *multiply* it into the integer portion of the power. Why? Because +remember: we're dealing with an exponent and a power; the relationship is +`x^(y+z) == (x^y)*(x^z)`. + +So we multiply it into the integer portion of the power. + +Finally, we set the result to the `scale`. + ### Rounding (`bc` Math Library 2 Only) This is implemented in the function `r(x,p)`. @@ -327,3 +395,4 @@ It has a complexity of `O(n^3)` because of arctangent. [9]: https://en.wikipedia.org/wiki/Root-finding_algorithms#Newton's_method_(and_similar_derivative-based_methods) [10]: https://en.wikipedia.org/wiki/Euclidean_algorithm [11]: https://en.wikipedia.org/wiki/Atan2#Definition_and_computation +[12]: https://github.com/gavinhoward/bc/issues/69 diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index 5de2d3529bcf..fc75b5c70ac3 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -1357,8 +1357,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. @@ -1579,6 +1578,14 @@ the rounding mode round away from \f[B]0\f[R] \f[B]f(x)\f[R] Returns the factorial of the truncated absolute value of \f[B]x\f[R]. .TP +\f[B]max(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is greater than \f[B]b\f[R]; +otherwise, returns \f[B]b\f[R]. +.TP +\f[B]min(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is less than \f[B]b\f[R]; otherwise, +returns \f[B]b\f[R]. +.TP \f[B]perm(n, k)\f[R] Returns the permutation of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. @@ -1589,6 +1596,10 @@ Returns the combination of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. If not, it returns \f[B]0\f[R]. .TP +\f[B]fib(n)\f[R] +Returns the Fibonacci number of the truncated absolute value of +\f[B]n\f[R]. +.TP \f[B]l2(x)\f[R] Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R]. .RS @@ -1759,7 +1770,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo-random number between \f[B]0\f[R] (inclusive) and +Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1768,14 +1779,22 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo-random number that is between \f[B]0\f[R] (inclusive) -and the truncated absolute value of \f[B]i\f[R] (exclusive) with the -number of decimal digits after the decimal point equal to the truncated -absolute value of \f[B]p\f[R]. +Generates a pseudo-random integer that is between \f[B]0\f[R] +(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) +with the number of decimal digits after the decimal point equal to the +truncated absolute value of \f[B]p\f[R]. If the absolute value of \f[B]i\f[R] is greater than or equal to \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will change the value of \f[B]seed\f[R]; otherwise, \f[B]0\f[R] -is returned and \f[B]seed\f[R] is not changed. +is returned, and \f[B]seed\f[R] is not changed. +.TP +\f[B]i2rand(a, b)\f[R] +Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them +as inclusive bounds to enerate a pseudo-random integer. +If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R] +is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R] +is \f[I]not\f[R] changed. +Otherwise, this function will change the value of \f[B]seed\f[R]. .TP \f[B]srand(x)\f[R] Returns \f[B]x\f[R] with its sign flipped with probability diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 3f34f451c9ed..3e593e16b481 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -1068,7 +1068,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** @@ -1259,6 +1259,14 @@ The extended library is a **non-portable extension**. : Returns the factorial of the truncated absolute value of **x**. +**max(a, b)** + +: Returns **a** if **a** is greater than **b**; otherwise, returns **b**. + +**min(a, b)** + +: Returns **a** if **a** is less than **b**; otherwise, returns **b**. + **perm(n, k)** : Returns the permutation of the truncated absolute value of **n** of the @@ -1269,6 +1277,10 @@ The extended library is a **non-portable extension**. : Returns the combination of the truncated absolute value of **n** of the truncated absolute value of **k**, if **k \<= n**. If not, it returns **0**. +**fib(n)** + +: Returns the Fibonacci number of the truncated absolute value of **n**. + **l2(x)** : Returns the logarithm base **2** of **x**. @@ -1418,7 +1430,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random number between **0** (inclusive) and **1** +: Generates a pseudo-random integer between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1426,12 +1438,20 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random number that is between **0** (inclusive) and the +: Generates a pseudo-random integer that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and **p** is not **0**, then calling this function will change the value of - **seed**; otherwise, **0** is returned and **seed** is not changed. + **seed**; otherwise, **0** is returned, and **seed** is not changed. + +**i2rand(a, b)** + +: Takes the truncated value of **a** and **b** and uses them as inclusive + bounds to enerate a pseudo-random integer. If the difference of the + truncated values of **a** and **b** is **0**, then the truncated value is + returned, and **seed** is *not* changed. Otherwise, this function will + change the value of **seed**. **srand(x)** diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index ecb8b128712a..24f49c701b46 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -1122,8 +1122,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. diff --git a/contrib/bc/manuals/bc/E.1.md b/contrib/bc/manuals/bc/E.1.md index 5411dcf6cc70..b5d77d2c76b2 100644 --- a/contrib/bc/manuals/bc/E.1.md +++ b/contrib/bc/manuals/bc/E.1.md @@ -892,7 +892,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** diff --git a/contrib/bc/manuals/bc/EH.1 b/contrib/bc/manuals/bc/EH.1 index 507e7f4a9a7a..35672fe5c4e6 100644 --- a/contrib/bc/manuals/bc/EH.1 +++ b/contrib/bc/manuals/bc/EH.1 @@ -1122,8 +1122,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. diff --git a/contrib/bc/manuals/bc/EH.1.md b/contrib/bc/manuals/bc/EH.1.md index 6f4c43263003..a8a42b06be2e 100644 --- a/contrib/bc/manuals/bc/EH.1.md +++ b/contrib/bc/manuals/bc/EH.1.md @@ -892,7 +892,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** diff --git a/contrib/bc/manuals/bc/EHN.1 b/contrib/bc/manuals/bc/EHN.1 index e00fcd578b1c..72790726a4f4 100644 --- a/contrib/bc/manuals/bc/EHN.1 +++ b/contrib/bc/manuals/bc/EHN.1 @@ -1122,8 +1122,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. diff --git a/contrib/bc/manuals/bc/EHN.1.md b/contrib/bc/manuals/bc/EHN.1.md index 6f7a33210205..a38767eb0101 100644 --- a/contrib/bc/manuals/bc/EHN.1.md +++ b/contrib/bc/manuals/bc/EHN.1.md @@ -892,7 +892,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** diff --git a/contrib/bc/manuals/bc/EN.1 b/contrib/bc/manuals/bc/EN.1 index ea842eac7e97..a972005515a6 100644 --- a/contrib/bc/manuals/bc/EN.1 +++ b/contrib/bc/manuals/bc/EN.1 @@ -1122,8 +1122,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. diff --git a/contrib/bc/manuals/bc/EN.1.md b/contrib/bc/manuals/bc/EN.1.md index 189193bf2a03..1c8e855e6f59 100644 --- a/contrib/bc/manuals/bc/EN.1.md +++ b/contrib/bc/manuals/bc/EN.1.md @@ -892,7 +892,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** diff --git a/contrib/bc/manuals/bc/H.1 b/contrib/bc/manuals/bc/H.1 index d477dc8ab24b..a26aee4f2d11 100644 --- a/contrib/bc/manuals/bc/H.1 +++ b/contrib/bc/manuals/bc/H.1 @@ -1357,8 +1357,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. @@ -1579,6 +1578,14 @@ the rounding mode round away from \f[B]0\f[R] \f[B]f(x)\f[R] Returns the factorial of the truncated absolute value of \f[B]x\f[R]. .TP +\f[B]max(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is greater than \f[B]b\f[R]; +otherwise, returns \f[B]b\f[R]. +.TP +\f[B]min(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is less than \f[B]b\f[R]; otherwise, +returns \f[B]b\f[R]. +.TP \f[B]perm(n, k)\f[R] Returns the permutation of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. @@ -1589,6 +1596,10 @@ Returns the combination of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. If not, it returns \f[B]0\f[R]. .TP +\f[B]fib(n)\f[R] +Returns the Fibonacci number of the truncated absolute value of +\f[B]n\f[R]. +.TP \f[B]l2(x)\f[R] Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R]. .RS @@ -1759,7 +1770,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo-random number between \f[B]0\f[R] (inclusive) and +Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1768,14 +1779,22 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo-random number that is between \f[B]0\f[R] (inclusive) -and the truncated absolute value of \f[B]i\f[R] (exclusive) with the -number of decimal digits after the decimal point equal to the truncated -absolute value of \f[B]p\f[R]. +Generates a pseudo-random integer that is between \f[B]0\f[R] +(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) +with the number of decimal digits after the decimal point equal to the +truncated absolute value of \f[B]p\f[R]. If the absolute value of \f[B]i\f[R] is greater than or equal to \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will change the value of \f[B]seed\f[R]; otherwise, \f[B]0\f[R] -is returned and \f[B]seed\f[R] is not changed. +is returned, and \f[B]seed\f[R] is not changed. +.TP +\f[B]i2rand(a, b)\f[R] +Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them +as inclusive bounds to enerate a pseudo-random integer. +If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R] +is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R] +is \f[I]not\f[R] changed. +Otherwise, this function will change the value of \f[B]seed\f[R]. .TP \f[B]srand(x)\f[R] Returns \f[B]x\f[R] with its sign flipped with probability diff --git a/contrib/bc/manuals/bc/H.1.md b/contrib/bc/manuals/bc/H.1.md index 2cb0b4eb27cc..24cae156d4c2 100644 --- a/contrib/bc/manuals/bc/H.1.md +++ b/contrib/bc/manuals/bc/H.1.md @@ -1068,7 +1068,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** @@ -1259,6 +1259,14 @@ The extended library is a **non-portable extension**. : Returns the factorial of the truncated absolute value of **x**. +**max(a, b)** + +: Returns **a** if **a** is greater than **b**; otherwise, returns **b**. + +**min(a, b)** + +: Returns **a** if **a** is less than **b**; otherwise, returns **b**. + **perm(n, k)** : Returns the permutation of the truncated absolute value of **n** of the @@ -1269,6 +1277,10 @@ The extended library is a **non-portable extension**. : Returns the combination of the truncated absolute value of **n** of the truncated absolute value of **k**, if **k \<= n**. If not, it returns **0**. +**fib(n)** + +: Returns the Fibonacci number of the truncated absolute value of **n**. + **l2(x)** : Returns the logarithm base **2** of **x**. @@ -1418,7 +1430,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random number between **0** (inclusive) and **1** +: Generates a pseudo-random integer between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1426,12 +1438,20 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random number that is between **0** (inclusive) and the +: Generates a pseudo-random integer that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and **p** is not **0**, then calling this function will change the value of - **seed**; otherwise, **0** is returned and **seed** is not changed. + **seed**; otherwise, **0** is returned, and **seed** is not changed. + +**i2rand(a, b)** + +: Takes the truncated value of **a** and **b** and uses them as inclusive + bounds to enerate a pseudo-random integer. If the difference of the + truncated values of **a** and **b** is **0**, then the truncated value is + returned, and **seed** is *not* changed. Otherwise, this function will + change the value of **seed**. **srand(x)** diff --git a/contrib/bc/manuals/bc/HN.1 b/contrib/bc/manuals/bc/HN.1 index 10d9621c42ee..3f567180a168 100644 --- a/contrib/bc/manuals/bc/HN.1 +++ b/contrib/bc/manuals/bc/HN.1 @@ -1357,8 +1357,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. @@ -1579,6 +1578,14 @@ the rounding mode round away from \f[B]0\f[R] \f[B]f(x)\f[R] Returns the factorial of the truncated absolute value of \f[B]x\f[R]. .TP +\f[B]max(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is greater than \f[B]b\f[R]; +otherwise, returns \f[B]b\f[R]. +.TP +\f[B]min(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is less than \f[B]b\f[R]; otherwise, +returns \f[B]b\f[R]. +.TP \f[B]perm(n, k)\f[R] Returns the permutation of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. @@ -1589,6 +1596,10 @@ Returns the combination of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. If not, it returns \f[B]0\f[R]. .TP +\f[B]fib(n)\f[R] +Returns the Fibonacci number of the truncated absolute value of +\f[B]n\f[R]. +.TP \f[B]l2(x)\f[R] Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R]. .RS @@ -1759,7 +1770,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo-random number between \f[B]0\f[R] (inclusive) and +Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1768,14 +1779,22 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo-random number that is between \f[B]0\f[R] (inclusive) -and the truncated absolute value of \f[B]i\f[R] (exclusive) with the -number of decimal digits after the decimal point equal to the truncated -absolute value of \f[B]p\f[R]. +Generates a pseudo-random integer that is between \f[B]0\f[R] +(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) +with the number of decimal digits after the decimal point equal to the +truncated absolute value of \f[B]p\f[R]. If the absolute value of \f[B]i\f[R] is greater than or equal to \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will change the value of \f[B]seed\f[R]; otherwise, \f[B]0\f[R] -is returned and \f[B]seed\f[R] is not changed. +is returned, and \f[B]seed\f[R] is not changed. +.TP +\f[B]i2rand(a, b)\f[R] +Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them +as inclusive bounds to enerate a pseudo-random integer. +If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R] +is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R] +is \f[I]not\f[R] changed. +Otherwise, this function will change the value of \f[B]seed\f[R]. .TP \f[B]srand(x)\f[R] Returns \f[B]x\f[R] with its sign flipped with probability diff --git a/contrib/bc/manuals/bc/HN.1.md b/contrib/bc/manuals/bc/HN.1.md index 25f136a21e0a..09ea524d95c2 100644 --- a/contrib/bc/manuals/bc/HN.1.md +++ b/contrib/bc/manuals/bc/HN.1.md @@ -1068,7 +1068,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** @@ -1259,6 +1259,14 @@ The extended library is a **non-portable extension**. : Returns the factorial of the truncated absolute value of **x**. +**max(a, b)** + +: Returns **a** if **a** is greater than **b**; otherwise, returns **b**. + +**min(a, b)** + +: Returns **a** if **a** is less than **b**; otherwise, returns **b**. + **perm(n, k)** : Returns the permutation of the truncated absolute value of **n** of the @@ -1269,6 +1277,10 @@ The extended library is a **non-portable extension**. : Returns the combination of the truncated absolute value of **n** of the truncated absolute value of **k**, if **k \<= n**. If not, it returns **0**. +**fib(n)** + +: Returns the Fibonacci number of the truncated absolute value of **n**. + **l2(x)** : Returns the logarithm base **2** of **x**. @@ -1418,7 +1430,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random number between **0** (inclusive) and **1** +: Generates a pseudo-random integer between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1426,12 +1438,20 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random number that is between **0** (inclusive) and the +: Generates a pseudo-random integer that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and **p** is not **0**, then calling this function will change the value of - **seed**; otherwise, **0** is returned and **seed** is not changed. + **seed**; otherwise, **0** is returned, and **seed** is not changed. + +**i2rand(a, b)** + +: Takes the truncated value of **a** and **b** and uses them as inclusive + bounds to enerate a pseudo-random integer. If the difference of the + truncated values of **a** and **b** is **0**, then the truncated value is + returned, and **seed** is *not* changed. Otherwise, this function will + change the value of **seed**. **srand(x)** diff --git a/contrib/bc/manuals/bc/N.1 b/contrib/bc/manuals/bc/N.1 index f39e51277b65..79e053ec41fa 100644 --- a/contrib/bc/manuals/bc/N.1 +++ b/contrib/bc/manuals/bc/N.1 @@ -1357,8 +1357,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. @@ -1579,6 +1578,14 @@ the rounding mode round away from \f[B]0\f[R] \f[B]f(x)\f[R] Returns the factorial of the truncated absolute value of \f[B]x\f[R]. .TP +\f[B]max(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is greater than \f[B]b\f[R]; +otherwise, returns \f[B]b\f[R]. +.TP +\f[B]min(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is less than \f[B]b\f[R]; otherwise, +returns \f[B]b\f[R]. +.TP \f[B]perm(n, k)\f[R] Returns the permutation of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. @@ -1589,6 +1596,10 @@ Returns the combination of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. If not, it returns \f[B]0\f[R]. .TP +\f[B]fib(n)\f[R] +Returns the Fibonacci number of the truncated absolute value of +\f[B]n\f[R]. +.TP \f[B]l2(x)\f[R] Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R]. .RS @@ -1759,7 +1770,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo-random number between \f[B]0\f[R] (inclusive) and +Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1768,14 +1779,22 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo-random number that is between \f[B]0\f[R] (inclusive) -and the truncated absolute value of \f[B]i\f[R] (exclusive) with the -number of decimal digits after the decimal point equal to the truncated -absolute value of \f[B]p\f[R]. +Generates a pseudo-random integer that is between \f[B]0\f[R] +(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) +with the number of decimal digits after the decimal point equal to the +truncated absolute value of \f[B]p\f[R]. If the absolute value of \f[B]i\f[R] is greater than or equal to \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will change the value of \f[B]seed\f[R]; otherwise, \f[B]0\f[R] -is returned and \f[B]seed\f[R] is not changed. +is returned, and \f[B]seed\f[R] is not changed. +.TP +\f[B]i2rand(a, b)\f[R] +Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them +as inclusive bounds to enerate a pseudo-random integer. +If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R] +is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R] +is \f[I]not\f[R] changed. +Otherwise, this function will change the value of \f[B]seed\f[R]. .TP \f[B]srand(x)\f[R] Returns \f[B]x\f[R] with its sign flipped with probability diff --git a/contrib/bc/manuals/bc/N.1.md b/contrib/bc/manuals/bc/N.1.md index 56a4b2274d29..d4a08817c952 100644 --- a/contrib/bc/manuals/bc/N.1.md +++ b/contrib/bc/manuals/bc/N.1.md @@ -1068,7 +1068,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** @@ -1259,6 +1259,14 @@ The extended library is a **non-portable extension**. : Returns the factorial of the truncated absolute value of **x**. +**max(a, b)** + +: Returns **a** if **a** is greater than **b**; otherwise, returns **b**. + +**min(a, b)** + +: Returns **a** if **a** is less than **b**; otherwise, returns **b**. + **perm(n, k)** : Returns the permutation of the truncated absolute value of **n** of the @@ -1269,6 +1277,10 @@ The extended library is a **non-portable extension**. : Returns the combination of the truncated absolute value of **n** of the truncated absolute value of **k**, if **k \<= n**. If not, it returns **0**. +**fib(n)** + +: Returns the Fibonacci number of the truncated absolute value of **n**. + **l2(x)** : Returns the logarithm base **2** of **x**. @@ -1418,7 +1430,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random number between **0** (inclusive) and **1** +: Generates a pseudo-random integer between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1426,12 +1438,20 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random number that is between **0** (inclusive) and the +: Generates a pseudo-random integer that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and **p** is not **0**, then calling this function will change the value of - **seed**; otherwise, **0** is returned and **seed** is not changed. + **seed**; otherwise, **0** is returned, and **seed** is not changed. *** 1146 LINES SKIPPED *** From nobody Wed Jan 10 16:38: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 4T9D4n06Cvz57K7G; Wed, 10 Jan 2024 16:38: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 4T9D4m5tKBz58lB; Wed, 10 Jan 2024 16:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuK4fVUqyFu26HN2o8ml+2eC7cW7vN/6lwZ1MSdBZq8=; b=O6h69LLuWuvWJ8Lw/5nEKsP55wclMf76PLuVbXD7WZoIrzeOYyGOS/iQaaZgi2zOlELt+6 Y8O5mqNSN2X1SaAZbzbn2/SAglZ4I+Xtx66SXi8ejFd9ng3MOS3cYgY/ZnmzzQXEh1tmm3 PcW3qXKFAJG+HDBAnPU4t4nWK8P+0tbaeOcPh3Znxkn1CcsdAjEGIlByI7mqYqtvz8FxE/ Zsbb4f9ipcXSEWx3pkvnb/1xSfgsIZPfa5o8awgDplqym7rUFfRs1iz/p85oGd2ssyTExi 9WBqDw6Q4k362kddt/oPTNqycGHgjzYYOHBraDSo3wJj/eRGCx+nP5AFgJAadA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuK4fVUqyFu26HN2o8ml+2eC7cW7vN/6lwZ1MSdBZq8=; b=syZZqwLLdHE1kFTrTwpXNjgXg9Y7MCquSvXD8/LvGCgcFeBcTlDKTrJZTjtNssiHJNeSCZ Mg6QAEyBUpBzu8W/Rh4rS/mVNyp2assftvn475+q4urCKiG2Fpv4tG+X1w4iJQCAPJbJ70 SD80x7EpGzx5l+9o+16N2a/tsF+LyMwwLd0l/AugHoljLsCxo/9HbCvw4W8WFWoNA2vRpo 0U4STK5qAeNGs42LFX/Fy4CTwTPGHTjv8M2XJGSE73+zBtl0CLwgS5GTiMfOLzwVodl09t oQOHWXg+kyR4VXvunV/y57A2ThBjUDQT2jByvbGCygfTG39nhc781rJsGPnyDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704904696; a=rsa-sha256; cv=none; b=OoSuSPaH+6CbQMUBHGrN1WO1U82Vj7JpLeAhIx7UGmLPGbNJqtor72EIjuZPZ5gMN/pDsv HKDHEiW9o4BQKBW95L5ZnLSnuzgHzOz7sflxR+BUbe2Fp2cyIViJyCpcQ2f6lhv3Auu//P 4FiOM4rGXV6VIokjAhxamY+rXFoVW9jrAkDhSk+/uBhMj2Rd0dl9Ukffcx0UmvVXF2cJ7C 1n1+G0J4V3sR0qT6S7CDAqQrw/LWFSUl1UNZNu6lqwU5J9YsFTJh4/wB+sNVOWrl7coJ9k BJIMhYvc4Ek27VtUj7ITNdTXrxJL7c5FUYygBHAROuFCnEyjNElgywjjnrQZHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9D4m4pjdzjp1; Wed, 10 Jan 2024 16:38: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 40AGcGqp069271; Wed, 10 Jan 2024 16:38:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AGcGGc069268; Wed, 10 Jan 2024 16:38:16 GMT (envelope-from git) Date: Wed, 10 Jan 2024 16:38:16 GMT Message-Id: <202401101638.40AGcGGc069268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: e6857bd4d7b4 - main - vendor/bc: upgrade to version 6.7.4 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6857bd4d7b4bf39ea32b9dcd34f8371164c356e Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=e6857bd4d7b4bf39ea32b9dcd34f8371164c356e commit e6857bd4d7b4bf39ea32b9dcd34f8371164c356e Author: Stefan Eßer AuthorDate: 2024-01-02 13:05:20 +0000 Commit: Stefan Eßer CommitDate: 2024-01-10 16:35:14 +0000 vendor/bc: upgrade to version 6.7.4 Documentation updates only, no functional changes to the software. (cherry picked from commit a3f3a7b4dc80d577e4c8fc64dfbbb359d2e24228) --- contrib/bc/NEWS.md | 14 ++++- contrib/bc/configure.sh | 18 +++--- contrib/bc/include/version.h | 2 +- contrib/bc/manuals/bc/A.1 | 139 ++++++++++++------------------------------ contrib/bc/manuals/bc/A.1.md | 20 +++--- contrib/bc/manuals/bc/E.1 | 112 +++++++++------------------------- contrib/bc/manuals/bc/EH.1 | 110 +++++++++------------------------ contrib/bc/manuals/bc/EHN.1 | 109 +++++++++------------------------ contrib/bc/manuals/bc/EN.1 | 111 +++++++++------------------------ contrib/bc/manuals/bc/H.1 | 137 ++++++++++++----------------------------- contrib/bc/manuals/bc/H.1.md | 20 +++--- contrib/bc/manuals/bc/HN.1 | 136 ++++++++++++----------------------------- contrib/bc/manuals/bc/HN.1.md | 20 +++--- contrib/bc/manuals/bc/N.1 | 138 ++++++++++++----------------------------- contrib/bc/manuals/bc/N.1.md | 20 +++--- contrib/bc/manuals/bcl.3 | 43 +++---------- contrib/bc/manuals/dc/A.1 | 49 ++------------- contrib/bc/manuals/dc/E.1 | 48 ++------------- contrib/bc/manuals/dc/EH.1 | 46 ++------------ contrib/bc/manuals/dc/EHN.1 | 45 ++------------ contrib/bc/manuals/dc/EN.1 | 47 ++------------ contrib/bc/manuals/dc/H.1 | 47 ++------------ contrib/bc/manuals/dc/HN.1 | 46 ++------------ contrib/bc/manuals/dc/N.1 | 48 ++------------- 24 files changed, 392 insertions(+), 1133 deletions(-) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index d4b160d74d35..240e02f11388 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,17 @@ # News +## 6.7.4 + +This is a production release to fix problems in the `bc` manual. + +Users only need to update if desired. + +## 6.7.3 + +This is a production release to fix the library build on Mac OSX. + +Users on other platforms do *not* need to update. + ## 6.7.2 This is a production release to remove some debugging code that I accidentally @@ -773,7 +785,7 @@ function, `strdup()`, which is not in POSIX 2001, and it is in the X/Open System Interfaces group 2001. It is, however, in POSIX 2008, and since POSIX 2008 is old enough to be supported anywhere that I care, that should be the requirement. -Second, the BcVm global variable was put into `bss`. This actually slightly +Second, the `BcVm` global variable was put into `bss`. This actually slightly reduces the size of the executable from a massive code shrink, and it will stop `bc` from allocating a large set of memory when `bc` starts. diff --git a/contrib/bc/configure.sh b/contrib/bc/configure.sh index 35d55058f8f1..9292f094bb17 100755 --- a/contrib/bc/configure.sh +++ b/contrib/bc/configure.sh @@ -461,7 +461,7 @@ find_src_files() { fi - _find_src_files_files=$(find "$scriptdir/src/" -depth -name "*.c" -print | LC_ALL=C sort) + _find_src_files_files=$(find "$scriptdir/src" -depth -name "*.c" -print | LC_ALL=C sort) _find_src_files_result="" @@ -772,7 +772,7 @@ predefined_build() { dc_default_digit_clamp=0;; GDH) - CFLAGS="-flto -Weverything -Wno-padded -Wno-unsafe-buffer-usage -Werror -pedantic -std=c11" + CFLAGS="-flto -Weverything -Wno-padded -Wno-unsafe-buffer-usage -Wno-poison-system-directories -Werror -pedantic -std=c11" bc_only=0 dc_only=0 coverage=0 @@ -806,7 +806,7 @@ predefined_build() { dc_default_digit_clamp=1;; DBG) - CFLAGS="-Weverything -Wno-padded -Wno-unsafe-buffer-usage -Werror -pedantic -std=c11" + CFLAGS="-Weverything -Wno-padded -Wno-unsafe-buffer-usage -Wno-poison-system-directories -Werror -pedantic -std=c11" bc_only=0 dc_only=0 coverage=0 @@ -1367,12 +1367,7 @@ if [ "$debug" -eq 1 ]; then CFLAGS="-g $CFLAGS" else - CPPFLAGS="-DNDEBUG $CPPFLAGS" - - if [ "$strip_bin" -ne 0 ]; then - LDFLAGS="-s $LDFLAGS" - fi fi # Set optimization CFLAGS. @@ -1694,6 +1689,11 @@ else apple="" fi +# We can't use the linker's strip flag on Mac OSX. +if [ "$debug" -eq 0 ] && [ "$apple" == "" ] && [ "$strip_bin" -ne 0 ]; then + LDFLAGS="-s $LDFLAGS" +fi + # Test OpenBSD. This is not in an if statement because regardless of whatever # the user says, we need to know if we are on OpenBSD to activate _BSD_SOURCE. # No, I cannot `#define _BSD_SOURCE` in a header because OpenBSD's patched GCC @@ -1866,6 +1866,8 @@ dc_tests=$(gen_std_test_targets dc) dc_script_tests=$(gen_script_test_targets dc) dc_err_tests=$(gen_err_test_targets dc) +printf 'unneeded: %s\n' "$unneeded" + # Print out the values; this is for debugging. printf 'Version: %s\n' "$version" diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index 1cd13e9878c1..d481cb10abf1 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 6.7.2 +#define VERSION 6.7.4 #endif // BC_VERSION_H diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index fc75b5c70ac3..1810beaf9291 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -25,14 +25,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME -.PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS -.PP \f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]] [\f[B]--no-digit-clamp\f[R]] [\f[B]--global-stacks\f[R]] [\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] @@ -48,7 +46,6 @@ bc - arbitrary-precision decimal arithmetic language and calculator [\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]] [\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]] .SH DESCRIPTION -.PP bc(1) is an interactive processor for a language first standardized in 1991 by POSIX. (See the \f[B]STANDARDS\f[R] section.) @@ -77,7 +74,6 @@ If parsing scripts meant for other bc(1) implementations still does not work, that is a bug and should be reported. See the \f[B]BUGS\f[R] section. .SH OPTIONS -.PP The following are the options that bc(1) accepts. .TP \f[B]-C\f[R], \f[B]--no-digit-clamp\f[R] @@ -189,19 +185,16 @@ without worrying that the change will affect other functions. Thus, a hypothetical function named \f[B]output(x,b)\f[R] that simply printed \f[B]x\f[R] in base \f[B]b\f[R] could be written like this: .IP -.nf -\f[C] +.EX define void output(x, b) { obase=b x } -\f[R] -.fi +.EE .PP instead of like this: .IP -.nf -\f[C] +.EX define void output(x, b) { auto c c=obase @@ -209,8 +202,7 @@ define void output(x, b) { x obase=c } -\f[R] -.fi +.EE .PP This makes writing functions much easier. .PP @@ -228,12 +220,10 @@ converter, it is possible to replace that capability with various shell aliases. Examples: .IP -.nf -\f[C] +.EX alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq] alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq] -\f[R] -.fi +.EE .PP Second, if the purpose of a function is to set \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], or \f[B]seed\f[R] globally for any @@ -251,11 +241,9 @@ If a function desires to not affect the sequence of pseudo-random numbers of its parents, but wants to use the same \f[B]seed\f[R], it can use the following line: .IP -.nf -\f[C] +.EX seed = seed -\f[R] -.fi +.EE .PP If the behavior of this option is desired for every run of bc(1), then users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this @@ -485,7 +473,6 @@ This is a \f[B]non-portable extension\f[R]. .PP All long options are \f[B]non-portable extensions\f[R]. .SH STDIN -.PP If no files or expressions are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then bc(1) reads from \f[B]stdin\f[R]. @@ -502,7 +489,6 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an \f[B]else\f[R] statement will follow, so it will not execute until it knows there will not be an \f[B]else\f[R] statement. .SH STDOUT -.PP Any non-error output is written to \f[B]stdout\f[R]. In addition, if history (see the \f[B]HISTORY\f[R] section) and the prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output @@ -511,7 +497,7 @@ to \f[B]stdout\f[R]. \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in -\f[B]bc >&-\f[R], it will quit with an error. +\f[B]bc >&-\f[R], it will quit with an error. This is done so that bc(1) can report problems when \f[B]stdout\f[R] is redirected to a file. .PP @@ -519,13 +505,12 @@ If there are scripts that depend on the behavior of other bc(1) implementations, it is recommended that those scripts be changed to redirect \f[B]stdout\f[R] to \f[B]/dev/null\f[R]. .SH STDERR -.PP Any error output is written to \f[B]stderr\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in -\f[B]bc 2>&-\f[R], it will quit with an error. +\f[B]bc 2>&-\f[R], it will quit with an error. This is done so that bc(1) can exit with an error code when \f[B]stderr\f[R] is redirected to a file. .PP @@ -533,7 +518,6 @@ If there are scripts that depend on the behavior of other bc(1) implementations, it is recommended that those scripts be changed to redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R]. .SH SYNTAX -.PP The syntax for bc(1) programs is mostly C-like, with some differences. This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R] section), which is a much more thorough resource for the language this @@ -618,7 +602,6 @@ These are \f[B]non-portable extensions\f[R]. .PP Either semicolons or newlines may separate statements. .SS Comments -.PP There are two kinds of comments: .IP "1." 3 Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R]. @@ -627,7 +610,6 @@ Line comments go from \f[B]#\f[R] until, and not including, the next newline. This is a \f[B]non-portable extension\f[R]. .SS Named Expressions -.PP The following are named expressions in bc(1): .IP "1." 3 Variables: \f[B]I\f[R] @@ -684,7 +666,6 @@ Named expressions are required as the operand of of \f[B]assignment\f[R] operators (see the \f[I]Operators\f[R] subsection). .SS Operands -.PP The following are valid operands in bc(1): .IP " 1." 4 Numbers (see the \f[I]Numbers\f[R] subsection below). @@ -829,7 +810,6 @@ where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. .SS Numbers -.PP Numbers are strings made up of digits, uppercase letters, and at most \f[B]1\f[R] period for a radix. Numbers can have up to \f[B]BC_NUM_MAX\f[R] digits. @@ -901,7 +881,6 @@ number string \f[B]FFeA\f[R], the resulting decimal number will be Accepting input as scientific notation is a \f[B]non-portable extension\f[R]. .SS Operators -.PP The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. @@ -1018,9 +997,9 @@ The operators will be described in more detail below. .TP \f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] -operators behave exactly like they would in C. -They require a named expression (see the \f[I]Named Expressions\f[R] -subsection) as an operand. +operators behave exactly like they would in C. They require a named +expression (see the \f[I]Named Expressions\f[R] subsection) as an +operand. .RS .PP The prefix versions of these operators are more efficient; use them @@ -1192,7 +1171,6 @@ This is \f[I]not\f[R] a short-circuit operator. This is a \f[B]non-portable extension\f[R]. .RE .SS Statements -.PP The following items are statements: .IP " 1." 4 \f[B]E\f[R] @@ -1270,11 +1248,9 @@ occur before the \f[B]quit\f[R] statement before exiting. .PP In other words, for the bc(1) code below: .IP -.nf -\f[C] +.EX for (i = 0; i < 3; ++i) i; quit -\f[R] -.fi +.EE .PP Other bc(1) implementations will print nothing, and this bc(1) will print \f[B]0\f[R], \f[B]1\f[R], and \f[B]2\f[R] on successive lines @@ -1305,7 +1281,6 @@ run with either the \f[B]-s\f[R] or \f[B]-w\f[R] command-line options Printing numbers in scientific notation and/or engineering notation is a \f[B]non-portable extension\f[R]. .SS Strings -.PP If strings appear as a statement by themselves, they are printed without a trailing newline. .PP @@ -1324,7 +1299,6 @@ resets (see the \f[B]RESET\f[R] section). Assigning strings to variables and array elements and passing them to functions are \f[B]non-portable extensions\f[R]. .SS Print Statement -.PP The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be strings. If they are, there are backslash escape sequences that are interpreted @@ -1356,7 +1330,6 @@ character to be printed as-is. Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement -.PP The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string @@ -1370,17 +1343,14 @@ The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each digit is interpreted as an 8-bit ASCII character, making it a byte stream. .SS Order of Evaluation -.PP All expressions in a statment are evaluated left to right, except as necessary to maintain order of operations. This means, for example, assuming that \f[B]i\f[R] is equal to \f[B]0\f[R], in the expression .IP -.nf -\f[C] +.EX a[i++] = i++ -\f[R] -.fi +.EE .PP the first (or 0th) element of \f[B]a\f[R] is set to \f[B]1\f[R], and \f[B]i\f[R] is equal to \f[B]2\f[R] at the end of the expression. @@ -1389,28 +1359,23 @@ This includes function arguments. Thus, assuming \f[B]i\f[R] is equal to \f[B]0\f[R], this means that in the expression .IP -.nf -\f[C] +.EX x(i++, i++) -\f[R] -.fi +.EE .PP the first argument passed to \f[B]x()\f[R] is \f[B]0\f[R], and the second argument is \f[B]1\f[R], while \f[B]i\f[R] is equal to \f[B]2\f[R] before the function starts executing. .SH FUNCTIONS -.PP Function definitions are as follows: .IP -.nf -\f[C] +.EX define I(I,...,I){ auto I,...,I S;...;S return(E) } -\f[R] -.fi +.EE .PP Any \f[B]I\f[R] in the parameter list or \f[B]auto\f[R] list may be replaced with \f[B]I[]\f[R] to make a parameter or \f[B]auto\f[R] var an @@ -1438,18 +1403,15 @@ equivalent to \f[B]return (0)\f[R], unless the function is a \f[B]void\f[R] function (see the \f[I]Void Functions\f[R] subsection below). .SS Void Functions -.PP Functions can also be \f[B]void\f[R] functions, defined as follows: .IP -.nf -\f[C] +.EX define void I(I,...,I){ auto I,...,I S;...;S return } -\f[R] -.fi +.EE .PP They can only be used as standalone expressions, where such an expression would be printed alone, except in a print statement. @@ -1465,15 +1427,12 @@ The word \[lq]void\[rq] is only treated specially right after the .PP This is a \f[B]non-portable extension\f[R]. .SS Array References -.PP For any array in the parameter list, if the array is declared in the form .IP -.nf -\f[C] +.EX *I[] -\f[R] -.fi +.EE .PP it is a \f[B]reference\f[R]. Any changes to the array in the function are reflected, when the @@ -1483,7 +1442,6 @@ Other than this, all function arguments are passed by value. .PP This is a \f[B]non-portable extension\f[R]. .SH LIBRARY -.PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line @@ -1491,7 +1449,6 @@ flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. .SS Standard Library -.PP The standard (see the \f[B]STANDARDS\f[R] section) defines the following functions for the math library: .TP @@ -1544,7 +1501,6 @@ This is a transcendental function (see the \f[I]Transcendental Functions\f[R] subsection below). .RE .SS Extended Library -.PP The extended library is \f[I]not\f[R] loaded when the \f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the @@ -1866,7 +1822,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]bnot8(x)\f[R] Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as -though it has \f[B]8\f[R] binary digits (1 unsigned byte). +though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] unsigned byte). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1875,7 +1831,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]bnot16(x)\f[R] Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as -though it has \f[B]16\f[R] binary digits (2 unsigned bytes). +though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1884,7 +1840,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]bnot32(x)\f[R] Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as -though it has \f[B]32\f[R] binary digits (4 unsigned bytes). +though it has \f[B]32\f[R] binary digits (\f[B]4\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1893,7 +1849,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]bnot64(x)\f[R] Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as -though it has \f[B]64\f[R] binary digits (8 unsigned bytes). +though it has \f[B]64\f[R] binary digits (\f[B]8\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1921,7 +1877,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brev8(x)\f[R] Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as -though it has 8 binary digits (1 unsigned byte). +though it has 8 binary digits (\f[B]1\f[R] unsigned byte). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1930,7 +1886,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brev16(x)\f[R] Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as -though it has 16 binary digits (2 unsigned bytes). +though it has 16 binary digits (\f[B]2\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1939,7 +1895,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brev32(x)\f[R] Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as -though it has 32 binary digits (4 unsigned bytes). +though it has 32 binary digits (\f[B]4\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1948,7 +1904,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brev64(x)\f[R] Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as -though it has 64 binary digits (8 unsigned bytes). +though it has 64 binary digits (\f[B]8\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -2001,7 +1957,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brol32(x, p)\f[R] Does a left bitwise rotatation of the truncated absolute value of -\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]4\f[R] unsigned bytes), by the number of places equal to the truncated absolute value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. .RS @@ -2012,7 +1968,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brol64(x, p)\f[R] Does a left bitwise rotatation of the truncated absolute value of -\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]8\f[R] unsigned bytes), by the number of places equal to the truncated absolute value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. .RS @@ -2457,7 +2413,6 @@ This is a \f[B]void\f[R] function (see the \f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section). .RE .SS Transcendental Functions -.PP All transcendental functions can return slightly inaccurate results, up to 1 ULP (https://en.wikipedia.org/wiki/Unit_in_the_last_place). This is unavoidable, and the article at @@ -2513,7 +2468,6 @@ The transcendental functions in the extended math library are: .IP \[bu] 2 \f[B]d2r(x)\f[R] .SH RESET -.PP When bc(1) encounters an error or a signal that it has a non-default handler for, it resets. This means that several things happen. @@ -2534,7 +2488,6 @@ Note that this reset behavior is different from the GNU bc(1), which attempts to start executing the statement right after the one that caused an error. .SH PERFORMANCE -.PP Most bc(1) implementations use \f[B]char\f[R] types to calculate the value of \f[B]1\f[R] decimal digit at a time, but that can be slow. This bc(1) does something different. @@ -2557,7 +2510,6 @@ checking. This integer type depends on the value of \f[B]BC_LONG_BIT\f[R], but is always at least twice as large as the integer type used to store digits. .SH LIMITS -.PP The following are the limits on bc(1): .TP \f[B]BC_LONG_BIT\f[R] @@ -2626,7 +2578,6 @@ large (at least on 64-bit machines) that there should not be any point at which they become a problem. In fact, memory should be exhausted before these limits should be hit. .SH ENVIRONMENT VARIABLES -.PP As \f[B]non-portable extensions\f[R], bc(1) recognizes the following environment variables: .TP @@ -2765,7 +2716,6 @@ This environment variable overrides the default, which can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options. .RE .SH EXIT STATUS -.PP bc(1) returns the following exit statuses: .TP \f[B]0\f[R] @@ -2844,7 +2794,6 @@ These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the \f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE -.PP Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] @@ -2858,7 +2807,6 @@ bc(1) may also reset on \f[B]SIGINT\f[R] instead of exit, depending on the contents of, or default for, the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the \f[B]ENVIRONMENT VARIABLES\f[R] section). .SH TTY MODE -.PP If \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all connected to a TTY, then \[lq]TTY mode\[rq] is considered to be available, and thus, bc(1) can turn on TTY mode, subject to some @@ -2882,7 +2830,6 @@ required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section), and interactive mode requires only \f[B]stdin\f[R] and \f[B]stdout\f[R] to be connected to a terminal. .SS Command-Line History -.PP Command-line history is only enabled if TTY mode is, i.e., that \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the \f[B]BC_TTY_MODE\f[R] environment variable (see the @@ -2890,7 +2837,6 @@ a TTY and the \f[B]BC_TTY_MODE\f[R] environment variable (see the TTY mode. See the \f[B]COMMAND LINE HISTORY\f[R] section for more information. .SS Prompt -.PP If TTY mode is available, then a prompt can be enabled. Like TTY mode itself, it can be turned on or off with an environment variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] @@ -2911,7 +2857,6 @@ and \f[B]--no-read-prompt\f[R] options. See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections for more details. .SH SIGNAL HANDLING -.PP Sending a \f[B]SIGINT\f[R] will cause bc(1) to do one of two things. .PP If bc(1) is not in interactive mode (see the \f[B]INTERACTIVE MODE\f[R] @@ -2946,7 +2891,6 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when bc(1) is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R] will cause bc(1) to clean up and exit. .SH COMMAND LINE HISTORY -.PP bc(1) supports interactive command-line editing. .PP If bc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section), @@ -2964,14 +2908,11 @@ the arrow keys. .PP \f[B]Note\f[R]: tabs are converted to 8 spaces. .SH LOCALES -.PP This bc(1) ships with support for adding error messages for different locales and thus, supports \f[B]LC_MESSAGES\f[R]. .SH SEE ALSO -.PP dc(1) .SH STANDARDS -.PP bc(1) is compliant with the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) specification at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . @@ -2991,13 +2932,13 @@ the value of \f[B]LC_NUMERIC\f[R]. This bc(1) supports error messages for different locales, and thus, it supports \f[B]LC_MESSAGES\f[R]. .SH BUGS -.PP Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS -.PP -Gavin D. -Howard and contributors. +Gavin D. Howard \c +.MT gavin@gavinhoward.com +.ME \c +\ and contributors. diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 3e593e16b481..77004822f73d 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -1513,7 +1513,7 @@ The extended library is a **non-portable extension**. **bnot8(x)** : Does a bitwise not of the truncated absolute value of **x** as though it has - **8** binary digits (1 unsigned byte). + **8** binary digits (**1** unsigned byte). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1521,7 +1521,7 @@ The extended library is a **non-portable extension**. **bnot16(x)** : Does a bitwise not of the truncated absolute value of **x** as though it has - **16** binary digits (2 unsigned bytes). + **16** binary digits (**2** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1529,7 +1529,7 @@ The extended library is a **non-portable extension**. **bnot32(x)** : Does a bitwise not of the truncated absolute value of **x** as though it has - **32** binary digits (4 unsigned bytes). + **32** binary digits (**4** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1537,7 +1537,7 @@ The extended library is a **non-portable extension**. **bnot64(x)** : Does a bitwise not of the truncated absolute value of **x** as though it has - **64** binary digits (8 unsigned bytes). + **64** binary digits (**8** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1561,7 +1561,7 @@ The extended library is a **non-portable extension**. **brev8(x)** : Runs a bit reversal on the truncated absolute value of **x** as though it - has 8 binary digits (1 unsigned byte). + has 8 binary digits (**1** unsigned byte). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1569,7 +1569,7 @@ The extended library is a **non-portable extension**. **brev16(x)** : Runs a bit reversal on the truncated absolute value of **x** as though it - has 16 binary digits (2 unsigned bytes). + has 16 binary digits (**2** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1577,7 +1577,7 @@ The extended library is a **non-portable extension**. **brev32(x)** : Runs a bit reversal on the truncated absolute value of **x** as though it - has 32 binary digits (4 unsigned bytes). + has 32 binary digits (**4** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1585,7 +1585,7 @@ The extended library is a **non-portable extension**. **brev64(x)** : Runs a bit reversal on the truncated absolute value of **x** as though it - has 64 binary digits (8 unsigned bytes). + has 64 binary digits (**8** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1632,7 +1632,7 @@ The extended library is a **non-portable extension**. **brol32(x, p)** : Does a left bitwise rotatation of the truncated absolute value of **x**, as - though it has **32** binary digits (**2** unsigned bytes), by the number of + though it has **32** binary digits (**4** unsigned bytes), by the number of places equal to the truncated absolute value of **p** modded by **2** to the power of **32**. @@ -1642,7 +1642,7 @@ The extended library is a **non-portable extension**. **brol64(x, p)** : Does a left bitwise rotatation of the truncated absolute value of **x**, as - though it has **64** binary digits (**2** unsigned bytes), by the number of + though it has **64** binary digits (**8** unsigned bytes), by the number of places equal to the truncated absolute value of **p** modded by **2** to the power of **64**. diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index 24f49c701b46..549c1adae8a1 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -25,14 +25,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME -.PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS -.PP \f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]] [\f[B]--no-digit-clamp\f[R]] [\f[B]--global-stacks\f[R]] [\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] @@ -44,7 +42,6 @@ bc - arbitrary-precision decimal arithmetic language and calculator [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION -.PP bc(1) is an interactive processor for a language first standardized in 1991 by POSIX. (See the \f[B]STANDARDS\f[R] section.) @@ -73,7 +70,6 @@ If parsing scripts meant for other bc(1) implementations still does not work, that is a bug and should be reported. See the \f[B]BUGS\f[R] section. .SH OPTIONS -.PP The following are the options that bc(1) accepts. .TP \f[B]-C\f[R], \f[B]--no-digit-clamp\f[R] @@ -174,19 +170,16 @@ without worrying that the change will affect other functions. Thus, a hypothetical function named \f[B]output(x,b)\f[R] that simply printed \f[B]x\f[R] in base \f[B]b\f[R] could be written like this: .IP -.nf -\f[C] +.EX define void output(x, b) { obase=b x } -\f[R] -.fi +.EE .PP instead of like this: .IP -.nf -\f[C] +.EX define void output(x, b) { auto c c=obase @@ -194,8 +187,7 @@ define void output(x, b) { x obase=c } -\f[R] -.fi +.EE .PP This makes writing functions much easier. .PP @@ -209,12 +201,10 @@ converter, it is possible to replace that capability with various shell aliases. Examples: .IP -.nf -\f[C] +.EX alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq] alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq] -\f[R] -.fi +.EE .PP Second, if the purpose of a function is to set \f[B]ibase\f[R], \f[B]obase\f[R], or \f[B]scale\f[R] globally for any other purpose, it @@ -441,7 +431,6 @@ This is a \f[B]non-portable extension\f[R]. .PP All long options are \f[B]non-portable extensions\f[R]. .SH STDIN -.PP If no files or expressions are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then bc(1) reads from \f[B]stdin\f[R]. @@ -458,7 +447,6 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an \f[B]else\f[R] statement will follow, so it will not execute until it knows there will not be an \f[B]else\f[R] statement. .SH STDOUT -.PP Any non-error output is written to \f[B]stdout\f[R]. In addition, if history (see the \f[B]HISTORY\f[R] section) and the prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output @@ -467,7 +455,7 @@ to \f[B]stdout\f[R]. \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in -\f[B]bc >&-\f[R], it will quit with an error. +\f[B]bc >&-\f[R], it will quit with an error. This is done so that bc(1) can report problems when \f[B]stdout\f[R] is redirected to a file. .PP @@ -475,13 +463,12 @@ If there are scripts that depend on the behavior of other bc(1) implementations, it is recommended that those scripts be changed to redirect \f[B]stdout\f[R] to \f[B]/dev/null\f[R]. .SH STDERR -.PP Any error output is written to \f[B]stderr\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in -\f[B]bc 2>&-\f[R], it will quit with an error. +\f[B]bc 2>&-\f[R], it will quit with an error. This is done so that bc(1) can exit with an error code when \f[B]stderr\f[R] is redirected to a file. .PP @@ -489,7 +476,6 @@ If there are scripts that depend on the behavior of other bc(1) implementations, it is recommended that those scripts be changed to redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R]. .SH SYNTAX -.PP The syntax for bc(1) programs is mostly C-like, with some differences. This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R] section), which is a much more thorough resource for the language this @@ -568,7 +554,6 @@ These are \f[B]non-portable extensions\f[R]. .PP Either semicolons or newlines may separate statements. .SS Comments -.PP There are two kinds of comments: .IP "1." 3 Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R]. @@ -577,7 +562,6 @@ Line comments go from \f[B]#\f[R] until, and not including, the next newline. This is a \f[B]non-portable extension\f[R]. .SS Named Expressions -.PP The following are named expressions in bc(1): .IP "1." 3 Variables: \f[B]I\f[R] @@ -606,7 +590,6 @@ Named expressions are required as the operand of of \f[B]assignment\f[R] operators (see the \f[I]Operators\f[R] subsection). .SS Operands -.PP The following are valid operands in bc(1): .IP " 1." 4 Numbers (see the \f[I]Numbers\f[R] subsection below). @@ -710,7 +693,6 @@ otherwise. See the \f[B]OPTIONS\f[R] section. This is a \f[B]non-portable extension\f[R]. .SS Numbers -.PP Numbers are strings made up of digits, uppercase letters, and at most *** 6187 LINES SKIPPED *** From nobody Wed Jan 10 16:38: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 4T9D4p1mRNz57K4b; Wed, 10 Jan 2024 16:38: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 4T9D4p0ctzz58lR; Wed, 10 Jan 2024 16:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fEofxro69WxT8keXAu0P2TmFkeEiQbiqQpmLMloIoow=; b=s0+dqsZYNradFGGT2XTTrZdBQcGYybZ4On3khptix7sWv6ziTkpwDFEha+SKgViPYQUeYa 8JVIztbGGnytVYYKs2EJssGkICQorifHlonRLBAUcbSQaLiXqOMEIQeo70hM/t1qPjptGk 4vOVhyG4FhR/9ixelzlj3ZARgWBtUvljZxzZ6eP+HDplSXTRceUy6UBHlgxA4xSMvF8P3L 5nSYsAZKSFxlalz1jNepUTAB51jF21FwvaDRk87gHol0zXYYR33lMPcbWWBGa7Wjj0Nmug gwSPelENi6UyxTbxCkS1Gpf9wB1TT9k5EBHWEK8twpmV6TvoaZTw6y9E8t2IQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fEofxro69WxT8keXAu0P2TmFkeEiQbiqQpmLMloIoow=; b=uBLiYqedOhK4JMTbH06kXkyFxylJktDpFrZMaFSqZ7fgbuNkOgh6I6wcKGlrC7V5MA/4Vf rgXzLJdZzt4rBtyJsfQemH1Jm6qHKgItNIuz4NqMWuLCMG4BwczVyHz8cEW9AF1zmM9WDC b+bY8S+JnNo1L0pFqi4WiMiNufohXxiTJCiEfEolS2F50M4oihDUK92mK++edeV4xzWUjp fscjGkBVgoOjk6v3HudSQP8LwHK/P/8nhpVhsJ/hB2hmByKufp9owCZocm/yStXDvFM2fe woZwxc6jLgBP3cdenxFUtuOS7NPyHgLK+aLIuUhYtCkAFhEv9ZWKfvGmJ0+wYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704904698; a=rsa-sha256; cv=none; b=h/wflxX+7FppY7JBSR5NIAj9p3HOyaORdvLTi0ERw1AoGzhG0ygzyPYh29lgCFGF856HVq U2fdAcy09WBbWuMEcGlhtwEZj65zBRAoXi3bNFoITE+/hPBjUdLO9c6nbZoVr5Yy3UD18D x/Iv7NdPZVKmlGYziFf7fb/pChOCO5EpxTfZnnXetkhwNp9PwhpejG9KKnjua8O0HqhGRI aDN8q75PsAd8nrbZ8E7Q6VELRzePo0ehZmKMpzcJSZPHtX5TgDlR2cjCJBHRPTrBS9hBLK FdkxTXgAJprKWrLgDDmlL3O4lqyMObLXzs50HMMHT1T57bTSjtKvs+SsMStT/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 4T9D4n5ty6zjkV; Wed, 10 Jan 2024 16:38: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 40AGcHDg069317; Wed, 10 Jan 2024 16:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AGcHGO069314; Wed, 10 Jan 2024 16:38:17 GMT (envelope-from git) Date: Wed, 10 Jan 2024 16:38:17 GMT Message-Id: <202401101638.40AGcHGO069314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: f4fbc49d201f - main - vendor/bc: upgrade to version 6.7.5 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4fbc49d201f81c481a33fac6ba28e19faf96260 Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=f4fbc49d201f81c481a33fac6ba28e19faf96260 commit f4fbc49d201f81c481a33fac6ba28e19faf96260 Author: Stefan Eßer AuthorDate: 2024-01-04 23:07:46 +0000 Commit: Stefan Eßer CommitDate: 2024-01-10 16:36:29 +0000 vendor/bc: upgrade to version 6.7.5 This update fixes a bug that line breaks in printed numbers may not match the line length set by the user. The value is printed correctly, just not split as specified in some situations. (cherry picked from commit 52a5ec1b178fd07651446c7e31b1512794a04dbf) --- contrib/bc/NEWS.md | 9 + contrib/bc/include/bc.h | 2 +- contrib/bc/include/history.h | 4 - contrib/bc/include/num.h | 6 +- contrib/bc/include/version.h | 2 +- contrib/bc/scripts/sqrt_frac_guess.bc | 126 +++++++ contrib/bc/scripts/sqrt_int_guess.bc | 94 +++++ contrib/bc/scripts/sqrt_random.bc | 129 +++++++ contrib/bc/scripts/sqrt_random.sh | 77 ++++ contrib/bc/src/num.c | 41 ++- contrib/bc/src/program.c | 4 +- contrib/bc/tests/bc/scripts/all.txt | 1 + contrib/bc/tests/bc/scripts/print2.bc | 63 ++++ contrib/bc/tests/bc/scripts/print2.txt | 650 +++++++++++++++++++++++++++++++++ contrib/bc/tests/bc/sqrt.txt | 2 + contrib/bc/tests/bc/sqrt_results.txt | 2 + contrib/bc/vs/bc.vcxproj | 4 + contrib/bc/vs/bcl.vcxproj | 6 + 18 files changed, 1200 insertions(+), 22 deletions(-) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 240e02f11388..32e74de31231 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,14 @@ # News +## 6.7.5 + +This is a production release to fix one small bug. + +The bug is that sometimes numbers are printed to incorrect line lengths. The +number is always correct; the line is just longer than the limit. + +Users who do not care do not need to update. + ## 6.7.4 This is a production release to fix problems in the `bc` manual. diff --git a/contrib/bc/include/bc.h b/contrib/bc/include/bc.h index 73a85aa406a0..17fd0b9d171f 100644 --- a/contrib/bc/include/bc.h +++ b/contrib/bc/include/bc.h @@ -276,7 +276,7 @@ bc_lex_token(BcLex* l); * @return True if i is an expression token, false otherwise. */ #define BC_PARSE_EXPR(i) \ - (bc_parse_exprs[(((i) & (uchar) ~(0x07)) >> 3)] & (1 << (7 - ((i) &0x07)))) + (bc_parse_exprs[(((i) & (uchar) ~(0x07)) >> 3)] & (1 << (7 - ((i) & 0x07)))) /** * Returns the operator (by lex token) that is at the top of the operator diff --git a/contrib/bc/include/history.h b/contrib/bc/include/history.h index 19c5a0fe27f7..64402c4dffa1 100644 --- a/contrib/bc/include/history.h +++ b/contrib/bc/include/history.h @@ -173,10 +173,6 @@ typedef struct BcHistory #include #include -#if BC_DEBUG_CODE -#include -#endif // BC_DEBUG_CODE - /// Default columns. #define BC_HIST_DEF_COLS (80) diff --git a/contrib/bc/include/num.h b/contrib/bc/include/num.h index d24c206cbe51..6c9dee107f2f 100644 --- a/contrib/bc/include/num.h +++ b/contrib/bc/include/num.h @@ -211,9 +211,9 @@ struct BcRNG; #define BC_NUM_KARATSUBA_ALLOCS (6) /** - * Rounds @a s (scale) up to the next power of BC_BASE_DIGS. This also check for - * overflow and gives a fatal error if that happens because we just can't go - * over the limits we have imposed. + * Rounds @a s (scale) up to the next power of BC_BASE_DIGS. This will also + * check for overflow and gives a fatal error if that happens because we just + * can't go over the limits we have imposed. * @param s The scale to round up. * @return @a s rounded up to the next power of BC_BASE_DIGS. */ diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index d481cb10abf1..e2576269345d 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 6.7.4 +#define VERSION 6.7.5 #endif // BC_VERSION_H diff --git a/contrib/bc/scripts/sqrt_frac_guess.bc b/contrib/bc/scripts/sqrt_frac_guess.bc new file mode 100644 index 000000000000..5938cfcc7cba --- /dev/null +++ b/contrib/bc/scripts/sqrt_frac_guess.bc @@ -0,0 +1,126 @@ +#! /usr/bin/bc +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2023 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. +# + +scale = 20 + +# Adjust this number to try ranges below different powers of 10. +shift = 4 + +# Adjust this to try extra digits. For example, a value of one means that one +# digit is checked (such as 0.09 through 0.01), a value of two means that two +# digits are checked (0.090 through 0.010), etc. +max = shift + 2 + +n = (9 >> shift) +inc = (1 >> max) +stop = (1 >> shift) + +# Uncomment this to test the high part of the ranges. +#n += (1 - (1 >> max + 5)) >> shift + +for (i = n; i >= stop; i -= inc) +{ + # This is the lower limit. + t1 = sqrt(1/(3*i)) + + # Start with the inverse. + t2 = (1/i) + + # And take half its length of course. + l = length(t2$)/2 + + temp = i + odd = 0 + + # We go by powers of 10 below, but there is a degenerate case: an exact + # power of 10, for which length() will return one digit more. So we check + # for that and fix it. + while (temp < 1) + { + temp <<= 1 + odd = !odd + } + + if (temp == 1) + { + odd = !odd + } + + print "i: ", i, "\n" + print "t2: ", t2, "\n" + #print "l: ", l, "\n" + print "odd: ", odd, "\n" + + if (odd) + { + # Limit between 6 and 7.5. + limit1 = 6.7 >> (l$ * 2 + 1) + + # Limit between 1.5 and 1.83-ish. + limit2 = 1.7 >> (l$ * 2 + 1) + print "limit1: ", limit1, "\n" + print "limit2: ", limit2, "\n" + + if (i >= limit1) + { + t2 = (t2 >> l$) + } + else if (i >= limit2) + { + t2 = (t2 >> l$) / 2 + } + else + { + t2 = (t2 >> l$) / 4 + } + } + else + { + # Limit between 2.4 and 3. + limit = 2.7 >> (l$ * 2) + print "limit: ", limit, "\n" + + if (i >= limit) + { + t2 = (t2 >> l$) * 2 + } + else + { + t2 = (t2 >> l$) + } + } + #t2 = 1 + t3 = sqrt(5/(3*i)) + good = (t1 < t2 && t2 < t3) + + print t1, " < ", t2, " < ", t3, ": ", good, "\n\n" + if (!good) sqrt(-1) +} + +halt diff --git a/contrib/bc/scripts/sqrt_int_guess.bc b/contrib/bc/scripts/sqrt_int_guess.bc new file mode 100644 index 000000000000..551a06eb2e6d --- /dev/null +++ b/contrib/bc/scripts/sqrt_int_guess.bc @@ -0,0 +1,94 @@ +#! /usr/bin/bc -l +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2023 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. +# + +# Adjust this number to try ranges above different powers of 10. +max = 0 + +n = (1 << max) + +# Uncomment this to test the high part of the ranges. +#n += (1 - (1 >> 10)) + +n + +# Loop from the start number to the next power of 10. +for (i = n; i < (n$ << 1); i += 1) +{ + # This is the lower limit. + t1 = sqrt(1/(3*i)) + + l = length(i$)/2 + + print "i: ", i, "\n" + #print "l: ", l, "\n" + + if (l$ != l) + { + # Limit between 2.4 and 3. + limit = 2.7 << (l$ * 2) + #print "limit: ", limit, "\n" + + if (i >= limit) + { + t2 = 1/(i >> (l$)) * 2 + } + else + { + t2 = 1/(i >> (l$)) + } + } + else + { + # Limit between 3.8-ish and 4.8 + limit = 4.3 << (l$ * 2 - 1) + #print "limit: ", limit, "\n" + + if (i >= limit) + { + t2 = 1/(i >> (l$ - 1)) * 8 + } + else + { + t2 = 1/(i >> (l$ - 1)) * 4 + } + } + + # This is the upper limit. + t3 = sqrt(5/(3*i)) + + # This is true when the guess is in between the limits. + good = (t1 < t2 && t2 < t3) + + print t1, " < ", t2, " < ", t3, ": ", good, "\n" + + # Error if we have a problem. + if (!good) sqrt(-1) +} + +halt diff --git a/contrib/bc/scripts/sqrt_random.bc b/contrib/bc/scripts/sqrt_random.bc new file mode 100644 index 000000000000..ff08348f4977 --- /dev/null +++ b/contrib/bc/scripts/sqrt_random.bc @@ -0,0 +1,129 @@ +#! /usr/bin/bc +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2023 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. +# + +scale = 0 + +bits = rand() + +# This extracts a bit and takes it out of the original value. +# +# Here, I am getting a bit to say whether we should have a value that is less +# than 1. +bits = divmod(bits, 2, negpow[]) + +# Get a bit that will say whether the value should be an exact square. +bits = divmod(bits, 2, square[]) + +# See below. This is to help bias toward small numbers. +pow = 4 + +# I want to bias toward small numbers, so let's give a 50 percent chance to +# values below 16 or so. +bits = divmod(bits, 2, small[]) + +# Let's keep raising the power limit by 2^4 when the bit is zero. +while (!small[0]) +{ + pow += 4 + bits = divmod(bits, 2, small[]) +} + +limit = 2^pow + +# Okay, this is the starting number. +num = irand(limit) + 1 + +# Figure out if we should have (more) fractional digits. +bits = divmod(bits, 2, extra_digits[]) + +if (square[0]) +{ + # Okay, I lied. If we need a perfect square, square now. + num *= num + + # If we need extra digits, we need to multiply by an even power of 10. + if (extra_digits[0]) + { + extra = (irand(8) + 1) * 2 + } + else + { + extra = 0 + } + + # If we need a number less than 1, just take the inverse, which will still + # be a perfect square. + if (negpow[0]) + { + scale = length(num) + 5 + num = 1/num + scale = 0 + + num >>= extra + } + else + { + num <<= extra + } +} +else +{ + # Get this for later. + l = length(num) + + # If we need extra digits. + if (extra_digits[0]) + { + # Add up to 32 decimal places. + num += frand(irand(32) + 1) + } + + # If we need a value less than 1... + if (negpow[0]) + { + # Move right until the number is + num >>= l + } +} + +bits = divmod(bits, 2, zero_scale[]) + +# Do we want a zero scale? +if (zero_scale[0]) +{ + print "scale = 0\n" +} +else +{ + print "scale = 20\n" +} + +print "sqrt(", num, ")\n" + +halt diff --git a/contrib/bc/scripts/sqrt_random.sh b/contrib/bc/scripts/sqrt_random.sh new file mode 100755 index 000000000000..694c72003192 --- /dev/null +++ b/contrib/bc/scripts/sqrt_random.sh @@ -0,0 +1,77 @@ +#! /bin/sh +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2023 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. +# + +scriptdir=$(dirname "$0") + +gnu=/usr/bin/bc +gdh=/usr/local/bin/bc + +if [ "$#" -lt 1 ]; then + printf 'err: must provide path to new bc\n' + exit 1 +fi + +new="$1" +shift + +unset BC_LINE_LENGTH && unset BC_ENV_ARGS + +gdh_fail_file="sqrt_fails.bc" +new_fail_file="new_sqrt_fails.bc" + +rm -rf "$gdh_fail_file" +rm -rf "$new_fail_file" + +while [ true ]; do + + tst=$("$gdh" -l "$scriptdir/sqrt_random.bc") + err=$? + + if [ "$err" -ne 0 ]; then + printf 'err: failed to create test\n' + exit 2 + fi + + good=$(printf '%s\n' "$tst" | "$gnu" -l) + + gdh_out=$(printf '%s\n' "$tst" | "$gdh" -l) + new_out=$(printf '%s\n' "$tst" | "$new" -l) + + gdh_good=$(printf '%s == %s\n' "$good" "$gdh_out" | "$gnu") + new_good=$(printf '%s == %s\n' "$good" "$new_out" | "$gnu") + + if [ "$gdh_good" -eq 0 ]; then + printf '%s\n' "$tst" >> "$gdh_fail_file" + fi + + if [ "$new_good" -eq 0 ]; then + printf '%s\n' "$tst" >> "$new_fail_file" + fi + +done diff --git a/contrib/bc/src/num.c b/contrib/bc/src/num.c index e45aa62ddd0f..ac0f828008f8 100644 --- a/contrib/bc/src/num.c +++ b/contrib/bc/src/num.c @@ -3207,12 +3207,30 @@ bc_num_printNum(BcNum* restrict n, BcBigDig base, size_t len, assert(ptr != NULL); // While the first three arguments should be self-explanatory, the last - // needs explaining. I don't want to print a newline when the last digit - // to be printed could take the place of the backslash rather than being - // pushed, as a single character, to the next line. That's what that - // last argument does for bc. + // needs explaining. I don't want to print a backslash+newline when the + // last digit to be printed could take the place of the backslash rather + // than being pushed, as a single character, to the next line. That's + // what that last argument does for bc. + // + // First, it needs to check if newlines are completely disabled. If they + // are not disabled, it needs to check the next part. + // + // If the number has a scale, then because we are printing just the + // integer part, there will be at least two more characters (a radix + // point plus at least one digit). So if there is a scale, a backslash + // is necessary. + // + // Finally, the last condition checks to see if we are at the end of the + // stack. If we are *not* (i.e., the index is not one less than the + // stack length), then a backslash is necessary because there is at + // least one more character for at least one more digit). Otherwise, if + // the index is equal to one less than the stack length, we want to + // disable backslash printing. + // + // The function that prints bases 17 and above will take care of not + // printing a backslash in the right case. print(*ptr, len, false, - !newline || (n->scale != 0 || i == stack.len - 1)); + !newline || (n->scale != 0 || i < stack.len - 1)); } // We are done if there is no fractional part. @@ -4091,13 +4109,14 @@ bc_num_sqrt(BcNum* restrict a, BcNum* restrict b, size_t scale) // Square root needs half of the length of the parameter. req = bc_vm_growSize(BC_MAX(rdx, BC_NUM_RDX_VAL(a)), len >> 1); + req = bc_vm_growSize(req, 1); BC_SIG_LOCK; // Unlike the binary operators, this function is the only single parameter // function and is expected to initialize the result. This means that it // expects that b is *NOT* preallocated. We allocate it here. - bc_num_init(b, bc_vm_growSize(req, 1)); + bc_num_init(b, req); BC_SIG_UNLOCK; @@ -4130,13 +4149,12 @@ bc_num_sqrt(BcNum* restrict a, BcNum* restrict b, size_t scale) bc_num_init(&num2, len); bc_num_setup(&half, half_digs, sizeof(half_digs) / sizeof(BcDig)); - // There is a division by two in the formula. We setup a number that's 1/2 + // There is a division by two in the formula. We set up a number that's 1/2 // so that we can use multiplication instead of heavy division. - bc_num_one(&half); + bc_num_setToZero(&half, 1); half.num[0] = BC_BASE_POW / 2; half.len = 1; BC_NUM_RDX_SET_NP(half, 1); - half.scale = 1; bc_num_init(&f, len); bc_num_init(&fprime, len); @@ -4156,8 +4174,9 @@ bc_num_sqrt(BcNum* restrict a, BcNum* restrict b, size_t scale) pow = bc_num_intDigits(a); // The code in this if statement calculates the initial estimate. First, if - // a is less than 0, then 0 is a good estimate. Otherwise, we want something - // in the same ballpark. That ballpark is pow. + // a is less than 1, then 0 is a good estimate. Otherwise, we want something + // in the same ballpark. That ballpark is half of pow because the result + // will have half the digits. if (pow) { // An odd number is served by starting with 2^((pow-1)/2), and an even diff --git a/contrib/bc/src/program.c b/contrib/bc/src/program.c index 2f26589166e3..c9d268dfde82 100644 --- a/contrib/bc/src/program.c +++ b/contrib/bc/src/program.c @@ -3780,7 +3780,7 @@ bc_program_printStr(const BcProgram* p, const char* restrict code, size_t idx = bc_program_index(code, bgn); char* s; - s = *((char**) bc_vec_item(p->strs, idx)); + s = *((char**) bc_vec_item(&p->strs, idx)); bc_vm_printf(" (\"%s\") ", s); } @@ -3803,7 +3803,7 @@ bc_program_printInst(const BcProgram* p, const char* restrict code, else if (inst == BC_INST_NUM) { size_t idx = bc_program_index(code, bgn); - BcConst* c = bc_vec_item(p->consts, idx); + BcConst* c = bc_vec_item(&p->consts, idx); bc_vm_printf("(%s)", c->val); } else if (inst == BC_INST_CALL || diff --git a/contrib/bc/tests/bc/scripts/all.txt b/contrib/bc/tests/bc/scripts/all.txt index 0008d70193c6..7b49f7c4e77a 100644 --- a/contrib/bc/tests/bc/scripts/all.txt +++ b/contrib/bc/tests/bc/scripts/all.txt @@ -3,6 +3,7 @@ divide.bc subtract.bc add.bc print.bc +print2.bc parse.bc root.bc array.bc diff --git a/contrib/bc/tests/bc/scripts/print2.bc b/contrib/bc/tests/bc/scripts/print2.bc new file mode 100644 index 000000000000..5f3466929f77 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/print2.bc @@ -0,0 +1,63 @@ +#! /usr/bin/bc -q + +l = line_length() + +max = 128 +scale = 0 + +obase=2 +2^99 +2^100 +2^105 + +for (i = 2; i < max; ++i) +{ + obase=i + if (obase < 17) + { + 1 * i^(l - 1) + 1 * i^l + 1 * i^(l + 1) + } + else if (obase >= 17 && obase <= 100) + { + l2 = l/3 + 1 * i^(l2 - 1) + 1 * i^l2 + 1 * i^(l2 + 1) + } + else + { + l2 = l/4 + 1 * i^(l2 - 1) + 1 * i^l2 + 1 * i^(l2 + 1) + } +} + +if (maxobase() > 2^18) +{ + obase=2^18 + 1 * i^(100) + 1 * i^(101) + 1 * i^(103) +} +else +{ + print " 065536 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 000000\n" + print " 000032 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 00000\\\n" + print "0 000000\n" + print " 000002 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 00000\\\n" + print "0 000000 000000\n" +} + +halt diff --git a/contrib/bc/tests/bc/scripts/print2.txt b/contrib/bc/tests/bc/scripts/print2.txt new file mode 100644 index 000000000000..208f0ed2e479 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/print2.txt @@ -0,0 +1,650 @@ +10000000000000000000000000000000000000000000000000000000000000000000\ +00000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00000000000000000000000000000000000000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 *** 532 LINES SKIPPED *** From nobody Wed Jan 10 17:50: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 4T9FhD6jpzz55V3j; Wed, 10 Jan 2024 17:50: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 4T9FhD6G67z46ps; Wed, 10 Jan 2024 17:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rlj6HKiUt6hAe7I3Iu0jjEiZIaEyTxojcL5qbQV3dGI=; b=FLpcreNezM7rej+YuD8ccWzc/Obw4qwJUeFJlgkMQ1oxTFrfqYDjvMf140nLzz/pRzC/zV H29QuGUPx4i91XMX58GgetnkSCMTyzkzuks00+6gQ6COtgEuNln40hBUZEfz4ojJG7/krL ypx0b+E7+Up6OURx9W3TvXLAaCtBm23OVEBuopwG6aXDE/AxD5oxfbhHWqJfuiBPwwZvC/ z//7XcBXjiO95QLFyKWtKGEMhBhazyZql1+vKm20YcRjesvRWlpeQ5Uf1LkA5YrmIQNP+X Gp45B9z0HcUqZC3YAHHw4NB9sg/jITcbQKhAgA6ZoE9737IwuxXmj/EpudWSsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rlj6HKiUt6hAe7I3Iu0jjEiZIaEyTxojcL5qbQV3dGI=; b=iQa9dS9mhfgOVhZrrNXigJi/CvQMxpTkIayAFYRsrfxfU+JhuVZV6mtszlbzOsWSytGyLY kHDdb1weFDZyygsA6grxrI5hhH3ZReU2dX9SkRcXBQe67ehMWm9WOq1d6GSzeChBHRZCCN ypFz1uZGDIpZxwtOzYOPvLb8tcFu7N4bkTOHKYJJEZfVGO06dvSsgKPoWtyM4IKFSxys6c gCdsBZg1kfiQh95hxKH4wggmS2sNxpbjII9ZNEbU/lqzi/UX12GSvcXx2ZZP0bQtkUYDx8 HsQeuz1rElDHiguE+dhfVAcxoPiRGFHblvx9TNzI+c3rS/Glqv39LYPPniI8PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704909036; a=rsa-sha256; cv=none; b=DvozWccUcgsCB4F/LNiCYw2AOkBk0SKX36ePCuXF6y+T2DIEv2Ve4qDtJQ+Ob5ZB7m4L28 Ou36F4kVLHjJxiRrIQdSniQoU0H8FjqdmTdUYpByF4E3nzBerqhD3y/uXvLOAaWzNrZnke fCLI0xqF5RyvSaQIJknvpDZkHehHPN4eIOl8ahodjmA1gpxns4fqqwlihc/r0VdyPrHxMk gxZFnI6krFLqimJrEE5nV9/t1sQYgHgBwKq6DSYjVfI0l/JKPvZ6hTLrbMrh+4HkJbBakx Itca21yYw00LiuK7ZiUSafanX05+Fr9X/OzZlnTcW8tuSgZcYgNyx0aZNH2nKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9FhD5KkKzl8H; Wed, 10 Jan 2024 17:50: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 40AHoaBe098274; Wed, 10 Jan 2024 17:50:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AHoalp098271; Wed, 10 Jan 2024 17:50:36 GMT (envelope-from git) Date: Wed, 10 Jan 2024 17:50:36 GMT Message-Id: <202401101750.40AHoalp098271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: aadb4a1b3fd1 - main - pthread_attr_get_np(): Use malloc(), report ENOMEM, don't tamper on error List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aadb4a1b3fd185d547087f6eafca6ce0b4df3291 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=aadb4a1b3fd185d547087f6eafca6ce0b4df3291 commit aadb4a1b3fd185d547087f6eafca6ce0b4df3291 Author: Olivier Certner AuthorDate: 2024-01-04 17:45:52 +0000 Commit: Olivier Certner CommitDate: 2024-01-10 17:50:19 +0000 pthread_attr_get_np(): Use malloc(), report ENOMEM, don't tamper on error Similarly as in the previous commit, using calloc() instead of malloc() is useless here in the regular case since the subsequent call to cpuset_getaffinify() is going to completely fill the allocated memory. However, there is an additional complication. This function tries to allocate memory to hold the cpuset if it previously wasn't, and does so before the thread lock is acquired, which can fail on a bad thread ID. In this case, it is necessary to deallocate the memory allocated in this function so that the attributes object appears unmodified to the caller when an error is returned. Without this, a subsequent call to pthread_attr_getaffinity_np() would expose uninitialized memory (not a security problem per se, since it comes from the same process) instead of returning a full mask as it would before the failing call to pthread_attr_get_np(). So the caller would be able to notice a change in the state of the attributes object even if pthread_attr_get_np() reported failure, which would be quite surprising. A similar problem that could occur on failure of cpuset_setaffinity() has been fixed. Finally, we shall always report memory allocation failure. This already goes for pthread_attr_init(), so, if for nothing else, just be consistent. Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43329 --- lib/libthr/thread/thr_attr.c | 45 ++++++++++++++++++++++++----------------- lib/libthr/thread/thr_private.h | 2 -- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index 561037fa5eb4..3c03225c33cb 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -129,8 +129,9 @@ __weak_reference(_thr_attr_get_np, _pthread_attr_get_np); int _thr_attr_get_np(pthread_t pthread, pthread_attr_t *dstattr) { - struct pthread_attr attr, *dst; + struct pthread_attr *dst; struct pthread *curthread; + cpuset_t *cpuset; size_t kern_size; int error; @@ -138,35 +139,43 @@ _thr_attr_get_np(pthread_t pthread, pthread_attr_t *dstattr) return (EINVAL); kern_size = _get_kern_cpuset_size(); - if (dst->cpuset == NULL) { - dst->cpuset = calloc(1, kern_size); - dst->cpusetsize = kern_size; - } + if ((cpuset = malloc(kern_size)) == NULL) + return (ENOMEM); + } else + cpuset = dst->cpuset; curthread = _get_curthread(); /* Arg 0 is to include dead threads. */ if ((error = _thr_find_thread(curthread, pthread, 0)) != 0) - return (error); - - attr = pthread->attr; - if ((pthread->flags & THR_FLAGS_DETACHED) != 0) - attr.flags |= PTHREAD_DETACHED; + goto free_and_exit; error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, TID(pthread), - dst->cpusetsize, dst->cpuset); - if (error == -1) + kern_size, cpuset); + if (error == -1) { + THR_THREAD_UNLOCK(curthread, pthread); error = errno; + goto free_and_exit; + } - THR_THREAD_UNLOCK(curthread, pthread); + /* + * From this point on, we can't fail, so we can start modifying 'dst'. + */ - if (error == 0) - memcpy(&dst->pthread_attr_start_copy, - &attr.pthread_attr_start_copy, - offsetof(struct pthread_attr, pthread_attr_end_copy) - - offsetof(struct pthread_attr, pthread_attr_start_copy)); + *dst = pthread->attr; + if ((pthread->flags & THR_FLAGS_DETACHED) != 0) + dst->flags |= PTHREAD_DETACHED; + THR_THREAD_UNLOCK(curthread, pthread); + + dst->cpuset = cpuset; + dst->cpusetsize = kern_size; return (0); + +free_and_exit: + if (dst->cpuset == NULL) + free(cpuset); + return (error); } __weak_reference(_thr_attr_getdetachstate, pthread_attr_getdetachstate); diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 3475029f8996..3fc4d02c611e 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -261,7 +261,6 @@ struct pthread_atfork { }; struct pthread_attr { -#define pthread_attr_start_copy sched_policy int sched_policy; int sched_inherit; int prio; @@ -271,7 +270,6 @@ struct pthread_attr { void *stackaddr_attr; size_t stacksize_attr; size_t guardsize_attr; -#define pthread_attr_end_copy cpuset cpuset_t *cpuset; size_t cpusetsize; }; From nobody Wed Jan 10 17:50:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9FhG15zPz55V1P; Wed, 10 Jan 2024 17:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9FhF70wLz46pv; Wed, 10 Jan 2024 17:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aG5ZluH+4tWJLb7+/5c9aMKv321s7nUuyHkguldv8dc=; b=LMdLvJEmlVyr1K4b9BopbXYoeAsDZkv4aXXtU/dKozRfOf7wHge5Ky7YAAaPyQD54Ccg/Y dkyXPm+z1vPP7eDM38v1l4AWkgVPeYEGcNqMm6fXc/QWoF+eZOThiMVFiiHuUf1WFqBk0+ DESfPCcWcU2sQj4drxhqxJv9k/owXCV8c0kH5eb3TOIF+2jVXTdXLiOMypSQdhJER/Q6t/ b3jGFAuAuS/EQIN9gAroKg5lIYUELaEsLIcvbFzllYZIYpQfJiXBzUKO9X97q6Q/afTIQ9 X95FX5jOmPtG645hLFXJtj+jZBY/jnwwotDsLqGw5FIaD6J9UGdL7ZZpwc4yzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aG5ZluH+4tWJLb7+/5c9aMKv321s7nUuyHkguldv8dc=; b=TpBt8pNQzNGgJDxcqx5zuNBcPWdpz8d9iA4HkVcI0a1LNO3Xh4hcM2tmTnE8fk2LAnmURb /E+BRk2tx9y3VSZ85hBh03dtDaklmV+scMlbSvmc09I+Q3GKzlBp6CHVtyLzttyuzogbjX 0EAiHSgxpKeIGCKpK0cvnh2yUMlkPyrbAYDOKXfTkiAdFA75DxAAAJ1INCnmRQ6qM7M3tY vAFG8Hjm7K9ZxioHToaYag4BJyn10FGIx1lBAbkbAFmmdTQgkAkyrCVZmoaQwOHFGZnlF9 vaCKw8wuT8RijAcHgqzGFYfTE9HG3HKYjR0vi+OYsz2ilYAWFeZsOAtqQq6QzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704909038; a=rsa-sha256; cv=none; b=oZImTwalug2Pw4hhMo2tNjgzCmaf9raZqgjXC+RPxFviNKJHzszXS85ehaluSZ9kCvhcUI N0zEwD2Zk6SD7+z7Vyt0zIIgOx14w78sWxDNy6pIuhkOBDZahzqU3De45oFNQY/tUj86GT 1NEK6690o+hG2MP00xTVlboK7pA4a4HHovBnkb01UdfddP+CzXJW/rawvPjp/0ecbIVHao Xdw0sqgMtbf/mMVKYe/X4gYUIlVQlGtYwkMV2rSgoo+5eG85XBcGdtXt7JLl0bC8/8I47Z 0Y13ZTRp+TYsObgwB1hJRNIR4FTbIXCbcyXUv3O1xZGgott71OZd0b5Fj09ddA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9FhF663wzlVt; Wed, 10 Jan 2024 17:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40AHob6s098307; Wed, 10 Jan 2024 17:50:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AHob5v098304; Wed, 10 Jan 2024 17:50:37 GMT (envelope-from git) Date: Wed, 10 Jan 2024 17:50:37 GMT Message-Id: <202401101750.40AHob5v098304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 6211cd4be32d - main - pthread_attr_get_np(3): Revamp List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6211cd4be32dfdc51b5ac452d4ead98a36ec42a6 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6211cd4be32dfdc51b5ac452d4ead98a36ec42a6 commit 6211cd4be32dfdc51b5ac452d4ead98a36ec42a6 Author: Olivier Certner AuthorDate: 2024-01-05 13:14:48 +0000 Commit: Olivier Certner CommitDate: 2024-01-10 17:50:19 +0000 pthread_attr_get_np(3): Revamp Fix and more thoroughly describe the attributes object lifecycle. Also, correct the text about which attributes' values are reported. Add the ENOMEM error. While here, rephrase unclear passages, add references and fix the example's style. Reviewed by: kib, emaste Approved by: emaste (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43330 --- share/man/man3/pthread_attr_get_np.3 | 84 +++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/share/man/man3/pthread_attr_get_np.3 b/share/man/man3/pthread_attr_get_np.3 index a13835287d7f..07153586c1b2 100644 --- a/share/man/man3/pthread_attr_get_np.3 +++ b/share/man/man3/pthread_attr_get_np.3 @@ -1,5 +1,10 @@ .\" Copyright (c) 2002,2003 Alexey Zelkin .\" All rights reserved. +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the +.\" FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,12 +27,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 12, 2021 +.Dd January 5, 2024 .Dt PTHREAD_ATTR_GET_NP 3 .Os .Sh NAME .Nm pthread_attr_get_np -.Nd get attributes of existent thread +.Nd get attributes of an existing thread .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -37,51 +42,54 @@ .Sh DESCRIPTION The .Fn pthread_attr_get_np -function is used to get existent thread's attributes. -Most fields of -.Vt pthread_attr_t -structure are exact values of attributes provided at thread creation -time (as parameter to -.Xr pthread_create 3 -function), except for the stack address. -.Pp -Value returned as -.Fa dst -is supposed to be used in conjunction with -.Fn pthread_attr_get* -functions to retrieve individual values from +function is used to retrieve the attributes of the specified thread into an +existing .Vt pthread_attr_t structure. -Parameter -.Fa dst -should point to allocated memory area big enough to fit this structure. +The attributes' values are the current ones for the target thread, except for +the stack top address if not properly aligned for the architecture, since in +this case its value has been adjusted internally before use. .Pp -It is HIGHLY RECOMMENDED to use +Argument +.Fa dst +must be a pointer to a valid attributes object +.Po +it was initialized at some point by .Xr pthread_attr_init 3 -function to allocate attribute storage. -.Sh IMPLEMENTATION NOTES -The -.Fn pthread_attr_get_np -function will always return a pointer to the thread's real stack address, -regardless of its value in the original attributes structure. +and was not destroyed since then +.Pc . +After a successful call to +.Fn pthread_attr_get_np , +the individual attributes' values can be retrieved as usual via the +corresponding accessor functions as documented in +.Xr pthread_attr 3 . +After a failed call to +.Fn pthread_attr_get_np , +the object pointed to by +.Fa dst +is left unmodified, and can continue to be used as if the failed call never +happened. .Sh RETURN VALUES If successful, .Fn pthread_attr_get_np function returns 0. Otherwise, an error number is returned to indicate the error. .Sh EXAMPLES +This function retrieves the stack size of the thread specified by the +.Fa pid +argument: .Bd -literal size_t -my_thread_stack_size(pthread_t pid) +my_thread_stack_size(pthread_t tid) { - pthread_attr_t attr; - size_t size; + pthread_attr_t attr; + size_t size; - pthread_attr_init(&attr); - pthread_attr_get_np(pid, &attr); - pthread_attr_getstacksize(&attr, &size); - pthread_attr_destroy(&attr); - return(size); + pthread_attr_init(&attr); + pthread_attr_get_np(tid, &attr); + pthread_attr_getstacksize(&attr, &size); + pthread_attr_destroy(&attr); + return (size); } .Ed .Sh ERRORS @@ -90,12 +98,16 @@ The function will fail if: .Bl -tag -width Er .It Bq Er EINVAL -Invalid value for one of given parameters. +One of the arguments has an invalid value. .It Bq Er ESRCH No thread could be found corresponding to that specified by the given thread ID. +.It Bq Er ENOMEM +There was not enough memory to allocate additional storage needed by the attributes +object's implementation. .El .Sh SEE ALSO +.Xr pthread_attr 3 , .Xr pthread_attr_destroy 3 , .Xr pthread_attr_getdetachstate 3 , .Xr pthread_attr_getinheritsched 3 , @@ -111,4 +123,6 @@ thread ID. The .Fn pthread_attr_get_np function and this manual page were written by -.An Alexey Zelkin Aq Mt phantom@FreeBSD.org . +.An Alexey Zelkin Aq Mt phantom@FreeBSD.org , +and the latter was revised by +.An Olivier Certner Aq Mt olce@FreeBSD.org . From nobody Wed Jan 10 17:50: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 4T9FhH3MqPz55Txy; Wed, 10 Jan 2024 17:50: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 4T9FhH0sH6z46xh; Wed, 10 Jan 2024 17:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UrQmzkCquLAHENX2awvo9IByKhG9SACnmxrZuxC/ZHE=; b=eitCyByR6ZrbqJCRJ3gZDqDe84wQ0LN7VDNfeQc7cb3qAar3q/CW8TxSml2/1GOnzYW6JH kfRJB2qrhQ+IvaiVjxG+cMSHXUmOAcvVwrKjoUTNbALvNv7fgD8FEA0u7mogO0ZgoVZ5dp L6xYjKH+CeQGNU1z77MKI5MFqu1am17Ev5yOSFJ3ZyXIHJ+RMx+KXNVI3KtuLS+dfGraJc ioxFCp+NsmU+L8HaN/4tN00yIIGs8ZlOZWwRXqEP9/bLtjY0XlKkXcmmHNugOwlp3fPWKr C/tBaEaOvQkHkDLPiGhavYsDr2RheScwE3gpP309AVuglToLLvMUvqYvIi1Ucg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UrQmzkCquLAHENX2awvo9IByKhG9SACnmxrZuxC/ZHE=; b=B4LuNSfe/pQ3dBnoxAOpZDBpVtSXybcnDr6C9MGFdNhOsCV1wppERpAzSI8GQ1gSCgBSVU 1GDyJyExLvevDbxxYpgRssNrwly3tYvSGUpTt8Fz1emeIYEdmPWD1Aj9Es09PTyvc8xvuS k/C74IeVY1jCXPObLnbWdiGFLj7Qrq/myiRNJQCuHZs41k6+LNH2ggCuKDJq11TEGCqVuV yfIOswg+bGcPccLdNpRIWcPPpEvMheXZSJjYftHmaK1l1QtM0cA9tNXKn/sSQpb2AHztHl TDqor91wyi9uRxNeBnFCTeSTZpz423CCIYW3/cCd++z6jXk9E0XGm5rJ5cAJlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704909039; a=rsa-sha256; cv=none; b=npvpzMa1eBskW43+pPvrSPPMVHvzu+seIhghoFhvRhEWEMbzpPgWO4i+RqaxMgC+azz8xJ fRNLiKrnwEoIIMCUQAQAjZbo8+nUvhyP1Dqh19TPQqGXwHmNLuAKgIP9MVaZULfp91Pmdr 4/UUfPejf26/RAaXeyUa0tYjDHkusD8Kdeh7aozVPChC8QCpYCe1z/9OEBgCgm3XWHyKvM WeggQ4c3T8FYF5hR86UXCsqYHtgI8c3tWVedl00nPulso60LwY+mxVhCaO94rH64Svat9g ICEZX0R9fwzZAyTurTpAz2OKaU0NjeUZ1JLeGxL4PPbWG+lfyrrKcPwGJtyjjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9FhG73QTzl38; Wed, 10 Jan 2024 17:50: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 40AHocbX098344; Wed, 10 Jan 2024 17:50:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AHocNR098341; Wed, 10 Jan 2024 17:50:38 GMT (envelope-from git) Date: Wed, 10 Jan 2024 17:50:38 GMT Message-Id: <202401101750.40AHocNR098341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a1e37beb45d2 - main - cr_bsd_visible(): Style fixes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1e37beb45d270ae9926eff3b93e9398d08c94e5 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a1e37beb45d270ae9926eff3b93e9398d08c94e5 commit a1e37beb45d270ae9926eff3b93e9398d08c94e5 Author: Olivier Certner AuthorDate: 2024-01-05 15:23:19 +0000 Commit: Olivier Certner CommitDate: 2024-01-10 17:50:19 +0000 cr_bsd_visible(): Style fixes Explicitly test for non-zero return codes. Separate assignment and testing of 'error' in distinct lines. Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43335 --- sys/kern/kern_prot.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0ebedcd72fc3..be8e0b14add2 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1463,11 +1463,14 @@ cr_bsd_visible(struct ucred *u1, struct ucred *u2) { int error; - if ((error = cr_canseeotheruids(u1, u2))) + error = cr_canseeotheruids(u1, u2); + if (error != 0) return (error); - if ((error = cr_canseeothergids(u1, u2))) + error = cr_canseeothergids(u1, u2); + if (error != 0) return (error); - if ((error = cr_canseejailproc(u1, u2))) + error = cr_canseejailproc(u1, u2); + if (error != 0) return (error); return (0); } From nobody Wed Jan 10 18:20:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMG6mJKz55YJk; Wed, 10 Jan 2024 18:20: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 4T9GMG6Fnlz4GRR; Wed, 10 Jan 2024 18:20:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=24+5dsP2sB4PFN5kwR/h0W8TL4Zk4Rfyk3Rtu2YVJ+Q=; b=kDMXpKZh+/3uGxZPzw81M4VWLsSz62XB99/NzpCIqyRSkwBYHVs5DFW521etGo/wR2r9D0 1tDWnEmAABN0110nEO4ZXuVnckWLkFxV3aFMFN4dAnHxrlFegUCduGlWxZDeq3deqWBuwL LuLCCmkQxRwTAPVr11dM5n8sLeIAKx72TWh+EEBpfkmo9im0fBAPYQEoT9nttfMNU5qHzE IZTwI19OocQjluLATSMWJq/OqZ1jsMMVwCh7hIT6BS22KHs8yEfnJsLU4cUVBqX4+0IAro bo+HC+rJqkpx1T0vRZd5LyLuzVM8S6UHCs3+sKq/vQt6MeBj/GUiPQB4WnolZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=24+5dsP2sB4PFN5kwR/h0W8TL4Zk4Rfyk3Rtu2YVJ+Q=; b=lbePXSiKvEKcHAHMUubznxB5k7ebqxKl9qgyx1mYIHP6+QyW52o8ivU8Mq1vNZw//x0HSB q0P3KwtGiAMpJ5ElKOVTWqAQpePn6675hWneAFKrnOMDiZRt4DYo8Cncv23YQReDJxMc23 WN6YwMixjNEo0BHvzVrZ6tOaYfyGSWlIAtjWFiMxA9IoTQ2yH7jfask76IQPNjah+61sv+ WvoELPFUo1wOLmzwFzYivpKYzkybXOMx19p0jjrgGcw3T+7BZrUrwnm+qafSVPo+SxzgVX jnw4urdXvNiYVAFz2KmNOvhLwdXppd4F6XH0bKy5BBKbTNtLcKab5OI5Th3sDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910858; a=rsa-sha256; cv=none; b=Kki15A3LHDKMoeyxPtb2rlPku8GGV2TaFBDTW2AT8M6v2oc7ecXlKhS9pGBrBOJUsLXPcv vLz6OW6ouhOPukksvtoGpNmmMyxN6dclHgy1ptVKON7rlf1HZ9jHU/dlu7kPUnjao9Cmfk zhywTXvlV/BYOYu/SAOtt/tpqgy7dMDOloE94NzOu79m/HM8Yb/WSxDVvkH3u39QFHQx0f 8uqAqM9DXeU1YACdnMy7F5GsINyHdvvKFR+VSGazARJwGAHuGpdqukQd97okhpl4Xo0VId NeR8//L6oMSbx2waVLjCCaSOQMxEIk6zQUTZpFz4ArKJL4SWSDoPYPoQ10ZSgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMG5JSwzmNY; Wed, 10 Jan 2024 18:20: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 40AIKwpO052607; Wed, 10 Jan 2024 18:20:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIKw8O052604; Wed, 10 Jan 2024 18:20:58 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:20:58 GMT Message-Id: <202401101820.40AIKw8O052604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 3c2b2a28b9c1 - main - iicbus: Move rockchip driver into the common directory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c2b2a28b9c102d9aa368663ea250fd644f96b46 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3c2b2a28b9c102d9aa368663ea250fd644f96b46 commit 3c2b2a28b9c102d9aa368663ea250fd644f96b46 Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:21:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:10 +0000 iicbus: Move rockchip driver into the common directory No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. While here remove the condition on SOC option, device rk_i2c is enough as all Rockchip SoC that we support have this controller. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43184 --- sys/arm/rockchip/files.rk32xx | 2 +- sys/conf/files.arm64 | 2 +- sys/{arm64 => dev/iicbus/controller}/rockchip/rk_i2c.c | 0 sys/modules/rockchip/rk_i2c/Makefile | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm/rockchip/files.rk32xx b/sys/arm/rockchip/files.rk32xx index 0f2774fd76cc..e8f838fb186a 100644 --- a/sys/arm/rockchip/files.rk32xx +++ b/sys/arm/rockchip/files.rk32xx @@ -2,7 +2,7 @@ kern/kern_clocksource.c standard arm/rockchip/rk32xx_machdep.c standard arm/rockchip/rk32xx_mp.c optional smp -arm64/rockchip/rk_i2c.c standard +dev/iicbus/controller/rockchip/rk_i2c.c standard arm64/rockchip/rk_iodomain.c standard arm64/rockchip/rk_gpio.c standard arm64/rockchip/rk_grf.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index e6f525e63e64..21ad400bc2a7 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -344,6 +344,7 @@ ice_ddp.fw optional ice_ddp \ dev/iicbus/controller/twsi/mv_twsi.c optional twsi fdt dev/iicbus/controller/twsi/a10_twsi.c optional twsi fdt dev/iicbus/controller/twsi/twsi.c optional twsi fdt +dev/iicbus/controller/rockchip/rk_i2c.c optional rk_i2c fdt dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi @@ -660,7 +661,6 @@ arm64/rockchip/rk3568_combphy.c optional fdt rk_combphy soc_rockchip_rk3568 arm64/rockchip/rk3568_pcie.c optional fdt pci soc_rockchip_rk3568 arm64/rockchip/rk3568_pciephy.c optional fdt pci soc_rockchip_rk3568 arm64/rockchip/rk_dwc3.c optional fdt rk_dwc3 soc_rockchip_rk3399 | fdt rk_dwc3 soc_rockchip_rk3568 -arm64/rockchip/rk_i2c.c optional fdt rk_i2c soc_rockchip_rk3328 | fdt rk_i2c soc_rockchip_rk3399 | fdt rk_i2c soc_rockchip_rk3568 arm64/rockchip/rk_i2s.c optional fdt sound soc_rockchip_rk3328 | fdt sound soc_rockchip_rk3399 arm64/rockchip/rk_otp.c optional fdt soc_rockchip_rk3568 arm64/rockchip/rk_otp_if.m optional fdt soc_rockchip_rk3568 diff --git a/sys/arm64/rockchip/rk_i2c.c b/sys/dev/iicbus/controller/rockchip/rk_i2c.c similarity index 100% rename from sys/arm64/rockchip/rk_i2c.c rename to sys/dev/iicbus/controller/rockchip/rk_i2c.c diff --git a/sys/modules/rockchip/rk_i2c/Makefile b/sys/modules/rockchip/rk_i2c/Makefile index b90b65f1410d..3cf847e1d1cc 100644 --- a/sys/modules/rockchip/rk_i2c/Makefile +++ b/sys/modules/rockchip/rk_i2c/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/arm64/rockchip +.PATH: ${SRCTOP}/sys/dev/iicbus/controller/rockchip KMOD= rk_i2c SRCS= rk_i2c.c From nobody Wed Jan 10 18:20: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 4T9GMJ1MFpz55YDM; Wed, 10 Jan 2024 18:21: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 4T9GMJ0VQqz4GK3; Wed, 10 Jan 2024 18:21:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4XVJnmPLLZbWqLbmrgR1GFL8Rs+FPP7j37gtXsrDwR0=; b=ZJ+tscTqze31N7LF3NI8VqkWI9Xqim8K8YOkjvvcnSubDwhSoF3jrHDbg74IUwLbvEcUtl H4YfwkjsqeDsn11DuPcUouVLGdZfFfAhceBcopbrqXdUloNXjnXl7FRTJFSlLSh478j5F+ sqRFQLibbB4LYWamW0hIlpEWexeWyZvsvfdpb6BfimRg99aDTrBe5ifIPRqsctwSwrxYoP N0n+AGdu72diFQdBUJ6Yh3EiRux6U9HT3kHFXpZ5GEi9dr5IlG1yUGoLY6EH4FSL3RBcBo r7GRZkLrxQaCP6zewpYF01zNCJg5pgviFTWv0p3pQ/qG8Nt34PZ3HFDvO+lv3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4XVJnmPLLZbWqLbmrgR1GFL8Rs+FPP7j37gtXsrDwR0=; b=sfNQ7jrkjvJ3jq8r9dV2TV5mW8v5Dv9W0DwAwOTNVLyeT9hxSaKMDZAlbzP+nxDks3wHv+ XIjDPy56e//IdSOHMiNlH7+snW3Z1VTpWFyUAFgEZSW30uHnYuELaTKzUnHsmicTEUImha pBJGXG8m+Dc4dAc85EDR+6FtCmYDxODzf8Asakk7RQjIf3UU99Jr6zkUfhwukcbmFKZXAU dgWbOeOZFnBLV3PLJDt5r5PDFO33Z8mUPDqIlFSQIrfHy/Qmda+bLxGiE07ICkmYwrHeXX EQ+YfJp0KbqVaRVeVUNGnLw5JU7Pr3IoRs3dz1RXWaxQY1V/Cs7b7rJ2lwSNXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910860; a=rsa-sha256; cv=none; b=dr1TqLCiyiZNMCmLD0mYRlgJ335XcZiuxiq7ksRxsYUP5d0LNGLD/vz9w2oJ7Io2uE53Yi c77C71mplj0ZEFaRiAonqZkeD6yTY0QdgMqngqT2ef6Bh9ucp+PdQfeU1sG4gw8L1s44xm 3ceEwe5bqoILQos9Qok/HQZ/z3eIc0hq4W5y9ABzkC9woM3sYHdFpaYtWBdw+8iW6esS4E I/hYjfVY+a4m2ugCEGPE+yEtIqkWt7cGBTR6WG2b/r3nso38S8tbXfUwO6J0Qgpq7sL07Y oysv5n+p3a76j27HqFdSqdbVrJ8JjRLS2m8Pfeq19yvDI5jj6xD1ivTwmiU8Bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMH6PRbzmNZ; Wed, 10 Jan 2024 18:20: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 40AIKxeo052661; Wed, 10 Jan 2024 18:20:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIKxng052658; Wed, 10 Jan 2024 18:20:59 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:20:59 GMT Message-Id: <202401101820.40AIKxng052658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 994c943a0098 - main - spibus: Move rockchip driver into the common directory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 994c943a0098e38bff96f9f9169cbb38542c39c1 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=994c943a0098e38bff96f9f9169cbb38542c39c1 commit 994c943a0098e38bff96f9f9169cbb38542c39c1 Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:30:05 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:13 +0000 spibus: Move rockchip driver into the common directory No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG --- sys/conf/files.arm64 | 3 ++- sys/{arm64 => dev/spibus/controller}/rockchip/rk_spi.c | 0 sys/modules/rockchip/rk_spi/Makefile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 21ad400bc2a7..fa7c4e6362c4 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -391,6 +391,8 @@ dev/sdhci/sdhci_xenon_fdt.c optional sdhci_xenon sdhci fdt dev/sram/mmio_sram.c optional fdt mmio_sram dev/sram/mmio_sram_if.m optional fdt mmio_sram +dev/spibus/controller/rockchip/rk_spi.c optional fdt rk_spi + dev/uart/uart_cpu_arm64.c optional uart dev/uart/uart_dev_mu.c optional uart uart_mu fdt dev/uart/uart_dev_pl011.c optional uart pl011 @@ -675,7 +677,6 @@ arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_r arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 arm64/rockchip/rk_iodomain.c optional fdt rk_iodomain -arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | fdt rk_usb2phy soc_rockchip_rk3399 | fdt rk_usb2phy soc_rockchip_rk3568 arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 diff --git a/sys/arm64/rockchip/rk_spi.c b/sys/dev/spibus/controller/rockchip/rk_spi.c similarity index 100% rename from sys/arm64/rockchip/rk_spi.c rename to sys/dev/spibus/controller/rockchip/rk_spi.c diff --git a/sys/modules/rockchip/rk_spi/Makefile b/sys/modules/rockchip/rk_spi/Makefile index 614ea680ce56..70526cdaf2c2 100644 --- a/sys/modules/rockchip/rk_spi/Makefile +++ b/sys/modules/rockchip/rk_spi/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/arm64/rockchip +.PATH: ${SRCTOP}/sys/dev/spibus/controller/rockchip KMOD= rk_spi SRCS= rk_spi.c From nobody Wed Jan 10 18:21:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GML43Ffz55YQ3; Wed, 10 Jan 2024 18:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9GML24Jjz4GHQ; Wed, 10 Jan 2024 18:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3GK75PMIHeL5P1/HjJ5MBP5Yv/vOkecN/CtMIEmdUmc=; b=wxrXmo8oStx0PMg08vbL6n9VYaxBaQnfEqExDI8Rrm2cgWB9Lz37wstpIR+rq1LcTKqALM iVCsEWHFM+HUHwq+z75cZvi3F5W3KWE9OaP6F7yCriek8ciarejRSpt4jxU/rav9lTzBx4 9VC/c+w9e+OhQ5Tdx6q5aNfuyVK36TLsToilG7FOMUDUyXfTQLjDIp6xOQ9DUFMY7eYyEW YvPdGKqnVovZdzIq83EmutyWKh6CRolF6KtcjWKOg+Yv2dFGixHmmzCWkWBb2GwZe6tuRG DamCsCrTzt9sGzNV6BB8lDqJWaod1+LJdn/qDhszo16IEmw/DEjf5SFjC3kIKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3GK75PMIHeL5P1/HjJ5MBP5Yv/vOkecN/CtMIEmdUmc=; b=CmJX2MEcSJ/mz0NHkHfP2odwjxrJcjm82yfDSN4MNa+qltkzHOaIfA4xzjzeqUpjq+yMCu IdwAgJIOaA5tu96FDvp2l+KXLgZiAi/zkMarHadz+4803ObDzwf/8R4CJALvB+ORWqyL+L 0ZXMDqy9Wst9yvQmQHd9Q+426U8IfaXq6O14klUmQFoo6YwRN7bPgg9FHXv4fPgadjM0MT v3z+J7rycx92bFykvRw0Vzr10Sur10ihqQJq9mdrX9Lm7piyDy2qznJ4eEL5z0r0EwQUFM lHVGgkmAuTXApb0/JkFo2KqfHyzZ7RAZXJQUIc4G4yrAw/REHfrYAj7ZrQRoQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910862; a=rsa-sha256; cv=none; b=RDkpD/rNRexzf5VVrqDJc+bq+sm47xtdaySw4YGbtdgQ8vv7NIUmKaBEfeMrjkhxAxGBff T6S70dPqpdjtvsfEVmBbKdiKYsYt+VSptEPILJzvQTNEtTwZ7/8tGzfVZG2w1TD65vtIzc He5ME6dtbU9cG5QHBmsDIEMgID1xi0D2Ylo2RPKQkbodeygu/fptBxWIioxZ+u4vdZ0QtF yZfRdwfPxgFcLK6C6rRedruDFdg1SOICCj1TabzDoLU/Izv42pS8lWZicVXOKSzBCXASxL KILDKphN4RWRwaVAV2yJQ6gqcCKk/aBKN+olwOcdfSMzb+K5zt97I1TdO4UB0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GML1BDWzmJL; Wed, 10 Jan 2024 18:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40AIL2iF052775; Wed, 10 Jan 2024 18:21:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL247052772; Wed, 10 Jan 2024 18:21:02 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:02 GMT Message-Id: <202401101821.40AIL247052772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2e3507c25e42 - main - pwm: Move rockchip driver into the common directory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e3507c25e42292b45a5482e116d278f5515d04d Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2e3507c25e42292b45a5482e116d278f5515d04d commit 2e3507c25e42292b45a5482e116d278f5515d04d Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:38:54 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:17 +0000 pwm: Move rockchip driver into the common directory No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43186 --- sys/arm/rockchip/files.rk32xx | 2 +- sys/conf/files.arm64 | 3 ++- sys/{arm64 => dev/pwm/controller}/rockchip/rk_pwm.c | 0 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm/rockchip/files.rk32xx b/sys/arm/rockchip/files.rk32xx index e8f838fb186a..5393b7784108 100644 --- a/sys/arm/rockchip/files.rk32xx +++ b/sys/arm/rockchip/files.rk32xx @@ -8,7 +8,7 @@ arm64/rockchip/rk_gpio.c standard arm64/rockchip/rk_grf.c standard arm64/rockchip/rk_pinctrl.c standard arm64/rockchip/rk_pmu.c standard -arm64/rockchip/rk_pwm.c standard +dev/pwm/controller/rockchip/rk_pwm.c standard arm64/rockchip/rk_tsadc.c standard arm64/rockchip/rk_tsadc_if.m standard arm64/rockchip/rk_usbphy.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 1a141963a37e..c5f8207f01f5 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -380,6 +380,8 @@ dev/psci/psci.c standard dev/psci/smccc_arm64.S standard dev/psci/smccc.c standard +dev/pwm/controller//rockchip/rk_pwm.c optional fdt rk_pwm + dev/random/armv8rng.c optional armv8_rng !random_loadable dev/safexcel/safexcel.c optional safexcel fdt @@ -681,7 +683,6 @@ arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | fdt arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/rk_pwm.c optional fdt rk_pwm arm64/rockchip/rk_pcie.c optional fdt pci soc_rockchip_rk3399 arm64/rockchip/rk_pcie_phy.c optional fdt pci soc_rockchip_rk3399 diff --git a/sys/arm64/rockchip/rk_pwm.c b/sys/dev/pwm/controller/rockchip/rk_pwm.c similarity index 100% rename from sys/arm64/rockchip/rk_pwm.c rename to sys/dev/pwm/controller/rockchip/rk_pwm.c From nobody Wed Jan 10 18:21: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 4T9GMK3cRxz55YDS; Wed, 10 Jan 2024 18:21: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 4T9GMK1Yyqz4GKG; Wed, 10 Jan 2024 18:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IP7oNYTGYNFaFpPNgvdP0KKM4SUHcjFWJwOC+Qt5XR4=; b=J6TApTF5KRk1/d6xbZHIrCQAnZEa10nSQ4Knw9J60SGafHfNsS4X+YsHo7cEPZ1BNVkiOK K+PkTjArgqqg+XLySkUFozdiYv3miVe4uKXCKXRxFz4TMayzLvFtRsR751PkYlf1JCsu5a aoxuaoaBxgTuxaSzd1YhIjru4LjBTWisI7CeVmhCrUqy8kcA1BYbw36CaWDymRU2PVlZCX qjeiH+LcUIyvH3BRivLAvYfjNy0ElTGOnHKxrr+rKNX+rVfa1wcJT6Y91LIZ1idPuYY9Fi aQk5amXWgObYDU4OQp3v4QwFOyJDWDI3KgwbVcCPCIdTyABcETKikq9lta787g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IP7oNYTGYNFaFpPNgvdP0KKM4SUHcjFWJwOC+Qt5XR4=; b=NTykG8iblcgQeIMBsdWJnty+jC539wtylJA7ptK10/RG3CHDjahR/CEaUjMozV3oxZzYoP myQG668et/6s2kXIXOb4K6JFaWXEz/uJ4sjPHdergQ/aHhSk8dU7d5yJg+izLrF3fSygVm OzbThLfys/TjyMly8rMtnL1btFsUzgZDkHz0y2hYDZJSr46iO99eLnJVfiPXQigqiRvZH2 lfRts1Dhfx0EbZDtYbwVPo5AlVEO7Kl+X9d9gZnO0fLM/CnjrvlB81VYjZOKWi3K/AUT7/ 8Z6NrEArRIQlMs3lFmzEPNYPTPS881KXnsSnqIxr+1qzRhx6Dbz+sMXFBhDNMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910861; a=rsa-sha256; cv=none; b=nDgJStSCy+m6/Mo+VFILCpQqJteC77Z5HdleefC5y4Kccbfj7KpGc5JakM69PyRbNvv/MM X9RW7FDY62KrUFhhdmtNRTgtNIc56j4oCLeij5c/ZoG8rPZsO/kbN/pDUsG2d2Mb1rlSWz 57ZsjxkC2WmyzUglM8ClZx8Rn2wCL7Gv7OJo9kkU+3EeSraqC4f4UUg0Q5exy6JdCnTVlc GOThzzdabOsJjlcvGY464yOUztcI6F+qO7SYhCVsM1uak/fbUM8eob6CsWvJwG1UvS14ei nmsBhGh7CsvHQy+Bhl5xk3eWb0Kz/NVz7ek319Uz6a05NPUv9k3baUpAgZ9Ohg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMK0LVrzmJK; Wed, 10 Jan 2024 18:21: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 40AIL0tb052722; Wed, 10 Jan 2024 18:21:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL0G4052719; Wed, 10 Jan 2024 18:21:00 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:00 GMT Message-Id: <202401101821.40AIL0G4052719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: ec2b0ccdeed2 - main - spibus: Move allwinner driver into the common directory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec2b0ccdeed2cbd3f49b7a992023c351e239389b Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ec2b0ccdeed2cbd3f49b7a992023c351e239389b commit ec2b0ccdeed2cbd3f49b7a992023c351e239389b Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:33:02 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:15 +0000 spibus: Move allwinner driver into the common directory No need to keep it under sys/arm/allwinner It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43185 --- sys/conf/files.arm64 | 2 +- sys/{arm => dev/spibus/controller}/allwinner/aw_spi.c | 0 sys/modules/allwinner/aw_spi/Makefile | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index fa7c4e6362c4..1a141963a37e 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -391,6 +391,7 @@ dev/sdhci/sdhci_xenon_fdt.c optional sdhci_xenon sdhci fdt dev/sram/mmio_sram.c optional fdt mmio_sram dev/sram/mmio_sram_if.m optional fdt mmio_sram +dev/spibus/controller/allwinner/aw_spi.c optional fdt aw_spi dev/spibus/controller/rockchip/rk_spi.c optional fdt rk_spi dev/uart/uart_cpu_arm64.c optional uart @@ -444,7 +445,6 @@ arm/allwinner/aw_r_intc.c optional aw_r_intc fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_sid.c optional aw_sid nvmem fdt -arm/allwinner/aw_spi.c optional aw_spi fdt arm/allwinner/aw_syscon.c optional aw_syscon syscon fdt arm/allwinner/aw_thermal.c optional aw_thermal nvmem fdt arm/allwinner/aw_usbphy.c optional ehci aw_usbphy fdt diff --git a/sys/arm/allwinner/aw_spi.c b/sys/dev/spibus/controller/allwinner/aw_spi.c similarity index 100% rename from sys/arm/allwinner/aw_spi.c rename to sys/dev/spibus/controller/allwinner/aw_spi.c diff --git a/sys/modules/allwinner/aw_spi/Makefile b/sys/modules/allwinner/aw_spi/Makefile index e26ffd6589e5..3bab8c70e417 100644 --- a/sys/modules/allwinner/aw_spi/Makefile +++ b/sys/modules/allwinner/aw_spi/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/arm/allwinner +.PATH: ${SRCTOP}/sys/dev/spibus/controller/allwinner/ KMOD= aw_spi SRCS= aw_spi.c From nobody Wed Jan 10 18: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 4T9GMM5tg4z55YDW; Wed, 10 Jan 2024 18: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 4T9GMM2ZxKz4GN3; Wed, 10 Jan 2024 18: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=1704910863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h1nwcSD1P8b8eHxb09D/PNOYW9cq5RfnPb78nAxrtoE=; b=ghu3x/aK0/b7KCzoLi49c88Gg/jjX3VqZ0nDuUseYF9tLQexI/dBPZqpFideOzGRVI5W0W 6CP06jgx/fNuZww3Ina1/h5kNXessjEQneNjgKEls/mHD5NcnBZALSdQvE1mEck1TVmac8 f4uZe/PQ9J1bsIlldBniDrKkZSi0AvxAMG6jUeA2eKPegkUX1X4SD/jGlIoGKj0r7QSV4T 4rtbHqpcJ6T8MgD2lOx74WLwYOt4weHW42dCCRc57/J7wt8uCtKdCbGEbt/XpJF+ln+4J/ +arHMCtUr/r8QM9+o35AFVQd2hvT1Qn5s4da4dy1Dy3gOjWshGKHRlvacQrJEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h1nwcSD1P8b8eHxb09D/PNOYW9cq5RfnPb78nAxrtoE=; b=cBk5YbslNl0+iN2t1pQH2Npdpb5z4CYj/0AxDXDEf+JhtPCvgLH5SyuNr6cRxoHFOVHJMH qJmfXra8ddKD5VVajMM0MmCnlG2lNOzpli2VmRMs3oSKQST/VGmkdVfdqCMVtpsGeojJ2Q 8jh5QxHNOFsoj+1HLjlknTXxpkPtYD5nbuGXtcBdu0AxgtBtpCPQfr+LMb8g5BEQp/2FkZ uJsIxej49DZAybzbkVWYZj1InT7L4LeAGNrfuG24qMfyioimvRgYRgWyifjngK3bh1bc+W q7PBIz0HhBKXFynX5xZoLE6tsgSdI5oGiM9IoADVJeXDZQ1baPrgr1AQq+8MGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910863; a=rsa-sha256; cv=none; b=urdG44ubSU+BfFBSW0gn7LCltupxApSYEeeMNxvk+X9aUWUrLCRbQI/XuA4RGiLM+sq15e vfJVF5DMx7PVUJZXZtvFO3py8GLa1V/bzq9bcOYynxwxXs/UlVVOr75MUZsZfqCgg3Njvo ocr7sKRgLqNa1TJmVsm1/IQujnYU7Uow05HBPXHIaCXg8e1eVQGIc+8w/gN5riWuQ/p6YJ 7RKm931NfbwdkFLYJCEw9JRjdS+9Zn3CInuwkg+18sBOsBhDOJ8wN6yzInruSp6YxE8ZFF 6C0i6DxT48vlmkwxBpdOzwDDFuJAOrzjC7/bdXIvSmQ0s4+6VOX2VPWwV0P4ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMM1hdBzm6K; Wed, 10 Jan 2024 18: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 40AIL3eO052831; Wed, 10 Jan 2024 18: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 40AIL3OA052828; Wed, 10 Jan 2024 18:21:03 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:03 GMT Message-Id: <202401101821.40AIL3OA052828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 02e912089377 - main - pwm: Move allwinner driver into the common directory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02e9120893770924227138ba49df1edb3896112a Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=02e9120893770924227138ba49df1edb3896112a commit 02e9120893770924227138ba49df1edb3896112a Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:42:03 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:19 +0000 pwm: Move allwinner driver into the common directory No need to keep it under sys/arm/allwinner It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43187 --- sys/conf/files.arm64 | 2 +- sys/{arm => dev/pwm/controller}/allwinner/aw_pwm.c | 0 sys/modules/allwinner/aw_pwm/Makefile | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index c5f8207f01f5..db5ef64eb583 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -380,6 +380,7 @@ dev/psci/psci.c standard dev/psci/smccc_arm64.S standard dev/psci/smccc.c standard +dev/pwm/controller/allwinner/aw_pwm.c optional fdt aw_pwm dev/pwm/controller//rockchip/rk_pwm.c optional fdt rk_pwm dev/random/armv8rng.c optional armv8_rng !random_loadable @@ -442,7 +443,6 @@ arm/allwinner/aw_i2s.c optional fdt sound aw_i2s arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/contrib/device-tree/include" -arm/allwinner/aw_pwm.c optional aw_pwm fdt arm/allwinner/aw_r_intc.c optional aw_r_intc fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt diff --git a/sys/arm/allwinner/aw_pwm.c b/sys/dev/pwm/controller/allwinner/aw_pwm.c similarity index 100% rename from sys/arm/allwinner/aw_pwm.c rename to sys/dev/pwm/controller/allwinner/aw_pwm.c diff --git a/sys/modules/allwinner/aw_pwm/Makefile b/sys/modules/allwinner/aw_pwm/Makefile index 2ffc5baab879..8aac8f5ebe8a 100644 --- a/sys/modules/allwinner/aw_pwm/Makefile +++ b/sys/modules/allwinner/aw_pwm/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/arm/allwinner +.PATH: ${SRCTOP}/sys/dev/pwm/controller/allwinner KMOD= aw_pwm SRCS= aw_pwm.c From nobody Wed Jan 10 18: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 4T9GMN5rpRz55YHB; Wed, 10 Jan 2024 18:21: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 4T9GMN3ltkz4GXd; Wed, 10 Jan 2024 18:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu/ZhJBTOBHU80yrvDqOLXjqrNznRGX8P5jaDahiq58=; b=yEPGxgHV9WhhbSaQQ7Dn8EMJsmKoMmtbqTXF0ZutD4R14EgRdErKo+K98eMP20g2YTuGsu i8hGSr+Lo7TCmO4rqmnsk82DiioJys4Cttnj9GfX/fJ++0uvBsFrtAur2d8Hzd9wnXJbWO k07Etrx9v22Z9apCIC+eYF2CYxiwaLVWz/aezGbQJJZYZrLPXomdSIMwkdx1KlQNmsy1v3 /ODaE4ITC2GPefbMwVwY3S33mn7tiZ4AoVgUTuATShlJqQldym1Sxb+3zg/CuxSlPmiZl/ aIf9UsMfuJ+Tc7rPbrUiPHwvn0uPG4ep3gvwM+vzksBjlP0q5E1kDZOlR2I7HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu/ZhJBTOBHU80yrvDqOLXjqrNznRGX8P5jaDahiq58=; b=WKQGz2TfdtCdLIACRDkZbbgwgSoa0nJ+bjcM5wR9nAKmuHPHhBduDynGIAA8F3JSMk1XoR /QgKebVNctI609eWZkSgXcMpygy7A+xOE4Q5q4QlTrctTjV85n7NeJhJC7WcXx7iVP+kk6 whsXn+z5IjSGT+R0tlx1eslNU2S455pZRg5IYsiBwNn71c3aA3OI921cOU3mNXlHOFcXBh oU1ih2vb9XvI/WUJyHXFLhVG4XE6FIX+zMxbngM2VrkLdEj3lnnZn8kUMkQd4ay5gzOTqb 2SAVx06K8gueQDubKn8Dv0AF6iR2znkVhDGBWC3rgFQc2eFW/2K5gYdqzngKRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910864; a=rsa-sha256; cv=none; b=afpaw3cJZCr8PDz+iDBm0hFcguuBFPFudCevbL03x9XH+J14ObOz5oC3F/cWlKTu/tH3Zq qORsXyEPsKKnvg6+CdbNafvIpo7gJBns0lp+W23Q2MqK0uEho6mpPY2xqMu5c/GUFaxW81 K2qwwzpfZZCXBbHfXz7Exd0rV8YcmnWO7QI8ToGUE73tBc9R5WwIdgqlZTDVIrmMCTAR1G U6042CN1U/CSWVxTXUvwJm3VifNw+f1Dtprmae6DbeFAF3r5bmAm1ZZ1tFjynmon2K6i+P pcyJ0BeWRPSgksbB0NmUyfgzPYO+l3Bys1UxUwzO1RbBh+UlWBzGCM0mdAqV0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMN2rl3zmLW; Wed, 10 Jan 2024 18:21: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 40AIL48w052882; Wed, 10 Jan 2024 18:21:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL4V8052879; Wed, 10 Jan 2024 18:21:04 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:04 GMT Message-Id: <202401101821.40AIL4V8052879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: e37e8677fe55 - main - clk: Move allwinner driver into the common directory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e37e8677fe55ddd0685c764e17ac58707787758a Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e37e8677fe55ddd0685c764e17ac58707787758a commit e37e8677fe55ddd0685c764e17ac58707787758a Author: Emmanuel Vadot AuthorDate: 2023-12-25 19:01:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:20 +0000 clk: Move allwinner driver into the common directory No need to keep it under sys/arm/allwinner/clkng It's easier to find which controller we support by looking under one directory. It will also be shared with Allwinner RiscV SoC. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43188 --- sys/arm/allwinner/a10/files.a10 | 2 +- sys/arm/allwinner/a13/files.a13 | 2 +- sys/arm/allwinner/a20/files.a20 | 2 +- sys/arm/allwinner/a31/files.a31 | 2 +- sys/arm/allwinner/a83t/files.a83t | 4 +-- sys/arm/allwinner/files.allwinner | 22 ++++++++-------- sys/arm/allwinner/h3/files.h3 | 4 +-- sys/conf/files.arm64 | 30 +++++++++++----------- sys/{arm => dev/clk}/allwinner/aw_ccu.c | 0 .../clkng => dev/clk/allwinner}/aw_ccung.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_ccung.h | 18 ++++++------- .../allwinner/clkng => dev/clk/allwinner}/aw_clk.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_frac.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_frac.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_m.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_m.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_mipi.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_mipi.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_nkmp.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_nkmp.h | 2 +- .../clkng => dev/clk/allwinner}/aw_clk_nm.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_nm.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_nmm.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_nmm.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_np.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_np.h | 0 .../clk/allwinner}/aw_clk_prediv_mux.c | 4 +-- .../clk/allwinner}/aw_clk_prediv_mux.h | 2 +- .../clkng => dev/clk/allwinner}/ccu_a10.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_a13.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_a31.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_a64.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_a83t.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_de2.c | 2 +- .../allwinner/clkng => dev/clk/allwinner}/ccu_h3.c | 2 +- .../allwinner/clkng => dev/clk/allwinner}/ccu_h6.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_h6_r.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_sun8i_r.c | 2 +- 38 files changed, 73 insertions(+), 73 deletions(-) diff --git a/sys/arm/allwinner/a10/files.a10 b/sys/arm/allwinner/a10/files.a10 index 46fbb208f998..f21b937b1b45 100644 --- a/sys/arm/allwinner/a10/files.a10 +++ b/sys/arm/allwinner/a10/files.a10 @@ -1,4 +1,4 @@ arm/allwinner/a10/a10_intc.c standard arm/allwinner/a10/a10_padconf.c standard -arm/allwinner/clkng/ccu_a10.c standard +dev/clk/allwinner/ccu_a10.c standard diff --git a/sys/arm/allwinner/a13/files.a13 b/sys/arm/allwinner/a13/files.a13 index 6bf013e96b42..ec248227e058 100644 --- a/sys/arm/allwinner/a13/files.a13 +++ b/sys/arm/allwinner/a13/files.a13 @@ -1,3 +1,3 @@ arm/allwinner/a13/a13_padconf.c standard -arm/allwinner/clkng/ccu_a13.c standard +dev/clk/allwinner/ccu_a13.c standard diff --git a/sys/arm/allwinner/a20/files.a20 b/sys/arm/allwinner/a20/files.a20 index f708638ff294..663047867e45 100644 --- a/sys/arm/allwinner/a20/files.a20 +++ b/sys/arm/allwinner/a20/files.a20 @@ -1,3 +1,3 @@ arm/allwinner/a20/a20_padconf.c standard -arm/allwinner/clkng/ccu_a10.c standard +dev/clk/allwinner/ccu_a10.c standard diff --git a/sys/arm/allwinner/a31/files.a31 b/sys/arm/allwinner/a31/files.a31 index 69bf5514b0e7..9b3ac550b6fa 100644 --- a/sys/arm/allwinner/a31/files.a31 +++ b/sys/arm/allwinner/a31/files.a31 @@ -1,5 +1,5 @@ -arm/allwinner/clkng/ccu_a31.c standard +dev/clk/allwinner/ccu_a31.c standard arm/allwinner/a31/a31_padconf.c standard arm/allwinner/a31/a31_r_padconf.c standard arm/allwinner/a31/a31s_padconf.c standard diff --git a/sys/arm/allwinner/a83t/files.a83t b/sys/arm/allwinner/a83t/files.a83t index f7c47185279c..3a641f12fa5e 100644 --- a/sys/arm/allwinner/a83t/files.a83t +++ b/sys/arm/allwinner/a83t/files.a83t @@ -1,5 +1,5 @@ -arm/allwinner/clkng/ccu_a83t.c standard -arm/allwinner/clkng/ccu_sun8i_r.c standard +dev/clk/allwinner/ccu_a83t.c standard +dev/clk/allwinner/ccu_sun8i_r.c standard arm/allwinner/a83t/a83t_padconf.c standard arm/allwinner/a83t/a83t_r_padconf.c standard diff --git a/sys/arm/allwinner/files.allwinner b/sys/arm/allwinner/files.allwinner index a136b2e050ac..ae5a7bb7403d 100644 --- a/sys/arm/allwinner/files.allwinner +++ b/sys/arm/allwinner/files.allwinner @@ -33,16 +33,16 @@ arm/allwinner/aw_thermal.c optional aw_thermal arm/allwinner/aw_cir.c optional aw_cir evdev arm/allwinner/aw_reset.c standard -arm/allwinner/aw_ccu.c standard +dev/clk/allwinner/aw_ccu.c standard arm/allwinner/aw_gmacclk.c standard -arm/allwinner/clkng/aw_ccung.c standard -arm/allwinner/clkng/aw_clk_frac.c standard -arm/allwinner/clkng/aw_clk_m.c standard -arm/allwinner/clkng/aw_clk_mipi.c standard -arm/allwinner/clkng/aw_clk_nkmp.c standard -arm/allwinner/clkng/aw_clk_nm.c standard -arm/allwinner/clkng/aw_clk_np.c standard -arm/allwinner/clkng/aw_clk_nmm.c standard -arm/allwinner/clkng/aw_clk_prediv_mux.c standard -arm/allwinner/clkng/ccu_de2.c standard +dev/clk/allwinner/aw_ccung.c standard +dev/clk/allwinner/aw_clk_frac.c standard +dev/clk/allwinner/aw_clk_m.c standard +dev/clk/allwinner/aw_clk_mipi.c standard +dev/clk/allwinner/aw_clk_nkmp.c standard +dev/clk/allwinner/aw_clk_nm.c standard +dev/clk/allwinner/aw_clk_np.c standard +dev/clk/allwinner/aw_clk_nmm.c standard +dev/clk/allwinner/aw_clk_prediv_mux.c standard +dev/clk/allwinner/ccu_de2.c standard diff --git a/sys/arm/allwinner/h3/files.h3 b/sys/arm/allwinner/h3/files.h3 index f4c90e5e9ed4..89c73165ff1a 100644 --- a/sys/arm/allwinner/h3/files.h3 +++ b/sys/arm/allwinner/h3/files.h3 @@ -1,5 +1,5 @@ -arm/allwinner/clkng/ccu_h3.c standard -arm/allwinner/clkng/ccu_sun8i_r.c standard +dev/clk/allwinner/ccu_h3.c standard +dev/clk/allwinner/ccu_sun8i_r.c standard arm/allwinner/h3/h3_padconf.c standard arm/allwinner/h3/h3_r_padconf.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index db5ef64eb583..00a16553e6d6 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -456,21 +456,21 @@ arm/allwinner/axp81x.c optional axp81x fdt arm/allwinner/if_awg.c optional awg syscon aw_sid nvmem fdt # Allwinner clock driver -arm/allwinner/clkng/aw_ccung.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_frac.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_m.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_mipi.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nkmp.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nmm.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_np.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_prediv_mux.c optional aw_ccu fdt -arm/allwinner/clkng/ccu_a64.c optional soc_allwinner_a64 aw_ccu fdt -arm/allwinner/clkng/ccu_h3.c optional soc_allwinner_h5 aw_ccu fdt -arm/allwinner/clkng/ccu_h6.c optional soc_allwinner_h6 aw_ccu fdt -arm/allwinner/clkng/ccu_h6_r.c optional soc_allwinner_h6 aw_ccu fdt -arm/allwinner/clkng/ccu_sun8i_r.c optional aw_ccu fdt -arm/allwinner/clkng/ccu_de2.c optional aw_ccu fdt +dev/clk/allwinner/aw_ccung.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_frac.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_m.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_mipi.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_nkmp.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_nm.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_nmm.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_np.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_prediv_mux.c optional aw_ccu fdt +dev/clk/allwinner/ccu_a64.c optional soc_allwinner_a64 aw_ccu fdt +dev/clk/allwinner/ccu_h3.c optional soc_allwinner_h5 aw_ccu fdt +dev/clk/allwinner/ccu_h6.c optional soc_allwinner_h6 aw_ccu fdt +dev/clk/allwinner/ccu_h6_r.c optional soc_allwinner_h6 aw_ccu fdt +dev/clk/allwinner/ccu_sun8i_r.c optional aw_ccu fdt +dev/clk/allwinner/ccu_de2.c optional aw_ccu fdt # Allwinner padconf files arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt diff --git a/sys/arm/allwinner/aw_ccu.c b/sys/dev/clk/allwinner/aw_ccu.c similarity index 100% rename from sys/arm/allwinner/aw_ccu.c rename to sys/dev/clk/allwinner/aw_ccu.c diff --git a/sys/arm/allwinner/clkng/aw_ccung.c b/sys/dev/clk/allwinner/aw_ccung.c similarity index 99% rename from sys/arm/allwinner/clkng/aw_ccung.c rename to sys/dev/clk/allwinner/aw_ccung.c index b37719fa7770..2a6cbd8b9a20 100644 --- a/sys/arm/allwinner/clkng/aw_ccung.c +++ b/sys/dev/clk/allwinner/aw_ccung.c @@ -49,8 +49,8 @@ #include -#include -#include +#include +#include #ifdef __aarch64__ #include "opt_soc.h" diff --git a/sys/arm/allwinner/clkng/aw_ccung.h b/sys/dev/clk/allwinner/aw_ccung.h similarity index 87% rename from sys/arm/allwinner/clkng/aw_ccung.h rename to sys/dev/clk/allwinner/aw_ccung.h index 5dbcb729da40..61d99fc3d50f 100644 --- a/sys/arm/allwinner/clkng/aw_ccung.h +++ b/sys/dev/clk/allwinner/aw_ccung.h @@ -28,15 +28,15 @@ #ifndef __CCU_NG_H__ #define __CCU_NG_H__ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sys/arm/allwinner/clkng/aw_clk.h b/sys/dev/clk/allwinner/aw_clk.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk.h rename to sys/dev/clk/allwinner/aw_clk.h diff --git a/sys/arm/allwinner/clkng/aw_clk_frac.c b/sys/dev/clk/allwinner/aw_clk_frac.c similarity index 99% rename from sys/arm/allwinner/clkng/aw_clk_frac.c rename to sys/dev/clk/allwinner/aw_clk_frac.c index 506ba0fa177b..696f6c2ebfbf 100644 --- a/sys/arm/allwinner/clkng/aw_clk_frac.c +++ b/sys/dev/clk/allwinner/aw_clk_frac.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_frac.h b/sys/dev/clk/allwinner/aw_clk_frac.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_frac.h rename to sys/dev/clk/allwinner/aw_clk_frac.h diff --git a/sys/arm/allwinner/clkng/aw_clk_m.c b/sys/dev/clk/allwinner/aw_clk_m.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_m.c rename to sys/dev/clk/allwinner/aw_clk_m.c index 90a347b1af86..d57434617d23 100644 --- a/sys/arm/allwinner/clkng/aw_clk_m.c +++ b/sys/dev/clk/allwinner/aw_clk_m.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_m.h b/sys/dev/clk/allwinner/aw_clk_m.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_m.h rename to sys/dev/clk/allwinner/aw_clk_m.h diff --git a/sys/arm/allwinner/clkng/aw_clk_mipi.c b/sys/dev/clk/allwinner/aw_clk_mipi.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_mipi.c rename to sys/dev/clk/allwinner/aw_clk_mipi.c index 89a51b859eb3..e57b5347994a 100644 --- a/sys/arm/allwinner/clkng/aw_clk_mipi.c +++ b/sys/dev/clk/allwinner/aw_clk_mipi.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_mipi.h b/sys/dev/clk/allwinner/aw_clk_mipi.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_mipi.h rename to sys/dev/clk/allwinner/aw_clk_mipi.h diff --git a/sys/arm/allwinner/clkng/aw_clk_nkmp.c b/sys/dev/clk/allwinner/aw_clk_nkmp.c similarity index 99% rename from sys/arm/allwinner/clkng/aw_clk_nkmp.c rename to sys/dev/clk/allwinner/aw_clk_nkmp.c index 963787a4bd94..73bf6a2fafe3 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nkmp.c +++ b/sys/dev/clk/allwinner/aw_clk_nkmp.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_nkmp.h b/sys/dev/clk/allwinner/aw_clk_nkmp.h similarity index 97% rename from sys/arm/allwinner/clkng/aw_clk_nkmp.h rename to sys/dev/clk/allwinner/aw_clk_nkmp.h index 2c6986c8d722..f6d75cd3737a 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nkmp.h +++ b/sys/dev/clk/allwinner/aw_clk_nkmp.h @@ -27,7 +27,7 @@ #ifndef __AW_CLK_NKMP_H__ #define __AW_CLK_NKMP_H__ -#include +#include struct aw_clk_nkmp_def { struct clknode_init_def clkdef; diff --git a/sys/arm/allwinner/clkng/aw_clk_nm.c b/sys/dev/clk/allwinner/aw_clk_nm.c similarity index 99% rename from sys/arm/allwinner/clkng/aw_clk_nm.c rename to sys/dev/clk/allwinner/aw_clk_nm.c index 4419b94d2c42..5692ce2c8b99 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nm.c +++ b/sys/dev/clk/allwinner/aw_clk_nm.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_nm.h b/sys/dev/clk/allwinner/aw_clk_nm.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_nm.h rename to sys/dev/clk/allwinner/aw_clk_nm.h diff --git a/sys/arm/allwinner/clkng/aw_clk_nmm.c b/sys/dev/clk/allwinner/aw_clk_nmm.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_nmm.c rename to sys/dev/clk/allwinner/aw_clk_nmm.c index 3fff86042d31..754c313271cb 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nmm.c +++ b/sys/dev/clk/allwinner/aw_clk_nmm.c @@ -31,8 +31,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_nmm.h b/sys/dev/clk/allwinner/aw_clk_nmm.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_nmm.h rename to sys/dev/clk/allwinner/aw_clk_nmm.h diff --git a/sys/arm/allwinner/clkng/aw_clk_np.c b/sys/dev/clk/allwinner/aw_clk_np.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_np.c rename to sys/dev/clk/allwinner/aw_clk_np.c index e23fb3ec8733..a06b0fa16796 100644 --- a/sys/arm/allwinner/clkng/aw_clk_np.c +++ b/sys/dev/clk/allwinner/aw_clk_np.c @@ -31,8 +31,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_np.h b/sys/dev/clk/allwinner/aw_clk_np.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_np.h rename to sys/dev/clk/allwinner/aw_clk_np.h diff --git a/sys/arm/allwinner/clkng/aw_clk_prediv_mux.c b/sys/dev/clk/allwinner/aw_clk_prediv_mux.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_prediv_mux.c rename to sys/dev/clk/allwinner/aw_clk_prediv_mux.c index 17e580c7471a..3a64726ca776 100644 --- a/sys/arm/allwinner/clkng/aw_clk_prediv_mux.c +++ b/sys/dev/clk/allwinner/aw_clk_prediv_mux.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_prediv_mux.h b/sys/dev/clk/allwinner/aw_clk_prediv_mux.h similarity index 97% rename from sys/arm/allwinner/clkng/aw_clk_prediv_mux.h rename to sys/dev/clk/allwinner/aw_clk_prediv_mux.h index b95d8e281978..2de2f01a654e 100644 --- a/sys/arm/allwinner/clkng/aw_clk_prediv_mux.h +++ b/sys/dev/clk/allwinner/aw_clk_prediv_mux.h @@ -26,7 +26,7 @@ #ifndef __AW_CLK_PREDIV_MUX_H__ #define __AW_CLK_PREDIV_MUX_H__ -#include +#include struct aw_clk_prediv_mux_def { struct clknode_init_def clkdef; diff --git a/sys/arm/allwinner/clkng/ccu_a10.c b/sys/dev/clk/allwinner/ccu_a10.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a10.c rename to sys/dev/clk/allwinner/ccu_a10.c index a96d3d305414..0a14583a9f04 100644 --- a/sys/arm/allwinner/clkng/ccu_a10.c +++ b/sys/dev/clk/allwinner/ccu_a10.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_a13.c b/sys/dev/clk/allwinner/ccu_a13.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a13.c rename to sys/dev/clk/allwinner/ccu_a13.c index c485b2bc72c4..2bddcd382040 100644 --- a/sys/arm/allwinner/clkng/ccu_a13.c +++ b/sys/dev/clk/allwinner/ccu_a13.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_a31.c b/sys/dev/clk/allwinner/ccu_a31.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a31.c rename to sys/dev/clk/allwinner/ccu_a31.c index 633838ee348a..d6db0ab03fe7 100644 --- a/sys/arm/allwinner/clkng/ccu_a31.c +++ b/sys/dev/clk/allwinner/ccu_a31.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_a64.c b/sys/dev/clk/allwinner/ccu_a64.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a64.c rename to sys/dev/clk/allwinner/ccu_a64.c index 70e2e98da9f2..73cbe147c398 100644 --- a/sys/arm/allwinner/clkng/ccu_a64.c +++ b/sys/dev/clk/allwinner/ccu_a64.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_a83t.c b/sys/dev/clk/allwinner/ccu_a83t.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a83t.c rename to sys/dev/clk/allwinner/ccu_a83t.c index 35561b04f602..1cb49d99ccbc 100644 --- a/sys/arm/allwinner/clkng/ccu_a83t.c +++ b/sys/dev/clk/allwinner/ccu_a83t.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_de2.c b/sys/dev/clk/allwinner/ccu_de2.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_de2.c rename to sys/dev/clk/allwinner/ccu_de2.c index d50aaf5d5e32..de490a88bafa 100644 --- a/sys/arm/allwinner/clkng/ccu_de2.c +++ b/sys/dev/clk/allwinner/ccu_de2.c @@ -48,7 +48,7 @@ #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_h3.c b/sys/dev/clk/allwinner/ccu_h3.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_h3.c rename to sys/dev/clk/allwinner/ccu_h3.c index 7d2a1be6a21d..fb6e26542b8a 100644 --- a/sys/arm/allwinner/clkng/ccu_h3.c +++ b/sys/dev/clk/allwinner/ccu_h3.c @@ -50,7 +50,7 @@ #include "opt_soc.h" #endif -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_h6.c b/sys/dev/clk/allwinner/ccu_h6.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_h6.c rename to sys/dev/clk/allwinner/ccu_h6.c index 9cdbe935f2cf..0a378d9c3980 100644 --- a/sys/arm/allwinner/clkng/ccu_h6.c +++ b/sys/dev/clk/allwinner/ccu_h6.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_h6_r.c b/sys/dev/clk/allwinner/ccu_h6_r.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_h6_r.c rename to sys/dev/clk/allwinner/ccu_h6_r.c index 070cbfb38f12..7d87b3082682 100644 --- a/sys/arm/allwinner/clkng/ccu_h6_r.c +++ b/sys/dev/clk/allwinner/ccu_h6_r.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_sun8i_r.c b/sys/dev/clk/allwinner/ccu_sun8i_r.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_sun8i_r.c rename to sys/dev/clk/allwinner/ccu_sun8i_r.c index 4e6289c1bfba..e970dd1de95c 100644 --- a/sys/arm/allwinner/clkng/ccu_sun8i_r.c +++ b/sys/dev/clk/allwinner/ccu_sun8i_r.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include From nobody Wed Jan 10 18:21: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 4T9GMP6b1Qz55YXW; Wed, 10 Jan 2024 18:21: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 4T9GMP556Sz4GXq; Wed, 10 Jan 2024 18:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7MHf1+MUh4yZQjI0b+RJIfW8IsfgXhM5/kEXFUica/o=; b=MqHFSsyGA2t9tnm+PAPRLExX3VP0xwM5+Ujq+TWDfnCMb2ZZR4Gdws9dS2ZJPFOlbSbw6w WLFjBh2HuQwuHGzfaNi6zhgp+aPEvBmgTaj5I40PYDs4iKHYZZE9SBtOApwm6K3dk7/Zue QJoGGYr9KbgNe1ibTZymzM3IndYl3nyJh6ESH6P2CeY3E4zz9EVfHVoSI55GOnEcPAj5vk bJtJVYakP7G52yQXyBaI01gkdJBSw6QYwYMMte5av077rgRe/BMinfmcYeHxeafvnrs2kS vMNCGW7hE3GzC05vEjdud7dO49iBEV6s9XmxGLcUzgQmc5u+Ei4QCaEbvFiL3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7MHf1+MUh4yZQjI0b+RJIfW8IsfgXhM5/kEXFUica/o=; b=FmVr1utdbufcQyNJ6spQIj6M8JSifR8r+NCrFCjHbJSMcmrIPeGaVnn3VZlUXT8ivw1Kda V5tQTzkkmErEzOn7DHJzwg/36JQSKGAkYjiWFKUUnV5soIkr3VTzyXWno38iIZKrF002UF x/2+26xYuzSaF7zdzm+FdayvzsrNhcSkSnbGEgI6kI+1ttpJgI/8gp8Vc/2Bz8hUYQ0Hlt x6w0mx2EWyx+89f15tiFBjnDvvOLkwQPtCGy7ruzD5Hnmz+RTYzvH2twAp2AYFeM3OCAqc oPHhVBuzEBUhBfrXm4RJ3j36lEgtZRbYU74k6rtmvV/MZve1WNfRLHpG+mb2ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910865; a=rsa-sha256; cv=none; b=xrSOi8rno0LmUxgG+Fs7VEe1Mc/OwckDTR713SKVcBYdosCetT8AJtT6lWhpwvWWtG7CHv DdLoXhjKxHSbWYZP+M/cQIQTEB02Bx8095OuLJeJjE+CqVMf/B9MhgcwEsk8KksPaFu3ZK N2R44/dZPaYnEyEAgEDYYj7qoXrTuaZW4X+ARkEWSFkzaTFAqqnB1p4somAOOjL4EJECEY QbeFPBu76En3AjA7R5CHRULotYX4VdvclxfqyQi6+adUJWwv6WGnh4O1rbh6K2vpe8tylR zDZIFvDaQI9Re22Sm2pyvt0ZSuKgr6XumIVvNkNrYRBLMIsBk63XKK2kw3sN9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMP3nryzmNr; Wed, 10 Jan 2024 18:21: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 40AIL5F3052933; Wed, 10 Jan 2024 18:21:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL5bC052930; Wed, 10 Jan 2024 18:21:05 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:05 GMT Message-Id: <202401101821.40AIL5bC052930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 77f222415832 - main - clk: Move rockchip driver into the common directory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77f222415832c58c2e307f74f1200941efe868d9 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=77f222415832c58c2e307f74f1200941efe868d9 commit 77f222415832c58c2e307f74f1200941efe868d9 Author: Emmanuel Vadot AuthorDate: 2023-12-25 19:27:20 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:22 +0000 clk: Move rockchip driver into the common directory No need to keep it under sys/arm64/rockchip/clk It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43189 --- sys/arm/rockchip/files.rk32xx | 16 +++++++-------- sys/conf/files.arm64 | 24 +++++++++++----------- .../rockchip/clk => dev/clk/rockchip}/rk3288_cru.c | 2 +- .../rockchip/clk => dev/clk/rockchip}/rk3328_cru.c | 2 +- .../rockchip/clk => dev/clk/rockchip}/rk3399_cru.c | 4 ++-- .../clk => dev/clk/rockchip}/rk3399_cru_dt.h | 0 .../clk => dev/clk/rockchip}/rk3399_pmucru.c | 2 +- .../rockchip/clk => dev/clk/rockchip}/rk3568_cru.c | 2 +- .../clk => dev/clk/rockchip}/rk3568_pmucru.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_armclk.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_armclk.h | 0 .../clk => dev/clk/rockchip}/rk_clk_composite.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_composite.h | 0 .../clk => dev/clk/rockchip}/rk_clk_fract.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_fract.h | 0 .../clk => dev/clk/rockchip}/rk_clk_gate.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_gate.h | 0 .../rockchip/clk => dev/clk/rockchip}/rk_clk_mux.c | 4 ++-- .../rockchip/clk => dev/clk/rockchip}/rk_clk_mux.h | 0 .../rockchip/clk => dev/clk/rockchip}/rk_clk_pll.c | 2 +- .../rockchip/clk => dev/clk/rockchip}/rk_clk_pll.h | 0 .../rockchip/clk => dev/clk/rockchip}/rk_cru.c | 10 ++++----- .../rockchip/clk => dev/clk/rockchip}/rk_cru.h | 12 +++++------ 23 files changed, 45 insertions(+), 45 deletions(-) diff --git a/sys/arm/rockchip/files.rk32xx b/sys/arm/rockchip/files.rk32xx index 5393b7784108..5f15a22cc334 100644 --- a/sys/arm/rockchip/files.rk32xx +++ b/sys/arm/rockchip/files.rk32xx @@ -12,14 +12,14 @@ dev/pwm/controller/rockchip/rk_pwm.c standard arm64/rockchip/rk_tsadc.c standard arm64/rockchip/rk_tsadc_if.m standard arm64/rockchip/rk_usbphy.c standard -arm64/rockchip/clk/rk_clk_armclk.c standard -arm64/rockchip/clk/rk_clk_composite.c standard -arm64/rockchip/clk/rk_clk_fract.c standard -arm64/rockchip/clk/rk_clk_gate.c standard -arm64/rockchip/clk/rk_clk_mux.c standard -arm64/rockchip/clk/rk_clk_pll.c standard -arm64/rockchip/clk/rk_cru.c standard -arm64/rockchip/clk/rk3288_cru.c standard +dev/clk/rockchip/rk_clk_armclk.c standard +dev/clk//rockchip/rk_clk_composite.c standard +dev/clk//rockchip/rk_clk_fract.c standard +dev/clk//rockchip/rk_clk_gate.c standard +dev/clk//rockchip/rk_clk_mux.c standard +dev/clk//rockchip/rk_clk_pll.c standard +dev/clk//rockchip/rk_cru.c standard +dev/clk//rockchip/rk3288_cru.c standard dev/dwc/if_dwc_rk.c standard dev/iicbus/pmic/act8846.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 00a16553e6d6..6c761b37f191 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -687,18 +687,18 @@ arm64/rockchip/rk_pcie.c optional fdt pci soc_rockchip_rk3399 arm64/rockchip/rk_pcie_phy.c optional fdt pci soc_rockchip_rk3399 # RockChip Clock support -arm64/rockchip/clk/rk_cru.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_armclk.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_composite.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_fract.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_gate.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_mux.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_pll.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk3328_cru.c optional fdt soc_rockchip_rk3328 -arm64/rockchip/clk/rk3399_cru.c optional fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk3399_pmucru.c optional fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk3568_cru.c optional fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk3568_pmucru.c optional fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_cru.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_armclk.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_composite.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_fract.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_gate.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_mux.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_pll.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk3328_cru.c optional fdt soc_rockchip_rk3328 +dev/clk/rockchip/rk3399_cru.c optional fdt soc_rockchip_rk3399 +dev/clk/rockchip/rk3399_pmucru.c optional fdt soc_rockchip_rk3399 +dev/clk/rockchip/rk3568_cru.c optional fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk3568_pmucru.c optional fdt soc_rockchip_rk3568 # Xilinx arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq fdt diff --git a/sys/arm64/rockchip/clk/rk3288_cru.c b/sys/dev/clk/rockchip/rk3288_cru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3288_cru.c rename to sys/dev/clk/rockchip/rk3288_cru.c index b7b106dc849a..354a293ff7f2 100644 --- a/sys/arm64/rockchip/clk/rk3288_cru.c +++ b/sys/dev/clk/rockchip/rk3288_cru.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/clk/rk3328_cru.c b/sys/dev/clk/rockchip/rk3328_cru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3328_cru.c rename to sys/dev/clk/rockchip/rk3328_cru.c index 4c8562240a12..6a9583250516 100644 --- a/sys/arm64/rockchip/clk/rk3328_cru.c +++ b/sys/dev/clk/rockchip/rk3328_cru.c @@ -42,7 +42,7 @@ #include #include -#include +#include #define CRU_CLKSEL_CON(x) (0x100 + (x) * 0x4) #define CRU_CLKGATE_CON(x) (0x200 + (x) * 0x4) diff --git a/sys/arm64/rockchip/clk/rk3399_cru.c b/sys/dev/clk/rockchip/rk3399_cru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3399_cru.c rename to sys/dev/clk/rockchip/rk3399_cru.c index d1b066b50c47..45d6592ceb73 100644 --- a/sys/arm64/rockchip/clk/rk3399_cru.c +++ b/sys/dev/clk/rockchip/rk3399_cru.c @@ -43,9 +43,9 @@ #include #include -#include +#include -#include +#include #define CRU_CLKSEL_CON(x) (0x100 + (x) * 0x4) #define CRU_CLKGATE_CON(x) (0x300 + (x) * 0x4) diff --git a/sys/arm64/rockchip/clk/rk3399_cru_dt.h b/sys/dev/clk/rockchip/rk3399_cru_dt.h similarity index 100% rename from sys/arm64/rockchip/clk/rk3399_cru_dt.h rename to sys/dev/clk/rockchip/rk3399_cru_dt.h diff --git a/sys/arm64/rockchip/clk/rk3399_pmucru.c b/sys/dev/clk/rockchip/rk3399_pmucru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3399_pmucru.c rename to sys/dev/clk/rockchip/rk3399_pmucru.c index f95afbad11ee..706bf444aaf2 100644 --- a/sys/arm64/rockchip/clk/rk3399_pmucru.c +++ b/sys/dev/clk/rockchip/rk3399_pmucru.c @@ -43,7 +43,7 @@ #include #include -#include +#include #define CRU_CLKSEL_CON(x) (0x80 + (x) * 0x4) #define CRU_CLKGATE_CON(x) (0x100 + (x) * 0x4) diff --git a/sys/arm64/rockchip/clk/rk3568_cru.c b/sys/dev/clk/rockchip/rk3568_cru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3568_cru.c rename to sys/dev/clk/rockchip/rk3568_cru.c index f5992323c3bd..4d7f569a3de2 100644 --- a/sys/arm64/rockchip/clk/rk3568_cru.c +++ b/sys/dev/clk/rockchip/rk3568_cru.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/clk/rk3568_pmucru.c b/sys/dev/clk/rockchip/rk3568_pmucru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3568_pmucru.c rename to sys/dev/clk/rockchip/rk3568_pmucru.c index 9805f743346c..0756dc5392bf 100644 --- a/sys/arm64/rockchip/clk/rk3568_pmucru.c +++ b/sys/dev/clk/rockchip/rk3568_pmucru.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/clk/rk_clk_armclk.c b/sys/dev/clk/rockchip/rk_clk_armclk.c similarity index 99% rename from sys/arm64/rockchip/clk/rk_clk_armclk.c rename to sys/dev/clk/rockchip/rk_clk_armclk.c index 1caae0505444..3d462e74d92b 100644 --- a/sys/arm64/rockchip/clk/rk_clk_armclk.c +++ b/sys/dev/clk/rockchip/rk_clk_armclk.c @@ -31,7 +31,7 @@ #include -#include +#include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_armclk.h b/sys/dev/clk/rockchip/rk_clk_armclk.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_armclk.h rename to sys/dev/clk/rockchip/rk_clk_armclk.h diff --git a/sys/arm64/rockchip/clk/rk_clk_composite.c b/sys/dev/clk/rockchip/rk_clk_composite.c similarity index 99% rename from sys/arm64/rockchip/clk/rk_clk_composite.c rename to sys/dev/clk/rockchip/rk_clk_composite.c index 791668ff2e9c..a37ddcd6ecb2 100644 --- a/sys/arm64/rockchip/clk/rk_clk_composite.c +++ b/sys/dev/clk/rockchip/rk_clk_composite.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include "clkdev_if.h" #include "syscon_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_composite.h b/sys/dev/clk/rockchip/rk_clk_composite.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_composite.h rename to sys/dev/clk/rockchip/rk_clk_composite.h diff --git a/sys/arm64/rockchip/clk/rk_clk_fract.c b/sys/dev/clk/rockchip/rk_clk_fract.c similarity index 99% rename from sys/arm64/rockchip/clk/rk_clk_fract.c rename to sys/dev/clk/rockchip/rk_clk_fract.c index f32585b43c21..f559e9c71852 100644 --- a/sys/arm64/rockchip/clk/rk_clk_fract.c +++ b/sys/dev/clk/rockchip/rk_clk_fract.c @@ -31,7 +31,7 @@ #include -#include +#include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_fract.h b/sys/dev/clk/rockchip/rk_clk_fract.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_fract.h rename to sys/dev/clk/rockchip/rk_clk_fract.h diff --git a/sys/arm64/rockchip/clk/rk_clk_gate.c b/sys/dev/clk/rockchip/rk_clk_gate.c similarity index 98% rename from sys/arm64/rockchip/clk/rk_clk_gate.c rename to sys/dev/clk/rockchip/rk_clk_gate.c index d82035d4e624..053236d043e6 100644 --- a/sys/arm64/rockchip/clk/rk_clk_gate.c +++ b/sys/dev/clk/rockchip/rk_clk_gate.c @@ -32,7 +32,7 @@ #include -#include +#include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_gate.h b/sys/dev/clk/rockchip/rk_clk_gate.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_gate.h rename to sys/dev/clk/rockchip/rk_clk_gate.h diff --git a/sys/arm64/rockchip/clk/rk_clk_mux.c b/sys/dev/clk/rockchip/rk_clk_mux.c similarity index 98% rename from sys/arm64/rockchip/clk/rk_clk_mux.c rename to sys/dev/clk/rockchip/rk_clk_mux.c index 3e9dbe542582..e42d5819378a 100644 --- a/sys/arm64/rockchip/clk/rk_clk_mux.c +++ b/sys/dev/clk/rockchip/rk_clk_mux.c @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #include "clkdev_if.h" #include "syscon_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_mux.h b/sys/dev/clk/rockchip/rk_clk_mux.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_mux.h rename to sys/dev/clk/rockchip/rk_clk_mux.h diff --git a/sys/arm64/rockchip/clk/rk_clk_pll.c b/sys/dev/clk/rockchip/rk_clk_pll.c similarity index 99% rename from sys/arm64/rockchip/clk/rk_clk_pll.c rename to sys/dev/clk/rockchip/rk_clk_pll.c index 7df0e1491c9d..f89fdeb0c341 100644 --- a/sys/arm64/rockchip/clk/rk_clk_pll.c +++ b/sys/dev/clk/rockchip/rk_clk_pll.c @@ -31,7 +31,7 @@ #include -#include +#include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_pll.h b/sys/dev/clk/rockchip/rk_clk_pll.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_pll.h rename to sys/dev/clk/rockchip/rk_clk_pll.h diff --git a/sys/arm64/rockchip/clk/rk_cru.c b/sys/dev/clk/rockchip/rk_cru.c similarity index 96% rename from sys/arm64/rockchip/clk/rk_cru.c rename to sys/dev/clk/rockchip/rk_cru.c index b1043fde4507..81760bcd74a1 100644 --- a/sys/arm64/rockchip/clk/rk_cru.c +++ b/sys/dev/clk/rockchip/rk_cru.c @@ -50,11 +50,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "clkdev_if.h" #include "hwreset_if.h" diff --git a/sys/arm64/rockchip/clk/rk_cru.h b/sys/dev/clk/rockchip/rk_cru.h similarity index 96% rename from sys/arm64/rockchip/clk/rk_cru.h rename to sys/dev/clk/rockchip/rk_cru.h index 5d45dc6ab859..3249c8c8f13c 100644 --- a/sys/arm64/rockchip/clk/rk_cru.h +++ b/sys/dev/clk/rockchip/rk_cru.h @@ -34,12 +34,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* Macro for defining various types of clocks. */ From nobody Wed Jan 10 18:21: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 4T9GMR1Bn6z55YHJ; Wed, 10 Jan 2024 18:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9GMQ5grtz4Gk7; Wed, 10 Jan 2024 18:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=19ubGhRse8DmeDItw4kdsi8ST+AVgsLRz3Gt4j1gbyM=; b=qcH+/BH/Ihpr38BwhTX96Kpi/ed/iBHPDV+55z4JvYkIoSDDLCy7IF1POKLa6cnQR0UNGf W+VeG0LkGnMm7chrhk/JQKTbztSlw4ci1ZRWn8Y4O/Bwv970N1p/zBZO+2o8LJbLV9wYsU tdxZWbczbkYcE2AoyVqc7Ltt15bjFnOtxTuTV20olj2tD5ctZqiGoWNMLCkj4yvhyGsLME SRRGsEdK05wpgbBAGCUKqBP763zCcHevkWYJb54VVmz1t94/6xQqzeR5Snp88QCkHMGQzZ el1BVOlnF8+Aiqi09CwzWB4rQ70XAN783EYkSnRtiAWlgw4xcuTn7YZnFgSBhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=19ubGhRse8DmeDItw4kdsi8ST+AVgsLRz3Gt4j1gbyM=; b=OTHe6JasVlWrNHK+dSKI9+LTPwceCXwI2TmHs21nxoNOFA6BqncOvusRw/Hhiw7pSelw5g yKj+tVeEVK6jxQ098fHIl6qIN6wZJi4kKKFBrqOR+8CFlB5PRR7PK1lxjobkUJ0HzGA4po Fdi+bLN98m/KhdpA9xdoFHk6G6cBMzul7Igkq6dMKG2ff5Ss8P18kajOtZFyi6R6K7eOv8 tUIQVz1SqgPijThsv11ze7IFszhCOuIf0WeSKa3H0mghHmwPZFb+wRMNTdctrPVWZA1kH/ 9BbJExG4EYyP4pBR0G0fHtpt1QgCEoF2S0oJUFbyDxX11TA/Q7uSq3V5q1exXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910866; a=rsa-sha256; cv=none; b=CtMRZgWlLwGvtoOnSXMZKfqcvQq82lc8vXvRothG3o87uK/6EBzIKr/Pchtp2zFnK2z0v9 voEYpfQ5crqK9S6jO1A5JjM3f70ircZpSTM9n62cVfCikI3QiScy8Y2nOjM1wgvEaaoAgs Rid/yjEBCAXNdGu/b7trGIr2t9IiRzri68coiMcVYOr+xaq78/rtc1BcZoH7fBerl2nJcj 1o7NnwCbDDlIh9tiCOEYepkoFW2uIlDfHrXBy5i7KzYW6UjhNmJbxX8bTO8bxguZs2gp2H hrzNs572m9VclM/mLWUI805x+J5s691DEK4T335E5Ut6FrpywBZi9AtYPBbwCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMQ4n7szmJR; Wed, 10 Jan 2024 18:21: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 40AIL6a4052985; Wed, 10 Jan 2024 18:21:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL638052982; Wed, 10 Jan 2024 18:21:06 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:06 GMT Message-Id: <202401101821.40AIL638052982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: fe75646a0234 - main - usb: dwc3: Move driver under a subdirectory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe75646a0234a261c0013bf1840fdac4acaf0cec Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fe75646a0234a261c0013bf1840fdac4acaf0cec commit fe75646a0234a261c0013bf1840fdac4acaf0cec Author: Emmanuel Vadot AuthorDate: 2023-12-25 20:06:41 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:24 +0000 usb: dwc3: Move driver under a subdirectory dwc3 is big enough to have its own subdirectory. While here only make it depend on kernel option dwc3 and rk_dwc3 without any SOC options. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43190 --- sys/conf/files.arm | 2 +- sys/conf/files.arm64 | 7 ++++--- sys/{arm/allwinner => dev/usb/controller/dwc3}/aw_dwc3.c | 0 sys/dev/usb/controller/{ => dwc3}/dwc3.c | 5 ++--- sys/dev/usb/controller/{ => dwc3}/dwc3.h | 0 sys/{arm64/rockchip => dev/usb/controller/dwc3}/rk_dwc3.c | 0 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 075b05e36d78..28e80016d97b 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -104,7 +104,7 @@ dev/psci/smccc_arm.S optional psci dev/syscons/scgfbrndr.c optional sc dev/uart/uart_cpu_fdt.c optional uart fdt -dev/usb/controller/dwc3.c optional fdt dwc3 +dev/usb/controller/dwc3/dwc3.c optional fdt dwc3 dev/usb/controller/generic_xhci.c optional xhci dev/usb/controller/generic_xhci_fdt.c optional xhci fdt diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 6c761b37f191..0eed3db41b16 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -402,7 +402,6 @@ dev/uart/uart_dev_mu.c optional uart uart_mu fdt dev/uart/uart_dev_pl011.c optional uart pl011 dev/usb/controller/dwc_otg_hisi.c optional dwcotg fdt soc_hisi_hi6220 -dev/usb/controller/dwc3.c optional xhci acpi dwc3 | xhci fdt dwc3 dev/usb/controller/ehci_mv.c optional ehci_mv fdt dev/usb/controller/generic_ehci.c optional ehci dev/usb/controller/generic_ehci_acpi.c optional ehci acpi @@ -415,6 +414,10 @@ dev/usb/controller/generic_xhci.c optional xhci dev/usb/controller/generic_xhci_acpi.c optional xhci acpi dev/usb/controller/generic_xhci_fdt.c optional xhci fdt +dev/usb/controller/dwc3/dwc3.c optional xhci acpi dwc3 | xhci fdt dwc3 +dev/usb/controller/dwc3/aw_dwc3.c optional xhci fdt dwc3 aw_dwc3 +dev/usb/controller/dwc3/rk_dwc3.c optional xhci fdt dwc3 rk_dwc3 + dev/vnic/mrml_bridge.c optional vnic fdt dev/vnic/nic_main.c optional vnic pci dev/vnic/nicvf_main.c optional vnic pci pci_iov @@ -437,7 +440,6 @@ arm/allwinner/a33_codec.c optional fdt sound a33_codec arm/allwinner/a64/sun50i_a64_acodec.c optional fdt sound a64_codec arm/allwinner/sunxi_dma_if.m optional a31_dmac arm/allwinner/aw_cir.c optional evdev aw_cir fdt -arm/allwinner/aw_dwc3.c optional aw_dwc3 fdt arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt arm/allwinner/aw_i2s.c optional fdt sound aw_i2s arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt @@ -664,7 +666,6 @@ arm64/rockchip/rk3399_emmcphy.c optional fdt rk_emmcphy soc_rockchip_rk3399 arm64/rockchip/rk3568_combphy.c optional fdt rk_combphy soc_rockchip_rk3568 arm64/rockchip/rk3568_pcie.c optional fdt pci soc_rockchip_rk3568 arm64/rockchip/rk3568_pciephy.c optional fdt pci soc_rockchip_rk3568 -arm64/rockchip/rk_dwc3.c optional fdt rk_dwc3 soc_rockchip_rk3399 | fdt rk_dwc3 soc_rockchip_rk3568 arm64/rockchip/rk_i2s.c optional fdt sound soc_rockchip_rk3328 | fdt sound soc_rockchip_rk3399 arm64/rockchip/rk_otp.c optional fdt soc_rockchip_rk3568 arm64/rockchip/rk_otp_if.m optional fdt soc_rockchip_rk3568 diff --git a/sys/arm/allwinner/aw_dwc3.c b/sys/dev/usb/controller/dwc3/aw_dwc3.c similarity index 100% rename from sys/arm/allwinner/aw_dwc3.c rename to sys/dev/usb/controller/dwc3/aw_dwc3.c diff --git a/sys/dev/usb/controller/dwc3.c b/sys/dev/usb/controller/dwc3/dwc3.c similarity index 99% rename from sys/dev/usb/controller/dwc3.c rename to sys/dev/usb/controller/dwc3/dwc3.c index bf3001c0389e..d97b0b11d44c 100644 --- a/sys/dev/usb/controller/dwc3.c +++ b/sys/dev/usb/controller/dwc3/dwc3.c @@ -53,8 +53,9 @@ #include #include +#include #include -#include +#include #ifdef FDT #include @@ -74,8 +75,6 @@ #include #endif -#include "generic_xhci.h" - struct snps_dwc3_softc { struct xhci_softc sc; device_t dev; diff --git a/sys/dev/usb/controller/dwc3.h b/sys/dev/usb/controller/dwc3/dwc3.h similarity index 100% rename from sys/dev/usb/controller/dwc3.h rename to sys/dev/usb/controller/dwc3/dwc3.h diff --git a/sys/arm64/rockchip/rk_dwc3.c b/sys/dev/usb/controller/dwc3/rk_dwc3.c similarity index 100% rename from sys/arm64/rockchip/rk_dwc3.c rename to sys/dev/usb/controller/dwc3/rk_dwc3.c From nobody Wed Jan 10 18:21: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 4T9GMV47K5z55YSQ; Wed, 10 Jan 2024 18:21: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 4T9GMV21cnz4GTB; Wed, 10 Jan 2024 18:21:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O/rV6hCzAAv1UT3tlTwShp/UEKr8xTr369W8BXeTK8g=; b=NP0cNS0rnLRLkb5rPSZ6eORHAXLG5SoC1Ga+MERMDeKXaXG2jE+5BPc3IkWQt2XZ2+sin5 Qo9CPJgd2L3rgtl5MprhkvddrkGCl11JK3RZg9NqoSXbSrswJr5l3Xwxlyr1bkBKE2GqN3 cw5hdqhNOkQ4Wz6QG6p4Yp2QeA9dtX0Ip1lofXft3y2OOoFggL6fAwl5BK4UT86WnVA237 TpSHptp5g0OOH2dmIidEyEwnrhrOtwepJTR0NSgxUXtET2nMgA1OsriLy+UkPNKnuoFJyI gAUHifpXOKdvWgfv79D+ZfWF1tE0gusgDZcsm7XvWek51DJ53KF9fz60gpJkqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O/rV6hCzAAv1UT3tlTwShp/UEKr8xTr369W8BXeTK8g=; b=q3C/AK3Lwg8m4GirBweB1PXN30Eax6KA8oeoB1Vhf73yJTFRnabKMqIQxNYSoSfffMwshq L3U/AUz7J/xu/RnAWJOdd+oWSAtaDUJMDuKqZnEx3q7Qflw7R9thtPYbQSBmLzUxMKX3B4 LC/qAc8CDZYzxND8WhWqDDIJBievJUIZ9hrQeHG6fwoLpoYfJ7y3HIG0vmueCqBeioQeig pyP7ZQw2TaHGtrQz9BJx2bQ39wkvdbVKwTO7Rhd9Ue1o9YkwQlMNJwsEHZJJyV82g/X6C8 tqyFWbeyoZmApPsiQMC+dzyME3SgFEm19Xuh5Q1z3mRDoW7E0SDslXmg8gnGqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910870; a=rsa-sha256; cv=none; b=BwasyNBlky9FtjR3Gjb3hpdyR/ogHAW+4Ng0a6SpDBYBcaWQoZwixmYltTmFwIKZairfza ZZVWFD9K/DOw3BrGPdhpXplYDh8EQd8neNYZ/XXFN2iS1gkM8AB0gfxqlM2fI3M8QcopNl 5xhasWtT6BICCrg4FAoJzWk19MUWh66tDgFniTJHMXPJfsBANs7hFp1Jxb6R0BDOBX1mbi SvxLjAGpD7tLxuxIt9dE3t9h8gghz2VglE+/3u0ALMlc4m49uMDUfi6wIRHh6nJ7+Np6Kq Zy+0KtG2OyjFudTy26kQ/MSnrIsZiqmNYN3rRQe9X7mRoYnqyH5CFZt9JLq5JQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMV10DkzmNt; Wed, 10 Jan 2024 18:21: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 40AILAhV053133; Wed, 10 Jan 2024 18:21:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AILAZk053130; Wed, 10 Jan 2024 18:21:10 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:10 GMT Message-Id: <202401101821.40AILAZk053130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: e51b3d8e53ce - main - nvmem: Move nvmem code in dev/nvmem List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e51b3d8e53cee7d6a36e34e1cd4d588593d71b40 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e51b3d8e53cee7d6a36e34e1cd4d588593d71b40 commit e51b3d8e53cee7d6a36e34e1cd4d588593d71b40 Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:51:22 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:31 +0000 nvmem: Move nvmem code in dev/nvmem We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: dab, imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43193 --- sys/arm/allwinner/aw_thermal.c | 2 +- sys/conf/files | 4 ++-- sys/dev/{extres => }/nvmem/nvmem.c | 0 sys/dev/{extres => }/nvmem/nvmem.h | 6 +++--- sys/dev/{extres => }/nvmem/nvmem_if.m | 0 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index d9293b5cb171..bdb7e2dacc4e 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include diff --git a/sys/conf/files b/sys/conf/files index 95228194fc5a..e07ac548d93a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1682,8 +1682,6 @@ dev/extres/phy/phydev_if.m optional phy fdt dev/extres/phy/phynode_if.m optional phy dev/extres/phy/phy_usb.c optional phy dev/extres/phy/phynode_usb_if.m optional phy -dev/extres/nvmem/nvmem.c optional nvmem fdt -dev/extres/nvmem/nvmem_if.m optional nvmem dev/extres/regulator/regdev_if.m optional regulator fdt dev/extres/regulator/regnode_if.m optional regulator dev/extres/regulator/regulator.c optional regulator @@ -2531,6 +2529,8 @@ dev/nvme/nvme_sim.c optional nvme scbus dev/nvme/nvme_sysctl.c optional nvme dev/nvme/nvme_test.c optional nvme dev/nvme/nvme_util.c optional nvme +dev/nvmem/nvmem.c optional nvmem fdt +dev/nvmem/nvmem_if.m optional nvmem dev/oce/oce_hw.c optional oce pci dev/oce/oce_if.c optional oce pci dev/oce/oce_mbox.c optional oce pci diff --git a/sys/dev/extres/nvmem/nvmem.c b/sys/dev/nvmem/nvmem.c similarity index 100% rename from sys/dev/extres/nvmem/nvmem.c rename to sys/dev/nvmem/nvmem.c diff --git a/sys/dev/extres/nvmem/nvmem.h b/sys/dev/nvmem/nvmem.h similarity index 95% rename from sys/dev/extres/nvmem/nvmem.h rename to sys/dev/nvmem/nvmem.h index f9589b1e0b2c..83e24577787c 100644 --- a/sys/dev/extres/nvmem/nvmem.h +++ b/sys/dev/nvmem/nvmem.h @@ -23,8 +23,8 @@ * SUCH DAMAGE. */ -#ifndef _DEV_EXTRES_NVMEM_H_ -#define _DEV_EXTRES_NVMEM_H_ +#ifndef _DEV_NVMEM_H_ +#define _DEV_NVMEM_H_ int nvmem_get_cell_len(phandle_t node, const char *name); int nvmem_read_cell_by_name(phandle_t node, const char *name, void *cell, size_t buflen); @@ -32,4 +32,4 @@ int nvmem_read_cell_by_idx(phandle_t node, int idx, void *cell, size_t buflen); int nvmem_write_cell_by_name(phandle_t node, const char *name, void *cell, size_t buflen); int nvmem_write_cell_by_idx(phandle_t node, int idx, void *cell, size_t buflen); -#endif /* _DEV_EXTRES_NVMEM_H_ */ +#endif /* _DEV_NVMEM_H_ */ diff --git a/sys/dev/extres/nvmem/nvmem_if.m b/sys/dev/nvmem/nvmem_if.m similarity index 100% rename from sys/dev/extres/nvmem/nvmem_if.m rename to sys/dev/nvmem/nvmem_if.m From nobody Wed Jan 10 18:21:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMS0pcTz55YHK; Wed, 10 Jan 2024 18:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9GMS00Gkz4Gmd; Wed, 10 Jan 2024 18:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VStBh2gj/3EvLycuh4oz1IXQcn2YUSCOPBZ05fp0MDI=; b=M+fUZl8d0nfriK2SjzqQsWtklgiYrVsJXgdW7zNzOJyTZ7IOMrKuELKCGTE6ZFohWCdpQ3 Ru/Nhe/9TrwZRXKdpjlg36GW3u6AmQNyOy3OJeJbI9tbYkewyNNhIU6iDCfQHQHwvb7Bxk gOO4SxTgG1lL34qgsmFsTPpa7h+Ythp1zg5ffPl1lIGvAF4XLCaO88IHGWV8QpeA28c0Ey NLqVeEt7+PUXLK0kmRs4xZxXLRcTxT7RS2YEsJOQyPWLeI42VRofuHx8Kyo5SNVqaZPqpS UFvvLaewILBSA6HGj4GTntHgGQUeNUfnhf4wEnNYGc5jBUiPoqoXV2RLI9m9Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VStBh2gj/3EvLycuh4oz1IXQcn2YUSCOPBZ05fp0MDI=; b=f/ApWMAe3i75jf3J+RKLKm6H4enVqixc27H3qS+4FOjDsv5AbOMBg7hx3n7iP3cD8YnOxf AqLxQpe/dnT/03C+wg38Kl/yjLQ8X1+gkzZ4GUDgeCFDst+P9GiGokTB+bCOhz5ePswFIs Co1GiiGUf8NAogYvdy6REOhsWo9Cgyg1Hs/v5LxPPopMXL3Fqtu8EpnWcZ0bH9eND8hDZB kZNjIfEgqXERWgO6vMrdNVxYuSy/Fuc2Dhx3UANzy16x+kvSVyNYTezLZmWwGi3H/XDapU /ch3HenZH4J2VPWnHrsP5/cmAgjFIMeYQY6Tqangd445vbRwW8FsLNNoAAolMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910868; a=rsa-sha256; cv=none; b=W9yAOry6/mHeGKB3ushMR7CxN5DCl6bptWXEfFrrHvwsiLihJiHMQ5lJEW7dgIHFVxZ17V kMW0yg/sy1M1DTGCGqNaDljEeDBoXauJWSXzmsulZvNs1pbS0hQyUD8BIjvTDPauA80lFb cusCWy20ldfgK78i9kwf+O/JCufVG+QEe0qgQ7TRAgalBMrh71A88cwzf479+d5wTViHoC OjJxxJnK7B5cPsUtdVRfN6vD/J13wQqGyndxf5VT8Rxru2ef4RpUDz8g3Qt8WpTKrjtUhu X1CvCYXgvL8isJVsA0U998IPG2mxyiCXGtrsZIE5sm+TFR/1JyshQZ5pd8VNXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMR6CWkzmLY; Wed, 10 Jan 2024 18:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40AIL70i053030; Wed, 10 Jan 2024 18:21:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL7iN053027; Wed, 10 Jan 2024 18:21:07 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:07 GMT Message-Id: <202401101821.40AIL7iN053027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: be82b3a0bf72 - main - clk: Move clock code in dev/clk List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be82b3a0bf72ed3b5f01ac9fcd8dcd3802e3c742 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=be82b3a0bf72ed3b5f01ac9fcd8dcd3802e3c742 commit be82b3a0bf72ed3b5f01ac9fcd8dcd3802e3c742 Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:43:48 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:26 +0000 clk: Move clock code in dev/clk We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43191 --- sys/arm/allwinner/a10_ahci.c | 2 +- sys/arm/allwinner/a10_codec.c | 2 +- sys/arm/allwinner/a10_dmac.c | 2 +- sys/arm/allwinner/a10_timer.c | 2 +- sys/arm/allwinner/a31_dmac.c | 2 +- sys/arm/allwinner/a33_codec.c | 2 +- sys/arm/allwinner/a64/sun50i_a64_acodec.c | 2 +- sys/arm/allwinner/aw_cir.c | 2 +- sys/arm/allwinner/aw_gmacclk.c | 4 ++-- sys/arm/allwinner/aw_gpio.c | 2 +- sys/arm/allwinner/aw_i2s.c | 2 +- sys/arm/allwinner/aw_mmc.c | 2 +- sys/arm/allwinner/aw_rsb.c | 2 +- sys/arm/allwinner/aw_rtc.c | 2 +- sys/arm/allwinner/aw_thermal.c | 2 +- sys/arm/allwinner/aw_usb3phy.c | 2 +- sys/arm/allwinner/aw_usbphy.c | 2 +- sys/arm/allwinner/if_awg.c | 2 +- sys/arm/allwinner/if_emac.c | 2 +- sys/arm/freescale/imx/imx_gpio.c | 2 +- sys/arm/freescale/imx/imx_i2c.c | 2 +- sys/arm/freescale/vybrid/vf_i2c.c | 2 +- sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c | 4 ++-- sys/arm/mv/clk/a37x0_periph_clk_driver.c | 4 ++-- sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c | 4 ++-- sys/arm/mv/clk/a37x0_tbg.c | 2 +- sys/arm/mv/clk/a37x0_tbg_pll.c | 2 +- sys/arm/mv/clk/a37x0_tbg_pll.h | 2 +- sys/arm/mv/clk/a37x0_xtal.c | 4 ++-- sys/arm/mv/clk/armada38x_coreclk.c | 2 +- sys/arm/mv/clk/armada38x_gateclk.c | 4 ++-- sys/arm/mv/clk/armada38x_gen.c | 2 +- sys/arm/mv/clk/armada38x_gen.h | 2 +- sys/arm/mv/clk/periph.c | 10 +++++----- sys/arm/mv/clk/periph.h | 8 ++++---- sys/arm/mv/clk/periph_clk_d.c | 10 +++++----- sys/arm/mv/clk/periph_clk_fixed.c | 10 +++++----- sys/arm/mv/clk/periph_clk_gate.c | 10 +++++----- sys/arm/mv/clk/periph_clk_mux_gate.c | 10 +++++----- sys/arm/mv/mv_ap806_clock.c | 2 +- sys/arm/mv/mv_cp110_clock.c | 4 ++-- sys/arm/nvidia/drm2/tegra_bo.c | 2 +- sys/arm/nvidia/drm2/tegra_dc.c | 2 +- sys/arm/nvidia/drm2/tegra_drm_subr.c | 2 +- sys/arm/nvidia/drm2/tegra_fb.c | 2 +- sys/arm/nvidia/drm2/tegra_hdmi.c | 2 +- sys/arm/nvidia/drm2/tegra_host1x.c | 2 +- sys/arm/nvidia/tegra124/tegra124_car.c | 8 ++++---- sys/arm/nvidia/tegra124/tegra124_clk_per.c | 2 +- sys/arm/nvidia/tegra124/tegra124_clk_pll.c | 2 +- sys/arm/nvidia/tegra124/tegra124_clk_super.c | 2 +- sys/arm/nvidia/tegra124/tegra124_coretemp.c | 2 +- sys/arm/nvidia/tegra124/tegra124_cpufreq.c | 2 +- sys/arm/nvidia/tegra124/tegra124_pmc.c | 2 +- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/nvidia/tegra_efuse.c | 2 +- sys/arm/nvidia/tegra_ehci.c | 2 +- sys/arm/nvidia/tegra_i2c.c | 2 +- sys/arm/nvidia/tegra_mc.c | 2 +- sys/arm/nvidia/tegra_pcie.c | 2 +- sys/arm/nvidia/tegra_rtc.c | 2 +- sys/arm/nvidia/tegra_sdhci.c | 2 +- sys/arm/nvidia/tegra_soctherm.c | 2 +- sys/arm/nvidia/tegra_uart.c | 2 +- sys/arm/nvidia/tegra_usbphy.c | 2 +- sys/arm/nvidia/tegra_xhci.c | 2 +- sys/arm/ti/am335x/am335x_dmtimer.c | 2 +- sys/arm/ti/am335x/am335x_dmtpps.c | 2 +- sys/arm/ti/am335x/am335x_lcd.c | 2 +- sys/arm/ti/am335x/am335x_musb.c | 2 +- sys/arm/ti/clk/clock_common.c | 2 +- sys/arm/ti/clk/ti_clk_clkctrl.c | 2 +- sys/arm/ti/clk/ti_clk_clkctrl.h | 2 +- sys/arm/ti/clk/ti_clk_dpll.c | 2 +- sys/arm/ti/clk/ti_clk_dpll.h | 2 +- sys/arm/ti/clk/ti_divider_clock.c | 2 +- sys/arm/ti/clk/ti_dpll_clock.c | 2 +- sys/arm/ti/clk/ti_gate_clock.c | 2 +- sys/arm/ti/clk/ti_mux_clock.c | 2 +- sys/arm/ti/ti_pruss.c | 2 +- sys/arm/ti/ti_sdhci.c | 2 +- sys/arm/ti/ti_sysc.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_composite.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_composite.h | 2 +- sys/arm64/freescale/imx/clk/imx_clk_frac_pll.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_frac_pll.h | 2 +- sys/arm64/freescale/imx/clk/imx_clk_gate.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_gate.h | 2 +- sys/arm64/freescale/imx/clk/imx_clk_mux.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_mux.h | 2 +- sys/arm64/freescale/imx/clk/imx_clk_sscg_pll.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_sscg_pll.h | 2 +- sys/arm64/freescale/imx/imx_ccm_clk.h | 10 +++++----- sys/arm64/nvidia/tegra210/tegra210_car.c | 8 ++++---- sys/arm64/nvidia/tegra210/tegra210_clk_per.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_clk_pll.c | 8 ++++---- sys/arm64/nvidia/tegra210/tegra210_clk_super.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_coretemp.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_cpufreq.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_pmc.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/qoriq/clk/ls1028a_clkgen.c | 2 +- sys/arm64/qoriq/clk/ls1028a_flexspi_clk.c | 2 +- sys/arm64/qoriq/clk/ls1046a_clkgen.c | 2 +- sys/arm64/qoriq/clk/ls1088a_clkgen.c | 2 +- sys/arm64/qoriq/clk/lx2160a_clkgen.c | 2 +- sys/arm64/qoriq/clk/qoriq_clk_pll.c | 4 ++-- sys/arm64/qoriq/clk/qoriq_clk_pll.h | 2 +- sys/arm64/qoriq/clk/qoriq_clkgen.c | 2 +- sys/arm64/qoriq/clk/qoriq_clkgen.h | 4 ++-- sys/arm64/qoriq/qoriq_therm.c | 2 +- sys/arm64/rockchip/rk3328_codec.c | 2 +- sys/arm64/rockchip/rk3399_emmcphy.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pcie.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_gpio.c | 2 +- sys/arm64/rockchip/rk_i2s.c | 2 +- sys/arm64/rockchip/rk_pcie.c | 2 +- sys/arm64/rockchip/rk_pcie_phy.c | 2 +- sys/arm64/rockchip/rk_tsadc.c | 2 +- sys/arm64/rockchip/rk_typec_phy.c | 2 +- sys/arm64/rockchip/rk_usb2phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 2 +- sys/conf/files | 18 +++++++++--------- sys/dev/ahci/ahci_fsl_fdt.c | 2 +- sys/dev/cadence/if_cgem.c | 2 +- sys/dev/clk/allwinner/aw_ccu.c | 2 +- sys/dev/clk/allwinner/aw_ccung.c | 4 ++-- sys/dev/clk/allwinner/aw_ccung.h | 6 +++--- sys/dev/clk/allwinner/aw_clk_frac.c | 2 +- sys/dev/clk/allwinner/aw_clk_frac.h | 2 +- sys/dev/clk/allwinner/aw_clk_m.c | 2 +- sys/dev/clk/allwinner/aw_clk_m.h | 2 +- sys/dev/clk/allwinner/aw_clk_mipi.c | 2 +- sys/dev/clk/allwinner/aw_clk_mipi.h | 2 +- sys/dev/clk/allwinner/aw_clk_nkmp.c | 2 +- sys/dev/clk/allwinner/aw_clk_nm.c | 2 +- sys/dev/clk/allwinner/aw_clk_nm.h | 2 +- sys/dev/clk/allwinner/aw_clk_nmm.c | 2 +- sys/dev/clk/allwinner/aw_clk_nmm.h | 2 +- sys/dev/clk/allwinner/aw_clk_np.c | 2 +- sys/dev/clk/allwinner/aw_clk_np.h | 2 +- sys/dev/clk/allwinner/aw_clk_prediv_mux.c | 2 +- sys/dev/clk/allwinner/ccu_a10.c | 6 +++--- sys/dev/clk/allwinner/ccu_a13.c | 6 +++--- sys/dev/clk/allwinner/ccu_a31.c | 6 +++--- sys/dev/clk/allwinner/ccu_a64.c | 6 +++--- sys/dev/clk/allwinner/ccu_a83t.c | 6 +++--- sys/dev/clk/allwinner/ccu_de2.c | 6 +++--- sys/dev/clk/allwinner/ccu_h3.c | 6 +++--- sys/dev/clk/allwinner/ccu_h6.c | 6 +++--- sys/dev/clk/allwinner/ccu_h6_r.c | 6 +++--- sys/dev/clk/allwinner/ccu_sun8i_r.c | 6 +++--- sys/dev/{extres => }/clk/clk.c | 2 +- sys/dev/{extres => }/clk/clk.h | 7 ++++--- sys/dev/{extres => }/clk/clk_bus.c | 0 sys/dev/{extres => }/clk/clk_div.c | 2 +- sys/dev/{extres => }/clk/clk_div.h | 8 ++++---- sys/dev/{extres => }/clk/clk_fixed.c | 2 +- sys/dev/{extres => }/clk/clk_fixed.h | 8 ++++---- sys/dev/{extres => }/clk/clk_gate.c | 2 +- sys/dev/{extres => }/clk/clk_gate.h | 8 ++++---- sys/dev/{extres => }/clk/clk_link.c | 2 +- sys/dev/{extres => }/clk/clk_link.h | 8 ++++---- sys/dev/{extres => }/clk/clk_mux.c | 2 +- sys/dev/{extres => }/clk/clk_mux.h | 9 +++++---- sys/dev/{extres => }/clk/clkdev_if.m | 0 sys/dev/{extres => }/clk/clknode_if.m | 0 sys/dev/clk/rockchip/rk3288_cru.c | 8 ++++---- sys/dev/clk/rockchip/rk3328_cru.c | 6 +++--- sys/dev/clk/rockchip/rk3399_cru.c | 6 +++--- sys/dev/clk/rockchip/rk3399_pmucru.c | 6 +++--- sys/dev/clk/rockchip/rk3568_cru.c | 6 +++--- sys/dev/clk/rockchip/rk3568_pmucru.c | 6 +++--- sys/dev/clk/rockchip/rk_clk_armclk.c | 2 +- sys/dev/clk/rockchip/rk_clk_armclk.h | 2 +- sys/dev/clk/rockchip/rk_clk_composite.c | 2 +- sys/dev/clk/rockchip/rk_clk_composite.h | 2 +- sys/dev/clk/rockchip/rk_clk_fract.c | 2 +- sys/dev/clk/rockchip/rk_clk_fract.h | 2 +- sys/dev/clk/rockchip/rk_clk_gate.c | 2 +- sys/dev/clk/rockchip/rk_clk_gate.h | 2 +- sys/dev/clk/rockchip/rk_clk_mux.c | 2 +- sys/dev/clk/rockchip/rk_clk_mux.h | 2 +- sys/dev/clk/rockchip/rk_clk_pll.c | 2 +- sys/dev/clk/rockchip/rk_clk_pll.h | 2 +- sys/dev/clk/rockchip/rk_cru.c | 8 ++++---- sys/dev/clk/rockchip/rk_cru.h | 10 +++++----- sys/dev/clk/xilinx/zynqmp_clk_div.c | 2 +- sys/dev/clk/xilinx/zynqmp_clk_fixed.c | 2 +- sys/dev/clk/xilinx/zynqmp_clk_gate.c | 2 +- sys/dev/clk/xilinx/zynqmp_clk_mux.c | 2 +- sys/dev/clk/xilinx/zynqmp_clk_pll.c | 2 +- sys/dev/clk/xilinx/zynqmp_clock.c | 4 ++-- sys/dev/cpufreq/cpufreq_dt.c | 2 +- sys/dev/dwc/dwc1000_core.c | 2 +- sys/dev/dwc/dwc1000_dma.c | 2 +- sys/dev/dwc/if_dwc.c | 2 +- sys/dev/dwc/if_dwc_aw.c | 2 +- sys/dev/dwc/if_dwc_rk.c | 2 +- sys/dev/dwc/if_dwc_socfpga.c | 2 +- sys/dev/dwwdt/dwwdt.c | 2 +- sys/dev/eqos/if_eqos.c | 2 +- sys/dev/eqos/if_eqos_fdt.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_main.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_phy.c | 2 +- sys/dev/firmware/arm/scmi.c | 2 +- sys/dev/firmware/arm/scmi_clk.c | 2 +- sys/dev/flash/flexspi/flex_spi.c | 2 +- sys/dev/hdmi/dwc_hdmi_fdt.c | 2 +- sys/dev/iicbus/controller/cadence/cdnc_i2c.c | 2 +- sys/dev/iicbus/controller/opencores/iicoc_fdt.c | 2 +- sys/dev/iicbus/controller/rockchip/rk_i2c.c | 2 +- sys/dev/iicbus/controller/twsi/a10_twsi.c | 2 +- sys/dev/iicbus/controller/twsi/mv_twsi.c | 2 +- sys/dev/iicbus/controller/twsi/twsi.h | 2 +- sys/dev/iicbus/pmic/rockchip/rk8xx_clocks.c | 2 +- sys/dev/mmc/host/dwmmc.c | 2 +- sys/dev/mmc/host/dwmmc_rockchip.c | 2 +- sys/dev/mmc/host/dwmmc_var.h | 2 +- sys/dev/mmc/mmc_pwrseq.c | 2 +- sys/dev/neta/if_mvneta.c | 2 +- sys/dev/ofw/ofw_cpu.c | 2 +- sys/dev/pci/pci_dw_mv.c | 2 +- sys/dev/pwm/controller/allwinner/aw_pwm.c | 2 +- sys/dev/pwm/controller/rockchip/rk_pwm.c | 2 +- sys/dev/qcom_clk/qcom_clk_apssdiv.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_branch2.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_fdiv.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_fepll.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_rcg2.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_ro_div.c | 8 ++++---- sys/dev/qcom_dwc3/qcom_dwc3.c | 2 +- sys/dev/qcom_gcc/qcom_gcc_ipq4018_clock.c | 8 ++++---- sys/dev/qcom_qup/qcom_spi.c | 2 +- sys/dev/qcom_qup/qcom_spi_hw.c | 2 +- sys/dev/sdhci/sdhci_fdt.c | 4 ++-- sys/dev/sdhci/sdhci_fsl_fdt.c | 2 +- sys/dev/spibus/controller/allwinner/aw_spi.c | 2 +- sys/dev/spibus/controller/rockchip/rk_spi.c | 2 +- sys/dev/uart/uart_dev_imx.c | 2 +- sys/dev/uart/uart_dev_snps.c | 2 +- sys/dev/usb/controller/dwc3/aw_dwc3.c | 2 +- sys/dev/usb/controller/dwc3/dwc3.c | 2 +- sys/dev/usb/controller/dwc3/rk_dwc3.c | 2 +- sys/dev/usb/controller/generic_ehci_fdt.c | 2 +- sys/dev/usb/controller/generic_ohci.c | 2 +- sys/dev/usb/controller/musb_otg_allwinner.c | 2 +- sys/dev/usb/controller/usb_nop_xceiv.c | 2 +- sys/dev/usb/controller/xlnx_dwc3.c | 2 +- sys/riscv/sifive/fu740_pci_dw.c | 2 +- sys/riscv/sifive/sifive_prci.c | 6 +++--- sys/riscv/sifive/sifive_spi.c | 2 +- sys/riscv/sifive/sifive_uart.c | 2 +- 263 files changed, 400 insertions(+), 398 deletions(-) diff --git a/sys/arm/allwinner/a10_ahci.c b/sys/arm/allwinner/a10_ahci.c index 74765e1a30dd..a0717a0e9dfa 100644 --- a/sys/arm/allwinner/a10_ahci.c +++ b/sys/arm/allwinner/a10_ahci.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include /* diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c index 711d2203f9a5..fc4937351f3b 100644 --- a/sys/arm/allwinner/a10_codec.c +++ b/sys/arm/allwinner/a10_codec.c @@ -47,7 +47,7 @@ #include -#include +#include #include #include "sunxi_dma_if.h" diff --git a/sys/arm/allwinner/a10_dmac.c b/sys/arm/allwinner/a10_dmac.c index d5d27748a9d9..e711c5268b2d 100644 --- a/sys/arm/allwinner/a10_dmac.c +++ b/sys/arm/allwinner/a10_dmac.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include "sunxi_dma_if.h" diff --git a/sys/arm/allwinner/a10_timer.c b/sys/arm/allwinner/a10_timer.c index 890cb2332396..18fb2a56da3a 100644 --- a/sys/arm/allwinner/a10_timer.c +++ b/sys/arm/allwinner/a10_timer.c @@ -42,7 +42,7 @@ #include #include -#include +#include #if defined(__aarch64__) #include "opt_soc.h" diff --git a/sys/arm/allwinner/a31_dmac.c b/sys/arm/allwinner/a31_dmac.c index 0a291becbb9d..988444c4b1c5 100644 --- a/sys/arm/allwinner/a31_dmac.c +++ b/sys/arm/allwinner/a31_dmac.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include "sunxi_dma_if.h" diff --git a/sys/arm/allwinner/a33_codec.c b/sys/arm/allwinner/a33_codec.c index a0d455676430..d71562b08c9b 100644 --- a/sys/arm/allwinner/a33_codec.c +++ b/sys/arm/allwinner/a33_codec.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/a64/sun50i_a64_acodec.c b/sys/arm/allwinner/a64/sun50i_a64_acodec.c index b5ab13efac41..f99d5385d897 100644 --- a/sys/arm/allwinner/a64/sun50i_a64_acodec.c +++ b/sys/arm/allwinner/a64/sun50i_a64_acodec.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_cir.c b/sys/arm/allwinner/aw_cir.c index bc326e6d6afa..7e9fdfca80bf 100644 --- a/sys/arm/allwinner/aw_cir.c +++ b/sys/arm/allwinner/aw_cir.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_gmacclk.c b/sys/arm/allwinner/aw_gmacclk.c index 46672c8fcb0f..99e69674bd25 100644 --- a/sys/arm/allwinner/aw_gmacclk.c +++ b/sys/arm/allwinner/aw_gmacclk.c @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c index 5dd9a211acf4..b77972ac0187 100644 --- a/sys/arm/allwinner/aw_gpio.c +++ b/sys/arm/allwinner/aw_gpio.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_i2s.c b/sys/arm/allwinner/aw_i2s.c index 8c159de7da6d..376405056f51 100644 --- a/sys/arm/allwinner/aw_i2s.c +++ b/sys/arm/allwinner/aw_i2s.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index 466ada8942c6..7c783f69880c 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_rsb.c b/sys/arm/allwinner/aw_rsb.c index 40627ebf8448..08522caff725 100644 --- a/sys/arm/allwinner/aw_rsb.c +++ b/sys/arm/allwinner/aw_rsb.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include "iicbus_if.h" diff --git a/sys/arm/allwinner/aw_rtc.c b/sys/arm/allwinner/aw_rtc.c index 92bb73efc1f5..9938601f17ce 100644 --- a/sys/arm/allwinner/aw_rtc.c +++ b/sys/arm/allwinner/aw_rtc.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index 99e302571220..4f1e02612347 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_usb3phy.c b/sys/arm/allwinner/aw_usb3phy.c index e2bf9c068538..058fce6061a7 100644 --- a/sys/arm/allwinner/aw_usb3phy.c +++ b/sys/arm/allwinner/aw_usb3phy.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index 4125a13b36c2..33c11e62ef7c 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index acc99083ad93..516cbefc6272 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -59,7 +59,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index c704e7830cbc..f581d361d3d9 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -75,7 +75,7 @@ #include #include -#include +#include #include "miibus_if.h" diff --git a/sys/arm/freescale/imx/imx_gpio.c b/sys/arm/freescale/imx/imx_gpio.c index d3d01d3cb857..c5e92992a36b 100644 --- a/sys/arm/freescale/imx/imx_gpio.c +++ b/sys/arm/freescale/imx/imx_gpio.c @@ -59,7 +59,7 @@ #endif #ifdef IMX_ENABLE_CLOCKS -#include +#include #endif #include "gpio_if.h" diff --git a/sys/arm/freescale/imx/imx_i2c.c b/sys/arm/freescale/imx/imx_i2c.c index 7014ea4ea7e3..f8769d29e7f7 100644 --- a/sys/arm/freescale/imx/imx_i2c.c +++ b/sys/arm/freescale/imx/imx_i2c.c @@ -75,7 +75,7 @@ #endif #ifdef IMX_ENABLE_CLOCKS -#include +#include #endif #define I2C_ADDR_REG 0x00 /* I2C slave address register */ diff --git a/sys/arm/freescale/vybrid/vf_i2c.c b/sys/arm/freescale/vybrid/vf_i2c.c index 38717c186814..cc0b32bb4759 100644 --- a/sys/arm/freescale/vybrid/vf_i2c.c +++ b/sys/arm/freescale/vybrid/vf_i2c.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c b/sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c index 423a42b80e06..b102f05d25c1 100644 --- a/sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c +++ b/sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_periph_clk_driver.c b/sys/arm/mv/clk/a37x0_periph_clk_driver.c index e8d90a0c9904..4456537ea785 100644 --- a/sys/arm/mv/clk/a37x0_periph_clk_driver.c +++ b/sys/arm/mv/clk/a37x0_periph_clk_driver.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c b/sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c index 0429c8ae12f8..910525411c7f 100644 --- a/sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c +++ b/sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_tbg.c b/sys/arm/mv/clk/a37x0_tbg.c index d8f0f5203455..32ec1c83b102 100644 --- a/sys/arm/mv/clk/a37x0_tbg.c +++ b/sys/arm/mv/clk/a37x0_tbg.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include "clkdev_if.h" diff --git a/sys/arm/mv/clk/a37x0_tbg_pll.c b/sys/arm/mv/clk/a37x0_tbg_pll.c index 83115dc5741d..da8ff83cc898 100644 --- a/sys/arm/mv/clk/a37x0_tbg_pll.c +++ b/sys/arm/mv/clk/a37x0_tbg_pll.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_tbg_pll.h b/sys/arm/mv/clk/a37x0_tbg_pll.h index 2bb4fa6ab478..6c79c44c64db 100644 --- a/sys/arm/mv/clk/a37x0_tbg_pll.h +++ b/sys/arm/mv/clk/a37x0_tbg_pll.h @@ -29,7 +29,7 @@ #ifndef _TBG_CLK_PLL_H_ #define _TBG_CLK_PLL_H_ -#include +#include struct a37x0_tbg_pll_reg_def { uint32_t offset; diff --git a/sys/arm/mv/clk/a37x0_xtal.c b/sys/arm/mv/clk/a37x0_xtal.c index e4ce8a90a24e..67a791b8d34a 100644 --- a/sys/arm/mv/clk/a37x0_xtal.c +++ b/sys/arm/mv/clk/a37x0_xtal.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/armada38x_coreclk.c b/sys/arm/mv/clk/armada38x_coreclk.c index 21e630d18b06..f0f7767397b5 100644 --- a/sys/arm/mv/clk/armada38x_coreclk.c +++ b/sys/arm/mv/clk/armada38x_coreclk.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm/mv/clk/armada38x_gateclk.c b/sys/arm/mv/clk/armada38x_gateclk.c index c50a65b3396e..24355d9c9dac 100644 --- a/sys/arm/mv/clk/armada38x_gateclk.c +++ b/sys/arm/mv/clk/armada38x_gateclk.c @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/mv/clk/armada38x_gen.c b/sys/arm/mv/clk/armada38x_gen.c index 13951a33da55..b225c927f0d2 100644 --- a/sys/arm/mv/clk/armada38x_gen.c +++ b/sys/arm/mv/clk/armada38x_gen.c @@ -30,7 +30,7 @@ #include -#include +#include #include diff --git a/sys/arm/mv/clk/armada38x_gen.h b/sys/arm/mv/clk/armada38x_gen.h index ad46e38728fa..7275bd528529 100644 --- a/sys/arm/mv/clk/armada38x_gen.h +++ b/sys/arm/mv/clk/armada38x_gen.h @@ -27,7 +27,7 @@ #ifndef _ARMADA38X_GEN_H_ #define _ARMADA38X_GEN_H_ -#include +#include struct armada38x_gen_clknode_def { diff --git a/sys/arm/mv/clk/periph.c b/sys/arm/mv/clk/periph.c index 98445fa8bc6a..986016f77b8f 100644 --- a/sys/arm/mv/clk/periph.c +++ b/sys/arm/mv/clk/periph.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/periph.h b/sys/arm/mv/clk/periph.h index 3eada61665a2..f23f641b8f1d 100644 --- a/sys/arm/mv/clk/periph.h +++ b/sys/arm/mv/clk/periph.h @@ -29,10 +29,10 @@ #ifndef _PERIPH_H_ #define _PERIPH_H_ -#include -#include -#include -#include +#include +#include +#include +#include #define TBG_SEL 0x0 #define DIV_SEL0 0x4 diff --git a/sys/arm/mv/clk/periph_clk_d.c b/sys/arm/mv/clk/periph_clk_d.c index 0e8659d56e18..f3dc3a30a8b6 100644 --- a/sys/arm/mv/clk/periph_clk_d.c +++ b/sys/arm/mv/clk/periph_clk_d.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/periph_clk_fixed.c b/sys/arm/mv/clk/periph_clk_fixed.c index d3c1f0deafa8..e0e6f446716c 100644 --- a/sys/arm/mv/clk/periph_clk_fixed.c +++ b/sys/arm/mv/clk/periph_clk_fixed.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/periph_clk_gate.c b/sys/arm/mv/clk/periph_clk_gate.c index 803b5f8ed7e1..538077eb444f 100644 --- a/sys/arm/mv/clk/periph_clk_gate.c +++ b/sys/arm/mv/clk/periph_clk_gate.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/periph_clk_mux_gate.c b/sys/arm/mv/clk/periph_clk_mux_gate.c index 6016a7b1c1a4..f96d034228b4 100644 --- a/sys/arm/mv/clk/periph_clk_mux_gate.c +++ b/sys/arm/mv/clk/periph_clk_mux_gate.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/mv_ap806_clock.c b/sys/arm/mv/mv_ap806_clock.c index b926a58aca0c..f41f5e09c4dd 100644 --- a/sys/arm/mv/mv_ap806_clock.c +++ b/sys/arm/mv/mv_ap806_clock.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mv_cp110_clock.c b/sys/arm/mv/mv_cp110_clock.c index 604195da1ab4..45f8476df5b3 100644 --- a/sys/arm/mv/mv_cp110_clock.c +++ b/sys/arm/mv/mv_cp110_clock.c @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_bo.c b/sys/arm/nvidia/drm2/tegra_bo.c index 1ffd65de9d36..c27b9f39c508 100644 --- a/sys/arm/nvidia/drm2/tegra_bo.c +++ b/sys/arm/nvidia/drm2/tegra_bo.c @@ -32,7 +32,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_dc.c b/sys/arm/nvidia/drm2/tegra_dc.c index 81177180056c..637ea3981acc 100644 --- a/sys/arm/nvidia/drm2/tegra_dc.c +++ b/sys/arm/nvidia/drm2/tegra_dc.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_drm_subr.c b/sys/arm/nvidia/drm2/tegra_drm_subr.c index 920419cc777e..060445966d68 100644 --- a/sys/arm/nvidia/drm2/tegra_drm_subr.c +++ b/sys/arm/nvidia/drm2/tegra_drm_subr.c @@ -32,7 +32,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_fb.c b/sys/arm/nvidia/drm2/tegra_fb.c index 23994060700b..d6a74a32fffb 100644 --- a/sys/arm/nvidia/drm2/tegra_fb.c +++ b/sys/arm/nvidia/drm2/tegra_fb.c @@ -32,7 +32,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_hdmi.c b/sys/arm/nvidia/drm2/tegra_hdmi.c index c45ca1721ff0..1c5e86bde498 100644 --- a/sys/arm/nvidia/drm2/tegra_hdmi.c +++ b/sys/arm/nvidia/drm2/tegra_hdmi.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_host1x.c b/sys/arm/nvidia/drm2/tegra_host1x.c index 080fbef659a1..284c5c2e8465 100644 --- a/sys/arm/nvidia/drm2/tegra_host1x.c +++ b/sys/arm/nvidia/drm2/tegra_host1x.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_car.c b/sys/arm/nvidia/tegra124/tegra124_car.c index ebb30b29aaa9..440f5a5b1044 100644 --- a/sys/arm/nvidia/tegra124/tegra124_car.c +++ b/sys/arm/nvidia/tegra124/tegra124_car.c @@ -38,10 +38,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_per.c b/sys/arm/nvidia/tegra124/tegra124_clk_per.c index 95af7a75b21b..90edc6d3a8ec 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_per.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_per.c @@ -33,7 +33,7 @@ #include -#include +#include *** 3041 LINES SKIPPED *** From nobody Wed Jan 10 18:21:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMT4M8Fz55YS7; Wed, 10 Jan 2024 18:21:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9GMT0s0Zz4Gf7; Wed, 10 Jan 2024 18:21:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jn9GUEELuGexs3ncINsYzJk7GcL0RG8hZ5a7yj3L8K8=; b=o6tyXSJLhQb94uG49jNyv7JgU0Q/Mz2IfWgiOcoPCZGMBmMt3YALtVk6t0BEdt8uvYBk0R hcnv3NQoPNs3GYwHtpxb3O5nEEkn77ODTYwZ12haxbphQbuDb6NGr9W4dA30cMJrC4s/4L zfVZ8alS5rT3fo8C5cYHvgzs/GJ1vQukILhzPkyIvTZF/ETwQokLB+BsRIIXgPvSiPL8rJ EWeVjWudCQLhCCff25PNfl+lENLpfz1r5x2H4D/ZkYcIjPaQsB4B3AUtsQ6wcUFluF/w12 Dsju0JYhvTfyevz5u7w9flHxqF2iS133L+k/hoQbWE708rFjPs24YsLW+f1QIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jn9GUEELuGexs3ncINsYzJk7GcL0RG8hZ5a7yj3L8K8=; b=TrBbUhEjyZ+gxRfdRUQBvJH/Vz+BO5/mUAHGskCrhGFP89IcyvmioFDLccFzC6i/BOYS7C LCXYA/zLshDOWcmZcjXdavmPw3J/HX+/j0Gk2ZTP0Xr0No59esMocSqIS0x+lVvKyWdNZe x6NQ9z+eFlDQHzccdT8u+hPPXx3tW7oA9K8wIVc5u8eubIOofOfkT3b3kXf0BX2bJxdfGC dzKa25lujT9xoV8Na0242uy1j1tDm4FUoobHelZsnlhah/vunLepf69C0qhjRCM4umodjR /+vo5Ug/SQT7Ivpzr2lKlhHocTt7PSPYbJ3jeA8Mo/DZV89gVo/y81jOAG2s3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910869; a=rsa-sha256; cv=none; b=U9HXtRbaRqY5d47ow7bC/y6DDuufilyMuRjo57diREHPXY5Ruhn10j84F52EpFQdGCsotl RtRMNq3k2r2F1mA04EpNwSs9bYcXZfC8TQtfa7goP2b0csRLtfOOcP2busZnZZjtfnTr5F +FZiHnkLFcmvr1wW3rd5k3Y/2FzAMSpDFeWBfLB/X3CZS0EusRQyoXxLtGLNSQ3jxAfQXD p3XJOn0SsTrQQpHRY2f7w8VzQber9jYVIbXJ4E6tOyuICezz7rFaO5zjRwAyo5TNYbhV9U uceuwg/w62iNJHiap3YLaVtyq2+wVTvgpA14maqHDgWO/zwDcvIl0vSMva0x+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 4T9GMS747dzmJS; Wed, 10 Jan 2024 18:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40AIL88m053078; Wed, 10 Jan 2024 18:21:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL8l4053075; Wed, 10 Jan 2024 18:21:08 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:08 GMT Message-Id: <202401101821.40AIL8l4053075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 1f469a9fc498 - main - hwreset: Move reset code in dev/hwreset List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f469a9fc498c3d406ef7c4e347232678f49da0a Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1f469a9fc498c3d406ef7c4e347232678f49da0a commit 1f469a9fc498c3d406ef7c4e347232678f49da0a Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:49:19 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:28 +0000 hwreset: Move reset code in dev/hwreset We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43192 --- sys/arm/allwinner/a10_codec.c | 2 +- sys/arm/allwinner/a31_dmac.c | 2 +- sys/arm/allwinner/a33_codec.c | 2 +- sys/arm/allwinner/a64/sun50i_a64_acodec.c | 2 +- sys/arm/allwinner/aw_cir.c | 2 +- sys/arm/allwinner/aw_gpio.c | 2 +- sys/arm/allwinner/aw_i2s.c | 2 +- sys/arm/allwinner/aw_mmc.c | 2 +- sys/arm/allwinner/aw_reset.c | 2 +- sys/arm/allwinner/aw_rsb.c | 2 +- sys/arm/allwinner/aw_thermal.c | 2 +- sys/arm/allwinner/aw_usb3phy.c | 2 +- sys/arm/allwinner/aw_usbphy.c | 2 +- sys/arm/allwinner/if_awg.c | 2 +- sys/arm/nvidia/drm2/tegra_dc.c | 2 +- sys/arm/nvidia/drm2/tegra_hdmi.c | 2 +- sys/arm/nvidia/drm2/tegra_host1x.c | 2 +- sys/arm/nvidia/tegra124/tegra124_car.c | 2 +- sys/arm/nvidia/tegra124/tegra124_pmc.c | 2 +- sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 2 +- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/nvidia/tegra_efuse.c | 2 +- sys/arm/nvidia/tegra_ehci.c | 2 +- sys/arm/nvidia/tegra_i2c.c | 2 +- sys/arm/nvidia/tegra_pcie.c | 2 +- sys/arm/nvidia/tegra_sdhci.c | 2 +- sys/arm/nvidia/tegra_soctherm.c | 2 +- sys/arm/nvidia/tegra_uart.c | 2 +- sys/arm/nvidia/tegra_usbphy.c | 2 +- sys/arm/nvidia/tegra_xhci.c | 2 +- sys/arm/qualcomm/ipq4018_usb_hs_phy.c | 2 +- sys/arm/qualcomm/ipq4018_usb_ss_phy.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_car.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_pmc.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pcie.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_i2s.c | 2 +- sys/arm64/rockchip/rk_pcie.c | 2 +- sys/arm64/rockchip/rk_pcie_phy.c | 2 +- sys/arm64/rockchip/rk_tsadc.c | 2 +- sys/arm64/rockchip/rk_typec_phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 2 +- sys/conf/files | 6 +++--- sys/dev/clk/allwinner/aw_ccung.c | 2 +- sys/dev/clk/allwinner/ccu_de2.c | 2 +- sys/dev/clk/rockchip/rk_cru.c | 2 +- sys/dev/clk/xilinx/zynqmp_reset.c | 2 +- sys/dev/dwc/dwc1000_core.c | 2 +- sys/dev/dwc/dwc1000_dma.c | 2 +- sys/dev/dwc/if_dwc.c | 2 +- sys/dev/dwc/if_dwc_aw.c | 2 +- sys/dev/dwc/if_dwc_rk.c | 2 +- sys/dev/dwc/if_dwc_socfpga.c | 2 +- sys/dev/eqos/if_eqos_fdt.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_main.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_phy.c | 2 +- sys/dev/{extres => }/hwreset/hwreset.c | 2 +- sys/dev/{extres => }/hwreset/hwreset.h | 6 +++--- sys/dev/{extres => }/hwreset/hwreset_array.c | 2 +- sys/dev/{extres => }/hwreset/hwreset_if.m | 0 sys/dev/iicbus/controller/twsi/a10_twsi.c | 2 +- sys/dev/mmc/host/dwmmc_var.h | 2 +- sys/dev/qcom_dwc3/qcom_dwc3.c | 2 +- sys/dev/qcom_gcc/qcom_gcc_ipq4018.c | 2 +- sys/dev/qcom_gcc/qcom_gcc_ipq4018_reset.c | 2 +- sys/dev/qcom_qup/qcom_spi.c | 2 +- sys/dev/qcom_qup/qcom_spi_hw.c | 2 +- sys/dev/spibus/controller/allwinner/aw_spi.c | 2 +- sys/dev/spibus/controller/rockchip/rk_spi.c | 2 +- sys/dev/uart/uart_dev_snps.c | 2 +- sys/dev/usb/controller/dwc3/aw_dwc3.c | 2 +- sys/dev/usb/controller/dwc3/rk_dwc3.c | 2 +- sys/dev/usb/controller/generic_ehci_fdt.c | 2 +- sys/dev/usb/controller/generic_ohci.c | 2 +- sys/dev/usb/controller/musb_otg_allwinner.c | 2 +- sys/dev/usb/controller/xlnx_dwc3.c | 2 +- sys/riscv/sifive/fu740_pci_dw.c | 2 +- 87 files changed, 90 insertions(+), 90 deletions(-) diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c index fc4937351f3b..421d1c015691 100644 --- a/sys/arm/allwinner/a10_codec.c +++ b/sys/arm/allwinner/a10_codec.c @@ -48,7 +48,7 @@ #include #include -#include +#include #include "sunxi_dma_if.h" #include "mixer_if.h" diff --git a/sys/arm/allwinner/a31_dmac.c b/sys/arm/allwinner/a31_dmac.c index 988444c4b1c5..9dc98342a159 100644 --- a/sys/arm/allwinner/a31_dmac.c +++ b/sys/arm/allwinner/a31_dmac.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include "sunxi_dma_if.h" diff --git a/sys/arm/allwinner/a33_codec.c b/sys/arm/allwinner/a33_codec.c index d71562b08c9b..4bf2863b74ef 100644 --- a/sys/arm/allwinner/a33_codec.c +++ b/sys/arm/allwinner/a33_codec.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/allwinner/a64/sun50i_a64_acodec.c b/sys/arm/allwinner/a64/sun50i_a64_acodec.c index f99d5385d897..f9ada20ec554 100644 --- a/sys/arm/allwinner/a64/sun50i_a64_acodec.c +++ b/sys/arm/allwinner/a64/sun50i_a64_acodec.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm/allwinner/aw_cir.c b/sys/arm/allwinner/aw_cir.c index 7e9fdfca80bf..5ebb57f48040 100644 --- a/sys/arm/allwinner/aw_cir.c +++ b/sys/arm/allwinner/aw_cir.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c index b77972ac0187..f72dbf88099f 100644 --- a/sys/arm/allwinner/aw_gpio.c +++ b/sys/arm/allwinner/aw_gpio.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #if defined(__aarch64__) diff --git a/sys/arm/allwinner/aw_i2s.c b/sys/arm/allwinner/aw_i2s.c index 376405056f51..87dfb109363f 100644 --- a/sys/arm/allwinner/aw_i2s.c +++ b/sys/arm/allwinner/aw_i2s.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index 7c783f69880c..d229fba1e07d 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include "opt_mmccam.h" diff --git a/sys/arm/allwinner/aw_reset.c b/sys/arm/allwinner/aw_reset.c index da2879ce20c8..4fadaf2bfef4 100644 --- a/sys/arm/allwinner/aw_reset.c +++ b/sys/arm/allwinner/aw_reset.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include "hwreset_if.h" diff --git a/sys/arm/allwinner/aw_rsb.c b/sys/arm/allwinner/aw_rsb.c index 08522caff725..fa599ddcb3dd 100644 --- a/sys/arm/allwinner/aw_rsb.c +++ b/sys/arm/allwinner/aw_rsb.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include "iicbus_if.h" diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index 4f1e02612347..d9293b5cb171 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_usb3phy.c b/sys/arm/allwinner/aw_usb3phy.c index 058fce6061a7..b49a9a86b6e9 100644 --- a/sys/arm/allwinner/aw_usb3phy.c +++ b/sys/arm/allwinner/aw_usb3phy.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index 33c11e62ef7c..09725783fd22 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index 516cbefc6272..6c38a65b5040 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_dc.c b/sys/arm/nvidia/drm2/tegra_dc.c index 637ea3981acc..f4168f161f5e 100644 --- a/sys/arm/nvidia/drm2/tegra_dc.c +++ b/sys/arm/nvidia/drm2/tegra_dc.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_hdmi.c b/sys/arm/nvidia/drm2/tegra_hdmi.c index 1c5e86bde498..174a9718bbfa 100644 --- a/sys/arm/nvidia/drm2/tegra_hdmi.c +++ b/sys/arm/nvidia/drm2/tegra_hdmi.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_host1x.c b/sys/arm/nvidia/drm2/tegra_host1x.c index 284c5c2e8465..4384ab0bc976 100644 --- a/sys/arm/nvidia/drm2/tegra_host1x.c +++ b/sys/arm/nvidia/drm2/tegra_host1x.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_car.c b/sys/arm/nvidia/tegra124/tegra124_car.c index 440f5a5b1044..57d7760494a6 100644 --- a/sys/arm/nvidia/tegra124/tegra124_car.c +++ b/sys/arm/nvidia/tegra124/tegra124_car.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_pmc.c b/sys/arm/nvidia/tegra124/tegra124_pmc.c index 6b42659d453a..83bd0a1e6983 100644 --- a/sys/arm/nvidia/tegra124/tegra124_pmc.c +++ b/sys/arm/nvidia/tegra124/tegra124_pmc.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index eb749a2ffbc9..0b611abc39cb 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index eeb49d6ea5a8..de60f02e97ea 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_efuse.c b/sys/arm/nvidia/tegra_efuse.c index 9e151f6ed564..35d9380a18a5 100644 --- a/sys/arm/nvidia/tegra_efuse.c +++ b/sys/arm/nvidia/tegra_efuse.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/tegra_ehci.c b/sys/arm/nvidia/tegra_ehci.c index 1d34ed45dd90..033b7b9794fb 100644 --- a/sys/arm/nvidia/tegra_ehci.c +++ b/sys/arm/nvidia/tegra_ehci.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_i2c.c b/sys/arm/nvidia/tegra_i2c.c index 1849ae33e3a2..1b959c5c5bbe 100644 --- a/sys/arm/nvidia/tegra_i2c.c +++ b/sys/arm/nvidia/tegra_i2c.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index 82e282146d68..a22ae02ce4bc 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_sdhci.c b/sys/arm/nvidia/tegra_sdhci.c index 6877b7021980..2b152227d95f 100644 --- a/sys/arm/nvidia/tegra_sdhci.c +++ b/sys/arm/nvidia/tegra_sdhci.c @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_soctherm.c b/sys/arm/nvidia/tegra_soctherm.c index 0018833e5a43..fa6d0d9fa5cd 100644 --- a/sys/arm/nvidia/tegra_soctherm.c +++ b/sys/arm/nvidia/tegra_soctherm.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/tegra_uart.c b/sys/arm/nvidia/tegra_uart.c index 31f92d34a6d3..e18b77ecc321 100644 --- a/sys/arm/nvidia/tegra_uart.c +++ b/sys/arm/nvidia/tegra_uart.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index 438ba719170c..2499a568fe4c 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_xhci.c b/sys/arm/nvidia/tegra_xhci.c index e80e34f38c38..21ce4dc0540d 100644 --- a/sys/arm/nvidia/tegra_xhci.c +++ b/sys/arm/nvidia/tegra_xhci.c @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c index 75bfa931e8e3..618911fef640 100644 --- a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c index 22dc92ffd2ec..66ef4c9fe732 100644 --- a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_car.c b/sys/arm64/nvidia/tegra210/tegra210_car.c index 2046782805d6..bff91024192f 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_car.c +++ b/sys/arm64/nvidia/tegra210/tegra210_car.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_pmc.c b/sys/arm64/nvidia/tegra210/tegra210_pmc.c index a04ec212a8c7..0f0343a317ce 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_pmc.c +++ b/sys/arm64/nvidia/tegra210/tegra210_pmc.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c index bfcd8894034a..75662386427f 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c +++ b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk3568_combphy.c b/sys/arm64/rockchip/rk3568_combphy.c index f9ba38e663ad..5152f3eed0d1 100644 --- a/sys/arm64/rockchip/rk3568_combphy.c +++ b/sys/arm64/rockchip/rk3568_combphy.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk3568_pcie.c b/sys/arm64/rockchip/rk3568_pcie.c index b8ad5b8a33f5..5343a5dd3f2c 100644 --- a/sys/arm64/rockchip/rk3568_pcie.c +++ b/sys/arm64/rockchip/rk3568_pcie.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pciephy.c b/sys/arm64/rockchip/rk3568_pciephy.c index 0f1aa5d280a8..f277253b577d 100644 --- a/sys/arm64/rockchip/rk3568_pciephy.c +++ b/sys/arm64/rockchip/rk3568_pciephy.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c index fb1c23b80eb9..3f7cd71eda27 100644 --- a/sys/arm64/rockchip/rk_i2s.c +++ b/sys/arm64/rockchip/rk_i2s.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_pcie.c b/sys/arm64/rockchip/rk_pcie.c index cccb04ffdcd9..cc6c842a6f6a 100644 --- a/sys/arm64/rockchip/rk_pcie.c +++ b/sys/arm64/rockchip/rk_pcie.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_pcie_phy.c b/sys/arm64/rockchip/rk_pcie_phy.c index d4c8c3eb2587..88ba4035ebb9 100644 --- a/sys/arm64/rockchip/rk_pcie_phy.c +++ b/sys/arm64/rockchip/rk_pcie_phy.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_tsadc.c b/sys/arm64/rockchip/rk_tsadc.c index 8b99c384da48..ff5fd722d0f0 100644 --- a/sys/arm64/rockchip/rk_tsadc.c +++ b/sys/arm64/rockchip/rk_tsadc.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_typec_phy.c b/sys/arm64/rockchip/rk_typec_phy.c index 6e75394377e4..7f49da5e2208 100644 --- a/sys/arm64/rockchip/rk_typec_phy.c +++ b/sys/arm64/rockchip/rk_typec_phy.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_usbphy.c b/sys/arm64/rockchip/rk_usbphy.c index 6f9001470df8..46859d1442e3 100644 --- a/sys/arm64/rockchip/rk_usbphy.c +++ b/sys/arm64/rockchip/rk_usbphy.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/conf/files b/sys/conf/files index 8b28d6428584..95228194fc5a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1682,9 +1682,6 @@ dev/extres/phy/phydev_if.m optional phy fdt dev/extres/phy/phynode_if.m optional phy dev/extres/phy/phy_usb.c optional phy dev/extres/phy/phynode_usb_if.m optional phy -dev/extres/hwreset/hwreset.c optional hwreset -dev/extres/hwreset/hwreset_array.c optional hwreset -dev/extres/hwreset/hwreset_if.m optional hwreset dev/extres/nvmem/nvmem.c optional nvmem fdt dev/extres/nvmem/nvmem_if.m optional nvmem dev/extres/regulator/regdev_if.m optional regulator fdt @@ -1783,6 +1780,9 @@ dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc +dev/hwreset/hwreset.c optional hwreset +dev/hwreset/hwreset_array.c optional hwreset +dev/hwreset/hwreset_if.m optional hwreset dev/ichiic/ig4_acpi.c optional ig4 acpi iicbus dev/ichiic/ig4_iic.c optional ig4 iicbus dev/ichiic/ig4_pci.c optional ig4 pci iicbus diff --git a/sys/dev/clk/allwinner/aw_ccung.c b/sys/dev/clk/allwinner/aw_ccung.c index f446b77b6226..751ebba6c349 100644 --- a/sys/dev/clk/allwinner/aw_ccung.c +++ b/sys/dev/clk/allwinner/aw_ccung.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/clk/allwinner/ccu_de2.c b/sys/dev/clk/allwinner/ccu_de2.c index 4bd29d139c11..cc4debdbfc89 100644 --- a/sys/dev/clk/allwinner/ccu_de2.c +++ b/sys/dev/clk/allwinner/ccu_de2.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/clk/rockchip/rk_cru.c b/sys/dev/clk/rockchip/rk_cru.c index a7d1b26166f1..6b0978e885b5 100644 --- a/sys/dev/clk/rockchip/rk_cru.c +++ b/sys/dev/clk/rockchip/rk_cru.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/clk/xilinx/zynqmp_reset.c b/sys/dev/clk/xilinx/zynqmp_reset.c index 52074d4c62af..c89a4c8ff58c 100644 --- a/sys/dev/clk/xilinx/zynqmp_reset.c +++ b/sys/dev/clk/xilinx/zynqmp_reset.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/dwc/dwc1000_core.c b/sys/dev/dwc/dwc1000_core.c index d25c31e66e28..ba895f991b50 100644 --- a/sys/dev/dwc/dwc1000_core.c +++ b/sys/dev/dwc/dwc1000_core.c @@ -55,7 +55,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index e89ccee5b0ff..c510c252072c 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -50,7 +50,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index be44a6be193b..17657045b73c 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index 981f621e3f27..2a0dfaa33715 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index 76fd11dfd109..c78fb447d6d3 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc_socfpga.c b/sys/dev/dwc/if_dwc_socfpga.c index ae2bcac54a95..5a95d133c197 100644 --- a/sys/dev/dwc/if_dwc_socfpga.c +++ b/sys/dev/dwc/if_dwc_socfpga.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/eqos/if_eqos_fdt.c b/sys/dev/eqos/if_eqos_fdt.c index 9c36f658bad1..5601c8b778e2 100644 --- a/sys/dev/eqos/if_eqos_fdt.c +++ b/sys/dev/eqos/if_eqos_fdt.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw.c index c017419be0ff..cdc13366eef3 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c index a3facf4a6199..4ddcc58a2cfc 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c index 43c2d8744054..793507b9aaa2 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c index 6fdc9e96fd81..73110753c915 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c index 7e440f54e3ac..fff97147d878 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c index e701f3ae28ba..a540f9b7498e 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c index 0f0704c41aba..67a2bcbc7a6c 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c index 3c3800847438..15f5f61f8b2d 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_main.c b/sys/dev/etherswitch/ar40xx/ar40xx_main.c index d8cbfd836a9b..757dbe23071e 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_main.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_main.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c index 079a92983503..b9a308e3620d 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/extres/hwreset/hwreset.c b/sys/dev/hwreset/hwreset.c similarity index 99% rename from sys/dev/extres/hwreset/hwreset.c rename to sys/dev/hwreset/hwreset.c index eda8878229d4..82ffa3491a11 100644 --- a/sys/dev/extres/hwreset/hwreset.c +++ b/sys/dev/hwreset/hwreset.c *** 274 LINES SKIPPED *** From nobody Wed Jan 10 18:21:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMW4TGlz55YDv; Wed, 10 Jan 2024 18:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9GMW2nvKz4GTN; Wed, 10 Jan 2024 18:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7LcN7DzbGxmfmDM3yJFyhvCBe3b3ByyMB3shS230AA=; b=LHLUzJwp6+QeSLKYelyUpsfRhxBxuFxWREIXYEqydjRlIQn8rFG/DbxFCiXVkNrxBgIXUJ fsyj5TmLMHBpGuKaAAjI5eGV9J0E8zYwldJkIQRBTP4/cwDyzfzJJlO3s6xmRApNx71bJw SAtlluzpb6i7Zjwc6DTZDwLt7oaKlsDhjgsW1AncchI+trY7tp+88gJav+4oibQiEQzG3D cDqKimA+58ZsnMxIHBP7Lkslp1wUPSHfjPyF/ydDcCZPENFxO2zmFBDr6GRJ2DWPXT7KFt hvTNBWuMF0ywtcpYGFOCdj6B1Vy+hkJQfwdM1ilnDBTRxcgORiD2nOJUn8lC2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7LcN7DzbGxmfmDM3yJFyhvCBe3b3ByyMB3shS230AA=; b=b/6aQZEt+3AONz249LKyBNBYfLkwWhET/XnYmFfjX3CNbbtsvj91Ghh/M9DcINM3/efsKp CFQfleXklP27X6oGpbZa2T6+DLytsUz7I2z4Bw6dedPZrh0YDu2hHjU00q6+s2KeLG2bZB +YllzgN8XevxhYnehu8wF5JZaKMRq+iAOy9IpBO3kYd2UK/OVMli3NRYxRTcUtLf38qnVm AErKXE8xH00xUqIOgk1jgRznHSxi/jw95hssFFdUSn/HUJvqGlm+q7vLxlXT0j/7b36VFh nNhiTepLpb46b7EWWp/DCXNnQAlW8hkjpZ7ICCvELXI3uOFHAtWUf797BFHh6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910871; a=rsa-sha256; cv=none; b=l65CHTIbB56cyozeozoVWJ4+YJuvGZTUOUFax3qIvmlNM00g69QO9gYpicdNEhKXPz/INz 2t86VOquY2CNjUKeW6t6QHu7io0B42V7b9OetS129gun2F1RlNyoz+7vNiKQiNmHScIdf5 uZZlwVJxxkYVK7T4u60u+rNNvebsQrrIeFaUoXCWqGA+1cBoeilfuAZ1hu2021ENw17Ra8 yUV83V2Ae+0Efc9zi8r8SUH97fXMJSrJedzWxWwipVEa8Fo3+x9EiTYLL02lVP+xA1zW6l L3+dic4sHnWDtlGamRrD7HJInYswGj+IaYrKYPmlXjmfnOWFF+5vdiSKbqD0rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMW1vLWzmXj; Wed, 10 Jan 2024 18:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40AILBlI053178; Wed, 10 Jan 2024 18:21:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AILBoS053175; Wed, 10 Jan 2024 18:21:11 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:11 GMT Message-Id: <202401101821.40AILBoS053175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: b2f0caf16099 - main - regulator: Move regulator code in dev/regulator List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2f0caf160993c30a0d0e3d52e8a2d03616908cd Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=b2f0caf160993c30a0d0e3d52e8a2d03616908cd commit b2f0caf160993c30a0d0e3d52e8a2d03616908cd Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:54:53 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:32 +0000 regulator: Move regulator code in dev/regulator We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: emaste, imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43194 --- sys/arm/allwinner/a10_ahci.c | 2 +- sys/arm/allwinner/a64/sun50i_a64_acodec.c | 2 +- sys/arm/allwinner/aw_gpio.c | 2 +- sys/arm/allwinner/aw_mmc.c | 2 +- sys/arm/allwinner/aw_usb3phy.c | 2 +- sys/arm/allwinner/aw_usbphy.c | 2 +- sys/arm/allwinner/axp209.c | 2 +- sys/arm/allwinner/axp81x.c | 2 +- sys/arm/allwinner/if_awg.c | 2 +- sys/arm/nvidia/as3722.c | 2 +- sys/arm/nvidia/as3722_regulators.c | 2 +- sys/arm/nvidia/drm2/tegra_hdmi.c | 2 +- sys/arm/nvidia/tegra124/tegra124_cpufreq.c | 2 +- sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 2 +- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/nvidia/tegra_pcie.c | 2 +- sys/arm/nvidia/tegra_usbphy.c | 2 +- sys/arm/nvidia/tegra_xhci.c | 2 +- sys/arm/qualcomm/ipq4018_usb_hs_phy.c | 2 +- sys/arm/qualcomm/ipq4018_usb_ss_phy.c | 2 +- sys/arm64/nvidia/tegra210/max77620.c | 2 +- sys/arm64/nvidia/tegra210/max77620_regulators.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_cpufreq.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pcie.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_iodomain.c | 2 +- sys/arm64/rockchip/rk_pcie.c | 2 +- sys/arm64/rockchip/rk_usb2phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 2 +- sys/conf/files | 10 +++++----- sys/dev/cpufreq/cpufreq_dt.c | 2 +- sys/dev/dwc/if_dwc_aw.c | 2 +- sys/dev/dwc/if_dwc_rk.c | 2 +- sys/dev/eqos/if_eqos_fdt.c | 2 +- sys/dev/gpio/gpioregulator.c | 2 +- sys/dev/iicbus/pmic/act8846.c | 2 +- sys/dev/iicbus/pmic/act8846_regulator.c | 2 +- sys/dev/iicbus/pmic/fan53555.c | 2 +- sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c | 2 +- sys/dev/iicbus/pmic/silergy/sy8106a.c | 2 +- sys/dev/iicbus/pmic/silergy/syr827.c | 2 +- sys/dev/mmc/host/dwmmc_var.h | 2 +- sys/dev/mmc/mmc_fdt_helpers.c | 2 +- sys/dev/mmc/mmc_fdt_helpers.h | 2 +- sys/dev/mmc/mmc_helpers.h | 2 +- sys/dev/pwm/pwm_backlight.c | 2 +- sys/dev/{extres => }/regulator/regdev_if.m | 0 sys/dev/{extres => }/regulator/regnode_if.m | 0 sys/dev/{extres => }/regulator/regulator.c | 2 +- sys/dev/{extres => }/regulator/regulator.h | 7 ++++--- sys/dev/{extres => }/regulator/regulator_bus.c | 0 sys/dev/{extres => }/regulator/regulator_fixed.c | 2 +- sys/dev/{extres => }/regulator/regulator_fixed.h | 8 ++++---- sys/dev/sdhci/sdhci_xenon.c | 2 +- sys/dev/sdhci/sdhci_xenon_acpi.c | 2 +- sys/dev/sound/fdt/simple_amplifier.c | 2 +- sys/dev/usb/controller/usb_nop_xceiv.c | 2 +- 59 files changed, 66 insertions(+), 65 deletions(-) diff --git a/sys/arm/allwinner/a10_ahci.c b/sys/arm/allwinner/a10_ahci.c index a0717a0e9dfa..b7aa991b6543 100644 --- a/sys/arm/allwinner/a10_ahci.c +++ b/sys/arm/allwinner/a10_ahci.c @@ -44,7 +44,7 @@ #include #include -#include +#include /* * Allwinner a1x/a2x/a8x SATA attachment. This is just the AHCI register diff --git a/sys/arm/allwinner/a64/sun50i_a64_acodec.c b/sys/arm/allwinner/a64/sun50i_a64_acodec.c index f9ada20ec554..12c9a86cf361 100644 --- a/sys/arm/allwinner/a64/sun50i_a64_acodec.c +++ b/sys/arm/allwinner/a64/sun50i_a64_acodec.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c index f72dbf88099f..cee2cf056f42 100644 --- a/sys/arm/allwinner/aw_gpio.c +++ b/sys/arm/allwinner/aw_gpio.c @@ -54,7 +54,7 @@ #include #include #include -#include +#include #if defined(__aarch64__) #include "opt_soc.h" diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index d229fba1e07d..929cbd8f3ed8 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include "opt_mmccam.h" diff --git a/sys/arm/allwinner/aw_usb3phy.c b/sys/arm/allwinner/aw_usb3phy.c index b49a9a86b6e9..fdf54ef79250 100644 --- a/sys/arm/allwinner/aw_usb3phy.c +++ b/sys/arm/allwinner/aw_usb3phy.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include "phynode_if.h" diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index 09725783fd22..855be90d7fb8 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include "phynode_if.h" diff --git a/sys/arm/allwinner/axp209.c b/sys/arm/allwinner/axp209.c index b4e00988031e..239ead02d0e0 100644 --- a/sys/arm/allwinner/axp209.c +++ b/sys/arm/allwinner/axp209.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c index ac9f9ee9e8ba..fc1a168595e5 100644 --- a/sys/arm/allwinner/axp81x.c +++ b/sys/arm/allwinner/axp81x.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include "gpio_if.h" #include "iicbus_if.h" diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index 6c38a65b5040..9834be083870 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -61,7 +61,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm/nvidia/as3722.c b/sys/arm/nvidia/as3722.c index 537cd4f6e24a..ca5f7372aed1 100644 --- a/sys/arm/nvidia/as3722.c +++ b/sys/arm/nvidia/as3722.c @@ -41,7 +41,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/as3722_regulators.c b/sys/arm/nvidia/as3722_regulators.c index 912c0d964961..331dfb72f4b5 100644 --- a/sys/arm/nvidia/as3722_regulators.c +++ b/sys/arm/nvidia/as3722_regulators.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_hdmi.c b/sys/arm/nvidia/drm2/tegra_hdmi.c index 174a9718bbfa..e5ce30ac2eb3 100644 --- a/sys/arm/nvidia/drm2/tegra_hdmi.c +++ b/sys/arm/nvidia/drm2/tegra_hdmi.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c index 7cf83978557e..a537d9397722 100644 --- a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c +++ b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index 0b611abc39cb..43c7e345d12c 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index de60f02e97ea..bf60971e2b7c 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index a22ae02ce4bc..c9b5f46c4e30 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index 2499a568fe4c..eeaca9fcc07c 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_xhci.c b/sys/arm/nvidia/tegra_xhci.c index 21ce4dc0540d..5bd7e6b7736e 100644 --- a/sys/arm/nvidia/tegra_xhci.c +++ b/sys/arm/nvidia/tegra_xhci.c @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c index 618911fef640..953887ad9906 100644 --- a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c index 66ef4c9fe732..b60be5896595 100644 --- a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/nvidia/tegra210/max77620.c b/sys/arm64/nvidia/tegra210/max77620.c index a27edf01889d..b33d73e71f90 100644 --- a/sys/arm64/nvidia/tegra210/max77620.c +++ b/sys/arm64/nvidia/tegra210/max77620.c @@ -40,7 +40,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm64/nvidia/tegra210/max77620_regulators.c b/sys/arm64/nvidia/tegra210/max77620_regulators.c index 3bfed6815711..af1a5af20ec3 100644 --- a/sys/arm64/nvidia/tegra210/max77620_regulators.c +++ b/sys/arm64/nvidia/tegra210/max77620_regulators.c @@ -37,7 +37,7 @@ #include -#include +#include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c b/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c index 99b54b224e89..9b248a09bd58 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c +++ b/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c index 75662386427f..944f4e645533 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c +++ b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk3568_combphy.c b/sys/arm64/rockchip/rk3568_combphy.c index 5152f3eed0d1..99144b3315b1 100644 --- a/sys/arm64/rockchip/rk3568_combphy.c +++ b/sys/arm64/rockchip/rk3568_combphy.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pcie.c b/sys/arm64/rockchip/rk3568_pcie.c index 5343a5dd3f2c..9874efdb1ec9 100644 --- a/sys/arm64/rockchip/rk3568_pcie.c +++ b/sys/arm64/rockchip/rk3568_pcie.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pciephy.c b/sys/arm64/rockchip/rk3568_pciephy.c index f277253b577d..50471ea55130 100644 --- a/sys/arm64/rockchip/rk3568_pciephy.c +++ b/sys/arm64/rockchip/rk3568_pciephy.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_iodomain.c b/sys/arm64/rockchip/rk_iodomain.c index 695d941e4f9c..e872ee5a45ed 100644 --- a/sys/arm64/rockchip/rk_iodomain.c +++ b/sys/arm64/rockchip/rk_iodomain.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_pcie.c b/sys/arm64/rockchip/rk_pcie.c index cc6c842a6f6a..ca85637589ee 100644 --- a/sys/arm64/rockchip/rk_pcie.c +++ b/sys/arm64/rockchip/rk_pcie.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_usb2phy.c b/sys/arm64/rockchip/rk_usb2phy.c index 367d4fef61cc..d06dce90c27b 100644 --- a/sys/arm64/rockchip/rk_usb2phy.c +++ b/sys/arm64/rockchip/rk_usb2phy.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/rk_usbphy.c b/sys/arm64/rockchip/rk_usbphy.c index 46859d1442e3..c2020373d040 100644 --- a/sys/arm64/rockchip/rk_usbphy.c +++ b/sys/arm64/rockchip/rk_usbphy.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/conf/files b/sys/conf/files index e07ac548d93a..f0d4250a4537 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1682,11 +1682,6 @@ dev/extres/phy/phydev_if.m optional phy fdt dev/extres/phy/phynode_if.m optional phy dev/extres/phy/phy_usb.c optional phy dev/extres/phy/phynode_usb_if.m optional phy -dev/extres/regulator/regdev_if.m optional regulator fdt -dev/extres/regulator/regnode_if.m optional regulator -dev/extres/regulator/regulator.c optional regulator -dev/extres/regulator/regulator_bus.c optional regulator fdt -dev/extres/regulator/regulator_fixed.c optional regulator dev/extres/syscon/syscon.c optional syscon dev/extres/syscon/syscon_generic.c optional syscon fdt dev/extres/syscon/syscon_if.m optional syscon @@ -2800,6 +2795,11 @@ dev/random/fortuna.c optional !random_loadable !random_fenestrasx dev/random/hash.c optional !random_loadable dev/rccgpio/rccgpio.c optional rccgpio gpio dev/re/if_re.c optional re +dev/regulator/regdev_if.m optional regulator fdt +dev/regulator/regnode_if.m optional regulator +dev/regulator/regulator.c optional regulator +dev/regulator/regulator_bus.c optional regulator fdt +dev/regulator/regulator_fixed.c optional regulator dev/rl/if_rl.c optional rl pci dev/rndtest/rndtest.c optional rndtest # diff --git a/sys/dev/cpufreq/cpufreq_dt.c b/sys/dev/cpufreq/cpufreq_dt.c index 4dae7142b380..929eebfe7dc5 100644 --- a/sys/dev/cpufreq/cpufreq_dt.c +++ b/sys/dev/cpufreq/cpufreq_dt.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include "cpufreq_if.h" diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index 2a0dfaa33715..460b24b0401a 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index c78fb447d6d3..fca9f879247b 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/eqos/if_eqos_fdt.c b/sys/dev/eqos/if_eqos_fdt.c index 5601c8b778e2..114f83f3bf37 100644 --- a/sys/dev/eqos/if_eqos_fdt.c +++ b/sys/dev/eqos/if_eqos_fdt.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/gpio/gpioregulator.c b/sys/dev/gpio/gpioregulator.c index 1f18bd6fd709..1fddb7dedc10 100644 --- a/sys/dev/gpio/gpioregulator.c +++ b/sys/dev/gpio/gpioregulator.c @@ -40,7 +40,7 @@ #include -#include +#include #include "regdev_if.h" diff --git a/sys/dev/iicbus/pmic/act8846.c b/sys/dev/iicbus/pmic/act8846.c index af3ee0ede5e5..5e166247f79b 100644 --- a/sys/dev/iicbus/pmic/act8846.c +++ b/sys/dev/iicbus/pmic/act8846.c @@ -41,7 +41,7 @@ #include -#include +#include #include #include #include diff --git a/sys/dev/iicbus/pmic/act8846_regulator.c b/sys/dev/iicbus/pmic/act8846_regulator.c index 551b537bb64f..9a711db2fbef 100644 --- a/sys/dev/iicbus/pmic/act8846_regulator.c +++ b/sys/dev/iicbus/pmic/act8846_regulator.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/iicbus/pmic/fan53555.c b/sys/dev/iicbus/pmic/fan53555.c index 12940bad5c67..7693770428e2 100644 --- a/sys/dev/iicbus/pmic/fan53555.c +++ b/sys/dev/iicbus/pmic/fan53555.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "regdev_if.h" diff --git a/sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c b/sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c index 7e637176531d..f640c6668376 100644 --- a/sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c +++ b/sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/iicbus/pmic/silergy/sy8106a.c b/sys/dev/iicbus/pmic/silergy/sy8106a.c index 76a39415349d..7c00c67f38d9 100644 --- a/sys/dev/iicbus/pmic/silergy/sy8106a.c +++ b/sys/dev/iicbus/pmic/silergy/sy8106a.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "iicbus_if.h" #include "regdev_if.h" diff --git a/sys/dev/iicbus/pmic/silergy/syr827.c b/sys/dev/iicbus/pmic/silergy/syr827.c index afc2bacfcd02..d48a3c92e665 100644 --- a/sys/dev/iicbus/pmic/silergy/syr827.c +++ b/sys/dev/iicbus/pmic/silergy/syr827.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include "iicbus_if.h" #include "regdev_if.h" diff --git a/sys/dev/mmc/host/dwmmc_var.h b/sys/dev/mmc/host/dwmmc_var.h index ebfc738eb8af..c524fd88f00a 100644 --- a/sys/dev/mmc/host/dwmmc_var.h +++ b/sys/dev/mmc/host/dwmmc_var.h @@ -33,7 +33,7 @@ #include #include -#include +#include #include "opt_mmccam.h" diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c index 8742b90d4f9c..0fb76dbfe522 100644 --- a/sys/dev/mmc/mmc_fdt_helpers.c +++ b/sys/dev/mmc/mmc_fdt_helpers.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/mmc/mmc_fdt_helpers.h b/sys/dev/mmc/mmc_fdt_helpers.h index 8b14138d882d..f22ce65b10ea 100644 --- a/sys/dev/mmc/mmc_fdt_helpers.h +++ b/sys/dev/mmc/mmc_fdt_helpers.h @@ -31,7 +31,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/mmc/mmc_helpers.h b/sys/dev/mmc/mmc_helpers.h index 2788d1eb0ecc..db2ed0a3959a 100644 --- a/sys/dev/mmc/mmc_helpers.h +++ b/sys/dev/mmc/mmc_helpers.h @@ -30,7 +30,7 @@ #include -#include +#include struct mmc_helper { device_t dev; diff --git a/sys/dev/pwm/pwm_backlight.c b/sys/dev/pwm/pwm_backlight.c index 0a5cf4c34d6f..ce3c0a6e1bd9 100644 --- a/sys/dev/pwm/pwm_backlight.c +++ b/sys/dev/pwm/pwm_backlight.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/extres/regulator/regdev_if.m b/sys/dev/regulator/regdev_if.m similarity index 100% rename from sys/dev/extres/regulator/regdev_if.m rename to sys/dev/regulator/regdev_if.m diff --git a/sys/dev/extres/regulator/regnode_if.m b/sys/dev/regulator/regnode_if.m similarity index 100% rename from sys/dev/extres/regulator/regnode_if.m rename to sys/dev/regulator/regnode_if.m diff --git a/sys/dev/extres/regulator/regulator.c b/sys/dev/regulator/regulator.c similarity index 99% rename from sys/dev/extres/regulator/regulator.c rename to sys/dev/regulator/regulator.c index 68e76f09a05e..6b49c6e93aae 100644 --- a/sys/dev/extres/regulator/regulator.c +++ b/sys/dev/regulator/regulator.c @@ -45,7 +45,7 @@ #include #include #endif -#include +#include #ifdef FDT #include "regdev_if.h" diff --git a/sys/dev/extres/regulator/regulator.h b/sys/dev/regulator/regulator.h similarity index 98% rename from sys/dev/extres/regulator/regulator.h rename to sys/dev/regulator/regulator.h index 4ef07f9acf12..e11dec515019 100644 --- a/sys/dev/extres/regulator/regulator.h +++ b/sys/dev/regulator/regulator.h @@ -24,8 +24,9 @@ * SUCH DAMAGE. */ -#ifndef _DEV_EXTRES_REGULATOR_H_ -#define _DEV_EXTRES_REGULATOR_H_ +#ifndef _DEV_REGULATOR_H_ +#define _DEV_REGULATOR_H_ + #include "opt_platform.h" #include @@ -151,4 +152,4 @@ int regulator_range_volt_to_sel8(struct regulator_range *ranges, int nranges, int regulator_range_sel8_to_volt(struct regulator_range *ranges, int nranges, uint8_t sel, int *volt); -#endif /* _DEV_EXTRES_REGULATOR_H_ */ +#endif /* _DEV_REGULATOR_H_ */ diff --git a/sys/dev/extres/regulator/regulator_bus.c b/sys/dev/regulator/regulator_bus.c similarity index 100% rename from sys/dev/extres/regulator/regulator_bus.c rename to sys/dev/regulator/regulator_bus.c diff --git a/sys/dev/extres/regulator/regulator_fixed.c b/sys/dev/regulator/regulator_fixed.c similarity index 99% rename from sys/dev/extres/regulator/regulator_fixed.c rename to sys/dev/regulator/regulator_fixed.c index d39e83c93037..d9ebbe017e11 100644 --- a/sys/dev/extres/regulator/regulator_fixed.c +++ b/sys/dev/regulator/regulator_fixed.c @@ -42,7 +42,7 @@ #include #endif #include -#include +#include #ifdef FDT #include "regdev_if.h" diff --git a/sys/dev/extres/regulator/regulator_fixed.h b/sys/dev/regulator/regulator_fixed.h similarity index 90% rename from sys/dev/extres/regulator/regulator_fixed.h rename to sys/dev/regulator/regulator_fixed.h index 2d1abe01b9af..33213252d653 100644 --- a/sys/dev/extres/regulator/regulator_fixed.h +++ b/sys/dev/regulator/regulator_fixed.h @@ -24,11 +24,11 @@ * SUCH DAMAGE. */ -#ifndef _DEV_EXTRES_REGULATOR_FIXED_H_ -#define _DEV_EXTRES_REGULATOR_FIXED_H_ +#ifndef _DEV_REGULATOR_FIXED_H_ +#define _DEV_REGULATOR_FIXED_H_ #include -#include +#include struct regnode_fixed_init_def { struct regnode_init_def reg_init_def; @@ -39,4 +39,4 @@ struct regnode_fixed_init_def { int regnode_fixed_register(device_t dev, struct regnode_fixed_init_def *init_def); -#endif /*_DEV_EXTRES_REGULATOR_FIXED_H_*/ +#endif /*_DEV_REGULATOR_FIXED_H_*/ diff --git a/sys/dev/sdhci/sdhci_xenon.c b/sys/dev/sdhci/sdhci_xenon.c index d8f66e655e50..4a823b896ca8 100644 --- a/sys/dev/sdhci/sdhci_xenon.c +++ b/sys/dev/sdhci/sdhci_xenon.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/sdhci/sdhci_xenon_acpi.c b/sys/dev/sdhci/sdhci_xenon_acpi.c index c792e3cf2e48..01b6c14dc5f2 100644 --- a/sys/dev/sdhci/sdhci_xenon_acpi.c +++ b/sys/dev/sdhci/sdhci_xenon_acpi.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/sound/fdt/simple_amplifier.c b/sys/dev/sound/fdt/simple_amplifier.c index 45505be4d3e3..c6379dd08450 100644 --- a/sys/dev/sound/fdt/simple_amplifier.c +++ b/sys/dev/sound/fdt/simple_amplifier.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include "opt_snd.h" diff --git a/sys/dev/usb/controller/usb_nop_xceiv.c b/sys/dev/usb/controller/usb_nop_xceiv.c index 25fc13cb0020..e9503a35531a 100644 --- a/sys/dev/usb/controller/usb_nop_xceiv.c +++ b/sys/dev/usb/controller/usb_nop_xceiv.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include "phynode_if.h" From nobody Wed Jan 10 18:21: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 4T9GMX6jhzz55YDw; Wed, 10 Jan 2024 18:21:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9GMX3f0pz4GlD; Wed, 10 Jan 2024 18:21:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xp6CMkvtEhHXBWn1+jrDcua0Eh+vIhFcuBu4L7LPZw=; b=k3o4IEh3IPII9MU+FQPY8ROTQieP1W4HE4lvkxlx6zuR+W3bD+BSOQnqcCUwVLyJefh9bc hoilDeGbnXKLHax42CqstYyQTrLsmnRr/OutDqcgv2O/4Asr3JRGKSULGfP70wZtkTJ2aT MzdZmjpolya7JUn09fbAqIs4DigkhjkoOx+6VNnxVJZJ9fQOZMPJQmvNrPf0hlDAJvxZIw dEmzwVPRB8/VeTrz4xrvaQJ5Ru4fT2vzlrlVp7Cifn7oyPhbvT1OJ1sbgx0pB5/kzoSvTl zSCujfcax04kQjw5GH01BSBsk6Wkooafy2d7lHTs/yWceIY5dqj6ycGLEi+WkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xp6CMkvtEhHXBWn1+jrDcua0Eh+vIhFcuBu4L7LPZw=; b=mx9i0sr6ulQRxIHayC7DlH6YApU3U2uv7c3zxNQBmNlNnk4GutTPHujlMLCDSqCqquCihE 4iqIQ3HyJKeh3WQhbfQwNez+rsAmMOY9ipECnMqHpZfQC3SFbiYU7VWKqGhZmSb30OxGPI fOZlO67/Y0aTpkEDW5tjxTv1yZGPIg7jw9jnhUfrs4w4n7mZBmsmWwpF1kbKVpj308+D2r a48xDqBkLN/YYClF8NSELt8xWMt3q/xk4L7EKKcWGRZ8Espm9L6k9HFzvDHI9pxbaUKdRl /UG8zBEqJTR4QjX1cjFJjlBJ2C9SFrwfaZNExLOX0O8Pb6Xzg8AB9g7DZtYEOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910872; a=rsa-sha256; cv=none; b=EtyOitm5uZ7EvSJ6ZkNyagO0oCb2Mj5WhT38rpmKMtOtSTNh/r+WxJrcSQHFc+nhvDLw0m XChYSvvmQyEKQqtOpm1nezKlZe8xljh3HKhq6iXA+XrX4gICdLAM/Af4JeQtqIYmCex42j q9sTlQuGRz3vul7lr8+GzdAdfv+PbyWE50YEoT7RHVODG4dH0S2f1zM6qK/L/GvrcEzZXk PsVG4M6c3mWMuT9PEIsduZQt4h/WFUyLWgBA3kZDQUcF/QufVNfrSWjIwe9CgjxKNa6Npy r6pkM1GDFoiQd+W0Gov7BhTknB6LQtOV/agMStVlQaYRjpN1vcGTnzXzP4vJog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMX2lMrzmXk; Wed, 10 Jan 2024 18:21: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 40AILCYR053227; Wed, 10 Jan 2024 18:21:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AILCnZ053224; Wed, 10 Jan 2024 18:21:12 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:12 GMT Message-Id: <202401101821.40AILCnZ053224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 950a6087ec18 - main - phy: Move phy code in dev/phy List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 950a6087ec18cd22464b3297573f54a6d9223c99 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=950a6087ec18cd22464b3297573f54a6d9223c99 commit 950a6087ec18cd22464b3297573f54a6d9223c99 Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:56:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:34 +0000 phy: Move phy code in dev/phy We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: emaste, imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43195 --- sys/arm/allwinner/aw_usb3phy.c | 2 +- sys/arm/allwinner/aw_usbphy.c | 2 +- sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 2 +- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/nvidia/tegra_ehci.c | 2 +- sys/arm/nvidia/tegra_pcie.c | 2 +- sys/arm/nvidia/tegra_usbphy.c | 2 +- sys/arm/nvidia/tegra_xhci.c | 2 +- sys/arm/qualcomm/ipq4018_usb_hs_phy.c | 2 +- sys/arm/qualcomm/ipq4018_usb_ss_phy.c | 2 +- sys/arm/ti/am335x/am335x_usb_phy.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/rockchip/rk3399_emmcphy.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pcie.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_pcie.c | 2 +- sys/arm64/rockchip/rk_pcie_phy.c | 4 ++-- sys/arm64/rockchip/rk_typec_phy.c | 2 +- sys/arm64/rockchip/rk_usb2phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 2 +- sys/conf/files | 10 +++++----- sys/dev/pci/pci_dw_mv.c | 2 +- sys/dev/{extres => }/phy/phy.c | 4 ++-- sys/dev/{extres => }/phy/phy.h | 7 ++++--- sys/dev/{extres => }/phy/phy_internal.h | 6 +++--- sys/dev/{extres => }/phy/phy_usb.c | 4 ++-- sys/dev/{extres => }/phy/phy_usb.h | 8 ++++---- sys/dev/{extres => }/phy/phydev_if.m | 0 sys/dev/{extres => }/phy/phynode_if.m | 2 +- sys/dev/{extres => }/phy/phynode_usb_if.m | 0 sys/dev/qcom_dwc3/qcom_dwc3.c | 2 +- sys/dev/sdhci/sdhci_fdt.c | 2 +- sys/dev/usb/controller/dwc3/aw_dwc3.c | 2 +- sys/dev/usb/controller/dwc3/dwc3.c | 2 +- sys/dev/usb/controller/dwc3/rk_dwc3.c | 2 +- sys/dev/usb/controller/generic_ehci_fdt.c | 4 ++-- sys/dev/usb/controller/generic_ohci.c | 4 ++-- sys/dev/usb/controller/generic_xhci_fdt.c | 2 +- sys/dev/usb/controller/musb_otg_allwinner.c | 4 ++-- sys/dev/usb/controller/usb_nop_xceiv.c | 2 +- sys/dev/usb/controller/xlnx_dwc3.c | 2 +- 42 files changed, 58 insertions(+), 57 deletions(-) diff --git a/sys/arm/allwinner/aw_usb3phy.c b/sys/arm/allwinner/aw_usb3phy.c index fdf54ef79250..66033ef22a18 100644 --- a/sys/arm/allwinner/aw_usb3phy.c +++ b/sys/arm/allwinner/aw_usb3phy.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include "phynode_if.h" diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index 855be90d7fb8..b0ef7d9da0a9 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include "phynode_if.h" diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index 43c7e345d12c..b03fb9e0c3bf 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index bf60971e2b7c..c5d4dbff977c 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_ehci.c b/sys/arm/nvidia/tegra_ehci.c index 033b7b9794fb..e8126a88ba87 100644 --- a/sys/arm/nvidia/tegra_ehci.c +++ b/sys/arm/nvidia/tegra_ehci.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index c9b5f46c4e30..cb0c1c7ec4d4 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index eeaca9fcc07c..cdf6f7f5833f 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_xhci.c b/sys/arm/nvidia/tegra_xhci.c index 5bd7e6b7736e..f7d541fabee4 100644 --- a/sys/arm/nvidia/tegra_xhci.c +++ b/sys/arm/nvidia/tegra_xhci.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c index 953887ad9906..97f65766466c 100644 --- a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c index b60be5896595..e9b880319bbc 100644 --- a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/ti/am335x/am335x_usb_phy.c b/sys/arm/ti/am335x/am335x_usb_phy.c index 04675d1f18ba..05b1c085aea3 100644 --- a/sys/arm/ti/am335x/am335x_usb_phy.c +++ b/sys/arm/ti/am335x/am335x_usb_phy.c @@ -83,7 +83,7 @@ ti_usb_phy_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - /* FIXME: Add dev/extres/phy/ interface */ + /* FIXME: Add dev/phy/ interface */ return (bus_generic_attach(dev)); } diff --git a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c index 944f4e645533..4b9b566a79b7 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c +++ b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk3399_emmcphy.c b/sys/arm64/rockchip/rk3399_emmcphy.c index 70c96e4daf4e..8799dcb06b5d 100644 --- a/sys/arm64/rockchip/rk3399_emmcphy.c +++ b/sys/arm64/rockchip/rk3399_emmcphy.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk3568_combphy.c b/sys/arm64/rockchip/rk3568_combphy.c index 99144b3315b1..1f9c0003b531 100644 --- a/sys/arm64/rockchip/rk3568_combphy.c +++ b/sys/arm64/rockchip/rk3568_combphy.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/rk3568_pcie.c b/sys/arm64/rockchip/rk3568_pcie.c index 9874efdb1ec9..d55bfb1bcc73 100644 --- a/sys/arm64/rockchip/rk3568_pcie.c +++ b/sys/arm64/rockchip/rk3568_pcie.c @@ -50,7 +50,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pciephy.c b/sys/arm64/rockchip/rk3568_pciephy.c index 50471ea55130..83ee77decdb9 100644 --- a/sys/arm64/rockchip/rk3568_pciephy.c +++ b/sys/arm64/rockchip/rk3568_pciephy.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/rk_pcie.c b/sys/arm64/rockchip/rk_pcie.c index ca85637589ee..69ae4254a235 100644 --- a/sys/arm64/rockchip/rk_pcie.c +++ b/sys/arm64/rockchip/rk_pcie.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_pcie_phy.c b/sys/arm64/rockchip/rk_pcie_phy.c index 88ba4035ebb9..7e9077d33eb8 100644 --- a/sys/arm64/rockchip/rk_pcie_phy.c +++ b/sys/arm64/rockchip/rk_pcie_phy.c @@ -45,8 +45,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_typec_phy.c b/sys/arm64/rockchip/rk_typec_phy.c index 7f49da5e2208..df29d514cf37 100644 --- a/sys/arm64/rockchip/rk_typec_phy.c +++ b/sys/arm64/rockchip/rk_typec_phy.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_usb2phy.c b/sys/arm64/rockchip/rk_usb2phy.c index d06dce90c27b..ec8a4ba89e37 100644 --- a/sys/arm64/rockchip/rk_usb2phy.c +++ b/sys/arm64/rockchip/rk_usb2phy.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_usbphy.c b/sys/arm64/rockchip/rk_usbphy.c index c2020373d040..f91c8167df62 100644 --- a/sys/arm64/rockchip/rk_usbphy.c +++ b/sys/arm64/rockchip/rk_usbphy.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/conf/files b/sys/conf/files index f0d4250a4537..f63f844e7942 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1677,11 +1677,6 @@ dev/evdev/evdev_mt.c optional evdev dev/evdev/evdev_utils.c optional evdev dev/evdev/uinput.c optional evdev uinput dev/exca/exca.c optional cbb -dev/extres/phy/phy.c optional phy -dev/extres/phy/phydev_if.m optional phy fdt -dev/extres/phy/phynode_if.m optional phy -dev/extres/phy/phy_usb.c optional phy -dev/extres/phy/phynode_usb_if.m optional phy dev/extres/syscon/syscon.c optional syscon dev/extres/syscon/syscon_generic.c optional syscon fdt dev/extres/syscon/syscon_if.m optional syscon @@ -2591,6 +2586,11 @@ dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard dev/pci/pcib_support.c standard dev/pci/vga_pci.c optional pci +dev/phy/phy.c optional phy +dev/phy/phydev_if.m optional phy fdt +dev/phy/phynode_if.m optional phy +dev/phy/phy_usb.c optional phy +dev/phy/phynode_usb_if.m optional phy dev/pms/freebsd/driver/ini/src/agtiapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sadisc.c optional pmspcv \ diff --git a/sys/dev/pci/pci_dw_mv.c b/sys/dev/pci/pci_dw_mv.c index 4f0671cb23d9..97d957932d42 100644 --- a/sys/dev/pci/pci_dw_mv.c +++ b/sys/dev/pci/pci_dw_mv.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/dev/extres/phy/phy.c b/sys/dev/phy/phy.c similarity index 99% rename from sys/dev/extres/phy/phy.c rename to sys/dev/phy/phy.c index 8861102b8508..07ffd85377c9 100644 --- a/sys/dev/extres/phy/phy.c +++ b/sys/dev/phy/phy.c @@ -40,8 +40,8 @@ #include #endif -#include -#include +#include +#include #ifdef FDT #include "phydev_if.h" diff --git a/sys/dev/extres/phy/phy.h b/sys/dev/phy/phy.h similarity index 98% rename from sys/dev/extres/phy/phy.h rename to sys/dev/phy/phy.h index a72904a10e2b..ae610ab74d10 100644 --- a/sys/dev/extres/phy/phy.h +++ b/sys/dev/phy/phy.h @@ -23,8 +23,9 @@ * */ -#ifndef DEV_EXTRES_PHY_H -#define DEV_EXTRES_PHY_H +#ifndef _DEV_PHY_H_ +#define _DEV_PHY_H_ + #include "opt_platform.h" #include @@ -148,4 +149,4 @@ int phy_get_by_ofw_property(device_t consumer, phandle_t node, char *name, phy_t *phy); #endif -#endif /* DEV_EXTRES_PHY_H */ +#endif /* _DEV_PHY_H_ */ diff --git a/sys/dev/extres/phy/phy_internal.h b/sys/dev/phy/phy_internal.h similarity index 96% rename from sys/dev/extres/phy/phy_internal.h rename to sys/dev/phy/phy_internal.h index 7f680a1c87fb..d5872d84b8c9 100644 --- a/sys/dev/extres/phy/phy_internal.h +++ b/sys/dev/phy/phy_internal.h @@ -23,8 +23,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DEV_EXTRES_PHY_INTERNAL_H -#define DEV_EXTRES_PHY_INTERNAL_H +#ifndef _DEV_PHY_INTERNAL_H_ +#define _DEV_PHY_INTERNAL_H_ /* Forward declarations. */ struct phy; @@ -78,4 +78,4 @@ struct phy { extern struct sx phynode_topo_lock; -#endif /* DEV_EXTRES_PHY_INTERNAL_H */ +#endif /* _DEV_PHY_INTERNAL_H_ */ diff --git a/sys/dev/extres/phy/phy_usb.c b/sys/dev/phy/phy_usb.c similarity index 97% rename from sys/dev/extres/phy/phy_usb.c rename to sys/dev/phy/phy_usb.c index 9e5556cf7f49..6a4fb17ca199 100644 --- a/sys/dev/extres/phy/phy_usb.c +++ b/sys/dev/phy/phy_usb.c @@ -32,8 +32,8 @@ #include -#include -#include +#include +#include /* * USB phy controller methods. diff --git a/sys/dev/extres/phy/phy_usb.h b/sys/dev/phy/phy_usb.h similarity index 95% rename from sys/dev/extres/phy/phy_usb.h rename to sys/dev/phy/phy_usb.h index ae175c6700c5..eaaff6ee700c 100644 --- a/sys/dev/extres/phy/phy_usb.h +++ b/sys/dev/phy/phy_usb.h @@ -24,10 +24,10 @@ * SUCH DAMAGE. */ -#ifndef _DEV_EXTRES_PHY_USB_H_ -#define _DEV_EXTRES_PHY_USB_H_ +#ifndef _DEV_PHY_USB_H_ +#define _DEV_PHY_USB_H_ -#include +#include #include "phynode_usb_if.h" #define PHY_USB_MODE_UNKNOWN 0 @@ -80,4 +80,4 @@ int phynode_usb_get_mode(struct phynode *phynode, int *usb_mode); int phy_usb_set_mode(phy_t phy, int usb_mode); int phy_usb_get_mode(phy_t phy, int *usb_mode); -#endif /*_DEV_EXTRES_PHY_USB_H_*/ +#endif /*_DEV_PHY_USB_H_*/ diff --git a/sys/dev/extres/phy/phydev_if.m b/sys/dev/phy/phydev_if.m similarity index 100% rename from sys/dev/extres/phy/phydev_if.m rename to sys/dev/phy/phydev_if.m diff --git a/sys/dev/extres/phy/phynode_if.m b/sys/dev/phy/phynode_if.m similarity index 98% rename from sys/dev/extres/phy/phynode_if.m rename to sys/dev/phy/phynode_if.m index 18b798227109..425deb6bcfbe 100644 --- a/sys/dev/extres/phy/phynode_if.m +++ b/sys/dev/phy/phynode_if.m @@ -26,7 +26,7 @@ INTERFACE phynode; HEADER { - #include + #include struct phynode; } diff --git a/sys/dev/extres/phy/phynode_usb_if.m b/sys/dev/phy/phynode_usb_if.m similarity index 100% rename from sys/dev/extres/phy/phynode_usb_if.m rename to sys/dev/phy/phynode_usb_if.m diff --git a/sys/dev/qcom_dwc3/qcom_dwc3.c b/sys/dev/qcom_dwc3/qcom_dwc3.c index 71c95096e5cf..cd58b9ef7705 100644 --- a/sys/dev/qcom_dwc3/qcom_dwc3.c +++ b/sys/dev/qcom_dwc3/qcom_dwc3.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index bf9f81108467..3914c96b5165 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include diff --git a/sys/dev/usb/controller/dwc3/aw_dwc3.c b/sys/dev/usb/controller/dwc3/aw_dwc3.c index 67331f2f1be9..802c46bdae28 100644 --- a/sys/dev/usb/controller/dwc3/aw_dwc3.c +++ b/sys/dev/usb/controller/dwc3/aw_dwc3.c @@ -47,7 +47,7 @@ #include #include -#include +#include static struct ofw_compat_data compat_data[] = { { "allwinner,sun50i-h6-dwc3", 1 }, diff --git a/sys/dev/usb/controller/dwc3/dwc3.c b/sys/dev/usb/controller/dwc3/dwc3.c index e0ad19fb835f..a44c2371b891 100644 --- a/sys/dev/usb/controller/dwc3/dwc3.c +++ b/sys/dev/usb/controller/dwc3/dwc3.c @@ -66,7 +66,7 @@ #include #include -#include +#include #endif #ifdef DEV_ACPI diff --git a/sys/dev/usb/controller/dwc3/rk_dwc3.c b/sys/dev/usb/controller/dwc3/rk_dwc3.c index b34ec4880895..b3345fb4a67b 100644 --- a/sys/dev/usb/controller/dwc3/rk_dwc3.c +++ b/sys/dev/usb/controller/dwc3/rk_dwc3.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include enum rk_dwc3_type { diff --git a/sys/dev/usb/controller/generic_ehci_fdt.c b/sys/dev/usb/controller/generic_ehci_fdt.c index e88895d20664..af22d0bdef73 100644 --- a/sys/dev/usb/controller/generic_ehci_fdt.c +++ b/sys/dev/usb/controller/generic_ehci_fdt.c @@ -56,8 +56,8 @@ #include #include -#include -#include +#include +#include #include "generic_ehci.h" diff --git a/sys/dev/usb/controller/generic_ohci.c b/sys/dev/usb/controller/generic_ohci.c index b71c269cfdcd..f3a9e0481bb2 100644 --- a/sys/dev/usb/controller/generic_ohci.c +++ b/sys/dev/usb/controller/generic_ohci.c @@ -55,8 +55,8 @@ #include #include -#include -#include +#include +#include #include "generic_usb_if.h" diff --git a/sys/dev/usb/controller/generic_xhci_fdt.c b/sys/dev/usb/controller/generic_xhci_fdt.c index a5c3f190783f..66fc1ab65a23 100644 --- a/sys/dev/usb/controller/generic_xhci_fdt.c +++ b/sys/dev/usb/controller/generic_xhci_fdt.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include "generic_xhci.h" diff --git a/sys/dev/usb/controller/musb_otg_allwinner.c b/sys/dev/usb/controller/musb_otg_allwinner.c index a8961bed6385..3bfe2b525138 100644 --- a/sys/dev/usb/controller/musb_otg_allwinner.c +++ b/sys/dev/usb/controller/musb_otg_allwinner.c @@ -60,8 +60,8 @@ #include #include -#include -#include +#include +#include #ifdef __arm__ #include diff --git a/sys/dev/usb/controller/usb_nop_xceiv.c b/sys/dev/usb/controller/usb_nop_xceiv.c index e9503a35531a..9821f4b5e92a 100644 --- a/sys/dev/usb/controller/usb_nop_xceiv.c +++ b/sys/dev/usb/controller/usb_nop_xceiv.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include "phynode_if.h" diff --git a/sys/dev/usb/controller/xlnx_dwc3.c b/sys/dev/usb/controller/xlnx_dwc3.c index facc44823523..9b9d10e81ad8 100644 --- a/sys/dev/usb/controller/xlnx_dwc3.c +++ b/sys/dev/usb/controller/xlnx_dwc3.c @@ -49,7 +49,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { From nobody Wed Jan 10 18:21:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMY5gKvz55YQW; Wed, 10 Jan 2024 18:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9GMY4Sqzz4GZB; Wed, 10 Jan 2024 18:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h7AZwRBaTVEjQ5B4OUcjdMlxV1iAI0b/otZ4gjT2x8M=; b=VWiyJ57MJfP9fUB+vg1cEOlsp863wc7+jIkbwExfIudEbmhyU95fawCiSVPCfooDQXvGsf gbGWasLtPlYekV7ooNAnOY6oVBXy6bu3bA9ZED2dIgLACuu1N5yt7D5Akk+ajDbF15B5qT nfQwf0MZwLfp7Ra3p3XeLK3lxSrKjkkmsuFFz9E5YKGc0DHGUrdGdlkcPvaJT9JC8STuxB WBBqqSnM22TalKHfip6XZkuZEC/Y8kF6w4Ki0iYUx3marEFE72t/8iLBJaxlcWhIEVDev6 57DIY1/lvuCTr61MjHijOSbrioEAslpC6nX7rgMg6rc6azg4rn8LYTct2KtT0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h7AZwRBaTVEjQ5B4OUcjdMlxV1iAI0b/otZ4gjT2x8M=; b=C7f+cjCUmKMknlaiVn4zuIUYu5cAWm41eJ2GoKo5817TlMe/6jJYKiKPa6aYaDjl6GA+Kt c8lA3lqPLrX2ElDJoF0Npk2SXnLYeGEzJkip34/5j9YolyDnQsOU3jsm44FxV5qDqsqSVU wT6Qnhx5OKzh2gOHkoC0lYSAit7oDmMyc1BwpzNHYYDH8nF8KlivoA3Tu0qGjyTK6aqDjr pAOQr4hYQFrEE99Rx1V0WotCKpDiOf/t+TMuSPhVa/TfaOLjstmGLHEkmbNx0fko1+lbzC LKftlTP5pPfoFklGfBYU6dGg3u17M+KPMaKQh6cIGzRTaTvKdQQojS7u1JrmVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910873; a=rsa-sha256; cv=none; b=fnMzAsIeOTh7hi7mvzKsJNFvjxD4kCYyADZ+4WujyaWDoE+L72Qnlg1j82DMbSwB49rAj8 KYJ6TnxS9qjtyGcGI5Kd9d+PnIxuM0LH02ubLnOe3MiXq7YfaUIWWizW2vFVjRiuz3RZE9 pUAw4Jm2jf2g6EKxMBBq4PyfsilpH9yO1ChiyHbl5Ebe2fP/oIkeB01FVRfzW6rppOB/LF vKvwqS+0O54XPCSrZ7kwMIaF89Y3morneH9MhYdiAY2W2rPhztCFi4FmzDokLVvugdoR/8 PhbWN6oFO+vwOn4xvq+7l4ZSSoEN8G9mq9tQ/Gcm4SIivriNKTDkiFV7ubX+Dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9GMY3ZmYzm5Q; Wed, 10 Jan 2024 18:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40AILDYn053276; Wed, 10 Jan 2024 18:21:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AILD4I053273; Wed, 10 Jan 2024 18:21:13 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:13 GMT Message-Id: <202401101821.40AILD4I053273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 62e8ccc3a489 - main - syscon: Move syscon code in dev/syscon List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62e8ccc3a489434af379c7f47da71545bc1e14ee Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=62e8ccc3a489434af379c7f47da71545bc1e14ee commit 62e8ccc3a489434af379c7f47da71545bc1e14ee Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:58:15 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:37 +0000 syscon: Move syscon code in dev/syscon We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43196 --- sys/arm/allwinner/aw_syscon.c | 4 ++-- sys/arm/allwinner/if_awg.c | 2 +- sys/arm/mv/clk/a37x0_xtal.c | 2 +- sys/arm/mv/mv_ap806_clock.c | 2 +- sys/arm/mv/mv_cp110_clock.c | 2 +- sys/arm/mv/mv_cp110_icu_bus.c | 2 +- sys/arm/mv/mv_thermal.c | 2 +- sys/arm/mv/mvebu_gpio.c | 2 +- sys/arm/mv/mvebu_pinctrl.c | 2 +- sys/arm/ti/am335x/am335x_musb.c | 2 +- sys/arm/ti/am335x/am335x_pwmss.c | 2 +- sys/arm/ti/am335x/am335x_scm.c | 2 +- sys/arm/ti/cpsw/if_cpsw.c | 2 +- sys/arm/ti/ti_scm_syscon.c | 2 +- sys/arm64/rockchip/rk3328_codec.c | 2 +- sys/arm64/rockchip/rk3399_emmcphy.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_grf.c | 2 +- sys/arm64/rockchip/rk_i2s.c | 2 +- sys/arm64/rockchip/rk_iodomain.c | 2 +- sys/arm64/rockchip/rk_otp.c | 2 +- sys/arm64/rockchip/rk_pcie_phy.c | 2 +- sys/arm64/rockchip/rk_pinctrl.c | 2 +- sys/arm64/rockchip/rk_pmu.c | 2 +- sys/arm64/rockchip/rk_tsadc.c | 2 +- sys/arm64/rockchip/rk_typec_phy.c | 2 +- sys/arm64/rockchip/rk_usb2phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 4 ++-- sys/conf/files | 8 ++++---- sys/dev/clk/rockchip/rk_clk_composite.c | 2 +- sys/dev/clk/rockchip/rk_clk_mux.c | 2 +- sys/dev/dwc/if_dwc_rk.c | 2 +- sys/dev/eqos/if_eqos_fdt.c | 2 +- sys/dev/fdt/simple_mfd.c | 2 +- sys/dev/qcom_dwc3/qcom_dwc3.c | 2 +- sys/dev/sdhci/sdhci_fdt.c | 2 +- sys/dev/sdhci/sdhci_fsl_fdt.c | 2 +- sys/dev/{extres => }/syscon/syscon.c | 0 sys/dev/{extres => }/syscon/syscon.h | 0 sys/dev/{extres => }/syscon/syscon_generic.c | 0 sys/dev/{extres => }/syscon/syscon_generic.h | 0 sys/dev/{extres => }/syscon/syscon_if.m | 0 sys/dev/{extres => }/syscon/syscon_power.c | 0 sys/dev/usb/controller/dwc3/rk_dwc3.c | 2 +- sys/dev/usb/controller/xlnx_dwc3.c | 2 +- sys/riscv/riscv/riscv_syscon.c | 4 ++-- 47 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/arm/allwinner/aw_syscon.c b/sys/arm/allwinner/aw_syscon.c index 3f6e8260c2c9..6a880a9b617e 100644 --- a/sys/arm/allwinner/aw_syscon.c +++ b/sys/arm/allwinner/aw_syscon.c @@ -41,8 +41,8 @@ #include #include -#include -#include +#include +#include static struct ofw_compat_data compat_data[] = { {"allwinner,sun50i-a64-system-controller", 1}, diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index 9834be083870..29a75e5a4d9b 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include "syscon_if.h" #include "miibus_if.h" diff --git a/sys/arm/mv/clk/a37x0_xtal.c b/sys/arm/mv/clk/a37x0_xtal.c index 67a791b8d34a..195c26259e63 100644 --- a/sys/arm/mv/clk/a37x0_xtal.c +++ b/sys/arm/mv/clk/a37x0_xtal.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mv_ap806_clock.c b/sys/arm/mv/mv_ap806_clock.c index f41f5e09c4dd..6d15d5687088 100644 --- a/sys/arm/mv/mv_ap806_clock.c +++ b/sys/arm/mv/mv_ap806_clock.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mv_cp110_clock.c b/sys/arm/mv/mv_cp110_clock.c index 45f8476df5b3..9edc01e95074 100644 --- a/sys/arm/mv/mv_cp110_clock.c +++ b/sys/arm/mv/mv_cp110_clock.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mv_cp110_icu_bus.c b/sys/arm/mv/mv_cp110_icu_bus.c index 43429292c9f1..75c0bee75414 100644 --- a/sys/arm/mv/mv_cp110_icu_bus.c +++ b/sys/arm/mv/mv_cp110_icu_bus.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { diff --git a/sys/arm/mv/mv_thermal.c b/sys/arm/mv/mv_thermal.c index 8004fdd38289..9240666ec726 100644 --- a/sys/arm/mv/mv_thermal.c +++ b/sys/arm/mv/mv_thermal.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c index 001369bb3a02..a2001589867c 100644 --- a/sys/arm/mv/mvebu_gpio.c +++ b/sys/arm/mv/mvebu_gpio.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/mv/mvebu_pinctrl.c b/sys/arm/mv/mvebu_pinctrl.c index 658a4b615cf7..7e9ecda1a67a 100644 --- a/sys/arm/mv/mvebu_pinctrl.c +++ b/sys/arm/mv/mvebu_pinctrl.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/ti/am335x/am335x_musb.c b/sys/arm/ti/am335x/am335x_musb.c index b24f12990640..93cb7cef41b9 100644 --- a/sys/arm/ti/am335x/am335x_musb.c +++ b/sys/arm/ti/am335x/am335x_musb.c @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include "syscon_if.h" #define USBCTRL_REV 0x00 diff --git a/sys/arm/ti/am335x/am335x_pwmss.c b/sys/arm/ti/am335x/am335x_pwmss.c index c4a045503b1e..8766c706b807 100644 --- a/sys/arm/ti/am335x/am335x_pwmss.c +++ b/sys/arm/ti/am335x/am335x_pwmss.c @@ -45,7 +45,7 @@ #include -#include +#include #include "syscon_if.h" #include "am335x_pwm.h" diff --git a/sys/arm/ti/am335x/am335x_scm.c b/sys/arm/ti/am335x/am335x_scm.c index 1a4fd0ed6325..214a9dfdf18b 100644 --- a/sys/arm/ti/am335x/am335x_scm.c +++ b/sys/arm/ti/am335x/am335x_scm.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include "syscon_if.h" #define TZ_ZEROC 2731 diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c index 223d24019cb8..c2651c33e1b1 100644 --- a/sys/arm/ti/cpsw/if_cpsw.c +++ b/sys/arm/ti/cpsw/if_cpsw.c @@ -72,7 +72,7 @@ #include #include -#include +#include #include "syscon_if.h" #include diff --git a/sys/arm/ti/ti_scm_syscon.c b/sys/arm/ti/ti_scm_syscon.c index af77bc54f150..7286be7b8f2c 100644 --- a/sys/arm/ti/ti_scm_syscon.c +++ b/sys/arm/ti/ti_scm_syscon.c @@ -46,7 +46,7 @@ #include #include "syscon_if.h" -#include +#include #include "clkdev_if.h" #include diff --git a/sys/arm64/rockchip/rk3328_codec.c b/sys/arm64/rockchip/rk3328_codec.c index ff6f2a3da881..91d73ee4ca34 100644 --- a/sys/arm64/rockchip/rk3328_codec.c +++ b/sys/arm64/rockchip/rk3328_codec.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk3399_emmcphy.c b/sys/arm64/rockchip/rk3399_emmcphy.c index 8799dcb06b5d..97b2123e89fd 100644 --- a/sys/arm64/rockchip/rk3399_emmcphy.c +++ b/sys/arm64/rockchip/rk3399_emmcphy.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk3568_combphy.c b/sys/arm64/rockchip/rk3568_combphy.c index 1f9c0003b531..c5d35fa0b8e2 100644 --- a/sys/arm64/rockchip/rk3568_combphy.c +++ b/sys/arm64/rockchip/rk3568_combphy.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pciephy.c b/sys/arm64/rockchip/rk3568_pciephy.c index 83ee77decdb9..fc6156e596ed 100644 --- a/sys/arm64/rockchip/rk3568_pciephy.c +++ b/sys/arm64/rockchip/rk3568_pciephy.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_grf.c b/sys/arm64/rockchip/rk_grf.c index e2ee9a89b832..7e4911c1b048 100644 --- a/sys/arm64/rockchip/rk_grf.c +++ b/sys/arm64/rockchip/rk_grf.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c index 3f7cd71eda27..6d3db56919d7 100644 --- a/sys/arm64/rockchip/rk_i2s.c +++ b/sys/arm64/rockchip/rk_i2s.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_iodomain.c b/sys/arm64/rockchip/rk_iodomain.c index e872ee5a45ed..ed61b99481f2 100644 --- a/sys/arm64/rockchip/rk_iodomain.c +++ b/sys/arm64/rockchip/rk_iodomain.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_otp.c b/sys/arm64/rockchip/rk_otp.c index 1d8191ff1f90..7b8935106534 100644 --- a/sys/arm64/rockchip/rk_otp.c +++ b/sys/arm64/rockchip/rk_otp.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include "rk_otp.h" diff --git a/sys/arm64/rockchip/rk_pcie_phy.c b/sys/arm64/rockchip/rk_pcie_phy.c index 7e9077d33eb8..cfaf26e8fbb3 100644 --- a/sys/arm64/rockchip/rk_pcie_phy.c +++ b/sys/arm64/rockchip/rk_pcie_phy.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_pinctrl.c b/sys/arm64/rockchip/rk_pinctrl.c index 1c873292b852..4892b0bf236c 100644 --- a/sys/arm64/rockchip/rk_pinctrl.c +++ b/sys/arm64/rockchip/rk_pinctrl.c @@ -48,7 +48,7 @@ #include -#include +#include #include "gpio_if.h" #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_pmu.c b/sys/arm64/rockchip/rk_pmu.c index 92a1fbae9413..0e5b9380d66d 100644 --- a/sys/arm64/rockchip/rk_pmu.c +++ b/sys/arm64/rockchip/rk_pmu.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { diff --git a/sys/arm64/rockchip/rk_tsadc.c b/sys/arm64/rockchip/rk_tsadc.c index ff5fd722d0f0..a8a64b69d7d3 100644 --- a/sys/arm64/rockchip/rk_tsadc.c +++ b/sys/arm64/rockchip/rk_tsadc.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_typec_phy.c b/sys/arm64/rockchip/rk_typec_phy.c index df29d514cf37..07b3ed9d93c8 100644 --- a/sys/arm64/rockchip/rk_typec_phy.c +++ b/sys/arm64/rockchip/rk_typec_phy.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_usb2phy.c b/sys/arm64/rockchip/rk_usb2phy.c index ec8a4ba89e37..3f6c0b19f10a 100644 --- a/sys/arm64/rockchip/rk_usb2phy.c +++ b/sys/arm64/rockchip/rk_usb2phy.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include "clkdev_if.h" #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_usbphy.c b/sys/arm64/rockchip/rk_usbphy.c index f91c8167df62..f9acbdff6d79 100644 --- a/sys/arm64/rockchip/rk_usbphy.c +++ b/sys/arm64/rockchip/rk_usbphy.c @@ -40,11 +40,11 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include "phynode_if.h" #include "phynode_usb_if.h" diff --git a/sys/conf/files b/sys/conf/files index f63f844e7942..6a089de5bb98 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1677,10 +1677,6 @@ dev/evdev/evdev_mt.c optional evdev dev/evdev/evdev_utils.c optional evdev dev/evdev/uinput.c optional evdev uinput dev/exca/exca.c optional cbb -dev/extres/syscon/syscon.c optional syscon -dev/extres/syscon/syscon_generic.c optional syscon fdt -dev/extres/syscon/syscon_if.m optional syscon -dev/extres/syscon/syscon_power.c optional syscon syscon_power dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash @@ -3140,6 +3136,10 @@ dev/ste/if_ste.c optional ste pci dev/stge/if_stge.c optional stge dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" +dev/syscon/syscon.c optional syscon +dev/syscon/syscon_generic.c optional syscon fdt +dev/syscon/syscon_if.m optional syscon +dev/syscon/syscon_power.c optional syscon syscon_power dev/syscons/blank/blank_saver.c optional blank_saver dev/syscons/daemon/daemon_saver.c optional daemon_saver dev/syscons/dragon/dragon_saver.c optional dragon_saver diff --git a/sys/dev/clk/rockchip/rk_clk_composite.c b/sys/dev/clk/rockchip/rk_clk_composite.c index 2b6c889913b8..14f3229df5dd 100644 --- a/sys/dev/clk/rockchip/rk_clk_composite.c +++ b/sys/dev/clk/rockchip/rk_clk_composite.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/clk/rockchip/rk_clk_mux.c b/sys/dev/clk/rockchip/rk_clk_mux.c index fba57f794d16..97c1ad6f2f1c 100644 --- a/sys/dev/clk/rockchip/rk_clk_mux.c +++ b/sys/dev/clk/rockchip/rk_clk_mux.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index fca9f879247b..83f2bad167fb 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/eqos/if_eqos_fdt.c b/sys/dev/eqos/if_eqos_fdt.c index 114f83f3bf37..1d2aa53d158c 100644 --- a/sys/dev/eqos/if_eqos_fdt.c +++ b/sys/dev/eqos/if_eqos_fdt.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include diff --git a/sys/dev/fdt/simple_mfd.c b/sys/dev/fdt/simple_mfd.c index 2bed3e552760..3ca7578d234d 100644 --- a/sys/dev/fdt/simple_mfd.c +++ b/sys/dev/fdt/simple_mfd.c @@ -50,7 +50,7 @@ struct simplebus_devinfo *simple_mfd_setup_dinfo(device_t dev, phandle_t node, struct simplebus_devinfo *di); #include "syscon_if.h" -#include +#include MALLOC_DECLARE(M_SYSCON); diff --git a/sys/dev/qcom_dwc3/qcom_dwc3.c b/sys/dev/qcom_dwc3/qcom_dwc3.c index cd58b9ef7705..5fc93b871ad1 100644 --- a/sys/dev/qcom_dwc3/qcom_dwc3.c +++ b/sys/dev/qcom_dwc3/qcom_dwc3.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include static struct ofw_compat_data compat_data[] = { { "qcom,dwc3", 1}, diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index 3914c96b5165..e7dda316539c 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/sdhci/sdhci_fsl_fdt.c b/sys/dev/sdhci/sdhci_fsl_fdt.c index 12ce8c13342c..c04bdefb1382 100644 --- a/sys/dev/sdhci/sdhci_fsl_fdt.c +++ b/sys/dev/sdhci/sdhci_fsl_fdt.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/dev/extres/syscon/syscon.c b/sys/dev/syscon/syscon.c similarity index 100% rename from sys/dev/extres/syscon/syscon.c rename to sys/dev/syscon/syscon.c diff --git a/sys/dev/extres/syscon/syscon.h b/sys/dev/syscon/syscon.h similarity index 100% rename from sys/dev/extres/syscon/syscon.h rename to sys/dev/syscon/syscon.h diff --git a/sys/dev/extres/syscon/syscon_generic.c b/sys/dev/syscon/syscon_generic.c similarity index 100% rename from sys/dev/extres/syscon/syscon_generic.c rename to sys/dev/syscon/syscon_generic.c diff --git a/sys/dev/extres/syscon/syscon_generic.h b/sys/dev/syscon/syscon_generic.h similarity index 100% rename from sys/dev/extres/syscon/syscon_generic.h rename to sys/dev/syscon/syscon_generic.h diff --git a/sys/dev/extres/syscon/syscon_if.m b/sys/dev/syscon/syscon_if.m similarity index 100% rename from sys/dev/extres/syscon/syscon_if.m rename to sys/dev/syscon/syscon_if.m diff --git a/sys/dev/extres/syscon/syscon_power.c b/sys/dev/syscon/syscon_power.c similarity index 100% rename from sys/dev/extres/syscon/syscon_power.c rename to sys/dev/syscon/syscon_power.c diff --git a/sys/dev/usb/controller/dwc3/rk_dwc3.c b/sys/dev/usb/controller/dwc3/rk_dwc3.c index b3345fb4a67b..f53f446a29f3 100644 --- a/sys/dev/usb/controller/dwc3/rk_dwc3.c +++ b/sys/dev/usb/controller/dwc3/rk_dwc3.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include enum rk_dwc3_type { RK3399 = 1, diff --git a/sys/dev/usb/controller/xlnx_dwc3.c b/sys/dev/usb/controller/xlnx_dwc3.c index 9b9d10e81ad8..b0680db97d22 100644 --- a/sys/dev/usb/controller/xlnx_dwc3.c +++ b/sys/dev/usb/controller/xlnx_dwc3.c @@ -50,7 +50,7 @@ #include #include #include -#include +#include static struct ofw_compat_data compat_data[] = { { "xlnx,zynqmp-dwc3", 1 }, diff --git a/sys/riscv/riscv/riscv_syscon.c b/sys/riscv/riscv/riscv_syscon.c index 7442b982f2ab..3dac114edd4f 100644 --- a/sys/riscv/riscv/riscv_syscon.c +++ b/sys/riscv/riscv/riscv_syscon.c @@ -43,8 +43,8 @@ #include #include -#include -#include +#include +#include static struct ofw_compat_data compat_data[] = { {"sifive,test0", 1}, From nobody Wed Jan 10 23:32: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 4T9PH76FsKz56TBC; Wed, 10 Jan 2024 23:32: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 4T9PH75PnNz45h7; Wed, 10 Jan 2024 23:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJJ12TdM7aYOtNBe8a9+DntvY9Fy7GXzBlPMH6akHJo=; b=LDkz0zU9dCrTbpWce4RplJXyyhST+sI/mrRg+6effeDpFh3f7FTmpHGWVJMngPPAeHvoKk Drujaz0Xn0P5WgariO8UfkIlLm4hMIG2VUTE87fNjw8GYfoYHprJsyoX3kOsDPop/tH/YL sxTsoFRxrgn/g/fTyieLcu3Kxh7PYxs4ast1j1C1e/HY7V36TjIQ3k3bTnHTcBTuV1+dZ8 RT0A4tcDGg8zhbGY/olXiPoraV1d8ZMWZEIVrPQ7ZSPZNhf382Qcqo1+i1Sbn785MOqPbH +NX9JhQQUaHcOXQeH3+BWrOxLBZNiH7JJ87vlBDx0eYx3VeX1G8lHiRE2ZYOVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJJ12TdM7aYOtNBe8a9+DntvY9Fy7GXzBlPMH6akHJo=; b=M9g80cwfLG7zH6nsrnjtpM5tG0j369gfhbWfSidl1rbJXhBiwDTBy5Z0Yo/Mj1ikTXX/0k kowlCv1GV3KKtmgt//J5/BZqVXOWnx9D5SvhLN3+qLLfJVJkKPmJ9Hwb9K9E76Dv1ZEUYO CyS+NMoOLcgsT2KqKpVrdZhNLxmu377aqYTpAn2G+i87iGUJ1eoM3g9vJ2SeUdxLWavWRe L647BYzLX3dEsrjqJDcanUgCxBvtFQbEUqvHTiUEcWnaAI7q9Q6oVWUBVJ3BQCKNygZFxj Gbmy7HL9oFRRc1/YmFiZnHqYF5ERxVDgheR5lilMKecHAtl6CHimb82MUNanXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929571; a=rsa-sha256; cv=none; b=Cy3t1lo1kEZy3JdtB6/pPTUgwo2qKKVN1TA5UzDMqOQYjTwPKggVnXJEItzDdWg1VpIZQ9 +N9AGL18xCYCPN1bR8TFg4y0xb4x3eP6WlOOE2C+/xYlcO/fyr2tyG0qItLmq36hXyz9IU 0l0AAMwNmQX2MeI99ChaB0raOP1aQnMPYaNw0ddxb8Slf+y1DahJPw0ufUbw64ZcH/zbC9 vQmByy1WxU5eO3AXr7EPUZDLGtKbjgkPq5BoNh0JbXsmmwOCUSwx8/P9w7s7V2KzQ4+JeH 9y9inVG2/U5sjYM7r31CgXo6mi/ZkM0oLLCdr+gKgp+Tes8Z9r1WyjwqiLZ4SQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9PH74TGRzvv1; Wed, 10 Jan 2024 23:32: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 40ANWpKH097862; Wed, 10 Jan 2024 23:32:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWpYp097859; Wed, 10 Jan 2024 23:32:51 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:51 GMT Message-Id: <202401102332.40ANWpYp097859@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: 93f27766a7e1 - main - dtrace: Add the 'oformat' libdtrace option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93f27766a7e1af009c5b1e4ca538632857c91aa1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=93f27766a7e1af009c5b1e4ca538632857c91aa1 commit 93f27766a7e1af009c5b1e4ca538632857c91aa1 Author: Domagoj Stolfa AuthorDate: 2024-01-03 14:58:01 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:14:26 +0000 dtrace: Add the 'oformat' libdtrace option This option can be used to specify a format to use in DTrace output. The following formats are supported: - json - xml - html - none (default DTrace output) This is implemented using libxo and integrated into libdtrace. Client code only works with the following API: - dtrace_oformat_setup(dtrace_hdl_t *) -- to be called when output is starting. - dtrace_oformat_teardown(dtrace_hdl_t *) -- to be called when output is finished - dtrace_oformat(dtrace_hdl_t *) -- check if oformat is enabled. - dtrace_set_outfp(FILE *) -- sets the output file for oformat. - Ensure that oformat is correctly checked in the drop handler and record processing callbacks. This commit also adds tests which check if the generated output is valid (JSON, XML) and extends the dtrace(1) describing the structured output. Reviewed by: markj Discussed with: phil MFC after: 2 months Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D41745 --- Makefile.inc1 | 3 + cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 | 416 +++++- cddl/contrib/opensolaris/cmd/dtrace/dtrace.c | 72 +- .../dtrace/test/tst/common/oformat/tst.agg.avg.ksh | 66 + .../test/tst/common/oformat/tst.agg.count.ksh | 66 + .../test/tst/common/oformat/tst.agg.llquantize.ksh | 73 + .../test/tst/common/oformat/tst.agg.lquantize.ksh | 73 + .../dtrace/test/tst/common/oformat/tst.agg.max.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.agg.min.ksh | 66 + .../test/tst/common/oformat/tst.agg.quantize.ksh | 73 + .../test/tst/common/oformat/tst.agg.stddev.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.agg.sum.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.aggmod.ksh | 66 + .../test/tst/common/oformat/tst.aggstack.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.aggsym.ksh | 66 + .../test/tst/common/oformat/tst.aggustack.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.aggusym.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.drop.ksh | 61 + .../cmd/dtrace/test/tst/common/oformat/tst.mod.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.print.ksh | 60 + .../dtrace/test/tst/common/oformat/tst.printf.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.printm.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.stack.ksh | 61 + .../cmd/dtrace/test/tst/common/oformat/tst.sym.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.trace.ksh | 66 + .../test/tst/common/oformat/tst.tracemem.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.umod.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.ustack.ksh | 61 + .../dtrace/test/tst/common/oformat/tst.usym.ksh | 57 + .../lib/libdtrace/common/dt_aggregate.c | 17 +- .../opensolaris/lib/libdtrace/common/dt_consume.c | 1540 +++++++++++++++++--- .../opensolaris/lib/libdtrace/common/dt_handle.c | 37 +- .../opensolaris/lib/libdtrace/common/dt_impl.h | 7 + .../opensolaris/lib/libdtrace/common/dt_oformat.h | 34 + .../opensolaris/lib/libdtrace/common/dt_open.c | 3 + .../opensolaris/lib/libdtrace/common/dt_options.c | 14 + .../opensolaris/lib/libdtrace/common/dt_print.c | 266 +++- .../opensolaris/lib/libdtrace/common/dt_printf.h | 6 + .../opensolaris/lib/libdtrace/common/dt_subr.c | 42 + .../opensolaris/lib/libdtrace/common/dtrace.h | 22 + cddl/lib/libdtrace/Makefile | 2 +- cddl/usr.sbin/dtrace/Makefile | 2 +- cddl/usr.sbin/dtrace/tests/common/Makefile | 1 + cddl/usr.sbin/dtrace/tests/common/oformat/Makefile | 42 + cddl/usr.sbin/dtrace/tests/dtrace.test.mk | 2 +- etc/mtree/BSD.tests.dist | 2 + share/mk/src.libnames.mk | 2 +- 47 files changed, 3906 insertions(+), 279 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index e6a6e9d479d3..34b49ee319ec 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3139,6 +3139,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_cddl_lib_libctf} ${_cddl_lib_libzfsbootenv} \ lib/libufs \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ + lib/libxo \ ${_secure_lib_libcrypto} ${_secure_lib_libssl} \ ${_lib_libldns} ${_secure_lib_libssh} @@ -3194,6 +3195,7 @@ _generic_libs+= ${_DIR} .endfor lib/libtacplus__L: lib/libmd__L lib/libpam/libpam__L +lib/libxo__L: lib/libutil__L .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem @@ -3234,6 +3236,7 @@ lib/libbe__L: cddl/lib/libzfs__L cddl/lib/libzfsbootenv__L _cddl_lib_libctf= cddl/lib/libctf _cddl_lib= cddl/lib cddl/lib/libctf__L: lib/libz__L cddl/lib/libspl__L +cddl/lib/libdtrace__L: lib/libxo__L .endif # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db _prebuild_libs+= lib/libprocstat lib/libproc lib/librtld_db diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 index 1745519c2c1a..ab8c672a95a1 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 @@ -18,7 +18,9 @@ .\" CDDL HEADER END .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. .\" -.Dd February 24, 2023 +.\" $FreeBSD$ +.\" +.Dd September 8, 2023 .Dt DTRACE 1 .Os .Sh NAME @@ -27,7 +29,8 @@ .Sh SYNOPSIS .Nm .Op Fl 32 | Fl 64 -.Op Fl aACdeFGhHlqSvVwZ +.Op Fl aACdeFGhHlOqSvVwZ +.Op Fl -libxo .Op Fl b Ar bufsz .Op Fl c Ar cmd .Op Fl D Ar name Op Ns = Ns value @@ -355,6 +358,11 @@ writing D programs. The specified .Ar path is added after the default library search path. +.It Fl -libxo +Generate output via +.Xr libxo 3 . +This option is the same as specifying +.Sy oformat . .It Fl m Oo Ar provider : Oc Ar module Oo Oo Ar predicate Oc Ar action Oc Specify module name to trace or list .Fl ( l @@ -398,6 +406,14 @@ argument can be suffixed with an optional D probe clause. More than one .Fl n option can be specified on the command line at a time. +.It Fl O +This option causes +.Nm +to print all the aggregations upon exiting if +.Sy oformat +or +.Fl -libxo +are specified. .It Fl o Ar output Specify the .Ar output @@ -650,6 +666,32 @@ Number of whitespace characters to use when indenting and .Fn ustack output. +.It Sy oformat Ns = Ns Ar format +Specify the format to use for output. +Setting +.Sy oformat +to +.Ql text +makes +.Nm +use regular human-readable output which is its default behavior. +The options passed to +.Sy oformat +are directly forwarded to +.Xr libxo 3 . +Some of the supported formatters include +.Ql json , +.Ql xml +and +.Ql html . +Note that this option will cause +.Nm +to not produce any output unless printing functions are explicitly called, +or the +.Fl O +flag is specified. +For more information see +.Sx STRUCTURED OUTPUT . .It Sy statusrate Ns = Ns Ar time Rate of status checking. .It Sy switchrate Ns = Ns Ar time @@ -776,6 +818,376 @@ or .Fl i options) contain descriptions that do not match any known probes. .El +.Sh STRUCTURED OUTPUT +.Nm +supports structured output using +.Xr libxo 3 . +The output will always have a top-level object called +.Dq dtrace , +followed by a list of objects +.Dq probes . +Each of the probe objects will to have a timestamp which is generated at +output time rather than probe firing time, an identifier for the CPU on +which the probe was executed, and the probe's full specification: +.Bd -literal +{ + "dtrace": { + "probes": [ + { + "timestamp": ..., + "cpu": ..., + "id": ..., + "provider": ..., + "module": ..., + "function": ..., + "name": ..., + "output": [ + ... (script-specific output) + ] + } + ] + } +} + + + + + ... + ... + ... + ... + ... + ... + ... + + ... (script-specific output) + + + +.Ed +.Pp +It is also possible for XML output to take the following form if some +of the fields are empty (in this example, module and function values +are absent): +.Bd -literal + + + + ... + + + ... + + ... (script-specific output) + + + +.Ed +.Pp +Similarly, +.Sy oformat +can be used to generate HTML: +.Bd -literal +
+
...
+
+
...
+
+
...
+
+
...
+
+
...
+
+
...
+
+
...
+
...
+
+.Ed +.Pp +Unlike JSON and XML, the +.Dq output +array is not present. +Instead, data is simply formatted into a div of class +.Dq data +and a data-tag is associated with each of the keys. +.Pp +The +.Dq output +array's contents depend on the probes' actions and is explained below. +The examples here are presented in JSON form as opposed to XML or HTML, +however the conversion explained above applies for all output formats. +.Pp +Any scalar output, such as output produced by the +.Fn trace +action is of form: +.Bd -literal +{ + "value": ... +} +.Ed +.Pp +The +.Fn printf +action begins with an object containing the formatted output of the +.Fn printf +action. +Subsequent objects contains the value of each of the arguments to +.Fn printf +in its raw form as if the +.Fn trace +action was used instead. +A +.Fn printf +statement which contains no arguments other than the message will only have +one object following the message object and its value will always be 0. +This is an artefact of the implementation and can safely be ignored. +.Bd -literal +# dtrace --libxo json,pretty -n 'BEGIN { printf("... %Y, ..", walltimestamp); }' + +{ + "message": "... 2023 Sep 7 16:49:02, .." +}, +{ + "value": 1694105342633402400 +}, +{ + ... +} +.Ed +.Pp +Scalar aggregations are aggregations which produce a single value for a given +key. +These aggregations include +.Fn count , +.Fn min , +.Fn max , +.Fn stddev +and +.Fn sum . +Each one of them is represented by the key containing their name. +For example, the output of a +.Fn stddev +aggregation will contain a key +.Dq stddev +inside an +.Dq aggregation-data +object: +.Bd -literal +{ + "aggregation-data": [ + { + "keys": [ + ... + ], + "stddev": ... + } + ], + "aggregation-name": ... +} +.Ed +.Pp +The +.Dq keys +field remains consistent across all aggregations, however +.Fn quantize , +.Fn lquantize +and +.Fn llquantize +need to be treated differently. +.Sy oformat +will create a new array of objects called +.Dq buckets . +Each of the objects contains a +.Dq value +and a +.Dq count +field which are +the left-hand side and the right-hand side of human-readable +.Nm +output respectively. +The full object has the following format: +.Bd -literal +{ + "aggregation-data": [ + ... + { + "keys": [ + ... + ], + "buckets": [ + { + "value": 32, + "count": 0 + }, + { + "value": 64, + "count": 17 + }, + ... + ], + }, + ... + ] + "aggregation-name": ... +} +.Ed +.Pp +Similar to scalar aggregations, named scalar actions such as +.Fn mod , +.Fn umod , +.Fn usym , +.Fn tracemem +and +.Fn printm +will output an object with the key being equal to the +name of the action. +For example, +.Fn printm +output would produce the following object: +.Bd -literal +{ + "printm": "0x4054171100" +} +.Ed +.Pp +.Fn sym +is slightly different. +While it will create a +.Dq sym +field which contains its value, in some cases it will also create additional +fields +.Dq object , +.Dq name +and +.Dq offset : +.Bd -literal +# dtrace -x oformat=json,pretty -On 'BEGIN { sym((uintptr_t)&`prison0); }' + +{ + "sym": "kernel`prison0", + "object": "kernel", + "name": "prison0" +} + +# dtrace --libxo json,pretty -On 'BEGIN { sym((uintptr_t)curthread); }' + +{ + "sym": "0xfffffe00c18d2000", + "offset": "0xfffffe00c18d2000" +} +.Ed +.Pp +.Fn stack +and +.Fn ustack +actions unroll each of the stack frames into its own object in an array. +The only real difference between them is that the +.Fn stack +action will produce a list called +.Dq stack-frames +while +.Fn ustack +will produce one called +.Dq ustack-frames . +The following is an example of their +.Sy oformat +output: +.Bd -literal +{ + "stack-frames": [ + { + "symbol": "dtrace.ko`dtrace_dof_create+0x35", + "module": "dtrace.ko", + "name": "dtrace_dof_create", + "offset": "0x35" + }, + { + "symbol": "dtrace.ko`dtrace_ioctl+0x81c", + "module": "dtrace.ko", + "name": "dtrace_ioctl", + "offset": "0x81c" + }, + ... + ] +} + +{ + "ustack-frames": [ + { + "symbol": "libc.so.7`ioctl+0xa", + "module": "libc.so.7", + "name": "ioctl", + "offset": "0xa" + }, + { + "symbol": "libdtrace.so.2`dtrace_go+0xf3", + "module": "libdtrace.so.2", + "name": "dtrace_go", + "offset": "0xf3" + }, + ... + ] +} +.Ed +.Pp +The +.Fn print +action produces a +.Dq type +list in the following form: +.Bd -literal +{ + "type": [ + { + "object-name": "kernel", + "name": "struct thread", + "ctfid": 2372 + }, + { + "member-name": "td_lock", + "name": "struct mtx *volatile", + "ctfid": 2035, + "value": "0xffffffff82158440" + }, + ... +} +.Ed +.Pp +If the type is invalid, a +.Dq warning +object will be produced containing the diagnostic message as well as two +possible optional fields: +.Dq type-identifier +which contains the CTF identifier of the type and +.Dq size containing the size of an integer, enum or float. +The fields generated will depend on the kind of error that was encountered +while processing the trace data. +.Pp +Finally, +.Sy oformat +provides a special pseudo-probe to represent drops. +As +.Nm +polls for various kinds of drops +.Sy oformat +will produce output similar to the following in order to represent drops: +.Bd -literal +{ + "cpu": -1, + "id": -1, + "provider": "dtrace", + "module": "INTERNAL", + "function": "INTERNAL", + "name": "DROP", + "timestamp": ..., + "count": ..., + "total": ..., + "kind": 2, + "msg": "... dynamic variable drops\n" +} +.Ed .Sh OPERANDS You can specify zero or more additional arguments on the .Nm diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c index cdc476a43b08..dc68c6ef5f72 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c @@ -26,6 +26,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2023, Domagoj Stolfa. All rights reserved. */ #include @@ -55,6 +56,9 @@ #include #endif +#undef NORETURN /* needed because libxo redefines it */ +#include + typedef struct dtrace_cmd { void (*dc_func)(struct dtrace_cmd *); /* function to compile arg */ dtrace_probespec_t dc_spec; /* probe specifier context */ @@ -77,7 +81,7 @@ typedef struct dtrace_cmd { #define E_USAGE 2 static const char DTRACE_OPTSTR[] = - "3:6:aAb:Bc:CdD:ef:FGhHi:I:lL:m:n:o:p:P:qs:SU:vVwx:X:Z"; + "3:6:aAb:Bc:CdD:ef:FGhHi:I:lL:m:n:o:Op:P:qs:SU:vVwx:X:Z"; static char **g_argv; static int g_argc; @@ -167,6 +171,7 @@ usage(FILE *fp) "\t-m enable or list probes matching the specified module name\n" "\t-n enable or list probes matching the specified probe name\n" "\t-o set output file\n" + "\t-O print output upon exiting (specific to oformat)\n" "\t-p grab specified process-ID and cache its symbol tables\n" "\t-P enable or list probes matching the specified provider name\n" "\t-q set quiet mode (only output explicitly traced data)\n" @@ -907,7 +912,10 @@ errhandler(const dtrace_errdata_t *data, void *arg) static int drophandler(const dtrace_dropdata_t *data, void *arg) { - error(data->dtdda_msg); + if (!dtrace_oformat(g_dtp)) { + error(data->dtdda_msg); + } + return (DTRACE_HANDLE_OK); } @@ -1126,7 +1134,9 @@ chew(const dtrace_probedata_t *data, void *arg) } if (!g_flowindent) { - if (!g_quiet) { + if (dtrace_oformat(g_dtp)) { + dtrace_oformat_probe(g_dtp, data, cpu, pd); + } else if (!g_quiet) { char name[DTRACE_FUNCNAMELEN + DTRACE_NAMELEN + 2]; (void) snprintf(name, sizeof (name), "%s:%s", @@ -1313,7 +1323,8 @@ main(int argc, char *argv[]) g_ofp = stdout; int done = 0, mode = 0; - int err, i, c; + int err, i, c, new_argc, libxo_specified; + int print_upon_exit = 0; char *p, **v; struct ps_prochandle *P; pid_t pid; @@ -1336,6 +1347,15 @@ main(int argc, char *argv[]) (g_psv = malloc(sizeof (struct ps_prochandle *) * argc)) == NULL) fatal("failed to allocate memory for arguments"); + new_argc = xo_parse_args(argc, argv); + if (new_argc < 0) + return (usage(stderr)); + + if (new_argc != argc) + libxo_specified = 1; + + argc = new_argc; + g_argv[g_argc++] = argv[0]; /* propagate argv[0] to D as $0/$$0 */ argv[0] = g_pname; /* rewrite argv[0] for getopt errors */ @@ -1532,6 +1552,10 @@ main(int argc, char *argv[]) } else if (g_mode == DMODE_ANON) (void) dtrace_setopt(g_dtp, "linkmode", "primary"); + + if (libxo_specified) + dtrace_oformat_configure(g_dtp); + /* * Now that we have libdtrace open, make a second pass through argv[] * to perform any dtrace_setopt() calls and change any compiler flags. @@ -1624,6 +1648,10 @@ main(int argc, char *argv[]) dcp->dc_arg = optarg; break; + case 'O': + print_upon_exit = 1; + break; + case 'q': if (dtrace_setopt(g_dtp, "quiet", 0) != 0) dfatal("failed to set -q"); @@ -1765,6 +1793,11 @@ main(int argc, char *argv[]) (void) dtrace_getopt(g_dtp, "quiet", &opt); g_quiet = opt != DTRACEOPT_UNSET; + if (dtrace_oformat(g_dtp)) { + if (dtrace_setopt(g_dtp, "quiet", 0) != 0) + dfatal("failed to set quiet (caused by oformat)"); + } + /* * Now make a fifth and final pass over the options that have been * turned into programs and saved in g_cmdv[], performing any mode- @@ -1777,6 +1810,9 @@ main(int argc, char *argv[]) if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL) fatal("failed to open output file '%s'", g_ofile); + if (dtrace_oformat(g_dtp)) + dtrace_set_outfp(g_ofp); + for (i = 0; i < g_cmdc; i++) exec_prog(&g_cmdv[i]); @@ -1811,6 +1847,9 @@ main(int argc, char *argv[]) if ((g_ofp = fopen(g_ofile, "a")) == NULL) fatal("failed to open output file '%s'", g_ofile); + if (dtrace_oformat(g_dtp)) + dtrace_set_outfp(g_ofp); + for (i = 0; i < g_cmdc; i++) { anon_prog(&g_cmdv[i], dtrace_dof_create(g_dtp, g_cmdv[i].dc_prog, 0), i); @@ -1971,12 +2010,21 @@ main(int argc, char *argv[]) g_pslive = g_psc; /* count for prochandler() */ + dtrace_oformat_setup(g_dtp); do { if (!g_intr && !done) dtrace_sleep(g_dtp); #ifdef __FreeBSD__ - if (g_siginfo) { + /* + * XXX: Supporting SIGINFO with oformat makes little sense, as + * it can't really produce sensible DTrace output. + * + * If needed, we could support it by having an imaginary + * "SIGINFO" probe that we can construct in the output but leave + * it out for now. + */ + if (g_siginfo && !dtrace_oformat(g_dtp)) { (void)dtrace_aggregate_print(g_dtp, g_ofp, NULL); g_siginfo = 0; } @@ -2013,14 +2061,24 @@ main(int argc, char *argv[]) clearerr(g_ofp); } while (!done); - oprintf("\n"); + if (!dtrace_oformat(g_dtp)) + oprintf("\n"); - if (!g_impatient) { + /* + * Since there is no way to format a probe here and machine-readable + * output makes little sense without explicitly asking for it, we print + * nothing upon Ctrl-C if oformat is specified. If the user wishes to + * get output upon exit, they must write an explicit dtrace:::END probe + * to do so. + */ + if ((!g_impatient && !dtrace_oformat(g_dtp)) || + (!g_impatient && print_upon_exit)) { if (dtrace_aggregate_print(g_dtp, g_ofp, NULL) == -1 && dtrace_errno(g_dtp) != EINTR) dfatal("failed to print aggregations"); } + dtrace_oformat_teardown(g_dtp); dtrace_close(g_dtp); return (g_status); } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.avg.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.avg.ksh new file mode 100644 index 000000000000..daf5c7f4e9bb --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.avg.ksh @@ -0,0 +1,66 @@ +#!/usr/bin/ksh +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2023 Domagoj Stolfa +# + +bname=`basename $0` +dtraceout=/tmp/dtrace.$bname + +script() +{ + $dtrace -o $dtraceout.$1 -x oformat=$1 -s /dev/stdin <<__EOF__ +syscall:::entry +{ + @[probefunc] = avg(tid); +} + +tick-5s +{ + exit(0); +} + +END +{ + printa(@); +} +__EOF__ +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +script json +jq . $dtraceout.json + +if [ $? != 0 ]; then + echo $bname: failed to produce valid JSON. see $dtraceout.json + exit 1 +fi + +script xml +xmllint $dtraceout.xml + +if [ $? != 0 ]; then + echo $bname: failed to produce valid XML. see $dtraceout.xml + exit 1 +fi + +rm $dtraceout.json +rm $dtraceout.xml + +exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.count.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.count.ksh new file mode 100644 index 000000000000..ab7c5fa28471 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.count.ksh @@ -0,0 +1,66 @@ +#!/usr/bin/ksh +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2023 Domagoj Stolfa +# + +bname=`basename $0` +dtraceout=/tmp/dtrace.$bname + +script() +{ + $dtrace -o $dtraceout.$1 -x oformat=$1 -s /dev/stdin <<__EOF__ +syscall:::entry +{ + @[execname] = count(); +} + +tick-5s +{ + exit(0); +} + +END +{ + printa(@); +} +__EOF__ +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +script json +jq . $dtraceout.json + +if [ $? != 0 ]; then + echo $bname: failed to produce valid JSON. see $dtraceout.json + exit 1 +fi + +script xml +xmllint $dtraceout.xml + +if [ $? != 0 ]; then + echo $bname: failed to produce valid XML. see $dtraceout.xml + exit 1 +fi + +rm $dtraceout.json +rm $dtraceout.xml + +exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.llquantize.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.llquantize.ksh new file mode 100644 index 000000000000..380335de000a --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.llquantize.ksh @@ -0,0 +1,73 @@ +#!/usr/bin/ksh +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2023 Domagoj Stolfa +# + +bname=`basename $0` +dtraceout=/tmp/dtrace.$bname + +script() +{ + $dtrace -o $dtraceout.$1 -x oformat=$1 -s /dev/stdin <<__EOF__ +syscall:::entry +{ + self->ts = timestamp; +} + +syscall:::return +/self->ts/ +{ + @[probefunc] = llquantize(timestamp - self->ts, 2, 1, 32, 32); + self->ts = 0; +} + +tick-5s +{ + exit(0); +} + +END +{ + printa(@); +} +__EOF__ +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +script json +jq . $dtraceout.json + +if [ $? != 0 ]; then + echo $bname: failed to produce valid JSON. see $dtraceout.json + exit 1 +fi + +script xml +xmllint $dtraceout.xml + +if [ $? != 0 ]; then + echo $bname: failed to produce valid XML. see $dtraceout.xml + exit 1 *** 4641 LINES SKIPPED *** From nobody Wed Jan 10 23:32: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 4T9PH86zVjz56T3q; Wed, 10 Jan 2024 23:32: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 4T9PH86Cybz45cc; Wed, 10 Jan 2024 23:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9EjUNtuPh00qLm7SFJND/ySStBTdf+Sk2jGn6DClUg=; b=a0+FttQMmiU3vecIHDU0qd2gCGx+Bgz4UitrWI+4e1Tp9yPXjN9TGWElfARMwXdQ9mS4ln HL/8FfPUYMRx6CRAI+/YSIl1+E5p+AXXWX7QXRIoNqShqOLixaFcnX8yILJWv2Al5aB61p 6MFKF54u8iDSXwMfqQfXzZ8dr3ogcFlc1sSMJYvOBrrn6ikuHP6kf/G4JGjNTFPLcD2xDw x4Y12PKYnP6CUT+Hk94/eGHkEyuOeBji/QTJzldInbSwkjMDrH0YNpWLs1+vWfEj0CxK/r khnMaWWLQ3F+WjDhJjo1le9jNOm+89tzwoTjS0fI15wvXMhHz6bXY330fs074Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9EjUNtuPh00qLm7SFJND/ySStBTdf+Sk2jGn6DClUg=; b=U4LpBqZrJt8kgurIs8kqSGOLgIhhs8xbMz14IyWSrrimYqIneYzJ5OpWXrsY1M+nV60Mq2 rORlkJhRsIWN6R1XLWJQoUz5xKhZjFRUSqrj4nz4Izh2zvtzBNF/LxQ2DwU7VWWeFU+f4U 8Ah2HpyeiO1wA9GNpViq5cA54E6bPEGOQYB1bMml54PgNJqOQEARhRxJFvBfSmqXkIlvW+ xKnGnnD4/TnR4QUvOkF4HQ0MBDNbEwjXWxq0x4fyZOxmk2PqbmQy0TcDdVbSXbIlkqJacr 6E1+H4K3Zm1HtdX4E5y++DMyVsS/k6LPirIYqswVZppMok2+DXU6gZr/hHZtdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929572; a=rsa-sha256; cv=none; b=D0y5a9TKN+1eKP2HhsoF40Z/WHfRwp3kpkXKaeRyymqrrLW2M0TA9+DreysKMigMZ12z1x veTrjjqmykoTLIXj+69sz1P14lIeXTbvypjVqvDIVDSAFCmaF7qo/ADOvfmXaVVUEDYffL UAEJmYdkmQ8SxoGnYMthNFUevXkOQszFt34qf/GInYtzs3Vo5i+LXavZDxzEuY6yy1wsn/ FEhZ2IpDMNyVUOrThivjn2LuITBJaccAOxcFtMsf1/L82XjFSFTcQxDqYSKh4umuTlkqud yI8xnd0fIOzMg7ac0yt6S0GEg2PYAK6dx/NJ17VSdeI/sp87zS2y52ALTGI3iA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9PH85GGbzvv2; Wed, 10 Jan 2024 23:32: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 40ANWqF7097913; Wed, 10 Jan 2024 23:32:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWqUI097910; Wed, 10 Jan 2024 23:32:52 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:52 GMT Message-Id: <202401102332.40ANWqUI097910@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: e25922b34ed2 - main - dtrace tests: Run ksh with -p List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e25922b34ed2b7b4bf0ae4de2f7ec82b04153384 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e25922b34ed2b7b4bf0ae4de2f7ec82b04153384 commit e25922b34ed2b7b4bf0ae4de2f7ec82b04153384 Author: Mark Johnston AuthorDate: 2024-01-09 15:39:39 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:17:59 +0000 dtrace tests: Run ksh with -p In particular, avoid loading the user's .profile file, since that can have undesirable side effects. Most tests were already careful to do this. MFC after: 1 week --- .../cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe | 2 +- .../opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe | 2 +- .../opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe | 2 +- .../cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe | 2 +- cddl/usr.sbin/dtrace/tests/tools/dtest.sh | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe index ddd0f60f63ce..b9365eaafe3d 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe index 6369bc561412..9b9e2659786d 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe index 5acce76efc6c..d15d0668cfc1 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh index e87562d2fe45..83f7a6c875da 100755 --- a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh +++ b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh @@ -70,7 +70,7 @@ runtest() err.*.ksh|tst.*.ksh) expr "$TFILE" : 'err.*' >/dev/null && exstatus=1 - tst=$TFILE ksh "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR + tst=$TFILE ksh -p "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR status=$? if [ $status -ne $exstatus ]; then @@ -86,7 +86,7 @@ runtest() if [ $retval -eq 0 ] && \ head -n 1 $STDOUT | grep -q -E '^#!/.*ksh$'; then - ksh $STDOUT + ksh -p $STDOUT retval=$? fi From nobody Wed Jan 10 23:32: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 4T9PHB2g6tz56TJB; Wed, 10 Jan 2024 23:32: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 4T9PHB05mRz464f; Wed, 10 Jan 2024 23:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9FJXD5aVyoutyHlWoOJ8UY8IJJXc+FP5809lrFONirM=; b=WMCY92GZ1RgV8So8yKGGmWOJVUtW7TDRwUj3CV9/YAnqKo32eFaJiOTQT1lxRTKp32Wxu8 3+rqTOsuSdI0YPEt5RLl5r0KO0Qo9g+p52CjmY1OS34iByO32GcXszPMpihJLc7qD+h4Ae qgeuS8MLCh5TAqCICLw6S22tIVkWhGgBpE3zB6/52Q93CZnmpMg+De8ztcyzcC6zzJ8Aqi qcx0t52NzLSkAlFt3nxi1PNgMEbTvZNwhid+KWTj1L2Gi78IBhGYg/flc+vg1xYGq8TfTX A8zd31ihkVyCSdbNckpLtVZA0l6hJJ2hD2gCont+0DbfNKbthGsMiG+ka0b6RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9FJXD5aVyoutyHlWoOJ8UY8IJJXc+FP5809lrFONirM=; b=X/1g2ajpxC55oULks5PuICrfokX1agq34ejwZPtMB6W/p7Oeo7y/Y4IuR12F5SByfvSo5B g9N0E+4xLWg4Rh84OlagptSyjRbYQ5TM30tv5ghFe2daKT3U11a6Z23jwrcfRsQ7IQd1+P meAN10U4DBIuyrXZgPu/i/hmXOYSrBkWEIcuhxU8OSeI2nHl3cMz6ksK2Q7pGHvH5If3wH DdGiI68V6UWGJt0gdyAhAOJ6DbzvUdEEv9JHLvMi+JROvUJe9dAqw5FfP3/e2KBbAR/WOt CEf/N8OBiuYIWTmu4RnO61mTxlTRSVJyb74ANWMpIisBtzsoxzlYfLyhClnrQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929574; a=rsa-sha256; cv=none; b=krRwi53sAFftCo9EmbCr1nwUw5n9/AcxCS89OoHv46gAPavISa1StiuZDFHaNL1xy9uTey 5Q3jgGFxUd3+RLG/TxhJKk59jCMqQ64V8CsBEV0AkfUdi11JsU7bm5ExcfUV8d/Pvn6ceY upGhPiFyxGF+Uw001T7MFdvuqbvO+KdOuKLA4FxbsiAF22OClvEFBO3CnImG4eC1IcDxj7 BuHXhfK0cXqCRUmlFQZ516X6JKWYF2+Tt6kLFi6kP8TiQ0XCv+xCsGtludVx7cbNktZgFu GSmqQW5OX28JjD0pCyvlBudfJzeC5A+4jz045BuHKTB4tqiS4WXRKy/HxHwjMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9PH96K5Qzvff; Wed, 10 Jan 2024 23:32: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 40ANWrfV097969; Wed, 10 Jan 2024 23:32:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWrpV097966; Wed, 10 Jan 2024 23:32:53 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:53 GMT Message-Id: <202401102332.40ANWrpV097966@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: 9f5dd61e1400 - main - dtrace tests: Stop hard-coding an incorrect path to sleep(1) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f5dd61e14004d546ba3d3c9052f85bb325b58b4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9f5dd61e14004d546ba3d3c9052f85bb325b58b4 commit 9f5dd61e14004d546ba3d3c9052f85bb325b58b4 Author: Mark Johnston AuthorDate: 2024-01-10 20:19:22 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:18:01 +0000 dtrace tests: Stop hard-coding an incorrect path to sleep(1) MFC after: 1 week --- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh | 2 +- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh | 2 +- .../opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh | 2 +- .../opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh index b1cac20fc8db..6def4da1062b 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh @@ -59,7 +59,7 @@ pinger() { while true; do ping -A inet localhost - /usr/bin/sleep 1 + sleep 1 done } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh index a492124c9c17..10a83cbd06fd 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh @@ -54,7 +54,7 @@ rupper() { while true; do rup localhost - /usr/bin/sleep 1 + sleep 1 done } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh index 429173806f35..76996bfcb413 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh @@ -68,7 +68,7 @@ EOF sleeper() { while true; do - /usr/bin/sleep 1 + sleep 1 done } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh index 5b14fc989138..c74a278c1347 100755 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh @@ -45,7 +45,7 @@ outf=/tmp/sched.args.$$ script() { - $dtrace -c '/usr/bin/sleep 10' -o $outf -qs /dev/stdin < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 66bfb4b2ee49 - main - dtrace tests: Require perl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66bfb4b2ee49e435152316434ae322d8f3f19d3d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66bfb4b2ee49e435152316434ae322d8f3f19d3d commit 66bfb4b2ee49e435152316434ae322d8f3f19d3d Author: Mark Johnston AuthorDate: 2024-01-10 20:22:14 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:18:27 +0000 dtrace tests: Require perl A number of tests use it, so just require it globally as we do with other tools. MFC after: 1 week --- cddl/usr.sbin/dtrace/tests/dtrace.test.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk index d37329b928f0..001dc6253f82 100644 --- a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk +++ b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk @@ -12,7 +12,7 @@ ${TESTGROUP}EXEPACKAGE= ${PACKAGE} TESTWRAPPER= t_dtrace_contrib ATF_TESTS_SH+= ${TESTWRAPPER} -TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh /usr/local/bin/jq /usr/local/bin/xmllint" +TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh /usr/local/bin/jq /usr/local/bin/perl /usr/local/bin/xmllint" TEST_METADATA.t_dtrace_contrib+= required_user="root" GENTEST?= ${.CURDIR:H:H}/tools/gentest.sh From nobody Wed Jan 10 23:32: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 4T9PHD66PRz56THN; Wed, 10 Jan 2024 23:32: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 4T9PHD2PzVz45nx; Wed, 10 Jan 2024 23:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4LqT4BpWsTd5XFXi5WBKHYj/btbFn6JVFbJOID+/rD8=; b=IVHvM3m3ZlLcp6sDdNFxwVQN9Tkqf+JJ4iUh+O+pqXYUnowX4yGSkwVjJFD8yHAcCG3spT pXmvOGydN1WTpnlA2vEL3zbFvGM55lnZkPxstNRVnpfXn2MgYrA2N6uhqGm5uIY740TEAZ sArg9nGON3wC6HOMNimOXkPY/l6/ADL4lcEhtLcyP+YYpfYqzGDSNZRv/pjTPocRMuEgP9 esAP7scpbYvsKtjOFJui60J4TN8ZbfrWsj0qknLucXSi00+GABTRFMTqWbIenaOvU3gAeF gNBSluoA8nBRadKGJKapko1K5tW1ByWU8uAuTtgfygBE5vxPdXVxcv7wgFGBMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4LqT4BpWsTd5XFXi5WBKHYj/btbFn6JVFbJOID+/rD8=; b=vSRH0W2OLhDcKXStRDVwvD3q7XOziwjXWTGWHKaKdArF5o5nyBga8/qxko6dlooAJ7jRmX lgGpWHw9YkgYAH0KBQck1CXch6dr/6OQi7mooz8yrADZSXpW1kPS4xSZWCyYJu70cAOuf3 eyWS4I6V1JS3IWj9NGBy7JJDtUl9HSKsFVGYfRAzO2EkJdXTG/IEGs+MSzk5DTt+6IM5TK C9YLvRybbap62NScUWPLljuierFmUI589g7PhEHQUfBLCRXDF/uByscbNKUBGh6hKJog1b T3XsdFBUh8/j9cbhwhqCmtVFOUPGVb0WAvxnY8W9RcFvurIhF9jF8otP5TGurg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929576; a=rsa-sha256; cv=none; b=tpQhDjsiHhlPs3YsOoCJoYe2ScyOqiIyZJ4CrD6T+ZFg/dX4om5la2p52viH+lL6bS5mic UueIETG1cyGasVfrqmtAv0lyRrD+iVsX/V62mWmGFUadiCfEujofWPp2PDNHmD7x4BV34q 4DU3CYgsGbp3liLVteIypRje0A3ZShOH6b3e8kvmlcFRUBA04XL5MLvIlAaMOece/CyEWj 5PvAGF+2uxOyMa8dtQs47MxvKEfxldjOEixIAuVqZ6bi5nYLTUcyVYdXVIMbmt3wgq4nYP Ski5CG3t0B8sieS7376RHWXSCUCSTi0Q5aG5/uDqx853dOT0qmua2NdhHEZMxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9PHD1F78zvM6; Wed, 10 Jan 2024 23:32: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 40ANWusg098068; Wed, 10 Jan 2024 23:32:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWubw098065; Wed, 10 Jan 2024 23:32:56 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:56 GMT Message-Id: <202401102332.40ANWubw098065@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: ba10366037c5 - main - dtrace tests: Catch up with ping(8) output changes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba10366037c5ea7f2fcb9e3654491316dae3f049 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ba10366037c5ea7f2fcb9e3654491316dae3f049 commit ba10366037c5ea7f2fcb9e3654491316dae3f049 Author: Mark Johnston AuthorDate: 2024-01-10 21:38:00 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:19:00 +0000 dtrace tests: Catch up with ping(8) output changes MFC after: 1 week --- .../opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out index 2e94ff35de88..7f7368f13900 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out @@ -1,6 +1,6 @@ -PING6(56=40+8+8 bytes) ::1 --> ::1 +PING(56=40+8+8 bytes) ::1 --> ::1 1 packets transmitted, 1 packets received, 0.0% packet loss 2 ip:::send (args[2]: 6 16, args[5]: 6 0 16) 2 ip:::send (args[2]: 6 16, args[5]: 6 0 16) From nobody Wed Jan 10 23:32: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 4T9PHG0Wkjz56T44; Wed, 10 Jan 2024 23:32: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 4T9PHF3Ll2z45tG; Wed, 10 Jan 2024 23:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RmZ+BikW8IZpw4jwlJFqxHP7OFB45ah08i0ZymzMKos=; b=UU7vceGTIqqXSFs2T3AY4HQbJxUKAIEpIFLdsK+1W/str+NcIAlD1clOe+g87zhv+iKFbS 4n3bmxKgWaCPp7na+Tyro+bUJemyvRSFkDzxxHfe7sdxCL4HLxntp+QsvgHx++NgreNALA TpFwSIw0xLuPM9NJ3RNQUeiH9URbkAQySapeR//Xxlg4RwkQh4igLNe4tgtE/O2SK3n8hJ 2mT2S6bOLxE2TkUttX12Q0EZM5ETPONE/dsuttbfbfFfKIpBVN6oviyH8xzlXnyye45jeA 005EtklIpEpi5h6Ks9ymBVSifqCEJV++Z5RJsK2f2jQ5aOUKq89PS24DXlkCKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RmZ+BikW8IZpw4jwlJFqxHP7OFB45ah08i0ZymzMKos=; b=wX2mi2nhSxp+YP7TCCQePK4NzdWcHkx7IZkSNU8oCIn4qIGyCND/fEx71BDy/NnuRZ30Sg kTw44mLHrcfOFN9eVWRnwQ36QC2XN0q8hCK8txIVsci0lx5e2Px3PYi6aPKr3hc6WHx9wi kl1b1S3oFEpPIc1KzAKU1iELK8AXu634oVEO+engE8NdqRCqwW+z5l3EV8ZtPLL0VLU3nk 9XsCCCOsIftWJNZoMVwYsQ4yLhLWsrI+WoC56SZ7EwEk4WHWOPc0gB/TSaxpHOLMB3uzRA NOrrmSfEsONupf+c54ZXsrq8fkoEUuSZKIX4nJ+juD+cxb5Zj0Sm/ZmZ/CQM3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929577; a=rsa-sha256; cv=none; b=me6raJPi53bdd+RudT6pc8VnP+7/ju27bk+CwnK5gO4Tz0U4dSAcGmCtUZTRYJ3q4nBfVN AXpo4cXMgrS1Mstp4LCKJ8+EvQx1droxAB/QnF0wICZ+WR4xl74o5Y0pBHjX0A+EzydzTc jyaxQ3/x8W/3C7tK235RieEsj6R4fomhilaUaTl2wsNxGH8j6d9C/5KqNGyzbORYTPze5O GhbBa7f2j3rF7d4lnKvfsN77XxZDN69tvZ8ix5Sv/LTJT8c17qUUMXyZdm1mACxQlmT2oQ JsP2WXHSBxRVMaMhp/1+Pk8VVyNMZUkJ1BVJKEyXoVD4avL7dmklKRZKZAlFmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9PHF2GJKzvv3; Wed, 10 Jan 2024 23:32: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 40ANWvFp098136; Wed, 10 Jan 2024 23:32:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWvcu098133; Wed, 10 Jan 2024 23:32:57 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:57 GMT Message-Id: <202401102332.40ANWvcu098133@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: a61d2c7fbd3c - main - dtrace tests: Diff expected and actual output upon a miscompare List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a61d2c7fbd3c87126db93dfe83b9f96fea3156f8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a61d2c7fbd3c87126db93dfe83b9f96fea3156f8 commit a61d2c7fbd3c87126db93dfe83b9f96fea3156f8 Author: Mark Johnston AuthorDate: 2024-01-10 21:38:30 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:19:36 +0000 dtrace tests: Diff expected and actual output upon a miscompare This makes quick diagnosis of test failures easier. MFC after: 1 week --- cddl/usr.sbin/dtrace/tests/tools/dtest.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh index 83f7a6c875da..d2f3dc4ed8df 100755 --- a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh +++ b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh @@ -119,6 +119,10 @@ test stdout: -- $(cat $STDOUT) -- +test stdout diff: +-- +$(diff -u $EXOUT $STDOUT) +-- __EOF__ fi if [ $(stat -f '%z' $STDERR) -gt 0 ]; then From nobody Thu Jan 11 00:06: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 4T9Q1z3Ngqz56XW0; Thu, 11 Jan 2024 00:06: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 4T9Q1z2W9wz4Fhm; Thu, 11 Jan 2024 00:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704931591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xM01cijgw1g7Mcq7hB7uHn+nsDjNsTdYj4Kst5x9QrE=; b=of58EB6eCwOeYLtBNp7UN7iEVmCYchEOth5tDLD70vlgzaLIA9SEjayyR1EOJ1vAwcE2dZ ZoahYrbBxion4cl3RolQ8kDK7QlwOpiSL4aMtJrU+tWNh38lh3LnONGbdCVZju4eONOlyd SL64JNPgJzi6A0EwLzvSygDUGK1NGz8mftRJ8+JxS1KM4M0H9JOf+RVtD3Pzl2GoQk6q6J pLputHBAl1kTP8E4o08rpPhzcDvHRavENPa2CbAOFXrsciZ6BnaFNJ691m0h0WjqlckWp4 /pXmO5Gw4Gu7ZLxiekSNoxtieKIJbbQaHI4gTdWjCXfJIZCFbYjP3Rg+OQZZiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704931591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xM01cijgw1g7Mcq7hB7uHn+nsDjNsTdYj4Kst5x9QrE=; b=UJRAxEM0DT3nnuQSGRALyEA39Mb3/61pCSPECkTQkZwflJI1eTZlxDBue7JC3kDHQscRN6 0+RW4MIJ4d+hJc2ZX9ezHuES0K1iT5l+guoqjfqjeYRTVjPDvfV5WMx67cl5cFFlxJFFnq CMXnEp7klPMQ3QrysLYbpTMVYhVwUuk2H2sS5hRgw6kZEPcuaLijtSKvI4knO6Fhgo+JTs bKANIFDCb+7MXcJyDWfu9EPe8HFe9FSLhmXPGDdWdEzUDIZLjhxic7236Am8M7iGJzluoO e3cNaWvnHNjEQ1lS33dHx/7iO7Jrr08xMwn6nkJqMpbj8vy6ljCwsyIItsO8qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704931591; a=rsa-sha256; cv=none; b=rHTpFZ1x2HvNSgb2mCuvBX1gRRItWT+1E2Suk8Xe760Xjkc6zr46uVNAnXTzyaxqWrWhWW 8N1N+VTTONaWJZ6YylEV2WLs1Kmii+wQMLXPcQTaqqvVXkZgbbvElDb122SXU39LhfOjLq FDjPoV+CHopea3HoINOEmPN7m6NyGVqFh8QyqnHK3G5hpP+TQ3Vtf/B+dIv8yfP2wJ2s32 tezmgyMWEtF8eMfGJMUG3OVZTM6KApK1ALakBrAzPmcY1A6OW3xZjXOlfQ8+Q09rdv0xIk GwHz+TfATBmy7R4t+OmQTj0iHZ1gIgepVQhO0CFMYeYAWP4YVWpxh9vusy4AoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9Q1z1YMLzwxH; Thu, 11 Jan 2024 00:06: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 40B06VOU052075; Thu, 11 Jan 2024 00:06:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B06VAx052072; Thu, 11 Jan 2024 00:06:31 GMT (envelope-from git) Date: Thu, 11 Jan 2024 00:06:31 GMT Message-Id: <202401110006.40B06VAx052072@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: 8a3fafc82114 - main - acpi/apm: Improve APM ioctl interface emulation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a3fafc821149e800747cd92afee092fd131c402 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a3fafc821149e800747cd92afee092fd131c402 commit 8a3fafc821149e800747cd92afee092fd131c402 Author: Warner Losh AuthorDate: 2024-01-03 23:18:23 +0000 Commit: Warner Losh CommitDate: 2024-01-11 00:05:00 +0000 acpi/apm: Improve APM ioctl interface emulation The apm(8) program documents certain states, but doesn't document the 'unknown' state. It reports things correctly for systems with a battery, but incorrectly for systems without one. Emulate the old interface a little better by saying ac power is online if we have no status (instead of unknown), the battery has a high charge of 255% if there's no battery (instead of -1). Programs, like emacs, expect to see only the documented values and misbehave when they see something else. This is closer to what would happen on old-school APM machines. Sadly (or not) I have no access to old-school APM machines to 100% confirm this, but reading the spec, old code and testing with emacs' mode line with battery suggests these values are more correct. emacs has never been converted to acpi_conf due to permissions issues with acpi devices. Fixing the kernel is preferable to hacking apm(8) for these special cases because other programs that use these interfaces will also be more correct. The kernel also has more data with which to decide what to return. Sponsored by: Netflix MFC After: 1 week --- sys/x86/acpica/acpi_apm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index ffefcdf733c2..fcc1663b9a84 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -141,18 +141,18 @@ acpi_capm_get_info(apm_info_t aip) aip->ai_capabilities= 0xff00; /* unknown */ if (acpi_acad_get_acline(&acline)) - aip->ai_acline = APM_UNKNOWN; /* unknown */ + aip->ai_acline = 1; /* no info -- on-line best guess */ else aip->ai_acline = acline; /* on/off */ if (acpi_battery_get_battinfo(NULL, &batt) != 0) { - aip->ai_batt_stat = APM_UNKNOWN; - aip->ai_batt_life = APM_UNKNOWN; - aip->ai_batt_time = -1; /* unknown */ - aip->ai_batteries = ~0U; /* unknown */ + aip->ai_batt_stat = 0; /* "high" old I/F has no unknown state */ + aip->ai_batt_life = 255; /* N/A, not -1 */ + aip->ai_batt_time = -1; /* unknown */ + aip->ai_batteries = ~0U; /* unknown */ } else { aip->ai_batt_stat = acpi_capm_convert_battstate(&batt); - aip->ai_batt_life = batt.cap; + aip->ai_batt_life = (batt.cap == -1) ? 255 : batt.cap; aip->ai_batt_time = (batt.min == -1) ? -1 : batt.min * 60; aip->ai_batteries = acpi_battery_get_units(); } @@ -186,11 +186,11 @@ acpi_capm_get_pwstatus(apm_pwstatus_t app) app->ap_batt_stat = acpi_capm_convert_battstate(&batt); app->ap_batt_flag = acpi_capm_convert_battflags(&batt); - app->ap_batt_life = batt.cap; + app->ap_batt_life = (batt.cap == -1) ? 255 : batt.cap; app->ap_batt_time = (batt.min == -1) ? -1 : batt.min * 60; if (acpi_acad_get_acline(&acline)) - app->ap_acline = APM_UNKNOWN; + app->ap_acline = 1; /* no info -- on-line best guess */ else app->ap_acline = acline; /* on/off */ From nobody Thu Jan 11 04:52: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 4T9XMY2n8dz56Pg4; Thu, 11 Jan 2024 04:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9XMY24ysz40X3; Thu, 11 Jan 2024 04:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYDqz5WxzK2EDUKVZzou94ut5S+Q70c5uPGcg6l5Yb8=; b=qCV9Jzf6hpMAps83nvmrrWNgg9CpKUz7k6xlFvxvMNLBJa3nLIOiFxMmCaT6Kq4hwbIYzW LFPknpwS21DbITCfrquPUiD+YJSJ2LpPCsnkG2fubT124KuuhsOhFKDCwTgrGOrebr4i8P lFYVSpyWjwb2+fySGpK7WxhHX3Zesy11GunuPVg21My5SYDaEOMd/lGSgVLyQpjew3GFsv KAu8p0EIzi2m2OkuPrvwV4lv2nn0OtwAz2YmIu9ujLFB5bpARjvPRmx6MKRFHs720+5pz8 XSLOunuLrwtzlgHAphvpZDTgyzvf9yO2hUTpQa+FwLmOXH0KarOdDcCf/IRdDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYDqz5WxzK2EDUKVZzou94ut5S+Q70c5uPGcg6l5Yb8=; b=Kr4tTQmqpm6YRJ4Iwgti2WjAleYIt56ITo48hU0BA5Ci3EfhCkMjxOZSRoL2BkaN94cu43 w3CZmJQ1t5ItC+uBfvDwKLpNJCYEQOwlA0jlOOs4BgYwi/PzOuvN5jwCMyd0VdRchjKSE9 oPtqN7IaHs7x0y2iiZ6Xdcz3ZOCoYquKoVIuycbWeBk45e4vocbGUJTGRQjBalm+cKa82t i/+SvwqNoVBUqF7XA9rFTl+dxDZP6IbTdvG/AW+mtp19NNF90XvJnsMLoRbHE8YRLfmtG1 bU3Ffr5vcWwgmzOVl1leZH6TRFsKJj2BHFH5pWjnBYQPQNLe1+99EcAZcmh8Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948729; a=rsa-sha256; cv=none; b=grf8BJCzxoSg/oMYK2E9c44VyGIgjQXrznOYiiI6uGuKSdSlAVqG19w/1lyhvdWMjyf3rS ab8LpLBGOQOLvxDiMHHFEUGwzwmDUYYyXrFnvD/mpoxjYnXjD1JupHuCnLZnvCSzvF1+bs SjJfwEgqePZZlT5PxYDNycSrghtcQZtivMFXxsZ25jsKqRzGgAs+OBQCVDF6+KLraFDWGS MtTw780gIJOq5jpmL8vyinpXj6Nvi4WCHMh2J611XUrghWCGunrccLchrYpShLu+W7YDl5 fRnY9wb4HJl9MzJJ5khv7viblBn3aw/0Mel6i+UizfiaZLtANbL+Cm/UFF5hrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9XMY18Fjz150s; Thu, 11 Jan 2024 04:52: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 40B4q9Da041416; Thu, 11 Jan 2024 04:52:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4q9tn041413; Thu, 11 Jan 2024 04:52:09 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:09 GMT Message-Id: <202401110452.40B4q9tn041413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 6ee181b9d5f0 - main - tests/net: enable if_clone_test:epair_ipv6_up_stress List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ee181b9d5f00cfe337419370ba4590d939cce84 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6ee181b9d5f00cfe337419370ba4590d939cce84 commit 6ee181b9d5f00cfe337419370ba4590d939cce84 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 tests/net: enable if_clone_test:epair_ipv6_up_stress The panic mentioned was fixed in f5a365e51feea75d1e5ebc86c53808d8cae7b6d7. PR: 225438 --- tests/sys/net/if_clone_test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/sys/net/if_clone_test.sh b/tests/sys/net/if_clone_test.sh index de7384d9053c..864ff86a7d44 100755 --- a/tests/sys/net/if_clone_test.sh +++ b/tests/sys/net/if_clone_test.sh @@ -284,7 +284,6 @@ tap_ipv6_up_stress_head() } tap_ipv6_up_stress_body() { - atf_skip "Quickly panics: if_delmulti_locked: inconsistent ifp 0xfffff80150e44000" do_up_stress "tap" "6" "" } tap_ipv6_up_stress_cleanup() From nobody Thu Jan 11 04:52: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 4T9XMZ55NDz56PRX; Thu, 11 Jan 2024 04:52:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9XMZ2mJ5z40Qg; Thu, 11 Jan 2024 04:52:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e8x4dxX/+gEgBJOWNsmEn9vueeWtiO0JQW99L/Vj1ik=; b=TPcn/qOoaQMz/XbV8ZYF1HqNTz9bVu5PKmnzaBCJnAERJfK6590RadxM/a/mhgnEnw7cnj jfRoQOqh37J28x4fBbN0J/vB0A8DEA00omPmIoHihOaxNjjRuRlJ9md5xYvklV+ZboMLJR Hed4+hy87GGFOsqvz8lZohQ8FZrVc5OVjTTP7na3BFRjFDkWsUq+0B92sXvgyTTLcChCeT LPWybfcCVNOYPoVl8dll2TyT1/b+TRvksGsb3WT7Vh+maj0tYl/tFfJrNHHe6QSdYezJEq o1pKt5gDK99gRWwolLBMUn7ExJEn/4jf34RHl1fJiucIO21OPgjlh41h1DwFbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e8x4dxX/+gEgBJOWNsmEn9vueeWtiO0JQW99L/Vj1ik=; b=eB6GOZ7KPqChU6GSZxCVVFGvYm4RTwtt2JPMlv5v3ACPAgcefZP56WczumXMaC5UXpKZ6D 75JUBi+Wt/8xAWhdyl3OJYaXE/euDxBz944mJqAdupeiHrBuK2NnOpySRAorZzjhyYHCaK NofEIessfNb4LxXhv39XnaZ0rzop28C9AFgAEEDnAcTftAJwN3b0VxXUw/E9k/sG4VWkuo apPrj3g+WAx6GJQkNngBE0Z8R0R3AvaeAD4CNq8Pcpi15X91cjrfAZ08z6GjBo7yluXcKt 3FYtxL2ZGhD/H+KMdxxFARmVWx/TgClJxS0IAPVYvrI6ReIchkkj9Um387qiDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948730; a=rsa-sha256; cv=none; b=UsNSQSiTqlos2dT+2HKuhT6RTkN9GZixRzeqpXZ7G2AyVbOoMMtuW6gB87vHqwbWyaso7U nB2lP9mZ92p2yr2IX4EQsWq6q/IDHcasAUEuKJgwIOWVBjGJl0fV291OZj/dfq+91FA+nf JXhslCtfxmD4hcE6FwFwVaoJFzOfHVD/jScvBlfXLTnVMaw/W6Oa6mUvLjNzluuVtbDaKw CVytHnrnVp8RP7SwkQrhCoo/SGuWBH0n+AFCRTdfJg/1T64dHZE5aA2/il5gT1V3u2etHg jGGtCoNOADhhMyUWm0RBnXdRhhbWEIKNDq4HRw+LqUGkHYw02QmElaFkFljeFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9XMZ1r8wz14lb; Thu, 11 Jan 2024 04:52:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40B4qAWF041467; Thu, 11 Jan 2024 04:52:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qA5i041464; Thu, 11 Jan 2024 04:52:10 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:10 GMT Message-Id: <202401110452.40B4qA5i041464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: effa0f6c0aad - main - tests/netlink: mark a test that requires tun(4) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: effa0f6c0aad54a07917af6986d71cd0a57223b8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=effa0f6c0aad54a07917af6986d71cd0a57223b8 commit effa0f6c0aad54a07917af6986d71cd0a57223b8 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 tests/netlink: mark a test that requires tun(4) --- tests/sys/netlink/test_rtnl_route.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/netlink/test_rtnl_route.py b/tests/sys/netlink/test_rtnl_route.py index 20f2c3ce3ee2..370c8a74a2de 100644 --- a/tests/sys/netlink/test_rtnl_route.py +++ b/tests/sys/netlink/test_rtnl_route.py @@ -48,6 +48,7 @@ class TestRtNlRoute(NetlinkTestTemplate, SingleVnetTestTemplate): @pytest.mark.timeout(5) def test_add_route6_ll_if_gw(self): + self.require_module("if_tun") tun_ifname = IfaceFactory().create_iface("", "tun")[0].name tun_ifindex = socket.if_nametoindex(tun_ifname) @@ -68,6 +69,7 @@ class TestRtNlRoute(NetlinkTestTemplate, SingleVnetTestTemplate): @pytest.mark.timeout(5) def test_add_route4_ll_if_gw(self): + self.require_module("if_tun") tun_ifname = IfaceFactory().create_iface("", "tun")[0].name tun_ifindex = socket.if_nametoindex(tun_ifname) From nobody Thu Jan 11 04:52:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9XMb60TRz56PjV; Thu, 11 Jan 2024 04:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9XMb3Ppxz40XB; Thu, 11 Jan 2024 04:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/KWehZoBD+8S3U9zsIX+Ml1dCH75ohHXIehKwhGOits=; b=O9tzfqHTALChocCc9bjcJ4Kz7DwlJN5FjpC4q/7hJmwlYcWVYoiqLN9RcsxN5kpTfwPY1s G7XMPRNxgnkbvF56b0240979BPz/KaQJE6VNtKYw2ff6J3PNiRLxS5Xpu+K1vwX0IU1uhF H30Rv/jP4L/G3z0WSXMIE7CRN3T3pd8n+rPM3sji+VpwMWT6wgWFi7LBgNrl3AmArYq/NU 4uT2kF66xeaUDq++/1/Av2efpPMxinzsZJpn/4N+6xJRcilxtaPql4Et5D/SvIhyYAaZ6O XcwsuhU1gyJzYH+DqiEbbMp6nzy93x400AetRqi9oiArN+zL1O8AXICNDqWw6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/KWehZoBD+8S3U9zsIX+Ml1dCH75ohHXIehKwhGOits=; b=O39BDkq/H5OOV8UY3n7u+bVrzh27T04vp2TdviXqPFiMZ5Knw0zQWxRuV5VQ7y5B3Ag31Z NqSMS3vYSHc0Ho1OYOpTEGxDxxrfpEGBc+N/X1p26KR36Q40UVmJNpJv6YouuC3CyIMqnH rHqIHRQA036B+1HzJ8RzpvReaAg41WYGkk78Vl3XMA+0GNFKUFw3+FuVlyThNI4cL3+B8K y7al6wqoG4Uji2opwr4J+FUF/jPVvXWmoFhuTdT2gFO/9i0h2oJncAHdZEon3W12L/46cG sWCfYl3Mi1rHSJ/wpFhPcX9NvkoJpPEePjZLZEybkM6WTsUsGTvpYuirFXdgiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948731; a=rsa-sha256; cv=none; b=Egvf8GQSPHw0JFA/p1JhF9elpJ2XoU1X14wYj7j4AO9OS2fcY/Q/JbnMyDgZ+w24AphuXG REhzQZNTVOp0QzfUO3jf4wHsYLKCXaeacPV62hOQwBqDyTk27qKLglnP/yN633MHhIYoF6 Ynu8VVOAGq481SnUtbaTCcyrLOrESX6K+KdEe78+WyhV7kAYE1mlUNnmzo0cr9WJJteZtp NqiX4AvZGCjiOog0VfxFhRjnfCaJR+fmkv+uED8gzcQd4wkcNdONLs7DJgdq69W9rvzEeZ 9Ua017L3zvVmAXw668+EnKjHf5Mu8nZETl85Gnobwx2roo1z1y00UnCh0bpr+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 4T9XMb2VJgz14Bd; Thu, 11 Jan 2024 04:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40B4qBZP041509; Thu, 11 Jan 2024 04:52:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qBCN041506; Thu, 11 Jan 2024 04:52:11 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:11 GMT Message-Id: <202401110452.40B4qBCN041506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 26caf57e0b0c - main - tests/netlink: improve recently added netlink_socket:membership List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26caf57e0b0c02771b58ed99bc37b4810249d58e Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=26caf57e0b0c02771b58ed99bc37b4810249d58e commit 26caf57e0b0c02771b58ed99bc37b4810249d58e Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 tests/netlink: improve recently added netlink_socket:membership Change sequence of syscalls: instead of "add, delete, check, check" run sequence "add, check, delete, check". Seems to make more sense. Do minimal parsing of incoming messages: find the IPv4 address there and compare it to the original. --- tests/sys/netlink/netlink_socket.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/tests/sys/netlink/netlink_socket.c b/tests/sys/netlink/netlink_socket.c index 3015a585199b..6dcc894b6695 100644 --- a/tests/sys/netlink/netlink_socket.c +++ b/tests/sys/netlink/netlink_socket.c @@ -256,6 +256,19 @@ ATF_TC_BODY(sizes, tc) cmsg_check(&msg); } +static struct nlattr * +nla_RTA_DST(struct nlattr *start, ssize_t len) +{ + struct nlattr *nla; + + for (nla = start; (char *)nla < (char *)start + len; + nla = (struct nlattr *)((char *)nla + NLA_ALIGN(nla->nla_len))) { + if (nla->nla_type == RTA_DST) + return (nla); + } + + return (NULL); +} /* * Check that NETLINK_ADD_MEMBERSHIP subscribes us. Add & delete a temporary * route and check if announcements came in. @@ -270,7 +283,7 @@ ATF_TC_BODY(membership, tc) struct in_addr dst; struct nlattr rta_oif; uint32_t oif; - } msg = { + } reply, msg = { .hdr.nlmsg_type = RTM_NEWROUTE, .hdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL, .hdr.nlmsg_len = sizeof(msg), @@ -286,19 +299,32 @@ ATF_TC_BODY(membership, tc) .rta_oif.nla_len = sizeof(uint32_t) + sizeof(struct nlattr), .oif = 1, }; + struct nlattr *nla; int fd; ATF_REQUIRE((fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) != -1); ATF_REQUIRE(setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &(int){RTNLGRP_IPV4_ROUTE}, sizeof(int)) == 0); + ATF_REQUIRE(send(fd, &msg, sizeof(msg), 0) == sizeof(msg)); + ATF_REQUIRE(recv(fd, &reply, sizeof(reply), 0) == sizeof(reply)); + ATF_REQUIRE(reply.hdr.nlmsg_type == msg.hdr.nlmsg_type); + ATF_REQUIRE(reply.rtm.rtm_type == msg.rtm.rtm_type); + ATF_REQUIRE(reply.rtm.rtm_dst_len == msg.rtm.rtm_dst_len); + ATF_REQUIRE(nla = nla_RTA_DST(&reply.rta_dst, sizeof(reply))); + ATF_REQUIRE(memcmp(&msg.dst, (char *)nla + sizeof(struct nlattr), + sizeof(struct in_addr)) == 0); + msg.hdr.nlmsg_type = RTM_DELROUTE; msg.hdr.nlmsg_len -= sizeof(struct nlattr) + sizeof(uint32_t); ATF_REQUIRE(send(fd, &msg, msg.hdr.nlmsg_len, 0) == msg.hdr.nlmsg_len); - ATF_REQUIRE(recv(fd, &msg, sizeof(msg), 0) == sizeof(msg)); - ATF_REQUIRE(msg.hdr.nlmsg_type == RTM_NEWROUTE); - ATF_REQUIRE(recv(fd, &msg, sizeof(msg), 0) == sizeof(msg)); - ATF_REQUIRE(msg.hdr.nlmsg_type == RTM_DELROUTE); + ATF_REQUIRE(recv(fd, &reply, sizeof(reply), 0) == sizeof(reply)); + ATF_REQUIRE(reply.hdr.nlmsg_type == msg.hdr.nlmsg_type); + ATF_REQUIRE(reply.rtm.rtm_type == msg.rtm.rtm_type); + ATF_REQUIRE(reply.rtm.rtm_dst_len == msg.rtm.rtm_dst_len); + ATF_REQUIRE(nla = nla_RTA_DST(&reply.rta_dst, sizeof(reply))); + ATF_REQUIRE(memcmp(&msg.dst, (char *)nla + sizeof(struct nlattr), + sizeof(struct in_addr)) == 0); } ATF_TP_ADD_TCS(tp) From nobody Thu Jan 11 04:52: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 4T9XMc6nPKz56PjX; Thu, 11 Jan 2024 04:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9XMc4WpCz40Lj; Thu, 11 Jan 2024 04:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ovMU9FU3KOPstT/sokHle8HZvPY9cAu+SrixlLVC1DE=; b=dfnM4s3lPzszfkAVmMJ8IFXtfZ7bT70rNEJ+EWoV2/8CR5qTFak4Cwzw5gN3wtHWGMmZgZ 0oN/h8iTL3gDAjEoTUb+H3IKTu/EiCuLYIlaSLPjPBMMSdUZhfcvUotzNo0Y6xDLSwyR0f pUDKt/JFe/az7NO7obOcY62XZg70WJKA8KV6k/paqcN6ZNHmn6CiqO0x1fobWeYDDhZlrX wzmGmKpUZ03zgzjN8S085+w3WCeEAFb+JcchXOsy7oa6Rwc8EWpzdrk+W/ODypfNHTyfbu ZuYIE5vmVr0LV94Q4BxFG1MRR0aX7Dg6pKN2mmVwEmy/fD1PIYzk3XgwWJFkHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ovMU9FU3KOPstT/sokHle8HZvPY9cAu+SrixlLVC1DE=; b=YRYYYWW2ERusenFdIWsP6ZX72UkNMOTwH3ozvqm9DjiVk5LfUMP47WtLgvVMTPM8d7/fej AXRMbwNtQtP3rfPIfWCCD7CtHZ7GvBRZoTsqImqULi/CuHJvyMvfMQxeHVFEQQSOt5jAiN nqLyMGcrYOoEP0nLFtUqe8HqYG0mRv+qjpIbSu9q0FveIiRdaW8PQOShncSWW+RAprDjEJ UnItVqymH7HlbPiFBPEZgk4tKh3tTNyaOIVgofeAktCpsVH43BvFSg48mdFWAFOtLMJUTg UK7RLLoK8MEnDcGkA0HOXrmhdX/rDh1KMBkTbcPI0E7XoMB7GzFnGjizr1BwsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948732; a=rsa-sha256; cv=none; b=BP++09CYDnOw+pW3k6LsRY+6oLjd0ngBOAd0f8cw6cfhEvLJZ8p2ToMC+kZSlxgOSYbKmS u8AmdqSaSFInZZi0kKF1sdh5Htndjelr9ZFMhKQ+LzO+gnBNE4/2qd2umPqrvg6Vb7zjim uZ2hh8wf2srh8SsrmaUrDia9Sh/IyE9xaH2JFf09+6uVLrobgLMsDG7z7RVfA7/4XA7Uuk 4rYPBepY3cu2ZCEnhC37Jq5MMaiRrkh5ISLOy0fr2WmVcDpk35zZ81AvgDCrrIdxjipJJg OocdU75RaNXR72ZdD3bIVdA607TtZaEByGzAjRguFSEAmfON3yOqpkHeKqWe9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9XMc3YGvz14Wn; Thu, 11 Jan 2024 04:52: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 40B4qC7v041572; Thu, 11 Jan 2024 04:52:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qCTq041569; Thu, 11 Jan 2024 04:52:12 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:12 GMT Message-Id: <202401110452.40B4qCTq041569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e6f4c3146065 - main - netlink: improve edge case when reading out truncated last nlmsg in nb List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6f4c31460658697827aed7f29ec6e960d6f0a87 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e6f4c31460658697827aed7f29ec6e960d6f0a87 commit e6f4c31460658697827aed7f29ec6e960d6f0a87 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 netlink: improve edge case when reading out truncated last nlmsg in nb When there is not enough space for one full message we return it truncated. This enters special block of code that previously may leave empty buffer with offset == datalen in the queue. Avoid that, as dealing later with empty buffers causes more pain than just avoiding them. While here add missing msgrcv increment. --- sys/netlink/netlink_domain.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 4790845d1d31..94989af73dfe 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -762,11 +762,23 @@ nl_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, } else if (len == 0 && uio->uio_resid > 0) { flags |= MSG_TRUNC; partlen = uio->uio_resid; - if (!peek) { - /* XXX: may leave empty nb */ + if (peek) + goto nospace; + datalen += hdr->nlmsg_len; + if (nb->offset + hdr->nlmsg_len == + nb->datalen) { + /* + * Avoid leaving empty nb. + * Process last nb normally. + * Trust uiomove() to care + * about negative uio_resid. + */ + nb = TAILQ_NEXT(nb, tailq); + overflow = 0; + partlen = 0; + } else nb->offset += hdr->nlmsg_len; - datalen += hdr->nlmsg_len; - } + msgrcv++; } else partlen = 0; goto nospace; From nobody Thu Jan 11 04:52:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9XMf061pz56Psv; Thu, 11 Jan 2024 04:52: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 4T9XMd5Rspz40Nf; Thu, 11 Jan 2024 04:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0NiGnVdArcqsHethmyJEuFrWPD2ZdwNQ+MWInW1cYa8=; b=D+jTwHmzl0QviJQvINOCIvRQpSF0956I6XPHShX1/A89gqKa0dW1nulnn3Q83Or1SM2u4s 07w8HhDQDN7flP5/mylwrIO0c1BmUCR9jZ7ZCm/5ZU0i0FuoQieX1MCYZNxkKR40rAyBzt sClhLQ5TqruMqRx/AogoQQbkMDW+WW83D1JUMUpJRZiEZvJfavs4U7QRAc4lWhuP3iq4WD cPSnvV9tA6X+Er2zjh/HRH48TflFClX4J09cgo4PeFT8K5U717wX8QQv0zOEI7i4uSqscv f8udwEhvh/x741KQNrhej/yZpIIyW27mtQTkUGj6sZunyj4LwU9AoqrR69Pgmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0NiGnVdArcqsHethmyJEuFrWPD2ZdwNQ+MWInW1cYa8=; b=je+jidk5k0fvV5tvinx0+TujPEOa3kqa2DzhufC0TfWF70uMDvKZ5MoCHTE27cc+D6ReOC qS/mWuS5TRvWXUcO3s0TU2NFq24y0x0bkF17XTzhHYmM4vvK/BXfkSE8/vuFVsYJBlKJ3w 4on0xWEjsR9pK9gpr/JEikVaUsgCSdSmU9yoSTEAvJN8Q9FyOzkuZPHxigwtRo+44WN7ce JjFl3fDOxg1M4C9iQTW7I0TZROTinyoPwxYRLIVTsY4uXTOK/6laEuldsnl6qThSvgencF gsCRNv13G+UTrfvR3cvhdZvEj8ZV9CSHFzUARKxnxp25rAIi9lZEepkEbgNTEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948733; a=rsa-sha256; cv=none; b=uTq19YzingLkKASnUTirQK4K6/UgLl6D5G8i0rRLYRTnC39inRwzr2a1XbtRmD3oVhCgqB 822HJFwZMBqdIYZTObI6YcFvtE31ISvT9/xIYPQayUWfAaVtPwhN6/v9ykcv5dwSkdpItp dTSPqyXTIbP06qft8AW6T476euh7OQBnCgGNDFXk39v0CVtyGTky/kvN/4C/O2UHqzSD1Q rbEi4RXkD6oO4FFk8SJVio+3e6AcRFu0HLNdNbQw1ev6YbNwUBLzhYvbfv6psl8kL2H04Y MzzFb0cuc0zAJUHWXycFyDWTNQ/mbmmhd/ddwFDaPf/BhAVZiSe2izkDazKBSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9XMd4YWBz14yN; Thu, 11 Jan 2024 04:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40B4qDq8041627; Thu, 11 Jan 2024 04:52:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qDOK041624; Thu, 11 Jan 2024 04:52:13 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:13 GMT Message-Id: <202401110452.40B4qDOK041624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: f75d7fac109b - main - netlink: avoid putting empty mbufs on the socket queue List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f75d7fac109bf8e322b07456c5361ee62f5635c2 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f75d7fac109bf8e322b07456c5361ee62f5635c2 commit f75d7fac109bf8e322b07456c5361ee62f5635c2 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 netlink: avoid putting empty mbufs on the socket queue When processing incoming Netlink messages in nl_process_nbuf() kernel always allocates a writer with a buffer to put generated reply to. However, certain messages aren't replied. That makes nlmsg_flush() to put an empty buffer to the socket. Avoid doing that because avoiding is much easier than dealing with empty buffers on the receiver side. --- sys/netlink/netlink_domain.c | 7 +------ sys/netlink/netlink_io.c | 2 ++ sys/netlink/netlink_message_writer.c | 11 +++++++++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 94989af73dfe..7ecafbf99d26 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -740,12 +740,7 @@ nl_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, TAILQ_FOREACH(nb, &sb->nl_queue, tailq) { u_int offset; - /* - * XXXGL: zero length buffer may be at the tail of a queue - * when a writer overflows socket buffer. When this is - * improved, use MPASS(nb->offset < nb->datalen). - */ - MPASS(nb->offset <= nb->datalen); + MPASS(nb->offset < nb->datalen); offset = nb->offset; while (offset < nb->datalen) { hdr = (struct nlmsghdr *)&nb->data[offset]; diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index 5f50c40f71d8..61d9d657556a 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -201,6 +201,8 @@ nl_send(struct nl_writer *nw, struct nlpcb *nlp) struct nl_buf *nb; MPASS(nw->hdr == NULL); + MPASS(nw->buf != NULL); + MPASS(nw->buf->datalen > 0); IF_DEBUG_LEVEL(LOG_DEBUG2) { struct nlmsghdr *hdr = (struct nlmsghdr *)nw->buf->data; diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 50305e3d9d80..59bc6aabaa3f 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -100,6 +100,7 @@ _nlmsg_ignore_limit(struct nl_writer *nw) bool _nlmsg_flush(struct nl_writer *nw) { + bool result; if (__predict_false(nw->hdr != NULL)) { /* Last message has not been completed, skip it. */ @@ -109,8 +110,14 @@ _nlmsg_flush(struct nl_writer *nw) nw->hdr = NULL; } - NL_LOG(LOG_DEBUG2, "OUT"); - bool result = nw->cb(nw); + if (nw->buf->datalen == 0) { + MPASS(nw->num_messages == 0); + nl_buf_free(nw->buf); + nw->buf = NULL; + return (true); + } + + result = nw->cb(nw); nw->num_messages = 0; if (!result) { From nobody Thu Jan 11 04:52: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 4T9XMg2smMz56PPT; Thu, 11 Jan 2024 04:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9XMf6sdzz40Xx; Thu, 11 Jan 2024 04:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cd/foy3TbtE+vTvbklZTpJexNMSkyTtwDccXdn7MT1g=; b=F4/dy0vXRVxwRBQrmb3+y/h5rUzGXi3J+Uho5Ku8niNmYTxD6Fvl3wOQNmFUzK8tF5/N2Y wchZUIIZsaG1e7pfmf7FF+4DE/F1FcFan+zCf0T1PLoHaZ343VMEbg0eQww6t26kF2nrMC nt6lrE6AxukepxYxlX/aKkiTeUzBVfpKQMgrl9eBAa+BBdRXHaZ6lBJanxs5ZhJi2Q8NvP G13sngC0L0sg4TPqy01SuLNG3VARoNi7rwiwIJrDyZ8jfo6u9jnw0BsmquGRcsSXLGdCdo iE+Btgs6kkI7qwBKXhbKqoZDgmY15tpPyLONc+rTBau3x6UaVOnYOBARmBmJcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cd/foy3TbtE+vTvbklZTpJexNMSkyTtwDccXdn7MT1g=; b=ShsUK46e+D1suVlqMixMge/Uj8i36PPOGEsuIClwQ3RbjQaMi8ZFji7NlzUfc2UR5O5emH +Kl2RJlC++Gci+AKZmJL9elxgD4AjbEwW5rv6fxWGDVWlGseqKhf4kUMbGN/5KE2rGq6uO yNNRUiTvKhSItJTJf6L/41etgcAe8ItRBjwb+DbAZZWN64e4HxemUuAZcid3SXt3HJpUD6 X8HKUazvrEN+++747bQoNcJqbhCUbAyDg6MMWvxoITVaVmNOp383kEJUKS2byKYRsM+b28 2V4uFFFZGKCkhp1NQbmezgxl4dxGlDB2JTNPDcSYnjHQoddyfUiL0J+cSqj93A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948735; a=rsa-sha256; cv=none; b=dHCnFAOCO/FnOeUjX33u7Yp+ZaUU7prqFcPkcbUIaQXSHRi6fGALM4Y9gUiZck3DLkS1Yd nZ6TmnZBZwOyosAyEe5g7GzJOs+1dpSEPyKcGnoRjyogv9c9EhV0VAslP4goQnjAkKKEVc u3jeLVFQBhkZ/CPFDgnn1B+A2kY/a/MuGXsxhZT2JTbUqotaCTzvrk0RY/IJ4PS+1weF4m SHKzzKNGTVJuoKFpbTjqCPOnjKrcNYGwExkHvAB5KiHaxBjBK92W/xp32WNPpaICTzw0Xu ydTxeNoDD6nRkoBV9s6KuimWJ1b/2Ov3/2Kf7aPSkDNIXdL9Fr1Vq41nBKrXAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9XMf5y3Rz14ld; Thu, 11 Jan 2024 04:52: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 40B4qE38041685; Thu, 11 Jan 2024 04:52:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qEaU041682; Thu, 11 Jan 2024 04:52:14 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:14 GMT Message-Id: <202401110452.40B4qEaU041682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d9b1f6fbf993 - main - netlink: fix bug with socket buffer character counter underflow List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9b1f6fbf9935a9d54c78987a04af7cda3740c56 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d9b1f6fbf9935a9d54c78987a04af7cda3740c56 commit d9b1f6fbf9935a9d54c78987a04af7cda3740c56 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 netlink: fix bug with socket buffer character counter underflow Cover case when an nb that we are now reading in full had been partially read by previous read(2) and now has positive offset. Throw couple assertions that helped to catch that earlier. --- sys/netlink/netlink_domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 7ecafbf99d26..777aff43000a 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -744,6 +744,7 @@ nl_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, offset = nb->offset; while (offset < nb->datalen) { hdr = (struct nlmsghdr *)&nb->data[offset]; + MPASS(nb->offset + hdr->nlmsg_len <= nb->datalen); if (uio->uio_resid < len + hdr->nlmsg_len) { overflow = len + hdr->nlmsg_len - uio->uio_resid; @@ -784,7 +785,7 @@ nl_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, msgrcv++; } MPASS(offset == nb->datalen); - datalen += nb->datalen; + datalen += nb->datalen - nb->offset; } nospace: last = nb; @@ -796,6 +797,7 @@ nospace: TAILQ_FIRST(&sb->nl_queue) = last; last->tailq.tqe_prev = &TAILQ_FIRST(&sb->nl_queue); } + MPASS(sb->sb_acc >= datalen); sb->sb_acc -= datalen; sb->sb_ccc -= datalen; } From nobody Thu Jan 11 09:50: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 4T9fzZ0LKhz572fd; Thu, 11 Jan 2024 09:50: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 4T9fzY6wbzz4kmx; Thu, 11 Jan 2024 09:50:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704966618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dg/hf83nzR/5mSxQ7momCFrEOhEJ8XNFVh7wCuN8eG4=; b=id2jv2YzN2YXRNeOwQYZjRoErkHC02RKmkgCOIjTZcFcjN8jadpKgSdwCyvkVdMN7i4omW wXZKrrvGxRqrYgWkK6W9XPj1MVawkhPaGlX3SP9rp9VAtn2bOeOEawgh7UK5sPC2s0EEW5 la9tPDvWTwsmdulQxBRT9wiKVQiA5R8b/hdhWYzNi1gjpqVbjKFVOeoKGKMJ4qviORME7m GHD8Zbbn2nCeEscK8PgAES6XcB4P3olQVgb/It56rWkyK2efXS/bv8ZfGxU3pCWqQFImjx HfGsAsj69jM2GDD5bIjcmmCf58cGp69cMom5Eai/RuHV7eHZbcCAIJgg38PuZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704966618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dg/hf83nzR/5mSxQ7momCFrEOhEJ8XNFVh7wCuN8eG4=; b=MCesoMkxl8H8711e9+hoolEKqx39GsaYsol0qehVB86yr7MRwbSa7bndqXMdiyt8mqtRxQ MCiLKtgVEg2uoOrMHiFjCwd7RCs4MEBsD9mA276MtstLnPAkOM0Oee/wvieRg4GFkZmh3+ 24EetJNg5JPHJnGo0W4zxQgm9pNxrJlw9HZHqmXKbDd4OOp8iQbnQn6tqfc+ESJB18/g7g vAobLbLJa+UZjaM7i+CK11edKhql6ouZHcbiHfne1GziGZ5swdmmpQVc7GKNbhyzau8O2Q uRpWFs8lwji4+tucmA0Q4Sv4FVdQJfdmYePnl9B21kMOde65cFxBkcH7E+AENw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704966618; a=rsa-sha256; cv=none; b=SmGgbNSWAp9Jo9tQQkCS1TD95AWubodXTQJfup7m+b52slzUqQ6ptx743wZVm+x4B/8IZI lzgcBWTbx30/WRboRPzGbNfAlKz/vuhL8r0E9K2kI8mKOgxtyWqptSqwAtGjKjt9cT1VPk PQI5SrO++3amPo8ltf4uMomdsJszFwUlXq+9m0cQ6HJyTM/Rkh/KtauwtoGYBu5zZSJ7Na wb59X4norieTvFF/dHrn0c7/Ed9/Fcw4D3sAFPk0T22bhXi1JAZSTdiURzc1mCBqtcOWNg vkdJM1v6K06FWMohvZlChvUu3vZ6W0gepaCjEriHFN+n4dHFMfgdlWWE6t3BUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9fzY5ztmz1Cp9; Thu, 11 Jan 2024 09:50: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 40B9oHxW041447; Thu, 11 Jan 2024 09:50:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B9oH0s041441; Thu, 11 Jan 2024 09:50:17 GMT (envelope-from git) Date: Thu, 11 Jan 2024 09:50:17 GMT Message-Id: <202401110950.40B9oH0s041441@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: bdb46c21a3e6 - main - vnode_pager_generic_putpages(): correctly handle clean block at EOF List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bdb46c21a3e68d4395d6e0b6a205187e655532b0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bdb46c21a3e68d4395d6e0b6a205187e655532b0 commit bdb46c21a3e68d4395d6e0b6a205187e655532b0 Author: Konstantin Belousov AuthorDate: 2024-01-08 13:21:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 09:49:37 +0000 vnode_pager_generic_putpages(): correctly handle clean block at EOF The loop 'skip clean blocks' checking for the clean blocks in the dirty pages might end up setting the in_hole to true when exactly at EOF at the middle of the block, without advancing the prev_offset value. Then the next block is not dirty, and next_offset is clipped back to poffset + maxsize, equal to prev_offset, failing the assertion. Instead of asserting prev_offset < next_offset, we must skip the write. Reported by: asomers PR: 276191 Reviewed by: alc, markj Tested by: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43358 --- sys/vm/vnode_pager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index bf5166e059e9..75919625707c 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1464,12 +1464,13 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, start_write: if (next_offset > poffset + maxsize) next_offset = poffset + maxsize; + if (prev_offset == next_offset) + goto write_done; /* * Getting here requires finding a dirty block in the * 'skip clean blocks' loop. */ - MPASS(prev_offset < next_offset); aiov.iov_base = NULL; auio.uio_iovcnt = 1; From nobody Thu Jan 11 09:50: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 4T9fzb18XHz572Ys; Thu, 11 Jan 2024 09:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9fzb0kLmz4kn0; Thu, 11 Jan 2024 09:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704966619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=npyi+OSQFaX4Ke3a81/3aPLrlkNxzFmCIqWrjjXyCw0=; b=b7chmN5c40KRlr/HlCNm+gdQ6Dy/D4slkSC9Oc76zEmzrJqaUytQ2Jm/h+f5llQ7f9FI2U WIAlZjj26KsrYAqIbF7Vv+Q4cjoQ00Dt+pY+hVL+q0CsWHCrOERTlN15UWal0+geIPqucb hK6OGUZMY0onqyhZBExJnxSi8kchfzmJVdf81IgdA2DcSO5fCKNtsGjMfhxC7RwQvwBuml MIcW1KFF84uPr5NGuRmQmsrrcjiV8jjtqWm/XQAeo2p4X1LRew07sv1wQX5fn1pS766NRU eoT+TudcOIlLQ4YRt1fWImHDBcRlZYO3ZcIFkndYvjAc7AHOxzGm8w6a5llKnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704966619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=npyi+OSQFaX4Ke3a81/3aPLrlkNxzFmCIqWrjjXyCw0=; b=XFC13KdoI77kuNARpjVuss7zkZk3duYGM4rN7/6CscjPQTr8PeWT0d5FksZLexps/Wn/RB AVuAhMlL2SaicdqyvWu90EiiWVJZHR2XJkiba1OLCKlqGT3ZTwBUSqw0H1ojfBjakt6aS/ A0zbMf4+XvjaKD75TPkg2nvULrH8yupbanYjQKX7m+ngsxRxXKyANTtuBfG3jm5jWrZKBx X5MomwLsYTzdwx8TdXq9UPatwww7TFHCXgioGMgiiLZIloIhyVwFDN83uZqYRx5SvEj2t3 HjmdFcObNOL8Pgg9U+LQ7nGxfJmScIAfz+WyRjfGFN1NVMCH6bzeJV9AoRYMEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704966619; a=rsa-sha256; cv=none; b=YrPFG64pHE0wuZ+IXHX9rKlRmoX1TjiWAJOe6zMx1nzq693kXsJ/m8TPP+8KpgWX1yPbC2 wZsRtxRPMZaoc17OmhRFRcxCGgVygGXQklAkOzUbNSL5QHWXNoxQRNIiUEC7eiDwF6aOq2 TXjUc0Y83FlBnpn7aUgK5TH9ePGhOYVWGHqNGz43kEWUD+qtl2Hyd9KPT1wlFIf2YBdvtI s0WQUSem87nWvQZD9EL0n9J8mgDmQTQahGGbnjziPvhrQd9WxjaMeFGPBTlPeOVEa+zCKO EIWhwbp3mpmAYjZAnuBd+9fCYKuJUiahcHgsTlzYQqg/U+QLPMqGT7qsn/D70w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9fzZ6xCfzDsr; Thu, 11 Jan 2024 09:50: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 40B9oIL7041579; Thu, 11 Jan 2024 09:50:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B9oIL8041576; Thu, 11 Jan 2024 09:50:18 GMT (envelope-from git) Date: Thu, 11 Jan 2024 09:50:18 GMT Message-Id: <202401110950.40B9oIL8041576@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: ed1a88a3116a - main - vnode_pager_generic_putpages(): rename maxblksz local to max_offset List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed1a88a3116a59b4fd37912099a575b4c8f559dc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ed1a88a3116a59b4fd37912099a575b4c8f559dc commit ed1a88a3116a59b4fd37912099a575b4c8f559dc Author: Konstantin Belousov AuthorDate: 2024-01-09 11:32:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 09:49:37 +0000 vnode_pager_generic_putpages(): rename maxblksz local to max_offset Requested by: markj Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43358 --- sys/vm/vnode_pager.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 75919625707c..f9fb1ba23655 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1356,7 +1356,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, { vm_object_t object; vm_page_t m; - vm_ooffset_t maxblksz, next_offset, poffset, prev_offset; + vm_ooffset_t max_offset, next_offset, poffset, prev_offset; struct uio auio; struct iovec aiov; off_t prev_resid, wrsz; @@ -1431,15 +1431,15 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, auio.uio_segflg = UIO_NOCOPY; auio.uio_rw = UIO_WRITE; auio.uio_td = NULL; - maxblksz = roundup2(poffset + maxsize, DEV_BSIZE); + max_offset = roundup2(poffset + maxsize, DEV_BSIZE); - for (prev_offset = poffset; prev_offset < maxblksz;) { + for (prev_offset = poffset; prev_offset < max_offset;) { /* Skip clean blocks. */ - for (in_hole = true; in_hole && prev_offset < maxblksz;) { + for (in_hole = true; in_hole && prev_offset < max_offset;) { m = ma[OFF_TO_IDX(prev_offset - poffset)]; for (i = vn_off2bidx(prev_offset); i < sizeof(vm_page_bits_t) * NBBY && - prev_offset < maxblksz; i++) { + prev_offset < max_offset; i++) { if (vn_dirty_blk(m, prev_offset)) { in_hole = false; break; @@ -1451,11 +1451,11 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, goto write_done; /* Find longest run of dirty blocks. */ - for (next_offset = prev_offset; next_offset < maxblksz;) { + for (next_offset = prev_offset; next_offset < max_offset;) { m = ma[OFF_TO_IDX(next_offset - poffset)]; for (i = vn_off2bidx(next_offset); i < sizeof(vm_page_bits_t) * NBBY && - next_offset < maxblksz; i++) { + next_offset < max_offset; i++) { if (!vn_dirty_blk(m, next_offset)) goto start_write; next_offset += DEV_BSIZE; From nobody Thu Jan 11 13:31: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 4T9ltv3Bflz55ktt; Thu, 11 Jan 2024 13:31: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 4T9ltv2QXgz4K6L; Thu, 11 Jan 2024 13:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704979895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nr3/GoCGPiZ3zXjuSLmeaXk6ZICMmpGQa6WSNlkUlk0=; b=eXagBMqFEqfUkzG+USwwynU3kmSu9G22sIvX8hE1XQZDQSEiFqrE07u0TSa+4xHzz/jwf+ aphcy5ajz7TVOZZt9YGYda99CRsf1Xaxn5MUuYD4SdwpuAgJzeop+V996FQrk5m1ZbCh6p EH8pcty41juFt6mHIe/3R76QfK73xaeipQtDLwGLvZbJkU86r/FlxtJ13Og+IrIf7iYOMz 2KhHHWLyFk7n96Yzzkl76WAArj/PaSq35oEZ9NVBzWx8AiyAnf3Yt2houY7AIIbdzwIbpV 5P9NVofrsrEh5gh8RwbYoBxsUjGhUOyypIipLSr97eqt8ScaPUHki9rd1JJhig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704979895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nr3/GoCGPiZ3zXjuSLmeaXk6ZICMmpGQa6WSNlkUlk0=; b=kCqlxmfheCVhdZ845bcZ1zOVtd/uXPz9/c1gpEduurPLD9eNHeAGPioVa9meo2BD5N9RjT 1mnxvxQ3WOpqwYiqiBPw836/AkdjKC5IU0yfFvTTdqu7vQKOFq0TQOsGqLRnW4tKWhHK0c hIf37XWCQVxX7Ub/khzay0EV75YH6X0uatTcTQrZpnHGpo87D+MiR2peX0nknYXP5HDlrL YuritL5/2483g1sG1ho32gdQA8hd8lGirCzUhm7J7mVgvzSzBrzoq3ySP9oeXweSntCmVY 9ScoztXTLlPRPxEUOMas8nmfSWEAw8CZzG41H+DaooeyHW8IB3zQtrdnedu5tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704979895; a=rsa-sha256; cv=none; b=StsPXpR3GG7AJGyRNodbyq5jbqBAfbePd1hxUzTj0YiOhSSG9YJRD6FPhai4YD0pwR/hEa xb5fd5E6xzLKKGXCqb+UElannKzsWb0tgSzYI7X5I91WM31A08QglSIe/9AFQ0CaDN9r2c U/gDCId+rKGESYjZKH7wvm8aY48MzB84jDL8Pd+HgL8Ezq9wvxEJxFWDWycMYbQG17kDtb ewLWjnNF9BzmAtnxc/Q6cmvehaT221ybTXYCwcaYZWrxcoaqvFZEKzzaGreaw8CAOfcx8t e+YfNzWoKVp+Uvp3KqhFCE8ICQLNNVjd3KSz6O53eRF5ynbBjun5ao37gfE0dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9ltv1TN4zLJQ; Thu, 11 Jan 2024 13:31: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 40BDVZrK015432; Thu, 11 Jan 2024 13:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BDVZfn015429; Thu, 11 Jan 2024 13:31:35 GMT (envelope-from git) Date: Thu, 11 Jan 2024 13:31:35 GMT Message-Id: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb Author: Cy Schubert AuthorDate: 2023-12-06 15:30:05 +0000 Commit: Cy Schubert CommitDate: 2024-01-11 13:26:42 +0000 kerberos: Fix numerous segfaults when using weak crypto Weak crypto is provided by the openssl legacy provider which is not load by default. Load the legacy providers as needed. When the legacy provider is loaded into the default context the default provider will no longer be automatically loaded. Without the default provider the various kerberos applicaions and functions will abort(). PR: 272835 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D43009 Tested by: netchild, Joerg Pulz --- Makefile.inc1 | 7 ++-- crypto/heimdal/lib/kadm5/create_s.c | 4 +++ crypto/heimdal/lib/kadm5/kadm5_locl.h | 1 + crypto/heimdal/lib/krb5/context.c | 4 +++ crypto/heimdal/lib/krb5/crypto.c | 3 ++ crypto/heimdal/lib/krb5/salt.c | 5 +++ crypto/heimdal/lib/roken/version-script.map | 1 + kerberos5/include/crypto-headers.h | 4 +++ kerberos5/include/fbsd_ossl_provider.h | 4 +++ kerberos5/lib/libroken/Makefile | 11 +++++-- kerberos5/lib/libroken/fbsd_ossl_provider_load.c | 41 ++++++++++++++++++++++++ kerberos5/libexec/kdc/Makefile | 2 +- share/mk/src.libnames.mk | 2 +- 13 files changed, 81 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 34b49ee319ec..864b5151692f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2635,9 +2635,10 @@ ${_bt}-usr.bin/grep: ${_bt}-lib/libbz2 _other_bootstrap_tools+=lib/libz ${_bt}-lib/libdwarf: ${_bt}-lib/libz -# libroken depends on libcrypt +# libroken depends on libcrypt and libcrypto _other_bootstrap_tools+=lib/libcrypt -${_bt}-lib/libroken: ${_bt}-lib/libcrypt +_other_bootstrap_tools+=secure/lib/libcrypto +${_bt}-lib/libroken: ${_bt}-lib/libcrypt ${_bt}-lib/libcrypto .else # All tools in _basic_bootstrap_tools have the same name as the subdirectory # so we can use :T to get the name of the symlinks that we need to create. @@ -3283,7 +3284,7 @@ kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \ kerberos5/lib/libroken__L kerberos5/lib/libwind__L \ kerberos5/lib/libheimbase__L kerberos5/lib/libheimipcc__L -kerberos5/lib/libroken__L: lib/libcrypt__L +kerberos5/lib/libroken__L: lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libheimbase__L: lib/libthr__L kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L diff --git a/crypto/heimdal/lib/kadm5/create_s.c b/crypto/heimdal/lib/kadm5/create_s.c index 1033ca103239..267e9bbda2a0 100644 --- a/crypto/heimdal/lib/kadm5/create_s.c +++ b/crypto/heimdal/lib/kadm5/create_s.c @@ -169,6 +169,10 @@ kadm5_s_create_principal(void *server_handle, ent.entry.keys.len = 0; ent.entry.keys.val = NULL; + ret = fbsd_ossl_provider_load(); + if (ret) + goto out; + ret = _kadm5_set_keys(context, &ent.entry, password); if (ret) goto out; diff --git a/crypto/heimdal/lib/kadm5/kadm5_locl.h b/crypto/heimdal/lib/kadm5/kadm5_locl.h index 68b6a5ebf024..63b367ab7e21 100644 --- a/crypto/heimdal/lib/kadm5/kadm5_locl.h +++ b/crypto/heimdal/lib/kadm5/kadm5_locl.h @@ -79,5 +79,6 @@ #include #include #include "private.h" +#include "fbsd_ossl_provider.h" #endif /* __KADM5_LOCL_H__ */ diff --git a/crypto/heimdal/lib/krb5/context.c b/crypto/heimdal/lib/krb5/context.c index 86bfe539b974..681bc9a0982f 100644 --- a/crypto/heimdal/lib/krb5/context.c +++ b/crypto/heimdal/lib/krb5/context.c @@ -392,6 +392,10 @@ krb5_init_context(krb5_context *context) } HEIMDAL_MUTEX_init(p->mutex); + ret = fbsd_ossl_provider_load(); + if(ret) + goto out; + p->flags |= KRB5_CTX_F_HOMEDIR_ACCESS; ret = krb5_get_default_config_files(&files); diff --git a/crypto/heimdal/lib/krb5/crypto.c b/crypto/heimdal/lib/krb5/crypto.c index 67ecef62e875..6ee22609a4d5 100644 --- a/crypto/heimdal/lib/krb5/crypto.c +++ b/crypto/heimdal/lib/krb5/crypto.c @@ -2054,6 +2054,9 @@ krb5_crypto_init(krb5_context context, *crypto = NULL; return ret; } + ret = fbsd_ossl_provider_load(); + if (ret) + return ret; (*crypto)->key.schedule = NULL; (*crypto)->num_key_usage = 0; (*crypto)->key_usage = NULL; diff --git a/crypto/heimdal/lib/krb5/salt.c b/crypto/heimdal/lib/krb5/salt.c index 5e4c8a1c8572..2b1fbee80ab6 100644 --- a/crypto/heimdal/lib/krb5/salt.c +++ b/crypto/heimdal/lib/krb5/salt.c @@ -43,6 +43,8 @@ krb5_salttype_to_string (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; + (void) fbsd_ossl_provider_load(); + e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -75,6 +77,8 @@ krb5_string_to_salttype (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; + (void) fbsd_ossl_provider_load(); + e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -196,6 +200,7 @@ krb5_string_to_key_data_salt_opaque (krb5_context context, enctype); return KRB5_PROG_ETYPE_NOSUPP; } + (void) fbsd_ossl_provider_load(); for(st = et->keytype->string_to_key; st && st->type; st++) if(st->type == salt.salttype) return (*st->string_to_key)(context, enctype, password, diff --git a/crypto/heimdal/lib/roken/version-script.map b/crypto/heimdal/lib/roken/version-script.map index 72d2ea7e4f7c..bb2139ed74cc 100644 --- a/crypto/heimdal/lib/roken/version-script.map +++ b/crypto/heimdal/lib/roken/version-script.map @@ -13,6 +13,7 @@ HEIMDAL_ROKEN_1.0 { ct_memcmp; err; errx; + fbsd_ossl_provider_load; free_getarg_strings; get_default_username; get_window_size; diff --git a/kerberos5/include/crypto-headers.h b/kerberos5/include/crypto-headers.h index 3ae0d9624ffd..2cc870642964 100644 --- a/kerberos5/include/crypto-headers.h +++ b/kerberos5/include/crypto-headers.h @@ -17,5 +17,9 @@ #include #include #include +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) +#include +#include "fbsd_ossl_provider.h" +#endif #endif /* __crypto_headers_h__ */ diff --git a/kerberos5/include/fbsd_ossl_provider.h b/kerberos5/include/fbsd_ossl_provider.h new file mode 100644 index 000000000000..013983ca9f83 --- /dev/null +++ b/kerberos5/include/fbsd_ossl_provider.h @@ -0,0 +1,4 @@ +#ifndef __fbsd_ossl_provider_h +#define __fbsd_ossl_provider_h +int fbsd_ossl_provider_load(void); +#endif diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile index 0c46ba6c4cb5..24dc3a5b2c45 100644 --- a/kerberos5/lib/libroken/Makefile +++ b/kerberos5/lib/libroken/Makefile @@ -2,7 +2,7 @@ PACKAGE= kerberos-lib LIB= roken -LIBADD= crypt +LIBADD= crypt crypto VERSION_MAP= ${KRB5DIR}/lib/roken/version-script.map INCS= roken.h \ roken-common.h \ @@ -74,15 +74,20 @@ SRCS= base64.c \ vis.c \ warnerr.c \ write_pid.c \ - xfree.c + xfree.c \ + fbsd_ossl_provider_load.c -CFLAGS+=-I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/kerberos5/include \ + -I${KRB5DIR}/lib/krb5 \ + -I${SRCTOP}/crypto/openssl/include -I. CLEANFILES= roken.h roken.h: ${MAKE_ROKEN} > ${.TARGET} + .include .PATH: ${KRB5DIR}/lib/roken diff --git a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c new file mode 100644 index 000000000000..f49c8746c9e4 --- /dev/null +++ b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c @@ -0,0 +1,41 @@ +#include +#include + +static void fbsd_ossl_provider_unload(void); + +static OSSL_PROVIDER *legacy; +static OSSL_PROVIDER *deflt; +static int providers_loaded = 0; + +int +fbsd_ossl_provider_load(void) +{ +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + if (providers_loaded == 0) { + if ((legacy = OSSL_PROVIDER_load(NULL, "legacy")) == NULL) + return (EINVAL); + if ((deflt = OSSL_PROVIDER_load(NULL, "default")) == NULL) { + OSSL_PROVIDER_unload(legacy); + return (EINVAL); + } + if (atexit(fbsd_ossl_provider_unload)) { + fbsd_ossl_provider_unload(); + return (errno); + } + providers_loaded = 1; + } +#endif + return (0); +} + +static void +fbsd_ossl_provider_unload(void) +{ +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + if (providers_loaded == 1) { + OSSL_PROVIDER_unload(legacy); + OSSL_PROVIDER_unload(deflt); + providers_loaded = 0; + } +#endif +} diff --git a/kerberos5/libexec/kdc/Makefile b/kerberos5/libexec/kdc/Makefile index 41fde9115c00..211f4f379054 100644 --- a/kerberos5/libexec/kdc/Makefile +++ b/kerberos5/libexec/kdc/Makefile @@ -11,7 +11,7 @@ SRCS= config.c \ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} -LIBADD= kdc hdb krb5 roken crypt vers +LIBADD= kdc hdb krb5 roken crypt vers crypto LDFLAGS=${LDAPLDFLAGS} .include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 33b8507a9eb9..e4fd3270a3d3 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -367,7 +367,7 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_roken= crypt +_DP_roken= crypt crypto _DP_kadm5clnt= com_err krb5 roken _DP_kadm5srv= com_err hdb krb5 roken _DP_heimntlm= crypto com_err krb5 roken From nobody Thu Jan 11 15:01: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 4T9nv71n7bz56CLn; Thu, 11 Jan 2024 15:01: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 4T9nv71CyBz4fwV; Thu, 11 Jan 2024 15:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704985315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUV8S1lB4x9JOuLcni7psdb2pGMJamlRXs7yMGMhdZE=; b=yjp5LKcDcrkpbRRMwW7R8mKzpGkdIzLYnP2KAbVGGVo1CU3gb5EjkdRHINhLLjP9/FYb95 jHAjPfSgTctpobQzjZdfT4XtQuKvmTw78EVwHLxuABGJX/9iNa95cg9nDO7LaffufAvGLA zLXwX7ee8mC+l6FMny5ncygV0DSPgO4CMDof/u5+wdCLHrYEjJfmCsvn9nMI6rp/TnukzL Ea622GcFAwLnH0xkzP3j3kpkPIwJ+5e2R1qwHJa57dFMacrseZENtAdbAk3LHB4R1u8yiU 01PyAU916Kr3M4JeHv/tt3ns00RrPtcWMrIBemeJ26tqJ+ffgjFoFFogJ8JrDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704985315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUV8S1lB4x9JOuLcni7psdb2pGMJamlRXs7yMGMhdZE=; b=xc+oVmnEKDR96MUYZvPzG9bA7TDhITwJnH4z70g2msMlqbTWP8J+pdT3xf1N3tNkS2EsKK DmrlOL6UTUnlrljY6FHqle8mA0hutZk3sZkNP1domRG0eab2L4/7o/ObLd+w/bTJKEdKy/ sZXvbZ4CIO7pkGnfRU3wh0WZrRFv0tb8pMdPoV7ZCGSZMM886kEXaZWF1t6yHOdnG2gh7s nuuTa1uqBM2egiGI5phUso4KW1CZblBsvJM0QuKN8MrxvJJdvWP5bCtTGz/c0exqr+LK23 mK3N2joRvP9E4B7tasDguTyDS9O13UhlY1hVN+ycsZEvJP63+MAQwPOkddUE5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704985315; a=rsa-sha256; cv=none; b=d3ah3M3wy2lDdAZPvl16yGZLGUo5yrXhgx5pMR79tZZ/7gtq9KQlNsYUds5us4GJ7f+K6s SQ1haRxZ7wW3aZy5cAm8G+JPrTfMmhsd0oWQGzv7zGVLlgAOV9wAxVNIDXZgIiGSCSFvPH E0J9UpwxiVu56yI/cV6Mw2cqP1XScJN5YI0u2qikqKceCu7kejkV+pRBfePT442s22KWfP q5AzGz0Qg+lg345D0uS/odXCfqkLCLYGU15q0qdaB8YrV6DnrfNb2MIs+qtI2cEmh5TYlw xNAINQU+aq2iw6Yzc6JlYjyF+0vqkRUIIhlDuejA8hiFKbuhZSnjUWIRfTESTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9nv70G65zNrJ; Thu, 11 Jan 2024 15:01: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 40BF1sHI074361; Thu, 11 Jan 2024 15:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BF1sFk074358; Thu, 11 Jan 2024 15:01:54 GMT (envelope-from git) Date: Thu, 11 Jan 2024 15:01:54 GMT Message-Id: <202401111501.40BF1sFk074358@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: 1f62718d8ba2 - main - top: Avoid printing a blank line when the ZFS ARC is empty List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f62718d8ba26d813d8c2e826ac5f4caee4c6730 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1f62718d8ba26d813d8c2e826ac5f4caee4c6730 commit 1f62718d8ba26d813d8c2e826ac5f4caee4c6730 Author: Mark Johnston AuthorDate: 2024-01-11 14:58:31 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 15:01:37 +0000 top: Avoid printing a blank line when the ZFS ARC is empty PR: 275994 MFC after: 2 weeks --- usr.bin/top/machine.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index b4cd29dab878..a76d77a80ce4 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -293,17 +293,27 @@ machine_init(struct statics *statics) size = sizeof(carc_en); if (arc_enabled && sysctlbyname("vfs.zfs.compressed_arc_enabled", &carc_en, &size, - NULL, 0) == 0 && carc_en == 1) - carc_enabled = 1; + NULL, 0) == 0 && carc_en == 1) { + uint64_t uncomp_sz; + + /* + * Don't report compression stats if no data is in the ARC. + * Otherwise, we end up printing a blank line. + */ + size = sizeof(uncomp_sz); + if (sysctlbyname("kstat.zfs.misc.arcstats.uncompressed_size", + &uncomp_sz, &size, NULL, 0) == 0 && uncomp_sz != 0) + carc_enabled = 1; + } kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open"); if (kd == NULL) return (-1); size = sizeof(nswapdev); - if (sysctlbyname("vm.nswapdev", &nswapdev, &size, NULL, - 0) == 0 && nswapdev != 0) - has_swap = 1; + if (sysctlbyname("vm.nswapdev", &nswapdev, &size, NULL, 0) == 0 && + nswapdev != 0) + has_swap = 1; GETSYSCTL("kern.ccpu", ccpu); From nobody Thu Jan 11 16:45: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 4T9rBR2PvTz56RHS; Thu, 11 Jan 2024 16:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9rBQ5mYYz4vH4; Thu, 11 Jan 2024 16:45:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704991518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PWjBbN0e6d3l6plwPZ/f+3jfRHzjePqcct9N7Q6ZRLo=; b=qL4v+K6Ty7sQ1exodwT6ml965uL/phtnrRXkd95FO4gEbx6hLlGTFTmTR5GF5mDXViAbGR PPlG3LyrAb7GH/15VNukOA4kYgucUn4PQTxIVd0m0JvoQ/Rtwh2TxryqSt43fRDcVN+ZPg rysP0OI9d/InOAEjPmkHg28vF2piB6pZky6Zy1jjVWnn6C79IKU/FMG8cHoyOmxK+WQlTf jUhVBtZwHVz1dHGSPmUZiSDbRRLc41OiNUuDFNH8J1IYFXm9ux8BwGC4h6FXy7MQoaRzhG ZLswhAlpzWHUMiOksbxt68TGo86fg3cpXeRmahsYB+z4vfF025nB7YJfI8ZGng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704991518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PWjBbN0e6d3l6plwPZ/f+3jfRHzjePqcct9N7Q6ZRLo=; b=iiZUo+hVfPz2JsVyGE3fBNj5cA+vni4+4NU7vx3NroGy7lZ+iD0wYxQT+h3WIJGaGLfC43 vTjHLJT3BcuoV3FFTt/QWkolcabX/TKuQQOTdlJAG1bcdsvgxIkwxtZtLKSwq+w7cAlb+V 1u5f5PtJzrtp0mo98Ix0XaTLoqNw9qp7QG4j9XtZwNm45PEIqCNCs3YZJY4yCsUp9PKqup fsYZ+u4eQkNYHSMTqt9NWln/CUEuJWYeGKLv+EQLPxvRODyTVhzp+Y6xzdOOCkU+0CqXZJ rapRP2wwD9jKei/avqMAfxMpd+ra7pppaVOPGsReEEjRWQuSWOu10PazCKW1XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704991518; a=rsa-sha256; cv=none; b=A0wJEoxLmBMcGyou+jbFiglGWhkxZxDVZyStnck5KmVVtLBjGO43yRDPInBqJZmL1+okWR JX8nRMv3a0GhscEvA7+/t7doaA6TvlS6TO78mkIMWPz+1FD9upQUuPbU4YzrqnS0b8hpky kvbwOddIMvhvEn6rEDpj3PqsX3itFBEuBpdz0KTYXW40kbGML/deolbFLrCiwQ1ARHPgjT 8vsqSB7EPhy8/avHW5VPilDMjN4lkkbqugn43eFWDyYps3ix8Nr1c5wctlBfSV2PX/6l6u qpjsSTXNMbT5VtRIxTDd09Mkb1eORRWTyZCxgM8f3ZwFYELuFRlqpMbNdbZ6ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9rBQ4r4HzR0G; Thu, 11 Jan 2024 16:45: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 40BGjI5A045485; Thu, 11 Jan 2024 16:45:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BGjIHb045482; Thu, 11 Jan 2024 16:45:18 GMT (envelope-from git) Date: Thu, 11 Jan 2024 16:45:18 GMT Message-Id: <202401111645.40BGjIHb045482@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: b068bb09a1a8 - main - Add vnode_pager_clean_{a,}sync(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b068bb09a1a82d9fef0e939ad6135443a959e290 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b068bb09a1a82d9fef0e939ad6135443a959e290 commit b068bb09a1a82d9fef0e939ad6135443a959e290 Author: Konstantin Belousov AuthorDate: 2024-01-08 05:18:40 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:44:53 +0000 Add vnode_pager_clean_{a,}sync(9) Bump __FreeBSD_version for ZFS use. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43356 --- .../openzfs/include/os/freebsd/spl/sys/vnode.h | 9 +++--- sys/fs/fuse/fuse_io.c | 7 ++-- sys/fs/nfsclient/nfs_clbio.c | 8 ++--- sys/fs/nfsclient/nfs_clnode.c | 17 +++------- sys/fs/nfsclient/nfs_clvnops.c | 27 ++++------------ sys/fs/nfsserver/nfs_nfsdport.c | 8 ++--- sys/fs/smbfs/smbfs_io.c | 7 +--- sys/kern/vfs_aio.c | 9 ++---- sys/kern/vfs_subr.c | 37 ++++++++-------------- sys/kern/vfs_syscalls.c | 7 ++-- sys/kern/vfs_vnops.c | 9 ++---- sys/sys/param.h | 2 +- sys/ufs/ffs/ffs_rawread.c | 14 +++----- sys/ufs/ufs/ufs_bmap.c | 9 ++---- sys/vm/vnode_pager.c | 27 ++++++++++++++++ sys/vm/vnode_pager.h | 3 ++ 16 files changed, 82 insertions(+), 118 deletions(-) diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h index 75c32f221ffd..7a3b38736a58 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h @@ -66,6 +66,7 @@ enum symfollow { NO_FOLLOW = NOFOLLOW }; #include #include #include +#include typedef struct vop_vector vnodeops_t; #define VOP_FID VOP_VPTOFH @@ -100,11 +101,11 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync) #else if (vp->v_object->flags & OBJ_MIGHTBEDIRTY) { #endif - int flags = sync ? OBJPC_SYNC : 0; vn_lock(vp, LK_SHARED | LK_RETRY); - zfs_vmobject_wlock(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, flags); - zfs_vmobject_wunlock(vp->v_object); + if (sync) + vnode_pager_clean_sync(vp); + else + vnode_pager_clean_async(vp); VOP_UNLOCK1(vp); } } diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index 63e28f5f46b7..00b348814642 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -95,6 +95,7 @@ #include #include #include +#include #include "fuse.h" #include "fuse_file.h" @@ -945,11 +946,7 @@ fuse_io_invalbuf(struct vnode *vp, struct thread *td) } fvdat->flag |= FN_FLUSHINPROG; - if (vp->v_bufobj.bo_object != NULL) { - VM_OBJECT_WLOCK(vp->v_bufobj.bo_object); - vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object); - } + vnode_pager_clean_sync(vp); error = vinvalbuf(vp, V_SAVE, PCATCH, 0); while (error) { if (error == ERESTART || error == EINTR) { diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index f6506e34ee59..c027d7d7c3fd 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1428,11 +1428,9 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg) /* * Now, flush as required. */ - if ((flags & (V_SAVE | V_VMIO)) == V_SAVE && - vp->v_bufobj.bo_object != NULL) { - VM_OBJECT_WLOCK(vp->v_bufobj.bo_object); - vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object); + if ((flags & (V_SAVE | V_VMIO)) == V_SAVE) { + vnode_pager_clean_sync(vp); + /* * If the page clean was interrupted, fail the invalidation. * Not doing so, we run the risk of losing dirty pages in the diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index fdb94aee9139..be2024730cf0 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -47,6 +47,8 @@ #include #include +#include +#include #include #include @@ -236,7 +238,6 @@ ncl_inactive(struct vop_inactive_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np; struct thread *td; - boolean_t retv; td = curthread; np = VTONFS(vp); @@ -250,17 +251,9 @@ ncl_inactive(struct vop_inactive_args *ap) * buffers/pages must be flushed before the close, so that the * stateid is available for the writes. */ - if (vp->v_object != NULL) { - VM_OBJECT_WLOCK(vp->v_object); - retv = vm_object_page_clean(vp->v_object, 0, 0, - OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_object); - } else - retv = TRUE; - if (retv == TRUE) { - (void)ncl_flush(vp, MNT_WAIT, td, 1, 0); - (void)nfsrpc_close(vp, 1, td); - } + vnode_pager_clean_sync(vp); + (void)ncl_flush(vp, MNT_WAIT, td, 1, 0); + (void)nfsrpc_close(vp, 1, td); } NFSLOCKNODE(np); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 3f1ab9741673..0014f8a26d20 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include @@ -766,9 +767,7 @@ nfs_open(struct vop_open_args *ap) if (VN_IS_DOOMED(vp)) return (EBADF); } - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); + vnode_pager_clean_sync(vp); } /* Now, flush the buffer cache. */ @@ -854,9 +853,7 @@ nfs_close(struct vop_close_args *ap) if (VN_IS_DOOMED(vp) && ap->a_fflag != FNONBLOCK) return (EBADF); } - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, 0); - VM_OBJECT_WUNLOCK(vp->v_object); + vnode_pager_clean_async(vp); } NFSLOCKNODE(np); if (np->n_flag & NMODIFIED) { @@ -3637,7 +3634,6 @@ nfs_allocate(struct vop_allocate_args *ap) { struct vnode *vp = ap->a_vp; struct thread *td = curthread; - vm_object_t obj; struct nfsvattr nfsva; struct nfsmount *nmp; struct nfsnode *np; @@ -3667,12 +3663,7 @@ nfs_allocate(struct vop_allocate_args *ap) * file's allocation on the server. */ if (error == 0) { - obj = vp->v_object; - if (obj != NULL) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); - } + vnode_pager_clean_sync(vp); error = ncl_flush(vp, MNT_WAIT, td, 1, 0); } if (error == 0) @@ -3908,9 +3899,7 @@ relock: vn_finished_write(mp); goto relock; } - VM_OBJECT_WLOCK(invp_obj); - vm_object_page_clean(invp_obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(invp_obj); + vnode_pager_clean_sync(invp); } error = ncl_flush(invp, MNT_WAIT, curthread, 1, 0); } @@ -4069,7 +4058,6 @@ static int nfs_ioctl(struct vop_ioctl_args *ap) { struct vnode *vp = ap->a_vp; - vm_object_t obj; struct nfsvattr nfsva; struct nfsmount *nmp; int attrflag, content, error, ret; @@ -4114,10 +4102,7 @@ nfs_ioctl(struct vop_ioctl_args *ap) * size is up to date on the Metadata Server. */ - obj = vp->v_object; - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); + vnode_pager_clean_sync(vp); error = ncl_flush(vp, MNT_WAIT, ap->a_td, 1, 0); if (error == 0) error = nfsrpc_seek(vp, (off_t *)ap->a_data, &eof, diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 374019a2a643..5eb16564cf00 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -51,6 +51,8 @@ #include #include #include +#include +#include FEATURE(nfsd, "NFSv4 server"); @@ -1715,11 +1717,7 @@ nfsvno_fsync(struct vnode *vp, u_int64_t off, int cnt, struct ucred *cred, /* * Give up and do the whole thing */ - if (vp->v_object && vm_object_mightbedirty(vp->v_object)) { - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_object); - } + vnode_pager_clean_sync(vp); error = VOP_FSYNC(vp, MNT_WAIT, td); } else { /* diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index f09254289769..324f38abd10e 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -636,12 +636,7 @@ smbfs_vinvalbuf(struct vnode *vp, struct thread *td) } np->n_flag |= NFLUSHINPROG; - if (vp->v_bufobj.bo_object != NULL) { - VM_OBJECT_WLOCK(vp->v_bufobj.bo_object); - vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object); - } - + vnode_pager_clean_sync(vp); error = vinvalbuf(vp, V_SAVE, PCATCH, 0); while (error) { if (error == ERESTART || error == EINTR) { diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 0a0c1cd2f2a0..13f99a71ef04 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include @@ -717,7 +718,6 @@ static int aio_fsync_vnode(struct thread *td, struct vnode *vp, int op) { struct mount *mp; - vm_object_t obj; int error; for (;;) { @@ -725,12 +725,7 @@ aio_fsync_vnode(struct thread *td, struct vnode *vp, int op) if (error != 0) break; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - obj = vp->v_object; - if (obj != NULL) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, 0); - VM_OBJECT_WUNLOCK(obj); - } + vnode_pager_clean_async(vp); if (op == LIO_DSYNC) error = VOP_FDATASYNC(vp, td); else diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index e18c34656af4..20e220135b15 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -94,6 +94,7 @@ #include #include #include +#include #include #if defined(DEBUG_VFS_LOCKS) && (!defined(INVARIANTS) || !defined(WITNESS)) @@ -3989,7 +3990,6 @@ vdrop_recycle(struct vnode *vp) static int vinactivef(struct vnode *vp) { - struct vm_object *obj; int error; ASSERT_VOP_ELOCKED(vp, "vinactive"); @@ -3999,6 +3999,7 @@ vinactivef(struct vnode *vp) vp->v_iflag |= VI_DOINGINACT; vp->v_iflag &= ~VI_OWEINACT; VI_UNLOCK(vp); + /* * Before moving off the active list, we must be sure that any * modified pages are converted into the vnode's dirty @@ -4009,12 +4010,9 @@ vinactivef(struct vnode *vp) * point that VOP_INACTIVE() is called, there could still be * pending I/O and dirty pages in the object. */ - if ((obj = vp->v_object) != NULL && (vp->v_vflag & VV_NOSYNC) == 0 && - vm_object_mightbedirty(obj)) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, 0); - VM_OBJECT_WUNLOCK(obj); - } + if ((vp->v_vflag & VV_NOSYNC) == 0) + vnode_pager_clean_async(vp); + error = VOP_INACTIVE(vp); VI_LOCK(vp); VNPASS(vp->v_iflag & VI_DOINGINACT, vp); @@ -4112,11 +4110,7 @@ loop: * vnodes open for writing. */ if (flags & WRITECLOSE) { - if (vp->v_object != NULL) { - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, 0); - VM_OBJECT_WUNLOCK(vp->v_object); - } + vnode_pager_clean_async(vp); do { error = VOP_FSYNC(vp, MNT_WAIT, td); } while (error == ERELOOKUP); @@ -5094,17 +5088,12 @@ static void __noinline vfs_periodic_msync_inactive(struct mount *mp, int flags) { struct vnode *vp, *mvp; - struct vm_object *obj; - int lkflags, objflags; + int lkflags; bool seen_defer; lkflags = LK_EXCLUSIVE | LK_INTERLOCK; - if (flags != MNT_WAIT) { + if (flags != MNT_WAIT) lkflags |= LK_NOWAIT; - objflags = OBJPC_NOSYNC; - } else { - objflags = OBJPC_SYNC; - } MNT_VNODE_FOREACH_LAZY(vp, mp, mvp, vfs_periodic_msync_inactive_filter, NULL) { seen_defer = false; @@ -5120,11 +5109,11 @@ vfs_periodic_msync_inactive(struct mount *mp, int flags) continue; } if (vget(vp, lkflags) == 0) { - obj = vp->v_object; - if (obj != NULL && (vp->v_vflag & VV_NOSYNC) == 0) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, objflags); - VM_OBJECT_WUNLOCK(obj); + if ((vp->v_vflag & VV_NOSYNC) == 0) { + if (flags == MNT_WAIT) + vnode_pager_clean_sync(vp); + else + vnode_pager_clean_async(vp); } vput(vp); if (seen_defer) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 1401cc6da667..c739b5d5beaa 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -83,6 +83,7 @@ #include #include #include +#include #include #include @@ -3546,11 +3547,7 @@ retry: goto drop; vn_lock(vp, vn_lktype_write(mp, vp) | LK_RETRY); AUDIT_ARG_VNODE1(vp); - if (vp->v_object != NULL) { - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, 0); - VM_OBJECT_WUNLOCK(vp->v_object); - } + vnode_pager_clean_async(vp); error = fullsync ? VOP_FSYNC(vp, MNT_WAIT, td) : VOP_FDATASYNC(vp, td); VOP_UNLOCK(vp); vn_finished_write(mp); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 1852f2b1ef00..40596263d551 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -88,6 +88,7 @@ #include #include #include +#include #ifdef HWPMC_HOOKS #include @@ -2575,7 +2576,6 @@ int vn_bmap_seekhole_locked(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred) { - vm_object_t obj; off_t size; daddr_t bn, bnp; uint64_t bsize; @@ -2600,12 +2600,7 @@ vn_bmap_seekhole_locked(struct vnode *vp, u_long cmd, off_t *off, } /* See the comment in ufs_bmap_seekdata(). */ - obj = vp->v_object; - if (obj != NULL) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); - } + vnode_pager_clean_sync(vp); bsize = vp->v_mount->mnt_stat.f_iosize; for (bn = noff / bsize; noff < size; bn++, noff += bsize - diff --git a/sys/sys/param.h b/sys/sys/param.h index de6b56dd748a..33b07a431813 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500008 +#define __FreeBSD_version 1500009 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index ef93c1ab6783..3a415d766303 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -52,6 +52,7 @@ #include #include #include +#include static int ffs_rawread_readahead(struct vnode *vp, caddr_t udata, @@ -132,15 +133,10 @@ ffs_rawread_sync(struct vnode *vp) vn_finished_write(mp); return (EIO); } - /* Attempt to msync mmap() regions to clean dirty mmap */ - if ((obj = vp->v_object) != NULL && - vm_object_mightbedirty(obj)) { - VI_UNLOCK(vp); - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); - } else - VI_UNLOCK(vp); + VI_UNLOCK(vp); + + /* Attempt to msync mmap() regions to clean dirty mmap */ + vnode_pager_clean_sync(vp); /* Wait for pending writes to complete */ BO_LOCK(bo); diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 14775cace408..9d21eaa0cb56 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -48,6 +48,7 @@ #include #include +#include #include #include @@ -347,7 +348,6 @@ ufs_bmap_seekdata(struct vnode *vp, off_t *offp) struct inode *ip; struct mount *mp; struct ufsmount *ump; - vm_object_t obj; ufs2_daddr_t bn, daddr, nextbn; uint64_t bsize; off_t numblks; @@ -370,12 +370,7 @@ ufs_bmap_seekdata(struct vnode *vp, off_t *offp) * pages into buffer writes to ensure that we see all * allocated data. */ - obj = vp->v_object; - if (obj != NULL) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); - } + vnode_pager_clean_sync(vp); bsize = mp->mnt_stat.f_iosize; for (bn = *offp / bsize, numblks = howmany(ip->i_size, bsize); diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index f9fb1ba23655..d32fec845043 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1690,3 +1690,30 @@ vnode_pager_getvp(vm_object_t object, struct vnode **vpp, bool *vp_heldp) { *vpp = object->handle; } + +static void +vnode_pager_clean1(struct vnode *vp, int sync_flags) +{ + struct vm_object *obj; + + ASSERT_VOP_LOCKED(vp, "needs lock for writes"); + obj = vp->v_object; + if (obj == NULL) + return; + + VM_OBJECT_WLOCK(obj); + vm_object_page_clean(obj, 0, 0, sync_flags); + VM_OBJECT_WUNLOCK(obj); +} + +void +vnode_pager_clean_sync(struct vnode *vp) +{ + vnode_pager_clean1(vp, OBJPC_SYNC); +} + +void +vnode_pager_clean_async(struct vnode *vp) +{ + vnode_pager_clean1(vp, 0); +} diff --git a/sys/vm/vnode_pager.h b/sys/vm/vnode_pager.h index 77252a4fc9c2..7b8d79022a31 100644 --- a/sys/vm/vnode_pager.h +++ b/sys/vm/vnode_pager.h @@ -39,6 +39,9 @@ #ifdef _KERNEL +struct vnode; +void vnode_pager_clean_sync(struct vnode *vp); +void vnode_pager_clean_async(struct vnode *vp); int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, int *rbehind, int *rahead, vop_getpages_iodone_t iodone, void *arg); From nobody Thu Jan 11 18:27: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 4T9tSR3kptz56fY1; Thu, 11 Jan 2024 18:27: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 4T9tSR2zNPz3xDv; Thu, 11 Jan 2024 18:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjr5QoxkufljzKeJMFiGvPrkqojvSXz6zRHgPYoXtIU=; b=ynHN3BRG4ntuNBsIgXX75R13JRfoNSz5c7dNkA4PxsRjHWajQxtsGk859JyHfrFkzw2Dia EQRze3z7qq9HB+sji7TUlORzBNpwx/bTHw76ErRKLN/hJt8IoKaJS8E5UvUeiVVGmuas1U nZT+QDa0Dw8o1KYIdcJJheWPVtrsK2IV6MzkRm6HVmKiTL2BXIwdrfjqJv9AqDUhbb0jLh LdOTpJjdT8CrtSX8DhMnGwVhGRsAaQxeGbo5rYE6mCUY+WdImTdT3+faygYDThGTIfiL4h AfxWstqvyAiHxzBGh6mS1vAVOAIPLxgVla21CFa9N67GPZDAfSvxzWBtoH/7qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjr5QoxkufljzKeJMFiGvPrkqojvSXz6zRHgPYoXtIU=; b=OA/HAAWZRQWraEukH1Sjb5z0Nyl6A7/CHm+e7q+/WoJ5fI78vjcmpGAeGJ9TyRFxqbrZd3 KTnHEK7C7P1bNsim9LGeiVHmn3tbCJv3rHAATksQVmoOtsaS399vzXa5GUYgnCS2ZasOmp khmKrCdI7wanoRbT5ZQv7YgaOO7oACL/VC/Kl5H2GFItMGxvdc5EaC7dCeocyclopTtJc0 ywlg1p1AJA208n8Lmvq7haT1ukRU2kLRDAaB/feSi1pf5mEdfUl3btwMUeoZg/y6LTRTUg fGSH6G4CAr8t8WGxEZ1YRVi5+MEEcqlhPRvlNSkPhHhOyOHUNEJAuLbDaKOGBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704997655; a=rsa-sha256; cv=none; b=YyLc9YfWnonUzy1R48IJPn2+Psr7jX6fcTjl6ckW13i7JUbiAwuTQmYD1rALQSOpMBOswp cNl04nVZPw/2uNSJixZv8gaysc7TpFrHzW4XvrB+vRhY7VaGtd6bXNkNU+NL9v9/yYQYra M1g0pzxUo1zb8RDoQkMwM5vZn3jb+jTYPDPXB0uB8vbBj/Z8s75QVTcx+6MeKPr5urs9G5 P5xM85vMkMkSAXMD202iRj0bpOog6Zr+vj/dZdNxMU+43YypC3lFOM+Vg4zjmEl8M6G/mY m7FoXMt/l9l3FrSAEaIXZ7ofT2+Q2rjaug5u1M+AQSKaulblLD9P1hQ69JRWZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9tSR1wKBzVD5; Thu, 11 Jan 2024 18:27: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 40BIRZNE017653; Thu, 11 Jan 2024 18:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BIRZcK017650; Thu, 11 Jan 2024 18:27:35 GMT (envelope-from git) Date: Thu, 11 Jan 2024 18:27:35 GMT Message-Id: <202401111827.40BIRZcK017650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6597ea4481bb - main - powerpc/SYS.h: implement _SYSCALL_BODY() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6597ea4481bb29b6ac72b9c55038b1e98634bf92 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6597ea4481bb29b6ac72b9c55038b1e98634bf92 commit 6597ea4481bb29b6ac72b9c55038b1e98634bf92 Author: Brooks Davis AuthorDate: 2024-01-11 18:27:20 +0000 Commit: Brooks Davis CommitDate: 2024-01-11 18:27:20 +0000 powerpc/SYS.h: implement _SYSCALL_BODY() macro Add _SYSCALL_BODY() macro which invokes the syscall via _SYCALL() and calls cerror as required. Use to implement PSEUDO() and RSYSCALL(). Reviewed by: jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43323 --- lib/libc/powerpc/SYS.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h index 8c47a65735f5..b990793c7e3e 100644 --- a/lib/libc/powerpc/SYS.h +++ b/lib/libc/powerpc/SYS.h @@ -40,14 +40,17 @@ li 0,(SYS_##name); \ sc +#define _SYSCALL_BODY(name) \ + _SYSCALL(name); \ + bnslr; \ + b CNAME(HIDENAME(cerror)) + #define PSEUDO(name) \ .text; \ .align 2; \ ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnslr; \ - b CNAME(HIDENAME(cerror)); \ + _SYSCALL_BODY(name); \ END(__sys_##name) #define RSYSCALL(name) \ @@ -56,7 +59,5 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnslr; \ - b CNAME(HIDENAME(cerror)); \ + _SYSCALL_BODY(name); \ END(__sys_##name) From nobody Thu Jan 11 18:27: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 4T9tSS4yV2z56fP4; Thu, 11 Jan 2024 18:27: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 4T9tSS3Yrvz3xHQ; Thu, 11 Jan 2024 18:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NNmz/lpKsrBhnc6XYx9gRAEOUFayvzCTX8HpGeS03rQ=; b=DupPPM9H7/qOOjM4rq39taHPMZMYUtaEV71qKpCi/5PT+pNsx2k3avDe1DZS11ltKbOFus EgH7XSnQgpPlD+Bh9Q0o+8sOU5SPqXCk4ZjIcfK919yYefon5D8CqvrVwTkzKnz6nNua7Z 9GRCTk8KKJEjd+DP1HVa5HuF53/+KU4lNhA4uB/e3RB8mDGIglchbNWvPOsR6RH6VBNCf/ AytlMC+F2vzYKttLvMK+A3VycYRX6ApYR6EcICMEvP6WMsM83uiy2SXX3CKYbJ5JvNKIBg 0v3PnOtSSTtIKUHkifnifUc4kWtIL0zihVMpqQEBs0+oQhtgPN8tyUmt+OiXYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NNmz/lpKsrBhnc6XYx9gRAEOUFayvzCTX8HpGeS03rQ=; b=l5/ceeuJWkJuNgXv91KIHGPc/NhyEENO+H9OGduNxCe1MGW0oZPeRra8xgItKzK9tpAdEL S/K5UhiQIV4iWTHMG0FtrisKwRCDqfwQoW8xycKOIwJ0WCdgVorY9WN5NHYP6PHdlbQ0yy SduroFTvXXUMpgZ8RuiF5zY7SBP+iWOyTdGaokSzw8n4BUwBAO9MbQd6oLmCk7yKOnV0ZQ defhZmpEIfH9mBQGOCt0j+B01d04nq/maPvYDFLZ0HfDaYz6sP6wX4ZuQkteJby4R6hcEj vTsiqGNyrhBjoNGOpKx/iD1JvARkA+++slObg8teD+utwdxdqLgG/aA6zGsKSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704997656; a=rsa-sha256; cv=none; b=QSuv3i8D5XDgYfDKuSfdIWbX2ZfU6WZkQNa5LNxVciAfqN4V2VH+Ywkg63pawRa3zU9RUp Nfvzq/doagQ2naV7nrmekr2/8BLmBQQuOpt5boW6mbXk+RMupDaSWAlWtOcI/uMvLYJmsl xQNY66eJSbYLLBTS74BZPWGaN67wadMZ1q2xZjuyfEvMooB41FdTPVjgWo/cdhFHV1S2Gc XN6iMawfu6u+P4X6+l0gGlctjWfk13eqO8io8Tx+J2/40VCIZEA2MBgXK+wgp+yY0g2GVi Zqn2Bf1HH6Cao2OJ9JMm1OQ9tVh8xkTkeR7zo72WCbLx2TANi///LK/akHxyBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9tSS2gF0zTrZ; Thu, 11 Jan 2024 18:27: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 40BIRaUP017701; Thu, 11 Jan 2024 18:27:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BIRaTp017698; Thu, 11 Jan 2024 18:27:36 GMT (envelope-from git) Date: Thu, 11 Jan 2024 18:27:36 GMT Message-Id: <202401111827.40BIRaTp017698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e2417a21a025 - main - libc: separate syscall and non-syscall symbols List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2417a21a02562655d760005e9827f1190bb652f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e2417a21a02562655d760005e9827f1190bb652f commit e2417a21a02562655d760005e9827f1190bb652f Author: Brooks Davis AuthorDate: 2024-01-11 18:27:20 +0000 Commit: Brooks Davis CommitDate: 2024-01-11 18:27:20 +0000 libc: separate syscall and non-syscall symbols Put declerations of _ and __sys_ prefixed stubs at the top and everything else at the bottom. Sort the bottom list with sort(1). This paves the way to generate the syscall symbol list. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43386 --- lib/libc/sys/Symbol.map | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index f17aae279b8d..a2b8c2d40fc1 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -425,6 +425,7 @@ FBSD_1.7 { }; FBSDprivate_1.0 { + /* System call stubs */ ___acl_aclcheck_fd; __sys___acl_aclcheck_fd; ___acl_aclcheck_file; @@ -536,8 +537,12 @@ FBSDprivate_1.0 { __sys_connect; _cpuset; __sys_cpuset; + _cpuset_getdomain; + __sys_cpuset_getdomain; _cpuset_getid; __sys_cpuset_getid; + _cpuset_setdomain; + __sys_cpuset_setdomain; _cpuset_setid; __sys_cpuset_setid; _cpuset_getaffinity; @@ -966,7 +971,6 @@ FBSDprivate_1.0 { _sigtimedwait; __sys_sigtimedwait; _sigwait; - __sigwait; __sys_sigwait; _sigwaitinfo; __sys_sigwaitinfo; @@ -1040,14 +1044,13 @@ FBSDprivate_1.0 { __sys_write; _writev; __sys_writev; - __set_error_selector; - nlm_syscall; - gssd_syscall; + + /* Things that aren't system calls (in sort(1) order) */ __libc_interposing_slot; __libc_sigwait; - _cpuset_getdomain; - __sys_cpuset_getdomain; - _cpuset_setdomain; - __sys_cpuset_setdomain; + __set_error_selector; + __sigwait; + gssd_syscall; + nlm_syscall; rpctls_syscall; }; From nobody Thu Jan 11 19:20: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 4T9vdq29Sgz56lnM; Thu, 11 Jan 2024 19:20: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 4T9vdq1jmsz43N6; Thu, 11 Jan 2024 19:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705000847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6MAztWd3v1pI4V3L35TDFK/dwfhfJgmiiFeDJhVvyQ=; b=szu5G7KKFbp96NFJs2cWJOZVkl4vE0Yq2oeOZnsfqskEtg8x9fQPFGV+0mN81tnDQMgPGH ca17Xlq18PM8oty4PdCY44m3gPjTTXdzFvLcm3LjhhrAyqOyTecFnXxGexaGc6eNthB/9o u1ljL7lIJBQ5No7ZCkZf+GZXmRTELJECs9AazZp01sY3SHqM3iWsir4h3HZqxwFM7a5S7d 8hlLszh6f2cS0bCizJuh6SDBgyItaDXroKzuvc8yVgg316rWl8Db3nqV6uL8AGjknDoAJc ZHud9I/yz65ZiF1g+1zfgVq2XgnltwfN2RkqQGtoAwZ43gOjaBlxld72dUYmCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705000847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6MAztWd3v1pI4V3L35TDFK/dwfhfJgmiiFeDJhVvyQ=; b=WYnCif0Zin9cO2+GcbFLpyrqJIahWbmbQvLfrJBURbWIjCc0PTmNuudepUBPTQf6f0q5Ep 5/cYs6S2rgWbkXSXt75TksVhB1+1MuRN2jAzH9MMk82LYWAIS5xRYW3I6w9mRaRIsraCYL op0ultXCJWsXljfggKOrjXT1ovwwprEJHAYwf0GhNopFpTTBdT0StvS4WAyoRAnR0xyqgL oWsmhm0kf6XxTVWoozJ/djU/C+hXiyewIwmsgVzFyrVvIgC4xwJwMLY/Oc/O7v9sAb6ru/ 5NPTyJ812TJ58dWjBH8u9fUJ0NGNuU5Jy2tvMoNvxHzd20IOkDBtmhFzPRvtVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705000847; a=rsa-sha256; cv=none; b=djgHFwMMAx3CWd/B2z77LBDaiGXH3I7eN9p32icTmWlgK6etIloGtCthgbDXJ2OlwzT+uE L+VPAmdP6xd5qdOD7gTS76guhFEaW6/YZsdnEhgPk55IPvGx6ij9bkBNiU5CZQF46CCKpP jFG7tarL2UFUIp6zg6OMxibgSoyTxgbuMA742BqXHm8+n2TDZhxvm47iNauCstQrZGedEj iM/UVOxlKN7VqaiXj3y+B2A0exajFQI37WLn6bdqxcq3TQx1CQNQUrVGiL3eB69nyTWVZu ca9UdRy9kaVuVXCXGLE7Mmsd9mdlozqeTFwXiKg3bghWtgzvF5mov2p9LCtsNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9vdq0qDLzWxB; Thu, 11 Jan 2024 19:20: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 40BJKlVP011972; Thu, 11 Jan 2024 19:20:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BJKl8X011969; Thu, 11 Jan 2024 19:20:47 GMT (envelope-from git) Date: Thu, 11 Jan 2024 19:20:47 GMT Message-Id: <202401111920.40BJKl8X011969@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: d682a91726d7 - main - conf: Do not set -fno-sanitize-memory-param-retval for old compilers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d682a91726d72eaf7ba8dddeb4d9ce161ab8b93a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d682a91726d72eaf7ba8dddeb4d9ce161ab8b93a commit d682a91726d72eaf7ba8dddeb4d9ce161ab8b93a Author: Mark Johnston AuthorDate: 2024-01-11 16:42:47 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 19:20:22 +0000 conf: Do not set -fno-sanitize-memory-param-retval for old compilers The option was introduced in LLVM 16. Fixes: b6c653c97463 ("kmsan: Set -fno-sanitize-memory-param-retval for now") MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/conf/kern.pre.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 158175eb6899..6bf647f5c3ea 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -125,8 +125,10 @@ KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo # Disable -fno-sanitize-memory-param-retval until interceptors have been # updated to work properly with it. SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kmsan \ - -fsanitize=kernel-memory \ - -fno-sanitize-memory-param-retval + -fsanitize=kernel-memory +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 160000 +SAN_CFLAGS+= -fno-sanitize-memory-param-retval +.endif .endif KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo From nobody Thu Jan 11 20:34: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 4T9xGQ3dPwz56vNg; Thu, 11 Jan 2024 20:34: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 4T9xGQ36fRz4Cwl; Thu, 11 Jan 2024 20:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705005246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+I45HK0CvPhSjXds7/YWzmcfaCM3m5nM+2mfv/y1QM0=; b=so8d29Ni9V4Aua54FkSKloxP9yY/tduPu5gVif12fycgtYkpFvGJ0dU7x+tFSAkyqgOJ6k GvamUVy7y4LrH4L9hXD03SWhv3tGpxpd8eR2sMe9v6UUqhobhEH/rTHvTDxWlMalbX2JrU y/rcEDE5yN1XsXZroQOTxFkLvJ6mTvGYC6J8bC8xzsAF8mV/VKAxcWm/qMCeqEeglJ5YKl /vpuZsn7lZTr2bbJYvZfi4Salh3h2hachUZyb7x+KH1ftOt2La07NoYvFYZi2NhNdUJl4q QBdDczqg0n8+gqPJTgNBGl/EL4YLSh/wxj/i5yqijcWouTyLhUSIu50GAzfKEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705005246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+I45HK0CvPhSjXds7/YWzmcfaCM3m5nM+2mfv/y1QM0=; b=pYxMHv54XZSgmsOibLOHJjAVo2rw5HEm1vDaz7NafV4jrjXIGIoZkci0C8DbRpK4oTOI6f 3RNkcSAXkm+d77TKL0aLd+NfRSlrsEONpYxcdyW0XeJlxZt7Fted40CsrqhlmLS8HC05Hn IS5u/57l4IeMOoG4Prh5lOVVi3UvzrO6bMCc7AdWJbPzMeZfYRjVvdKTUtmpk4J59glU8J 2R3MTbc3Os2nR9L5r7JdYLnLEud/GicnrO6wlveL6cct037f9gGKex7YNXwZJ1AavlrRYi US+AD99vfcnBx8HN0wA39xGV/gM1JeQPQXiQ2o2DtyT13n0kY8wdY8gwmNbqlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705005246; a=rsa-sha256; cv=none; b=llVgf/AJ8ZaIUxyWY4QK7GpkbBza7bYjRvVMyo3jp9/KdL/c9DgoRR1NTsNRuBijpgwCpN SG08CeSIIEwNS+R/s0gnQWL4jQr3u97ilPTuXmXYARKkoJ3zMp6xjHpLoZ9Q7olNJNPSMX oqlKw8/6R4RCVsOELoxgdApPgWX6NJ7sxiFE+Lnn6nbsRjr6SjfYlZ/DUVM8RiZS5S+KG7 NlqWALgK8gbsSl8AMIQUz9LQiRau/fFw3yZaY/W7ujwHgnzKd89xZh1nrtNbI06PH1YF63 LcELNEtM+4xVgkkPEmPi12NDTT2Khx6XTgRM1OLvUPaZ8MabCxh8Kf6rwSw0Iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9xGQ29S4zZ1V; Thu, 11 Jan 2024 20:34: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 40BKY6tv035112; Thu, 11 Jan 2024 20:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BKY6bC035109; Thu, 11 Jan 2024 20:34:06 GMT (envelope-from git) Date: Thu, 11 Jan 2024 20:34:06 GMT Message-Id: <202401112034.40BKY6bC035109@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 0e1d8481f93c - main - ktls: fix vnet-related panic in ktls_reset_receive_tag() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e1d8481f93c58008c5a2ef68c3a46a0da83644a Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=0e1d8481f93c58008c5a2ef68c3a46a0da83644a commit 0e1d8481f93c58008c5a2ef68c3a46a0da83644a Author: Martin Matuska AuthorDate: 2024-01-11 20:31:15 +0000 Commit: Martin Matuska CommitDate: 2024-01-11 20:32:29 +0000 ktls: fix vnet-related panic in ktls_reset_receive_tag() Reviewed by: gallatin, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43400 --- sys/kern/uipc_ktls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index b69d16446b47..deba6940bbee 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1644,7 +1644,9 @@ out: if (ifp != NULL) if_rele(ifp); + CURVNET_SET(so->so_vnet); sorele(so); + CURVNET_RESTORE(); ktls_free(tls); } From nobody Thu Jan 11 23: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 4TB1LN46fMz56ns3; Thu, 11 Jan 2024 23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TB1LN2lXNz4VMZ; Thu, 11 Jan 2024 23: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=1705016268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cz6ZU2LBkkk7R3yi+wJEJ7rOLLAkOnvAj7LP47Ig9A4=; b=kAwgzi61dZtrT0kg8mW7xTxGzaks36Ea3qnkk/BexeGHN1BF4gjzukbm+vsqnfFcFUrI43 UVljhZjwEgg0KvuBYQlsZSQvw9/OMv7yWizYA6Lfud3ZjZr4L87SRT5MQlI9r4GOX+gOrK /KMDTkWKxw4DbH8Bfhq3qT4CRSBZGXaLZwDqN+mmhVkKkJBNW5TciphF8RdqAiMvIn9TFm 3xXYD52ZkQuy0z9I+T/QMq+ArCH/NAslZ/tukN+cVGviWDSYJPl8hpZcduCVOv5SSX6wnU KPD4xOcyuHVqAY4o665uSsr85d439KwnVZQ/y//r0j3NNRJ8In05t/0NH9PIYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705016268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cz6ZU2LBkkk7R3yi+wJEJ7rOLLAkOnvAj7LP47Ig9A4=; b=JagnuD0MLopCh4Nl6O8/9rty87P7JW4yKVG4EUI8hQ0ISrVjos/KDfJwYBUODG+yejKXsO Or3eOy285HLhLCUO06lRU4vhmZCT8gkKbdAtYCWrlWXt1fucnCPo+uR7d20RaVV8rn6BuH bEGRUOsM4elo0fmWup6cwf6cumYn26InuKbS2rDIZRfSMfhy9N4IJE4scYWq5mNQw9qf9a 2i7zm//X6I49p4Ipmh+7dDVfzxKLbzR7C4CC6pmyorm8ySum+KSVfc/9cY7V0o17lpJMB/ M5t7CnHeznd4c1KfQMPn1UQNDZmaofiGew3SRIjHUePC23fjp8Sqh2IFeUKuHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705016268; a=rsa-sha256; cv=none; b=pcPORQDotb9Sbl5nhyCU+ZtkXGhcX57lwbS8xriGeR/Vamrw2Yq7GKWnX22SvrfgE1jAsD cw4IWltyvpam+IvgyVyzhvLaol51Rb1pjLPjPXqajxAtGfJSRyii9uVXwOwTADovl3BGdO qkhr2bJiQ7F71UkUpsd/GylEm7tk5he+MdL2/kPr2zyw9k0guz0aBK/7q4K27VmgLfKwGJ +uW7/u+Jqa3Cv3sMtOn9BeOcn+oxbqqNxWE+/j5SmQe5KRf6wc2t37MaWCFYAXasPJzTPg +zd/wsxOJQbP33YPrJPJh5XmWppz+vmPL8HDNPHs3tsMrWPFuIHEaB8MShjpSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TB1LN1Y80zfP2; Thu, 11 Jan 2024 23: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 40BNbmnH037686; Thu, 11 Jan 2024 23: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 40BNbmG1037683; Thu, 11 Jan 2024 23:37:48 GMT (envelope-from git) Date: Thu, 11 Jan 2024 23:37:48 GMT Message-Id: <202401112337.40BNbmG1037683@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: d06a00963b7f - main - find: add SIGINFO handler List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d06a00963b7f724b6fdd7d7cdcbed57c534196a9 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d06a00963b7f724b6fdd7d7cdcbed57c534196a9 commit d06a00963b7f724b6fdd7d7cdcbed57c534196a9 Author: Goran Mekić AuthorDate: 2024-01-11 22:35:25 +0000 Commit: Alan Somers CommitDate: 2024-01-11 23:37:14 +0000 find: add SIGINFO handler Print number of files processed and path currently being processed on SIGINFO. Reviewed by: des, asomers Sponsored by: Axcient MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43380 --- usr.bin/find/extern.h | 1 + usr.bin/find/find.c | 9 +++++++++ usr.bin/find/main.c | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index c84ca8953e50..a1bd5e6d16a5 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -121,3 +121,4 @@ extern int exitstatus; extern time_t now; extern int dotfd; extern FTS *tree; +extern volatile sig_atomic_t showinfo; diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 54b4fdd679e4..aec04536071a 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -167,6 +167,7 @@ find_execute(PLAN *plan, char *paths[]) { FTSENT *entry; PLAN *p; + size_t counter = 0; int e; tree = fts_open(paths, ftsoptions, (issort ? find_compare : NULL)); @@ -208,6 +209,14 @@ find_execute(PLAN *plan, char *paths[]) continue; #endif /* FTS_W */ } + + if (showinfo) { + fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); + fprintf(stderr, "Scanned: %lu\n\n", counter); + showinfo = 0; + } + ++counter; + #define BADCH " \t\n\\'\"" if (isxargs && strpbrk(entry->fts_path, BADCH)) { (void)fflush(stdout); diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 746bd91d80b7..0738da4071c8 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -59,8 +59,10 @@ int isxargs; /* don't permit xargs delimiting chars */ int mindepth = -1, maxdepth = -1; /* minimum and maximum depth */ int regexp_flags = REG_BASIC; /* use the "basic" regexp by default*/ int exitstatus; +volatile sig_atomic_t showinfo = 0; static void usage(void) __dead2; +static void siginfo_handler(int sig __unused); int main(int argc, char *argv[]) @@ -72,6 +74,8 @@ main(int argc, char *argv[]) (void)time(&now); /* initialize the time-of-day */ + (void)signal(SIGINFO, siginfo_handler); + p = start = argv; Hflag = Lflag = 0; ftsoptions = FTS_NOSTAT | FTS_PHYSICAL; @@ -152,3 +156,9 @@ usage(void) " find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]"); exit(1); } + +static void +siginfo_handler(int sig __unused) +{ + showinfo = 1; +} From nobody Fri Jan 12 00:40: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 4TB2kP1Yvlz56wnm; Fri, 12 Jan 2024 00:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TB2kP14Pyz4cqY; Fri, 12 Jan 2024 00:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvH5h6c1amwf+Wt8ci0TY88dQWFy6jtdaxEVzSm+mQg=; b=ImmLJ3VcYKVPUEFmdrgZR53wxeSX3iQjS+jRNmGe6iuigRRLXgu80/VY5l9mXVwBbikLkc Z9qiisjyby0xErwBKfnBrMWX4DbwKW6Djo16Rl6j8fYsBFeT0PhvEfGgVYM1FBtZwbPVl2 uQaraHZ3PAVAaTTvBko8UJzwAEKC0eoUVgY6ARDxFKwJul2RUMozEfcQdnzqVKagJsMRz6 t9+6B5XCNpBJwXaUMYmGSxDyDNVYqSQAnKnUlM4QTn//r6pMGAumTYUm4Bs1OnasDnjuZI iKnrZ5Jzh9tbmASAD26T2eIAVx/IFDxxSX+tmHFTAfN6IQ3ekFOPPVi2SD1yvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvH5h6c1amwf+Wt8ci0TY88dQWFy6jtdaxEVzSm+mQg=; b=YPh7tXJ45nnxQ3CKtEDAvQbLSnn6JxvvGvQkq8mYmXbNov9IowAxu+auvELCi/aNQXngfK gu5+bG5CScMt4crL7IaT+d2154CgD0oOLxgdHfttKFblCFMEAqGfxHdXxqCliffT+pMvMc D6cT/uzhi9PDvCxJAFVuWTuXagpldf9BvmYT3JStpAhTFC+9kbj5rtM1785w27b4VC4Seg tZwyR2865T5WjhH1dzxGnnpnNp2Vp4zKd928q78jnV9yIvOB/a+LWGxEQErFPi3psqLh+t jelYqoEV8Zwem+Tkb1xuFEGn+cuGoNRah3uJpDqxZl2SB3zc5tMehxbFKI8oLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705020013; a=rsa-sha256; cv=none; b=CMFL4IsN7EOscZYEwLsw5S5AstTQIiDyFR8RSIOVAqJZlebIIBb7qGvgFu7VPf5Sh2jTPl EWP/XabsEF8ljpfauAcNfX5KjkyO/+Y9WJYHSSK7hSnQ2/Qg/aKwQZi8ljexkV7nDW+zaf Ob8C/tNBorRguNjGF8azCn/S8xlaX+OvAHMsyXNwA2UeTkGujVSrNGpBXyAU0eulWu2dUI HUT9GyMnRJ9wF+wecP2xXIJcprZZyrg7mvLxp4G5B5uSeTlotlOi0ytrNkz9mnIblATjTx d2huZO3l9hoj7pH6AxFHMQYoAnfoRfrRRv/YYmfBXUBWe3hhz5t/itwBH3SLPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TB2kP06lXzgCP; Fri, 12 Jan 2024 00:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40C0eC4l043972; Fri, 12 Jan 2024 00:40:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C0eCj6043960; Fri, 12 Jan 2024 00:40:12 GMT (envelope-from git) Date: Fri, 12 Jan 2024 00:40:12 GMT Message-Id: <202401120040.40C0eCj6043960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: cc760de2183f - main - nfscl: Only update atime for Copy when noatime is not specified List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc760de2183f9c9a4099783d3ff4c770521a4cb6 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cc760de2183f9c9a4099783d3ff4c770521a4cb6 commit cc760de2183f9c9a4099783d3ff4c770521a4cb6 Author: Rick Macklem AuthorDate: 2024-01-12 00:38:33 +0000 Commit: Rick Macklem CommitDate: 2024-01-12 00:38:33 +0000 nfscl: Only update atime for Copy when noatime is not specified Commit 57ce37f9dcd0 modified the NFSv4.2 Copy operation so that it will update atime on the infd file whenever possible. This is done by adding a Setattr of TimeAccess for the input file. This patch disables this change for the case of an NFSv4.2 mount with the "noatime" mount option, which avoids the additional Setattr of TimeAccess operation. MFC after: 1 week --- sys/fs/nfs/nfs_commonsubs.c | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 28 +++++++++++++++++----------- sys/fs/nfsclient/nfs_clvnops.c | 28 ++++++++++++++++------------ 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index e79f73739487..3c9af40253ad 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -296,7 +296,7 @@ static struct { { NFSV4OP_OPEN, 8, "CreateLayGet", 12, }, { NFSV4OP_IOADVISE, 1, "Advise", 6, }, { NFSV4OP_ALLOCATE, 2, "Allocate", 8, }, - { NFSV4OP_SAVEFH, 6, "Copy", 4, }, + { NFSV4OP_SAVEFH, 5, "Copy", 4, }, { NFSV4OP_SEEK, 2, "Seek", 4, }, { NFSV4OP_SEEK, 1, "SeekDS", 6, }, { NFSV4OP_GETXATTR, 2, "Getxattr", 8, }, diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index e9acedfb6473..09660730d485 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -8728,7 +8728,7 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, int *outattrflagp, bool consecutive, int *commitp, struct ucred *cred, NFSPROC_T *p) { - uint32_t *tl; + uint32_t *tl, *opcntp; int error; struct nfsrv_descript nfsd; struct nfsrv_descript *nd = &nfsd; @@ -8737,14 +8737,15 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, struct vattr va; uint64_t len; - nmp = VFSTONFS(outvp->v_mount); + nmp = VFSTONFS(invp->v_mount); *inattrflagp = *outattrflagp = 0; *commitp = NFSWRITE_UNSTABLE; len = *lenp; *lenp = 0; if (len > nfs_maxcopyrange) len = nfs_maxcopyrange; - NFSCL_REQSTART(nd, NFSPROC_COPY, invp, cred); + nfscl_reqstart(nd, NFSPROC_COPY, nmp, VTONFS(invp)->n_fhp->nfh_fh, + VTONFS(invp)->n_fhp->nfh_len, &opcntp, NULL, 0, 0, cred); /* * First do a Setattr of atime to the server's clock * time. The FreeBSD "collective" was of the opinion @@ -8753,13 +8754,17 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, * handled well if the server replies NFSERR_DELAY to * the Setattr operation. */ - NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); - *tl = txdr_unsigned(NFSV4OP_SETATTR); - nfsm_stateidtom(nd, instateidp, NFSSTATEID_PUTSTATEID); - VATTR_NULL(&va); - va.va_atime.tv_sec = va.va_atime.tv_nsec = 0; - va.va_vaflags = VA_UTIMES_NULL; - nfscl_fillsattr(nd, &va, invp, 0, 0); + if ((nmp->nm_mountp->mnt_flag & MNT_NOATIME) == 0) { + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_SETATTR); + nfsm_stateidtom(nd, instateidp, NFSSTATEID_PUTSTATEID); + VATTR_NULL(&va); + va.va_atime.tv_sec = va.va_atime.tv_nsec = 0; + va.va_vaflags = VA_UTIMES_NULL; + nfscl_fillsattr(nd, &va, invp, 0, 0); + /* Bump opcnt from 7 to 8. */ + *opcntp = txdr_unsigned(8); + } /* Now Getattr the invp attributes. */ NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); @@ -8798,7 +8803,8 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, if (error != 0) return (error); /* Skip over the Setattr reply. */ - if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + if ((nd->nd_flag & ND_NOMOREDATA) == 0 && + (nmp->nm_mountp->mnt_flag & MNT_NOATIME) == 0) { NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); if (*(tl + 1) == 0) { error = nfsrv_getattrbits(nd, &attrbits, NULL, NULL); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 0014f8a26d20..0b8c587a542c 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3934,18 +3934,22 @@ relock: */ if (inoff >= vap->va_size) { *ap->a_lenp = len = 0; - VATTR_NULL(&va); - va.va_atime.tv_sec = va.va_atime.tv_nsec = 0; - va.va_vaflags = VA_UTIMES_NULL; - inattrflag = 0; - error = nfsrpc_setattr(invp, &va, NULL, - ap->a_incred, curthread, &innfsva, - &inattrflag); - if (inattrflag != 0) - ret = nfscl_loadattrcache(&invp, - &innfsva, NULL, 0, 1); - if (error == 0 && ret != 0) - error = ret; + if ((nmp->nm_mountp->mnt_flag & MNT_NOATIME) == + 0) { + VATTR_NULL(&va); + va.va_atime.tv_sec = 0; + va.va_atime.tv_nsec = 0; + va.va_vaflags = VA_UTIMES_NULL; + inattrflag = 0; + error = nfsrpc_setattr(invp, &va, NULL, + ap->a_incred, curthread, &innfsva, + &inattrflag); + if (inattrflag != 0) + ret = nfscl_loadattrcache(&invp, + &innfsva, NULL, 0, 1); + if (error == 0 && ret != 0) + error = ret; + } } else if (inoff + len > vap->va_size) *ap->a_lenp = len = vap->va_size - inoff; } else From nobody Fri Jan 12 00:49: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 4TB2wz5dv5z56y9B; Fri, 12 Jan 2024 00:49: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 4TB2wz4rCjz4dtj; Fri, 12 Jan 2024 00:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=seFegDUCa6dMLT2ER9S3YZ2Zm2Zkd8nKamcSS4fHtKo=; b=wOQd/+H62vObuJSKZ4fetm7eg5SYOe2IWrdUpw939HUSncnHWlzvNAadK5Vcls2gCLHGuQ fE9hFT46uHcmMPEQtlCfjC35FuiskL9JbwZTIsfJsqYlX3isJMjbKff5Z+nFwX/6yTVucR vIbKvKyqzfnyWmZC57GEuxgMwymflIjBKpGzm67N3zZZP1/JiRzw0iEqRdo7PgYVzPjTne A1JPAGArSJ6ShVAPC46271mi4sWrB2oLvsEu7A7lM+Je059MhS5ksSmy0NUDsiTprLb67J g/uZbUb+5To0ZLDl/Nyc3Hm/LE1Fg7BG3JVtc5nKj47lTc9wE1bL2r/+lSH+6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=seFegDUCa6dMLT2ER9S3YZ2Zm2Zkd8nKamcSS4fHtKo=; b=B1lGlYgFJ0j1FnyKiFLS40GlHV2PluMRtgOpAmedVhLhd4MFZNY4E6U9ah9ltFMZDe3lTw FrAEfCtXU060DBY45r8y3e8xLqEvwwY0O9hIfDeL8tBX/K41FouojP2nLC28sB+MGq2nou LL/TTF1qClg8YduciIqABNsnU4SCH2H256yrkH8atMB7ux1lhaceo9A80lCh6MZeHxsdx2 64vvJzdZZxS7ril/jM+sm25RJwpEBoSpNxyQfBF/jWKuixTfShLnCbRp7ugwa3iS4uC0zN XvuRZN5rVaUmu7kA27Me/TbdVV7zzUV+h2h0BP187ca3COjJS2+OWvm8ZLuAeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705020563; a=rsa-sha256; cv=none; b=CptUvykHszrL6wvOBiNYV6xmaEV2r3ChCZM4GCiqvoa8yuXXzZryPWl7j08kVTCnmsqnOp GNJoIguzfLyp/JcXYh6pRbOO7I4+9YpAn/tLqiI4SyTlhxOi4Nd4GH99hwIeAdlKA2GkYt reUQ00+Za7CwiEWn8zYFNjUU/4zuim2Mtk41/huxRIDQ3vtpXtHuXpUocEUCkXEv054WB7 UYr/zGiIrq+V4PCtUc83Rc8CgEnbzblVlNhzj2gqsl2VBeyWGzflNTXtqb0UVX2rmCwizQ HDQlXJqWqN6ANLI5r6Jm874/3v6+TO2exhcTjACT6KI9iM8Qtv5Gvxp/vD4ERw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TB2wz3vs9zgnd; Fri, 12 Jan 2024 00:49: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 40C0nNf9055236; Fri, 12 Jan 2024 00:49:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C0nNfZ055233; Fri, 12 Jan 2024 00:49:23 GMT (envelope-from git) Date: Fri, 12 Jan 2024 00:49:23 GMT Message-Id: <202401120049.40C0nNfZ055233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: a2da1bdb61bc - main - param.h: Bump __FreeBSD_version to 1500010 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2da1bdb61bc2d9db0b4268f53281e7c0bbce0bc Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a2da1bdb61bc2d9db0b4268f53281e7c0bbce0bc commit a2da1bdb61bc2d9db0b4268f53281e7c0bbce0bc Author: Rick Macklem AuthorDate: 2024-01-12 00:48:23 +0000 Commit: Rick Macklem CommitDate: 2024-01-12 00:48:23 +0000 param.h: Bump __FreeBSD_version to 1500010 Commit cc760de2183f changed the internal interface between the nfscommon and nfscl modules. As such, both need to be rebuilt from sources. Therefore, bump __FreeBSD_version. --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 33b07a431813..f912d193bc4a 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500009 +#define __FreeBSD_version 1500010 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Fri Jan 12 00:55:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TB33j6Yv7z56yTl; Fri, 12 Jan 2024 00:55:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TB33j5f3yz4fsJ; Fri, 12 Jan 2024 00:55:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OjJh9Y2x7BA3lM2Gki6cej59i216zHKdCA/E8TTmG2g=; b=VVi4eeYMsi6pEccoQFxp3pH3rC7IdLsj6qk/wAyKjuunqItv6xMyw2FpgqS0PXk69L8O6N KxUYjSh7Xhk6cukeRDEIeFp3LVDjp+WjrNH9E1DfBAVz3ukxT2kwJZ5HfGV1Ptm2N1iNfa ptsIthPGhU9HQCuO4pWxmobSIPuFfIFLyDyJT03OLAbKuOzmciM1YUoIQHtyUya2kMfru+ ++cw37BfRdWB4U0hAxi7tkaqELqbxag1sla/vPs6NoJDqX/ZoxTxuLnZvFT9Kcz9bwXDsb MNMuYxwDI3ma3pbBYde3ie5csNQtkvd/DYTCkHNiTYqYJZ4R67hkkrOC/RuMfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OjJh9Y2x7BA3lM2Gki6cej59i216zHKdCA/E8TTmG2g=; b=sR+ZkzndvFH2MU2FJos7urcolLzobejk3Er7JXGkwwci4t5GI7XqgeuvmTFS3h3OorGQUs a2B6DllPMecDNvv0ydqnpToV4FNwMFoqWQKt5Rd1jhYGgKy1+RRtcUB8V1eE1QutNc1y9U Iuyagl4qVaGI9f2RMZgTmbjdtIo3ukqeFUqFbp48lcj08Z5LIMP+CxO80GybipvBPPdGBy i5a6hh/NiX9VXzY5bzn9VteaV3Ej8WX0jc7AnUnJ3MXV8iG/6+wLtp4PeQmaOpoZeWEGLA dHJxHP/NLI8RykbbaQ7PxakjiErasV/2C3rmjr0Ryu9aEDf4SlXHSCt9rxl9cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705020913; a=rsa-sha256; cv=none; b=B1bLP+BuQq3DwHUalmijx9NVhSlCoyIgIHgeVf0M+Rn9BZnzQOxFuOvR/mdmZ8yQU8WjqN xL2ritjFjWDQMwzgV0o5HRs+kQccbW43zbxTm8xaMq04XwhZReI+Vm8vNhY2QcLAW0i2Pz c+Ddis7xrSTcW8XMh8S7gojCZy7hAOoaZgCeWkYgKa6GwCgHqF/+JS9aKuKeJRDyDFJVj/ wF44DD5pZVuUl32vFwklV8mmBNfXaA99dkjxrpl9X7WAT6HNLUNzaqU8tJ990wjkp1LUnl eucp/iWL/7L1aZkYdtK5mzEQ36LzKsGl8Y+D4byQTyXgutjrVMLZbW1tACV+Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TB33j4jWpzhJk; Fri, 12 Jan 2024 00:55:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40C0tDRn071551; Fri, 12 Jan 2024 00:55:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C0tDC7071548; Fri, 12 Jan 2024 00:55:13 GMT (envelope-from git) Date: Fri, 12 Jan 2024 00:55:13 GMT Message-Id: <202401120055.40C0tDC7071548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: d004554af7d1 - main - UPDATING: Add an entry for the __FreeBSD_version bump to 1500010 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d004554af7d1563465656bde6f1a87fb1728f418 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=d004554af7d1563465656bde6f1a87fb1728f418 commit d004554af7d1563465656bde6f1a87fb1728f418 Author: Rick Macklem AuthorDate: 2024-01-12 00:53:46 +0000 Commit: Rick Macklem CommitDate: 2024-01-12 00:53:46 +0000 UPDATING: Add an entry for the __FreeBSD_version bump to 1500010 --- UPDATING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPDATING b/UPDATING index cea03f7dc7c3..2ffd1baaf472 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20240111: + Commit cc760de2183f changed the internal interface between + the nfscommon and nfscl modules. As such, both need to be + rebuilt from sources. Therefore, __FreeBSD_version was + bumped to 1500010. + 20231120: If you have an arm64 system that uses ACPI, you will need to update your loader.efi in the ESP when you update past this point. Detection of ACPI From nobody Fri Jan 12 05:38: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 4TB9LL3b50z57WRq; Fri, 12 Jan 2024 05:38: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 4TB9LL357rz49WL; Fri, 12 Jan 2024 05:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705037898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzBIoVdY14dK4K2W0C3YUBC9IvS2WJfbCGswlXx0H4w=; b=peg4ckBDgQ7CsXppfkYdGMwOlrNJX1n9zlagWVagqfPuURI3p2kCPnzz8D9m1jIyHVsn/K Rbn1LUPY3HghCFsqbUc37xbqr/0dIrD/QfsCbbIrjzIhhkHsAuacX1Thf7nuqGrc9YLDsD g4PbBnvvxhmO2urSD+1am498/dePNiAhl3kh1p5yc/FbBGDbpOov3I0znDSdKU4Sq5/Wlt fK2/fCX8q6In7gL5rBFuaOJQ90IWvRPgHVfFSCYJEyn0BxFHLLVBHjILjuG32jK9czVMm1 Msi9o/CLY8MZG5VBRBpjvQssboJ8cX7DcNOFwUlbFtYeRPyEe4j5tFSDRV1APQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705037898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzBIoVdY14dK4K2W0C3YUBC9IvS2WJfbCGswlXx0H4w=; b=HleP/Y9Vp2ANuZqpVRAljhHuiOeawLtearLh+LL7e+CshfeYEt8VYg/pwyKQtFi14FFwmK vTcnHF9e7mb3IZd9YAtsDbnmFVUJavXKsq8LRCOgdZtvWIMTj75tmUwWu+bRu4cDoL76Hz 7DBkZxhr/DKE4s8SgkBr7M+kj0u41YkmpEAKp30J9YUmAt1LHaxdcRy42aRgaEHBT2Md/5 Mm7z5kzdQXyQ9UjMImKlQqbCXX13xUBQld33flNyeh9a6SL63rL417nzH3RvVFVES6dMCX DRyB88XlOR565rqQMhuISkEZ7+k9UdS19rXqfOSpPmvY0Oqa91P6qvqyUHPndQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705037898; a=rsa-sha256; cv=none; b=uW71aytCVhuFLvtyfey0tlROvNI2DUr5kHkDnWeomS98q2w301Mr4EGsn2FjD0vvVv7wrU wWJ4tRyt4pUDfrtoaaOHQ++AYR7PfyZoaP9GfQ904rxCY6QkHG1LE9rgcxOTG3FCgwtjL6 Da4vvbvB2Z4sjcWldyyAzYtFZ7rYRwJg+wx3uitCoj06ZBYz/FWqkm0kfoQBS3CXuu+5EW w+Eo39JmnIYsMYlJrvNLflJ3BAR/67zW/OSYc9R2eZslhVGcRucEaMZm/DRd7iJGWLGNkJ tTW31OT9+EeVJbgPkeXXiq59S8/KfNxp4M+G3wj8TejiXzjndf90OBc8pOaLDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TB9LL27B4zpqT; Fri, 12 Jan 2024 05:38: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 40C5cIp8047961; Fri, 12 Jan 2024 05:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C5cIog047958; Fri, 12 Jan 2024 05:38:18 GMT (envelope-from git) Date: Fri, 12 Jan 2024 05:38:18 GMT Message-Id: <202401120538.40C5cIog047958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: e872a4013fc3 - main - releng-gce: Advertise the availability of gVNIC support in GCE images. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e872a4013fc325460924772f935b599151bd3d25 Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=e872a4013fc325460924772f935b599151bd3d25 commit e872a4013fc325460924772f935b599151bd3d25 Author: Xin LI AuthorDate: 2024-01-12 05:38:04 +0000 Commit: Xin LI CommitDate: 2024-01-12 05:38:04 +0000 releng-gce: Advertise the availability of gVNIC support in GCE images. This marks FreeBSD GCE images as gVNIC capable by adding the --guest-os-features=GVNIC flag at creation time as suggested in GCE documentation[1]. This allows Generation 3 and newer GCE instances to leverage advanced networking capabilities and performance enhancements provided by gVNIC. Users will benefit from these improvements without needing to create custom images. [1] https://cloud.google.com/compute/docs/networking/using-gvnic#create_a_vm_with_gvnic_support Reviewed by: cperciva MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D43411 --- release/Makefile.gce | 1 + 1 file changed, 1 insertion(+) diff --git a/release/Makefile.gce b/release/Makefile.gce index e84b2df809a9..f244e6c89640 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -73,6 +73,7 @@ gce-do-upload-${_FS}: gs://${GCE_BUCKET}/ /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ + --guest-os-features=GVNIC \ --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz touch ${.OBJDIR}/${.TARGET} .endfor From nobody Fri Jan 12 06:19: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 4TBBGc0Ffxz56729 for ; Fri, 12 Jan 2024 06:20:08 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBBGb3vMQz4FgS for ; Fri, 12 Jan 2024 06:20:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40e62979feeso11516025e9.0 for ; Thu, 11 Jan 2024 22:20:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705040406; x=1705645206; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XFnR3zNvNmQPJiyLqmsrt7mZ6T0f6tb0MvtwqIWRusc=; b=FlnS3+8dfjf14q96k++wvPZqIUbLhCW9uEuoDaEf/RzAwUzvvLhrEy04fz3vZoAKzm HvO4oUdoXR6wwcY2AWtunthpnbATo47NBKvSmx9vxJdL8uCJFMj5ZXs6H5D5b6r3NmUk WvVdAOOkSV+oZtRh/JrJFb27UKI9BDgZMUbaHq4wUiecPx4TOoZ05aovIII5BAr+LjZs h1vTRtSfvxHJv97fqbkQrCz/qUxsGTOiGGdzWqUlYY+em8+ha1OD00SVKVeHfeOaBOdB S4EA/PucZR1s5o5+FdB3GHE94TarMkZi/UeUon6CwBsUlKI/Dacy4QGDJubBsaSuhVtF tYsQ== X-Gm-Message-State: AOJu0Yy5ztQPUqyuiToF9+zFGPdg8VUpEIovZMiPgNJ2lUqqMjiIUJbj wh+3r3m3zQF8mf2Znd0rLaLyI8wVgwicZA== X-Google-Smtp-Source: AGHT+IEnopjSseAY9BVzY8A7ZS060Go6tm7cbiMcIuPMfuzvMzjnNd1jmYsolAjsumWHpIoIjJiobw== X-Received: by 2002:a05:600c:4fd5:b0:40d:6f89:a839 with SMTP id o21-20020a05600c4fd500b0040d6f89a839mr551398wmq.30.1705040405950; Thu, 11 Jan 2024 22:20:05 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id f15-20020a05600c154f00b0040e3b12052bsm8453909wmg.5.2024.01.11.22.20.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2024 22:20:05 -0800 (PST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto From: Jessica Clarke In-Reply-To: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> Date: Fri, 12 Jan 2024 06:19:55 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> To: Cy Schubert X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TBBGb3vMQz4FgS 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] On 11 Jan 2024, at 13:31, Cy Schubert wrote: >=20 > The branch main has been updated by cy: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab45af= 60382cfb >=20 > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > Author: Cy Schubert > AuthorDate: 2023-12-06 15:30:05 +0000 > Commit: Cy Schubert > CommitDate: 2024-01-11 13:26:42 +0000 >=20 > kerberos: Fix numerous segfaults when using weak crypto >=20 > Weak crypto is provided by the openssl legacy provider which is > not load by default. Load the legacy providers as needed. >=20 > When the legacy provider is loaded into the default context the = default > provider will no longer be automatically loaded. Without the = default > provider the various kerberos applicaions and functions will = abort(). Hi, This has completely broken macOS and Linux cross-building. Please either fix this quickly or, if unable to, revert until such time as you can. Note that patches can be tested by creating a PR against the GitHub mirror. Jess From nobody Fri Jan 12 06:34: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 4TBBbD4yDpz568Sm; Fri, 12 Jan 2024 06:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBBbD4RX5z4HgV; Fri, 12 Jan 2024 06:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705041272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhkg4eM4Kxfn91BqRbeQgCtMxNwiOHwF8sl71TH5z1k=; b=ei5MTavxeqlMG/ezuKx1YbxATytOsThGoAuzLIDQA7GCRdFnd+Ka0ToXio7qT5rb/+x34h ErmZv2TB6C79IxWqxPUHUpi1sZmp2XeQq+pKWLZvglW/qC19SZm581EyfKpza67Bin5CxG OafS/+o3C3SJFBLZsGX8NKOaz1vobfbJnLbnpoaYZF7i/PTXlR83rI2mHUCO3O0/Y8ktsC YhYMnN3z9MEDAqHr9ecZG3ckS4GX2JhFgxs1Hyai96C9tP5UKXDDkn9/aGpDzDRIF1AtpQ TvxoFmVEvu3muWJLLD4LHSpSh580ujKLvkG+/H3CT8XRKQgtBilwrC5CcOnXQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705041272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhkg4eM4Kxfn91BqRbeQgCtMxNwiOHwF8sl71TH5z1k=; b=Np2LZqGenpqleR8Hq8yWOTx3X6vOWnXiaoujaTqIPrMNN/tOTL44Ao/c8Boa5dIzfrWmAa O4uWGGQ3DnZlWdJo7r7pWsIKh+AjaOdvipgXF6pett7FfZ/FjpKppvwWjKYzreeLKfa18J XLHKwHKbyyop1h17wS6E6xvVmJ91GCQo/qBBctSfKAV9N/pSmw+PP6ZSET5triHzIA8sZa lZ+kVArTyMTDJ+upJnSzxDwCz+SI3YNg4jPQZppJYRX9tdM0p8SlSSVMtD9ihbOIAyspLG QOzuPcLF7RxKtTjwSZXhSR3YVZLzWGF6DuvFUb7jGoPBy+txVnZiwUF7S54Mug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705041272; a=rsa-sha256; cv=none; b=hRbk6y45IUwbEjEOek1bZSmDx8iU8zEAQ4NHXmwW9peTiZ5D4To1yXDigBIHDz2vqwsEe/ 1w1eA6+V8LzqDTjydfCY4W+X7Xt9HEGMgSBdJCcKFB8RGacnbie6s4pF9zg9NFB6n/AY5m u1Wx/4O1e7NW/1VRKVj2WAsucJ9uvf+BYun0Q0OjwzO5nuEvnE6hYHMwHmufVQqZQiicrb 8lzs47VqlIxl7Qou3EMcRmnsDeL67IxhHz3XJ3AVM7KYZd9mEqya8bR7mKbsN3I9lLe96r Tkak8vW8zkCxTExMUNriBVqGtcINqEChAyo9AcGFgILSz0d+UAWL/PtNTc+mxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBBbD3Tzvzrmr; Fri, 12 Jan 2024 06:34: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 40C6YW56049416; Fri, 12 Jan 2024 06:34:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C6YW4M049413; Fri, 12 Jan 2024 06:34:32 GMT (envelope-from git) Date: Fri, 12 Jan 2024 06:34:32 GMT Message-Id: <202401120634.40C6YW4M049413@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: 91dc2374661d - main - find: fix build on 32bits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91dc2374661d717a30d646e5c4200508dfd24a4c Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=91dc2374661d717a30d646e5c4200508dfd24a4c commit 91dc2374661d717a30d646e5c4200508dfd24a4c Author: Baptiste Daroussin AuthorDate: 2024-01-12 06:34:28 +0000 Commit: Baptiste Daroussin CommitDate: 2024-01-12 06:34:28 +0000 find: fix build on 32bits --- usr.bin/find/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index aec04536071a..8b24ecd6a306 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -212,7 +212,7 @@ find_execute(PLAN *plan, char *paths[]) if (showinfo) { fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); - fprintf(stderr, "Scanned: %lu\n\n", counter); + fprintf(stderr, "Scanned: %zu\n\n", counter); showinfo = 0; } ++counter; From nobody Fri Jan 12 07:11: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 4TBCPV4QWPz56ChV; Fri, 12 Jan 2024 07:11:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBCPV1x8Jz4LPs; Fri, 12 Jan 2024 07:11:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id NxkCrlfHEGAIJOBh7rOsBv; Fri, 12 Jan 2024 07:11:09 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id OBh5rQNJFZR3lOBh6ropJ6; Fri, 12 Jan 2024 07:11:08 +0000 X-Authority-Analysis: v=2.4 cv=Lo2Bd1Rc c=1 sm=1 tr=0 ts=65a0e60c a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=Lx2q1XV-e5SZfMx8rxUA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id EEEF54D9; Thu, 11 Jan 2024 23:11:06 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id C72D8235; Thu, 11 Jan 2024 23:11:06 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke cc: Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto In-reply-to: References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> Comments: In-reply-to Jessica Clarke message dated "Fri, 12 Jan 2024 06:19:55 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Jan 2024 23:11:06 -0800 Message-Id: <20240112071106.C72D8235@slippy.cwsent.com> X-CMAE-Envelope: MS4xfLwwx/7nvAf4q+cH1Xmcm14J2ojeKkNgiqgv2rKLZSnB0QFNnfkQ7vRmcRt31kldPEVKwqZjJZ8dW37pCdtSa9Mxn+a3BuxILvKiDMhSsFHQEhXFnEw+ aFbRSB3y+kukoZlb+FAbpFjIH5yJsaUxKozsCX2yPhCEGlLLVlru2gWzMwdfE4fx6yCymnsYu1T89XTDD1qwsShiJsItZ2RC24uAoe5mrIWQgmjSMQ/r5dAL JWbLZSw9QIyh40wKyO/lbfyJWs2fakCcySuq4TtQOQj7Pd8VQwelIQqYv4/Npvw09cbOC5+VCd+11/1ATIEU8YA/ksUKhz/vikvyrXO//F/F8e604EJncjRd jlz2xQB+ X-Rspamd-Queue-Id: 4TBCPV1x8Jz4LPs X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] In message , Jessica Clarke w rites: > On 11 Jan 2024, at 13:31, Cy Schubert wrote: > >=20 > > The branch main has been updated by cy: > >=20 > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab45af= > 60382cfb > >=20 > > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > > Author: Cy Schubert > > AuthorDate: 2023-12-06 15:30:05 +0000 > > Commit: Cy Schubert > > CommitDate: 2024-01-11 13:26:42 +0000 > >=20 > > kerberos: Fix numerous segfaults when using weak crypto > >=20 > > Weak crypto is provided by the openssl legacy provider which is > > not load by default. Load the legacy providers as needed. > >=20 > > When the legacy provider is loaded into the default context the = > default > > provider will no longer be automatically loaded. Without the = > default > > provider the various kerberos applicaions and functions will = > abort(). > > Hi, > This has completely broken macOS and Linux cross-building. Please > either fix this quickly or, if unable to, revert until such time as you > can. Note that patches can be tested by creating a PR against the > GitHub mirror. Thanks for the heads up. I see the problem and am working on a fix. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Fri Jan 12 07:43:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBD6v0mJfz56GWh; Fri, 12 Jan 2024 07:43: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 4TBD6v0C3nz4PTk; Fri, 12 Jan 2024 07:43:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705045415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0dDCNMnmcbv+dYU84GWNGmUZ2CJ+s+Ls0tkmySuM04=; b=aQZopP5M0xjpW2fjJIURBp3faUuX7ujStOV2ircCqTNoUAe2ERN48AABmJ6tGGOT1ff/u9 U2SIasp/7vxBNPDvdbyc6cm+GzXIpoOKznyqIGPqnBZb8KKKrtCTVUwv8ZIcuiTPNIwbpm uyTepEUHoINrZjzUCQ+taUndgdzyiqxUfDO+l4y/4ZVtEce4PPYcqQi79g5oG5m1ZwrTAY gpjgJZBq0QKYyMf8Al5PUwxPFgNGi2xfAHRYT2wuOZLTAw/IJsT+FA9BYMlBobjaS5wPKe Pb5arz7JewkPxIcI89XFKV4W89ghywe5ybh/G7TbGr7KMZNhX1+9gI4Fz/MOYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705045415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0dDCNMnmcbv+dYU84GWNGmUZ2CJ+s+Ls0tkmySuM04=; b=ax/xTjf78d7ZLuW6L9iGsYt3jU/X/gKMY0FQ8rclC93EIMotL25ctouFzzhZw9sPRmSpaT b53CGCjgEF1NvNss00jTOKZkxjDAYAFjJLMFQjlAW/swxcSv6G6OoRF7hhMMPegmozh4AI vGhParaOWefXIgQo4nkqKPhEe+3JKUteBbFvuF7UVQyOEpN6oSN/95fHrjCm9vJhrRKJYV c26DIXb0XKEswO5cMm4/TzedPb6mCCVPX52ow56sY7p24NPHb4OdZ6W3LtoT3lNjG9DK95 zq6CibOBBZ83V15FvmWyeo9xug/zZLAXyYybV6XY254Y6Kr/s9Zevaco/58m8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705045415; a=rsa-sha256; cv=none; b=WAEnYK7iTgvGsmtIeDsVfYT0u99lBKd+kVQdiKqUOmyQXt+vndpiWwW0Hb8rz+TLnbXfqp a2twxui3Olcc4hcul7iBcUsI2Buwvv8nC0hiXM5BQuK1RLdLyYBaTrut5dYOGHYgVhlDKP 3i8L50WifW7T4FZQopvpbcJQcktmsonv/4N4dJXN3u0ki1NDXy9RLmLOiLSqr5tP2db7KR haei4BA87Hfza8PAyBs5wf8YXzHiS6AnhF0DbTNNAPmSXFTujviIVogwsUzr0BS51RfNZ5 wpgBcObqT0b+MZYtKDCIbCiSIIU0LTAvH96xkShCjodl6HXAXJPHboYzhjut9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBD6t6MRHztVc; Fri, 12 Jan 2024 07:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40C7hYg9066704; Fri, 12 Jan 2024 07:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C7hYZo066701; Fri, 12 Jan 2024 07:43:34 GMT (envelope-from git) Date: Fri, 12 Jan 2024 07:43:34 GMT Message-Id: <202401120743.40C7hYZo066701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 3091cdb11fb0 - main - Revert "kerberos: Fix numerous segfaults when using weak crypto" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3091cdb11fb05e554a54710116be87ee1f55c287 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3091cdb11fb05e554a54710116be87ee1f55c287 commit 3091cdb11fb05e554a54710116be87ee1f55c287 Author: Cy Schubert AuthorDate: 2024-01-12 07:39:02 +0000 Commit: Cy Schubert CommitDate: 2024-01-12 07:42:33 +0000 Revert "kerberos: Fix numerous segfaults when using weak crypto" This revision breaks Linux and MacOS cross builds because TARGET_ENDIANNESS is not define during bootstrapping on these platforms. I think the correct approach would be to separate the new fbsd_ossl_provider_load() and unload functions into their own library (instead of libroken). This avoids the less desirable option of including bsd.cpu.mk in secure/lib/Makefile.common, which does build but could complicate future work. Reported by: jrtc27 This reverts commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb. --- Makefile.inc1 | 7 ++-- crypto/heimdal/lib/kadm5/create_s.c | 4 --- crypto/heimdal/lib/kadm5/kadm5_locl.h | 1 - crypto/heimdal/lib/krb5/context.c | 4 --- crypto/heimdal/lib/krb5/crypto.c | 3 -- crypto/heimdal/lib/krb5/salt.c | 5 --- crypto/heimdal/lib/roken/version-script.map | 1 - kerberos5/include/crypto-headers.h | 4 --- kerberos5/include/fbsd_ossl_provider.h | 4 --- kerberos5/lib/libroken/Makefile | 11 ++----- kerberos5/lib/libroken/fbsd_ossl_provider_load.c | 41 ------------------------ kerberos5/libexec/kdc/Makefile | 2 +- share/mk/src.libnames.mk | 2 +- 13 files changed, 8 insertions(+), 81 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 864b5151692f..34b49ee319ec 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2635,10 +2635,9 @@ ${_bt}-usr.bin/grep: ${_bt}-lib/libbz2 _other_bootstrap_tools+=lib/libz ${_bt}-lib/libdwarf: ${_bt}-lib/libz -# libroken depends on libcrypt and libcrypto +# libroken depends on libcrypt _other_bootstrap_tools+=lib/libcrypt -_other_bootstrap_tools+=secure/lib/libcrypto -${_bt}-lib/libroken: ${_bt}-lib/libcrypt ${_bt}-lib/libcrypto +${_bt}-lib/libroken: ${_bt}-lib/libcrypt .else # All tools in _basic_bootstrap_tools have the same name as the subdirectory # so we can use :T to get the name of the symlinks that we need to create. @@ -3284,7 +3283,7 @@ kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \ kerberos5/lib/libroken__L kerberos5/lib/libwind__L \ kerberos5/lib/libheimbase__L kerberos5/lib/libheimipcc__L -kerberos5/lib/libroken__L: lib/libcrypt__L secure/lib/libcrypto__L +kerberos5/lib/libroken__L: lib/libcrypt__L kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libheimbase__L: lib/libthr__L kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L diff --git a/crypto/heimdal/lib/kadm5/create_s.c b/crypto/heimdal/lib/kadm5/create_s.c index 267e9bbda2a0..1033ca103239 100644 --- a/crypto/heimdal/lib/kadm5/create_s.c +++ b/crypto/heimdal/lib/kadm5/create_s.c @@ -169,10 +169,6 @@ kadm5_s_create_principal(void *server_handle, ent.entry.keys.len = 0; ent.entry.keys.val = NULL; - ret = fbsd_ossl_provider_load(); - if (ret) - goto out; - ret = _kadm5_set_keys(context, &ent.entry, password); if (ret) goto out; diff --git a/crypto/heimdal/lib/kadm5/kadm5_locl.h b/crypto/heimdal/lib/kadm5/kadm5_locl.h index 63b367ab7e21..68b6a5ebf024 100644 --- a/crypto/heimdal/lib/kadm5/kadm5_locl.h +++ b/crypto/heimdal/lib/kadm5/kadm5_locl.h @@ -79,6 +79,5 @@ #include #include #include "private.h" -#include "fbsd_ossl_provider.h" #endif /* __KADM5_LOCL_H__ */ diff --git a/crypto/heimdal/lib/krb5/context.c b/crypto/heimdal/lib/krb5/context.c index 681bc9a0982f..86bfe539b974 100644 --- a/crypto/heimdal/lib/krb5/context.c +++ b/crypto/heimdal/lib/krb5/context.c @@ -392,10 +392,6 @@ krb5_init_context(krb5_context *context) } HEIMDAL_MUTEX_init(p->mutex); - ret = fbsd_ossl_provider_load(); - if(ret) - goto out; - p->flags |= KRB5_CTX_F_HOMEDIR_ACCESS; ret = krb5_get_default_config_files(&files); diff --git a/crypto/heimdal/lib/krb5/crypto.c b/crypto/heimdal/lib/krb5/crypto.c index 6ee22609a4d5..67ecef62e875 100644 --- a/crypto/heimdal/lib/krb5/crypto.c +++ b/crypto/heimdal/lib/krb5/crypto.c @@ -2054,9 +2054,6 @@ krb5_crypto_init(krb5_context context, *crypto = NULL; return ret; } - ret = fbsd_ossl_provider_load(); - if (ret) - return ret; (*crypto)->key.schedule = NULL; (*crypto)->num_key_usage = 0; (*crypto)->key_usage = NULL; diff --git a/crypto/heimdal/lib/krb5/salt.c b/crypto/heimdal/lib/krb5/salt.c index 2b1fbee80ab6..5e4c8a1c8572 100644 --- a/crypto/heimdal/lib/krb5/salt.c +++ b/crypto/heimdal/lib/krb5/salt.c @@ -43,8 +43,6 @@ krb5_salttype_to_string (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; - (void) fbsd_ossl_provider_load(); - e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -77,8 +75,6 @@ krb5_string_to_salttype (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; - (void) fbsd_ossl_provider_load(); - e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -200,7 +196,6 @@ krb5_string_to_key_data_salt_opaque (krb5_context context, enctype); return KRB5_PROG_ETYPE_NOSUPP; } - (void) fbsd_ossl_provider_load(); for(st = et->keytype->string_to_key; st && st->type; st++) if(st->type == salt.salttype) return (*st->string_to_key)(context, enctype, password, diff --git a/crypto/heimdal/lib/roken/version-script.map b/crypto/heimdal/lib/roken/version-script.map index bb2139ed74cc..72d2ea7e4f7c 100644 --- a/crypto/heimdal/lib/roken/version-script.map +++ b/crypto/heimdal/lib/roken/version-script.map @@ -13,7 +13,6 @@ HEIMDAL_ROKEN_1.0 { ct_memcmp; err; errx; - fbsd_ossl_provider_load; free_getarg_strings; get_default_username; get_window_size; diff --git a/kerberos5/include/crypto-headers.h b/kerberos5/include/crypto-headers.h index 2cc870642964..3ae0d9624ffd 100644 --- a/kerberos5/include/crypto-headers.h +++ b/kerberos5/include/crypto-headers.h @@ -17,9 +17,5 @@ #include #include #include -#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) -#include -#include "fbsd_ossl_provider.h" -#endif #endif /* __crypto_headers_h__ */ diff --git a/kerberos5/include/fbsd_ossl_provider.h b/kerberos5/include/fbsd_ossl_provider.h deleted file mode 100644 index 013983ca9f83..000000000000 --- a/kerberos5/include/fbsd_ossl_provider.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __fbsd_ossl_provider_h -#define __fbsd_ossl_provider_h -int fbsd_ossl_provider_load(void); -#endif diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile index 24dc3a5b2c45..0c46ba6c4cb5 100644 --- a/kerberos5/lib/libroken/Makefile +++ b/kerberos5/lib/libroken/Makefile @@ -2,7 +2,7 @@ PACKAGE= kerberos-lib LIB= roken -LIBADD= crypt crypto +LIBADD= crypt VERSION_MAP= ${KRB5DIR}/lib/roken/version-script.map INCS= roken.h \ roken-common.h \ @@ -74,20 +74,15 @@ SRCS= base64.c \ vis.c \ warnerr.c \ write_pid.c \ - xfree.c \ - fbsd_ossl_provider_load.c + xfree.c -CFLAGS+=-I${KRB5DIR}/lib/roken \ - -I${SRCTOP}/kerberos5/include \ - -I${KRB5DIR}/lib/krb5 \ - -I${SRCTOP}/crypto/openssl/include -I. +CFLAGS+=-I${KRB5DIR}/lib/roken -I. CLEANFILES= roken.h roken.h: ${MAKE_ROKEN} > ${.TARGET} - .include .PATH: ${KRB5DIR}/lib/roken diff --git a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c deleted file mode 100644 index f49c8746c9e4..000000000000 --- a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include - -static void fbsd_ossl_provider_unload(void); - -static OSSL_PROVIDER *legacy; -static OSSL_PROVIDER *deflt; -static int providers_loaded = 0; - -int -fbsd_ossl_provider_load(void) -{ -#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) - if (providers_loaded == 0) { - if ((legacy = OSSL_PROVIDER_load(NULL, "legacy")) == NULL) - return (EINVAL); - if ((deflt = OSSL_PROVIDER_load(NULL, "default")) == NULL) { - OSSL_PROVIDER_unload(legacy); - return (EINVAL); - } - if (atexit(fbsd_ossl_provider_unload)) { - fbsd_ossl_provider_unload(); - return (errno); - } - providers_loaded = 1; - } -#endif - return (0); -} - -static void -fbsd_ossl_provider_unload(void) -{ -#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) - if (providers_loaded == 1) { - OSSL_PROVIDER_unload(legacy); - OSSL_PROVIDER_unload(deflt); - providers_loaded = 0; - } -#endif -} diff --git a/kerberos5/libexec/kdc/Makefile b/kerberos5/libexec/kdc/Makefile index 211f4f379054..41fde9115c00 100644 --- a/kerberos5/libexec/kdc/Makefile +++ b/kerberos5/libexec/kdc/Makefile @@ -11,7 +11,7 @@ SRCS= config.c \ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} -LIBADD= kdc hdb krb5 roken crypt vers crypto +LIBADD= kdc hdb krb5 roken crypt vers LDFLAGS=${LDAPLDFLAGS} .include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index e4fd3270a3d3..33b8507a9eb9 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -367,7 +367,7 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_roken= crypt crypto +_DP_roken= crypt _DP_kadm5clnt= com_err krb5 roken _DP_kadm5srv= com_err hdb krb5 roken _DP_heimntlm= crypto com_err krb5 roken From nobody Fri Jan 12 07:43: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 4TBD730zWVz56GZ6; Fri, 12 Jan 2024 07:43:43 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBD722nQxz4Pyl; Fri, 12 Jan 2024 07:43:42 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.33) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id O2CUrlzIYGAIJOCCbrOtAW; Fri, 12 Jan 2024 07:43:41 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id OCCZrRpoW0nMNOCCarTAiS; Fri, 12 Jan 2024 07:43:41 +0000 X-Authority-Analysis: v=2.4 cv=Qcx1A+Xv c=1 sm=1 tr=0 ts=65a0edad a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=4fHKOfqy3htGCimGVlwA:9 a=CjuIK1q_8ugA:10 a=UuLlkBnjUTgA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id AF067530; Thu, 11 Jan 2024 23:43:39 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id A581B23D; Thu, 11 Jan 2024 23:43:39 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto In-reply-to: <20240112071106.C72D8235@slippy.cwsent.com> References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> <20240112071106.C72D8235@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 11 Jan 2024 23:11:06 -0800." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Jan 2024 23:43:39 -0800 Message-Id: <20240112074339.A581B23D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfNiOBojsjqfcMmAjlBLIcciZFQk0bQxNOWliP2P17o/kHjumjugbbqEgdGzbuhBobJHxjG/fApEknV2lEt0X4ZZDfvJRwQ4CNLjUTIcJBku0Yzlh+Yyh qO5KVzrxNlw32sigStHbsFFccMIE4fjfImd2pusH3dFqZ1GFBG8qJ4kGasWH7e8eEtj4oPiuvEmTvxn3bgjKnRFRnFYWDX+GzOKCVaoKorOxT7hYT2ci67U1 Lexm9eEWnUnXGfS9aFVm7OSd3vWhfgbImQ6RfnMjJSUG8sdNB2R2cxUf2eNFEambmVmJAQwR2IZsK8yYTQyltRLIXpt2fNU0igKNMQdwxQkjGpyUD1f5sjAT RI2z/Tuw X-Spamd-Bar: - X-Spamd-Result: default: False [-1.70 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.33:from]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[cschubert.com]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4TBD722nQxz4Pyl In message <20240112071106.C72D8235@slippy.cwsent.com>, Cy Schubert writes: > In message , Jessica > Clarke w > rites: > > On 11 Jan 2024, at 13:31, Cy Schubert wrote: > > >=20 > > > The branch main has been updated by cy: > > >=20 > > > URL: = > > https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab45af= > > 60382cfb > > >=20 > > > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > > > Author: Cy Schubert > > > AuthorDate: 2023-12-06 15:30:05 +0000 > > > Commit: Cy Schubert > > > CommitDate: 2024-01-11 13:26:42 +0000 > > >=20 > > > kerberos: Fix numerous segfaults when using weak crypto > > >=20 > > > Weak crypto is provided by the openssl legacy provider which is > > > not load by default. Load the legacy providers as needed. > > >=20 > > > When the legacy provider is loaded into the default context the = > > default > > > provider will no longer be automatically loaded. Without the = > > default > > > provider the various kerberos applicaions and functions will = > > abort(). > > > > Hi, > > This has completely broken macOS and Linux cross-building. Please > > either fix this quickly or, if unable to, revert until such time as you > > can. Note that patches can be tested by creating a PR against the > > GitHub mirror. > > Thanks for the heads up. I see the problem and am working on a fix. I think the correct approach would be to separate the new fbsd_ossl_provider_load() and unload functions into their own library (instead of libroken). This avoids the less desirable option of including bsd.cpu.mk in secure/lib/Makefile.common, which does build but could affect future work. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Fri Jan 12 09:19: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 4TBGFV165xz56RCj; Fri, 12 Jan 2024 09:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBGFV0f6Sz4ZR2; Fri, 12 Jan 2024 09:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705051166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THRHnvpUozlYk2NQh/qi0Qf2r6UrpPGijv3BTy/8c9w=; b=hmyIdEHS4HD6H8UE2+/GMPOW9ZNGxLntyrzchC9kzNcb9KPpUjyRa1K08MvlHWUxr5CMJc UAokLrgNGzoAPdtWEAb80RlevgBpz8G/VhY6kifaccS4qed6OxscADayZz8mSD1WOznfob jvV3yrcRKWjuQ0JZt+j5XLVkN4o+tDi/RwNGJ+9pZhNh5gXaYm+/jO8YIU3wWPv7Al9Izf WjNvHKBoF0iJGRQPpzA3KHnUUvx52uYVPI0TGj1mSq4MITucBHabcuQ5MWXx90H4ynmnc1 O7SS0/w7MftCsZzS/eW/ynrhNiIXwKl4K3cqeyAhq70UMXPq86yM377hLaYUKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705051166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THRHnvpUozlYk2NQh/qi0Qf2r6UrpPGijv3BTy/8c9w=; b=G0nKy3aoJQ3YxelF7XfcsCxPmz73jYNwdFaoLiLpCiYY9aLBk72nKHNFdy1uiKZeuxmoRg WBGUMh8eFrabPfNpxDpcBlODCSkrm1xxJigUgJGzH7jdxM+zmkbXVmpBb5B/4YMFLmhm+/ +GtsQKQOFjIHMPKMIQGc4D7xy6jEa+PI3pJ4u69YIg2oGhN5ZRv8CJb2j5oyykEZ62r31r +3c8DemFF8D4gUbQ7/9FWLhtUQgLHMJdWMFY4ECbUh+I82lFKV2SK284yjOzB+i3mblN3f Taoa3SucL//L/3QDSZ7uynv8jshc+6IeasUFmrEHfN4wiMmX05lvL4raJLEVBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705051166; a=rsa-sha256; cv=none; b=W0yz7qyCrJDPVKSnnMZo1RUE+lLLuSAAZo9KIgiY9UCtdSd4kpkjS0C0t6nMyjlQjQ7KPe fhp22Ojt+Chdvyn7dHn/3zvIa4Vk0Ma5Bq+uRN4wC1bmjTNwmnHPKXT0rIGLKt/iQKlhmo qMX2GvZ9Kcbmob+of9WgpFZ6/4q0ECOpXC+SXnR4nnf/UllMIKugv4WSVjUcT9yC6IEslK KbiBLN/eSKKjKKAvaofwHkaxrV49rh4aDM1dSvcL3/H8Q8mmEjUty7a9tjxHsQ5bNCaK81 X4JIRV3438qXFMU8UuC11//E/VCyKT75RUpwDvESlbcqyQriaYWdK20yjNBLTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBGFT6m21zwWp; Fri, 12 Jan 2024 09:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40C9JObq020172; Fri, 12 Jan 2024 09:19:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C9JO0n020169; Fri, 12 Jan 2024 09:19:24 GMT (envelope-from git) Date: Fri, 12 Jan 2024 09:19:24 GMT Message-Id: <202401120919.40C9JO0n020169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 82126ef92fdb - main - xen: improve man (4) page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82126ef92fdb3c13a67ad44d33c0fe6ea479c01a Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=82126ef92fdb3c13a67ad44d33c0fe6ea479c01a commit 82126ef92fdb3c13a67ad44d33c0fe6ea479c01a Author: Roger Pau Monné AuthorDate: 2024-01-09 09:26:06 +0000 Commit: Roger Pau Monné CommitDate: 2024-01-12 09:18:49 +0000 xen: improve man (4) page Update the xen(4) man page to reflect the current support status. Reported by: kevans Reviewed by: bcr kevans imp Differential revision: https://reviews.freebsd.org/D43373 --- share/man/man4/xen.4 | 74 +++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/share/man/man4/xen.4 b/share/man/man4/xen.4 index 6660ab3c268b..15312866dae6 100644 --- a/share/man/man4/xen.4 +++ b/share/man/man4/xen.4 @@ -26,19 +26,19 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 30, 2015 +.Dd January 8, 2024 .Dt XEN 4 .Os .Sh NAME .Nm xen -.Nd Xen Hypervisor Guest (DomU) Support +.Nd Xen Hypervisor Support .Sh SYNOPSIS -To compile hardware-assisted virtualization (HVM) Xen guest support with -para-virtualized drivers into an amd64 or i386 kernel, -place the following lines in your kernel configuration file: -.Bd -ragged -offset indent -.Cd "options XENHVM" -.Cd "device xenpci" +FreeBSD supports running both as a Xen guest and host on amd64 hardware. +Guest support is limited to HVM and PVH modes, while host support is limited to +PVH mode only. +.Pp +Xen support is built by default in the i386 and amd64 GENERIC kernels; note +however that host mode is only available on amd64. .Ed .Sh DESCRIPTION The Xen Hypervisor allows multiple virtual machines to be run on a single @@ -52,20 +52,18 @@ to access resources such as virtual network interfaces and disk devices. .Pp With later instruction set extensions from AMD and Intel to support fully virtualizable instructions, unmodified virtual memory systems can also be -supported; this is referred to as hardware-assisted virtualization (HVM). +supported; this is referred to as hardware-assisted virtualization (HVM and PVH). HVM configurations may either rely on transparently emulated hardware peripherals, or para-virtualized drivers, which are aware of virtualization, and hence able to optimize certain behaviors to improve performance or semantics. +PVH configurations rely on para-virtualized drivers exclusively for IO. .Pp .Fx -supports hardware-assisted virtualization (HVM) on both i386 and amd64 -kernels. -.Pp Para-virtualized device drivers are required in order to support certain functionality, such as processing management requests, returning idle physical memory pages to the hypervisor, etc. -.Ss Xen DomU device drivers +.Ss Xen device drivers These para-virtualized drivers are supported: .Bl -hang -offset indent -width blkfront .It Nm balloon @@ -87,6 +85,10 @@ suspend, crash, and halt requests. Expose Xen events via the .Pa /dev/xen/evtchn special device. +.It Nm gntdev +Allow access to the grant table interface via the +.Pa /dev/xen/gntdev +special device. .It Nm netback Export local network interfaces to other Xen domains where they can be imported via @@ -94,35 +96,30 @@ imported via .It Nm netfront Import network interfaces from other Xen domains as local network interfaces, which may be used for IPv4, IPv6, etc. -.It Nm pcifront -Allow physical PCI devices to be passed through into a PV domain. +.It Nm privcmd +Allow issuing hypercalls via the +.Pa /dev/xen/privcmd +special device. +.It Nm timer +Implementation of a one-shot high resolution per-CPU timer using the hypercall +interface. +.It Nm acpi cpu +When running as a host forwards power management related information from ACPI +to the hypervisor for better performance management. .It Nm xenpci Represents the Xen PCI device, an emulated PCI device that is exposed to HVM domains. This device allows detection of the Xen hypervisor, and provides interrupt and shared memory services required to interact with the hypervisor. +.It Nm xenstore +Information storage space shared between domains. .El -.Ss Performance considerations -In general, PV drivers will perform better than emulated hardware, and are -the recommended configuration for HVM installations. -.Pp -Using a hypervisor introduces a second layer of scheduling that may limit the -effectiveness of certain -.Fx -scheduling optimisations. -Among these is adaptive locking, which is no longer able to determine whether -a thread holding a lock is in execution. -It is recommended that adaptive locking be disabled when using Xen: -.Bd -unfilled -offset indent -.Cd "options NO_ADAPTIVE_MUTEXES" -.Cd "options NO_ADAPTIVE_RWLOCKS" -.Cd "options NO_ADAPTIVE_SX" -.Ed .Sh HISTORY Support for .Nm first appeared in .Fx 8.1 . +Support for host mode was added in 11.0 . .Sh AUTHORS .An -nosplit .Fx @@ -133,15 +130,10 @@ and Further refinements were made by .An Justin Gibbs Aq Mt gibbs@FreeBSD.org , .An Adrian Chadd Aq Mt adrian@FreeBSD.org , +.An Colin Percival Aq Mt cperciva@FreeBSD.org , and -.An Colin Percival Aq Mt cperciva@FreeBSD.org . +.An Roger Pau Monné Aq Mt royger@FreeBSD.org . This manual page was written by -.An Robert Watson Aq Mt rwatson@FreeBSD.org . -.Sh BUGS -.Fx -is only able to run as a Xen guest (DomU) and not as a Xen host (Dom0). -.Pp -As of this release, Xen PV DomU support is not heavily tested; instability -has been reported during VM migration of PV kernels. -.Pp -Certain PV driver features, such as the balloon driver, are under-exercised. +.An Robert Watson Aq Mt rwatson@FreeBSD.org , +and +.An Roger Pau Monné Aq Mt royger@FreeBSD.org . From nobody Fri Jan 12 10:04: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 4TBHFQ0934z56W27; Fri, 12 Jan 2024 10:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBHFP6l2Cz4fNs; Fri, 12 Jan 2024 10:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ha061nnnmJbcM0/EWkbB/3PJO10Ts4m4z9i/XNsqVxM=; b=cO2ifphYwKB6FiDincD+fFTlxxVHtGHKV3/kuHOyYpaU6UxMGgpygasMlhuBzNWrOdONj3 fJadBtuM5kuoVNHAuBfy0IzDeCYkaAP8rBLLnIrZZl1vrCdauKGxMk6vGFnZ8JGxPFqw7j /OgkuyXOqyZMKNEklmhTBCjIb6qot7Edd9TvxntNMEIRNwTddMQD4nPzQPAWg2RhvnuQHC dcr3EPCwEQJAtmwK6Pa59wz2pRDVFQA69qi/No4yqAoU8fS7OaCYRCjXUKXT2yFnS3En2Y nwvoZzqQFtLnTEVMV9RBmNxPLxuis7RHOwhsTBpcoFIpOC+7/6BnYnaNLYToUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ha061nnnmJbcM0/EWkbB/3PJO10Ts4m4z9i/XNsqVxM=; b=SXgteHKSCwpTCtMGOuVCyDOfOn6MJWDjpEpRR9sM0ZgPMnyUv1UWlXf4Az2ug3+C2FrbqO DFhwyx295z3Xb7PXiXuATlckMDte4iDjvOsEpDRim1Dc6qkQEsbzD2Wn8t9SdCfNoJznf3 PRN30ngbkM2341kGYZIv0ZOMU+BnTlyfRxImBecfmQbd9EYyuRV0yNyWnQ8mbyMvFHcVIQ Hg12hPEy6H9hhJ4rgN3tneomRQDraiciZEY/Zv7bhNp43DcUZrd6iBZPyn6ZHc5rcdcoG7 wj6CjwSTd8RwYq67iLe0eDEJ58qgGu6ZT9jUJ1ptCH7ymFys9oKdOtsjuJQwNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705053865; a=rsa-sha256; cv=none; b=BLUm2TrKRyI+ahSYQJ1Mwk2/GgtnzeTX4zmS99k9D7tXRgXP7ByJSBGlGbUgkzA0moZCBv 4/C6hqlkTfYaMhhWfVaeHEX4c990h5iQQtaW2ilarSyN7YG02cpvyUKrBLrSp6HczgdhND R6QNMdrjERuhmgyC/5/0t/VBAWQZC7gNXAuzrCqIs8wejlsJqmcT+KOsA8PGMzFugxVfMB ewH2t7YkaO8XqyhPr7PnmSb4LaFBIlvytWI4XLt3mGOnj1aTWaynF951V2Ec8ktxMpqKUf vFZKdMGlF2h+rntAN0PxAE2GHUexQadapoEW92oUlfDJdfKWChhsSoqYGW0g0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBHFP5nPczyBb; Fri, 12 Jan 2024 10:04: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 40CA4PV6003522; Fri, 12 Jan 2024 10:04:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CA4Ps3003519; Fri, 12 Jan 2024 10:04:25 GMT (envelope-from git) Date: Fri, 12 Jan 2024 10:04:25 GMT Message-Id: <202401121004.40CA4Ps3003519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0598824cc84a - main - protosw: remove unneeded include List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0598824cc84a347848dfe822add22aad30ff89d4 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0598824cc84a347848dfe822add22aad30ff89d4 commit 0598824cc84a347848dfe822add22aad30ff89d4 Author: Gleb Smirnoff AuthorDate: 2024-01-12 10:04:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-12 10:04:04 +0000 protosw: remove unneeded include --- sys/sys/protosw.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index eea231f82807..b512c60971ee 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -32,8 +32,6 @@ #ifndef _SYS_PROTOSW_H_ #define _SYS_PROTOSW_H_ -#include - /* Forward declare these structures referenced from prototypes below. */ struct kaiocb; struct mbuf; From nobody Fri Jan 12 10:04: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 4TBHFR1HtGz56W2M; Fri, 12 Jan 2024 10:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBHFR0ZKJz4fc7; Fri, 12 Jan 2024 10:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SK74WOcOYuClw/Mg1UuTUpJbJBSPq9dHrLWWVa1fQms=; b=Wy3ueYcBsn5kr+RRAE1xhPJEBTt7YlNna43adjygqhB9LJeb0fVr52CQI3Ff3Sas2zXJW8 hbx9c9ztnMoju9Yo/dB+gsQj6yPvmExv4CkToFgdUE/14HkU4ELzyiGxwMVZF/4VVHpB3k 0hf9toAYuonp4FqdWzUFTGDBf3Bj2lZPC/ahOctfbkB8peRNR54cgvcUl6PU4IrTVp6yGm mMCnIyPLU8Rfrsa7X7/37tyvRNcH7Q9iWrNAln/MQRPWaH8pr56Z0R9JF4uMVXuLQV0vi5 xI9wsmvVPs2HBq7AemVglXrAODNLqEcBU/CMHata90CvXDsdr/pJPQwepwXt/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SK74WOcOYuClw/Mg1UuTUpJbJBSPq9dHrLWWVa1fQms=; b=EoXkzvahar8FxP5OOziKqQ0CyJyA5V55aiXqnP/zza/YpKVeP6n8tesC60mMhgjeMFGbWX AnlRzDpN3oj5FP+Z9ih2HI2n5E7IoICi7A0/DWRqx/x74p7piOn3A/fgnWEzUqHEIUGC9+ VZ4VNPXMM2BTRPycG/EDU1Ipv/r+CiBuky1t4QRZ/of0X6dJw2UlimMEIkPlcWEWYwbFSu CqTvPiaIWNF6pxOSN0jjUsdH6VBj4OVY2k9vQty3aCR4ae1Uq4OdmWKZEGTdXtpZoMAoFP Zt7Wte8RqO6MARGLOF0Y/u7u9i88wwaMsTbZsfGdrtS1mOKwyE5kKUFcsqjfFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705053867; a=rsa-sha256; cv=none; b=kyyhzDV110hqPjX3RaOvIFIDIJEgck+gUVspE3Uj+DPczNgjefr8JEBFFRUIkzLnbiJzA1 vEkhJY6dZUt5lmCvMl3VXQuw/wZIzzjgs7eJQJPlPixIDLh5oL336aH0OYR+DZ6FZdcwvT kF3dl/wjV57E+NwWRvhBfy6BL/EkPajfDHiVqdp/5htVyz6dkTXAt/rFDrlJMeDvNZ6VkD GF52mFU7n36xveu92o5CHWGMqDPQ9b8TseyoARHEbME2LrPhFjF/VqVBPC2eLCBobTdRho 1NBQ1JK41aeFGB5yQQcZtGGrt4Ns6lJ+EoWVmzB6NEvgqmJ5ZiZsKiBneEcimg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBHFQ6mnvzyHB; Fri, 12 Jan 2024 10:04: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 40CA4Qgu003567; Fri, 12 Jan 2024 10:04:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CA4Qgd003564; Fri, 12 Jan 2024 10:04:26 GMT (envelope-from git) Date: Fri, 12 Jan 2024 10:04:26 GMT Message-Id: <202401121004.40CA4Qgd003564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d4033ebd0545 - main - divert: just return EOPNOTSUPP on shutdown(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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 commit d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 Author: Gleb Smirnoff AuthorDate: 2024-01-12 10:04:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-12 10:04:04 +0000 divert: just return EOPNOTSUPP on shutdown(2) Before this change we would always return ENOTCONN. There is no legitimate use of shutdown(2) on divert(4). --- sys/netinet/ip_divert.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 78ca36fc2a0f..6bc76e0be111 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -635,14 +635,6 @@ div_bind(struct socket *so, struct sockaddr *nam, struct thread *td) return (0); } -static int -div_shutdown(struct socket *so) -{ - - socantsendmore(so); - return 0; -} - static int div_pcblist(SYSCTL_HANDLER_ARGS) { @@ -720,7 +712,6 @@ static struct protosw div_protosw = { .pr_bind = div_bind, .pr_detach = div_detach, .pr_send = div_send, - .pr_shutdown = div_shutdown, }; static struct domain divertdomain = { From nobody Fri Jan 12 10:04: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 4TBHFS3YRjz56W4j; Fri, 12 Jan 2024 10:04: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 4TBHFS18fsz4fcX; Fri, 12 Jan 2024 10:04:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hzMfXXb+lLCwGq+5dQjzuvgjp8Uqd1EhlSpTCShc1vI=; b=I+I8iDUdLgShFQWpi2kZVZJaTUC+SVrfss+QeW9JIORdw09gkmdSzd/xyLx6U+drvO6QH/ 0UYsScZNNVmFYBDrgYMwCl0xI5pKI8Ysq0TzSAjnne9OQkPyQAeHuHmD9EzCFyVkQUTonl HMXRzlTl3gKlr68rSu8Gcg2X3rqRhrxFEesk1vhUNCqUtZ6r9rowrSaZT8T8ZV9QhCWdJp Pbfq6UTFRgQ0eGuPzvl0DV7IA55ppvGam2A3ez6s8Pbpen+VNvsyqpLc6ZP/WJS0KisR6o Hzp8FWKIFr6qokzorE7wngyZ7qMx7wuZ8RkKHk2JzafZ0FxWRS+HvN6rl1ILCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hzMfXXb+lLCwGq+5dQjzuvgjp8Uqd1EhlSpTCShc1vI=; b=NlmFp7ga8UU5Qvy2uxJfAh6DGJNBR+8EBjGZyOVd0rBSHZQ2zknu4cSh6PL85v/k1GTy4L 2MBk0ZY9pVxZVgu35cPMQmnWcQyrqMO8NKlGA1eud4Q0bq7LAsPgPGV9GUbRO8GzMdWwUC 3X0ZUB6i2mXfar4974KnyRVpq7pnZFKf9ta1a4bjom4MdgWLe1DK3Wq/MKmGR9rQDYXlVg oihuC7h60orHtZoUwn7pzbdTofjp82SKRdokbPPWDMMxw26O9P5N5IdAx8Wv0l/XsgRlrW bw7F5jlR6UbfTm2SD4Fj46SjnPlXn6+01Tq3hk484i5iggUMX4SU20d4NfXRjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705053868; a=rsa-sha256; cv=none; b=dV2u7QSj0aRW/EFHQc/KbLqTU+TlRsF9v86//ek3Gh/diJUc6/TGwmBbRaUdvK/Gdf/7pT hKfXGo58yh6uIJg6Xl90B3kOtYtWNy6Ram8A1DwoZ/1MQOx5hsJZwZ/4380SSR1XfI3hB+ w09XKKDyirFpecc6Aglh6cST4wXcGExk4GZgq2ee4Zt5FN2n+PlfNqLauO8p0xRSr0xm2o TMeX4CjPQYfe84An8pEDuGJwuAJA4Ji4J9X5kdhVUWJYj85UQPqg8vrWiQRPUWCumN7xU0 ZCg2ZE5e5pC7FjVL4uy3hjTESRzEV9sRNSGfa3kVcrNFveXVUDvLjmJL3l0ZoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBHFS0GHlzxk7; Fri, 12 Jan 2024 10:04: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 40CA4RaW003627; Fri, 12 Jan 2024 10:04:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CA4Rw0003624; Fri, 12 Jan 2024 10:04:27 GMT (envelope-from git) Date: Fri, 12 Jan 2024 10:04:27 GMT Message-Id: <202401121004.40CA4Rw0003624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e007b89e9d31 - main - tests: add a test for shutdown(2) on a datagram 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e007b89e9d311daec88a3c7ae38646bcd015c396 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e007b89e9d311daec88a3c7ae38646bcd015c396 commit e007b89e9d311daec88a3c7ae38646bcd015c396 Author: Gleb Smirnoff AuthorDate: 2024-01-12 10:04:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-12 10:04:04 +0000 tests: add a test for shutdown(2) on a datagram socket --- tests/sys/kern/Makefile | 2 + tests/sys/kern/shutdown_dgram.c | 111 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 308cfd22a0ec..143c13297585 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -26,6 +26,7 @@ ATF_TESTS_C+= ptrace_test TEST_METADATA.ptrace_test+= timeout="15" ATF_TESTS_C+= reaper ATF_TESTS_C+= sched_affinity +ATF_TESTS_C+= shutdown_dgram ATF_TESTS_C+= sigaltstack ATF_TESTS_C+= sigwait ATF_TESTS_C+= socket_accept @@ -75,6 +76,7 @@ LIBADD.unix_seqpacket_test+= pthread LIBADD.kcov+= pthread CFLAGS.ktls_test+= -DOPENSSL_API_COMPAT=0x10100000L LIBADD.ktls_test+= crypto util +LIBADD.shutdown_dgram+= pthread LIBADD.socket_msg_waitall+= pthread LIBADD.sendfile_helper+= pthread LIBADD.fdgrowtable_test+= util pthread kvm procstat diff --git a/tests/sys/kern/shutdown_dgram.c b/tests/sys/kern/shutdown_dgram.c new file mode 100644 index 000000000000..04382d14f48f --- /dev/null +++ b/tests/sys/kern/shutdown_dgram.c @@ -0,0 +1,111 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Gleb Smirnoff + * + * 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 +#include + +#include + +/* + * shutdown(2) on SOCK_DGRAM shall return ENOTCONN per POSIX. However, there + * is historical behavior of the shutdown(2) also unblocking any ongoing + * recv(2) syscall on the socket. It is known that some programs rely on this + * behavior, but exact list of problems isn't known. Neither we know if the + * "feature" is required on PF_UNIX sockets or on PF_INET/INET6 sockets or + * on both kinds. Feel free to improve this comment if you know any details. + * + * List of relevant commits, bug reports and reviews: + * 63649db04205 + * https://reviews.freebsd.org/D10351 + * b114aa79596c (regresses) + * https://reviews.freebsd.org/D3039 (regresses) + * kern/84761 c5cff17017f9 aada5cccd878 + */ + + +static void * +blocking_thread(void *arg) +{ + int *s = arg; + char buf[1]; + int error, rv; + + rv = recv(*s, buf, sizeof(buf), 0); + error = (rv == -1) ? errno : 0; + + return ((void *)(uintptr_t)error); +} + +static void +shutdown_thread(int s) +{ + pthread_t t; + int rv; + + ATF_REQUIRE(pthread_create(&t, NULL, blocking_thread, &s) == 0); + usleep(1000); + ATF_REQUIRE(shutdown(s, SHUT_RD) == -1); + ATF_REQUIRE(errno == ENOTCONN); + ATF_REQUIRE(pthread_join(t, (void *)&rv) == 0); + ATF_REQUIRE(rv == 0); + close(s); +} + +ATF_TC_WITHOUT_HEAD(unblock); +ATF_TC_BODY(unblock, tc) +{ + static const struct sockaddr_un sun = { + .sun_family = AF_LOCAL, + .sun_len = sizeof(sun), + .sun_path = "shutdown-dgram-test-sock", + }; + int s; + + ATF_REQUIRE((s = socket(PF_UNIX, SOCK_DGRAM, 0)) >= 0); + ATF_REQUIRE(bind(s, (struct sockaddr *)&sun, sizeof(sun)) == 0); + shutdown_thread(s); + + static const struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + }; + ATF_REQUIRE((s = socket(PF_INET, SOCK_DGRAM, 0)) >= 0); + ATF_REQUIRE(bind(s, (struct sockaddr *)&sin, sizeof(sin)) == 0); + shutdown_thread(s); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, unblock); + + return (atf_no_error()); +} From nobody Fri Jan 12 15:44: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 4TBQnk5VGFz573DZ; Fri, 12 Jan 2024 15:44: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 4TBQnk53brz4M2k; Fri, 12 Jan 2024 15:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JtXy593YLQ5zQ3RQiC5vm/OYjlBiDcoEMEfB7I1Da8c=; b=CcyMfHXsNFyQlHZdOrsOCB43qOzkm9CGyT4RTBqQU/0nuHExV+vJl1d1c7x3aa64QbXQHu l6Q6L3wbcteXt9E9ngiZXjY6D6gNByogwvuAK8CkW82qStMdD1vyycOjnlMen39SPlP/pO mWkwoa7YR1zESv18+QJzfgMSXCQHCfz1sdA3I1JbmVOzkdPw75mBet4MFUX1hfKRBS3k8G hkTawkF45zBz1A2rJQdEzQxND0jt1EdEx85EqlHey9LX48DlRP50boAPiHjewJer+YuasI upLUFTc0mEEa3b/+7npDgG6VmgIKYJo9b3ehJfUGwxswK9rTlJBWSRsxIFGOfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JtXy593YLQ5zQ3RQiC5vm/OYjlBiDcoEMEfB7I1Da8c=; b=cwnb6XtWXprjxjbWCcI6qiL62JfrwH9zUNs3qU0gmvG8snaVvZoYVK5LVj2Nnmt7wqp8+e K6qB+uSrTEs7hb4Q4jvnKt1iZFDpAhGIb2ggP838fv55BXtp8n6RXOuFvQmKMHnOdhXZlY w9ubEG+m7epoTYk8KQHg6ksLzcRW9Ok7kxkyRCKQX/69PRBDJICMUvlaVZVCQIexN5L77I Lj1f/RVEwJDEJ5IwNOfbpf2VaX3Nm8pFX4tR0WdbShGSDS8TMTt0sy3t7evqi/rDPTzQ56 JLEmkYnYjb0kBj8qvPM+s96sYjpzfOkgbvzoRzSUG3B1p9SIk2jKDSRCvtpw+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074266; a=rsa-sha256; cv=none; b=uMxLgWzLT6uqoRusAqIzaFHVfG1TpShvgmgH6g8jIj+oxDJT1RE4mGMwKwKKG6pgHg60nP XjcppgvrGYyFrgqLWPwIYXc3CU3wMKnqNE3fShBPU2tT96P/HV8erLG4VK8Hmjw6Nb06F8 JP9CSO+fY5zOdPHMQxxr8dfU3fUr/ybjdfcSRtRUeybbcZvWzeJCHmVPfq5cRGScxeh3WK FWRtNFMIc627a9QE9ZJG+iUTa01H9tbt8g12j3451deh8W7cFSLpNhRQj0Tv68Lg94VD/x T09FKfi8Vu60xbw6q7NJOv6SbuJ6qG6wgXxvI6xqiBoUgUOltyzaRCXTli8j7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBQnk46XXz17MW; Fri, 12 Jan 2024 15:44: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 40CFiQ8l076533; Fri, 12 Jan 2024 15:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiQvH076530; Fri, 12 Jan 2024 15:44:26 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:26 GMT Message-Id: <202401121544.40CFiQvH076530@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: a3d80dd8aa6a - main - login: Use getpwnam_r() instead of getpwnam(). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3d80dd8aa6ac15877e00102ab174b417ac81d79 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d80dd8aa6ac15877e00102ab174b417ac81d79 commit a3d80dd8aa6ac15877e00102ab174b417ac81d79 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:43:42 +0000 login: Use getpwnam_r() instead of getpwnam(). Since we expect the entry to still be valid after calling into PAM, which may call getpwnam() itself, we need to use getpwnam_r(). MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp, allanjude, markj Differential Revision: https://reviews.freebsd.org/D43376 --- usr.bin/login/login.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 409e6cc373ad..5b4fa55dc541 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -110,6 +110,8 @@ static u_int timeout = 300; /* Buffer for signal handling of timeout */ static jmp_buf timeout_buf; +char pwbuf[1024]; +struct passwd pwres; struct passwd *pwd; static int failures; @@ -315,7 +317,7 @@ main(int argc, char *argv[]) bail(NO_SLEEP_EXIT, 1); } - pwd = getpwnam(username); + (void)getpwnam_r(username, &pwres, pwbuf, sizeof(pwbuf), &pwd); if (pwd != NULL && pwd->pw_uid == 0) rootlogin = 1; @@ -338,7 +340,7 @@ main(int argc, char *argv[]) (void)setpriority(PRIO_PROCESS, 0, 0); } - if (pwd && rval == 0) + if (pwd != NULL && rval == 0) break; pam_cleanup(); From nobody Fri Jan 12 15:44: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 4TBQnl6lTFz5734R; Fri, 12 Jan 2024 15:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBQnl69XGz4LxT; Fri, 12 Jan 2024 15:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rSE/OcjV4p+Xw48nzsp7zsjhn2q5ngSxYqfeq8lLNIs=; b=jzso9jVKAKgS86qPnZxYYIfXAMe5nDEh81lcRU7RnX6Kt2+A875qck0l75RFCc+POGdRCB dPqX1AJ9Kzu06Zd+yDNmZx5xjtUCac90NpdlSNaz1w79xlooG4LrVJnd6eZstIznu1UpJn 5M6mWJ8CFnGFuFbpAMZnBclmrvcdDDE2CcuFBQPq1oEWeQ+ODAUndpczYQb8HWbXQ5bO8h Z5WgQbb1wniNKZC5FFtlgdGidBL9f27PCUGuZY1lXyJy2331KnfvuvBwGpi/E9L1HHHzSK sM3xOm8uliiLiZwXd+pXVixBxUQTDr1Ua3Yubj6T7KcOYFt0fA6wEROgJUNDFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rSE/OcjV4p+Xw48nzsp7zsjhn2q5ngSxYqfeq8lLNIs=; b=pIrMuQZLo5f7+Ey+Wk/KtH5lxnLETZ7PvjaB0TRYelyBKt9misKw14tdNhwNeJbrxo7qz/ 3ULOLlZWZF/a2m4UYac7UQhMBPvqjBo2/Qp16Zfi3vBR90U6Lo5FZ76RLka0Nhhz+I/u1s qP+GxS5Y6LComRCjJ4HkLONPGXNoetQTAwaanxXO+Zhhyksjd7HZzP1uKpBEeBtuuEwd71 4n3Km+7oNIlRIB9nyTTL/FcI6eUOEl7WiOieT4siSL71P26xNm/5U7Vxsp4FpZHoIeItPZ mj9GfvGdGp81/o6d/D1HXnnf+HVqoNBS3MgayBAbb6tXbP7az5lz0aEZL30tCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074267; a=rsa-sha256; cv=none; b=HhDiTLQWniXBGT2xWE9cds00O2qPedLOXOQWF8Ya5poXpQTxp94TLfEVmpOGqVTEBf6vY8 lKi4ElEXhiGQ7+51cI1/mU6jRMB2lMJUzulU1EBWYJTzwsgGyeaz3e1sj2ixxg0s4W6xyc sWmch6AtWcN8xXEd743yqsNlqQ4apiVmR9erfYC8XqOwZrPr7bxTca5hhcp4xosA0xVwzd 8hlFdcJnfMxdyC0osYL3G2QYD1dFR1PIcWQvSmKNAVp074Su2IOuriZvS27ZQqSF++P1MN PBInEMx6B/i4tlJV5Df5I55nBtkh3zj366GqJor0xZXZdn67VIjROTwzS5SdJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBQnl5H4lz17B8; Fri, 12 Jan 2024 15:44: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 40CFiRnX076587; Fri, 12 Jan 2024 15:44:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiRSx076584; Fri, 12 Jan 2024 15:44:27 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:27 GMT Message-Id: <202401121544.40CFiRSx076584@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: e762fd81e253 - main - uniq: Replace NetBSD's unit tests with our own. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e762fd81e253d4ae9b9f7d2e65cf448633bbe527 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e762fd81e253d4ae9b9f7d2e65cf448633bbe527 commit e762fd81e253d4ae9b9f7d2e65cf448633bbe527 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:43:49 +0000 uniq: Replace NetBSD's unit tests with our own. These new tests cover more functionality and are easier to extend. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D43381 --- ObsoleteFiles.inc | 8 +++ usr.bin/uniq/tests/Makefile | 13 +--- usr.bin/uniq/tests/uniq_test.sh | 149 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+), 12 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index da7e3d432bfb..ac936aebb574 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20240112: replaced NetBSD tests for uniq with our own +OLD_FILES+=usr/tests/usr.bin/uniq/d_basic.in +OLD_FILES+=usr/tests/usr.bin/uniq/d_basic.out +OLD_FILES+=usr/tests/usr.bin/uniq/d_counts.out +OLD_FILES+=usr/tests/usr.bin/uniq/d_input.in +OLD_FILES+=usr/tests/usr.bin/uniq/d_show_duplicates.out +OLD_FILES+=usr/tests/usr.bin/uniq/d_show_uniques.out + # 20231208: new clang import which bumps version from 16 to 17 OLD_FILES+=usr/lib/clang/16/include/__clang_cuda_builtin_vars.h OLD_FILES+=usr/lib/clang/16/include/__clang_cuda_cmath.h diff --git a/usr.bin/uniq/tests/Makefile b/usr.bin/uniq/tests/Makefile index d9c839aa35b6..55bb98e98c34 100644 --- a/usr.bin/uniq/tests/Makefile +++ b/usr.bin/uniq/tests/Makefile @@ -1,15 +1,4 @@ - PACKAGE= tests - -NETBSD_ATF_TESTS_SH= uniq_test - -${PACKAGE}FILES+= d_basic.in -${PACKAGE}FILES+= d_basic.out -${PACKAGE}FILES+= d_counts.out -${PACKAGE}FILES+= d_input.in -${PACKAGE}FILES+= d_show_duplicates.out -${PACKAGE}FILES+= d_show_uniques.out - -.include +ATF_TESTS_SH= uniq_test .include diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh new file mode 100755 index 000000000000..ddd9ec9881dd --- /dev/null +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -0,0 +1,149 @@ +# +# Copyright (c) 2024 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +atf_check_uniq() { + atf_check uniq "$@" input actual + atf_check diff -u actual expected + atf_check uniq "$@" - actual input + printf "a\nb\na\n" >expected + atf_check_uniq +} + +atf_test_case count +count_head() { + atf_set descr "basic test showing counts" +} +count_body() { + printf "a\na\nb\nb\nb\na\na\na\na\n" >input + printf " 2 a\n 3 b\n 4 a\n" >expected + atf_check_uniq -c + atf_check_uniq --count +} + +atf_test_case repeated +repeated_head() { + atf_set descr "print repeated lines only" +} +repeated_body() { + printf "a\na\nb\na\na\n" >input + printf "a\na\n" >expected + atf_check_uniq -d + atf_check_uniq --repeated +} + +atf_test_case count_repeated +count_repeated_head() { + atf_set descr "count and print repeated lines only" +} +count_repeated_body() { + printf "a\na\nb\nb\na\n" >input + printf " 2 a\n 2 b\n" >expected + atf_check_uniq --count --repeated +} + +atf_test_case all_repeated +all_repeated_head() { + atf_set descr "print every instance of repeated lines" +} +all_repeated_body() { + printf "a\na\nb\na\na\n" >input + printf "a\na\na\na\n" >expected + atf_check_uniq -D + atf_check_uniq --all-repeated +} + +atf_test_case skip_fields +skip_fields_head() { + atf_set descr "skip fields" +} +skip_fields_body() { + printf "1 a\n2 a\n3 b\n4 b\n5 a\n6 a\n" >input + printf "1 a\n3 b\n5 a\n" >expected + atf_check_uniq -f 1 + atf_check_uniq --skip-fields 1 +} + +atf_test_case skip_fields_tab +skip_fields_tab_head() { + atf_set descr "skip fields (with tabs)" +} +skip_fields_tab_body() { + printf "1\ta\n2\ta\n3\tb\n4\tb\n5\ta\n6\ta\n" >input + printf "1\ta\n3\tb\n5\ta\n" >expected + atf_check_uniq -f 1 + atf_check_uniq --skip-fields 1 +} + +atf_test_case ignore_case +ignore_case_head() { + atf_set descr "ignore case" +} +ignore_case_body() { + printf "a\nA\nb\nB\na\nA\n" >input + printf "a\nb\na\n" >expected + atf_check_uniq -i + atf_check_uniq --ignore-case +} + +atf_test_case skip_chars +skip_chars_head() { + atf_set descr "skip chars" +} +skip_chars_body() { + printf "1 a\n2 a\n3 b\n4 b\n5 a\n6 a\n" >input + printf "1 a\n3 b\n5 a\n" >expected + atf_check_uniq -s 2 + atf_check_uniq --skip-chars 2 +} + +atf_test_case unique +unique_head() { + atf_set descr "print non-repeated lines only" +} +unique_body() { + printf "a\na\nb\na\na\n" >input + printf "b\n" >expected + atf_check_uniq -u + atf_check_uniq --unique +} + +atf_test_case count_unique +count_unique_head() { + atf_set descr "print non-repeated lines with count" +} +count_unique_body() { + printf "a\na\nb\n" >input + printf " 1 b\n" >expected + atf_check_uniq --unique --count + atf_check_uniq --count --unique +} + +atf_init_test_cases() +{ + atf_add_test_case basic + atf_add_test_case count + atf_add_test_case repeated + atf_add_test_case count_repeated + atf_add_test_case all_repeated + atf_add_test_case skip_fields + atf_add_test_case skip_fields_tab + atf_add_test_case ignore_case + atf_add_test_case skip_chars + atf_add_test_case unique + atf_add_test_case count_unique +} From nobody Fri Jan 12 15:44:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQnn1nYRz573cj; Fri, 12 Jan 2024 15:44: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 4TBQnm6dXyz4M7s; Fri, 12 Jan 2024 15:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yUyiqK9yK3XHn+NsSvDnziCfC4n/Dwh3jm0+1O1kSTM=; b=LrspZmOSLoFjuwCcAEOz7uTsYRYq779kUfS55BDqvO04jcPl0tZpxaljhKhmzxkVOiY+k+ 0rsFEmTZuVRKVaXkfRt1g+C96TD9evRyFUh1aGB/fKoL68jpAiwRN5xGtsDRY/TqGCESjw WHw0Zhc0Pa2p6X+AVbvSKx/H4JBNDYQESiTlc+73eR/YOcK/RVAK5t2f3ecldCPaDTFdXT zTS10Dn865uOg1Z0w8l17otQH39Coldsy75sO1dokWh+ckXElPhP1OXpayUY7zCLjUdD0B 575Z6goEPLE5GvBWCMyVN6Dk4cwEdAB3SNX8VtVZkpaKJQp4DcSPoMAanNObWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yUyiqK9yK3XHn+NsSvDnziCfC4n/Dwh3jm0+1O1kSTM=; b=fQf0SRkIF9lu9YHc9lLgZvn2UUXGnNBi8S2Pcu5z3+KRw80a9pjt2L/QP9o0yAkcukPlQV jSGWVTJ6WqtcjoA2ueNsJnsWnJy+QG1NsWCaetQNc4LRlR2wgzCmhn4MyRO40PqDi5p0Zw rnid++7JVje+nWBiRwla9dH2xyjZebniGp/URYzY9JCXlRR4CmL5uQuvlCndr5sJBF2ryw +PJnitMS3SpganJU2L0bWi+wpvJjCCKdyxzVLFctGcYE/g6egfqL/54ekcHRoSJdLmt4Jh KSeiC+h7Dj1fCuzqMelXQ5JkhYe07/bGvrQFw2HutF8PumfbBADxNXQt1VJncQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074269; a=rsa-sha256; cv=none; b=mh9Ex9ULHFK93Rjy2Xi3xI6HESHz2gpwc/QVz3LpGdtQS0wo/h6YmE4RYQ7KwwJL0XNsqE XGDuZ8Iq1DIXhugUO42ui0OEMzAOhLPTyue3Psbi8JJoF3RdjJWXFhZmxbTxUtLZ7W/ElR xWJDqdBEu4u7ijUHEggOZ5xJFuJQhz7rpTCC1M31VNirV2hb91BieztGTaY4F0P5Fg3x1F clQaANLf0YoS4G+jHc42JPwTzt7u+yo9xgpNBbwQbhAm9X37MHR544DhDDcjY3uuALDui1 uklHPAdOdPg629AZZBvo+aehSvk97R1aVayr+nxNX+5Jdxfx1GTWxRwqngutlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBQnm5kpCz170n; Fri, 12 Jan 2024 15:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CFiSxK076636; Fri, 12 Jan 2024 15:44:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiSAe076633; Fri, 12 Jan 2024 15:44:28 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:28 GMT Message-Id: <202401121544.40CFiSAe076633@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: 11715600e626 - main - uniq: Fix interactive use. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11715600e626cf6cc4b4f564af97f6ae1e5fb0be Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=11715600e626cf6cc4b4f564af97f6ae1e5fb0be commit 11715600e626cf6cc4b4f564af97f6ae1e5fb0be Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:43:55 +0000 uniq: Fix interactive use. Output a line as soon as it is possible to determine that it will have to be output. For the basic case, this means output each line as it is read unless it is identical to the previous one. For the -d case, it means output the first instance as soon as the second is read, unless the -c option was also given. The -D and -u cases were already fine. Add test cases for interactive use with no options and with -d. Explicitly ignore -d when -D is also specified. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: rew, kevans Differential Revision: https://reviews.freebsd.org/D43382 --- usr.bin/uniq/tests/uniq_test.sh | 26 ++++++++++++++++++++++ usr.bin/uniq/uniq.1 | 5 ++++- usr.bin/uniq/uniq.c | 49 ++++++++++++++++++++++++----------------- 3 files changed, 59 insertions(+), 21 deletions(-) diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh index ddd9ec9881dd..8dc2015734f6 100755 --- a/usr.bin/uniq/tests/uniq_test.sh +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -133,6 +133,30 @@ count_unique_body() { atf_check_uniq --count --unique } +atf_test_case interactive +interactive_head() { + atf_set descr "test interactive use" +} +interactive_body() { + sh -c 'yes | stdbuf -oL uniq >actual' & + pid=$! + sleep 1 + kill $! + atf_check -o inline:"y\n" cat actual +} + +atf_test_case interactive_repeated +interactive_repeated_head() { + atf_set descr "test interactive use with -d" +} +interactive_repeated_body() { + sh -c 'yes | stdbuf -oL uniq -d >actual' & + pid=$! + sleep 1 + kill $! + atf_check -o inline:"y\n" cat actual +} + atf_init_test_cases() { atf_add_test_case basic @@ -146,4 +170,6 @@ atf_init_test_cases() atf_add_test_case skip_chars atf_add_test_case unique atf_add_test_case count_unique + atf_add_test_case interactive + atf_add_test_case interactive_repeated } diff --git a/usr.bin/uniq/uniq.1 b/usr.bin/uniq/uniq.1 index e01c84328575..30dee856d772 100644 --- a/usr.bin/uniq/uniq.1 +++ b/usr.bin/uniq/uniq.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 7, 2020 +.Dd January 12, 2024 .Dt UNIQ 1 .Os .Sh NAME @@ -72,6 +72,9 @@ Precede each output line with the count of the number of times the line occurred in the input, followed by a single space. .It Fl d , Fl -repeated Output a single copy of each line that is repeated in the input. +Ignored if +.Fl D +is also specified. .It Fl D , Fl -all-repeated Op Ar septype Output all lines that are repeated (like .Fl d , diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 55766f7e987e..0bc9b2b86af3 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -51,14 +52,9 @@ #include #include -static int Dflag, cflag, dflag, uflag, iflag; -static int numchars, numfields, repeats; - -/* Dflag values */ -#define DF_NONE 0 -#define DF_NOSEP 1 -#define DF_PRESEP 2 -#define DF_POSTSEP 3 +static enum { DF_NONE, DF_NOSEP, DF_PRESEP, DF_POSTSEP } Dflag; +static bool cflag, dflag, uflag, iflag; +static long long numchars, numfields, repeats; static const struct option long_opts[] = { @@ -88,7 +84,7 @@ main (int argc, char *argv[]) int ch, comp; size_t prevbuflen, thisbuflen, b1; char *prevline, *thisline, *p; - const char *ifn, *errstr;; + const char *errstr, *ifn; cap_rights_t rights; (void) setlocale(LC_ALL, ""); @@ -108,13 +104,13 @@ main (int argc, char *argv[]) usage(); break; case 'c': - cflag = 1; + cflag = true; break; case 'd': - dflag = 1; + dflag = true; break; case 'i': - iflag = 1; + iflag = true; break; case 'f': numfields = strtonum(optarg, 0, INT_MAX, &errstr); @@ -127,7 +123,7 @@ main (int argc, char *argv[]) errx(1, "character skip value is %s: %s", errstr, optarg); break; case 'u': - uflag = 1; + uflag = true; break; case '?': default: @@ -140,6 +136,9 @@ main (int argc, char *argv[]) if (argc > 2) usage(); + if (Dflag && dflag) + dflag = false; + ifp = stdin; ifn = "stdin"; ofp = stdout; @@ -180,6 +179,8 @@ main (int argc, char *argv[]) err(1, "%s", ifn); exit(0); } + if (!cflag && !Dflag && !dflag && !uflag) + show(ofp, prevline); tprev = convert(prevline); tthis = NULL; @@ -199,7 +200,11 @@ main (int argc, char *argv[]) /* If different, print; set previous to new value. */ if (Dflag == DF_POSTSEP && repeats > 0) fputc('\n', ofp); - if (!Dflag) + if (!cflag && !Dflag && !dflag && !uflag) + show(ofp, thisline); + else if (!Dflag && + (!dflag || (cflag && repeats > 0)) && + (!uflag || repeats == 0)) show(ofp, prevline); p = prevline; b1 = prevbuflen; @@ -220,13 +225,20 @@ main (int argc, char *argv[]) show(ofp, prevline); } show(ofp, thisline); + } else if (dflag && !cflag) { + if (repeats == 0) + show(ofp, prevline); } ++repeats; } } if (ferror(ifp)) err(1, "%s", ifn); - if (!Dflag) + if (!cflag && !Dflag && !dflag && !uflag) + /* already printed */ ; + else if (!Dflag && + (!dflag || (cflag && repeats > 0)) && + (!uflag || repeats == 0)) show(ofp, prevline); exit(0); } @@ -291,11 +303,8 @@ inlcmp(const char *s1, const char *s2) static void show(FILE *ofp, const char *str) { - - if ((!Dflag && dflag && repeats == 0) || (uflag && repeats > 0)) - return; if (cflag) - (void)fprintf(ofp, "%4d %s", repeats + 1, str); + (void)fprintf(ofp, "%4lld %s", repeats + 1, str); else (void)fprintf(ofp, "%s", str); } @@ -303,7 +312,7 @@ show(FILE *ofp, const char *str) static wchar_t * skip(wchar_t *str) { - int nchars, nfields; + long long nchars, nfields; for (nfields = 0; *str != L'\0' && nfields++ != numfields; ) { while (iswblank(*str)) From nobody Fri Jan 12 15:44:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQnp1f78z573B2; Fri, 12 Jan 2024 15:44: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 4TBQnp0nSBz4M1J; Fri, 12 Jan 2024 15:44:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRYU4VA88Fw6q/oqaBi1yRickTUDkUpaH+EKiqld2/E=; b=PLVzpZxCndzOftKYg6CBD0pkvGTI7k9HNSHuGP6DxufebN9HhFgShhfdE/1sDomIGBg8qd mD4EE3RUcFST2yydNXq9RZW+X946Oow5T6r1J7SVmivtroEO/KrxWeFZwoS58pvgrWYeY9 0iERD7165M67YEs/HYzr9g8wGUDG0ZdKVSUaCSmnR5cqi2FcKANZR5V/M9dOPHKDymiIUg nKOq6Bicf0afLhpL1QdwN0zXwiFojxWHIrcnNZcbEcTme9poeTQsV4yInTF0JMiQKq2AZB kfo5k3jtzgyy+egNtERW7ckQIkIzViUamk8Loqnpc+5w3A7SGQvn3XB/ZCLlHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRYU4VA88Fw6q/oqaBi1yRickTUDkUpaH+EKiqld2/E=; b=k7YaY7lFg+qOLnDwaOpVolPlgbMlwxakUhb732rDjWWcrsp7OGEoa9HRt8hEWCJkhkzkD8 bOjVBNN3GjiPxxYFSNUvEe/jx8yU+SHlgV9bKQ6Mc19qNV38S2ALAlnhg0PCgIJtLKnJ5i KTY+EP8GlBCwzc9EIdVZM75fnyhjG5M4iiKnAHQybqrcHMUUR1GuVnhcjE54QUCsc0UEhJ lSRiD9mIJrcWoz1/CIwQFJWc2ilg3iP+3+uNnU702vGYtmhDKXQ1GKoH9NKMwJ6Vtx6kaN xlw5wsErczkZct4OZw3+oRhMCTgX8QLeyx+7q3PqIui4G/NPTwfBHJ8iWBDq3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074270; a=rsa-sha256; cv=none; b=fjVDFbEc563YFidMud1HBM5Av7c/dFpxtSZ/ltHC2MUOMiRiirk1yY67ST91r0lXHtSZLZ y/7PmsYF6trtGW7Q1j7dxFKECZMdylO38ADCzm6OheHOGc0JPP/+iZaB8zTjN9Xbuomhad GHqlgHs/JPcH6+QuArGBfBusmtS4UF57+ehJnfFvDduUEjz5Y2JUq5blGdeoOqeHmFV2Uz MRwqxGUToPO/L0eJeyB9lgVPTwi0pipWPLe5h9/cirEkAfk70HL3YWdcCGH/vToXB6QCzG CqaehHMBfRxUrYew5Blv8FBT7ARYB6dqvImMv1kKOrjXHpnyAvDSy6NHix+aUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBQnn70fQz16wM; Fri, 12 Jan 2024 15:44: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 40CFiTNb076687; Fri, 12 Jan 2024 15:44:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiT5q076684; Fri, 12 Jan 2024 15:44:29 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:29 GMT Message-Id: <202401121544.40CFiT5q076684@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: e2ec8ee02a33 - main - uniq: Clean up and test obsolete options. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2ec8ee02a33e39b8ff86a56e8a1ef5e84ac7e62 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e2ec8ee02a33e39b8ff86a56e8a1ef5e84ac7e62 commit e2ec8ee02a33e39b8ff86a56e8a1ef5e84ac7e62 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:44:00 +0000 uniq: Clean up and test obsolete options. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43402 --- usr.bin/uniq/tests/uniq_test.sh | 3 +++ usr.bin/uniq/uniq.c | 14 +++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh index 8dc2015734f6..537962eb6513 100755 --- a/usr.bin/uniq/tests/uniq_test.sh +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -74,6 +74,7 @@ skip_fields_head() { skip_fields_body() { printf "1 a\n2 a\n3 b\n4 b\n5 a\n6 a\n" >input printf "1 a\n3 b\n5 a\n" >expected + atf_check_uniq -1 atf_check_uniq -f 1 atf_check_uniq --skip-fields 1 } @@ -85,6 +86,7 @@ skip_fields_tab_head() { skip_fields_tab_body() { printf "1\ta\n2\ta\n3\tb\n4\tb\n5\ta\n6\ta\n" >input printf "1\ta\n3\tb\n5\ta\n" >expected + atf_check_uniq -1 atf_check_uniq -f 1 atf_check_uniq --skip-fields 1 } @@ -107,6 +109,7 @@ skip_chars_head() { skip_chars_body() { printf "1 a\n2 a\n3 b\n4 b\n5 a\n6 a\n" >input printf "1 a\n3 b\n5 a\n" >expected + atf_check_uniq +2 atf_check_uniq -s 2 atf_check_uniq --skip-chars 2 } diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 0bc9b2b86af3..ef59d7339d0c 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -338,29 +338,25 @@ file(const char *name, const char *mode) static void obsolete(char *argv[]) { - int len; - char *ap, *p, *start; + char *ap, *p; while ((ap = *++argv)) { /* Return if "--" or not an option of any form. */ if (ap[0] != '-') { if (ap[0] != '+') return; - } else if (ap[1] == '-') + } else if (ap[1] == '-') { return; + } if (!isdigit((unsigned char)ap[1])) continue; /* * Digit signifies an old-style option. Malloc space for dash, * new option and argument. */ - len = strlen(ap); - if ((start = p = malloc(len + 3)) == NULL) + if (asprintf(&p, "-%c%s", ap[0] == '+' ? 's' : 'f', ap + 1) < 0) err(1, "malloc"); - *p++ = '-'; - *p++ = ap[0] == '+' ? 's' : 'f'; - (void)strcpy(p, ap + 1); - *argv = start; + *argv = p; } } From nobody Fri Jan 12 15:44: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 4TBQnq2z9Nz573Gs; Fri, 12 Jan 2024 15:44: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 4TBQnq1pQmz4MM8; Fri, 12 Jan 2024 15:44:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=az9VyCNaBOVoRjfU7rX7y3UT9QIHsKXaVjXc5LoUG00=; b=IEQVfi1EOK6+60K/AUEYL9B9ANzDY40mF/PQ1N93PkfkbLCthU0S5YABiaI7XbW1kEqXMq 2dK9D17dckDMpZb/uYJJm+Mt/d9EK9z2qydpE7hIVvL+3g2KEcvCdgHFCzk858U1gZFb80 f/WvJNMn8VbDYdZHFVF31wtJc/qkDce7FOIXpzFbhvDkm3jSe1TbJo98BhPty7Sy1riScs nIENpbR2/mD2HfkaUZmwBvFGL/ycLbFAl8sewY591fTQuXfbGqkx7SsT6SNpsDGWIfWAuu oKdx8R9QQEMiZHkhZBs0QMF2vDezDKXLDbl8z3uEk9wzMKCt3Eb45PFNfQxFxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=az9VyCNaBOVoRjfU7rX7y3UT9QIHsKXaVjXc5LoUG00=; b=WHzvNiuTjay7iuR0NBYVp6NfRitcCjvJrksm1vl2yZOJnokgczMSvnREy1jRzmpYhCtaIk O/LKUE1J6ksUdGmS2l1LEiXjBBG9JSNnKr+QE+wlq2LfccSf1TD9smuuzvZWNruaKQWhHu hLmVqG7D1MnsyJBx4keZJogi3U1aEYAKHEOOBD7kX4QHTSABTByMvvNgi+XV3G3XQBPFjf AKzwLH/hLBBllbULwLkcGsSiaAREgwWF6EXqvR8KAg0YeOFvA3uUs1vDABYxPKXjbD5dhX YiSozjzMztb9J8GR2AEQwE5OQUPG/3Y2kHY2ZEe1uhe1q2mYFNU7olfukW5RuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074271; a=rsa-sha256; cv=none; b=dMQuLDVEAE1irHtCKllPa1yEPjT+WSlTvUlv0a+2XtlQVo3vIU5QEGf/a9LDE2ATVV90kd CPeSQ4YnkPvNxmkj5taWTmm5h4gzHbbuYTNCtKakngOsDS+Z19z2CiLKJHQFsFc56AWN8i sbrzXx3ZioEXGWB0x+Jam6TOhOvUmHYrQ+Fd+9nT0BgqyRxqcHoND5ys3jQIw4RPvjhWr7 hlzlW2/MPmKi+W7f2hJLjT83uNQrfGQtXHLNNCH0uL19VaAN7ZyggZ5BdVBfq0KNW9IHRj TsMYYiEIdZbmqeLpQWF8NG6R6+TvKBL8d7MjtpYfype+MlpCoQTPJ4Bcs8IHIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBQnq0vqqz170p; Fri, 12 Jan 2024 15:44: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 40CFiVCL076747; Fri, 12 Jan 2024 15:44:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiVAQ076744; Fri, 12 Jan 2024 15:44:31 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:31 GMT Message-Id: <202401121544.40CFiVAQ076744@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: 899837e8f574 - main - uniq: Error out if writing to the output failed. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 899837e8f5741f9a847b63d9e7c8b76ccc033ab5 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=899837e8f5741f9a847b63d9e7c8b76ccc033ab5 commit 899837e8f5741f9a847b63d9e7c8b76ccc033ab5 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:44:06 +0000 uniq: Error out if writing to the output failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43407 --- usr.bin/uniq/tests/uniq_test.sh | 15 +++++++++++++++ usr.bin/uniq/uniq.c | 7 +++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh index 537962eb6513..804e82ce7766 100755 --- a/usr.bin/uniq/tests/uniq_test.sh +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -160,6 +160,20 @@ interactive_repeated_body() { atf_check -o inline:"y\n" cat actual } +atf_test_case stdout +stdout_head() { + atf_set descr "error writing to stdout" +} +stdout_body() { + ( + trap "" PIPE + echo a | uniq 2>stderr + echo $? >result + ) | true + atf_check -o inline:"1\n" cat result + atf_check -o match:"stdout" cat stderr +} + atf_init_test_cases() { atf_add_test_case basic @@ -175,4 +189,5 @@ atf_init_test_cases() atf_add_test_case count_unique atf_add_test_case interactive atf_add_test_case interactive_repeated + atf_add_test_case stdout } diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index ef59d7339d0c..9978c4996dc7 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -84,7 +84,7 @@ main (int argc, char *argv[]) int ch, comp; size_t prevbuflen, thisbuflen, b1; char *prevline, *thisline, *p; - const char *errstr, *ifn; + const char *errstr, *ifn, *ofn; cap_rights_t rights; (void) setlocale(LC_ALL, ""); @@ -142,6 +142,7 @@ main (int argc, char *argv[]) ifp = stdin; ifn = "stdin"; ofp = stdout; + ofn = "stdout"; if (argc > 0 && strcmp(argv[0], "-") != 0) ifp = file(ifn = argv[0], "r"); cap_rights_init(&rights, CAP_FSTAT, CAP_READ); @@ -149,7 +150,7 @@ main (int argc, char *argv[]) err(1, "unable to limit rights for %s", ifn); cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE); if (argc > 1) - ofp = file(argv[1], "w"); + ofp = file(ofn = argv[1], "w"); else cap_rights_set(&rights, CAP_IOCTL); if (caph_rights_limit(fileno(ofp), &rights) < 0) { @@ -240,6 +241,8 @@ main (int argc, char *argv[]) (!dflag || (cflag && repeats > 0)) && (!uflag || repeats == 0)) show(ofp, prevline); + if (fflush(ofp) != 0) + err(1, "%s", ofn); exit(0); } From nobody Fri Jan 12 16:41:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBS373bpbz577ht; Fri, 12 Jan 2024 16:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBS371khxz4VrZ; Fri, 12 Jan 2024 16:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705077667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzvKU1Wog2lPQWgYMJJz9AecRXDm/HRsBjCjW3THDo8=; b=Ciy6JTescqkMJ/45L8p8p1IzyFEzfZLhC5duzsf9Z7D6WCMzk/t+r59eToFsoICzputhNz LCRJ4wN8N8M/aWOyUhXa06Dv1uTQXbmyBcvr6sx7LYaE4wYjVN2nv7gJ1il1L8C6xziPT+ Xp4R1YNfMeROhguq5MIc5iOrfKwcrXteslIiLA5iijWBMbgl+o1iIpMM45Kh7HnJzmQW94 mtze6ElU57fEvRMrpiaLik1borrbxa0w78YpOnLWYc26YrY7Kn50JqATMZz8eQ6ry20DxJ wYqsmbS/EDDrfAuMbu+L8EplhxLywpaNUWFDpouZh3uqjzBTJKLvjZ27vZetcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705077667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzvKU1Wog2lPQWgYMJJz9AecRXDm/HRsBjCjW3THDo8=; b=FB0jyklSzbGbgSDwlSE6GMRtbYr4Cf8zvmW3JHr1g/NQzIDZTOJkG4++HXqkrbaClBRquP aXG0XkEdL6NGnjmV59VmU6JAfDpYgS6MEhzq9y03prp1rebGvv6SuFuhsO2hyDJYXDAuq8 HEzNb3OsWFFB+3YOuQEnRcAB5p5Ij+IZTNFxjjvIuSg3zV7O1iyPiilWKIcu1gdyJudOB9 Od/JmOrJrtAZB3KidOKxNNLptXtzyGjOgqtbRAJg/Kq9Ga5OIumzxJmGTHLWbsK3VchYhP RCKAr49uA5CeRkKfFhGD+adpKDFysj3yww9MV2DOI/3l50xNE9RT35gd7Ioc6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705077667; a=rsa-sha256; cv=none; b=idzXLY3Rr6eTo0N406R5GAhJi/5Nto9xA4YFqOgYxHbqcVPBsViyFo6PxSgO1wcWb2EZ2T ys/XN2UsAYhV8axCC80MxK6jMegYu1ZvFQUSUOFr0p+9o9MDVhKsu9eZYkHXzIBzdnT6tW yu0K4VFI5CG515hZNCgMyCUXOK87d4riDWgP16R88L3piBfa0G0QFycgO9Ulzy+qgt8sYa oe+sI+7utDFXuT9S/Uoz7b4vlYFBjAOYrcgwRX+eSLghOhX+cdkxTSKdLtCXRnZV/bYzkl SvuZo338ukJxEIE92opj9hE4RPrFw7lLmPc4Ej+akU6wU0bQeKSFPTH+Lch1tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBS370qyKz18QP; Fri, 12 Jan 2024 16:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CGf7mV074858; Fri, 12 Jan 2024 16:41:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CGf7Q2074855; Fri, 12 Jan 2024 16:41:07 GMT (envelope-from git) Date: Fri, 12 Jan 2024 16:41:07 GMT Message-Id: <202401121641.40CGf7Q2074855@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: 1e25eb287f3f - main - login: Missed an instance of getpwnam(). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e25eb287f3fdd763df98065dbf2e1eb201e4000 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1e25eb287f3fdd763df98065dbf2e1eb201e4000 commit 1e25eb287f3fdd763df98065dbf2e1eb201e4000 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 16:40:55 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 16:40:55 +0000 login: Missed an instance of getpwnam(). Fixes: a3d80dd8aa6ac15877e00102ab174b417ac81d79 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D43423 --- usr.bin/login/login.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 5b4fa55dc541..6a0c6a5b6bbc 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -704,8 +704,10 @@ auth_pam(void) pam_err = pam_get_item(pamh, PAM_USER, &item); if (pam_err == PAM_SUCCESS) { tmpl_user = (const char *)item; - if (strcmp(username, tmpl_user) != 0) - pwd = getpwnam(tmpl_user); + if (strcmp(username, tmpl_user) != 0) { + (void)getpwnam_r(tmpl_user, &pwres, pwbuf, + sizeof(pwbuf), &pwd); + } } else { pam_syslog("pam_get_item(PAM_USER)"); } From nobody Fri Jan 12 18:32: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 4TBVWN018Mz57Jwt; Fri, 12 Jan 2024 18:32: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 4TBVWM6N1kz3xn4; Fri, 12 Jan 2024 18:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705084335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8M+5mAzNM+0A7QPnWmpzcVoYGkZxlXr7sHZw9GELqQ=; b=Ql6oKTen1tJcgbxrlnIqaR72L6L+ShJrMGOrPS6xNZqSLvWuDvHerggaktRgtPZcyolvz0 w6egTPjQVtwdas35H5C1xlMO2NsfUvF5vNhdyYgCZA6WDSFHBeKen9uNWKtDOIe1CFnk7f v8j3jbchZAX60DHbny10XZ9E7USOq/T6nCSwk/Q/V3YPWB/tAmS6PjrnzU5qSsT9YTMzsk rQJ70gKmxIo4voQIs5z5QQGbS/x7ICf2Zl7vKXQgrLnEP4WoO/QTdhuh49MO/hbHs8Vttb vMxfX+CBfgsF3OmZiXNmC2x8vYCkMnc7q42MOH+tPj0Tp/EcR21lMEqTqFV1XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705084335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8M+5mAzNM+0A7QPnWmpzcVoYGkZxlXr7sHZw9GELqQ=; b=yL//gIan6TrsR8/ZFNIbXTZ71mlORsuYa3RktJkcnym+lH5liDVYOwMnFDrUrVLRgcye2n Ev2X281G9tRNuiAyP+yzMA3RlgnH4J9wHM80deutv619uZ/L5IlOVEEyBaLhF1aBTdTrQw BOqTi1YA28EE1Qz/IkymEx4ncHVS5ZEzzsx4LiYHbZarvGlPFalV4+jR0Cl8qqpRIWneTP PuHXlZjUGzhgPjLzL6B3uUM4WQwR9kk1dV9yiH7PVv76rbfQFT04HZ3p2qqkc9+MrYX0oQ 7cJefBvnTVCEdH+YFqzX0+VNtJL1eTY+ELPm3k55DtcU/4XGSy00vOfAkmz41Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705084335; a=rsa-sha256; cv=none; b=ln1r2Cp0Y07aJVZHLsrELdYQMkI2bubJcnpQyoDrUwREsdlZoX2im0ofv6VG5+MpP/EJul UappxhvNnKEqTHRY768bY9YkcFMb0BgEGoaLlBkqCOIhdN8F58/N7lzRnbWYw0+fXofRw7 PpO9/FFYb4Z4IDx1Ct7F1M3FZUiPU4WCB2PxM9xfvxlf1gRDVVZwZdfx2ydd3oFgz8qXa0 Qnuhiy59MN+RmLEB1fRgAwJqlBzHMwL+F3qCWVMW/x7UfQEGiwn6iMDbcxKXGHsWKaCiMh /IvazosG6Mr2Rgr0T43XILSOqTtGQn/lxCodAs12Y5AMgN/UIluTgOURBaPVQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBVWM5S0tz1CqP; Fri, 12 Jan 2024 18:32: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 40CIWFPG064948; Fri, 12 Jan 2024 18:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CIWFNF064945; Fri, 12 Jan 2024 18:32:15 GMT (envelope-from git) Date: Fri, 12 Jan 2024 18:32:15 GMT Message-Id: <202401121832.40CIWFNF064945@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: 7385a7f67c1f - main - system(3): fix typo santized -> sanitized List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7385a7f67c1f26f4a6948be9155efeee76cf321e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7385a7f67c1f26f4a6948be9155efeee76cf321e commit 7385a7f67c1f26f4a6948be9155efeee76cf321e Author: Steve Kargl AuthorDate: 2024-01-12 18:26:40 +0000 Commit: Warner Losh CommitDate: 2024-01-12 18:29:22 +0000 system(3): fix typo santized -> sanitized PR: 276262 Reviewed by: imp --- lib/libc/stdlib/system.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3 index 31682819dc6e..119432342f70 100644 --- a/lib/libc/stdlib/system.3 +++ b/lib/libc/stdlib/system.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 25, 2015 +.Dd January 11, 2024 .Dt SYSTEM 3 .Os .Sh NAME @@ -103,6 +103,6 @@ user to run arbitrary command, because all meta-characters supported by .Xr sh 1 would be honored. -User supplied parameters should always be carefully santized +User supplied parameters should always be carefully sanitized before they appear in .Fa string . From nobody Fri Jan 12 19:15: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 4TBWT26zsrz569J5; Fri, 12 Jan 2024 19:15: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 4TBWT26W3Cz48l9; Fri, 12 Jan 2024 19:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705086918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGowZXKav1StezXvF73g+K5Ze0q7KYTqO62KrMLwxic=; b=eOJxRay/CJfxuzM/TkCIBT+tHNl68m7gkOSUbGDtQtWDpQnqYj6TeWeqp4mEHDFHbYPlk3 zK0A6bCu04w14jTOp0n4L6II8v60d5ge3oRgt+7M8mb0RcTldzjOY3j+5FO2xpsm/beB+3 S/otHXQrKTLR3qN2wCmUfeYBphE7FJONsPC4LQ1omtsRXPP3qBx9rUtfL0nb0jfi/vzbQs AsX6NnHawMjxMgVgTUEsxzfaSlfPxvZwIU6wiZ4NSl3NUMxuYrJlzdqjx5ghrVbnLHjhES grYChyLZXdeAOkNz/O1+hd49sKi+HmLb059+mnVqyXJi5/mjXx6qxCRWt025OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705086918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGowZXKav1StezXvF73g+K5Ze0q7KYTqO62KrMLwxic=; b=oQeiPzLBcfgsi92XXX8eFKKlRsfdEo4ErJA87pCKgY7JkQdrtvBqCyCJzG3OtRMdUL6WOe oh8Z4KM8RNCXrvpFYyFtai9xris06ZdUFbwC9OkkPm1E2vBQbg1aT5XEQz6Go+/WxmblMu LaBpsK1vGQbFNjVH165z5QmNI7IKNUQtWpZigx0Zf76AbA1sHn+GKl+l2KiABSf769a6JN +G1OPhnrMZBpIz8Gfve90s/CZ51bMQibFa9JoKOJyHY4sjAFtXBFz7Zjk6or9yKCQzBp2f tfC7k2sIFD8vgAUAApuJawYldGBXL3JsDa4glWcFKODa8U6Ktwt4DiSFXXNkOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705086918; a=rsa-sha256; cv=none; b=hClvqJNp0topbv44tcVEkGO2RV++5OVHiXJWP/50ql3gKxrTVADgkW1C+cRPMdZZgieHv1 1gBwTpBtlMXxlm43ipLB2HflR2kV5AA2VbhXbm7ATjF606ahyQdCoIrRTDANvS81Jg7WXD rVx5B6TxNIVL0vx7uzlXJwgRYt/io9W5r0WnMgwWBTSD46lDpJYWTyblthiJDyIg7NYqtF 9C0W0tHcnP1UgmjTDRw63XqxAmIJIC6DUidAQRZ6p1Iu2Ju/C/6mher0sQshgrZwM2K2pe ngQAiUud74Nl8g2UyAtWBtFSrnNuQ7pjM6xZJvFm3+X3ElSDXjnropZ4enP3vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBWT25ZKZz1Dg8; Fri, 12 Jan 2024 19:15: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 40CJFITh035699; Fri, 12 Jan 2024 19:15:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CJFIWP035696; Fri, 12 Jan 2024 19:15:18 GMT (envelope-from git) Date: Fri, 12 Jan 2024 19:15:18 GMT Message-Id: <202401121915.40CJFIWP035696@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: 178679daa9c4 - main - MAINTAINERS, etc: Remove hselasky entries List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 178679daa9c43cfffa7131dfcde8f4d3402805ae Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=178679daa9c43cfffa7131dfcde8f4d3402805ae commit 178679daa9c43cfffa7131dfcde8f4d3402805ae Author: Warner Losh AuthorDate: 2024-01-12 19:02:28 +0000 Commit: Warner Losh CommitDate: 2024-01-12 19:02:28 +0000 MAINTAINERS, etc: Remove hselasky entries Sadly, Hans-Peter has passed away. Remove his entries out of respect for his many years of service to the project. --- .github/CODEOWNERS | 3 --- MAINTAINERS | 10 +++------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bd735363716e..6ac937a33a0a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -69,14 +69,11 @@ /sys/arm64/include @zxombie /sys/arm64/rockchip @evadot /sys/compat/linprocfs/ @dag-erling -/sys/compat/linuxkpi @hselasky /sys/netpfil/ipfilter @cschuber /sys/crypto/openssl/ @juikim /sys/dev/drm2 @bsdimp /sys/dev/iscsi/ @trasz /sys/dev/pci @bsdimp @bsdjhb -/sys/dev/sound/usb @hselasky -/sys/dev/usb @hselasky /sys/fs/autofs/ @trasz /sys/fs/fuse/ @asomers /sys/fs/procfs/ @dag-erling diff --git a/MAINTAINERS b/MAINTAINERS index 8d7100136d38..12a65757f54a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -97,19 +97,15 @@ share/mk/*.test.mk imp,bapt,bdrewery, Pre-commit review requested. stand/forth dteske Pre-commit review requested. stand/lua kevans Pre-commit review requested stand imp Pre-commit review strongly requested. -sys/compat/linuxkpi hselasky If in doubt, ask. - zeising, johalun pre-commit review requested via - #x11 phabricator group. - (to avoid drm graphics drivers - impact) +sys/compat/linuxkpi pre-commit review requested via + #x11 phabricator group. + (to avoid drm graphics drivers impact) sys/contrib/dev/ice erj Pre-commit phabricator review requested. sys/netpfil/ipfilter cy Pre-commit review requested. sys/dev/e1000 erj Pre-commit phabricator review requested. sys/dev/ixgbe erj Pre-commit phabricator review requested. sys/dev/ixl erj Pre-commit phabricator review requested. sys/dev/ice erj Pre-commit phabricator review requested. -sys/dev/sound/usb hselasky If in doubt, ask. -sys/dev/usb hselasky If in doubt, ask. sys/dev/xen royger Pre-commit review recommended. sys/netinet/ip_carp.c glebius Pre-commit review recommended. sys/netpfil/pf kp,glebius Pre-commit review recommended. From nobody Fri Jan 12 19:15:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBWT40SY2z569Ks; Fri, 12 Jan 2024 19:15:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBWT401lvz48tv; Fri, 12 Jan 2024 19:15:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705086920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C+avNjoZlA2OrJSpewynVTiBEg4WqI0Uuqmw/akHnKw=; b=F+ylXB/tgTvvV6dd+blxwEInVPtjcR2Dj2wtkDoEmUQfvaY12sMYH8DwIld5epwc0JqMZs /6ceesDct6DAVbNZaRrdesHXCEsXM8AZ+mwa6BV9rxt7+GYvRWtRVdNc++PpSg15Fn0NQd xoL2N34vnApn8VSEg+Gxhl9Y7Hgp6EyMsqeCDayi3w87cQoCtsFPtQgrInXWBNx53mYSA2 /lyKvQxmzgerWwd3jfhvoGO2B0ONmY0kMrdPbEGW/5sCpzaYfUbJDWRCy2z6DV9al5NdDb fkl9g3Eqm+q2aFAHv2Dus86bw+mX3UZwjAusLcCcX5RmuFgcsw6wQ57pdOUJnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705086920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C+avNjoZlA2OrJSpewynVTiBEg4WqI0Uuqmw/akHnKw=; b=ZsieEA3MyU1RoEORnDjzZofk24+XBr7j0MJG96UF/t3W+7SdwCtjsxacEDh8i9FzXsS03U xNHi2dg9TJAEfaftvIYHaO8h3Zd9ncy1Mk5PMC09PBVCRiOlQFgiEUdcYjxyyIyLY8vQK3 20+dUENwGESSJrZgbSdUP1QWKVVD/F2ESzDyDORpswj5/Y6nusSxDe3N6h4qf8z2LVOz2y E/Ot+6PQYZmHnCycuV4O2uft6oW0LyIi6m7XlmIsOI4eKPhYwWHXwH2vkgGtg7MbJfvvtE 5Ab5xIgI3kto+hJ6LXIWfpTPs1JjT+6aMC0C29aPHMMCz7h6vGbNZ5d89fjpUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705086920; a=rsa-sha256; cv=none; b=jDIgSTQYPUWfr3KtTr8gXKTV29x6ikMRF/xCURWm5kZoDUP0IwgxDwhVwDJOGCTcLgmss5 bdiOhG7pdViaZ2NTdoS4C4LB1x72t4BP8TQVSFlHkM+HOLwxCd7dCT5X2/eBJnug+eM9kp W5iPAESzDmQnoohzYaFfAas1azhorUR5paRERM0yR+7uAix8EVzdjE+RWri7zVTjx+cSgk dKho4x0OBLunNzisi++tyXqEFCt3r5uw05s9a/uN4VzejTOo3oMLeVGixUt36yVA0ZReyn KjO8RN0hE6jCi77a6CQf0+SsCEa4Adzl7IXRafoyLyXy4vw7Qbx7kt3nOaPaGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBWT36BS2z1DPR; Fri, 12 Jan 2024 19:15:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CJFJId035754; Fri, 12 Jan 2024 19:15:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CJFJbZ035751; Fri, 12 Jan 2024 19:15:19 GMT (envelope-from git) Date: Fri, 12 Jan 2024 19:15:19 GMT Message-Id: <202401121915.40CJFJbZ035751@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: 46ebf11f5a32 - main - MAINTAINERS: Add myself for nvme entries, remove jimharris List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46ebf11f5a328bc7c57ecc7c0d7eea64113d3441 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=46ebf11f5a328bc7c57ecc7c0d7eea64113d3441 commit 46ebf11f5a328bc7c57ecc7c0d7eea64113d3441 Author: Warner Losh AuthorDate: 2024-01-12 19:07:28 +0000 Commit: Warner Losh CommitDate: 2024-01-12 19:12:15 +0000 MAINTAINERS: Add myself for nvme entries, remove jimharris Jim Harris no longer has a commit bit and has moved on from being the FreeBSD nvme driver maintainer at Intel. I've been reviewing things so I'll take that up. Sponsored by: Netflix --- .github/CODEOWNERS | 3 +++ MAINTAINERS | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6ac937a33a0a..3abef8d6b88e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -57,6 +57,7 @@ /lib/libpam/ @dag-erling /lib/libvmmapi @bsdjhb @grehan-freebsd /libexec/rc/rc.d/rctl/ @trasz +/sbin/nvmecontrol @bsdimp /sbin/mount_fusefs @asomers /secure/usr.bin/openssl/ @juikim /share/mk @bsdimp @bapt @bdrewery @emaste @@ -73,6 +74,8 @@ /sys/crypto/openssl/ @juikim /sys/dev/drm2 @bsdimp /sys/dev/iscsi/ @trasz +/sys/dev/nvd @bsdimp +/sys/dev/nvme @bsdimp /sys/dev/pci @bsdimp @bsdjhb /sys/fs/autofs/ @trasz /sys/fs/fuse/ @asomers diff --git a/MAINTAINERS b/MAINTAINERS index 12a65757f54a..54486867eed6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -56,7 +56,6 @@ 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. geli pjd Pre-commit review requested (both sys/geom/eli/ and sbin/geom/class/eli/). -isci(4) jimharris Pre-commit review requested. 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 kqueue jmg Pre-commit review requested. Documentation Required. @@ -71,9 +70,9 @@ lpr gad Pre-commit review requested, particularly for nanobsd imp Pre-commit phabricator review requested. net80211 adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org nfs freebsd-fs@FreeBSD.org, rmacklem is best for reviews. -nvd(4) jimharris Pre-commit review requested. -nvme(4) jimharris Pre-commit review requested. -nvmecontrol(8) jimharris Pre-commit review requested. +nvd(4) imp Pre-commit review requested. +nvme(4) imp Pre-commit review requested. +nvmecontrol(8) imp Pre-commit review requested. opencrypto jmg Pre-commit review requested. Documentation Required. openssh des Pre-commit review requested, email only. openssl benl Pre-commit review requested. @@ -128,8 +127,6 @@ autofs(5) 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. -sys/dev/drm* imp Pre-commit review requested in phabricator. Changes need to - be mirrored in github repo. sys/dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org sys/arm/allwinner manu Pre-commit review requested sys/arm64/rockchip manu Pre-commit review requested From nobody Fri Jan 12 19:58: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 4TBXR75wnYz56Dgp; Fri, 12 Jan 2024 19:58: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 4TBXR75TLrz4FNt; Fri, 12 Jan 2024 19:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705089523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVjN8xNGiCKAnh2UgZe6OoTi9fPS7bpBbQhL+LuF9Yc=; b=H4g0rNJUSdkl15MqtIz7IeSC466Y37FNX2iKbvsDt3Md/0BNjsVOwX5QBDcyTfrD717ZBc 7HCHif6wRfVVDB/wvWvYT7y/oGNLuRV4JByw/fTyFSsi2JODhIML8UyZpmO4A/u+yKu8mV f2muxfid5i4rz9dFk4z8HAMjDTT9yo57Lm3XcdkJCCSpF3VcF5lhn9n/aE12ozYE/Jp1qo XFFiruhbgEJR7XW+S1ZH6VvFsqChQJAhWELIdxxzYqK32PHOKvHoFWYlvsw7/6DsqGQhE2 VqABPUquCG/Al9c5UxK4+xE7Wi+KHG+YH+bkCcvbVxTggOzWvH8+9BVEm4R+Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705089523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVjN8xNGiCKAnh2UgZe6OoTi9fPS7bpBbQhL+LuF9Yc=; b=c0CspQ1q85+h+CFgCGHsOOY+R6qZKgKtCGuDKSaS2zVbQ3+Z/FLLHmlVbcyi6JcrXE5A0U +/fbK1lfLMQ0GyQoHjUWzWXqR7dF2g5l7ygUmKw0ufM3fHJz+Dg3udgIMSuX6xjfgPtdlt IvthXIEiWtx5Dg/3dA/mkEmBO24xOgKPpLuat6sYYz2O5LNpbZ6r1Du/Nd7G3QXn1JEOi2 elnjp543k0WhPsQ6fFwq+63EVwEdbIQS9EJI22XuVCJQKzy1sj/mVUnKxSDvG77MXlRQK+ WM7xkRYJO3ahTsAZvcrGv4C4Omdy4HRHu/4TnVgw+5p0wgMJJd4iDsUppSQ3og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705089523; a=rsa-sha256; cv=none; b=qcYrnObrC+Q2frqrx23aZ68+wR0tVLLYpqa86aOEIAWUdaEwmo9TOip854/Rjam1sOG6t5 IuXrThcP3xhAs+L3aDahkLBQGWbte34r6bq+Cs5eBxpSPu4JMRKzvlYxclxbW0tJ1JYnbk 1LHJ6o2ZHcxO3PBrjmvByct2ayPEEbLkLfYHD7GSu8rM7r2isZDRlsnP7ySS4X4Skx88G9 2cC7bMJHZOU0ZPpOCILB3CqWmhfoFXXTDqKVY5qJRqhbNk3XToy9FGYhSbzHD9QRsPFlEF nZA5WdJ93CZGIKd2ggsRYXofE+GCCwIhapGooMPPtO6QzQV+hvrPlaSCC7LwrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBXR74Y58z1FRH; Fri, 12 Jan 2024 19:58: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 40CJwh6u002245; Fri, 12 Jan 2024 19:58:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CJwhlV002242; Fri, 12 Jan 2024 19:58:43 GMT (envelope-from git) Date: Fri, 12 Jan 2024 19:58:43 GMT Message-Id: <202401121958.40CJwhlV002242@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: 5df041c4bbf7 - main - bhyveload(8): document some SECURITY CONSIDERATIONS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5df041c4bbf70d549b055f332630925295ad5aaf Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5df041c4bbf70d549b055f332630925295ad5aaf commit 5df041c4bbf70d549b055f332630925295ad5aaf Author: Kyle Evans AuthorDate: 2024-01-12 19:57:53 +0000 Commit: Kyle Evans CommitDate: 2024-01-12 19:58:16 +0000 bhyveload(8): document some SECURITY CONSIDERATIONS The situation is improved now that we're running in a sandbox, but there is still some host machine access that could be concerning depending on the context. These concerns may be somewhat mitigated by the fact that the host machine usually provides the loader binary, even when the guest image is providing the loader scripts -- they only bring the lua scripts, and they have to be able to execute arbitrary syscalls rather than the interfaces provided by libsa(3). Reviewed by: jhb, markj Differential Revision: https://reviews.freebsd.org/D43299 --- usr.sbin/bhyveload/bhyveload.8 | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyveload/bhyveload.8 b/usr.sbin/bhyveload/bhyveload.8 index edeb8ee938f4..54e326e49c8c 100644 --- a/usr.sbin/bhyveload/bhyveload.8 +++ b/usr.sbin/bhyveload/bhyveload.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 24, 2016 +.Dd January 12, 2024 .Dt BHYVELOAD 8 .Os .Sh NAME @@ -171,3 +171,43 @@ at NetApp Inc with a lot of help from can only load .Fx as a guest. +.Sh SECURITY CONSIDERATIONS +Note that in some configurations, +.Nm +will execute guest loader scripts in the context of the host machine. +Note, however, that +.Nm +will enter a +.Xr capsicum 4 +sandbox before it loads the +.Ar os-loader +or executes any loader scripts. +On the host filesystem, the sandbox will only have access to the path specified +by the +.Fl h +flag, the contents of the +.Pa /boot +directory if +.Fl l +was not specified, and the chosen console device. +.Pp +Note that the guest loader scripts are already subject to some limitations that +are not relaxed simply because we are running in userland. +For instance, any I/O on the loader's +.Dq host +device that can be done in loader scripts is limited to the interface that +.Nm +provides, which itself will restrict paths that can be touched to those within +a specified +.Fl h +directory, if any. +Access to files within +.Pa /boot +inside the sandbox would require arbitrary code execution in userboot, and +userboot is usually provided by the host machine rather than anything that is +a part of the guest image. +All access to the +.Fl h +directory as well as +.Pa /boot +is strictly read-only in the sandbox. From nobody Fri Jan 12 21:12:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZ3q4JZbz56Mtm; Fri, 12 Jan 2024 21:12:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBZ3q21FGz4WQj; Fri, 12 Jan 2024 21:12:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fg46qU8p+4kGDY5h8eOjROVHNfSaGZH8f2o/KSreSb0=; b=ybpwXf3+cnWyJRdj5syfW7mq/l6nHVsaDAmqSr6FdkyswTFfDM7np4K3lUWOo5nciWSTQt oyXrcHaFOg2+DlOS2EXjkLAZqUjKyF7bi6tlic3HtRxosWvH0DW1xFjbPd/jydKyRLRjKk fV9c7H14t+KsFT4ooY4QIRFn3jGW5qrB2VnGySc7xkC4ahWMFKJmwy7grCgqOcHn4ByOzw tsw2ssKtIC1Y8w6yzkrm2FR2U5tSLvfaPqcbO8tuUqPVQQQTZxQ6ZMbha4y8X7/1VfoF+E JfdwRy0yUGoJ+5FHPYzoHfaITrYQaRlzKShoEmFG8ZJe0Yvd5C741StGYDfV9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fg46qU8p+4kGDY5h8eOjROVHNfSaGZH8f2o/KSreSb0=; b=myrWmQE3DTmVWcmz1arVnCESXdVdXgMvxlGmh3RL1T7ztCi0KPIkLHs5k4n3GaOpTJsNhn g8EgV/HffB6smWp6J8395SLgXU82FMmFZdvNQA1ALm5AcsMqAiQDYfxxMdjGy3ovV4fHMM 0JySBh09baXG9KEiXjl4oMZQfXCniWCz5kd/hfCvkTpNkZWnXNtdsaosLMRUwdOshfyhkH mAbo8BQChMc7tGXpa81Yfh5czgO4Of6WZkE549el5Jyq2I0My1DovyYCljEJjz7x9+WDig EUb8Y1GKalpj8rZbe5St2xQs9MokSU7Re0Z0b+QGDCpDlzXOspBXIaYtLFaoYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705093927; a=rsa-sha256; cv=none; b=dj+GZtIKss3TEny3Ok+TFLgBlQ9jgMSfGvu1QCsNKR70DVGz1vkUj51Gtg0LAcO4oyrP5y qBOxAG+atI9y1Ux6ENNvZtCHutOcvq+IYm2ZeD5Hf7lyeJgrEy+MJ/eFkgtoqbpwNdE6cI GIrPLBk8p0Wf2igOX9dqwbQxtL7FfGQJfxVmn6hVWGx9IoxAhGCDjq25y83ne03pjUbNMC qsrmgHfYVSioz26oc3RWGFKTqb6/YauPtC4L7hDQLdUemzI/zd98YQ4CgUT80uPMPSiZTW 9kv+4wDF8Ean/C78FDl5Uc1pWKCI4UC5wRscNeHPhMtAjZOzjZn9pZksyjrWng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBZ3q14zNz1HHg; Fri, 12 Jan 2024 21:12:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CLC76r039273; Fri, 12 Jan 2024 21:12:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CLC7nM039270; Fri, 12 Jan 2024 21:12:07 GMT (envelope-from git) Date: Fri, 12 Jan 2024 21:12:07 GMT Message-Id: <202401122112.40CLC7nM039270@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: d07acc58d898 - main - systm: Relax __result_use_check annotations List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d07acc58d8987e8e1205f4a82b77e847ea2d60d3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d07acc58d8987e8e1205f4a82b77e847ea2d60d3 commit d07acc58d8987e8e1205f4a82b77e847ea2d60d3 Author: Mark Johnston AuthorDate: 2024-01-12 15:07:28 +0000 Commit: Mark Johnston CommitDate: 2024-01-12 20:56:00 +0000 systm: Relax __result_use_check annotations When compiling with gcc, functions annotated this way can not have their return values cast away, e.g., with `(void)copyout(...)`. clang permits it but gcc does not. Since we have a number of such casts for calls which copy data out of the kernel, and since failing to check for errors when copying *in* is a much more severe bug, remove some of the annotations in order to make the gcc build happy. Reviewed by: kib Reported by: Jenkins Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions with __result_use_check") Differential Revision: https://reviews.freebsd.org/D43418 --- sys/sys/systm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 2da177af91f0..508690cd639e 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -289,9 +289,9 @@ int __result_use_check copyin(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); int __result_use_check copyin_nofault(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); -int __result_use_check copyout(const void * _Nonnull __restrict kaddr, +int copyout(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); -int __result_use_check copyout_nofault(const void * _Nonnull __restrict kaddr, +int copyout_nofault(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); #ifdef SAN_NEEDS_INTERCEPTORS @@ -313,11 +313,11 @@ int64_t fuword64(volatile const void *base); int __result_use_check fueword(volatile const void *base, long *val); int __result_use_check fueword32(volatile const void *base, int32_t *val); int __result_use_check fueword64(volatile const void *base, int64_t *val); -int __result_use_check subyte(volatile void *base, int byte); -int __result_use_check suword(volatile void *base, long word); -int __result_use_check suword16(volatile void *base, int word); -int __result_use_check suword32(volatile void *base, int32_t word); -int __result_use_check suword64(volatile void *base, int64_t word); +int subyte(volatile void *base, int byte); +int suword(volatile void *base, long word); +int suword16(volatile void *base, int word); +int suword32(volatile void *base, int32_t word); +int suword64(volatile void *base, int64_t word); uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval); u_long casuword(volatile u_long *p, u_long oldval, u_long newval); int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp, From nobody Fri Jan 12 21:12: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 4TBZ3p1dxmz56Mtl; Fri, 12 Jan 2024 21:12: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 4TBZ3p17j9z4WQg; Fri, 12 Jan 2024 21:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHUwqI13Hp2qaLTUFu4y4CQA5NOo8gaXFtaHXuGJiDg=; b=hmVnLfM8eG4P+0zcVhyDAff9R6aEd/Jk/5Ebjn7N2wRgE4ZI6Gu4Sn2Tv9ySuaaA0Uzore 95pnGnlB10DlaPKVo0hXLFVqnEjLGb/kLorRcnFJ/4jzfut+k/MQVhbdG3IWW4UHxupI85 4xI8hSE03aEEBVLl9UfpoP0H2j8xvMLrr4C0pF1sYLF8C3DeaaP3F7VRxJDWJ2KcFXGcE7 KJmNmQf9M0jHh3J/fWx71Ye3THQzZGS+WGHFw41IOAcxQn0WXzLsYG6bPddA3XBQY7APDg 81wKyF7j7awAFWNv9sMHjG0MussWwAyorSnY9Q4KHQfYa+Tqk6npLNrRNQGhAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHUwqI13Hp2qaLTUFu4y4CQA5NOo8gaXFtaHXuGJiDg=; b=inrOuC37Nn3gK0CEOLERoqgPgJf1aCELjg16Ui1uR5ZJZLwl4L8X+8A6tz+dYgwrRJO+2e v5Q2WqKcJdrmq+76Vgirmc4OieOBnwwPvoZQcv/uL5rpMWl0lR8rWtCwKpdYvcwlu+WD+w mAR4fAuit/y2BfHEsFIz9M/40W1/NGM/JzBN4MJQs1RG/Lg52Ax5V0KOfjaIyQU8S0q7SL 68d6S1NdzxErWtlSX6CSTHzWl9MVa8cVSikt5c/RadX+8cvYh30COgXLaRD37eBR8aLby4 78Hb5k++kR40Lnjb/aVJBrCe8pF93JYGnbNGmx+UbkcRTYR0fniCnY8d3hcW6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705093926; a=rsa-sha256; cv=none; b=ySeD4Y+axxu5oe3O/+lh9DU/UaGm7kX1uFkw5cBvN2x0YHzbXNSd6skoql+p5jLIaKmjgk Z8FG543Ri7gIT0uasN4u5tj2y77+eRIOzMQd3f2/5L7dWJEkqwuImU3eL7TUWXCzRGOYEx WM1WOXNUK036i15E88R8Mk03WLrrdyymFa2FK2AZQDUUp3CD2hBvK/fLaLhNFHBpJgMXNb BqJ3bSHXu0nLrSlEGJ8kKQ7lU5TIcs/hZcYvMlOeZoJnXnuPBRFYx31EBhN0bDpp1fuMjS BDqu2tzQ05PnartHyBJi5+7eUdbYq7gnULwZxPQu7qqyCteyQrx+o3bGnIxqdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBZ3p07V2z1HHd; Fri, 12 Jan 2024 21:12: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 40CLC5Z2039219; Fri, 12 Jan 2024 21:12:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CLC5HB039216; Fri, 12 Jan 2024 21:12:05 GMT (envelope-from git) Date: Fri, 12 Jan 2024 21:12:05 GMT Message-Id: <202401122112.40CLC5HB039216@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: 848a8bf3f40d - main - fb: Check for errors from copyin() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 848a8bf3f40d91bda0ae3ab67f22ed693f25f9c4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=848a8bf3f40d91bda0ae3ab67f22ed693f25f9c4 commit 848a8bf3f40d91bda0ae3ab67f22ed693f25f9c4 Author: Mark Johnston AuthorDate: 2024-01-12 15:09:22 +0000 Commit: Mark Johnston CommitDate: 2024-01-12 20:56:00 +0000 fb: Check for errors from copyin() When compiling with gcc, a function annotated with __result_use_check cannot have its return value ignored with a void cast. So, try to handle it. MFC after: 1 week --- sys/dev/fb/vesa.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c index e1cca3a70725..dcd3d34076bf 100644 --- a/sys/dev/fb/vesa.c +++ b/sys/dev/fb/vesa.c @@ -1732,11 +1732,15 @@ set_palette(video_adapter_t *adp, int base, int count, r = malloc(count * 3, M_DEVBUF, M_WAITOK | M_ZERO); g = r + count; b = g + count; - (void)copyin(red, r, count); - (void)copyin(green, g, count); - (void)copyin(blue, b, count); + if (copyin(red, r, count) != 0 || + copyin(green, g, count) != 0 || + copyin(blue, b, count) != 0) { + error = 1; + goto out; + } error = vesa_bios_load_palette2(base, count, r, g, b, bits); +out: free(r, M_DEVBUF); return (error); From nobody Fri Jan 12 21:12:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZ3r4X3vz56Mtn; Fri, 12 Jan 2024 21:12:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBZ3r309hz4WW0; Fri, 12 Jan 2024 21:12:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvmOfquxuus3Yf8MSZZ4XeSzIUdhwN/njRk+JHO4Qp0=; b=Qumt/FWpbfFmZWAM/X+oro1vLz6/4hJudCHsjQo0K3V+eQ5k2+dm3OPHZbaNAENtPw1j+j TdMjw03gtwk2qWo4lWRTlebNToNctYeO9PrWUentFJFKuvWhP1cmQCe0YU4NSrQPGf5FXh gV51h1k5kUfaMIXbREnBONPyiAPwUMYg365bM5h24GQbzJ7OPAi8IC5YB6WwoVdKQer6fV z35htDsLaJA6MTWnz43A9rGxNz02ViAULDodgGCxcnIlAv2dtnYKT+8vgRkVlig21zDAux gfde2rqNNDoDOUlshfIKlwzm2R40Qmi8LnLjk9BB+c1jAyPuzDW4CzyQrQj/Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvmOfquxuus3Yf8MSZZ4XeSzIUdhwN/njRk+JHO4Qp0=; b=bpSBDAsLGma9gFRsG4HZxQyoMCPM7P+XFnZZR073Xwi/zHbkkm3puXQC2oIKHv1EL/SZWM g8hb0YIWR1OXfdJal6OCoJH6tSnUuigwEzozegMMEYYrI6Im1ZDrmkjBUZC3ma0RKuy2qs NjHYetD2Uzk0g/dEkOVyEKTmhujvCJixkLF/tfN/rTMYmCNrIHwWBPO0SWSUNBx7IyxK8P J0K0aTzttDQ8K+N2tuutCmEHgmdbuvvng7+2J3ZlGXm7sHASuPe9Rk+D8XSKsH97jkT3B1 9DJX53KyK69zye3pxh3CmVK18uaEsPC4K7H6Y9AJICsWDn68uU49oD81XMKGLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705093928; a=rsa-sha256; cv=none; b=JiLgcjU6lMN6KJnSst3B5tyzZdpQy4Rw7xRL+ux6TUAxkXjg0J4XYZ2IVbj9/q0fEvMs0s e6lA64j176oqndUUsaIEwwkYkutnxpu38CSFF+DHV51NXUzYuFDe2fZalgYkvb1W7xyArP pzomSyedXB4rwqTTRJZ+yP0kgjzgHEQ5RDiUTXjACE4pRXwrjdcOe2GSBa21V6ccR7rO8y CHtWVUid2NvzBWoSxNeTCY6VF9QrG+i1BHOfnx6SqD6wtWnLIhh01BZ2wwyq+jY47+Rfd4 SnTFBfFqhPPtAhc642maLJ4wtJcN8EYmz0GKDEH9/PL/VolOVhENZwDNPJ7+/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBZ3r25tqz1Hbb; Fri, 12 Jan 2024 21:12:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CLC8p0039324; Fri, 12 Jan 2024 21:12:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CLC8Tt039321; Fri, 12 Jan 2024 21:12:08 GMT (envelope-from git) Date: Fri, 12 Jan 2024 21:12:08 GMT Message-Id: <202401122112.40CLC8Tt039321@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: 8e1a7e29b6cc - main - sanitizers: Avoid building genassym.c and genoffset.c with sanitizers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e1a7e29b6cc276a2763e61b5f61afebd4570bba Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8e1a7e29b6cc276a2763e61b5f61afebd4570bba commit 8e1a7e29b6cc276a2763e61b5f61afebd4570bba Author: Mark Johnston AuthorDate: 2023-10-10 18:14:46 +0000 Commit: Mark Johnston CommitDate: 2024-01-12 21:09:14 +0000 sanitizers: Avoid building genassym.c and genoffset.c with sanitizers Some, particularly KASAN, may insert redzones around global symbols, resulting in incorrect offset definitions because genassym.sh (ab)uses symbol sizes to assign semantic meaning. (Ideally I would be able to define this pattern in one place, but I haven't found a way to define a GENSYM_CFLAGS that actually works for all of the consumers (kern.post.mk, kmod.mk, sys/conf/files*).) MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/conf/files.amd64 | 2 +- sys/conf/kern.post.mk | 10 ++++++---- sys/conf/kmod.mk | 4 ++-- sys/modules/linux/Makefile | 3 ++- sys/modules/linux64/Makefile | 3 ++- sys/modules/vmm/Makefile | 6 ++++-- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index de509e362b6d..5eae8a0de3c2 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -25,7 +25,7 @@ elf-vdso32.so.o optional compat_freebsd32 \ # ia32_genassym.o standard \ dependency "$S/compat/ia32/ia32_genassym.c offset.inc" \ - compile-with "${CC} ${CFLAGS:N-flto*:N-fno-common} -fcommon -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} -fcommon -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "ia32_genassym.o" # diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 34877a01b7dd..5760ebd987f1 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -245,20 +245,22 @@ offset.inc: $S/kern/genoffset.sh genoffset.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: $S/kern/genoffset.c - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon $S/kern/genoffset.c + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon $S/kern/genoffset.c # genoffset_test.o is not actually used for anything - the point of compiling it # is to exercise the CTASSERT that checks that the offsets in the offset.inc # _lite struct(s) match those in the original(s). genoffset_test.o: $S/kern/genoffset.c offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon -DOFFSET_TEST \ - $S/kern/genoffset.c -o ${.TARGET} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon -DOFFSET_TEST $S/kern/genoffset.c -o ${.TARGET} assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: $S/$M/$M/genassym.c offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon $S/$M/$M/genassym.c + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon $S/$M/$M/genassym.c OBJS_DEPEND_GUESS+= opt_global.h genoffset.o genassym.o vers.o: opt_global.h diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 3dc83ce4c423..5cc0ff70c3e2 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -524,13 +524,13 @@ assym.inc: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc genassym.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon \ + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} -fcommon \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: ${SYSDIR}/kern/genoffset.c genoffset.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon \ + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} -fcommon \ ${SYSDIR}/kern/genoffset.c CLEANDEPENDFILES+= ${_ILINKS} diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 88b3b8f5e123..8c720f8f9e65 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -135,7 +135,8 @@ linux${SFX}_support.o: linux${SFX}_support.S linux${SFX}_assym.h assym.inc .endif linux${SFX}_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon ${.IMPSRC} .if !defined(KERNBUILDDIR) .warning Building Linuxulator outside of a kernel does not make sense diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index 9ac1944ad1a9..62e3b464d39f 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -101,7 +101,8 @@ linux_support.o: linux_support.S assym.inc linux_assym.h ${.ALLSRC:M*.S:u} -o ${.TARGET} linux_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon ${.IMPSRC} .if !defined(KERNBUILDDIR) .warning Building Linuxulator outside of a kernel does not make sense diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index 46909dad6c71..a950c5a82d13 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -82,9 +82,11 @@ svm_support.o: ${.IMPSRC} -o ${.TARGET} vmx_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon ${.IMPSRC} svm_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon ${.IMPSRC} .include From nobody Fri Jan 12 21:19:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZD175MDz56Ncp; Fri, 12 Jan 2024 21:19:13 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBZD10zPsz4XPP; Fri, 12 Jan 2024 21:19:13 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5989e464910so1712286eaf.0; Fri, 12 Jan 2024 13:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705094351; x=1705699151; darn=freebsd.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VV6ZZW7lmIrkjMUcIRDSnrkffEAZJ6sU622Wr2Qxpk0=; b=Tlxm9B2qgPyYd/V2qpjJOQhQTxRT9aYS8b+BZi0VXVnKhhtgfsjF25FGqvNfbY+TMW hgItPjEmnWRRdio0pI41bOX9NroQh5v9zK88EvZdW8VJpEr4wWI0CamnacYH23ORL4uX Nrwe32am7O5Xa9ivM/Qhd3MfMELR7E/l4o95XP0fsr/kGr6kp50K/wegoJ8ixOlt3Ds0 FdS5JyL2YI6Hx04zMQVi4F/G27T7H0SXu5XUfPqDKzfwi3MIBgqHEfwCoKT/NVes5cdx u/jCiqzyZkIxzl8l6/xRJSVp5b6C5oWy4EnTQ0BW80KbUDRg6SMZm8TEuUCNlitbWGhL CV/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705094351; x=1705699151; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VV6ZZW7lmIrkjMUcIRDSnrkffEAZJ6sU622Wr2Qxpk0=; b=szAoNnmv3Sf3NOS8ZwZ3iYWHHTZ8S4ord8tBbt6XEBbNP1Mokt+AnQuO0wcIucJ0Zf 2OVfU29cdalikbp24RGWcSqtKmuILU8ll/3TJKBYaua+KcMjCmCYkX1jPwl5WIBO7OBe IC0GpNWesjGdzc6mUZQYcFmPDXBj2sLcb7/EMmcoW6LvqAoqM24C0TTVdJdi9bZk+jOC vOr7RIBjlzME15P5N1KZD4F3ENcsNTGrS2Op5Kf2l2Wgop6ZkKb0spYflQB6GtyELmPO +ebWrrRDgF99PxL88Q3wyhzX6pt4yRCEMNJXRmpd8hkb+mAFa2bcJ2pMk6k6yd+ktBRi 5H/Q== X-Gm-Message-State: AOJu0Yw96Xcib8MjAYWAuNM+yG0AX4oLJjakuNmVxuCld6jigqPBEN0G XEyLGzExUDWKclJrmz4uV1R5ufhR2gA7jlucqGEMZnrx X-Google-Smtp-Source: AGHT+IHIMJY8+6vgOdRqqUtEjefySae6IXRjN9PjY5wBrZpZTMU65TKcHhIPTK6nn8aqd1svgDXAQrXcWkd2zNj2Mac= X-Received: by 2002:a4a:241e:0:b0:598:b695:688a with SMTP id m30-20020a4a241e000000b00598b695688amr1161768oof.8.1705094351589; Fri, 12 Jan 2024 13:19:11 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Received: by 2002:a8a:dd3:0:b0:512:723e:b179 with HTTP; Fri, 12 Jan 2024 13:19:11 -0800 (PST) In-Reply-To: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> References: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> From: Mateusz Guzik Date: Fri, 12 Jan 2024 22:19:11 +0100 Message-ID: Subject: Re: git: d07acc58d898 - main - systm: Relax __result_use_check annotations 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" X-Rspamd-Queue-Id: 4TBZD10zPsz4XPP 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] just make it conditional on being compiled with clang On 1/12/24, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=d07acc58d8987e8e1205f4a82b77e847ea2d60d3 > > commit d07acc58d8987e8e1205f4a82b77e847ea2d60d3 > Author: Mark Johnston > AuthorDate: 2024-01-12 15:07:28 +0000 > Commit: Mark Johnston > CommitDate: 2024-01-12 20:56:00 +0000 > > systm: Relax __result_use_check annotations > > When compiling with gcc, functions annotated this way can not have > their > return values cast away, e.g., with `(void)copyout(...)`. clang > permits > it but gcc does not. Since we have a number of such casts for calls > which copy data out of the kernel, and since failing to check for > errors > when copying *in* is a much more severe bug, remove some of the > annotations in order to make the gcc build happy. > > Reviewed by: kib > Reported by: Jenkins > Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions > with __result_use_check") > Differential Revision: https://reviews.freebsd.org/D43418 > --- > sys/sys/systm.h | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/sys/sys/systm.h b/sys/sys/systm.h > index 2da177af91f0..508690cd639e 100644 > --- a/sys/sys/systm.h > +++ b/sys/sys/systm.h > @@ -289,9 +289,9 @@ int __result_use_check copyin(const void * __restrict > udaddr, > void * _Nonnull __restrict kaddr, size_t len); > int __result_use_check copyin_nofault(const void * __restrict udaddr, > void * _Nonnull __restrict kaddr, size_t len); > -int __result_use_check copyout(const void * _Nonnull __restrict kaddr, > +int copyout(const void * _Nonnull __restrict kaddr, > void * __restrict udaddr, size_t len); > -int __result_use_check copyout_nofault(const void * _Nonnull __restrict > kaddr, > +int copyout_nofault(const void * _Nonnull __restrict kaddr, > void * __restrict udaddr, size_t len); > > #ifdef SAN_NEEDS_INTERCEPTORS > @@ -313,11 +313,11 @@ int64_t fuword64(volatile const void *base); > int __result_use_check fueword(volatile const void *base, long *val); > int __result_use_check fueword32(volatile const void *base, int32_t *val); > int __result_use_check fueword64(volatile const void *base, int64_t *val); > -int __result_use_check subyte(volatile void *base, int byte); > -int __result_use_check suword(volatile void *base, long word); > -int __result_use_check suword16(volatile void *base, int word); > -int __result_use_check suword32(volatile void *base, int32_t word); > -int __result_use_check suword64(volatile void *base, int64_t word); > +int subyte(volatile void *base, int byte); > +int suword(volatile void *base, long word); > +int suword16(volatile void *base, int word); > +int suword32(volatile void *base, int32_t word); > +int suword64(volatile void *base, int64_t word); > uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t > newval); > u_long casuword(volatile u_long *p, u_long oldval, u_long newval); > int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t > *oldvalp, > -- Mateusz Guzik From nobody Fri Jan 12 21:25: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 4TBZMc0lvBz56PQ0; Fri, 12 Jan 2024 21:25:48 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBZMc0CcFz4YVB; Fri, 12 Jan 2024 21:25:48 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705094748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GrP/uJFh3CQ4pKjXHTPXHtxk7HQH+/fb8tex1mBalrQ=; b=kAfwl35+hlf4HRKhOXhpnHxTgxVmeKUNijIN/7lg0dSRL+8QHlHps/G4hA9BuaT7jMbTdX xECp9r+6p1rkpx1wblSM96jKalts07o/QQlRmufZauOo+Le5ukTjeaaYadY4dzg2djYySd xG94FcIC8sPhyt7axskyQ3qBuBZ24RuB3hEXzbXX3Azb3NhywQEYV2DBZlexSR78iG2cU7 6IsAQf2CFoU15uCRMH6KoOnA4zzXh7iG33+dvgD0qQIYniEkGsG5Jg6infWRtfFkF/NHdU +uqfl376luSdmS4340OFEpwbuBUKeJnxGRQsJ6tohP47MmLsPVkL7qgidnknAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705094748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GrP/uJFh3CQ4pKjXHTPXHtxk7HQH+/fb8tex1mBalrQ=; b=XgwymHRUIWy4ssgBQb0/sWsfbL1CoJI/Z1P955wSyLAf3gEQu7Iv3fdi1lgcQ0vDGFU+BS QMn6Q9YJWsi6ju0DywaC/xkYkOn9WCAjfoeOJAqEEM1/SoXA8ghlswbfdwva9gg+P9dRi2 vSuexyWRZ5OXfAej7XoNfPL+wohW8vx188vJNcebdi0FYbbcbQhUwzJtkktdlHB8VTcb+H KzuRvTYP/ILlW6VblIDtKxNPb39s37a2WkSgh8ORWs1itaS4g/HSB+FCaZ63Xrpx0a+XS7 t1Vkf1MT14+q/Tmf6so9gKSB87kSSRm0jsmzkR8QLGIniimWo+adJtDxO8d9yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705094748; a=rsa-sha256; cv=none; b=njXBYu5QKjqkYoLEfQw/fzAqrloK6jXUyS2BCQif+Sy7dH+LiGc3DPi/3Rm1YM1EKcrIG/ jJvaUuKtRtdcZjl33rI/loYbtMI6y8b1Fa2iSACcuHzTyFwgcevcugJfhuuE6+lkfIHotQ t90hyDBF/CSqhQtmAoINSI+gfzFUNJM1Yd0jVGAyBc4QGg7YgNPbFG2Kna3nV2q6cHjy2F ID3gTlROL5fdfsJBaUjGOmpVQGSbF1r/0ZJwgVD2b6faYTHa/L8iECHfS62Dif7cBO8U3z hvovSlvIWaxlVDQB6Np+zzrRPF6hXcS5oFX0KPjpdUIBrRUa2u8ytubOgiBJIA== Received: from [192.168.1.10] (c-73-231-46-254.hsd1.ca.comcast.net [73.231.46.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TBZMb1GF2z1DT3; Fri, 12 Jan 2024 21:25:47 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.80.23121017 Date: Fri, 12 Jan 2024 13:25:43 -0800 Subject: Re: d07acc58d898 - main - systm: Relax __result_use_check annotations From: Ravi Pokala To: Mark Johnston , , , Message-ID: Thread-Topic: d07acc58d898 - main - systm: Relax __result_use_check annotations References: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> In-Reply-To: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable Hi Mark, > failing to check for errors when copying *in* is a much more severe bug In that you might get panics. But failing to check for errors when copying = *out* can be a security leak; depending on the context, a panic might be pre= ferable. I agree with what Mateusz just said: make __result_use_check contingent on = `clang'. Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: > on behalf of Mark Johnston > Date: Friday, January 12, 2024 at 13:12 To: >, >, > Subject: git: d07acc58d898 - main - systm: Relax __result_use_check annotat= ions The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd07acc58d8987e8e1205f4a82b77e8= 47ea2d60d3 commit d07acc58d8987e8e1205f4a82b77e847ea2d60d3 Author: Mark Johnston > AuthorDate: 2024-01-12 15:07:28 +0000 Commit: Mark Johnston > CommitDate: 2024-01-12 20:56:00 +0000 systm: Relax __result_use_check annotations When compiling with gcc, functions annotated this way can not have their return values cast away, e.g., with `(void)copyout(...)`. clang permits it but gcc does not. Since we have a number of such casts for calls which copy data out of the kernel, and since failing to check for errors when copying *in* is a much more severe bug, remove some of the annotations in order to make the gcc build happy. Reviewed by: kib Reported by: Jenkins Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions with _= _result_use_check") Differential Revision: https://reviews.freebsd.org/D43418 --- sys/sys/systm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 2da177af91f0..508690cd639e 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -289,9 +289,9 @@ int __result_use_check copyin(const void * __restrict u= daddr, void * _Nonnull __restrict kaddr, size_t len); int __result_use_check copyin_nofault(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); -int __result_use_check copyout(const void * _Nonnull __restrict kaddr, +int copyout(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); -int __result_use_check copyout_nofault(const void * _Nonnull __restrict ka= ddr, +int copyout_nofault(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); #ifdef SAN_NEEDS_INTERCEPTORS @@ -313,11 +313,11 @@ int64_t fuword64(volatile const void *base); int __result_use_check fueword(volatile const void *base, long *val); int __result_use_check fueword32(volatile const void *base, int32_t *val); int __result_use_check fueword64(volatile const void *base, int64_t *val); -int __result_use_check subyte(volatile void *base, int byte); -int __result_use_check suword(volatile void *base, long word); -int __result_use_check suword16(volatile void *base, int word); -int __result_use_check suword32(volatile void *base, int32_t word); -int __result_use_check suword64(volatile void *base, int64_t word); +int subyte(volatile void *base, int byte); +int suword(volatile void *base, long word); +int suword16(volatile void *base, int word); +int suword32(volatile void *base, int32_t word); +int suword64(volatile void *base, int64_t word); uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newv= al); u_long casuword(volatile u_long *p, u_long oldval, u_long newval); int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp= , From nobody Fri Jan 12 22:29: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 4TBbmY0nHhz56XSV; Fri, 12 Jan 2024 22:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBbmY0Gspz4mNF; Fri, 12 Jan 2024 22:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705098541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oau9J+EaYqbj5RdszqD/mOdKp9ipq5PjpoRBR/ibswc=; b=FKLCJ1adSm2V0ju5O+3big5zEjWeGLA0tGBdvshZj8lop1VMOlvzMmwUEx712wqGWhEIye V7TfoWnAb3B3CcryAbuPXCHCwWID7KJT9oJN7gehmDSdewiNJ2s6GHciptesCQQHcamWhF //YbQQII9PGUlr23OMAU5efMyKJFfA8la8+uO9Z/mupjLIp9FFfAQHTqACyWNVvZisf4II rMP1lrXAvsgStLGVw1YnBDGdPJqYAwKmqijMUtQ5CayVjp+Itkjfl3hu6NMHwnKgAK3Val l2unE2ux4CeM9MgxgD4tL8TQXaQb9gJIGhuyxdw8m+3FJkKyEYTZRQzgxYx3HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705098541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oau9J+EaYqbj5RdszqD/mOdKp9ipq5PjpoRBR/ibswc=; b=nsWMzaq992/o/TgT/4JnmgTxgwK1pZe8CkzA80a/F1OiY9hTM4G0ohYzqT3WWGwQTQ1Q/8 DMywubjybMfvDQ8tox/HXGEXE5d1pgXd+AV7bL0Y5jzR9DS96Vpqq/6rXe8vwBAt9/4ZDl wizFxe8Qt3Ezq6vRFuefIquJB7g8rirRxO7+m5FEsEyhyFvUeAhp17uKatNj+m/KCdp1y5 FrucXKpi0eMT2DJ75Eqkn3/v+HDzPxsLSZIlSwP+EKyepwTkEzQPU5YrtAlneQkqoZNGw5 +OrfYIwwJXaD4IDsGzYqdEvnZq7OUJdbKWYS7gx3EouROTbJ/kWU483F6ii7UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705098541; a=rsa-sha256; cv=none; b=SMWb8G0+1DKmP0dRJEicGEe+50V19ob6i52nKQxar92pLeMMplfB6Q7J7r3YAJ03lF82p0 mdg4hFNkivVIC/bHvjKJOFIvpq050IUhGRteLOU6Gmfyk947zbkPcmFLPj72ZwGyDcgmKV E/IXW6ylA7x1yrZADLHib0nzC/UxWAyNzJXEsGxeYdDe6VVQ8zrmTfJePcRz/iU9D7LjSg gUUtnI8PyC0IUu0nRlQIqtp4xEhRRTP6fpTlur1kJnNzTYtQFAn/pxGefquGQROB90w/w9 Zl8W/C+WBh3pthBs83RmgM1yOAuOhoFH9zJRMQL1a0wndnzXfKuU/mWPF+IrnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBbmX6QxGz1K2V; Fri, 12 Jan 2024 22:29: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 40CMT0Sd058201; Fri, 12 Jan 2024 22:29:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CMT0qB058198; Fri, 12 Jan 2024 22:29:00 GMT (envelope-from git) Date: Fri, 12 Jan 2024 22:29:00 GMT Message-Id: <202401122229.40CMT0qB058198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 55e2a7d3ea21 - main - pmap_pinit(9): sweep references to pmap_pinit2() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55e2a7d3ea21728f0a5ea712350f521507f3cfb0 Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=55e2a7d3ea21728f0a5ea712350f521507f3cfb0 commit 55e2a7d3ea21728f0a5ea712350f521507f3cfb0 Author: Robert Wing AuthorDate: 2024-01-09 04:07:59 +0000 Commit: Robert Wing CommitDate: 2024-01-12 13:29:17 +0000 pmap_pinit(9): sweep references to pmap_pinit2() gone since 2004 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 3 +-- share/man/man9/pmap.9 | 3 +-- share/man/man9/pmap_pinit.9 | 7 +------ 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ac936aebb574..9242d37a62fd 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240112: remove pmap_pinit2() +OLD_FILES+=usr/share/man/man9/pmap_pinit2.9.gz + # 20240112: replaced NetBSD tests for uniq with our own OLD_FILES+=usr/tests/usr.bin/uniq/d_basic.in OLD_FILES+=usr/tests/usr.bin/uniq/d_basic.out diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 6bc814334f5d..8ec1f06a50ed 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1813,8 +1813,7 @@ MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 MLINKS+=pmap_kextract.9 vtophys.9 MLINKS+=pmap_init.9 pmap_init2.9 MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 -MLINKS+=pmap_pinit.9 pmap_pinit0.9 \ - pmap_pinit.9 pmap_pinit2.9 +MLINKS+=pmap_pinit.9 pmap_pinit0.9 MLINKS+=pmap_qenter.9 pmap_qremove.9 MLINKS+=pmap_quick_enter_page.9 pmap_quick_remove_page.9 MLINKS+=pmap_remove.9 pmap_remove_all.9 \ diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index db27fe880afc..5672dbe6b71d 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 30, 2016 +.Dd January 12, 2024 .Dt PMAP 9 .Os .Sh NAME @@ -105,7 +105,6 @@ operation. .Xr pmap_page_init 9 , .Xr pmap_pinit 9 , .Xr pmap_pinit0 9 , -.Xr pmap_pinit2 9 , .Xr pmap_protect 9 , .Xr pmap_qenter 9 , .Xr pmap_qremove 9 , diff --git a/share/man/man9/pmap_pinit.9 b/share/man/man9/pmap_pinit.9 index b90f30cbc72b..8ef16a69e5fe 100644 --- a/share/man/man9/pmap_pinit.9 +++ b/share/man/man9/pmap_pinit.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 21, 2003 +.Dd January 12, 2024 .Dt PMAP_PINIT 9 .Os .Sh NAME @@ -52,11 +52,6 @@ The function initializes the physical map .Fa pm , associated with process 0, the first process created in the system. -.Sh IMPLEMENTATION NOTES -The -.Fn pmap_pinit2 -function has been deprecated, and should be implemented as a stub -until further notice. .Sh SEE ALSO .Xr pmap 9 , .Xr pmap_growkernel 9 From nobody Fri Jan 12 22:29: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 4TBbmZ1pyVz56XCt; Fri, 12 Jan 2024 22:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBbmZ1Kjlz4lyH; Fri, 12 Jan 2024 22:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705098542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Nu1AzDDWiCbxfst3QbTx2zmoeZ0sjhQ/kueuPmUqeo=; b=ZpYYkMwSAiqy4GJaWuVIUkvjODX6lHMOUUNiPVEK7SmiG15NJnPgJbWxQPom60a9GOTAWj kPLuleq2nN6gpYSzvQaJ2hfQrtG53rtJWLEGjiYqWEJM3u4T2vozLXb3PwyGWByCiLoZoP u5cVzucthbxu0gmfFSOksnefhHFZ4cZn2haETsB88gUZ875gee7eiRP9X2iOkktb83eEF1 s4AwNaX9xODbZ+rklDZXL5IIPzpoki9lTr4VI0NBigs3JMsBdjCMX6JQpXlpNzA+jDc4co ib07KkIUDkDuAozW5USg8XgKsuhzTuY8pv+/e4l/G/xBPlnKy1s3Lo6OcUGsfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705098542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Nu1AzDDWiCbxfst3QbTx2zmoeZ0sjhQ/kueuPmUqeo=; b=oWpSVQZ92QZZb4rUhR8YaQP6qTG0N6RBnk9zAO3DqyVNAE1QyS77jhUooAJctrbjwGiCBF 5KzJDCMbNT7f4JkpyjlzwF2po9kYBI42LjMGdI+wXDAwGlFvEKZ5qZwmVxrqAMIfiG34pr Sf6FqwHcxLjDp8Yw6IjldyGAGMkzvtWAdK4PQrwOGBXWwsU/Y4fMng6Fcb8blo3bvQA8Vp YR64hbI17ofNysWpkfVbclwWdrmtddJMW0dTOzoJWbzWV/GOkkvKQyka663WyyKJEO0sog ifBS+wUQBR1W3W06AOPkdeddzzUMB0e33kL/2Ki2yQk8uP6EUhnU4hg1ladJMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705098542; a=rsa-sha256; cv=none; b=wb0Nud0At3cUCSHw0Jotngg5f7A0wgToLsnGIGY2GHxuUteaolXN/OD8F05MNPPKwD/LOM I3nAMeXKE7zfhMI7K2KiXon0hMNejRkXCu+6rM2ijb/Y02xHu7g7vMUfFLUuuGMQp+amT+ tba9y7muupFREpfH5uzfWN2OAP7VNHJ0ZjOzhf1qQSa+KnHRybKI60IAVxV8TJxdKyt5Rl E/qtz1mN96QP85njdB/gMjGLyvIBsbaIxgBV2UPlh6FF0xZJXNwCPOIYERdfpK2GU97FY9 EdvdWymvvmjiy0va+c4Q3+KbT9QraE+gh01RQM/a84qTKyv6XWrtmbiqbTk1cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBbmZ077gz1K9F; Fri, 12 Jan 2024 22:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CMT1Or058244; Fri, 12 Jan 2024 22:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CMT1M5058241; Fri, 12 Jan 2024 22:29:01 GMT (envelope-from git) Date: Fri, 12 Jan 2024 22:29:01 GMT Message-Id: <202401122229.40CMT1M5058241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: bc1eea0c0b0a - main - pmap_init(9): sweep references to pmap_init2() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc1eea0c0b0ad0a39b5b22b89341b4af1f0cd21f Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=bc1eea0c0b0ad0a39b5b22b89341b4af1f0cd21f commit bc1eea0c0b0ad0a39b5b22b89341b4af1f0cd21f Author: Robert Wing AuthorDate: 2024-01-09 04:50:47 +0000 Commit: Robert Wing CommitDate: 2024-01-12 13:29:50 +0000 pmap_init(9): sweep references to pmap_init2() gone since 2005 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 2 +- share/man/man9/pmap.9 | 1 - share/man/man9/pmap_init.9 | 16 +++------------- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 9242d37a62fd..7265d0a19741 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240112: remove pmap_init2() +OLD_FILES+=usr/share/man/man9/pmap_init2.9.gz + # 20240112: remove pmap_pinit2() OLD_FILES+=usr/share/man/man9/pmap_pinit2.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 8ec1f06a50ed..276662568088 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1811,7 +1811,7 @@ MLINKS+=PHOLD.9 PRELE.9 \ MLINKS+=pmap_copy.9 pmap_copy_page.9 MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 MLINKS+=pmap_kextract.9 vtophys.9 -MLINKS+=pmap_init.9 pmap_init2.9 +MLINKS+=pmap_init.9 MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 MLINKS+=pmap_pinit.9 pmap_pinit0.9 MLINKS+=pmap_qenter.9 pmap_qremove.9 diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index 5672dbe6b71d..8c86f44d9ff2 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -94,7 +94,6 @@ operation. .Xr pmap_extract_and_hold 9 , .Xr pmap_growkernel 9 , .Xr pmap_init 9 , -.Xr pmap_init2 9 , .Xr pmap_is_modified 9 , .Xr pmap_is_prefaultable 9 , .Xr pmap_kextract 9 , diff --git a/share/man/man9/pmap_init.9 b/share/man/man9/pmap_init.9 index b530737126fc..3ca609d0d3fd 100644 --- a/share/man/man9/pmap_init.9 +++ b/share/man/man9/pmap_init.9 @@ -23,12 +23,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 10, 2005 +.Dd January 12, 2024 .Dt PMAP_INIT 9 .Os .Sh NAME -.Nm pmap_init , -.Nm pmap_init2 +.Nm pmap_init .Nd initialize the pmap subsystem .Sh SYNOPSIS .In sys/param.h @@ -36,8 +35,6 @@ .In vm/pmap.h .Ft void .Fn pmap_init "void" -.Ft void -.Fn pmap_init2 "void" .Sh DESCRIPTION The .Fn pmap_init @@ -45,17 +42,10 @@ function initializes the .Xr pmap 9 sub-system. It is called during system initialization by -.Fn vm_init , +.Fn vm_mem_init , to initialize any structures that the .Nm system needs in order to map between physical and virtual memory. -.Pp -The -.Fn pmap_init2 -function initializes a zone for the PV entries. -These are used to implement page sharing at the physical level. -A high water mark is set so that the system can recover from -excessive numbers of PV entries. .Sh SEE ALSO .Xr pmap 9 .Sh AUTHORS From nobody Fri Jan 12 22:29: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 4TBbnR07fQz56XSc; Fri, 12 Jan 2024 22:29:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBbnQ5FGGz4myq; Fri, 12 Jan 2024 22:29:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-783182d4a09so753177685a.2; Fri, 12 Jan 2024 14:29:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705098585; x=1705703385; 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=YSqEq0n7Qwe4wVznSViFAQenN05cVskagVGNEIlv8RY=; b=ATnoauQSc7mOEeTfCTzdAgALcNrjzwBaeKv5g0v1Kd27GsGbeoJtekt9cdREa31MjZ 84xO63xc0qrrr6oz0p20OUPCfCKt+jZa3WqP7qoKeT8FfCwS78jI0BU7N0MVTecYGj1x 2Lyp2Y97Ztq1d1iZdQRA0Z6iJKKsRg+edCr0pyewzp9caBG3VY3lAFDfgfiKnrMXGeeo GW7t0cStEa+IId0aLZCQoiHVbrcnEEypJ0DAgEnVF4CKukIhv+RBqhJjzXd8yBT+3vDO 1JlVk/M7NuhUJzVfAY7EgM1FKRTFQhPGFZaFjOUbEBD53WegsFzAm6Vyx1SMedxlzExW NEKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705098585; x=1705703385; 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=YSqEq0n7Qwe4wVznSViFAQenN05cVskagVGNEIlv8RY=; b=stH8v5rAj0NN6jsbX6yU1EqqZ5vLOUv80hbuSjjcNTaiLvqYLwThyBMmK+skdOk77y YPi85tPgdkkJML1cZ3CadgXuyN8yM0f6qGH4ru8/5PlFu7reMt06D16YhMV62NXQkx31 qAk/ueG4ooc/CxSPeEDYqzsMTebAlNP8LgrxWEPMqryhhtSWPYQip/clT4ALGwxR8KLn TspGG2Miqyb2UNAZSQpyGviI5p3X8nLMJxve8Cp7sx1SA5dX182pwywLXhjpS+OYHtP+ LuWbaJ5/iaJcce/0UpDyD4m8oqGGaQSm1090fkU3sNfPguv6dIUjyeMz0hwfD35FsBK3 L3rg== X-Gm-Message-State: AOJu0YyIpk/0NGRd03e79h2/x9cFs9iJf5Y023hpeVirw9bk69melukC gQ4oJ1wKcYv0kveH3zhWo4zLb6S0T0WM7A== X-Google-Smtp-Source: AGHT+IE4OFmHPj5xo21VP6c4KXc4NSXpypHBC72ZFWtTJEUzRiqAAGvYLSj6vX2fjXAJIS1riCGwtw== X-Received: by 2002:a37:ad0c:0:b0:783:28e9:bcb4 with SMTP id f12-20020a37ad0c000000b0078328e9bcb4mr2235171qkm.72.1705098585030; Fri, 12 Jan 2024 14:29:45 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id bq43-20020a05620a46ab00b00783244c7a95sm1361798qkb.24.2024.01.12.14.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 14:29:44 -0800 (PST) Date: Fri, 12 Jan 2024 17:29:41 -0500 From: Mark Johnston To: Ravi Pokala Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: d07acc58d898 - main - systm: Relax __result_use_check annotations Message-ID: References: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4TBbnQ5FGGz4myq 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] On Fri, Jan 12, 2024 at 01:25:43PM -0800, Ravi Pokala wrote: > Hi Mark, > > > failing to check for errors when copying *in* is a much more severe bug > > In that you might get panics. How do you mean? > But failing to check for errors when copying *out* can be a security leak; depending on the context, a panic might be preferable. If something in the kernel fails to check for copyout() errors, userspace will potentially be confused since it expected the kernel to overwrite some memory when it in fact did not. Failing to check for copyin() errors can cause the kernel to potentially end up treating uninitialized (kernel) memory as initialized. That can have security ramifications depending on what the kernel does after. > I agree with what Mateusz just said: make __result_use_check contingent on `clang'. I don't want to do exactly that. Here is my attempt: https://reviews.freebsd.org/D43426 > Thanks, > > Ravi (rpokala@) > > -----Original Message----- > From: > on behalf of Mark Johnston > > Date: Friday, January 12, 2024 at 13:12 > To: >, >, > > Subject: git: d07acc58d898 - main - systm: Relax __result_use_check annotations > > > The branch main has been updated by markj: > > > URL: https://cgit.FreeBSD.org/src/commit/?id=d07acc58d8987e8e1205f4a82b77e847ea2d60d3 > > > commit d07acc58d8987e8e1205f4a82b77e847ea2d60d3 > Author: Mark Johnston > > AuthorDate: 2024-01-12 15:07:28 +0000 > Commit: Mark Johnston > > CommitDate: 2024-01-12 20:56:00 +0000 > > > systm: Relax __result_use_check annotations > > > When compiling with gcc, functions annotated this way can not have their > return values cast away, e.g., with `(void)copyout(...)`. clang permits > it but gcc does not. Since we have a number of such casts for calls > which copy data out of the kernel, and since failing to check for errors > when copying *in* is a much more severe bug, remove some of the > annotations in order to make the gcc build happy. > > > Reviewed by: kib > Reported by: Jenkins > Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions with __result_use_check") > Differential Revision: https://reviews.freebsd.org/D43418 > --- > sys/sys/systm.h | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > > diff --git a/sys/sys/systm.h b/sys/sys/systm.h > index 2da177af91f0..508690cd639e 100644 > --- a/sys/sys/systm.h > +++ b/sys/sys/systm.h > @@ -289,9 +289,9 @@ int __result_use_check copyin(const void * __restrict udaddr, > void * _Nonnull __restrict kaddr, size_t len); > int __result_use_check copyin_nofault(const void * __restrict udaddr, > void * _Nonnull __restrict kaddr, size_t len); > -int __result_use_check copyout(const void * _Nonnull __restrict kaddr, > +int copyout(const void * _Nonnull __restrict kaddr, > void * __restrict udaddr, size_t len); > -int __result_use_check copyout_nofault(const void * _Nonnull __restrict kaddr, > +int copyout_nofault(const void * _Nonnull __restrict kaddr, > void * __restrict udaddr, size_t len); > > > #ifdef SAN_NEEDS_INTERCEPTORS > @@ -313,11 +313,11 @@ int64_t fuword64(volatile const void *base); > int __result_use_check fueword(volatile const void *base, long *val); > int __result_use_check fueword32(volatile const void *base, int32_t *val); > int __result_use_check fueword64(volatile const void *base, int64_t *val); > -int __result_use_check subyte(volatile void *base, int byte); > -int __result_use_check suword(volatile void *base, long word); > -int __result_use_check suword16(volatile void *base, int word); > -int __result_use_check suword32(volatile void *base, int32_t word); > -int __result_use_check suword64(volatile void *base, int64_t word); > +int subyte(volatile void *base, int byte); > +int suword(volatile void *base, long word); > +int suword16(volatile void *base, int word); > +int suword32(volatile void *base, int32_t word); > +int suword64(volatile void *base, int64_t word); > uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval); > u_long casuword(volatile u_long *p, u_long oldval, u_long newval); > int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp, > > > > From nobody Fri Jan 12 22:51:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBcH24fgDz56Z6g; Fri, 12 Jan 2024 22: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 4TBcH248Mrz4sCW; Fri, 12 Jan 2024 22:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705099918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Xgu2yWthsh6BEyv9pEoLZnQkf64rGqEbF1xLClN9bU=; b=oRfQ+qqcFkiN47NVNPgPwbx4je/+2cTolnZs5EY0mcWCQBpat0V0++HG+ld2dER0EoqOab yNQVO++Tb5o9uJvovXQpdziLZiadHyWNhhOFkYBT9XnqL9W7DbLyAO4XMY2HoQnnZiST6K xWfQFfXcktJ2F1zKc/AySbJt8mm+39BkB1B3t6DlZmFttgXwh51h1LN7/jlivtJ2xCTvQt k1n8CDQI/EMKdmhSLBGmaUiCPDSjCvzbXn1KYGxJ7Mj6a09ASft2IA0s4MHL/jDeIF32uB cHxxYRgGz2MbgPicua/9JNHxX4A1NkDDXDLLhE/BvqGLCp7NO6rzlueixOFn3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705099918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Xgu2yWthsh6BEyv9pEoLZnQkf64rGqEbF1xLClN9bU=; b=dOkj7Bv7cm4gM2TjI/jDOXVsLlmet0dk1D/hQpLJXvsQZ7rOAvo0BKv5UmJrHewpuCSBDm EHQcKXGijfKaA8JrmhIaxyvYPZ2Va7F1+dj4UbkTpSQ48u0szrauXbZSU0GlShKG9eyiDy oiJ7al7BAftsT5H8uWUk5Rso62dkzvRREiEjSfTYKy+zcI/tK2u3HMFPAwfq5KWjMGP0b4 IjSTSDtN6JM+ZZ8+Fq9Xo+AdB7Oqu3w4AXKMbOsZFTjieTHatWdTDJXn+dEcNcYKLYwcb4 /+EiD1XFG1F+ZUZ/yBkYM5jQIiSJYks57u38utTu6CDpWQw7fIBUAPHI6zlmrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705099918; a=rsa-sha256; cv=none; b=I4XPqDeBN1NclASdrzgMDB5A8RxAQYPPN46fu1YPLN2pC+/px5CfnhVVU2d26MfCKg3gr3 /mxUsyZFsVBXIYzzLGLhUhyL1mbLXTiR6uWfELIqkGsBaINdcLECVlCk4CyM833qyCkW2n VRraNzEQhPGatw/HFrSJmGC/XVghTW7GMd8iUW3hkjcxNkSUHYvExz/Mw+C6Zf7p8SENH9 l6doDqv21cXc/jII0g5+VPsdcxAcqONGqlU7g4ii0EtOJXIRrS6QbWQmMovv/3tWeFO30W 8EJ7ba9kMijES6wiZ6o7SydekiWHViTpwjjveCU2igx+PtrSj3ICdQ5a0rhNZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBcH239Hzz1Kfb; Fri, 12 Jan 2024 22:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CMpwGq003494; Fri, 12 Jan 2024 22:51:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CMpwcC003491; Fri, 12 Jan 2024 22:51:58 GMT (envelope-from git) Date: Fri, 12 Jan 2024 22:51:58 GMT Message-Id: <202401122251.40CMpwcC003491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 82f2275b73e5 - main - cd9660: Add support for mask,dirmask,uid,gid options List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82f2275b73e556580b155ea9bbf7f7e364458fa1 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=82f2275b73e556580b155ea9bbf7f7e364458fa1 commit 82f2275b73e556580b155ea9bbf7f7e364458fa1 Author: Ricardo Branco AuthorDate: 2024-01-08 20:24:53 +0000 Commit: John Baldwin CommitDate: 2024-01-12 22:51:31 +0000 cd9660: Add support for mask,dirmask,uid,gid options Reviewed by: jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/982 --- sbin/mount_cd9660/mount_cd9660.8 | 37 ++++++++++++++++++- sbin/mount_cd9660/mount_cd9660.c | 79 ++++++++++++++++++++++++++++++++++++++-- sys/fs/cd9660/cd9660_mount.h | 7 ++++ sys/fs/cd9660/cd9660_vfsops.c | 23 ++++++++++++ sys/fs/cd9660/cd9660_vnops.c | 24 ++++++++++-- sys/fs/cd9660/iso.h | 5 +++ 6 files changed, 167 insertions(+), 8 deletions(-) diff --git a/sbin/mount_cd9660/mount_cd9660.8 b/sbin/mount_cd9660/mount_cd9660.8 index cd6f7a19f6eb..d2cdd2f3ef20 100644 --- a/sbin/mount_cd9660/mount_cd9660.8 +++ b/sbin/mount_cd9660/mount_cd9660.8 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 11, 2018 +.Dd January 2, 2024 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -39,8 +39,12 @@ .Nm .Op Fl begjrv .Op Fl C Ar charset +.Op Fl G Ar gid +.Op Fl m Ar mask +.Op Fl M Ar mask .Op Fl o Ar options .Op Fl s Ar startsector +.Op Fl U Ar uid .Ar special node .Sh DESCRIPTION The @@ -66,6 +70,37 @@ Do not strip version numbers on files. only the last one will be listed.) In either case, files may be opened without explicitly stating a version number. +.It Fl G Ar group +Set the group of the files in the file system to +.Ar group . +The default gid on non-Rockridge volumes is zero. +.It Fl U Ar user +Set the owner of the files in the file system to +.Ar user . +The default uid on non-Rockridge volumes is zero. +.It Fl m Ar mask +Specify the maximum file permissions for files +in the file system. +(For example, a +.Ar mask +of +.Li 755 +specifies that, by default, the owner should have +read, write, and execute permissions for files, but +others should only have read and execute permissions). +See +.Xr chmod 1 +for more information about octal file modes. +Only the nine low-order bits of +.Ar mask +are used. +The default +.Ar mask +on non-Rockridge volumes is 755. +.It Fl M Ar mask +Specify the maximum file permissions for directories +in the file system. +See the previous option's description for details. .It Fl j Do not use any Joliet extensions included in the file system. .It Fl o diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c index ab6da7271c17..d8d64eb5a656 100644 --- a/sbin/mount_cd9660/mount_cd9660.c +++ b/sbin/mount_cd9660/mount_cd9660.c @@ -44,8 +44,11 @@ #include +#include #include #include +#include +#include #include #include #include @@ -60,6 +63,9 @@ static struct mntopt mopts[] = { MOPT_END }; +static gid_t a_gid(const char *); +static uid_t a_uid(const char *); +static mode_t a_mask(const char *); static int get_ssector(const char *dev); static int set_charset(struct iovec **, int *iovlen, const char *); void usage(void); @@ -80,7 +86,7 @@ main(int argc, char **argv) mntflags = verbose = 0; ssector = -1; - while ((ch = getopt(argc, argv, "begjo:rs:vC:")) != -1) + while ((ch = getopt(argc, argv, "begG:jm:M:o:rs:U:vC:")) != -1) switch (ch) { case 'b': build_iovec(&iov, &iovlen, "brokenjoliet", NULL, (size_t)-1); @@ -91,6 +97,15 @@ main(int argc, char **argv) case 'g': build_iovec(&iov, &iovlen, "gens", NULL, (size_t)-1); break; + case 'G': + build_iovec_argf(&iov, &iovlen, "gid", "%d", a_gid(optarg)); + break; + case 'm': + build_iovec_argf(&iov, &iovlen, "mask", "%u", a_mask(optarg)); + break; + case 'M': + build_iovec_argf(&iov, &iovlen, "dirmask", "%u", a_mask(optarg)); + break; case 'j': build_iovec(&iov, &iovlen, "nojoliet", NULL, (size_t)-1); break; @@ -110,6 +125,9 @@ main(int argc, char **argv) case 's': ssector = atoi(optarg); break; + case 'U': + build_iovec_argf(&iov, &iovlen, "uid", "%d", a_uid(optarg)); + break; case 'v': verbose++; break; @@ -173,8 +191,8 @@ void usage(void) { (void)fprintf(stderr, -"usage: mount_cd9660 [-begjrv] [-C charset] [-o options] [-s startsector]\n" -" special node\n"); +"usage: mount_cd9660 [-begjrv] [-C charset] [-G gid] [-m mask] [-M mask]\n" +" [-o options] [-U uid] [-s startsector] special node\n"); exit(EX_USAGE); } @@ -254,3 +272,58 @@ set_charset(struct iovec **iov, int *iovlen, const char *localcs) return (0); } + +static gid_t +a_gid(const char *s) +{ + struct group *gr; + const char *gname; + gid_t gid; + + if ((gr = getgrnam(s)) != NULL) + gid = gr->gr_gid; + else { + for (gname = s; *s && isdigit(*s); ++s); + if (!*s) + gid = atoi(gname); + else + errx(EX_NOUSER, "unknown group id: %s", gname); + } + return (gid); +} + +static uid_t +a_uid(const char *s) +{ + struct passwd *pw; + const char *uname; + uid_t uid; + + if ((pw = getpwnam(s)) != NULL) + uid = pw->pw_uid; + else { + for (uname = s; *s && isdigit(*s); ++s); + if (!*s) + uid = atoi(uname); + else + errx(EX_NOUSER, "unknown user id: %s", uname); + } + return (uid); +} + +static mode_t +a_mask(const char *s) +{ + int done, rv; + char *ep; + + done = 0; + rv = -1; + if (*s >= '0' && *s <= '7') { + done = 1; + rv = strtol(optarg, &ep, 8); + } + if (!done || rv < 0 || *ep) + errx(EX_USAGE, "invalid file mode: %s", s); + return (rv); +} diff --git a/sys/fs/cd9660/cd9660_mount.h b/sys/fs/cd9660/cd9660_mount.h index 88075dc2788b..4f2d9538a10a 100644 --- a/sys/fs/cd9660/cd9660_mount.h +++ b/sys/fs/cd9660/cd9660_mount.h @@ -40,6 +40,10 @@ struct iso_args { char *fspec; /* block special device to mount */ struct oexport_args export; /* network export info */ + uid_t uid; /* uid that owns ISO-9660 files */ + gid_t gid; /* gid that owns ISO-9660 files */ + mode_t fmask; /* file mask to be applied for files */ + mode_t dmask; /* file mask to be applied for directories */ int flags; /* mounting flags, see below */ int ssector; /* starting sector, 0 for 1st session */ char *cs_disk; /* disk charset for Joliet cs conversion */ @@ -51,3 +55,6 @@ struct iso_args { #define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet Ext.*/ #define ISOFSMNT_BROKENJOLIET 0x00000010/* allow broken Joliet disks */ #define ISOFSMNT_KICONV 0x00000020 /* Use libiconv to convert chars */ + +#define ISOFSMNT_UID 0x00000100 /* override uid */ +#define ISOFSMNT_GID 0x00000200 /* override gid */ diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index ee0b68714c2a..f067453d3458 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -104,6 +104,12 @@ cd9660_cmount(struct mntarg *ma, void *data, uint64_t flags) ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); ma = mount_arg(ma, "export", &args.export, sizeof(args.export)); + if (args.flags & ISOFSMNT_UID) + ma = mount_argf(ma, "uid", "%d", args.uid); + if (args.flags & ISOFSMNT_GID) + ma = mount_argf(ma, "gid", "%d", args.gid); + ma = mount_argf(ma, "mask", "%d", args.fmask); + ma = mount_argf(ma, "dirmask", "%d", args.dmask); ma = mount_argsu(ma, "cs_disk", args.cs_disk, 64); ma = mount_argsu(ma, "cs_local", args.cs_local, 64); ma = mount_argf(ma, "ssector", "%u", args.ssector); @@ -218,6 +224,7 @@ iso_mountfs(struct vnode *devvp, struct mount *mp) struct g_consumer *cp; struct bufobj *bo; char *cs_local, *cs_disk; + int v; dev = devvp->v_rdev; dev_ref(dev); @@ -387,6 +394,7 @@ iso_mountfs(struct vnode *devvp, struct mount *mp) isomp->im_mountp = mp; isomp->im_dev = dev; isomp->im_devvp = devvp; + isomp->im_fmask = isomp->im_dmask = ACCESSPERMS; vfs_flagopt(mp->mnt_optnew, "norrip", &isomp->im_flags, ISOFSMNT_NORRIP); vfs_flagopt(mp->mnt_optnew, "gens", &isomp->im_flags, ISOFSMNT_GENS); @@ -394,6 +402,21 @@ iso_mountfs(struct vnode *devvp, struct mount *mp) vfs_flagopt(mp->mnt_optnew, "nojoliet", &isomp->im_flags, ISOFSMNT_NOJOLIET); vfs_flagopt(mp->mnt_optnew, "kiconv", &isomp->im_flags, ISOFSMNT_KICONV); + if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1) { + isomp->im_flags |= ISOFSMNT_UID; + isomp->im_uid = v; + } + if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1) { + isomp->im_flags |= ISOFSMNT_GID; + isomp->im_gid = v; + } + if (vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v) == 1) { + isomp->im_fmask &= v; + } + if (vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v) == 1) { + isomp->im_dmask &= v; + } + /* Check the Rock Ridge Extension support */ if (!(isomp->im_flags & ISOFSMNT_NORRIP)) { if ((error = bread(isomp->im_devvp, (isomp->root_extent + diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 1b11da80431b..33ca58472490 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -56,6 +56,7 @@ #include #include +#include #include static vop_setattr_t cd9660_setattr; @@ -119,6 +120,9 @@ cd9660_access(struct vop_access_args *ap) struct vnode *vp = ap->a_vp; struct iso_node *ip = VTOI(vp); accmode_t accmode = ap->a_accmode; + accmode_t file_mode; + uid_t uid; + gid_t gid; if (vp->v_type == VCHR || vp->v_type == VBLK) return (EOPNOTSUPP); @@ -140,8 +144,16 @@ cd9660_access(struct vop_access_args *ap) } } - return (vaccess(vp->v_type, ip->inode.iso_mode, ip->inode.iso_uid, - ip->inode.iso_gid, ap->a_accmode, ap->a_cred)); + file_mode = ip->inode.iso_mode; + file_mode &= (vp->v_type == VDIR) ? ip->i_mnt->im_dmask : ip->i_mnt->im_fmask; + + uid = (ip->i_mnt->im_flags & ISOFSMNT_UID) ? + ip->i_mnt->im_uid : ip->inode.iso_uid; + gid = (ip->i_mnt->im_flags & ISOFSMNT_GID) ? + ip->i_mnt->im_gid : ip->inode.iso_gid; + + return (vaccess(vp->v_type, file_mode, uid, + gid, ap->a_accmode, ap->a_cred)); } static int @@ -169,9 +181,13 @@ cd9660_getattr(struct vop_getattr_args *ap) vap->va_fileid = ip->i_number; vap->va_mode = ip->inode.iso_mode; + vap->va_mode &= (vp->v_type == VDIR) ? ip->i_mnt->im_dmask : ip->i_mnt->im_fmask; + vap->va_nlink = ip->inode.iso_links; - vap->va_uid = ip->inode.iso_uid; - vap->va_gid = ip->inode.iso_gid; + vap->va_uid = (ip->i_mnt->im_flags & ISOFSMNT_UID) ? + ip->i_mnt->im_uid : ip->inode.iso_uid; + vap->va_gid = (ip->i_mnt->im_flags & ISOFSMNT_GID) ? + ip->i_mnt->im_gid : ip->inode.iso_gid; vap->va_atime = ip->inode.iso_atime; vap->va_mtime = ip->inode.iso_mtime; vap->va_ctime = ip->inode.iso_ctime; diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h index 2d9e2e8b682a..a9733f62c077 100644 --- a/sys/fs/cd9660/iso.h +++ b/sys/fs/cd9660/iso.h @@ -237,6 +237,11 @@ struct iso_mnt { struct g_consumer *im_cp; struct bufobj *im_bo; + uid_t im_uid; + gid_t im_gid; + mode_t im_fmask; + mode_t im_dmask; + int logical_block_size; int im_bshift; int im_bmask; From nobody Fri Jan 12 22:56: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 4TBcNP74FYz56ZYM; Fri, 12 Jan 2024 22:56: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 4TBcNP2bsGz4ssx; Fri, 12 Jan 2024 22:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705100197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtg5U3hN70PG405UNOJRk7TSwh1U7sMI0lH/DTQ4LGI=; b=LAIVBnKssa7UNfGWoIlo3UEIprS2Ut/UJcQnF6+RXjqs0kf6tjLKAWvgs4+i9wDDc6y02v WLTvC1zWUiRj2xPtc6giaQXGbn2dWireQLRU25PDQw50HVVRYIENwKEoYxbj8iT7OBSH6q OxpWL14ATNk6B2NkrCXLgf7xzN9s1f4k9hLiTl1ofT5ABSdH+/ayKsq3ky8hzQ0k8Mkmkk 2DyBSa8c/Hs+xOr61YMkYb7Eh8FGQUfDgiOp0FcLnf4oOLVmhUYUG/64SjSifI9iCzI6vs zQb1mjgoQK6LGvJduXatk0mor8dDK0+BSqUmWxE2vcZkTLEpLwb12Iiw8N8zVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705100197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtg5U3hN70PG405UNOJRk7TSwh1U7sMI0lH/DTQ4LGI=; b=gu/3i7nez9P7NOzJRdaJmDrDJBJHylfdQ2qM+yMAIV0mAXSJJiSVjmXmseklOkgEbCvLDm 2VFKj11vuc3/few1e8emHJLjL6B/gElH4T7Q+c0GwspPj4x41QSzh4LWcw1pHuNcal1Lgk smk+puqK+XWBXeFqNR/JdfXl3h2GOak0r+h5eJtKdvzKe992PCROZXqz91dIBtAymEX4o6 QOnDYvw9+MF97MBjzY+SSVYKjx+Kee8K0bKXquLoOa986VD+qOCd6v/ULrdMnKUt4/CADg XclEIiXRM1DVtEHfS964/TdurFa94UVYz/jSYqKkk3xK4xIrDNWjyVswchJ9Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705100197; a=rsa-sha256; cv=none; b=cU/36GlToW01/pbmcDlny6+zNZDNQRpcxf75O+5IXfDhLSCFo8Kyy1/eBBZ0QfMSsuAk+a mHjmfe/giEMaClojIU7BRmm52MoTZDklN4jmNSEkz0qMR8Pj1CxKIn/ZepzjjNF47W1EQE KqU6jKsrRkrXRY/8AGmNPKDG5MXCNKgHgLp4T3mQpptgQXBb5YOJzDDBhizxSsxZva2lv1 NOzfb16t3cv4tMkrJ2b9u+VFclwVwODW7z9uNsy7KMUn0PfX9y4BkhXzsfCNNJ5ay0ybks dtCrZvoXUBrrrgAJUwPbpxZ1jbiydy+gj2tP502ZjHgG6hEDB+y4wBaHrbhFwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBcNP1clKz1Kfn; Fri, 12 Jan 2024 22:56: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 40CMubX9009237; Fri, 12 Jan 2024 22:56:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CMubXX009234; Fri, 12 Jan 2024 22:56:37 GMT (envelope-from git) Date: Fri, 12 Jan 2024 22:56:37 GMT Message-Id: <202401122256.40CMubXX009234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 246e0457d930 - main - mixer.8: Add terse example for increasing volume List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 246e0457d93071ffd901c78e3ee7badc5f51bd4c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=246e0457d93071ffd901c78e3ee7badc5f51bd4c commit 246e0457d93071ffd901c78e3ee7badc5f51bd4c Author: Alexander Ziaee AuthorDate: 2024-01-12 17:12:19 +0000 Commit: John Baldwin CommitDate: 2024-01-12 22:55:36 +0000 mixer.8: Add terse example for increasing volume Reviewed by: jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1044 --- usr.sbin/mixer/mixer.8 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.8 b/usr.sbin/mixer/mixer.8 index 6d553a5934f4..10a461d91693 100644 --- a/usr.sbin/mixer/mixer.8 +++ b/usr.sbin/mixer/mixer.8 @@ -19,7 +19,7 @@ .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN .\" THE SOFTWARE. .\" -.Dd April 29, 2022 +.Dd January 12, 2024 .Dt MIXER 8 .Os .Sh NAME @@ -218,6 +218,13 @@ opens when the option has not been specified. .El .Sh EXAMPLES +Increase the volume for the +.Cm vol +device of the first mixer found by 5%: +.Bd -literal -offset indent +$ mixer vol=+0.05 +.Ed +.Pp Change the volume for the .Cm vol device of the From nobody Fri Jan 12 23:40:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBdMJ1Kv6z56f7V; Fri, 12 Jan 2024 23:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBdMJ0qsnz4xXZ; Fri, 12 Jan 2024 23:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705102844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OOfa6aNKgqKIFfRYQgJSytBPVWZsw4SHwblBymS0yLw=; b=BWmbOLq52otPG1QqFjVEc28TXDher86XQaBCXAtsa9o5FZ7odAnKwJLATZMRRSv1iEiePJ Y+RbhrunmS/mZAwttY57NBDa0oCsPoXGXj+FAaciHgKo3Ydl+6eVwEs1L8E2TGBQlSu9wo UYBNxsDWDhwAtYSdlnVkJEzLN+bEDHINkwP0fISxoDh9mKHXcedYjrHzLwNUxWZnrsecPs y/awDicXkf+3HuRk6dEhYSwQjgJx3WM5lvn5uoJz/l2tf/esRgRGIxjLNIRi+e7MhRPtMm r8DIzdOMlEMzAxp7ykBCp+gjTxnP4/CmHsj6FInTvOWoR3mI1ah7Z8XJOKv8Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705102844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OOfa6aNKgqKIFfRYQgJSytBPVWZsw4SHwblBymS0yLw=; b=kd/gawZ+csAkrkgZFlyp8QC/zaKDXx0f0gZ5Z5ZyZcyy/yqHFkoUGoIRjEUX15aNnSIsY9 nlH5zW56mjoJi11JYLaDHNbLkaOBWWtAbSWrL3HFAyN5Z9V54p+3EZ+X+K6av2xr7PJy33 Ay22ooc79dGIbze9c+hWD4ovDybxtKw4JM4nPNBJNiLPbZWnZSutgdykhv4bC7dfRD6Yb1 NSfAH5QZO6vDLtIG0Ny89tkfwBFwaYJ65JYuI9yqOtQdN8UkoTHzYYQW/39D/OznvfBb06 5bFpO8tu6bZBIzWXfBKnRVYPlLoLYCpyAQiXL3lq3sG7cSsxql1291pfThfbWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705102844; a=rsa-sha256; cv=none; b=LQnQBP7+856jFWCfodD7zyowFedcAzJEUVaR59/Rf6+SGUfqnVuEJbJq1gwMQBQwdROnhr TZHNzjHQ6oiYvxy9af9jQlaPQlIIK8KsjWHfpiUBGOWfTGzJNgnGfYKyXrjo8U/pe5JtKR P+uI6pjgDDkoOpE3T8bAM6dAiTpqgN58NV4b3hbn05EOrHN6j7GZdnS1z56JlSJx1sexDY fA2vcm5W7uGPeOBUKiImUZd/zNXhrINx8uRlTi5ouk1+iIRPuYWoirwW8HIVE/9ltM4zvQ s33vCdufrcAm7jfjnvC+FIsUt4m2jXb8y8EJOlBj8P2cSLkReyUjM5xy9iJvJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBdMH70R9z1Lv7; Fri, 12 Jan 2024 23:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CNehle087102; Fri, 12 Jan 2024 23:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CNehD5087099; Fri, 12 Jan 2024 23:40:43 GMT (envelope-from git) Date: Fri, 12 Jan 2024 23:40:43 GMT Message-Id: <202401122340.40CNehD5087099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 03d04bf49492 - main - Stop using expressions in _Alignof() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03d04bf49492fc70366e6d78194336a4122282a2 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=03d04bf49492fc70366e6d78194336a4122282a2 commit 03d04bf49492fc70366e6d78194336a4122282a2 Author: Minsoo Choo AuthorDate: 2024-01-12 23:37:53 +0000 Commit: John Baldwin CommitDate: 2024-01-12 23:37:53 +0000 Stop using expressions in _Alignof() _Alignof(expression) is a non-standard extension. This is not allowed in gnu11 and gnu17 which follow the C11 standard _Alignof(type). Reviewed by: arichardson, imp, jhb Fixes: 4a9cd9fc22d7 amd64 db_trace: Reject unaligned frame pointers Fixes: 7ccaf76a27f1 riscv db_trace: Ensure trapframe pointer is suitably aligned. Fixes: 638c68897fbd arm64 db_trace: Ensure trapframe pointer is suitably aligned. Differential Revision: https://reviews.freebsd.org/D43409 --- sys/amd64/amd64/db_trace.c | 3 ++- sys/arm64/arm64/db_trace.c | 2 +- sys/riscv/riscv/db_trace.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index 9d9a2cd4a7bb..a57b38dd0818 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -205,7 +205,8 @@ db_nextframe(db_addr_t *fp, db_addr_t *ip, struct thread *td) */ tf_addr = *fp + 16; - if (!__is_aligned(tf_addr, _Alignof(*tf)) || !INKERNEL(tf_addr)) { + if (!__is_aligned(tf_addr, _Alignof(struct trapframe)) || + !INKERNEL(tf_addr)) { db_printf("--- invalid trapframe %p\n", (void *)tf_addr); *ip = 0; *fp = 0; diff --git a/sys/arm64/arm64/db_trace.c b/sys/arm64/arm64/db_trace.c index 1c9290f19ed5..4bc6af26a023 100644 --- a/sys/arm64/arm64/db_trace.c +++ b/sys/arm64/arm64/db_trace.c @@ -92,7 +92,7 @@ db_stack_trace_cmd(struct thread *td, struct unwind_state *frame) struct trapframe *tf; tf = (struct trapframe *)(uintptr_t)frame->fp - 1; - if (!__is_aligned(tf, _Alignof(*tf)) || + if (!__is_aligned(tf, _Alignof(struct trapframe)) || !kstack_contains(td, (vm_offset_t)tf, sizeof(*tf))) { db_printf("--- invalid trapframe %p\n", tf); diff --git a/sys/riscv/riscv/db_trace.c b/sys/riscv/riscv/db_trace.c index d3a52ecf59bf..0d374b1493d7 100644 --- a/sys/riscv/riscv/db_trace.c +++ b/sys/riscv/riscv/db_trace.c @@ -83,7 +83,7 @@ db_stack_trace_cmd(struct thread *td, struct unwind_state *frame) struct trapframe *tf; tf = (struct trapframe *)(uintptr_t)frame->sp; - if (!__is_aligned(tf, _Alignof(*tf)) || + if (!__is_aligned(tf, _Alignof(struct trapframe)) || !kstack_contains(td, (vm_offset_t)tf, sizeof(*tf))) { db_printf("--- invalid trapframe %p\n", tf); From nobody Sat Jan 13 00:01: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 4TBdqC0Jdnz56gjL; Sat, 13 Jan 2024 00:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBdqB6wqLz51FR; Sat, 13 Jan 2024 00:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705104087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXDYitu8B8VU+anMXRNGYmMlMf+7HRylwSXzLn0K6CU=; b=E2Ud0ViIq8hmCja46Hi+EicfA++Bj+C4jcWv5eCFn68IMEtJM0dSWn5c/m/LbKRIq9X6BI AfHW1cjwGrnkdaAQ+8XTqJXr/r3zkAqun5Nvz7gJpKlgilfdjmvyRorP3Z6dLCD+dhzWrW vDzXw0V55++MMTCr9o9rZFsNqAczplk0eoY1j/FjVYNgDqYGDQRPrI7T0INylzpJHBiDOO tS7//lPMX18IOEc8xONjZquvV+7NLmFoXV/gyk50Ugg8tiGUt3BqGhNSYMNdMKDouRo+4g zmUEzRK7wpdr2VqgM/18lt7CTYlYkAfQIK3MdVUV0lIZCc2BENkGAx5MJNno5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705104087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXDYitu8B8VU+anMXRNGYmMlMf+7HRylwSXzLn0K6CU=; b=gttgGAYPYEVQW/0Qni4jQgWGpMJb+mSO7Eu7p0KjpYAbriy6L3K3ZHB9t5lyZbdicyqg1A xssGN/RbWDOCXKytH0n0OZqoGHrz4ltNIlwMAj9D6ayF7JjzdRcUTw5zYAmtGP2/c6lZfo jYYVYPOHlaqVURSzCHV5K5ZiM6SVVMp25j3OztqKNArmONndeFXAzuk7VYYp259BUX50z3 Y4yh/lNqHmu6O7nU4qgPOUtsBVVcYRyoP8SmqUI2j1XXLhO0/JwRCi+oaVc0PSIEJgqrAh p3Ts1mayKyINbVb+q0JA7u/6tF3ezuHzg3YWf1h7qwup1l1EUsL8JRSwBHv4jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705104087; a=rsa-sha256; cv=none; b=KQAeu+CEpe8+nMi9S8TpXFyjs83Ixd8MiRK6ePcGuxGWAUfcjsBrg9s314/y7vPchPbsSH KJYqodJniMq4eF9KELlc379wYwLqmkWq0DeTOak3+9ijOhiLkq0k/hlBx2LEyKO8796AEr GLObvgAmPrCx62FiB1Adf5h7ReIMxljjxb5Wstv5fF9jnDNjbWjBTKZmCBl6qRvO3id0CQ +0mS5ekX8e5nUbhKA8WDk/nNUwpDW5tk6Grmq3ucxfLdIG3Epho0KQN/V6ddJYM1dDZdNW YiiXZusaQyeBwl78pADEqZibjud3BnNS9GFCQmuk912FWHiBxB3XAYnpVU1u8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBdqB60Fbz1MFM; Sat, 13 Jan 2024 00:01: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 40D01Qa7023008; Sat, 13 Jan 2024 00:01:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40D01Q3K023005; Sat, 13 Jan 2024 00:01:26 GMT (envelope-from git) Date: Sat, 13 Jan 2024 00:01:26 GMT Message-Id: <202401130001.40D01Q3K023005@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 60b2e2d3ee82 - main - libc: stop exposing __fcntl_compat List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60b2e2d3ee82b1aa58bdca2697ea3dd25b903102 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=60b2e2d3ee82b1aa58bdca2697ea3dd25b903102 commit 60b2e2d3ee82b1aa58bdca2697ea3dd25b903102 Author: Brooks Davis AuthorDate: 2024-01-13 00:00:24 +0000 Commit: Brooks Davis CommitDate: 2024-01-13 00:01:13 +0000 libc: stop exposing __fcntl_compat It was exposed (under FBSDprivate_1.0) for forward compatability in threading libraries in 2008 by commit cd7d66a21f1a. The last consumer was removed in 2015 by commit 8495e8b1e9e1. I missed this among the _ and __sys_ symbols in commit e2417a21a025. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D43408 --- lib/libc/sys/Symbol.map | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index a2b8c2d40fc1..e9e3c7151c2f 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -594,7 +594,6 @@ FBSDprivate_1.0 { __sys_fchown; _fcntl; __sys_fcntl; - __fcntl_compat; _fhopen; __sys_fhopen; _fhstat; From nobody Sat Jan 13 02:30: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 4TBj7W3xqJz56xCD; Sat, 13 Jan 2024 02:30: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 4TBj7W3W3Pz43s9; Sat, 13 Jan 2024 02:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705113047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cy0CXTuaZY0EWo2gFVrLhT04mrIHkeo9GfXeB7/rV9U=; b=G5lH72UFRBSvgtajlXNqN1nGWgEq3gBznJEta5Bye44FMGjRxQxEjivlyyY/D+5Nmu7lkq A44g8TjAlGNIwgsUKxoNnLCR30cKKSSWKdW48mU4KBLn0VdlSg231V3COT/mEwrlFlbNKN cmf19TdqGyHtp9xGcJof3+Y1ARNCF5KyI7bc7vfzB8XK2R+90k6N7TGBCLnGev45vt2+VM QjtJ3lTMWAWemkKQk/VMrBha0CPzCjDbB36ixAvN2rh+/Z5gGU1MWTUuUqLeHhKkgEk7SD fEQlSmQk3bV/WA+4Yyt5FllPEMf17arLzrJxAGZKFfLEbqm/cjAFciEV2s78Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705113047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cy0CXTuaZY0EWo2gFVrLhT04mrIHkeo9GfXeB7/rV9U=; b=iG+rYNVYVsEmb+1DsPFupcLwsRgodB2u+QrxzPqcPj4M+qEdie+wZmFNRp3t35YdQqzx00 9ksJsZfOKEjbRruv6hsWWGbuJ8QD2QuTQRmB4IBQqlXE81iFItIqzRXQc9+L3AAZWGjVgW JcOwZCk4Dv2t1jtZw98cXxH6mu+8pnmNesWPTR7aJX9upJlwLP2T+7Xk0Y7k6pOovf5If5 /W9+hmK8PEs3EJP32SGKLEZXHaD3HrI9gYaKBYnFYekwvZjISN/lbC5/2Xs51TIR0qep0v Jlo+7aUROdjd//SarMNN2RYRIlG3g5NaibyKhLR68h/GLySE/npMmxOClIWA7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705113047; a=rsa-sha256; cv=none; b=BJCWTGPpfuQ0lSW2lkDn0OslzSkm+ePimL/Q9R2kou0jFjPUq7GdRpuptCBzDxOIJIIG33 2tTzIyb0+oE+0uKMErH06bZeXRhlknUkErOv8H5yBGmVinrTnpwUBxPGXUkwIGh4iQb5Db nFIIP3i4IwE8qM+3sc6LnYbnvUxZsDe943wzlVIMBONhMONYNpINlDs1BhCBkJkwR7AV8n oqyxyL16OFOxs42rMrttyLX9lPBQi5i1FxDipu+ERG52IFX3KDqyB/v5Qw02zVCIGm51MY jNZm83N3RcdhbmXh3cCVMifIycTCD6Nq+w1o1ut/0b3dadstMatY9GWEyRkUcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TBj7W2ZVHz1RH1; Sat, 13 Jan 2024 02:30: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 40D2UlW9071919; Sat, 13 Jan 2024 02:30:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40D2UlxW071916; Sat, 13 Jan 2024 02:30:47 GMT (envelope-from git) Date: Sat, 13 Jan 2024 02:30:47 GMT Message-Id: <202401130230.40D2UlxW071916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: c8328f1a7b6e - main - pmap_init(9): drop MLINKS reference List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8328f1a7b6ea59951e2ea2c1a9a4aa10020c8c5 Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=c8328f1a7b6ea59951e2ea2c1a9a4aa10020c8c5 commit c8328f1a7b6ea59951e2ea2c1a9a4aa10020c8c5 Author: Robert Wing AuthorDate: 2024-01-12 17:29:15 +0000 Commit: Robert Wing CommitDate: 2024-01-12 17:29:15 +0000 pmap_init(9): drop MLINKS reference fix the build --- share/man/man9/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 276662568088..863963d24474 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1811,7 +1811,6 @@ MLINKS+=PHOLD.9 PRELE.9 \ MLINKS+=pmap_copy.9 pmap_copy_page.9 MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 MLINKS+=pmap_kextract.9 vtophys.9 -MLINKS+=pmap_init.9 MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 MLINKS+=pmap_pinit.9 pmap_pinit0.9 MLINKS+=pmap_qenter.9 pmap_qremove.9 From nobody Sat Jan 13 14:11: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 4TC0gz0bSpz57dTB; Sat, 13 Jan 2024 14:11:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TC0gy1VCwz4Jpc; Sat, 13 Jan 2024 14:11:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id OdUYrETVZxDxGOejNrVIUI; Sat, 13 Jan 2024 14:11:25 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id OejLr9WPRWIKPOejMr7hb5; Sat, 13 Jan 2024 14:11:25 +0000 X-Authority-Analysis: v=2.4 cv=D+pUl9dj c=1 sm=1 tr=0 ts=65a29a0d a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=jnMofEQN8Fceji3S_UUA:9 a=CjuIK1q_8ugA:10 a=ztI4eMwfBtkA:10 a=UuLlkBnjUTgA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 375795D3; Sat, 13 Jan 2024 06:11:23 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 01FCD22B; Sat, 13 Jan 2024 06:11:22 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , so@greebsd.org Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto In-reply-to: <20240112074339.A581B23D@slippy.cwsent.com> References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> <20240112071106.C72D8235@slippy.cwsent.com> <20240112074339.A581B23D@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 11 Jan 2024 23:43:39 -0800." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 13 Jan 2024 06:11:22 -0800 Message-Id: <20240113141123.01FCD22B@slippy.cwsent.com> X-CMAE-Envelope: MS4xfOjtIbgOZPFwgjGYRQ5y1PLnFEUhRUejnm5THc98ah5ZxZtEJcUBv3nU4aTniJnY8uo9BsZGKI/YQoQlGN2B76nni3g4+CNTCSIKCFWPkcSuX1P8z3/v YYBYYz3K8ygD5lRRTiyKEDEcqiWmWxIH+/xn4jgOV1TBZYsDMqFU0qIBors5zo6huiANSZFpLYVes7aHHbP+YeqimkPBQE7D5em59Llts++EPRcMS0Pvu2Xq EqcrRhOwwlbsAmBcjd1jz1HqXCY8A/JiKHBaqwDBkVYY5w9l9AFZQEwTSG3G70oqX/nYxJyr7ye/9zB0d3tB0eX+4Zlb7HxzSPhgoKPnK5mXypyZy+CkLrua QXQj2JPj X-Spamd-Bar: - X-Spamd-Result: default: False [-1.69 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[cschubert.com]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4TC0gy1VCwz4Jpc In message <20240112074339.A581B23D@slippy.cwsent.com>, Cy Schubert writes: > In message <20240112071106.C72D8235@slippy.cwsent.com>, Cy Schubert writes: > > In message , Jessica > > Clarke w > > rites: > > > On 11 Jan 2024, at 13:31, Cy Schubert wrote: > > > >=20 > > > > The branch main has been updated by cy: > > > >=20 > > > > URL: = > > > https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab45a > f= > > > 60382cfb > > > >=20 > > > > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > > > > Author: Cy Schubert > > > > AuthorDate: 2023-12-06 15:30:05 +0000 > > > > Commit: Cy Schubert > > > > CommitDate: 2024-01-11 13:26:42 +0000 > > > >=20 > > > > kerberos: Fix numerous segfaults when using weak crypto > > > >=20 > > > > Weak crypto is provided by the openssl legacy provider which is > > > > not load by default. Load the legacy providers as needed. > > > >=20 > > > > When the legacy provider is loaded into the default context the = > > > default > > > > provider will no longer be automatically loaded. Without the = > > > default > > > > provider the various kerberos applicaions and functions will = > > > abort(). > > > > > > Hi, > > > This has completely broken macOS and Linux cross-building. Please > > > either fix this quickly or, if unable to, revert until such time as you > > > can. Note that patches can be tested by creating a PR against the > > > GitHub mirror. > > > > Thanks for the heads up. I see the problem and am working on a fix. > > I think the correct approach would be to separate the new > fbsd_ossl_provider_load() and unload functions into their own library > (instead of libroken). This avoids the less desirable option of including > bsd.cpu.mk in secure/lib/Makefile.common, which does build but could affect > future work. The alternative approach also requires secure/lib/libcrypto (because of libkrb5) being built during prebuild phase. Either way bsd.cpu.mk will need to be included in the secure/lib/libcrypto/Makefile.common. Both of these similar approaches, attempting to limit the change to local to Heimdal only result in the same Linux MacOS failure. This leaves us with enabling legacy (weak) crypto globally, like this: diff --git a/crypto/openssl/apps/openssl.cnf b/crypto/openssl/apps/openssl.c nf index 7996120cc67e..659c0b21abbd 100644 --- a/crypto/openssl/apps/openssl.cnf +++ b/crypto/openssl/apps/openssl.cnf @@ -57,6 +57,7 @@ providers = provider_sect # List of providers to load [provider_sect] default = default_sect +legacy = legacy_set # The fips section name should match the section name inside the # included fipsmodule.cnf. # fips = fips_sect @@ -70,8 +71,10 @@ default = default_sect # OpenSSL may not work correctly which could lead to significant system # problems including inability to remotely access the system. [default_sect] -# activate = 1 +activate = 1 +[legacy_sect] +activate = 1 #################################################################### [ ca ] Would this be acceptable or would we prefer to add bsd.cpu.mk to secure/libcrypto/Makefile.inc? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Sat Jan 13 14:19: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 4TC0sn0X9fz57f9X; Sat, 13 Jan 2024 14:19:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TC0sm31d0z4Kfy; Sat, 13 Jan 2024 14:19:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id Oe6nrEUtZxDxGOerbrVJXu; Sat, 13 Jan 2024 14:19:55 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id Oerar9YaWWIKPOerbr7iGL; Sat, 13 Jan 2024 14:19:55 +0000 X-Authority-Analysis: v=2.4 cv=D+pUl9dj c=1 sm=1 tr=0 ts=65a29c0b a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=F2mt8MKA_61uHnqjoOgA:9 a=CjuIK1q_8ugA:10 a=pK3_ou3pLUoA:10 a=ztI4eMwfBtkA:10 a=UuLlkBnjUTgA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 267ED5E0; Sat, 13 Jan 2024 06:19:54 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id E79B716E; Sat, 13 Jan 2024 06:19:53 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , so@freebsd.org Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto In-reply-to: <20240113141123.01FCD22B@slippy.cwsent.com> References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> <20240112071106.C72D8235@slippy.cwsent.com> <20240112074339.A581B23D@slippy.cwsent.com> <20240113141123.01FCD22B@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Sat, 13 Jan 2024 06:11:22 -0800." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 13 Jan 2024 06:19:53 -0800 Message-Id: <20240113141953.E79B716E@slippy.cwsent.com> X-CMAE-Envelope: MS4xfKLU4JPDAM/BW+QJXD7aEE0v57bNR9IbXxEw0IkTWjOMqgb7s2DPe1C6rkNYW+oc5Xn0qe3JDgozyGZT64GjFZoN+bHVPaUubqpY932W2L5ZDNS2VzAz 9METqoM1jWGPzGr0PkT4p7/La5MrHYsOeberqoJJe19w8FxRjM+pUjucItTUjkNJsqFel5Y07W/3T8SSy5cmJ98uzSLFUQ8iMdgIclORtTkm2ZiI26HqbbeD vwZunSya/BXpY12DKCErHvQUULfuDKDRYpczF1qFMUNCf5brACstBhus8qejR/ZrA2+MP1O1q15xgfZkpB8Pb55kAep+iFn8lgIxXgBI7iSSAr1Gl8EyS7bf bvqRrERIwNN/07XmndUFSmR88PdThg== X-Spamd-Bar: - X-Spamd-Result: default: False [-1.69 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[cschubert.com]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4TC0sm31d0z4Kfy In message <20240113141123.01FCD22B@slippy.cwsent.com>, Cy Schubert writes: > In message <20240112074339.A581B23D@slippy.cwsent.com>, Cy Schubert writes: > > In message <20240112071106.C72D8235@slippy.cwsent.com>, Cy Schubert writes: > > > In message , Jessica > > > Clarke w > > > rites: > > > > On 11 Jan 2024, at 13:31, Cy Schubert wrote: > > > > >=20 > > > > > The branch main has been updated by cy: > > > > >=20 > > > > > URL: = > > > > https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab4 > 5a > > f= > > > > 60382cfb > > > > >=20 > > > > > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > > > > > Author: Cy Schubert > > > > > AuthorDate: 2023-12-06 15:30:05 +0000 > > > > > Commit: Cy Schubert > > > > > CommitDate: 2024-01-11 13:26:42 +0000 > > > > >=20 > > > > > kerberos: Fix numerous segfaults when using weak crypto > > > > >=20 > > > > > Weak crypto is provided by the openssl legacy provider which is > > > > > not load by default. Load the legacy providers as needed. > > > > >=20 > > > > > When the legacy provider is loaded into the default context the = > > > > default > > > > > provider will no longer be automatically loaded. Without the = > > > > default > > > > > provider the various kerberos applicaions and functions will = > > > > abort(). > > > > > > > > Hi, > > > > This has completely broken macOS and Linux cross-building. Please > > > > either fix this quickly or, if unable to, revert until such time as you > > > > can. Note that patches can be tested by creating a PR against the > > > > GitHub mirror. > > > > > > Thanks for the heads up. I see the problem and am working on a fix. > > > > I think the correct approach would be to separate the new > > fbsd_ossl_provider_load() and unload functions into their own library > > (instead of libroken). This avoids the less desirable option of including > > bsd.cpu.mk in secure/lib/Makefile.common, which does build but could affect > > > future work. > > The alternative approach also requires secure/lib/libcrypto (because of > libkrb5) being built during prebuild phase. Either way bsd.cpu.mk will need > to be included in the secure/lib/libcrypto/Makefile.common. Both of these > similar approaches, attempting to limit the change to local to Heimdal only > result in the same Linux MacOS failure. This leaves us with enabling legacy > (weak) crypto globally, like this: > > diff --git a/crypto/openssl/apps/openssl.cnf b/crypto/openssl/apps/openssl.c > nf > index 7996120cc67e..659c0b21abbd 100644 > --- a/crypto/openssl/apps/openssl.cnf > +++ b/crypto/openssl/apps/openssl.cnf > @@ -57,6 +57,7 @@ providers = provider_sect > # List of providers to load > [provider_sect] > default = default_sect > +legacy = legacy_set > # The fips section name should match the section name inside the > # included fipsmodule.cnf. > # fips = fips_sect > @@ -70,8 +71,10 @@ default = default_sect > # OpenSSL may not work correctly which could lead to significant system > # problems including inability to remotely access the system. > [default_sect] > -# activate = 1 > +activate = 1 > > +[legacy_sect] > +activate = 1 > > #################################################################### > [ ca ] > > Would this be acceptable or would we prefer to add bsd.cpu.mk to > secure/libcrypto/Makefile.inc? Adding so@freebsd.org. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Sat Jan 13 16:17:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TC3Tp1w6rz566Wl; Sat, 13 Jan 2024 16:17: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 4TC3Tp14jrz4ZWm; Sat, 13 Jan 2024 16:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705162670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHfzFMiPtgMDAMMwoUKA1LNAwCqKvukEEEQmKo3tyo4=; b=IT50xh0Zu1xH+dy4r/p2v1m0zTBDyDyX5EE3HMj0C+6tUF6Z8PgY5nhvJvxUw9qk97sKfR IvIUiGygGuccNS9En+hxc1EDBL9wK70WmT4XPRHWmd4iDZV+u34bYV2/c9d+sUIwZZHVLS H+/tTbmZFVidBADoJsorZ6BqnIUyOCwD5eR9qlbydYQoSIwQriRyF5xjqIdh/Y1InBYbxM VvaozdJ7nVw0x3xcitfOW+JX2VVzBHLiL/nZkTt8cT9tb1faDRzV6ykKTys5sGNNlhRDS2 va6W5OQ9ncYf9TXnQWQsJJFpOK5sdcA+SJjRmVUnO/O6phIdC8SiS8uZbkahdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705162670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHfzFMiPtgMDAMMwoUKA1LNAwCqKvukEEEQmKo3tyo4=; b=WsQtBaR9HvYDArWyzjBGA0/yqLeVuo+R6Agfdts8pYbRuCk3pO4Bv5c/xnzi7V028DXbGm h/cr//2/yW/FW/jWFI1HJwnwe+axkDthoTXLiuBXrb/MtJbali+rp15zm8FWMgEz8TipOS cHfbP0ICmxvZLzXGy5FVFMXD4rcVNMTMrT/LhVH6uiLaiJbxiYOiPLYNxB4YRak+YCM4Nm hNdl1fItAanat2b4MIlwPWxBWSFzWMlNm97CZ1tjjJjeloVqrRZowr3v3r2Y8mQui9RIkn iZfwxYokPHNigy9rNr1wp9yM2WZNOLTgcyYh7mpqtsLpwheuNXutju843yxnbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705162670; a=rsa-sha256; cv=none; b=eTjgA5HXcqpcxkSqi745+INEwytM8CkHrh5e9yRwwxf86ZEfYbkK8fBqKkPn8611OWB8il yL7t5zGmOFN5AWwVT/YUHjDf161k7fFG+pmJq4C3WcQVDfosuzSKR00gpvmmzh+WRajXhS E3sUM3EKRxCZtAQrjEnP7i8AObORzBIiE22R1UmjU052cYZQTZRH6gGpA1tB7QmZaTpmEG /V5b3xwNxjmuTdqGXPfOIZRJkCcVjOZ7xqYIthMAJt7qaM1S9FVK3l7NOjKQU1spTNaAW2 UmPs4CmMaZ/5CQjWQ4fIejYDvm+MLrcWoWVLLWVdwpXBinpRx129yUoXTEtWLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TC3Tp067vzcx5; Sat, 13 Jan 2024 16:17: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 40DGHnX0056721; Sat, 13 Jan 2024 16:17:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40DGHnbT056718; Sat, 13 Jan 2024 16:17:49 GMT (envelope-from git) Date: Sat, 13 Jan 2024 16:17:49 GMT Message-Id: <202401131617.40DGHnbT056718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: e3c7b76fa810 - main - man(1): support spaces in filenames List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3c7b76fa8105929ae9a785e5ffc44274b1b0a81 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=e3c7b76fa8105929ae9a785e5ffc44274b1b0a81 commit e3c7b76fa8105929ae9a785e5ffc44274b1b0a81 Author: Wolfram Schneider AuthorDate: 2024-01-13 16:16:55 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-13 16:16:55 +0000 man(1): support spaces in filenames The globbing function in exists() needs to handle white spaces. PR: 275978 Reviewed by: kevans, bapt, emaste MFC after: 1 week --- usr.bin/man/man.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 7e2151295ba7..777726f880db 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -191,7 +191,9 @@ decho() { } # Usage: exists glob -# Returns true if glob resolves to a real file. +# +# Returns true if glob resolves to a real file and store the first +# found filename in the variable $found exists() { local IFS @@ -201,14 +203,16 @@ exists() { # Use some globbing tricks in the shell to determine if a file # exists or not. set +f - set -- "$1" $1 + for file in "$1"* + do + if [ -r "$file" ]; then + found="$file" + set -f + return 0 + fi + done set -f - if [ "$1" != "$2" -a -r "$2" ]; then - found="$2" - return 0 - fi - return 1 } @@ -230,10 +234,10 @@ find_file() { fi decho " Searching directory $manroot" 2 - mann="$manroot/$4.$2*" - man0="$manroot/$4.0*" - catn="$catroot/$4.$2*" - cat0="$catroot/$4.0*" + mann="$manroot/$4.$2" + man0="$manroot/$4.0" + catn="$catroot/$4.$2" + cat0="$catroot/$4.0" # This is the behavior as seen by the original man utility. # Let's not change that which doesn't seem broken. @@ -313,7 +317,7 @@ man_check_for_so() { .so*) trim "${line#.so}" decho "$manpage includes $tstr" # Glob and check for the file. - if ! check_man "$path/$tstr*" ""; then + if ! check_man "$path/$tstr" ""; then decho " Unable to find $tstr" return 1 fi From nobody Sat Jan 13 16:46: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 4TC46m1k1jz569Pt; Sat, 13 Jan 2024 16:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TC46m1CRwz4dSj; Sat, 13 Jan 2024 16:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705164384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwQ294SHjbBQZdsCaRIVo8l71a2YAG+2/o5QM+bNw/w=; b=VK3CbJNRIzOJpa3Y2I8cywMT2SEF+4YNGuvFHgAx/18qswmgbfNcZh2GTCnaMAzL6ZWmi2 YOvX+810JoJQ38ACryutmKBvLSDSIL2ctaStnu+JEI6uVYNA++GXd4Waz1+IyAlzyvI2vd QMV2KCd2f7Gv3krh5jlxEaUMnCteKayhFWinBT/1H2e5xInwf0oPt+8e1hIHp3ASHMHTjB T04b+C+eco/E1w9PDcCMJ1kAvZl6WK1PKmFJmVDIE3LXiMJW/LOb1Xq25G1jhFjPRD/LLx VQLp18YC+XQ26uAeliZviBRU1oai3087WkASFxiuevPkpkB586jD6AQlOvSI8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705164384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwQ294SHjbBQZdsCaRIVo8l71a2YAG+2/o5QM+bNw/w=; b=Kzpmo4qWuH0MDfgFrdJd2aUCtU3UPBvRP+k84HGthJykEUzK/lSBjk9MYtrGUZdGQFm0eo 0Imzc1sJDQ2MsUpof1oxi1ViZHM3cq5OMz5cpBg+q3k1+a5gFd6zbWcM1UtaEb97anWX9w I6srxwfXbci/IrGAjfoCiKn+VaxuZtuXzp/zucgFeoKnJhziLqbJN3QfWW1oN5JgAKlAr4 K/VD5SlHwxzKisyNW+ZXUA+bgn2+asVgSsOCGTQm1OYT4AX8jvdRIVOeeNZiBautMndWXP xbrtHM91DhWepUlpo6TKtPpB24iTTExQ8gJghsBB9FpI7V9/tXr14eoMVSyBHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705164384; a=rsa-sha256; cv=none; b=H4lNP8EnG7faBHGKZnmMGz8JQX8m8LUHYZPOzZ39oLuX7yj5ZHwaraA55GwTzV986g7Xy4 oDWMxVwoyS3UIHhRyrtbRSBx7VT1RSW/FE0YMdwzvTgsjb5hv182I5/1t0Tyn0dVaYtYEg EhNjQQojYOM5KD18Pm0hwTA7ETMBPbZYtnAmrSIfsJWzde2iKkNYos2AiOilQJCUzsughB fpYffoFaNYvACFQOJ3OW0gIQRZA1clzAVa+JsXDt3DMcPoxRJkNBe0a0cUKcLhTQUagHIb ZSzNAlhYKFncKIGEWEe32fZh7JPmgbf6XsKpv7J0eizHXhd8ZV65yDN7emhVLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TC46m08G6zf0h; Sat, 13 Jan 2024 16:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40DGkNe8006441; Sat, 13 Jan 2024 16:46:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40DGkNbp006438; Sat, 13 Jan 2024 16:46:23 GMT (envelope-from git) Date: Sat, 13 Jan 2024 16:46:23 GMT Message-Id: <202401131646.40DGkNbp006438@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: 69748e62e82a - main - vm/vm_object.c: 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69748e62e82a1f5ef77fd3e1b0c9d7e6a89d22b2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=69748e62e82a1f5ef77fd3e1b0c9d7e6a89d22b2 commit 69748e62e82a1f5ef77fd3e1b0c9d7e6a89d22b2 Author: Konstantin Belousov AuthorDate: 2024-01-13 01:44:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-13 16:45:53 +0000 vm/vm_object.c: minor cleanup Remove sys/cdefs.h and sys/socket.h includes. Order sys/ includes alphabetically. Do not check for NULL before free(). Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week DIfferential revision: https://reviews.freebsd.org/D43444 --- sys/vm/vm_object.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index c141b410edf2..1dd6878cf4ab 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -62,10 +62,8 @@ * Virtual memory object module. */ -#include #include "opt_vm.h" -#include #include #include #include @@ -74,19 +72,18 @@ #include #include #include -#include -#include #include -#include /* for curproc, pageproc */ +#include +#include #include -#include +#include +#include #include #include #include #include #include #include -#include #include #include @@ -2612,8 +2609,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) } strlcpy(kvo->kvo_path, fullpath, sizeof(kvo->kvo_path)); - if (freepath != NULL) - free(freepath, M_TEMP); + free(freepath, M_TEMP); /* Pack record size down */ kvo->kvo_structsize = offsetof(struct kinfo_vmobject, kvo_path) From nobody Sat Jan 13 22:47: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 4TCD7j1C8Jz56rwS; Sat, 13 Jan 2024 22:47: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 4TCD7j0SSdz4ZNB; Sat, 13 Jan 2024 22:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705186065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FrgVKFMUoBc0i0GMyeeq+4nPvtAGrCOG9LYMlisBkWU=; b=XGQ+/9nFyEfjecGwDF/Jy3w7nSgXMyqmtsluhGfcdRQ6EwPbF3zRQVChwrFLywUOqBCLzi sDzO3SKHPZ8YVp+MTvzpFzggkDpfc1o2dUcKCUUAANFxYq21PDpVWO2RwB04uKRsaWaSwD K3WcBdmc0IaaTx+3Yq8aKPtb/x8TBWHib0V3ZGoeG38W5zl7nSFhbgYRo0ufnCQCG5WtrE QRPKhSFBbvcXtukrxjwWeTagtxpPnL5h+CRCSKccKRUKAvU8R8y64PcR4hWxHOJ1cVuBM2 Fd7e4+DAiyWB6Ce3XpW26+XQh8UaTkVYCU98hO7+js+MXn9Cttp2oPBWb/uQJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705186065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FrgVKFMUoBc0i0GMyeeq+4nPvtAGrCOG9LYMlisBkWU=; b=Z9wkZhrw9ng4nY6zwepqHmZp/vq3lxaXGRT7WDqTaA4kJQzEiatd9zDHByG4YMINSdHxdA 9bO4W9j6rLJ7JXQlvroIpIEIkbRzU9X/y5V+s0PF144781XYQ0HJzDMAI9dFu6o+ptw04G RptjlIELHWbwkaEvwSAHSC5Uc4ou6i1yPDGzA8PGCRE9av557PAuGNE1qn7QqOSYOnjIyU 3WxruZ3bPC0mtR7F8Hrbs5gPwZjWb2G7tx+5EL3BQvJg40O/bDiYOdw5vGA9crqEyH1YO7 X8otUQqLGQWSiVduKEWJPn5Robf7xgHpeDLtMC/chgvg8j1UvzGLUDlfM0TSeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705186065; a=rsa-sha256; cv=none; b=Z/O/KoyOi9k9or501OGYBM+nh4PzyhAwzPvAHUJ070mgXl6+8XfifKyJ8zrdsvJPaX8Wqc Uu5x2uXtEdffaq2pL/ek+Ug7J00BJlQaRXNQAFsAafpgfy39l51lZY3pujFt2HxEQ/EQoz a4/+lHHfeIZWpi1lirrK8ltiyhxf/bw0hHIT+uxruiuOVSfSzvOX0XcwcTM9MqIK2sxs2P 4qEBI6jjsnp5B9JI0w+C8pFHmGsggR+LLCyfNbpZP3Ptfr9At/DpnzinV7HStUMMVNwqeA 5G8kBTZquXaoGpBf7xbO7Kcl9TNaE6r7CaFHN4tGgKi3R8Wx+r0c0MJTdnTPwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TCD7h6XJtznxV; Sat, 13 Jan 2024 22:47: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 40DMliNn009199; Sat, 13 Jan 2024 22:47:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40DMliUN009196; Sat, 13 Jan 2024 22:47:44 GMT (envelope-from git) Date: Sat, 13 Jan 2024 22:47:44 GMT Message-Id: <202401132247.40DMliUN009196@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: 6b1c534927ad - main - Add a regression test for PR 276191. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b1c534927ad47e9b0dd8be1a39f56c3ea813d44 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=6b1c534927ad47e9b0dd8be1a39f56c3ea813d44 commit 6b1c534927ad47e9b0dd8be1a39f56c3ea813d44 Author: Alan Somers AuthorDate: 2024-01-08 01:03:40 +0000 Commit: Alan Somers CommitDate: 2024-01-13 22:47:16 +0000 Add a regression test for PR 276191. The bug isn't fusefs-specific, but this is the easiest way to reproduce it. PR: 276191 MFC after: 1 week MFC with: bdb46c21a3e68d4395d6e0b6a205187e655532b0 Differential Revision: https://reviews.freebsd.org/D43446 Reviewed by: kib --- tests/sys/fs/fusefs/io.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index b17d3857d327..fda13a72cc4c 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -507,6 +507,16 @@ TEST_P(Io, resize_a_valid_buffer_while_extending) close(m_test_fd); } +/* + * mmap of a suitable region could trigger a panic. I'm not sure what + * combination of size and offset counts as "suitable". Regression test for + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276191 + */ +TEST_P(IoCacheable, vnode_pager_generic_putpage_clean_block_at_eof) +{ + do_mapwrite(0x1bbc3, 0x3b4e0); +} + INSTANTIATE_TEST_SUITE_P(Io, Io, Combine(Bool(), /* async read */ Values(0x1000, 0x10000, 0x20000), /* m_maxwrite */ From nobody Sun Jan 14 01:31: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 4TCHmm6R8Rz56gHs; Sun, 14 Jan 2024 01:31: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 4TCHmm698zz4sbQ; Sun, 14 Jan 2024 01:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705195896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUBA2c9Xd5e4QZnTRmTbwAGI7jM6tzzgMZbsJbqz304=; b=WCwCRGlb6YP9AJzFB7yr0cm+O49DJQlc4y61P25keLEIpbbrbEkmWkdJQTljm6JoA/FbKy nHSMDK/lk+c9xoquD2mtV/GlJe4VWxOGEPMS4QEwDoutWPRMXkn9FMvNL6z5DEDlz+dmvk mu4aK2Bzy25wPxOiFZfSrpdP2Lu3DLSfk3SPgms1mh+HCrnhYGPO6VpFou+NgJXEbjGmiY U/1Y0fIMjkE1mhGWq1Jla0Ays/ZmwLeZo7Ij+F/SK0lUPyt9hBmhkCDx7pXDQIv4xNPbiq 2qzyMz1/F+JR0PCuHNqIuy1FwfDBDDM30IMT/zfhTU6cPqAwwsL3lfyBCARw2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705195896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUBA2c9Xd5e4QZnTRmTbwAGI7jM6tzzgMZbsJbqz304=; b=FXXruFt6Rxyup6u9Xt4AyurUkFMHkle2ErFrcH4ty4zHPkNs1WCKXRKk7Tn+Iy1bK4rJ7W 2CHDD8u92Gb3OTgSOtJ/cTsOrsshA3Zv4asnZxWlpLtjfCYIr/g9t5qL/loP2aXUcnshnD CDr2hxZ92b3oworICsT2juq29nwWgdNncQMm2A+lLJnXTfbq9D3e75KaGtDjBGt9KO/3dN Zn/GwkcDAxosVtqFHe03VzkO/2LUMqHO+cDDvF7QyaDkijJaGtJrSlOEVw3Ev+uEMwL48n awgi8MGpxpDYSM/HPSBIb63JznJOaLbGOi0G2qzUH1dE1KSd5sUXVi01JKkHEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705195896; a=rsa-sha256; cv=none; b=AVLmSZs/NaFMvvHUCB0bJV57rrxJAm8d8t18GPTzw95W86/mmYbcPESrgtUmC2nFjmWrP+ 1VDrqCxQqXQKqr9ocvpmkhv9ec1uAavwwMO//LK2XfHp5u2LIaq+FERgDLOVvF2Hr+1nPd EIt6TxeVCICxcYJIrQ8dOXGDMxFPdzRYm01sh597lkPO3gEBaB3K7IrB6Fy4csMbd1qtaj lTvsycxd/jeKs+ynC/wRaWPLOqRFcV8DOcrJC4m2Pjr8KF4zdWaZ+FAWa6XqbzS8pmW6OI e38ihruZuiAMCc3fQ3zodL5+p8bylsbOFilJOySfNk4GcyFGa3BcxJzp+Oc15Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TCHmm5F6PztVv; Sun, 14 Jan 2024 01:31: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 40E1VaW0091187; Sun, 14 Jan 2024 01:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40E1VXaC091176; Sun, 14 Jan 2024 01:31:33 GMT (envelope-from git) Date: Sun, 14 Jan 2024 01:31:33 GMT Message-Id: <202401140131.40E1VXaC091176@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: d5e0a182cf15 - main - Update to bmake-20240108 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5e0a182cf153f8993a633b93d9220c99a89e760 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d5e0a182cf153f8993a633b93d9220c99a89e760 commit d5e0a182cf153f8993a633b93d9220c99a89e760 Merge: 6b1c534927ad 7a05a7153af6 Author: Simon J. Gerraty AuthorDate: 2024-01-14 01:31:01 +0000 Commit: Simon J. Gerraty CommitDate: 2024-01-14 01:31:01 +0000 Update to bmake-20240108 contrib/bmake/ChangeLog | 102 +++ contrib/bmake/README | 17 +- contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 10 +- contrib/bmake/bmake.1 | 6 +- contrib/bmake/bmake.cat1 | 6 +- contrib/bmake/boot-strap | 16 +- contrib/bmake/bsd.after-import.mk | 17 +- contrib/bmake/buf.c | 6 +- contrib/bmake/buf.h | 4 +- contrib/bmake/compat.c | 65 +- contrib/bmake/cond.c | 111 ++-- contrib/bmake/configure | 34 +- contrib/bmake/configure.in | 16 +- contrib/bmake/dir.c | 330 +++------- contrib/bmake/for.c | 14 +- contrib/bmake/hash.c | 28 +- contrib/bmake/hash.h | 21 +- contrib/bmake/job.c | 139 ++-- contrib/bmake/job.h | 6 +- contrib/bmake/lst.c | 22 +- contrib/bmake/lst.h | 8 +- contrib/bmake/main.c | 156 ++--- contrib/bmake/make.1 | 6 +- contrib/bmake/make.c | 28 +- contrib/bmake/make.h | 5 +- contrib/bmake/meta.c | 6 +- contrib/bmake/mk/ChangeLog | 42 ++ contrib/bmake/mk/compiler.mk | 4 +- contrib/bmake/mk/dirdeps.mk | 17 +- contrib/bmake/mk/dpadd.mk | 14 +- contrib/bmake/mk/gendirdeps.mk | 6 +- contrib/bmake/mk/host-target.mk | 7 +- contrib/bmake/mk/init.mk | 8 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/jobs.mk | 5 +- contrib/bmake/mk/lib.mk | 25 +- contrib/bmake/mk/man.mk | 93 ++- contrib/bmake/mk/meta.autodep.mk | 4 +- contrib/bmake/mk/own.mk | 3 +- contrib/bmake/mk/prog.mk | 5 +- contrib/bmake/mk/rst2htm.mk | 3 +- contrib/bmake/os.sh | 0 contrib/bmake/parse.c | 279 +++------ contrib/bmake/str.c | 77 ++- contrib/bmake/str.h | 29 +- contrib/bmake/suff.c | 168 ++--- contrib/bmake/unit-tests/Makefile | 9 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 2 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 2 +- contrib/bmake/unit-tests/cmd-errors.exp | 2 +- contrib/bmake/unit-tests/cmdline-undefined.mk | 4 +- contrib/bmake/unit-tests/comment.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-string.mk | 14 +- contrib/bmake/unit-tests/cond-cmp-unary.mk | 8 +- contrib/bmake/unit-tests/cond-eof.mk | 4 +- contrib/bmake/unit-tests/cond-func-defined.exp | 2 +- contrib/bmake/unit-tests/cond-func-defined.mk | 8 +- contrib/bmake/unit-tests/cond-func-empty.mk | 16 +- contrib/bmake/unit-tests/cond-func-exists.mk | 6 +- contrib/bmake/unit-tests/cond-func.mk | 4 +- contrib/bmake/unit-tests/cond-late.exp | 2 +- contrib/bmake/unit-tests/cond-late.mk | 6 +- contrib/bmake/unit-tests/cond-op-and.mk | 8 +- contrib/bmake/unit-tests/cond-op-or.mk | 8 +- contrib/bmake/unit-tests/cond-short.exp | 2 +- contrib/bmake/unit-tests/cond-short.mk | 23 +- contrib/bmake/unit-tests/cond-token-number.mk | 6 +- contrib/bmake/unit-tests/cond-token-plain.exp | 4 +- contrib/bmake/unit-tests/cond-token-plain.mk | 16 +- contrib/bmake/unit-tests/cond-token-string.exp | 2 +- contrib/bmake/unit-tests/cond-token-string.mk | 10 +- contrib/bmake/unit-tests/cond-token-var.mk | 16 +- contrib/bmake/unit-tests/dep-var.exp | 2 +- contrib/bmake/unit-tests/dep-var.mk | 10 +- contrib/bmake/unit-tests/depsrc-ignore.exp | 2 +- .../bmake/unit-tests/deptgt-delete_on_error.exp | 2 +- contrib/bmake/unit-tests/deptgt-makeflags.exp | 2 +- contrib/bmake/unit-tests/deptgt-makeflags.mk | 6 +- contrib/bmake/unit-tests/deptgt.mk | 6 +- contrib/bmake/unit-tests/dir.mk | 4 +- contrib/bmake/unit-tests/directive-else.mk | 4 +- .../bmake/unit-tests/directive-export-gmake.exp | 1 + contrib/bmake/unit-tests/directive-export-gmake.mk | 25 +- contrib/bmake/unit-tests/directive-export.exp | 6 +- contrib/bmake/unit-tests/directive-export.mk | 10 +- contrib/bmake/unit-tests/directive-for-empty.mk | 12 +- contrib/bmake/unit-tests/directive-for-errors.mk | 14 +- contrib/bmake/unit-tests/directive-for-escape.exp | 4 +- contrib/bmake/unit-tests/directive-for-escape.mk | 12 +- contrib/bmake/unit-tests/directive-for-if.mk | 4 +- contrib/bmake/unit-tests/directive-for.exp | 19 +- contrib/bmake/unit-tests/directive-for.mk | 27 +- contrib/bmake/unit-tests/directive-ifmake.mk | 4 +- contrib/bmake/unit-tests/directive-ifndef.mk | 36 +- .../bmake/unit-tests/directive-include-guard.exp | 16 + .../bmake/unit-tests/directive-include-guard.mk | 188 ++++-- contrib/bmake/unit-tests/directive-warning.mk | 4 +- contrib/bmake/unit-tests/directive.mk | 4 +- contrib/bmake/unit-tests/escape.exp | 36 +- contrib/bmake/unit-tests/escape.mk | 7 +- contrib/bmake/unit-tests/hanoi-include.mk | 7 +- contrib/bmake/unit-tests/jobs-error-indirect.exp | 2 +- .../bmake/unit-tests/jobs-error-nested-make.exp | 2 +- contrib/bmake/unit-tests/jobs-error-nested.exp | 4 +- contrib/bmake/unit-tests/lint.mk | 4 +- contrib/bmake/unit-tests/moderrs.exp | 20 +- contrib/bmake/unit-tests/moderrs.mk | 6 +- contrib/bmake/unit-tests/opt-debug-file.mk | 4 +- contrib/bmake/unit-tests/opt-debug-jobs.mk | 4 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 6 +- contrib/bmake/unit-tests/opt-debug-loud.mk | 6 +- contrib/bmake/unit-tests/opt-debug-var.mk | 4 +- contrib/bmake/unit-tests/parse-var.mk | 6 +- contrib/bmake/unit-tests/recursive.exp | 4 +- contrib/bmake/unit-tests/recursive.mk | 15 +- contrib/bmake/unit-tests/sh-dots.mk | 6 +- contrib/bmake/unit-tests/sh-leading-hyphen.exp | 2 +- contrib/bmake/unit-tests/shell-sh.mk | 4 +- contrib/bmake/unit-tests/unexport.mk | 4 +- contrib/bmake/unit-tests/var-eval-short.mk | 4 +- contrib/bmake/unit-tests/var-op-append.mk | 33 +- contrib/bmake/unit-tests/var-op-assign.mk | 4 +- contrib/bmake/unit-tests/var-op-default.mk | 8 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/var-op-shell.mk | 20 +- contrib/bmake/unit-tests/var-readonly.exp | 3 + contrib/bmake/unit-tests/var-readonly.mk | 4 +- contrib/bmake/unit-tests/var-recursive.exp | 8 +- contrib/bmake/unit-tests/var-recursive.mk | 4 +- contrib/bmake/unit-tests/var-scope-cmdline.mk | 4 +- .../bmake/unit-tests/var-scope-local-legacy.exp | 2 +- contrib/bmake/unit-tests/var-scope-local-legacy.mk | 22 +- contrib/bmake/unit-tests/var-scope-local.exp | 4 +- contrib/bmake/unit-tests/var-scope-local.mk | 12 +- contrib/bmake/unit-tests/vardebug.exp | 20 +- contrib/bmake/unit-tests/vardebug.mk | 29 +- contrib/bmake/unit-tests/varmisc.exp | 5 +- contrib/bmake/unit-tests/varmisc.mk | 28 +- contrib/bmake/unit-tests/varmod-assign.exp | 32 + contrib/bmake/unit-tests/varmod-assign.mk | 71 ++- contrib/bmake/unit-tests/varmod-defined.exp | 2 +- contrib/bmake/unit-tests/varmod-defined.mk | 10 +- contrib/bmake/unit-tests/varmod-edge.exp | 2 +- contrib/bmake/unit-tests/varmod-edge.mk | 8 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 15 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 20 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 36 +- contrib/bmake/unit-tests/varmod-indirect.mk | 24 +- contrib/bmake/unit-tests/varmod-l-name-to-value.mk | 4 +- contrib/bmake/unit-tests/varmod-localtime.mk | 4 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 4 +- contrib/bmake/unit-tests/varmod-loop.mk | 6 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 20 +- contrib/bmake/unit-tests/varmod-match.exp | 33 +- contrib/bmake/unit-tests/varmod-match.mk | 317 ++++++---- contrib/bmake/unit-tests/varmod-mtime.exp | 16 +- contrib/bmake/unit-tests/varmod-mtime.mk | 45 +- contrib/bmake/unit-tests/varmod-order.exp | 6 +- contrib/bmake/unit-tests/varmod-range.exp | 21 +- contrib/bmake/unit-tests/varmod-range.mk | 26 +- contrib/bmake/unit-tests/varmod-subst-regex.mk | 57 +- contrib/bmake/unit-tests/varmod-subst.mk | 46 +- contrib/bmake/unit-tests/varmod-sysv.mk | 10 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 4 +- contrib/bmake/unit-tests/varmod-undefined.mk | 6 +- contrib/bmake/unit-tests/varmod.mk | 6 +- contrib/bmake/unit-tests/varname-dot-shell.exp | 10 +- contrib/bmake/unit-tests/varname-dot-suffixes.exp | 20 +- contrib/bmake/unit-tests/varname-dot-suffixes.mk | 19 +- contrib/bmake/unit-tests/varname-empty.exp | 24 +- contrib/bmake/unit-tests/varname-empty.mk | 4 +- .../varname-make_print_var_on_error-jobs.mk | 4 +- contrib/bmake/unit-tests/varname.mk | 4 +- contrib/bmake/unit-tests/varparse-dynamic.mk | 4 +- contrib/bmake/unit-tests/varparse-errors.exp | 28 +- contrib/bmake/unit-tests/varparse-errors.mk | 8 +- contrib/bmake/unit-tests/varparse-mod.mk | 6 +- contrib/bmake/unit-tests/varparse-undef-partial.mk | 13 +- contrib/bmake/util.c | 96 ++- contrib/bmake/var.c | 696 +++++++++------------ usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 9 +- 184 files changed, 2585 insertions(+), 2176 deletions(-) diff --cc contrib/bmake/job.c index 22e21192281b,21b119ed6865..21582bb918eb --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@@ -258,25 -257,7 +257,23 @@@ typedef struct ShellWriter } ShellWriter; +/* + * FreeBSD: traditionally .MAKE is not required to + * pass jobs queue to sub-makes. + * Use .MAKE.ALWAYS_PASS_JOB_QUEUE=no to disable. + */ +#define MAKE_ALWAYS_PASS_JOB_QUEUE "${.MAKE.ALWAYS_PASS_JOB_QUEUE:U}" +static bool Always_pass_job_queue = true; +/* + * FreeBSD: aborting entire parallel make isn't always + * desired. When doing tinderbox for example, failure of + * one architecture should not stop all. + * We still want to bail on interrupt though. + */ +#define MAKE_JOB_ERROR_TOKEN "${MAKE_JOB_ERROR_TOKEN:U}" +static bool Job_error_token = true; + - /* - * error handling variables - */ + /* error handling variables */ static int job_errors = 0; /* number of errors reported */ static enum { /* Why is the make aborting? */ ABORT_NONE, @@@ -1498,11 -1470,8 +1486,9 @@@ JobExec(Job *job, char **argv if (lseek(0, 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. - */ + /* Pass job token pipe to submakes. */ if (fcntl(tokenWaitJob.inPipe, F_SETFD, 0) == -1) execDie("clear close-on-exec", "tokenWaitJob.inPipe"); diff --cc contrib/bmake/mk/install-mk index b042f99671a8,357afd171e8c..357afd171e8c mode 100644,100755..100755 --- a/contrib/bmake/mk/install-mk +++ b/contrib/bmake/mk/install-mk diff --cc contrib/bmake/os.sh index 78b2de95a679,78b2de95a679..78b2de95a679 mode 100644,100755..100755 --- a/contrib/bmake/os.sh +++ b/contrib/bmake/os.sh diff --cc usr.bin/bmake/Makefile.config index c31d0790ed9e,000000000000..4062f175f763 mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@@ -1,27 -1,0 +1,27 @@@ +# 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?=20230909 ++_MAKE_VERSION?=20240108 + +prefix?= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= cc +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/config.h index af8b4c8e02ba,000000000000..b9e169fad867 mode 100644,000000..100644 --- a/usr.bin/bmake/config.h +++ b/usr.bin/bmake/config.h @@@ -1,445 -1,0 +1,445 @@@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Path of default shell */ +/* #undef DEFSHELL_CUSTOM */ + +/* Shell spec to use by default */ +/* #undef DEFSHELL_INDEX */ + +/* Path of default shell */ +/* #undef DEFSHELL_PATH */ + +/* Define to 1 if you have the header file. */ +#define HAVE_AR_H 1 + +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_SIGLIST 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `dirname' function. */ +#define HAVE_DIRNAME 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the `err' function. */ +#define HAVE_ERR 1 + +/* Define to 1 if you have the `errx' function. */ +#define HAVE_ERRX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getenv' function. */ +#define HAVE_GETENV 1 + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getwd' function. */ +#define HAVE_GETWD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `killpg' function. */ +#define HAVE_KILLPG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type `long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RANLIB_H 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setpgid' function. */ +#define HAVE_SETPGID 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `sigaddset' function. */ +#define HAVE_SIGADDSET 1 + +/* Define to 1 if you have the `sigpending' function. */ +#define HAVE_SIGPENDING 1 + +/* Define to 1 if you have the `sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 + +/* Define to 1 if you have the `sigsetmask' function. */ +#define HAVE_SIGSETMASK 1 + +/* Define to 1 if you have the `sigsuspend' function. */ +#define HAVE_SIGSUSPEND 1 + +/* Define to 1 if you have the `sigvec' function. */ +#define HAVE_SIGVEC 1 + +/* Define to 1 if the system has the type `sig_atomic_t'. */ +#define HAVE_SIG_ATOMIC_T 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `stresep' function. */ +/* #undef HAVE_STRESEP */ + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the `sysctl' function. */ +#define HAVE_SYSCTL 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if the system has the type `unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* Define to 1 if you have the `wait3' function. */ +#define HAVE_WAIT3 1 + +/* Define to 1 if you have the `wait4' function. */ +#define HAVE_WAIT4 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the `warn' function. */ +#define HAVE_WARN 1 + +/* Define to 1 if you have the `warnx' function. */ +#define HAVE_WARNX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* define if your compiler has __attribute__ */ +#define HAVE___ATTRIBUTE__ 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "sjg@NetBSD.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bmake" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "bmake 20230723" ++#define PACKAGE_STRING "bmake 20240101" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bmake" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "20230723" ++#define PACKAGE_VERSION "20240101" + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + +/* C99 function name */ +/* #undef __func__ */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int64_t */ + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define as a signed integer type capable of holding a process identifier. */ +/* #undef pid_t */ + +/* type that signal handlers can safely frob */ +/* #undef sig_atomic_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ diff --cc usr.bin/bmake/unit-tests/Makefile index c5cc7646efed,000000000000..cf6c85809b9c mode 100644,000000..100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@@ -1,885 -1,0 +1,886 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# - # $Id: Makefile,v 1.207 2023/09/09 16:44:03 sjg Exp $ ++# $Id: Makefile,v 1.210 2024/01/08 18:28:08 sjg Exp $ +# - # $NetBSD: Makefile,v 1.341 2023/09/09 16:41:04 sjg Exp $ ++# $NetBSD: Makefile,v 1.342 2024/01/07 02:07:44 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-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 *** 650 LINES SKIPPED *** From nobody Sun Jan 14 07:04: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 4TCR8w3dBZz57HNb; Sun, 14 Jan 2024 07:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCR8w2l6Kz4QhZ; Sun, 14 Jan 2024 07:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705215872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8aI5D5njvFgqhiwX2XOHEREQxsFHiANEvwFG/yZykYk=; b=bDLKX01ffI2txaAtoqz3riTbdptGYNzCQ36Ms/OVreWLV38sp8esaW4UbPX04pnjapppaN zJSzpuQ6k5QrqwHPos/oU5CFxAO68L8Efv6yW+bOuEfzBdMSCc8NkCc2ZSQfEX8P8FvWuX MCTujxK1RHYBopVFF+I9tgsqi+6cehVzXLOwG+I2wLOVnjzwM/TzHvXtiZJEYMuuzE2txa qQEZO+hrt8UTHaTyZjjLHDzrblFRPXHP+e2nEYZ6lt6YUdmNXRGubEvMnLqDTjwJGox9vn nEmryqei/2moC773lZlVP79rYVRuGdAZzZHxgUqjxSqtgmHyUV9DZMM0v/m0vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705215872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8aI5D5njvFgqhiwX2XOHEREQxsFHiANEvwFG/yZykYk=; b=mv9BOKjb2RCjVOU4PbqyD2DEOdHwSga54KQBWZ1CeKiG3I23h+2fPq5H2H8+bJ1ij8RXie aJsKNP3IrvUBd87R0o3RB4Cj7AqQZC4DX9eL3CtEEWCpVu6C488PNv8Kt9G/KROwb4DwN2 FgAgi8a0iw+BKli27TM4ATQFkFrt04BvKek2hMOkWPpWjsBm5g8G26J98YQ2NHaqcsNskX 7GZmy3oyxCILxLBsusF+0IHgPYtr0dBfZI4JAkheHlQdYoL02kf+g7MtE5Blq7YUhRgbjR hvQhzHdXGh1MiLYzZxQmSU/ngT7wKUGsvqJsq9mhHG3cr1EZl74y9t08DDPklw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705215872; a=rsa-sha256; cv=none; b=C8y9dM/nyambuiSh0Y3CjSbPdTcp9vmxz20hn1V7IRsGZJhawUo+ChC6qvCchJwvFsi3br 7Pwxr9TOyUnzG0QScLc7cAWDeqSLiqELoInDm6o5wownmNDS42VN7qdsozvQG+8TmLdBBw UpQNFedk3PKybkjMyXjX29OBSBNzEdn4lxqxfwJ9lTROexoVSRfgBn5bPZMmviE7V+N1SV L3NrasGD17Cg/w5jNTxWpuATRhmuIvtP6f0shwCorcogRYY+e/h+mqEpjRml+fgC+pH+gC ciUfm+QlFO9tA8gDOi4JIPWLZasYp1CD79JvtkH9MqLXrDPgQtrkW5UtJu0E5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TCR8w1nPpz13vs; Sun, 14 Jan 2024 07:04: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 40E74W37048782; Sun, 14 Jan 2024 07:04:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40E74Wht048779; Sun, 14 Jan 2024 07:04:32 GMT (envelope-from git) Date: Sun, 14 Jan 2024 07:04:32 GMT Message-Id: <202401140704.40E74Wht048779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 353e4c5a068d - main - uart(4): Honor hardware state of NS8250-class for tsw_busy List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 353e4c5a068d06b0d6dcfa9eb736ecb16e9eae45 Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=353e4c5a068d06b0d6dcfa9eb736ecb16e9eae45 commit 353e4c5a068d06b0d6dcfa9eb736ecb16e9eae45 Author: Marius Strobl AuthorDate: 2024-01-12 22:27:07 +0000 Commit: Marius Strobl CommitDate: 2024-01-14 07:03:59 +0000 uart(4): Honor hardware state of NS8250-class for tsw_busy In 9750d9e5, I brought the equivalent of the TS_BUSY flag back in a mostly hardware-agnostic way in order to fix tty_drain() and, thus, TIOCDRAIN for UARTs with TX FIFOs. This proved to be sufficient for fixing the regression reported. So in light of the release cycle of FreeBSD 10.3, I decided that this change was be good enough for the time being and opted to go with the smallest possible yet generic (for all UARTs driven by uart(4)) solution addressing the problem at hand. However, at least for the NS8250-class the above isn't a complete fix as these UARTs only trigger an interrupt when the TX FIFO became empty. At this point, there still can be an outstanding character left in the transmit shift register as indicated via the LSR. Thus, this change adds the 3rd (besides the tty(4) and generic uart(4) bits) part I had in my tree ever since, adding a uart_txbusy method to be queried in addition for tsw_busy and hooking it up as appropriate for the NS8250-class. As it turns out, the exact equivalent of this 3rd part later on was implemented for uftdi(4) in 9ad221a5. While at it, explain the rational behind the deliberately missing locking in uart_tty_busy() (also applying to the generic sc_txbusy testing already present). --- sys/arm/nvidia/tegra_uart.c | 3 ++- sys/dev/uart/uart_dev_ns8250.c | 14 +++++++++++++- sys/dev/uart/uart_dev_ns8250.h | 1 + sys/dev/uart/uart_dev_snps.c | 1 + sys/dev/uart/uart_dev_ti8250.c | 1 + sys/dev/uart/uart_if.m | 21 +++++++++++++++++++++ sys/dev/uart/uart_tty.c | 14 ++++++++++++-- 7 files changed, 51 insertions(+), 4 deletions(-) diff --git a/sys/arm/nvidia/tegra_uart.c b/sys/arm/nvidia/tegra_uart.c index e18b77ecc321..9c518997e85c 100644 --- a/sys/arm/nvidia/tegra_uart.c +++ b/sys/arm/nvidia/tegra_uart.c @@ -136,6 +136,7 @@ static kobj_method_t tegra_methods[] = { KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_txbusy, ns8250_bus_txbusy), KOBJMETHOD(uart_grab, tegra_uart_grab), KOBJMETHOD(uart_ungrab, tegra_uart_ungrab), KOBJMETHOD_END @@ -237,7 +238,7 @@ static device_method_t tegra_uart_bus_methods[] = { DEVMETHOD(device_probe, tegra_uart_probe), DEVMETHOD(device_attach, uart_bus_attach), DEVMETHOD(device_detach, tegra_uart_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t tegra_uart_driver = { diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 4f2f8f7753b9..f211084cb013 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -433,9 +433,10 @@ static kobj_method_t ns8250_methods[] = { KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_txbusy, ns8250_bus_txbusy), KOBJMETHOD(uart_grab, ns8250_bus_grab), KOBJMETHOD(uart_ungrab, ns8250_bus_ungrab), - { 0, 0 } + KOBJMETHOD_END }; struct uart_class uart_ns8250_class = { @@ -1070,6 +1071,17 @@ ns8250_bus_transmit(struct uart_softc *sc) return (0); } +bool +ns8250_bus_txbusy(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + if ((uart_getreg(bas, REG_LSR) & (LSR_TEMT | LSR_THRE)) != + (LSR_TEMT | LSR_THRE)) + return (true); + return (false); +} + void ns8250_bus_grab(struct uart_softc *sc) { diff --git a/sys/dev/uart/uart_dev_ns8250.h b/sys/dev/uart/uart_dev_ns8250.h index 357f4e7f80df..324ff72f6e5d 100644 --- a/sys/dev/uart/uart_dev_ns8250.h +++ b/sys/dev/uart/uart_dev_ns8250.h @@ -57,6 +57,7 @@ int ns8250_bus_receive(struct uart_softc *); int ns8250_bus_setsig(struct uart_softc *, int); int ns8250_bus_transmit(struct uart_softc *); void ns8250_bus_grab(struct uart_softc *); +bool ns8250_bus_txbusy(struct uart_softc *); void ns8250_bus_ungrab(struct uart_softc *); #endif /* _DEV_UART_DEV_NS8250_H_ */ diff --git a/sys/dev/uart/uart_dev_snps.c b/sys/dev/uart/uart_dev_snps.c index c3ada581c7cd..b8b1f1f78142 100644 --- a/sys/dev/uart/uart_dev_snps.c +++ b/sys/dev/uart/uart_dev_snps.c @@ -101,6 +101,7 @@ static kobj_method_t snps_methods[] = { KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_txbusy, ns8250_bus_txbusy), KOBJMETHOD(uart_grab, ns8250_bus_grab), KOBJMETHOD(uart_ungrab, ns8250_bus_ungrab), KOBJMETHOD_END diff --git a/sys/dev/uart/uart_dev_ti8250.c b/sys/dev/uart/uart_dev_ti8250.c index 636f94872ce6..1c575defa5f4 100644 --- a/sys/dev/uart/uart_dev_ti8250.c +++ b/sys/dev/uart/uart_dev_ti8250.c @@ -105,6 +105,7 @@ static kobj_method_t ti8250_methods[] = { KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_txbusy, ns8250_bus_txbusy), KOBJMETHOD_END }; diff --git a/sys/dev/uart/uart_if.m b/sys/dev/uart/uart_if.m index 516e8b0811df..7efe63a10248 100644 --- a/sys/dev/uart/uart_if.m +++ b/sys/dev/uart/uart_if.m @@ -38,6 +38,17 @@ INTERFACE uart; +CODE { + static uart_txbusy_t uart_default_txbusy; + + static bool + uart_default_txbusy(struct uart_softc *this __unused) + { + + return (false); + } +}; + # attach() - attach hardware. # This method is called when the device is being attached. All resources # have been allocated. The transmit and receive buffers exist, but no @@ -141,6 +152,16 @@ METHOD int transmit { struct uart_softc *this; }; +# txbusy() - report if Tx is still busy. +# This method is called by the tty glue for reporting upward that output is +# still being drained despite sc_txbusy unset. Non-DEFAULT implementations +# allow for extra checks, i. e. beyond what can be determined in ipend(), +# that the Tx path actually is idle. For example, whether the last character +# has left the transmit shift register in addition to the FIFO being empty. +METHOD bool txbusy { + struct uart_softc *this; +} DEFAULT uart_default_txbusy; + # grab() - Up call from the console to the upper layers of the driver when # the kernel asks to grab the console. This is valid only for console # drivers. This method is responsible for transitioning the hardware diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 672203cc5935..faae077916f3 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -388,9 +388,19 @@ uart_tty_busy(struct tty *tp) sc = tty_softc(tp); if (sc == NULL || sc->sc_leaving) - return (FALSE); + return (false); - return (sc->sc_txbusy); + /* + * The tty locking is sufficient here; we may lose the race against + * uart_bus_ihand()/uart_intr() clearing sc_txbusy underneath us, in + * which case we will incorrectly but non-fatally report a busy Tx + * path upward. However, tty locking ensures that no additional output + * is enqueued before UART_TXBUSY() returns, which means that there + * are no Tx interrupts to be lost. + */ + if (sc->sc_txbusy) + return (true); + return (UART_TXBUSY(sc)); } static struct ttydevsw uart_tty_class = { From nobody Sun Jan 14 11:21: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 4TCXsG5MGQz57h9X; Sun, 14 Jan 2024 11:21: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 4TCXsG27y0z4svK; Sun, 14 Jan 2024 11:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705231282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YjuzXZUGJo+XFc+/f8gmiGxYQoNBLfOjOLz/DTjk8Y=; b=ueMQlSAojZW9LHQbHflZRxya2CXG2cJrK5cFE3+7a/YJy6LSKnVQssi5ZTTNNWA8mmUjll 8wTzKhmkAiysABmH9cTqn50bYd8AyUoT4+OcA5PQVAVDRGXrO97jHjZeysxM8pgDnObqsI G1bcZEzhJVF5POZoSBu9xqyr5gL2uM8HJxCR7GUMruaZUVr+0fc32zhrYMrhZNOOQH/z9m 15UuGFtcXyrRy9U5urBmTzKA55E7tdyvm0/B/W01XyTggJ6GCRdhdtm3BM3BsEW2oZJaEm AFdJIOznmgDLkz+0CTsZ3INRYjkeE+ZSFUt91OExvAC5wCDMgMJIAgEm8mqNQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705231282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YjuzXZUGJo+XFc+/f8gmiGxYQoNBLfOjOLz/DTjk8Y=; b=RTLkl+c6ZujGLG2dpwTbd6kE5FwxeyvLcr56+hdjEZnZyT2aTx3hxNCJbftktsRVFmyVaj 9d5cvSMa4BsU6aFrqTEssFKyYB10JSde6FjHo/4lRaiHTscvV8fsQW+10cEZqft7TFJ3Dj GLhnAjvC+9wrhXsTp+RMqNvgtozl5IKncpODdemn9iFAJ2R6SpJS5yiYmwr8cYb6NEzhzs b8bTu1yIWy7wb7EfqA760GnEcRATre6f1hiWHSD/RFFK1oSH+2HuucNvujHzdPiQjJjRZD GEVYWWo59lVkY7/3SL4/8n5mlVL45zYriLgbKjym9aHuJS3n11fun6EVremUig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705231282; a=rsa-sha256; cv=none; b=mrm9/UzIY8AeEEezPc3mek3MI9bvW8AdhQoU9lJ9q6Qro7Bm1vcgFFAe7ecO9+qkIcXsaL LLCGHlsbfu1vboTVH7/LlJmtuQoAA+2aQYUmon8kfl9voXvrB4ns7jsXyRWylve1xwyspG qqf5l/ryRslOiDPCfazlvlWagRmnfmtHxx4Q3O+Z8XoDOJUtKf9NuQPqkiZJRcxfx4aiUc Kvvdo+ePMey1bByktUsQwKpzSyHEb+JZQizKvzEGJRzvEVxbIqgdjiOS7YGkUAdBUEMrM+ oOcl+OW1TByxZClgxn/9y1d1IQJieNMl6RfxGljLPn2cDdxDpz5FMRsAMGINIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TCXsG1Cw0z1BXl; Sun, 14 Jan 2024 11:21: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 40EBLMbA083384; Sun, 14 Jan 2024 11:21:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EBLMpO083381; Sun, 14 Jan 2024 11:21:22 GMT (envelope-from git) Date: Sun, 14 Jan 2024 11:21:22 GMT Message-Id: <202401141121.40EBLMpO083381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Grehan Subject: git: 0c243cd4a367 - main - Fix issue with Linux guest XHCI tablet probing. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grehan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c243cd4a3671bf728f33378ac593c08d8367bc2 Auto-Submitted: auto-generated The branch main has been updated by grehan: URL: https://cgit.FreeBSD.org/src/commit/?id=0c243cd4a3671bf728f33378ac593c08d8367bc2 commit 0c243cd4a3671bf728f33378ac593c08d8367bc2 Author: Peter Grehan AuthorDate: 2024-01-14 11:27:12 +0000 Commit: Peter Grehan CommitDate: 2024-01-14 11:38:55 +0000 Fix issue with Linux guest XHCI tablet probing. The USB3 spec mandates that the device-descriptor max packet size be 512 bytes, which requires a field size of 9 since it is a power-of-2. Linux kernels recently started validating this field, resulting in the table not being probed and the cursor not working in bhyve VNC. Reviewed by: corvink PR: 275760 MFC after: 1 week --- usr.sbin/bhyve/usb_mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/usb_mouse.c b/usr.sbin/bhyve/usb_mouse.c index 80f79980a98e..a37941c0cd9d 100644 --- a/usr.sbin/bhyve/usb_mouse.c +++ b/usr.sbin/bhyve/usb_mouse.c @@ -154,7 +154,7 @@ static struct usb_device_descriptor umouse_dev_desc = { .bLength = sizeof(umouse_dev_desc), .bDescriptorType = UDESC_DEVICE, MSETW(.bcdUSB, UD_USB_3_0), - .bMaxPacketSize = 8, /* max packet size */ + .bMaxPacketSize = 9, /* max pkt size, 2^9 = 512 */ MSETW(.idVendor, 0xFB5D), /* vendor */ MSETW(.idProduct, 0x0001), /* product */ MSETW(.bcdDevice, 0), /* device version */ From nobody Sun Jan 14 13:50: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 4TCc9G0V95z56D0T; Sun, 14 Jan 2024 13:50: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 4TCc9G00Rcz58Hd; Sun, 14 Jan 2024 13:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705240226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3XPYWwoic4U/UrVWgNXuKwUv9wKs3HrOxBzyF+CU5c=; b=SFAIfA2VdhQkcDigy63G3GZHMzYVclv3YrU7ThO62AET4JpKAhrNmLSENhEYD3/Le98duG P9v+8pb/92xl7MI1kSnRRoxiFHGwRvKfosH3l6ijoeCCLeiXxLJEx8zxh3wawasheyWyS3 lTY8MJcijyqrRXb9uOPQ0faIBVq87E5xgpQRvQNcNtKOTdjiUrMuxBCq4macUhLJkPATLa NRmuf8ppUDOrFgjIcMwME1sphKZsJ70kpH5XIdP6unQbPdajTaCxqHdtqWbq08L993s1SI nvx6yE6JOxStIWRjr1O7F9rtgIUVEUM8akXCPibLiSvLyNppKyUpbuAv5Hx2Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705240226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3XPYWwoic4U/UrVWgNXuKwUv9wKs3HrOxBzyF+CU5c=; b=QUYrBLAnrPb+Us/9Xl8/UAF/C8WSCb+33SKbr8D70bVOcAunB9DEzsgU1ShNqcXDiX4J1Z /fXX2xqWcvTFODwh3V/onnoAIXvRHwxvlrc/XccY/j2JkFyqJE2YkrQmObqu5CunqDE9r+ hesanmQweBnJcH9Zt1zTiLQVtG4jN+XKbBv7aZqPkEOhF7s6T0evBCVHCpwEOwOA/OzJ30 TLWFROJuIp9WyTHjiOH3AkZ95iS/VFczkuvIkz3UzgPNmU34TlKzpVa6FUEjzQXaDuwkZw liz5MNrfkZ34YdJUZCYs0A3p8QoNbCSGuVPhfwud7r3KGjqxOjMrF1c9GKYn9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705240226; a=rsa-sha256; cv=none; b=iMO5Gh8qUaTpC/95Arv6kr+cr8P0aYwvjqClF+NzeAs25L9yVNZHmMX5xyxKsK0znnu8vG 5yc9132mOPhIAKny8sO/hnUK+vVl5BpB6htlhphqja3+0wbZGlXvO/HYW/cEG8IW+wlxJq xiyTBg/94cUg49kYyGMq7YaOzB5NbKLaQsEzc1nIu1dc1pi2HflGR7DsWqMajvjoa9CFPw VsDZ9l75rL7WsTVQM1hsyU2kw6gLUWt30pFn+W5oaPkKIdpasaPnK1jMEn5jc3YVuCNcDr JfgShqNOlBDIXAbgZQoCLIJSNm6/EJObPsdeJ1o81gf8d8c88QnTYjC5ceu4yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TCc9F6B9czGMM; Sun, 14 Jan 2024 13:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40EDoP9n027542; Sun, 14 Jan 2024 13:50:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EDoPZG027539; Sun, 14 Jan 2024 13:50:25 GMT (envelope-from git) Date: Sun, 14 Jan 2024 13:50:25 GMT Message-Id: <202401141350.40EDoPZG027539@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: 256fe4a15484 - main - tcpsso: fix TIME_WAIT description in man-page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 256fe4a15484d72452ada288f5a3d9c9672b2d57 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=256fe4a15484d72452ada288f5a3d9c9672b2d57 commit 256fe4a15484d72452ada288f5a3d9c9672b2d57 Author: Michael Tuexen AuthorDate: 2024-01-14 13:45:43 +0000 Commit: Michael Tuexen CommitDate: 2024-01-14 13:45:43 +0000 tcpsso: fix TIME_WAIT description in man-page Reviewed by: manpages(pauamma_gundo.com) Fixes: e179d9739b14 ("tcpsso: support TIME_WAIT state") MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43424 --- usr.sbin/tcpsso/tcpsso.8 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/usr.sbin/tcpsso/tcpsso.8 b/usr.sbin/tcpsso/tcpsso.8 index c06cd8adb25f..37968c8afa54 100644 --- a/usr.sbin/tcpsso/tcpsso.8 +++ b/usr.sbin/tcpsso/tcpsso.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 6, 2024 +.Dd January 14, 2024 .Dt TCPSSO 8 .Os .Sh NAME @@ -191,10 +191,8 @@ and .Fl s Ar state are specified, .Nm -will apply the socket option to all TCP endpoints not being in the -state -.Dv TIME_WAIT -and using the congestion control algorithm +will apply the socket option to all TCP endpoints using the congestion +control algorithm .Ar cc-algo , being in the state .Ar state , From nobody Sun Jan 14 16:32: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 4TCgmT0D2Jz56ZyW; Sun, 14 Jan 2024 16:32: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 4TCgmS5Vn7z4HH7; Sun, 14 Jan 2024 16:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705249960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=68tAvJxlj2jblFMU4cqxmD86idHUQ+4A7t0BpxZ+Xnk=; b=NWSFDIhy8W4vmA4is/ozqZ3ECdciVr5qno/e2HTS/g1D8lvh2Nqt0Mb8/UZhRfMpBY+zhK DZpmfhYX+bE1Qx4oAMyTRluWSpvOZ42hExied3jDHyFXXzMMS8t8lfhcfFXfQaJXa2DxhO 8dv4wmCYNq4+VcVxmtCApV9AIS7OUwm3OSa85n63pyEo1zCVFfkmYe3a2KAmu+St34mKml YVkOq4A/3DCTlbpWJu0K83fZujyHT6I1rKhoJJ0LYbdwK8Y1bLiJIqlWkOT9+OAOHH2F8W c/Aj36t1JWdnUH7FwbzA7W3eQVMGziylRQPOZQZN0IrRe6EmxFgosFwoS0ReWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705249960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=68tAvJxlj2jblFMU4cqxmD86idHUQ+4A7t0BpxZ+Xnk=; b=j9sR20rQtgGX/80fBnm9FK1HPQ1nuyWeFPo5lfs4iaUg7l3NpeefD/05VnEmDdEZMndhMP fF5BBKiCBZPZeOlVv2AvyyW12jWKl+QzB3g5gYwx4ARrSmYHX+IPOnd53DOrEFKg5ZA/Hh WOpBYnAKrhONHC4RIehTXCOe9p8ISwm06ImsPpfXDR4ew8SKZpuW2hQlpAGm2fUKmV9lNY 2Pkh5FvA55u2yXNRuSqFZOnvT16vzchL12UJ6IPIqxT3WvsX2YoDk+S/c5GxmAp1hiaQlN kyWW1c6x95UpaJgCwO/nDKLl0RtTC1UcU1okw67/pH5dZn/4XPLmHtQU/35tYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705249960; a=rsa-sha256; cv=none; b=TW69H3GC1nD28T8cd2yHKo596DqpYp7FDe7tSGOl6dWQAI8zr/Q+Hw+Qma9JGCjwjOItUy zvT16Y7W6dp3NRC7KVkam3316Y7q85s2Yi9WaD8YrYWqdk5zoSKRJZVVMhm2z6mc4CNQFj oPAVKLVeyRAKNf5Nmpe+TD0h3+O1gbs7OQjqSnDeoU1KeYwUunWpXraH2K9R/CMeKWGW8P +2LiavZNRIDDzAWANXVqBD7tKU0+lHQcMGXZToU5td6NMMH8BESZl0yrjLSY6hdgUQ+tfm WSEACbOyuWxZIWuGJk5u9AQeMSJ3Uog9LtIfUlGSwSkctECj/lT8oboptwJP+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 4TCgmS4Z0QzKyh; Sun, 14 Jan 2024 16:32: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 40EGWexU002942; Sun, 14 Jan 2024 16:32:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EGWe96002939; Sun, 14 Jan 2024 16:32:40 GMT (envelope-from git) Date: Sun, 14 Jan 2024 16:32:40 GMT Message-Id: <202401141632.40EGWe96002939@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: 751c323b829c - main - sc: Use current console rather than first console for mouse input List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 751c323b829c36ca63a123a02a51f971ca3bd409 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=751c323b829c36ca63a123a02a51f971ca3bd409 commit 751c323b829c36ca63a123a02a51f971ca3bd409 Author: Vadim Ushakov AuthorDate: 2024-01-14 16:22:17 +0000 Commit: Warner Losh CommitDate: 2024-01-14 16:24:41 +0000 sc: Use current console rather than first console for mouse input When mouse reporting feature is turned on (control sequence ^[[?1000h), syscons sends valid mouse coordinates only for ttyv0. Applications running on other ttys always (erroneously) get mouse coordinates from the first tty, not from tty they actually run. Steps to reproduce: 1. On ttyv0, run any application that uses mouse reporting feature. Make some clicks. The feature works properly. 2. Switch to another ttyv, run the application. The application receives mouse click events, but mouse position reported by syscons to the application does not match with the actual mouse position on the screen. Expected result: Reported mouse position should match with visible mouse position. PR: 193339 Reviewed by: imp --- sys/dev/syscons/scmouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index f23f412cc00d..b0c7fcc9d147 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -798,7 +798,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) cur_scp->status &= ~MOUSE_HIDDEN; if (cur_scp->mouse_level > 0) { - sc_mouse_input(scp, mouse); + sc_mouse_input(cur_scp, mouse); break; } @@ -859,7 +859,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) cur_scp->status &= ~MOUSE_HIDDEN; if (cur_scp->mouse_level > 0) { - sc_mouse_input(scp, mouse); + sc_mouse_input(cur_scp, mouse); break; } From nobody Sun Jan 14 21:22: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 4TCpC41ZHLz579Kx; Sun, 14 Jan 2024 21:22: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 4TCpC33cn4z47jh; Sun, 14 Jan 2024 21:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705267359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+1C28rOfFAuLD5uj2tZwjW47QtCo2E6WiQ53s9MxvA=; b=aramRFYyjBaadUj4U+H3e78NU5VGEoHY29E2russit9Hcyfpk12CmqNtiA3RlOc2s5Lb9V c6yBQ2Jwjl1s0lz1L5IINKkK0o+GN/Z5Nm93k/I13j4wh5SAQc4Sytl7LAmZR7FBSsHL14 mDKp3+e8fo2jZF0bZTu66ZLHmszuKxSSJVLbP6VnZgA568FIlubZqSXAKCZL8euAwwLHRD saFM6tF0/2SKP6z8QzO/mhW22qmJDR1rJ+EEX5wTjMoVOr3yEtQiZqi/7JeTusuojNMSNm 2AxJyhLCe4Tr1ZSO30l7iq58ZcEKvWl9hF8zlwtJ7LGUS8g+4kotNB5pJYRFUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705267359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+1C28rOfFAuLD5uj2tZwjW47QtCo2E6WiQ53s9MxvA=; b=tqxBdAbkA6mOxwEAnvVDMl2+MBhzo6IQ7PET6qFVXtw/BUg1/1M/ROGWKvaR12PoIAVk2r ntNSgZEa6WTre+cHcSj+0itwGUzeuLTNILGmtCGm2oWEWUeKVzZLQrCSyOVlHE79ksYivP tYi9jD0ghcc2OXQsMADLFa24HLJ/EASkjUU3DIt9or3pM4E8CJpg3QggE531oYVYZauhcV zosBxC0zr4OfLrQE+4etAK2F4Aby0ye+NzBRWKUm54THRRPOI/eXSv3Pm5sPghLNH0ppMW fzYU8Cp2pvdjPKHnPRRNHdMXUCOgT2Dt10khvXNt9BF/orDgDJAXbk7urPGrlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705267359; a=rsa-sha256; cv=none; b=NGhznGXMoPhgmy2ABSqT+Zd0lOwOUWdOAvhFYPIr7PtNigKvbRYo8h3o0HMYx7UJFxTE1j 5D8Ilaj3UHMEYniDU6/j9LE2z7oeviP414XlGJJdEmpKYsGiouxOTGBRJiyYYPGp10jcEv bh2mK0wUaa2tAkhYb8tfxZv4f5IWSOm07HwT4WUYytE8U/tff47jvSJHT9C3X7V83JYM2+ q3prGYTRrsxjuvNt0w+sZ5Kj/xf2OsuQeu6PSwZNCXM3EtRIaS0zTFSAK6ieKOs3L/+xTo iIXSmR2sD5BwC8A9R9VYcWTTWL1EsvQ/gaNvmM5x/uip/cPtgDv//I3puGJZog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TCpC320Z0zVGd; Sun, 14 Jan 2024 21:22: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 40ELMcWr091089; Sun, 14 Jan 2024 21:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELMcUK091086; Sun, 14 Jan 2024 21:22:38 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:22:38 GMT Message-Id: <202401142122.40ELMcUK091086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 03e8d25b1f92 - main - geom_map(4): Garbage collect disconnected driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03e8d25b1f9218dcd52d13819dda14dbbaf622b7 Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=03e8d25b1f9218dcd52d13819dda14dbbaf622b7 commit 03e8d25b1f9218dcd52d13819dda14dbbaf622b7 Author: Marius Strobl AuthorDate: 2024-01-14 08:31:26 +0000 Commit: Marius Strobl CommitDate: 2024-01-14 21:22:21 +0000 geom_map(4): Garbage collect disconnected driver The last MIPS user has been removed in c09981f1 2 years ago, the last ARM one in 58d5c511 even 5.5 years ago. --- ObsoleteFiles.inc | 3 + share/man/man4/Makefile | 1 - share/man/man4/geom_map.4 | 209 -------------------- sys/conf/files | 1 - sys/geom/geom_map.c | 392 ------------------------------------- sys/modules/geom/geom_map/Makefile | 7 - 6 files changed, 3 insertions(+), 610 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 7265d0a19741..a6c15187e847 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240114: Removal of geom_map(4) +OLD_FILES+=usr/share/man/man4/geom_map.4 + # 20240112: remove pmap_init2() OLD_FILES+=usr/share/man/man9/pmap_init2.9.gz diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index e1191eedebe5..978ec6887f85 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -170,7 +170,6 @@ MAN= aac.4 \ genetlink.4 \ geom.4 \ geom_linux_lvm.4 \ - geom_map.4 \ geom_uzip.4 \ gif.4 \ ${_gve.4} \ diff --git a/share/man/man4/geom_map.4 b/share/man/man4/geom_map.4 deleted file mode 100644 index 5ae49500d6a9..000000000000 --- a/share/man/man4/geom_map.4 +++ /dev/null @@ -1,209 +0,0 @@ -.\" -.\" Copyright (c) 2011 Aleksandr Rybalko -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.Dd June 8, 2015 -.Dt GEOM_MAP 4 -.Os -.Sh NAME -.Nm geom_map -.Nd "GEOM module that maps defined items as separate partitions" -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following line in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "options geom_map" -.Ed -.Sh DESCRIPTION -The -.Nm -framework provides support for mapping defined parts of the media. -Basically it is helpful for embedded devices where in the one continuous -flash are loader, kernel and rootfs parts. -.Nm -allows making them available as separate parts and protects the loader from -being overwritten. -.Pp -At boot time -.Nm -partitions are listed (only with bootverbose) as: -.Bd -literal -offset indent -MAP: 0x30000, data=0x30000 "/dev/map/bootloader" -MAP: 30000x10000, data=0x10000 "/dev/map/factory" -MAP: 40000x7a0000, data=0x7a0000 "/dev/map/upgrade" -MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 -MAP: 40000x110000, data=0x110000 "/dev/map/kernel" -MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 -MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" -MAP: 7e0000x20000, data=0x20000 "/dev/map/config" -.Ed -.Pp -The current -.Nm -configuration can be accessed with the following -.Xr sysctl 8 -nodes: -.Va kern.geom.conftxt , kern.geom.confxml , -and -.Va kern.geom.confdot -or by using -.Dq Li "geom map list" . -.Bd -literal -offset indent -# sysctl -n kern.geom.conftxt -0 MD md0 10485760 512 u 0 s 512 f 0 fs 0 l 10485760 t malloc -0 DISK cfid0 8388608 4 hd 0 sc 0 -1 MAP map/config 131072 4 i 5 o 8257536 entry 0 dsize 131072 -1 MAP map/rootfs 6881280 4 i 4 o 1376256 entry 0 dsize 6881280 -2 UZIP map/rootfs.uzip 18677760 512 -1 MAP map/kernel 1114112 4 i 3 o 262144 entry 0 dsize 1114112 -1 MAP map/upgrade 7995392 4 i 2 o 262144 entry 0 dsize 7995392 -1 MAP map/factory 65536 4 i 1 o 196608 entry 0 dsize 65536 -1 MAP map/bootloader 196608 4 i 0 o 0 entry 0 dsize 196608 -.Ed -.Pp -Driver configuration can be done in -.Xr device.hints 5 . -List of used parameters: -.Bl -tag -width indent -.It Va at -select media to attach -.It Va name -name of partition (will create device -.Pa /dev/map/ Ns Ar that_name ) -.It Va start -offset from the beginning of the parent media to start of the mapped partition. -This field can also have a special value -.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey , -where: -.Bl -tag -width indent -.It Ar searchstart -offset from the beginning of the parent media where search will be started -.It Ar searchstep -value of the increment used while searching for the partition boundary markers -.It Ar searchkey -key which will be used to find partition boundary markers. -The wildcard -.Ql .\& -can be used to match any character on that position -.El -.It Va end -offset from the beginning of the parent media to the end of the mapped partition. -This field can also have the special value -.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey , -as described above. -.It Va offset -offset where the data of the mapped partition begins -.El -.Pp -Each record contains the start address (in bytes) from the media begin, size -(in bytes), offset where the data of mapped partition begins, and the name of -new device. -.Bd -literal -offset indent -MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" -.Ed -.Bd -literal -00150000 - start address -00690000 - size -00000000 - data begin from zero offset -00690000 - data size -"map/rootfs" - new media will be accessible via /dev/map/rootfs dev. -.Ed -.Sh EXAMPLES -If we need to implement layout shown above, we need to define the following -hints: -.Bd -literal -offset indent -hint.map.0.at="cfid0" -hint.map.0.start=0x00000000 -hint.map.0.end=0x00030000 -hint.map.0.name="bootloader" -hint.map.0.readonly=1 -.Ed -.Pp -This defines -.Pa /dev/map/bootloader -at disk -.Pa cfid0 -starting at -.Li 0x00000000 -and ending at -.Li 0x00030000 , -it is also marked as readonly. -.Bd -literal -offset indent -hint.map.1.at="cfid0" -hint.map.1.start=0x00030000 -hint.map.1.end=0x00040000 -hint.map.1.name="factory" - -hint.map.2.at="cfid0" -hint.map.2.start=0x00040000 -hint.map.2.end=0x007e0000 -hint.map.2.name="upgrade" - -hint.map.3.at="cfid0" -hint.map.3.name="kernel" -hint.map.3.start=0x00040000 -hint.map.3.end="search:0x00100000:0x10000:.!/bin/sh" -.Ed -.Pp -This defines -.Pa /dev/map/kernel -at disk -.Pa cfid0 -starting at -.Li 0x00040000 , -but the end position must be searched by finding the key -.Dq Li ".!/bin/sh" , -from offset -.Li 0x00100000 -to the end of media with step -.Li 0x10000 . -The real marker in this case is -.Dq Li "#!/bin/sh" , -but -.Ql # -terminates the line when the hints file is parsed, so we need to use wildcard -.Ql .\& -instead of -.Ql # . -.Bd -literal -offset indent -hint.map.4.at="cfid0" -hint.map.4.name="rootfs" -hint.map.4.start="search:0x00100000:0x10000:.!/bin/sh" -hint.map.4.end=0x007e0000 - -hint.map.5.at="cfid0" -hint.map.5.start=0x007e0000 -hint.map.5.end=0x00800000 -hint.map.5.name="config" -.Ed -.Sh SEE ALSO -.Xr geom 4 , -.Xr geom 8 , -.Xr sysctl 8 -.Sh AUTHORS -The -.Nm -driver was written by -.An Aleksandr Rybalko Aq Mt ray@ddteam.net . diff --git a/sys/conf/files b/sys/conf/files index 6a089de5bb98..1069079b162a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3618,7 +3618,6 @@ geom/geom_event.c standard geom/geom_flashmap.c optional fdt cfi | fdt mx25l | mmcsd | fdt n25q | fdt at45d geom/geom_io.c standard geom/geom_kern.c standard -geom/geom_map.c optional geom_map geom/geom_redboot.c optional geom_redboot geom/geom_slice.c standard geom/geom_subr.c standard diff --git a/sys/geom/geom_map.c b/sys/geom/geom_map.c deleted file mode 100644 index 65c313fcfa0c..000000000000 --- a/sys/geom/geom_map.c +++ /dev/null @@ -1,392 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2010-2011 Aleksandr Rybalko - * based on geom_redboot.c - * Copyright (c) 2009 Sam Leffler, Errno Consulting - * 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, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any - * redistribution must be conditioned upon including a substantially - * similar Disclaimer requirement for further binary redistribution. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define MAP_CLASS_NAME "MAP" -#define MAP_MAXSLICE 64 -#define MAP_MAX_MARKER_LEN 64 - -struct g_map_softc { - off_t offset[MAP_MAXSLICE]; /* offset in flash */ - off_t size[MAP_MAXSLICE]; /* image size in bytes */ - off_t entry[MAP_MAXSLICE]; - off_t dsize[MAP_MAXSLICE]; - uint8_t readonly[MAP_MAXSLICE]; - g_access_t *parent_access; -}; - -static int -g_map_access(struct g_provider *pp, int dread, int dwrite, int dexcl) -{ - struct g_geom *gp; - struct g_slicer *gsp; - struct g_map_softc *sc; - - gp = pp->geom; - gsp = gp->softc; - sc = gsp->softc; - - if (dwrite > 0 && sc->readonly[pp->index]) - return (EPERM); - - return (sc->parent_access(pp, dread, dwrite, dexcl)); -} - -static int -g_map_start(struct bio *bp) -{ - struct g_provider *pp; - struct g_geom *gp; - struct g_map_softc *sc; - struct g_slicer *gsp; - int idx; - - pp = bp->bio_to; - idx = pp->index; - gp = pp->geom; - gsp = gp->softc; - sc = gsp->softc; - - if (bp->bio_cmd == BIO_GETATTR) { - if (g_handleattr_int(bp, MAP_CLASS_NAME "::entry", - sc->entry[idx])) { - return (1); - } - if (g_handleattr_int(bp, MAP_CLASS_NAME "::dsize", - sc->dsize[idx])) { - return (1); - } - } - - return (0); -} - -static void -g_map_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp) -{ - struct g_map_softc *sc; - struct g_slicer *gsp; - - gsp = gp->softc; - sc = gsp->softc; - g_slice_dumpconf(sb, indent, gp, cp, pp); - if (pp != NULL) { - if (indent == NULL) { - sbuf_printf(sb, " entry %jd", (intmax_t)sc->entry[pp->index]); - sbuf_printf(sb, " dsize %jd", (intmax_t)sc->dsize[pp->index]); - } else { - sbuf_printf(sb, "%s%jd\n", indent, - (intmax_t)sc->entry[pp->index]); - sbuf_printf(sb, "%s%jd\n", indent, - (intmax_t)sc->dsize[pp->index]); - } - } -} - -static int -find_marker(struct g_consumer *cp, const char *line, off_t *offset) -{ - off_t search_start, search_offset, search_step; - size_t sectorsize; - uint8_t *buf; - char *op, key[MAP_MAX_MARKER_LEN], search_key[MAP_MAX_MARKER_LEN]; - int ret, c; - - /* Try convert to numeric first */ - *offset = strtouq(line, &op, 0); - if (*op == '\0') - return (0); - - bzero(search_key, MAP_MAX_MARKER_LEN); - sectorsize = cp->provider->sectorsize; - -#ifdef __LP64__ - ret = sscanf(line, "search:%li:%li:%63c", - &search_start, &search_step, search_key); -#else - ret = sscanf(line, "search:%qi:%qi:%63c", - &search_start, &search_step, search_key); -#endif - if (ret < 3) - return (1); - - if (bootverbose) { - printf("MAP: search %s for key \"%s\" from 0x%jx, step 0x%jx\n", - cp->geom->name, search_key, (intmax_t)search_start, (intmax_t)search_step); - } - - /* error if search_key is empty */ - if (strlen(search_key) < 1) - return (1); - - /* sscanf successful, and we start marker search */ - for (search_offset = search_start; - search_offset < cp->provider->mediasize; - search_offset += search_step) { - g_topology_unlock(); - buf = g_read_data(cp, rounddown(search_offset, sectorsize), - roundup(strlen(search_key), sectorsize), NULL); - g_topology_lock(); - - /* - * Don't bother doing the rest if buf==NULL; eg derefencing - * to assemble 'key'. - */ - if (buf == NULL) - continue; - - /* Wildcard, replace '.' with byte from data */ - /* TODO: add support wildcard escape '\.' */ - - strncpy(key, search_key, MAP_MAX_MARKER_LEN); - - for (c = 0; c < MAP_MAX_MARKER_LEN && key[c]; c++) { - if (key[c] == '.') { - key[c] = ((char *)(buf + - (search_offset % sectorsize)))[c]; - } - } - - /* Assume buf != NULL here */ - if (memcmp(buf + search_offset % sectorsize, - key, strlen(search_key)) == 0) { - g_free(buf); - /* Marker found, so return their offset */ - *offset = search_offset; - return (0); - } - g_free(buf); - } - - /* Marker not found */ - return (1); -} - -static int -g_map_parse_part(struct g_class *mp, struct g_provider *pp, - struct g_consumer *cp, struct g_geom *gp, struct g_map_softc *sc, int i) -{ - const char *value, *name; - char *op; - off_t start, end, offset, size, dsize; - int readonly, ret; - - /* hint.map.0.at="cfid0" - bind to cfid0 media */ - if (resource_string_value("map", i, "at", &value) != 0) - return (1); - - /* Check if this correct provider */ - if (strcmp(pp->name, value) != 0) - return (1); - - /* - * hint.map.0.name="uboot" - name of partition, will be available - * as "/dev/map/uboot" - */ - if (resource_string_value("map", i, "name", &name) != 0) { - if (bootverbose) - printf("MAP: hint.map.%d has no name\n", i); - return (1); - } - - /* - * hint.map.0.start="0x00010000" - partition start at 0x00010000 - * or hint.map.0.start="search:0x00010000:0x200:marker text" - - * search for text "marker text", begin at 0x10000, step 0x200 - * until we found marker or end of media reached - */ - if (resource_string_value("map", i, "start", &value) != 0) { - if (bootverbose) - printf("MAP: \"%s\" has no start value\n", name); - return (1); - } - if (find_marker(cp, value, &start) != 0) { - if (bootverbose) { - printf("MAP: \"%s\" can't parse/use start value\n", - name); - } - return (1); - } - - /* like "start" */ - if (resource_string_value("map", i, "end", &value) != 0) { - if (bootverbose) - printf("MAP: \"%s\" has no end value\n", name); - return (1); - } - if (find_marker(cp, value, &end) != 0) { - if (bootverbose) { - printf("MAP: \"%s\" can't parse/use end value\n", - name); - } - return (1); - } - - /* variable readonly optional, disable write access */ - if (resource_int_value("map", i, "readonly", &readonly) != 0) - readonly = 0; - - /* offset of partition data, from partition begin */ - if (resource_string_value("map", i, "offset", &value) == 0) { - offset = strtouq(value, &op, 0); - if (*op != '\0') { - if (bootverbose) { - printf("MAP: \"%s\" can't parse offset\n", - name); - } - return (1); - } - } else { - offset = 0; - } - - /* partition data size */ - if (resource_string_value("map", i, "dsize", &value) == 0) { - dsize = strtouq(value, &op, 0); - if (*op != '\0') { - if (bootverbose) { - printf("MAP: \"%s\" can't parse dsize\n", - name); - } - return (1); - } - } else { - dsize = 0; - } - - size = end - start; - if (dsize == 0) - dsize = size - offset; - - /* end is 0 or size is 0, No MAP - so next */ - if (end < start) { - if (bootverbose) { - printf("MAP: \"%s\", \"end\" less than " - "\"start\"\n", name); - } - return (1); - } - - if (offset + dsize > size) { - if (bootverbose) { - printf("MAP: \"%s\", \"dsize\" bigger than " - "partition - offset\n", name); - } - return (1); - } - - ret = g_slice_config(gp, i, G_SLICE_CONFIG_SET, start + offset, - dsize, cp->provider->sectorsize, "map/%s", name); - if (ret != 0) { - if (bootverbose) { - printf("MAP: g_slice_config returns %d for \"%s\"\n", - ret, name); - } - return (1); - } - - if (bootverbose) { - printf("MAP: %s: %jxx%jx, data=%jxx%jx " - "\"/dev/map/%s\"\n", - cp->geom->name, (intmax_t)start, (intmax_t)size, (intmax_t)offset, - (intmax_t)dsize, name); - } - - sc->offset[i] = start; - sc->size[i] = size; - sc->entry[i] = offset; - sc->dsize[i] = dsize; - sc->readonly[i] = readonly ? 1 : 0; - - return (0); -} - -static struct g_geom * -g_map_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) -{ - struct g_map_softc *sc; - struct g_consumer *cp; - struct g_geom *gp; - int i; - - g_trace(G_T_TOPOLOGY, "map_taste(%s,%s)", mp->name, pp->name); - g_topology_assert(); - if (strcmp(pp->geom->class->name, MAP_CLASS_NAME) == 0) - return (NULL); - - gp = g_slice_new(mp, MAP_MAXSLICE, pp, &cp, &sc, sizeof(*sc), - g_map_start); - if (gp == NULL) - return (NULL); - - /* interpose our access method */ - sc->parent_access = gp->access; - gp->access = g_map_access; - - for (i = 0; i < MAP_MAXSLICE; i++) - g_map_parse_part(mp, pp, cp, gp, sc, i); - - g_access(cp, -1, 0, 0); - if (LIST_EMPTY(&gp->provider)) { - if (bootverbose) - printf("MAP: No valid partition found at %s\n", pp->name); - g_slice_spoiled(cp); - return (NULL); - } - return (gp); -} - -static struct g_class g_map_class = { - .name = MAP_CLASS_NAME, - .version = G_VERSION, - .taste = g_map_taste, - .dumpconf = g_map_dumpconf, -}; -DECLARE_GEOM_CLASS(g_map_class, g_map); -MODULE_VERSION(geom_map, 0); diff --git a/sys/modules/geom/geom_map/Makefile b/sys/modules/geom/geom_map/Makefile deleted file mode 100644 index 85beccbf493e..000000000000 --- a/sys/modules/geom/geom_map/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -.PATH: ${SRCTOP}/sys/geom - -KMOD= geom_map -SRCS= geom_map.c bus_if.h device_if.h - -.include From nobody Sun Jan 14 21:22:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpC50TPjz57957; Sun, 14 Jan 2024 21:22: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 4TCpC42sxfz47gB; Sun, 14 Jan 2024 21:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705267360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLJ77iT6I5lCw+arIi02tyk53NSJLtV0RioUu3NMdlU=; b=BrHP+SZQDFCir4rSlfpPP3sVmZMeKZD1yUzVlM1h6YaVI+4cGh8w7MuHEkyRABZAXOSKvm R5A9YamVUtheSGKfDelojh7InH4uhC1KxEOO/HTxtloEA1qNzN1TbN46rrIF+50kI+7zAI IOL3nonhq3FmyY4R/VaBfvSRO3wlo6HKuL7B+tFeyc5jdwWw6q6WFF+NsqW92kSIBxT7EB vFZMfuuXc1n20A66GnS3KdG3ggbeEabrBcScNdVLXZihmQWnCD8nS8ysBnIwWXjDfr0xKH LpXLFDlT7OC0TONC+5AP3wiVo4tFmJcje5iWmwIooTmPFI3hwcfU5esUU987bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705267360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLJ77iT6I5lCw+arIi02tyk53NSJLtV0RioUu3NMdlU=; b=lf45VUM2q8LP5tf6iAJgPSF35GsdC3HD6JsvDCAORHbyzXrH4094cc3Zp6OVH4LirTFX7O JCxjnpbDar4AypNE2C8i8lfO/67zRpvsO0V50v9rQgCZf/4q5Hda20YXN84dzUxXdsaRn6 NyVgR4T9ffbOLATGRa0tStDyZ4tToxNkklcUIyXhEtHtTCZOjPLZkOiFV8Glszf7orDOL4 MNoBLfMSf6jH/rkg88xO9aZPF3TQXVj/kjMFa2a4Sa6kVPHEoOH8mOjmob0rVdbiDVb9b2 4VaRug2kflfSxYhyiO5TU4FQTQW09EtAVeJxEYBFQO0a1/CZR5lt/6taVeVF+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705267360; a=rsa-sha256; cv=none; b=H5vpJryaFf/boFb8qBb9seDR4xZmn3Kycb6N/d3UKPUrKAnlPeTQjAYzKP91yyI5swsfkV f3qUPHtlUI2BC2irWXBGRu5yuKUhTnwcUQn1S42cjqaaVQdCG9A1TvBi9wAK8pFT32wNoH T4njVXDEwNVscSFi2g3GsdCsGdt/19GAzGxh6Sd3u37ufi437vEJQin9abq+m8bc6SAm44 eqwHyVuop9VxCzOpaQLdzRgBNmj1L/TF7H5Cj4MGWJ/ZtBdcUGy7YZiTTQBFGWpautDxb3 l0IzephoOFHJJdIcJ09EkxUSozJ0LEA4ep3JXHgtwsVvEHtPQekhndVChdzpAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TCpC41wJ4zVTQ; Sun, 14 Jan 2024 21:22: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 40ELMedb091133; Sun, 14 Jan 2024 21:22:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELMemB091130; Sun, 14 Jan 2024 21:22:40 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:22:40 GMT Message-Id: <202401142122.40ELMemB091130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 53df7e58cca7 - main - geom_redboot(4): Garbage collect disconnected driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53df7e58cca7e6726b44f447f10ddc3451cfa851 Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=53df7e58cca7e6726b44f447f10ddc3451cfa851 commit 53df7e58cca7e6726b44f447f10ddc3451cfa851 Author: Marius Strobl AuthorDate: 2024-01-14 08:39:56 +0000 Commit: Marius Strobl CommitDate: 2024-01-14 21:22:21 +0000 geom_redboot(4): Garbage collect disconnected driver The last MIPS user has been removed in c09981f1 2 years ago, the last ARM one in ff945277 even 5.5 years ago. --- sys/conf/files | 1 - sys/geom/geom_redboot.c | 342 ------------------------------------------------ 2 files changed, 343 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 1069079b162a..484ec90beb00 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3618,7 +3618,6 @@ geom/geom_event.c standard geom/geom_flashmap.c optional fdt cfi | fdt mx25l | mmcsd | fdt n25q | fdt at45d geom/geom_io.c standard geom/geom_kern.c standard -geom/geom_redboot.c optional geom_redboot geom/geom_slice.c standard geom/geom_subr.c standard geom/geom_vfs.c standard diff --git a/sys/geom/geom_redboot.c b/sys/geom/geom_redboot.c deleted file mode 100644 index aeb8f1e4e525..000000000000 --- a/sys/geom/geom_redboot.c +++ /dev/null @@ -1,342 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2009 Sam Leffler, Errno Consulting - * 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, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any - * redistribution must be conditioned upon including a substantially - * similar Disclaimer requirement for further binary redistribution. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define REDBOOT_CLASS_NAME "REDBOOT" - -struct fis_image_desc { - uint8_t name[16]; /* null-terminated name */ - uint32_t offset; /* offset in flash */ - uint32_t addr; /* address in memory */ - uint32_t size; /* image size in bytes */ - uint32_t entry; /* offset in image for entry point */ - uint32_t dsize; /* data size in bytes */ - uint8_t pad[256-(16+7*sizeof(uint32_t)+sizeof(void*))]; - struct fis_image_desc *next; /* linked list (in memory) */ - uint32_t dsum; /* descriptor checksum */ - uint32_t fsum; /* checksum over image data */ -}; - -#define FISDIR_NAME "FIS directory" -#define REDBCFG_NAME "RedBoot config" -#define REDBOOT_NAME "RedBoot" - -#define REDBOOT_MAXSLICE 64 -#define REDBOOT_MAXOFF \ - (REDBOOT_MAXSLICE*sizeof(struct fis_image_desc)) - -struct g_redboot_softc { - uint32_t entry[REDBOOT_MAXSLICE]; - uint32_t dsize[REDBOOT_MAXSLICE]; - uint8_t readonly[REDBOOT_MAXSLICE]; - g_access_t *parent_access; -}; - -static void -g_redboot_print(int i, struct fis_image_desc *fd) -{ - - printf("[%2d] \"%-15.15s\" %08x:%08x", i, fd->name, - fd->offset, fd->size); - printf(" addr %08x entry %08x\n", fd->addr, fd->entry); - printf(" dsize 0x%x dsum 0x%x fsum 0x%x\n", fd->dsize, - fd->dsum, fd->fsum); -} - -static int -g_redboot_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) -{ - return (ENOIOCTL); -} - -static int -g_redboot_access(struct g_provider *pp, int dread, int dwrite, int dexcl) -{ - struct g_geom *gp = pp->geom; - struct g_slicer *gsp = gp->softc; - struct g_redboot_softc *sc = gsp->softc; - - if (dwrite > 0 && sc->readonly[pp->index]) - return (EPERM); - return (sc->parent_access(pp, dread, dwrite, dexcl)); -} - -static int -g_redboot_start(struct bio *bp) -{ - struct g_provider *pp; - struct g_geom *gp; - struct g_redboot_softc *sc; - struct g_slicer *gsp; - int idx; - - pp = bp->bio_to; - idx = pp->index; - gp = pp->geom; - gsp = gp->softc; - sc = gsp->softc; - if (bp->bio_cmd == BIO_GETATTR) { - if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::entry", - sc->entry[idx])) - return (1); - if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::dsize", - sc->dsize[idx])) - return (1); - } - - return (0); -} - -static void -g_redboot_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp) -{ - struct g_redboot_softc *sc; - struct g_slicer *gsp; - - gsp = gp->softc; - sc = gsp->softc; - g_slice_dumpconf(sb, indent, gp, cp, pp); - if (pp != NULL) { - if (indent == NULL) { - sbuf_printf(sb, " entry %d", sc->entry[pp->index]); - sbuf_printf(sb, " dsize %d", sc->dsize[pp->index]); - } else { - sbuf_printf(sb, "%s%d\n", indent, - sc->entry[pp->index]); - sbuf_printf(sb, "%s%d\n", indent, - sc->dsize[pp->index]); - } - } -} - -#include - -static int -nameok(const char name[16]) -{ - int i; - - /* descriptor names are null-terminated printable ascii */ - for (i = 0; i < 15; i++) - if (!isprint(name[i])) - break; - return (name[i] == '\0'); -} - -static struct fis_image_desc * -parse_fis_directory(u_char *buf, size_t bufsize, off_t offset, uint32_t offmask) -{ -#define match(a,b) (bcmp(a, b, sizeof(b)-1) == 0) - struct fis_image_desc *fd, *efd; - struct fis_image_desc *fisdir, *redbcfg; - struct fis_image_desc *head, **tail; - int i; - - fd = (struct fis_image_desc *)buf; - efd = fd + (bufsize / sizeof(struct fis_image_desc)); -#if 0 - /* - * Find the start of the FIS table. - */ - while (fd < efd && fd->name[0] != 0xff) - fd++; - if (fd == efd) - return (NULL); - if (bootverbose) - printf("RedBoot FIS table starts at 0x%jx\n", - offset + fd - (struct fis_image_desc *) buf); -#endif - /* - * Scan forward collecting entries in a list. - */ - fisdir = redbcfg = NULL; - *(tail = &head) = NULL; - for (i = 0; fd < efd; i++, fd++) { - if (fd->name[0] == 0xff) - continue; - if (match(fd->name, FISDIR_NAME)) - fisdir = fd; - else if (match(fd->name, REDBCFG_NAME)) - redbcfg = fd; - if (nameok(fd->name)) { - /* - * NB: flash address includes platform mapping; - * strip it so we have only a flash offset. - */ - fd->offset &= offmask; - if (bootverbose) - g_redboot_print(i, fd); - *tail = fd; - *(tail = &fd->next) = NULL; - } - } - if (fisdir == NULL) { - if (bootverbose) - printf("No RedBoot FIS table located at %lu\n", - (long) offset); - return (NULL); - } - if (redbcfg != NULL && - fisdir->offset + fisdir->size == redbcfg->offset) { - /* - * Merged FIS/RedBoot config directory. - */ - if (bootverbose) - printf("FIS/RedBoot merged at 0x%jx (not yet)\n", - offset + fisdir->offset); - /* XXX */ - } - return head; -#undef match -} - -static struct g_geom * -g_redboot_taste(struct g_class *mp, struct g_provider *pp, int insist) -{ - struct g_geom *gp; - struct g_consumer *cp; - struct g_redboot_softc *sc; - int error, sectorsize, i; - struct fis_image_desc *fd, *head; - uint32_t offmask; - off_t blksize; /* NB: flash block size stored as stripesize */ - u_char *buf; - off_t offset; - const char *value; - char *op; - - offset = 0; - if (resource_string_value("redboot", 0, "fisoffset", &value) == 0) { - offset = strtouq(value, &op, 0); - if (*op != '\0') { - offset = 0; - } - } - - g_trace(G_T_TOPOLOGY, "redboot_taste(%s,%s)", mp->name, pp->name); - g_topology_assert(); - if (!strcmp(pp->geom->class->name, REDBOOT_CLASS_NAME)) - return (NULL); - /* XXX only taste flash providers */ - if (strncmp(pp->name, "cfi", 3) && - strncmp(pp->name, "flash/spi", 9)) - return (NULL); - gp = g_slice_new(mp, REDBOOT_MAXSLICE, pp, &cp, &sc, sizeof(*sc), - g_redboot_start); - if (gp == NULL) - return (NULL); - /* interpose our access method */ - sc->parent_access = gp->access; - gp->access = g_redboot_access; - - sectorsize = cp->provider->sectorsize; - blksize = cp->provider->stripesize; - if (powerof2(cp->provider->mediasize)) - offmask = cp->provider->mediasize-1; - else - offmask = 0xffffffff; /* XXX */ - if (bootverbose) - printf("%s: mediasize %ld secsize %d blksize %ju offmask 0x%x\n", - __func__, (long) cp->provider->mediasize, sectorsize, - (uintmax_t)blksize, offmask); - if (sectorsize < sizeof(struct fis_image_desc) || - (sectorsize % sizeof(struct fis_image_desc))) - return (NULL); - g_topology_unlock(); - head = NULL; - if(offset == 0) - offset = cp->provider->mediasize - blksize; -again: - buf = g_read_data(cp, offset, blksize, NULL); - if (buf != NULL) - head = parse_fis_directory(buf, blksize, offset, offmask); - if (head == NULL && offset != 0) { - g_free(buf); - offset = 0; /* check the front */ - goto again; - } - g_topology_lock(); - if (head == NULL) { - g_free(buf); - return NULL; - } - /* - * Craft a slice for each entry. - */ - for (fd = head, i = 0; fd != NULL; fd = fd->next) { - if (fd->name[0] == '\0') - continue; - error = g_slice_config(gp, i, G_SLICE_CONFIG_SET, - fd->offset, fd->size, sectorsize, "redboot/%s", fd->name); - if (error) - printf("%s: g_slice_config returns %d for \"%s\"\n", - __func__, error, fd->name); - sc->entry[i] = fd->entry; - sc->dsize[i] = fd->dsize; - /* disallow writing hard-to-recover entries */ - sc->readonly[i] = (strcmp(fd->name, FISDIR_NAME) == 0) || - (strcmp(fd->name, REDBOOT_NAME) == 0); - i++; - } - g_free(buf); - g_access(cp, -1, 0, 0); - if (LIST_EMPTY(&gp->provider)) { - g_slice_spoiled(cp); - return (NULL); - } - return (gp); -} - -static struct g_class g_redboot_class = { - .name = REDBOOT_CLASS_NAME, - .version = G_VERSION, - .taste = g_redboot_taste, - .dumpconf = g_redboot_dumpconf, - .ioctl = g_redboot_ioctl, -}; -DECLARE_GEOM_CLASS(g_redboot_class, g_redboot); -MODULE_VERSION(geom_redboot, 0);