From nobody Sun Jul 2 01:17:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qtrl13fNKz4hPgb; Sun, 2 Jul 2023 01:17: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 4Qtrl12lk8z4BKR; Sun, 2 Jul 2023 01:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688260653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uoiioXGqRLY8PtQCziN+2G/vEcT5ii3hPDe0vKrc3Q8=; b=Y6dHMZbv0Ldo9Zp0I2OGB7qwAhNJsX0SuL4iJ8Okz81gACN/zdKZZakkx9fX7LCa5MXnwL VkrphqKYsrzjeSEwxMFByVSoIsETj9crXNT0G01uCWoJyAQjyl/J+gvA/t048EiHzp2rDZ tDPmlYTTMTUe4fz13k3TLpWb1CJNSxtn0zREEhCDb85rNg6nE6jkwptYSau05CUngrUl5o 86OVVKpBxjJGcDAXWPPQ/YeylxoVTLp3XOGsGkI0QL6vLE3Yn7nJoBn0EZ8gEnBM6sigFo lwu9fg1thn+nZenWHDxzsKa3TBuu52U8gjIzOBHqxanKN1+8A7359J5UkI5ISA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688260653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uoiioXGqRLY8PtQCziN+2G/vEcT5ii3hPDe0vKrc3Q8=; b=i6pasiOPZFLrc3sqBialn2iyy3KiW7BypDZTXnUENgrHD5Mb/kGBuZ4mG9+tvjh7YiCcnW c77d9nrbVzw38tDytzL14D5YpdC6iunz6Qn8WVB/w3Dz7bbiypVwH0KWWwQYxjK4uKV69f nMnLFvSSZSAj5V+ZtCyhWzrIqZNYOXBC74TI3rHbD5pGUBykcqo9qXjjaYhntpUSQ9nlJj PNVrwRubdFNmdN60yLK/M+IL1dRHCedL5bR2m4vB+29N5EtMP4u1om8c/AqejOTiU5o5DC NHqrjIF4L53pXBJ53fwD6K1Hd1QI2wI0+p5aZd0lApMeWpVpE4Int81XomdYDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688260653; a=rsa-sha256; cv=none; b=LzkCoi3aJmofj6uSqbcbREmfMUEHfGoim5bLNY3yazAo35risZ5mhNsT+UzeSDmoq9KaIv XWTDvqgmyglk8dhoevumfnxkah3hDuJMuUHfnGw9fKQrx6vNTzvSbmcd9pmJR/OL4Q4eaX qAz8cUqb25sYyy4823utTCX2CvD1woHTOHZBLmMINJMU6Wf98s4TXSKiIJXBRy9koHFBoo UbaGlpyuqJ8HblvEI6ztYH25BB/Kw+twvoW5EL+rHw3F3zcmBSbs36odvkgzJlq2RtRlJD Jg2ma+9AQ/r+eTPT6QPWx2AkNCxz+A78S9t1VI/+wog0UmmjTbQCjpELtzwsAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtrl11qFmznhp; Sun, 2 Jul 2023 01:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3621HX6x048094; Sun, 2 Jul 2023 01:17:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3621HXte048093; Sun, 2 Jul 2023 01:17:33 GMT (envelope-from git) Date: Sun, 2 Jul 2023 01:17:33 GMT Message-Id: <202307020117.3621HXte048093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e3fbeb1dd0c5 - stable/13 - libc.a: implement _rtld_addr_phdr() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e3fbeb1dd0c5b19efad5a90838a42df1775103a4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e3fbeb1dd0c5b19efad5a90838a42df1775103a4 commit e3fbeb1dd0c5b19efad5a90838a42df1775103a4 Author: Konstantin Belousov AuthorDate: 2023-06-24 10:59:56 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-02 01:16:50 +0000 libc.a: implement _rtld_addr_phdr() (cherry picked from commit 42ceab3ea1a997db93b65404be0ee4b17b5382d7) --- lib/libc/gen/dlfcn.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index 337ad48fd691..52e93d1476d7 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "namespace.h" #include #include "un-namespace.h" @@ -248,13 +249,48 @@ _rtld_atfork_post(int *locks __unused) { } +#ifndef IN_LIBDL +struct _rtld_addr_phdr_cb_data { + const void *addr; + struct dl_phdr_info *dli; +}; + +static int +_rtld_addr_phdr_cb(struct dl_phdr_info *dli, size_t sz, void *arg) +{ + struct _rtld_addr_phdr_cb_data *rd; + const Elf_Phdr *ph; + unsigned i; + + rd = arg; + for (i = 0; i < dli->dlpi_phnum; i++) { + ph = &dli->dlpi_phdr[i]; + if (ph->p_type == PT_LOAD && + dli->dlpi_addr + ph->p_vaddr <= (uintptr_t)rd->addr && + (uintptr_t)rd->addr < dli->dlpi_addr + ph->p_vaddr + + ph->p_memsz) { + memcpy(rd->dli, dli, sz); + return (1); + } + } + return (0); +} +#endif + #pragma weak _rtld_addr_phdr int _rtld_addr_phdr(const void *addr __unused, struct dl_phdr_info *phdr_info_a __unused) { +#ifndef IN_LIBDL + struct _rtld_addr_phdr_cb_data rd; + rd.addr = addr; + rd.dli = phdr_info_a; + return (dl_iterate_phdr(_rtld_addr_phdr_cb, &rd)); +#else return (0); +#endif } #pragma weak _rtld_get_stack_prot From nobody Sun Jul 2 01:26:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qtrww6qM6z4hVkh; Sun, 2 Jul 2023 01:26: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 4Qtrww6MY0z4G0n; Sun, 2 Jul 2023 01:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688261168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iMGIbmhxxso4gSWZbiXA2X7s1e7ASTzFS2kLudy04C0=; b=CGfhluZzqIVUezmuRkfK3yS117rzM/7NQq4jXyuYP7K5KwoQ6sfQKa0UTx9L4QLJSLLQVb erilqNjqLIK9mBqzEPAqHAZLn0WGvBql0MsBYWYRoBHsrjXs9E3RUPBN27t1UXSrad1t5l BdgMxbz0H06trS+ENhdeITKXBqEKp4E/pGf9IVs0Scpp8pyeYTEzYylEnF4pGbfkB9bhun Cxv319oCR668W1du5kjtD+z4Xxr2GTKabJyZT9stMNeg41V9urs5r0eGz4cEuIB1RmMI9s ADt6Tupg2zFTO+28c+5pKtyEpQxCAYUj6KGA7TXPD5zHKht3rOm1QVVY4zZX3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688261168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iMGIbmhxxso4gSWZbiXA2X7s1e7ASTzFS2kLudy04C0=; b=ZDa/KMmb7mxeMB32AnnVUeF3MeqGlILlbR+CBANs0J4XHyLgzSqKYhcAKdYCrpd274oqPZ RsBIiQN/EohrnYVJTFLyo0eeimzCUuA0+86KxrjCYNJF/ktphqg/lf3v5HA+6dD/9KiMvt p90JU+N66YKA8PfxppPbABroiXxLpTWld1D98Zk+oAoEOv0bKZI4XWltPD8pdrgB+PZ+8U unFRuSVK38e9kzJ9addbtSy6MbPapDiTK4cNgrwxMdvVZrXdKwR42a04AQtQVEy2eOGmWl W/ETg/0H6/B1yB0hXm5V7Ne6m0yyxXSxvCa10oHmJsqtMuqH1+Qqb+agLS94Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688261168; a=rsa-sha256; cv=none; b=DS8DUlPKhu6D0t3X/1bMaFbVMtskIEN5tf/+ufsZw3sD36JmOj7uK471uIqupnr3toHi3N if6kc463Fy0S1yyVTbFajrHsYX5ecyzJpK6tpOXC5lYdEbNQgytALnccThwdmvRqI+K3QN uQD0hNy9NRcDeNKhhmETYCnkqL3XztjlDfgW3Gz0I+nuzGRrowDX5ETSg3atRQ4TEk2s8R saMaqOVYL2yrcwIwmgB6TnW7Q6xdHWnV3PN+PvEjHr2p9EnSHdDdOmywCXEVrLwIMFiooC 9MLSsYvBjvY1swYNXMKQy1pBv6wK5y1slQdCArne+56wpmh2VzoGxtxy0YEHjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtrww5PqPzpS0; Sun, 2 Jul 2023 01:26: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 3621Q8d9064886; Sun, 2 Jul 2023 01:26:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3621Q8xa064885; Sun, 2 Jul 2023 01:26:08 GMT (envelope-from git) Date: Sun, 2 Jul 2023 01:26:08 GMT Message-Id: <202307020126.3621Q8xa064885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: d2ee65f43d03 - stable/13 - mount_nfs.8: Note a case where the "nconnect" option does not work List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d2ee65f43d03f144b1bd22fa41748523c981db8e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=d2ee65f43d03f144b1bd22fa41748523c981db8e commit d2ee65f43d03f144b1bd22fa41748523c981db8e Author: Rick Macklem AuthorDate: 2023-06-18 20:02:20 +0000 Commit: Rick Macklem CommitDate: 2023-07-02 01:24:51 +0000 mount_nfs.8: Note a case where the "nconnect" option does not work The "nconnect" NFS mount option will not work correctly for servers where the TCP connections might connect to different NFS clusters that do not share NFSv4.1/4.2 state information, such as file locks. This patch adds a sentence to the "nconnect" section of mount_nfs.8 noting this case. This is a content change. (cherry picked from commit 7e53f16baa3a02118f40c50587efde0338b5053e) --- sbin/mount_nfs/mount_nfs.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8 index 4f4b8891f67a..319e3bc2638d 100644 --- a/sbin/mount_nfs/mount_nfs.8 +++ b/sbin/mount_nfs/mount_nfs.8 @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd April 3, 2023 +.Dd June 14, 2023 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -231,6 +231,9 @@ This option will result in more IP port#s being used. This option requires the .Cm nfsv4 option. +Note that for NFS servers such as AmazonEFS, where each new TCP +connection can connect to a different cluster that maintains lock +state separately, this option cannot be used. .It Cm nfsv2 Use the NFS Version 2 protocol (the default is to try version 3 first then version 2). From nobody Sun Jul 2 08:09:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qv1ss6fSKz4lFnQ; Sun, 2 Jul 2023 08:09: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 4Qv1ss69F2z43Q3; Sun, 2 Jul 2023 08:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688285345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dkdk2QiN3IeiNBwqFVEupqVwcjENV9nByg/iJXsj0WU=; b=AKobJrQFQJluEcKb9ISKoX1bUCa/6m3tBt28HqxMBaD0KyKj++WnA+FdTLuEsuMNoaSCfn TpWqw0HuvCtLcHOeLHD06CZ6sOT8p395c7R1RvYYzrq6ee1CYVI3PhL8JD70PmZgoz4WoZ wPYSd6Um+Fo2S3D7kOqvRRuNI1sfIiYV43ujPPPakk+qC2HVhggTPMek3GTewP07shPD0W Mwwi4RudBXmUvUDRtOBl78h7nRSr1g2rP2mJ76Z2DON7Q5CQYyWbqv/CpKyBNb1Aeh64Iq k1oi3/NVvuzRxUy1g+M4Ih0mZPnS7A4mU2zzfmvQR6Ywdow2LMU4Dl8H17EHvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688285345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dkdk2QiN3IeiNBwqFVEupqVwcjENV9nByg/iJXsj0WU=; b=RgqZ9mXhfZgXIrZiL2UFMmHuag8qBjDhg40/qTD8QrDE7DIezf21jqsvf2DDVwxfN9Kyb2 y5LRtc5u8PoMp+FGqX7cKJXeGCs4rTdC4jp3Ci/MJT3Z8iE7xUUuUlYoyezDQl3U1lwJQk PaKfXZL7MQI8k4t+gZHVTP+3Rgt9JO2Di+FgUB6Pb45AS5lDXOCNX37Ahf9t26yeqivESt VuB/OZBznnDPJ0ua4OZDGlwwe/YuW0NaKaLns2Pt1ZPNPAXf1QmoICyuzoU5KaFAg7X5OR LTSHg8dUIltMhXqH4TxJZxzwgMpta6viBSs5JO5+OXdvsNJUYKbnLgEMlIqzjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688285345; a=rsa-sha256; cv=none; b=VXkGMj+MHBUHyj4sVVHezPLm/wj0D6hlizgFX+TunoC6QBgX8hQr5KX4hlF78JOG3L5VK2 HcdMlCsmYIUZbbqHAKRsaI9QYI/kK3CfjQXmwo9rMPIdZaSjiA2K8D1Y2DAzSTqYDJo5e3 TVsYHfwSxjmT5G9UWQcQb9ACbRv6Mn7+++a/k2Zme42S3zCKBh2borOWnn7A24nx/tgM6r g/GecvtXiIaaTxvczKncCxaCtJ665AR2dQZCO2bZVIH/4iXav5L0eT7SHDixtVQ2FehGHb wrHPv/SGgLGmhelv6JotCqTfj4J1orQ3WNFV5GR3M2bpd7Fcgvc8I4HxjGR9Lw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qv1ss5GQFz10f5; Sun, 2 Jul 2023 08:09: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 3628952V027869; Sun, 2 Jul 2023 08:09:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 362895VW027868; Sun, 2 Jul 2023 08:09:05 GMT (envelope-from git) Date: Sun, 2 Jul 2023 08:09:05 GMT Message-Id: <202307020809.362895VW027868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: ccc806a04938 - main - dumpdev: respect kenv for stable branches List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccc806a049383e5611b3752e6f384cf03a208039 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=ccc806a049383e5611b3752e6f384cf03a208039 commit ccc806a049383e5611b3752e6f384cf03a208039 Author: Eugene Grosbein AuthorDate: 2023-07-02 07:54:57 +0000 Commit: Eugene Grosbein CommitDate: 2023-07-02 07:54:57 +0000 dumpdev: respect kenv for stable branches We have somewhat twisted logic to determine actions for dumpdev considering three sources of information: * kenv "dumpdev" tunnable supposed to point to specific device; * /etc/defaults/rc.conf "dumpdev" variable; * /etc/rc.conf that may be unset or set to "NO", "AUTO" or device name. For CURRENT without any setting in kenv or /etc/rc.conf the default is "AUTO". For STABLE branches the default is "NO". Current implementation breaks for STABLE branches if kenv points to specific device but /etc/rc.conf does not set "dumpdev" at all. Let us fix it commenting out "dumpdev" in /etc/defaults/rc.conf for STABLE branches and making the code to consult kenv if "dumpdev" is not set elsewhere. MFC-after: 1 month --- libexec/rc/rc.conf | 4 +++- libexec/rc/rc.d/dumpon | 9 ++++++--- libexec/rc/rc.d/savecore | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 06fda945e86e..8884fab7e016 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -643,7 +643,9 @@ lpd_flags="" # Flags to lpd (if enabled). nscd_enable="NO" # Run the nsswitch caching daemon. chkprintcap_enable="NO" # Run chkprintcap(8) before running lpd. chkprintcap_flags="-d" # Create missing directories by default. -dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO). +dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO); + # this should be commented out here + # for stable branches to respect kenv. dumpon_flags="" # Options to pass to dumpon(8), followed by dumpdev. dumpdir="/var/crash" # Directory where crash dumps are to be stored savecore_enable="YES" # Extract core from dump devices if any diff --git a/libexec/rc/rc.d/dumpon b/libexec/rc/rc.d/dumpon index 6ca335b73842..ed43c4a24762 100755 --- a/libexec/rc/rc.d/dumpon +++ b/libexec/rc/rc.d/dumpon @@ -52,15 +52,18 @@ dumpon_start() # early so a crash early in the boot process can be caught. # case ${dumpdev} in - [Nn][Oo] | '') + [Nn][Oo]) ;; - [Aa][Uu][Tt][Oo]) + [Aa][Uu][Tt][Oo] | '') root_hold_wait dev=$(/bin/kenv -q dumpdev) if [ -n "${dev}" ] ; then dumpon_try "${dev}" return $? fi + if [ -z ${dumpdev} ] ; then + return + fi while read dev mp type more ; do [ "${type}" = "swap" ] || continue case ${dev} in @@ -85,7 +88,7 @@ dumpon_start() dumpon_stop() { case ${dumpdev} in - [Nn][Oo] | '') + [Nn][Oo]) ;; *) rm -f /dev/dumpdev diff --git a/libexec/rc/rc.d/savecore b/libexec/rc/rc.d/savecore index 5d8204a1e805..e7186699a176 100755 --- a/libexec/rc/rc.d/savecore +++ b/libexec/rc/rc.d/savecore @@ -20,11 +20,11 @@ savecore_prestart() { # Quit if we have no dump device case ${dumpdev} in - [Nn][Oo] | '') + [Nn][Oo]) debug 'No dump device. Quitting.' return 1 ;; - [Aa][Uu][Tt][Oo]) + [Aa][Uu][Tt][Oo] | '') if [ ! -L /dev/dumpdev ]; then return 1 fi From nobody Sun Jul 2 10:03:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qv4Qf6zsKz4lQNv; Sun, 2 Jul 2023 10:04:10 +0000 (UTC) (envelope-from khng300@gmail.com) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 4Qv4Qf2mRxz3RKf; Sun, 2 Jul 2023 10:04:10 +0000 (UTC) (envelope-from khng300@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1b7e66ff65fso27218305ad.0; Sun, 02 Jul 2023 03:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688292249; x=1690884249; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WRXMzSm5GD1jBcDnVh7Kq9ZGoiu0huKEYyTS2eZQyao=; b=BlXmJUAPA9WrgQVYw6alliVBFQiNG6Wr0SAxFvzaYqfI8rZyeEVpmmSHBpjB9qPDVv JloPx+YNofz6LgU0DVFI9n7F9VXyIQ92C5apaRVnNnUNnSsedmW8Q+Not0+1PPho4t4+ ATFASQvqDeCpi4n4ng5hvRxmI7/YOQyVE4uKepR7Dij38IXU3KqAWTUYNh6zmpUxk3zF OktkL1HpXxWgmDLjMaPi0QhJEqJ/e3Tda12gaGWTO1uh2Lx2YCmpUTw+DPNQR56k+UPf iLCg5+b8bGjGB2HxRjARVxkaEUItxNKEwlDUW2AvOYde3jFzxELTeTZxPeIH7fp0vTnX 8Miw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688292249; x=1690884249; 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=WRXMzSm5GD1jBcDnVh7Kq9ZGoiu0huKEYyTS2eZQyao=; b=H/mqvzmfxgZUsFvlaZwwVhfh9HrcWjbNRSL00MHATyc4NMz9Twwwvn0EbABsiZr9Sy lfGx8xs96/E0jGllrHEHsXj7hZdikeJy5N9O16EzW9bPWtvfLPNoH7ZkrP5x1ysD7Uv6 DqjW+J3rbRHNFRtQrDvYGa3Ypt089EWS5ZNBkUZn38TqPe09C8J4vtu4Rfq0k2aFFzez oqngD34kQcE3BuEUVoLG1KUTcgN/+IqcMT+GhaFCTemJNuPyZy3l5sq991GHktgrpg8D E3YOg7bBMPbZpC/aYnYtr/IfS05Tz/fLKPp20NyneIDVbv9sFYfsuqZhnVhwDDQvoJsX kzRA== X-Gm-Message-State: ABy/qLYKX1qcLZnFdKUtd+40qs5Ccaoy0Sq+z3ggZmnRi6OHf7pmkTGK iGknZhwHUa6EVsF7cTdE/+W7WvYgZhyZD/SWvLs= X-Google-Smtp-Source: APBJJlEFA263Fey0cb7qgBXjEH3xONw0EOcJylsA44iod7qS4nwcsbgERQEb914e7yx1hzUssn4FwPyuMCAIIRTWXFY= X-Received: by 2002:a17:903:22c4:b0:1b8:88c5:2d2f with SMTP id y4-20020a17090322c400b001b888c52d2fmr4170317plg.64.1688292248451; Sun, 02 Jul 2023 03:04:08 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202307012259.361MxM4i017090@gitrepo.freebsd.org> In-Reply-To: From: Ka Ho Ng Date: Sun, 2 Jul 2023 06:03:57 -0400 Message-ID: Subject: Re: git: 005aa1743b42 - main - modules: bzero the modspecific_t To: Konstantin Belousov Cc: Ka Ho Ng , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000bf010205ff7e2bc9" X-Rspamd-Queue-Id: 4Qv4Qf2mRxz3RKf X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000bf010205ff7e2bc9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jul 1, 2023 at 7:13=E2=80=AFPM Konstantin Belousov wrote: > On Sat, Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote: > > The branch main has been updated by khng: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D005aa1743b42b52fbd49b9d5ec44816= 902b6ee9f > > > > commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f > > Author: Ka Ho Ng > > AuthorDate: 2023-07-01 19:41:53 +0000 > > Commit: Ka Ho Ng > > CommitDate: 2023-07-01 22:58:46 +0000 > > > > modules: bzero the modspecific_t > > > > Per https://reviews.llvm.org/D68115, only the first field is > > zero-initialized, meanwhile other fields are undef. > This is not true. > > > > > The pattern can be observed on clang as well, that when > > -ftrivial-auto-var-init=3Dpattern is specified 0xaa is filled for > > non-active fields, otherwise they are zero-initialized. > What are non-active fields? > All fields with implicit initializers > "shall be initialized implicitly the same as > objects that have static storage duration." > > I do not think this is required for padding. > In that case, modspecific_t ms did become 0xaaaaaaaa00000000 on amd64 if -ftrivial-auto-var-init=3Dpattern was specified. > > > Technically both are acceptable when using clang. However it > > would be good to simply bzero the modspecific_t in such case to > > be strict to the standard. > > > > MFC with: 2cab2d43b83b > > MFC after: 1 day > Min MFC period is 3 days. > > > Sponsored by: Juniper Networks, Inc. > > Reviewed by: delphij > > Differential Revision: https://reviews.freebsd.org/D40830 > > --- > > sys/kern/kern_syscalls.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c > > index 234e51cfd280..0b51edf5e985 100644 > > --- a/sys/kern/kern_syscalls.c > > +++ b/sys/kern/kern_syscalls.c > > @@ -173,9 +173,10 @@ kern_syscall_module_handler(struct sysent *sysents= , > struct module *mod, > > int what, void *arg) > > { > > struct syscall_module_data *data =3D arg; > > - modspecific_t ms =3D { 0 }; > > + modspecific_t ms; > > int error; > > > > + bzero(&ms, sizeof(ms)); > > switch (what) { > > case MOD_LOAD: > > error =3D kern_syscall_register(sysents, data->offset, Ka Ho --000000000000bf010205ff7e2bc9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Jul 1, 2023 at 7:13=E2=80=AFPM Ko= nstantin Belousov <kostikbel@gmai= l.com> wrote:
On Sat, Jul 01, 2023 at 10:59:22PM +0000, = Ka Ho Ng wrote:
> The branch main has been updated by khng:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D005aa1743b42b52fbd49b9d5ec44816902b6ee9f<= /a>
>
> commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f
> Author:=C2=A0 =C2=A0 =C2=A0Ka Ho Ng <khng@FreeBSD.org>
> AuthorDate: 2023-07-01 19:41:53 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Ka Ho Ng <khng@FreeBSD.org>
> CommitDate: 2023-07-01 22:58:46 +0000
>
>=C2=A0 =C2=A0 =C2=A0modules: bzero the modspecific_t
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Per
https://reviews.llvm.org/D68115, only= the first field is
>=C2=A0 =C2=A0 =C2=A0zero-initialized, meanwhile other fields are undef.=
This is not true.

>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0The pattern can be observed on clang as well, that = when
>=C2=A0 =C2=A0 =C2=A0-ftrivial-auto-var-init=3Dpattern is specified 0xaa= is filled for
>=C2=A0 =C2=A0 =C2=A0non-active fields, otherwise they are zero-initiali= zed.
What are non-active fields?
All fields with implicit initializers
"shall be initialized implicitly the same as
objects that have static storage duration."

I do not think this is required for padding.
In that c= ase, modspecific_t ms did become 0xaaaaaaaa00000000 on amd64 if -ftrivial-a= uto-var-init=3Dpattern was specified.
=C2=A0

>=C2=A0 =C2=A0 =C2=A0Technically both are acceptable when using clang. H= owever it
>=C2=A0 =C2=A0 =C2=A0would be good to simply bzero the modspecific_t in = such case to
>=C2=A0 =C2=A0 =C2=A0be strict to the standard.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0MFC with:=C2=A0 =C2=A0 =C2=A0 =C2=A02cab2d43b83b >=C2=A0 =C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 1 day
Min MFC period is 3 days.

>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Juniper Networks, Inc. >=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 delphij
>=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0 https://revie= ws.freebsd.org/D40830
> ---
>=C2=A0 sys/kern/kern_syscalls.c | 3 ++-
>=C2=A0 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c
> index 234e51cfd280..0b51edf5e985 100644
> --- a/sys/kern/kern_syscalls.c
> +++ b/sys/kern/kern_syscalls.c
> @@ -173,9 +173,10 @@ kern_syscall_module_handler(struct sysent *sysent= s, struct module *mod,
>=C2=A0 =C2=A0 =C2=A0 int what, void *arg)
>=C2=A0 {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0struct syscall_module_data *data =3D arg; > -=C2=A0 =C2=A0 =C2=A0modspecific_t ms =3D { 0 };
> +=C2=A0 =C2=A0 =C2=A0modspecific_t ms;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0int error;
>=C2=A0
> +=C2=A0 =C2=A0 =C2=A0bzero(&ms, sizeof(ms));
>=C2=A0 =C2=A0 =C2=A0 =C2=A0switch (what) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0case MOD_LOAD:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D kern_s= yscall_register(sysents, data->offset,

K= a Ho
--000000000000bf010205ff7e2bc9-- From nobody Sun Jul 2 10:18:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qv4lX33Nwz4lYRF; Sun, 2 Jul 2023 10:18:48 +0000 (UTC) (envelope-from khng300@gmail.com) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (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 4Qv4lW2z5Rz3nMr; Sun, 2 Jul 2023 10:18:47 +0000 (UTC) (envelope-from khng300@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=Gvtg6a38; spf=pass (mx1.freebsd.org: domain of khng300@gmail.com designates 2607:f8b0:4864:20::62f as permitted sender) smtp.mailfrom=khng300@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1b7dd061e9aso18997485ad.2; Sun, 02 Jul 2023 03:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688293126; x=1690885126; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hRNf9qwLtqD5ZCp7cv4WfsCFx/hZUczftuWi+PsVNBQ=; b=Gvtg6a38zXVamcGDRb2NzE/xkPTCNjJL2Tk3A4qZnOy16vs7fyH6ng1qpgw3eatJUh j1OfgEwH4jhiX6lLo38c0RXBDRMW1/RcjxrES78mhfIgmwIsPDR8Tkw9cSbIOIYa4NRO 3Nj9jwej2ETwS+Pev+FU8cHSM7xKcYHPB2or6U9HmxvPqBvERsxwYvMc8tqqsIZIAftI ruPLNEplOssCxYYpfmYBGuoNIkR6juIpeZVv6mw89Uq/yDef76wHtdsz+m28lqOFW0lf zMo6CFOj8L7vtkv1sksHRyDIjCmO/fR6LqZgpafJU52TkEcCk91+Q6bXO6/LXEcVTlyF 1eHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688293126; x=1690885126; 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=hRNf9qwLtqD5ZCp7cv4WfsCFx/hZUczftuWi+PsVNBQ=; b=lMJxMsNohb1A2jqm07kFUA21WwMfm/6dYcI6mF/e9yGopvnQwhO9bFRj8hRH038sWf d0g/Xu/KKClWB2xXrqk2E47rEWHHG5CzBWw/jBbJM0cD+d+nvD19IAIQ1Bl3X16plROo vjq55qKDPuSRxcZmkYcl62CzMkIdo6Y7xvNoVsCxUacWIPkozdU4u53mQOBpuFBYdMvi MV8JXj2icCJsQr1U0zLQwusjRbZi2Y4FmKC+X07CF42vLsMXyTL/jdcGD94nFEnqFl8D Lvg7wmDdWVW5z0GYvAjxm0bvHSb0+cvWYYzCSmC0HxeKOJLqJnN77E6XT1pw8ducrzsp dtEQ== X-Gm-Message-State: ABy/qLaAVbmiWBlv8/aTwkjglcKjkwzwG6UjWwWMMF9VQ7tEQJtzRG4Y Zl/3/q7CLf53YJ0qmDDrtLA5YbayKAKoQ+yp1rrADTWzt72FWq9e X-Google-Smtp-Source: APBJJlFM2ontNDtPb7oKJdny35aSlCy492liE6+Yv7gj1HBib/cg7/i9DrJ5sai8oG7R+rASv/h5Vc5aIbarkkqwHk0= X-Received: by 2002:a17:902:ea08:b0:1b8:8262:7333 with SMTP id s8-20020a170902ea0800b001b882627333mr3112959plg.51.1688293125947; Sun, 02 Jul 2023 03:18:45 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202307012259.361MxM4i017090@gitrepo.freebsd.org> In-Reply-To: From: Ka Ho Ng Date: Sun, 2 Jul 2023 06:18:35 -0400 Message-ID: Subject: Re: git: 005aa1743b42 - main - modules: bzero the modspecific_t To: Konstantin Belousov Cc: Ka Ho Ng , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000000c84c705ff7e6065" X-Spamd-Result: default: False [-0.71 / 15.00]; NEURAL_SPAM_MEDIUM(0.95)[0.948]; NEURAL_HAM_SHORT(-0.85)[-0.852]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_SPAM_LONG(0.20)[0.196]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::62f:from]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4Qv4lW2z5Rz3nMr X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N --0000000000000c84c705ff7e6065 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jul 2, 2023 at 6:03=E2=80=AFAM Ka Ho Ng wrote: > On Sat, Jul 1, 2023 at 7:13=E2=80=AFPM Konstantin Belousov > wrote: > >> On Sat, Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote: >> > The branch main has been updated by khng: >> > >> > URL: >> https://cgit.FreeBSD.org/src/commit/?id=3D005aa1743b42b52fbd49b9d5ec4481= 6902b6ee9f >> > >> > commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f >> > Author: Ka Ho Ng >> > AuthorDate: 2023-07-01 19:41:53 +0000 >> > Commit: Ka Ho Ng >> > CommitDate: 2023-07-01 22:58:46 +0000 >> > >> > modules: bzero the modspecific_t >> > >> > Per https://reviews.llvm.org/D68115, only the first field is >> > zero-initialized, meanwhile other fields are undef. >> This is not true. >> >> > >> > The pattern can be observed on clang as well, that when >> > -ftrivial-auto-var-init=3Dpattern is specified 0xaa is filled for >> > non-active fields, otherwise they are zero-initialized. >> What are non-active fields? >> All fields with implicit initializers >> "shall be initialized implicitly the same as >> objects that have static storage duration." >> >> I do not think this is required for padding. >> > In that case, modspecific_t ms did become 0xaaaaaaaa00000000 on amd64 if > -ftrivial-auto-var-init=3Dpattern was specified. > > >> >> > Technically both are acceptable when using clang. However it >> > would be good to simply bzero the modspecific_t in such case to >> > be strict to the standard. >> > >> > MFC with: 2cab2d43b83b >> > MFC after: 1 day >> Min MFC period is 3 days. >> >> > Sponsored by: Juniper Networks, Inc. >> > Reviewed by: delphij >> > Differential Revision: https://reviews.freebsd.org/D40830 >> > --- >> > sys/kern/kern_syscalls.c | 3 ++- >> > 1 file changed, 2 insertions(+), 1 deletion(-) >> > >> > diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c >> > index 234e51cfd280..0b51edf5e985 100644 >> > --- a/sys/kern/kern_syscalls.c >> > +++ b/sys/kern/kern_syscalls.c >> > @@ -173,9 +173,10 @@ kern_syscall_module_handler(struct sysent >> *sysents, struct module *mod, >> > int what, void *arg) >> > { >> > struct syscall_module_data *data =3D arg; >> > - modspecific_t ms =3D { 0 }; >> > + modspecific_t ms; >> > int error; >> > >> > + bzero(&ms, sizeof(ms)); >> > switch (what) { >> > case MOD_LOAD: >> > error =3D kern_syscall_register(sysents, data->offset, > > > Ka Ho > Since I missed the reply-all button just now, I resend this email. Reading on N2716 one of the footnote stated: "Note that aggregate type does not include union type because an object with union type can only contain one member at a time" And below at 6.7.9.21 only aggregate was mentioned but not union, which matched what I observed with an `cc -ftrivial-auto-var-init=3Dpattern` invocation. Ka Ho --0000000000000c84c705ff7e6065 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Jul 2, 2023 at 6:03=E2=80=AFAM Ka= Ho Ng <khng300@gmail.com> w= rote:
On Sat, Jul 1, 2023 at 7= :13=E2=80=AFPM Konstantin Belousov <kostikbel@gmail.com> wrote:
On Sat, = Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote:
> The branch main has been updated by khng:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D005aa1743b42b52fbd49b9d5ec44816902b6ee9f<= /a>
>
> commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f
> Author:=C2=A0 =C2=A0 =C2=A0Ka Ho Ng <khng@FreeBSD.org>
> AuthorDate: 2023-07-01 19:41:53 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Ka Ho Ng <khng@FreeBSD.org>
> CommitDate: 2023-07-01 22:58:46 +0000
>
>=C2=A0 =C2=A0 =C2=A0modules: bzero the modspecific_t
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Per
https://reviews.llvm.org/D68115, only= the first field is
>=C2=A0 =C2=A0 =C2=A0zero-initialized, meanwhile other fields are undef.=
This is not true.

>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0The pattern can be observed on clang as well, that = when
>=C2=A0 =C2=A0 =C2=A0-ftrivial-auto-var-init=3Dpattern is specified 0xaa= is filled for
>=C2=A0 =C2=A0 =C2=A0non-active fields, otherwise they are zero-initiali= zed.
What are non-active fields?
All fields with implicit initializers
"shall be initialized implicitly the same as
objects that have static storage duration."

I do not think this is required for padding.
In that c= ase, modspecific_t ms did become 0xaaaaaaaa00000000 on amd64 if -ftrivial-a= uto-var-init=3Dpattern was specified.
=C2=A0

>=C2=A0 =C2=A0 =C2=A0Technically both are acceptable when using clang. H= owever it
>=C2=A0 =C2=A0 =C2=A0would be good to simply bzero the modspecific_t in = such case to
>=C2=A0 =C2=A0 =C2=A0be strict to the standard.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0MFC with:=C2=A0 =C2=A0 =C2=A0 =C2=A02cab2d43b83b >=C2=A0 =C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 1 day
Min MFC period is 3 days.

>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Juniper Networks, Inc. >=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 delphij
>=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0 https://revie= ws.freebsd.org/D40830
> ---
>=C2=A0 sys/kern/kern_syscalls.c | 3 ++-
>=C2=A0 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c
> index 234e51cfd280..0b51edf5e985 100644
> --- a/sys/kern/kern_syscalls.c
> +++ b/sys/kern/kern_syscalls.c
> @@ -173,9 +173,10 @@ kern_syscall_module_handler(struct sysent *sysent= s, struct module *mod,
>=C2=A0 =C2=A0 =C2=A0 int what, void *arg)
>=C2=A0 {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0struct syscall_module_data *data =3D arg; > -=C2=A0 =C2=A0 =C2=A0modspecific_t ms =3D { 0 };
> +=C2=A0 =C2=A0 =C2=A0modspecific_t ms;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0int error;
>=C2=A0
> +=C2=A0 =C2=A0 =C2=A0bzero(&ms, sizeof(ms));
>=C2=A0 =C2=A0 =C2=A0 =C2=A0switch (what) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0case MOD_LOAD:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D kern_s= yscall_register(sysents, data->offset,

K= a Ho
Since I missed the reply-all button= just now, I resend this=C2=A0email.

Reading on N2= 716 one of the footnote stated:
"Note that aggregate type does not = include union type because an object with union type can only contain one m= ember at a time"

And below at 6.7.9.21 only aggregat= e was mentioned but not union, which matched what I observed with an `cc -f= trivial-auto-var-init=3Dpattern` invocation.

Ka Ho= =C2=A0
--0000000000000c84c705ff7e6065-- From nobody Sun Jul 2 13:32:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qv93D5D99z4lSKW; Sun, 2 Jul 2023 13:32: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 4Qv93D4n1Gz3r1Z; Sun, 2 Jul 2023 13: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=1688304760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xiCj9sdHlOMbGJeuN8ON4OyQt4m34zB1o40+KJ24ZQU=; b=ETiFtlwM6SJ4pZ/cnkzzUGp0z7B4G5/A5OMW8YRFzbXSYKWu4bW4idg3dHYOegoPUYGAwZ O1PyMkT/JuRnzTETZYnDyfHTNNw58ZPsEwZMDRSVQWB+zlta0FmG6SIUmxN/cYzFn3flBm IEh/GZBDjh5kVYE9cvmdy1OzvDsrjw+iNAG/znGAtnxSf6fp+xIEdehPpEiq40xIe1Vv0O Mv/NYMoURXBPSdERpXfMGtzM6xYWJFV9p0uFW7ICroDZ9J91Sfrf9uSgRD4d8gYegrt/jX Tf5sBo3ptLRAlBOl9uuIBr6lVAA+ayEKt9egqL55TLEKhV6hxEOdIYuQ+bdXHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688304760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xiCj9sdHlOMbGJeuN8ON4OyQt4m34zB1o40+KJ24ZQU=; b=Jzjt6uJmy0d2oxRpodnYu0nogqIau9eJGPE8gdREoNP3aID0hz+fOzeQClYi0eo8+6BcPO R3xypOIZ8FzWuti3zMwuiZ9qGViYQtSJdvMt08IvwaL4kNlxHPc3xSJp5KTJjJd+AqVUJn MIKVgDMnR+khKTtLpGuFNNeaxvdxuN1m+SHLVrOAJadGeQ+sZw5p9vhPHJvCxQSE9xCEgK 76R2yktbkl7e9O+Y9n1eEGTnD4tBGnGWhyeIrzdEgUEKnrnP2AHaruFcavlCG4AVkIxMhv Y5zu5apXB+o7ScHVpJsBWzoBrGqTnshGoxFDghWeWja7IuRMhl4rUurz91bR8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688304760; a=rsa-sha256; cv=none; b=VRfwwtOIUg9oVA6dD9beyE+MRotVst2O9VoM0866YB4zD1Fba6R1fIX5SjHbC4tZiZl6eA mMUbliSU5FCNetEv4tR7UveH0RpynF5HYkhRgUcAciQZf0+90Sw7DNU21G2hdmItU5bMTw k6OgZGYItViBXVQMMB4To7stO9tJaQ2CdZMcslHfDmBTRC8HY51IRkVNPrMtFMarm7WUXF NMQ8hMmwffTJhd3sbeWwNfX+W3ntnGU/Oa8UIY+Ya0mQT7TAl5ye8Z+zzfJsgbBZYHs/1j QFMZ3+HnhaaHHbz/KjgRAlh7Wa/j/9PnuKnmnmsvO/DKTWx+HEKL83tRUysczQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qv93D3sGqz19LB; Sun, 2 Jul 2023 13: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 362DWedW071272; Sun, 2 Jul 2023 13: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 362DWe38071271; Sun, 2 Jul 2023 13:32:40 GMT (envelope-from git) Date: Sun, 2 Jul 2023 13:32:40 GMT Message-Id: <202307021332.362DWe38071271@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: 2176c9ab71c8 - main - dtrace: improve siftr probe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2176c9ab71c85efd90a6c7af4a9e04fe8e3d49ca Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2176c9ab71c85efd90a6c7af4a9e04fe8e3d49ca commit 2176c9ab71c85efd90a6c7af4a9e04fe8e3d49ca Author: Michael Tuexen AuthorDate: 2023-07-02 01:08:51 +0000 Commit: Michael Tuexen CommitDate: 2023-07-02 01:08:51 +0000 dtrace: improve siftr probe Improve consistency of the field names with tcpsinfo_t: * Use mss instead of max_seg_size. * Use lport and rport instead of tcp_localport and tcp_foreignport. Use t_flags instead of flags to improve consistency with t_flags2. Add laddr and raddr, since the addresses were missing when compared to the output of siftr. Reviewed by: cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40834 --- cddl/lib/libdtrace/siftr.d | 27 +++++++++++++++++++-------- share/man/man4/dtrace_tcp.4 | 26 +++++++++++++++----------- sys/netinet/siftr.c | 29 ++++++++++++++++------------- 3 files changed, 50 insertions(+), 32 deletions(-) diff --git a/cddl/lib/libdtrace/siftr.d b/cddl/lib/libdtrace/siftr.d index 791693db7638..ecb307822671 100644 --- a/cddl/lib/libdtrace/siftr.d +++ b/cddl/lib/libdtrace/siftr.d @@ -21,6 +21,7 @@ * $FreeBSD$ */ +#pragma D depends_on library ip.d #pragma D depends_on module kernel #pragma D depends_on module siftr #pragma D depends_on provider tcp @@ -44,20 +45,22 @@ typedef struct siftrinfo { struct timeval tval; uint8_t direction; uint8_t ipver; - uint16_t tcp_localport; - uint16_t tcp_foreignport; + uint16_t lport; + uint16_t rport; + string laddr; + string raddr; uint32_t snd_cwnd; uint32_t snd_wnd; uint32_t rcv_wnd; uint32_t t_flags2; uint32_t snd_ssthresh; int conn_state; - u_int max_seg_size; + uint32_t mss; uint32_t srtt; u_char sack_enabled; u_char snd_scale; u_char rcv_scale; - u_int flags; + u_int t_flags; uint32_t rto; u_int snd_buf_hiwater; u_int snd_buf_cc; @@ -73,20 +76,28 @@ typedef struct siftrinfo { translator siftrinfo_t < struct pkt_node *p > { direction = p == NULL ? 0 : p->direction; ipver = p == NULL ? 0 : p->ipver; - tcp_localport = p == NULL ? 0 : ntohs(p->tcp_localport); - tcp_foreignport = p == NULL ? 0 : ntohs(p->tcp_foreignport); + lport = p == NULL ? 0 : ntohs(p->lport); + rport = p == NULL ? 0 : ntohs(p->fport); + laddr = p == NULL ? "" : + p->ipver == INP_IPV4 ? + inet_ntoa(&p->laddr.id46_addr.ia46_addr4.s_addr) : + inet_ntoa6(&p->laddr.id6_addr); + raddr = p == NULL ? "" : + p->ipver == INP_IPV4 ? + inet_ntoa(&p->faddr.id46_addr.ia46_addr4.s_addr) : + inet_ntoa6(&p->faddr.id6_addr); snd_cwnd = p == NULL ? 0 : p->snd_cwnd; snd_wnd = p == NULL ? 0 : p->snd_wnd; rcv_wnd = p == NULL ? 0 : p->rcv_wnd; t_flags2 = p == NULL ? 0 : p->t_flags2; snd_ssthresh = p == NULL ? 0 : p->snd_ssthresh; conn_state = p == NULL ? 0 : p->conn_state; - max_seg_size = p == NULL ? 0 : p->max_seg_size; + mss = p == NULL ? 0 : p->mss; srtt = p == NULL ? 0 : p->srtt; sack_enabled = p == NULL ? 0 : p->sack_enabled; snd_scale = p == NULL ? 0 : p->snd_scale; rcv_scale = p == NULL ? 0 : p->rcv_scale; - flags = p == NULL ? 0 : p->flags; + t_flags = p == NULL ? 0 : p->t_flags; rto = p == NULL ? 0 : p->rto; snd_buf_hiwater = p == NULL ? 0 : p->snd_buf_hiwater; snd_buf_cc = p == NULL ? 0 : p->snd_buf_cc; diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index 49dd9449d887..0bb5b79169e4 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2023 +.Dd July 2, 2023 .Dt DTRACE_TCP 4 .Os .Sh NAME @@ -319,10 +319,14 @@ Either for IPv4, or .Qq 2 for IPv6. -.It Vt uint16_t tcp_localport +.It Vt uint16_t lport The TCP port that the local host is communicating via. -.It Vt uint16_t tcp_foreignport -The TCP port that the foreign host is communicating via. +.It Vt uint16_t rport +The TCP port that the remote host is communicating via. +.It Vt string laddr +The IPv4 or IPv6 address of the local host. +.It Vt string raddr +The IPv4 or IPv6 address of the remote host. .It Vt uint32_t snd_cwnd The current congestion window (CWND) for the flow, in bytes. .It Vt uint32_t snd_wnd @@ -342,8 +346,8 @@ The valid TCP state values are given by the constants prefixed with .Ql TCPS_ in .Pa /usr/lib/dtrace/tcp.d . -.It Vt u_int max_seg_size -The maximum segment size for the flow, in bytes. +.It Vt uint32_t mss +The maximum segment size (MSS) for the flow, in bytes. .It Vt uint32_t srtt The current smoothed RTT (SRTT) for the flow in microseconds. .It Vt u_char sack_enabled @@ -352,7 +356,7 @@ SACK enabled indicator. 1 if SACK enabled, 0 otherwise. The current window scaling factor for the sending window. .It Vt u_char rcv_scale The current window scaling factor for the receiving window. -.It Vt u_int flags +.It Vt u_int t_flags The current value of the t_flags for the flow. .It Vt uint32_t rto The current retransmission timeout (RTO) for the flow in microseconds. @@ -480,15 +484,15 @@ and SSTHRESH when a packet is sent or received: dtrace:::BEGIN { - printf(" %3s %5s %5s %10s %10s\\n", - "DIR", "LPORT", "RPORT", "CWND", "SSTHRESH"); + printf(" %3s %16s:%-5s %16s:%-5s %10s %10s\\n", + "DIR", "LADDR", "LPORT", "RADDR", "RPORT", "CWND", "SSTHRESH"); } tcp:::siftr { - printf(" %3s %5d %5d %10d %10d\\n", + printf(" %3s %16s:%-5d %16s:%-5d %10u %10u\\n", siftr_dir_string[args[0]->direction], - args[0]->tcp_localport, args[0]->tcp_foreignport, + args[0]->laddr, args[0]->lport, args[0]->raddr, args[0]->rport, args[0]->snd_cwnd, args[0]->snd_ssthresh); } .Ed diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index abbb72a05b06..9154f89fba30 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -163,9 +163,13 @@ struct pkt_node { /* IP version pkt_node relates to; either INP_IPV4 or INP_IPV6. */ uint8_t ipver; /* Local TCP port. */ - uint16_t tcp_localport; + uint16_t lport; /* Foreign TCP port. */ - uint16_t tcp_foreignport; + uint16_t fport; + /* Local address. */ + union in_dependaddr laddr; + /* Foreign address. */ + union in_dependaddr faddr; /* Congestion Window (bytes). */ uint32_t snd_cwnd; /* Sending Window (bytes). */ @@ -179,7 +183,7 @@ struct pkt_node { /* Current state of the TCP FSM. */ int conn_state; /* Max Segment Size (bytes). */ - u_int max_seg_size; + uint32_t mss; /* Smoothed RTT (usecs). */ uint32_t srtt; /* Is SACK enabled? */ @@ -189,7 +193,7 @@ struct pkt_node { /* Window scaling for recv window. */ u_char rcv_scale; /* TCP control block flags. */ - u_int flags; + u_int t_flags; /* Retransmission timeout (usec). */ uint32_t rto; /* Size of the TCP send buffer in bytes. */ @@ -223,7 +227,6 @@ struct flow_info #endif uint16_t lport; /* local TCP port */ uint16_t fport; /* foreign TCP port */ - uint8_t ipver; /* IP version */ uint32_t key; /* flowid of the connection */ }; @@ -427,10 +430,10 @@ siftr_process_pkt(struct pkt_node * pkt_node) pkt_node->snd_scale, pkt_node->rcv_scale, pkt_node->conn_state, - pkt_node->max_seg_size, + pkt_node->mss, pkt_node->srtt, pkt_node->sack_enabled, - pkt_node->flags, + pkt_node->t_flags, pkt_node->rto, pkt_node->snd_buf_hiwater, pkt_node->snd_buf_cc, @@ -642,8 +645,10 @@ siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp, int ipver, int dir, int inp_locally_locked) { pn->ipver = ipver; - pn->tcp_localport = inp->inp_lport; - pn->tcp_foreignport = inp->inp_fport; + pn->lport = inp->inp_lport; + pn->fport = inp->inp_fport; + pn->laddr = inp->inp_inc.inc_ie.ie_dependladdr; + pn->faddr = inp->inp_inc.inc_ie.ie_dependfaddr; pn->snd_cwnd = tp->snd_cwnd; pn->snd_wnd = tp->snd_wnd; pn->rcv_wnd = tp->rcv_wnd; @@ -652,10 +657,10 @@ siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp, pn->snd_scale = tp->snd_scale; pn->rcv_scale = tp->rcv_scale; pn->conn_state = tp->t_state; - pn->max_seg_size = tp->t_maxseg; + pn->mss = tp->t_maxseg; pn->srtt = ((uint64_t)tp->t_srtt * tick) >> TCP_RTT_SHIFT; pn->sack_enabled = (tp->t_flags & TF_SACK_PERMIT) != 0; - pn->flags = tp->t_flags; + pn->t_flags = tp->t_flags; pn->rto = tp->t_rxtcur * tick; pn->snd_buf_hiwater = inp->inp_socket->so_snd.sb_hiwat; pn->snd_buf_cc = sbused(&inp->inp_socket->so_snd); @@ -796,7 +801,6 @@ siftr_chkpkt(struct mbuf **m, struct ifnet *ifp, int flags, info.lport = ntohs(inp->inp_lport); info.fport = ntohs(inp->inp_fport); info.key = hash_id; - info.ipver = INP_IPV4; hash_node = siftr_new_hash_node(info, dir, ss); } @@ -946,7 +950,6 @@ siftr_chkpkt6(struct mbuf **m, struct ifnet *ifp, int flags, info.lport = ntohs(inp->inp_lport); info.fport = ntohs(inp->inp_fport); info.key = hash_id; - info.ipver = INP_IPV6; hash_node = siftr_new_hash_node(info, dir, ss); } From nobody Mon Jul 3 12:46:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qvlzp2bjhz4lJv8; Mon, 3 Jul 2023 12:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qvlzp2BBdz3D2T; Mon, 3 Jul 2023 12:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688388406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BQ5TLa0Nr1Xqyy/vlYUsAibS/bzQhr57zdRS0QFJyU=; b=gODtKPoMccD3Mf6tyhP7tq492b61AF1LLspHjqVHskRLWWyQ8sfh3+vX15p3IQnH0lNPC7 dbocHyeIaHU/i/1/PG2BU1Nf4UIIRwKimc6NOm8o4DRykPRcdVSk3cKlDQDrsv9IYMY3Xj 7PF8fA6C42OIhxqFx/JciVUUDm7/9m8/a5DaIpU8Fhpeemim5yr5zZnpOiTjJLl2UZB/v4 LuKb+iIeQj1SK5hoQ+UJx+51+OQ7FLXZsf0BiUAvOxZAEGlJwSICGJqUy4DRU6Vjvk0tQm CAQjbVol1j7dyK+LQ7JvHrPkEKBQAPQp/pHJoLpP2RRtJEzRISEcMH4ORTKJ8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688388406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BQ5TLa0Nr1Xqyy/vlYUsAibS/bzQhr57zdRS0QFJyU=; b=hPWDbdtC26ZRm4Wfjso9ln+9OwraHasYdzW5JdTxkm5YDR05YVFLV81JlFk8l2KcFLXe+i lt70c5prItTggzeAFHOeQyd7VIQpcn1edJfz3E5XA1UBDgkTcwsu25ptcLQRC8JSt+xP87 pUU5EFrAFPJagCG+Lislz1VgBIMVI79RaDPmMFgw0sLoCqGHLOoX/Sdwjt9PXQiLsXnFNP 91ENhLPSLN2nzlZcC2xhbRbG/n+K/J+KIcabRXuCZz7YuzQb1sMMDn+HTSAHnJ4JC/IJUX NlU/7ogy0xNOqvSxOVSFumH9LpUU83Vqd2aNxII2rEsMNIxkjulv9slbAiN5mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688388406; a=rsa-sha256; cv=none; b=oD5KGeeoqz1jamJCog/wJxd/TKit5qhr+Y/fr4S0G3UsfLu6cFwYAEHnFBP2Rk7eluHrg5 pVY6TQFViGb/wEMvcOjeRQ1kL+0Dn2GRjOMLaKQUzML67U/gv7uQ6URJQJN1YHslc7ub2f gMmCtyanGglkgBlGdE/n8z5bLAIL2dwcqurNt+X9/E5S7CJf6LQ7WvB7NU5SZG38mdIR9X d36jWjN1t6/a8429hcFQp10Ncau/UNObKC4PGYXesMq1B1hwEIEx9iN1wrkaM2XjZdrXgF bLXA6W+VlMFlUx7Ek/hJViRyds/Abkt7uszrNRzw1DvFSYB2a7CsU8nz80Qkag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qvlzp1DW9zrDK; Mon, 3 Jul 2023 12:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 363Ckk9a069361; Mon, 3 Jul 2023 12:46:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363Ckktu069360; Mon, 3 Jul 2023 12:46:46 GMT (envelope-from git) Date: Mon, 3 Jul 2023 12:46:46 GMT Message-Id: <202307031246.363Ckktu069360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 5aee3e14d491 - main - syslog.3: document ident[N] format List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5aee3e14d4914c7c99bce80da17b3100cb1f4490 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=5aee3e14d4914c7c99bce80da17b3100cb1f4490 commit 5aee3e14d4914c7c99bce80da17b3100cb1f4490 Author: Eugene Grosbein AuthorDate: 2023-07-03 12:35:37 +0000 Commit: Eugene Grosbein CommitDate: 2023-07-03 12:46:40 +0000 syslog.3: document ident[N] format When libc switched to generation of logs as per RFC 5424, that change broke application ability to insert specific process id using ident[N] format, the feature existed for decades. Some processes rely on it (including logger and syslogd). Later the regression was fixed but the feature remained undocumented. This change documents it. MFC after: 1 week --- lib/libc/gen/syslog.3 | 7 ++++++- usr.bin/logger/logger.1 | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3 index ce7dfdccf55e..1c19444405e9 100644 --- a/lib/libc/gen/syslog.3 +++ b/lib/libc/gen/syslog.3 @@ -28,7 +28,7 @@ .\" @(#)syslog.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 13, 2021 +.Dd July 3, 2023 .Dt SYSLOG 3 .Os .Sh NAME @@ -131,6 +131,11 @@ The .Fa ident argument is a string that will be prepended to every message. +It may be formatted as +.Fa ident[N] +in which case decimal number +.Fa N +replaces the process id within messages. The .Fa logopt argument diff --git a/usr.bin/logger/logger.1 b/usr.bin/logger/logger.1 index 9842ffc0af1c..a2774b9e3500 100644 --- a/usr.bin/logger/logger.1 +++ b/usr.bin/logger/logger.1 @@ -28,7 +28,7 @@ .\" @(#)logger.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 16, 2022 +.Dd July 3, 2023 .Dt LOGGER 1 .Os .Sh NAME @@ -74,6 +74,8 @@ tries to send the message to all addresses. Log the process id of the logger process with each line. This flag is ignored and the process id is always logged. +See also +.Fl t . .It Fl s Log the message to standard error, as well as the system log. .It Fl f Ar file @@ -153,6 +155,10 @@ and Mark every line in the log with the specified .Ar tag rather than the default of current login name. +Use +.Fl t Ar tag[N] +to insert specific decimal process id instead of id of +.Nm . .It Ar message Write the message to log; if not specified, and the .Fl f From nobody Mon Jul 3 15:14:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QvqGm1r52z4lDRC; Mon, 3 Jul 2023 15:14: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 4QvqGm18JVz44pK; Mon, 3 Jul 2023 15:14:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688397296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fQJHjnDxIAD/lodPRoO6G3TZZyk0OCcxIb5ZdKSMOGc=; b=hWxVi7wYVdibxvbxoz+vAUvdEvkaW4SoZ3YOv9FUgLGwSEaPbzeBgYgbulkfn3VWZUxITp ImqjyleXcgtN4vvtWzR5TwIBNbbMCnOrrTk+AGO2VstHmirBfpXr8oNwTn5G9EjdvUYK/S QGMMWJkmz7xpWNQPzMhvz8pcBsAVzlPr0vOiXF4P3cNah4zaDnrkfllJvRZWPNN5q9RhhR QhpGkd92HdCqFFs0JEKMvM8AX3VjU/OiCBASLx9TRQ4YRxVyyhCNKm/tkuVie3jv5bDVqo PjEBH63wbv2EzYbw1FZ8kfm1NlQA6uP6wYuhTCySIefBmPtM/6Sl4LzVq0n6Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688397296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fQJHjnDxIAD/lodPRoO6G3TZZyk0OCcxIb5ZdKSMOGc=; b=yJcCPsBGFPGVsDO5N2vCnYYRNAIqEV3ZYzJYo7U3S2A0XZPA2UIud80gaFeqyzwLtF5c/o gygPnzh4sVX4RnNR2AFY35pVTNkVveewqHSqlmQO6vAchjnJyH9V1YWpVv0w5rsRZU2tNZ IOhCd+nc+d1MWeA563yikvz1rqw5PPevU5mUupcTBarkT0l9jitk31KulZDwgCYMCOFs8a gmuh765B1AEvmyAqyCN5T3GrMRkK23ML8YRNRuHVlnmam7rvlfGTjjpzGUuIDqvnWlK9u6 wjUfiKGBYn32y83OFseKnfk2w0k+lZubc35+sHZ9XMAdLuaFJCkR32kBrVIQDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688397296; a=rsa-sha256; cv=none; b=t7aBl0zpNGFhEOzxZvojoNzw1vJphpHiB2FpaBEOl418xYlu3skUGimhceU3by2XbNcyrh rK0qt/AxhkYNIBTukLrWs+zthl0QaiDjpKW+NwSvYwWMyZ74b3FlgvOCHsAuqGBHudDaJw gmVdK8rg4X6hPHJWwvsbc6tv/ancxPZV6p308GyWf83xaHfy9g0rtcgD6GThOkfIfpfu7J ctWFtjURNzUsOwf/MNjMvU1cuGZINEQNyk1NT2zZ15b3dLWf5QcuvU/1La393RMeDUDOMl 1zipKn2y5wCZ09EjAsXqaIbWM+PY0tAVQhDQyp8EtN/+/sKqa9oqeYn1OuQctg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QvqGm0BlwzvKC; Mon, 3 Jul 2023 15:14: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 363FEtIn017852; Mon, 3 Jul 2023 15:14:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363FEtrp017851; Mon, 3 Jul 2023 15:14:55 GMT (envelope-from git) Date: Mon, 3 Jul 2023 15:14:55 GMT Message-Id: <202307031514.363FEtrp017851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 77d9e708c07b - stable/13 - asa: Error out if writing to stdout failed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 77d9e708c07b7bbbebc8e729f8fb339fb99c2d99 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=77d9e708c07b7bbbebc8e729f8fb339fb99c2d99 commit 77d9e708c07b7bbbebc8e729f8fb339fb99c2d99 Author: Dag-Erling Smørgrav AuthorDate: 2023-06-15 19:23:19 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-07-03 15:13:11 +0000 asa: Error out if writing to stdout failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40562 (cherry picked from commit 9e379f9639d51442ad1d5e1800c687ef2c954901) asa: Read from stdin if *argv is "-". MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40563 (cherry picked from commit f08f90e6987775f88d25efbd8762c361819f40ba) asa: Add some unit tests. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40564 (cherry picked from commit b7412da2e122d9274341ef840c6918409bc523b3) --- etc/mtree/BSD.tests.dist | 2 + usr.bin/asa/Makefile | 5 ++- usr.bin/asa/asa.c | 25 ++++++++--- usr.bin/asa/tests/Makefile | 4 ++ usr.bin/asa/tests/asa_test.sh | 99 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 126 insertions(+), 9 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index eb62812bfcd8..35d8e9505b9a 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -886,6 +886,8 @@ usr.bin apply .. + asa + .. awk .. basename diff --git a/usr.bin/asa/Makefile b/usr.bin/asa/Makefile index c2a221ae027b..a29db0f31781 100644 --- a/usr.bin/asa/Makefile +++ b/usr.bin/asa/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.2 1995/03/25 18:04:51 glass Exp $ -# $FreeBSD$ +.include PROG= asa +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests .include diff --git a/usr.bin/asa/asa.c b/usr.bin/asa/asa.c index 22174ed340cd..a6c3d7d7c1e5 100644 --- a/usr.bin/asa/asa.c +++ b/usr.bin/asa/asa.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static void asa(FILE *); @@ -71,16 +72,23 @@ main(int argc, char *argv[]) asa(stdin); else { while ((fn = *argv++) != NULL) { - if ((fp = fopen(fn, "r")) == NULL) { - warn("%s", fn); - exval = 1; - continue; - } - asa(fp); - fclose(fp); + if (strcmp(fn, "-") == 0) { + asa(stdin); + } else { + if ((fp = fopen(fn, "r")) == NULL) { + warn("%s", fn); + exval = 1; + continue; + } + asa(fp); + fclose(fp); + } } } + if (fflush(stdout) != 0) + err(1, "stdout"); + exit(exval); } @@ -140,4 +148,7 @@ asa(FILE *f) putchar('\n'); } + + if (ferror(stdout) != 0) + err(1, "stdout"); } diff --git a/usr.bin/asa/tests/Makefile b/usr.bin/asa/tests/Makefile new file mode 100644 index 000000000000..c8c0cde1b3a2 --- /dev/null +++ b/usr.bin/asa/tests/Makefile @@ -0,0 +1,4 @@ +PACKAGE= tests +ATF_TESTS_SH= asa_test + +.include diff --git a/usr.bin/asa/tests/asa_test.sh b/usr.bin/asa/tests/asa_test.sh new file mode 100644 index 000000000000..429342d530e4 --- /dev/null +++ b/usr.bin/asa/tests/asa_test.sh @@ -0,0 +1,99 @@ +# +# Copyright (c) 2023 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +a="The magic words are" +b="Squeamish Ossifrage" + +atf_check_asa() { + atf_check -o file:"$2" asa "$1" + atf_check -o file:"$2" asa <"$1" + atf_check -o file:"$2" asa - <"$1" +} + +atf_test_case space +space_head() { + atf_set descr "First character on line is ' '" +} +space_body() { + printf " %s\n %s\n" "$a" "$b" >infile + printf "%s\n%s\n" "$a" "$b" >outfile + atf_check_asa infile outfile +} + +atf_test_case zero +zero_head() { + atf_set descr "First character on line is '0'" +} +zero_body() { + printf " %s\n0%s\n" "$a" "$b" >infile + printf "%s\n\n%s\n" "$a" "$b" >outfile + atf_check_asa infile outfile +} + +atf_test_case one +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 + atf_check_asa infile outfile +} + +atf_test_case plus +plus_head() { + atf_set descr "First character on line is '+'" +} +plus_body() { + printf " %s\n+%s\n" "$a" "$b" >infile + printf "%s\r%s\n" "$a" "$b" >outfile + atf_check_asa infile outfile +} + +atf_test_case plus_top +plus_top_head() { + atf_set descr "First character in input is '+'" +} +plus_top_body() { + printf "+%s\n+%s\n" "$a" "$b" >infile + printf "%s\r%s\n" "$a" "$b" >outfile + atf_check_asa infile outfile +} + +atf_test_case stdout +stdout_head() { + atf_set descr "Failure to write to stdout" +} +stdout_body() { + ( + trap "" PIPE + echo " $a $b" | asa 2>stderr + echo $? >result + ) | true + atf_check -o inline:"1\n" cat result + atf_check -o match:"stdout" cat stderr +} + +atf_test_case dashdash +dashdash_head() { + atf_set descr "Use -- to end options" +} +dashdash_body() { + echo " $a $b" >-infile + atf_check -s not-exit:0 -e match:"illegal option" asa -infile + atf_check -o inline:"$a $b\n" asa -- -infile +} + +atf_init_test_cases() +{ + atf_add_test_case space + atf_add_test_case zero + atf_add_test_case one + atf_add_test_case plus + atf_add_test_case plus_top + atf_add_test_case stdout + atf_add_test_case dashdash +} From nobody Mon Jul 3 15:14:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QvqGn2bqgz4lDW9; Mon, 3 Jul 2023 15:14: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 4QvqGn21lgz44vw; Mon, 3 Jul 2023 15:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688397297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V3LNAFJLsgWsNLKsqN8QT9rAhvU9awWePHAzd2CS3pg=; b=b0YNvPTjl8AIKbOTckVD4w2X7n8Zj+O2tS1DpEGXKU+L14UxiztvdqjzVgKSRjygSLfnqA WDEo7ar9ORIRU6EK8bFSCnT5RF0aSTlTGZS8o7FprlIpwCCeqU5mq9poQoG2CwGOnt5Aqv 8khWfPsPJI0J1htFL1GwDF1CnP5lBROFof/ShU4B0+OgL9tKddL+qvN5w3N+daQc5qTzJW dG292+quJdcixdSd+g4g5PeYc629Nq3zeP9eSI+FBZ2L2UnrYpre6haB/ZlVVZCcwa50FI T3t7JSooINUgGXJqk+/2mZnVCV8ZXtO7pT4B9Be5QIvWXG7BNS4N2bERFiWZOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688397297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V3LNAFJLsgWsNLKsqN8QT9rAhvU9awWePHAzd2CS3pg=; b=vGdAarJEUEhWu2EJe2etcJDLXktTjd6ghrY/oOipa/pWD8TvsjG+T+vSq6qgJGiCGhAAGr v8LVT8EQFeK+381EdvbIzAhpL7bKRxn19yLharcAbIyu5KK7QSuApgxVMp701sW1Sp1nO/ LveLgd75hZUVpZ7YFUb3O7R4d3W6bqyrPFegOSLpH/mZ3jR6j70iEP9Qg0bXbXsm96K1Bn komrME2O/CAP7N0p7EbjTVAFvscpXKakScafuEV5+4gOodNSHvFunn1JX8DXKAuva8MSJ7 /PqqlaFPQ1JoRSCVqgXYutyi6ve/JIaj0a3Pl0Oq31+McHl7XE+pzWjALgpbtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688397297; a=rsa-sha256; cv=none; b=r9Yn853aKY9eRflMxAk56xwr9bBZN8DoMe34h/21nN5UF5IZIvZx1Oxz+P0NK8nJz5wVvi sr13pDeL5hvSqeJ4C16bQbGrv2GkLY4qvLCt6dxHFUuZcskS1Sz8PNq5N00AaW+RA18w3T /QBFPWWR7aPTqOvMGuaG7MMoc77a5CIs3rxxUieWZ2qS8Dk3HqkjtzHtWKOouuN94d1L/y QlmpISrwBbyB7xl+WVAQOQ2t+YgorQhI+STZaZkvYK9EdLIHPKWeYwXDyycTEc5+GvKjkO 16rcVUMZ7OP8diJ7Q0O/pOKATya9s7zbU/2r+VlzvjgbwCJQGI+cjMbgj/AulQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QvqGn14wFzvM0; Mon, 3 Jul 2023 15:14: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 363FEvEf017892; Mon, 3 Jul 2023 15:14:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363FEv6P017891; Mon, 3 Jul 2023 15:14:57 GMT (envelope-from git) Date: Mon, 3 Jul 2023 15:14:57 GMT Message-Id: <202307031514.363FEv6P017891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 2c1f52c11f17 - stable/13 - m4: Support long options. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c1f52c11f175c8da3e6c59e967d9807dfbc28b7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2c1f52c11f175c8da3e6c59e967d9807dfbc28b7 commit 2c1f52c11f175c8da3e6c59e967d9807dfbc28b7 Author: Dag-Erling Smørgrav AuthorDate: 2023-06-21 20:58:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-07-03 15:13:11 +0000 m4: Support long options. The option names are identical to those of the equivalent options in GNU m4, except of course for --gnu which does not exist in GNU m4. While here, make the argument to -d / --debug optional, with the same default behavior as in GNU m4, and document it properly. Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D40694 (cherry picked from commit 47b32f8f93b46ce2c7fe3973c331a40096b529da) m4: Add -G option which reverses -g. This matches GNU m4's -G / --traditional option, and although BSD m4 in non-GNU mode is not exactly identical to GNU mode in traditional mode, it's close enough. Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D40697 (cherry picked from commit 6c9ed64c94f192eda8c8b5e9e2b92ff93da36de2) m4: Miscellaneous man page fixes. Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40701 (cherry picked from commit db4c5b8a05bbd54a00dad145a91902d71c1f92a1) Fix spelling of "behavior" to be consistent with the rest of the file (cherry picked from commit 764464af49688e74fd6d803df0404ca4726dd460) --- usr.bin/m4/m4.1 | 70 +++++++++++++++++++++++++++++++++++++------------------ usr.bin/m4/main.c | 24 +++++++++++++++++-- 2 files changed, 69 insertions(+), 25 deletions(-) diff --git a/usr.bin/m4/m4.1 b/usr.bin/m4/m4.1 index 83f124dd3dfc..ffc60af22d30 100644 --- a/usr.bin/m4/m4.1 +++ b/usr.bin/m4/m4.1 @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2021 +.Dd June 21, 2023 .Dt M4 1 .Os .Sh NAME @@ -41,13 +41,13 @@ .Nd macro language processor .Sh SYNOPSIS .Nm -.Op Fl EgPs +.Op Fl EGgPs .Oo .Sm off .Fl D Ar name Op No = Ar value .Sm on .Oc -.Op Fl d Ar flags +.Op Fl d Oo Oo +- Oc Ns Ar flags Oc .Op Fl I Ar dirname .Op Fl o Ar filename .Op Fl t Ar macro @@ -98,15 +98,14 @@ recognized as special when not followed by an open parenthesis. .Pp The options are as follows: .Bl -tag -width Ds -.It Fl D Ns Ar name Ns Op = Ns Ar value +.It Fl D Ns Ar name Ns Oo = Ns Ar value Oc , Fl -define Ns = Ns Ar name Ns Oo = Ns Ar value Oc Define the symbol .Ar name to have some value (or .Dv NULL ) . -.It Fl d Ar "flags" -Set trace flags. -.Ar flags -may hold the following: +.It Fl d Oo Oo +|- Oc Ns Ar flags Oc , Fl -debug Ns = Ns Oo Oo +|- Oc Ns Ar flags Oc +Set or unset trace flags. +The trace flags are as follows: .Bl -tag -width Ds .It Ar a print macro arguments. @@ -128,9 +127,21 @@ number macro expansions. turn on all options. .El .Pp +If +.Qq + +or +.Qq - +is used, the specified flags are added to or removed from the set of +active trace flags, respectively; otherwise, the specified flags +replace the set of active trace flags. +.Pp +Specifying this option without an argument is equivalent to specifying +it with the argument +.Qq aeq . +.Pp By default, trace is set to .Qq eq . -.It Fl E +.It Fl E , Fl -fatal-warnings Set warnings to be fatal. When a single .Fl E @@ -144,38 +155,51 @@ flags are specified, execution will halt upon issuing the first warning and .Nm will exit with a non-zero exit status. -This behaviour matches GNU-m4 1.4.9 and later. -.It Fl g -Activate GNU-m4 compatibility mode. -In this mode, translit handles simple character -ranges (e.g., a-z), regular expressions mimic emacs behavior, -multiple m4wrap calls are handled as a stack, +This behavior matches GNU m4 1.4.9 and later. +.It Fl G , Fl -traditional +Disable GNU compatibility mode (see +.Fl g +below). +.It Fl g , Fl -gnu +Enable GNU compatibility mode. +In this mode, +.Ic translit +handles simple character ranges (e.g., +.Sq a-z ) , +regular expressions mimic Emacs behavior, +multiple +.Ic m4wrap +calls are handled as a stack, the number of diversions is unlimited, empty names for macro definitions are allowed, -and eval understands +.Ic undivert +can be used to include files, +and +.Ic eval +understands .Sq 0rbase:value numbers. -.It Fl I Ar "dirname" +.It Fl I Ar dirname , Fl -include Ns = Ns Ar dirname Add directory .Ar dirname to the include path. -.It Fl o Ar filename +.It Fl o Ar filename , Fl -error-output Ns = Ns Ar filename Send trace output to .Ar filename . -.It Fl P +.It Fl P , Fl -prefix-builtins Prefix all built-in macros with .Sq m4_ . For example, instead of writing .Ic define , use .Ic m4_define . -.It Fl s +.It Fl s , Fl -synclines Output line synchronization directives, suitable for .Xr cpp 1 . -.It Fl t Ar macro +.It Fl t Ar macro , Fl -trace Ns = Ns Ar macro Turn tracing on for .Ar macro . -.It Fl "U" Ns Ar "name" +.It Fl U Ns Ar name , Fl -undefine Ns = Ns Ar name Undefine the symbol .Ar name . .El @@ -474,7 +498,7 @@ utility is compliant with the specification. .Pp The flags -.Op Fl dEgIPot +.Op Fl dEGgIPot and the macros .Ic builtin , .Ic esyscmd , diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 292dc5eb3f76..f776ca8594e4 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -60,6 +61,22 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #include "pathnames.h" +static const char *shortopts = "+D:d::EGgI:o:Pst:U:"; +static const struct option longopts[] = { + { "define", required_argument, NULL, 'D' }, + { "debug", optional_argument, NULL, 'd' }, + { "fatal-warnings", no_argument, NULL, 'E' }, + { "traditional", no_argument, NULL, 'G' }, + { "gnu", no_argument, NULL, 'g' }, + { "include", required_argument, NULL, 'I' }, + { "error-output", required_argument, NULL, 'o' }, + { "prefix-builtins", no_argument, NULL, 'P' }, + { "synclines", no_argument, NULL, 's' }, + { "trace", required_argument, NULL, 't' }, + { "undefine", required_argument, NULL, 'U' }, + { NULL, 0, NULL, 0 }, +}; + stae *mstack; /* stack of m4 machine */ char *sstack; /* shadow stack, for string space extension */ static size_t STACKMAX; /* current maximum size of stack */ @@ -188,7 +205,7 @@ main(int argc, char *argv[]) outfile = NULL; resizedivs(MAXOUT); - while ((c = getopt(argc, argv, "gst:d:D:EU:o:I:P")) != -1) + while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) switch(c) { case 'D': /* define something..*/ @@ -214,11 +231,14 @@ main(int argc, char *argv[]) case 'U': /* undefine... */ macro_popdef(optarg); break; + case 'G': + mimic_gnu = 0; + break; case 'g': mimic_gnu = 1; break; case 'd': - set_trace_flags(optarg); + set_trace_flags(optarg ? optarg : "aeq"); break; case 's': synch_lines = 1; From nobody Mon Jul 3 15:14:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QvqGp5rktz4lDWG; Mon, 3 Jul 2023 15:14: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 4QvqGp5BZqz4519; Mon, 3 Jul 2023 15:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688397298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GhUn9Vpk/58joqzV9c8osLE42rDxdwxhpiV0gdH0tbc=; b=XoimvH6nwusjN+dietx8zXvCW9fNOVL3srIV2/6JPdo8yFOWySjSmh1fAFcUjTJ4pVjPBH KyxPeYtUZpXkZhC1GCrRODGCmTfnPd5v2CqLPdifMmTWZUF8Wplq0CrGT10HJMrT/z/HLR jYvNvCciPaRVGkjBxesMhM8s2Muue6J/Ci4TAwhCO7YyY810VYMVwAc41ddZMvMjUBJmhf tioLcL1hpfejT7aOXPdOd2DJokjW1OzILAjjdmrygwGbPEIRJjcrts3LNNMqRfHEanB5Yh PKiugP3UPvB0BWTi6fAjOGu3MaEucgCUx0JYg4ZfBXzGnCbm2QXlo1oxuW1dfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688397298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GhUn9Vpk/58joqzV9c8osLE42rDxdwxhpiV0gdH0tbc=; b=mnFiLdoRAgTH8UqrG6NlvJyu5Q0qtlonOyjHmzDVxO3GnjzL9MXJaIn3FNeHxOLh8f0yrZ sSndtLeToPXiveRymPUH+CLKR7HhxXJq4yNErQTGN41CKvLnPo+jTGvnASdD39OGJ0s7Nh srbqraHA/UySXkfVw3lFoopLz4zXMs4NEJSIqfApS4KGQvNxgZPzuMmu0Nd0Llo7jQeZBC 7JoIIKqZsYu+KT5pUCGCaVtUyA1FNZHUJQkj4SX2nnXHILzHNcevBtvu93W7/chTmpZ+dW ceFZvQ9uel8AU4LDy1vS9jDQ65qGMI9DZyh5bIldNOsELmGxzqzegyneAafPCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688397298; a=rsa-sha256; cv=none; b=dX2gcDDJC6EEJYeyoBj74H0IHevauFN55BN6Qs+pauoM6XtwiUAyPDtSZ8zbiMQoIkujX5 OuP81tGoHEGi33vK3yR1rxdTefRl3nbX88txht7aQhvf8s2A4reRB0VEruhNzIJc9T1+8n 0IrIJfUI2q3Pp52lfl7V49y+x+mgDAkJaVA0QDSEoRHu/szpNiYTsuSUmIb+m4stZoeyS4 jhWElNimNnVO1eDIAh7IAwehUUcaaVgVoQd7KWQLKd2fG5cDn3Nf40V3HohwPyeoY4fQHc kq9Ue4j5/+7kkMn1msTOvYT0IzejDqqHcdkTeTSvv5eMpQr+c6V02ByS/ExbLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QvqGp4FW8zvGP; Mon, 3 Jul 2023 15:14: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 363FEwXx017955; Mon, 3 Jul 2023 15:14:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363FEwf3017953; Mon, 3 Jul 2023 15:14:58 GMT (envelope-from git) Date: Mon, 3 Jul 2023 15:14:58 GMT Message-Id: <202307031514.363FEwf3017953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: a86b5f4f063e - stable/13 - Upgrade to OpenPAM Ximenia. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a86b5f4f063e146597ee1f851c279d772d09afe9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a86b5f4f063e146597ee1f851c279d772d09afe9 commit a86b5f4f063e146597ee1f851c279d772d09afe9 Author: Dag-Erling Smørgrav AuthorDate: 2023-06-27 17:03:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-07-03 15:13:11 +0000 Upgrade to OpenPAM Ximenia. Merge commit '5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b' (cherry picked from commit 3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456) --- contrib/openpam/CREDITS | 1 + contrib/openpam/HISTORY | 11 + contrib/openpam/LICENSE | 2 +- contrib/openpam/Makefile.am | 31 +- contrib/openpam/Makefile.in | 99 +- contrib/openpam/RELNOTES | 4 +- contrib/openpam/aclocal.m4 | 119 +- contrib/openpam/autogen.sh | 3 - contrib/openpam/bin/Makefile.am | 2 - contrib/openpam/bin/Makefile.in | 29 +- .../openpam/bin/openpam_dump_policy/Makefile.am | 2 - .../openpam/bin/openpam_dump_policy/Makefile.in | 29 +- .../bin/openpam_dump_policy/openpam_dump_policy.c | 2 - contrib/openpam/bin/pamtest/Makefile.am | 2 - contrib/openpam/bin/pamtest/Makefile.in | 29 +- contrib/openpam/bin/pamtest/pamtest.1 | 4 +- contrib/openpam/bin/pamtest/pamtest.c | 2 - contrib/openpam/bin/su/Makefile.am | 2 - contrib/openpam/bin/su/Makefile.in | 29 +- contrib/openpam/bin/su/su.1 | 4 +- contrib/openpam/bin/su/su.c | 2 - contrib/openpam/compile | 6 +- contrib/openpam/config.guess | 747 +- contrib/openpam/config.h.in | 114 +- contrib/openpam/config.sub | 1674 +- contrib/openpam/configure | 23391 +++++++++++-------- contrib/openpam/configure.ac | 55 +- contrib/openpam/depcomp | 2 +- contrib/openpam/doc/Makefile.am | 2 - contrib/openpam/doc/Makefile.in | 29 +- contrib/openpam/doc/man/Makefile.am | 2 - contrib/openpam/doc/man/Makefile.in | 27 +- contrib/openpam/doc/man/openpam.3 | 5 +- contrib/openpam/doc/man/openpam.man | 3 - contrib/openpam/doc/man/openpam_borrow_cred.3 | 3 +- contrib/openpam/doc/man/openpam_free_data.3 | 3 +- contrib/openpam/doc/man/openpam_free_envlist.3 | 3 +- contrib/openpam/doc/man/openpam_get_feature.3 | 3 +- contrib/openpam/doc/man/openpam_get_option.3 | 3 +- contrib/openpam/doc/man/openpam_log.3 | 3 +- contrib/openpam/doc/man/openpam_nullconv.3 | 3 +- contrib/openpam/doc/man/openpam_readline.3 | 3 +- contrib/openpam/doc/man/openpam_readlinev.3 | 3 +- contrib/openpam/doc/man/openpam_readword.3 | 3 +- contrib/openpam/doc/man/openpam_restore_cred.3 | 3 +- contrib/openpam/doc/man/openpam_set_feature.3 | 3 +- contrib/openpam/doc/man/openpam_set_option.3 | 3 +- contrib/openpam/doc/man/openpam_straddch.3 | 3 +- contrib/openpam/doc/man/openpam_subst.3 | 3 +- contrib/openpam/doc/man/openpam_ttyconv.3 | 3 +- contrib/openpam/doc/man/pam.3 | 5 +- contrib/openpam/doc/man/pam.conf.5 | 4 +- contrib/openpam/doc/man/pam.man | 3 - contrib/openpam/doc/man/pam_acct_mgmt.3 | 3 +- contrib/openpam/doc/man/pam_authenticate.3 | 3 +- contrib/openpam/doc/man/pam_chauthtok.3 | 3 +- contrib/openpam/doc/man/pam_close_session.3 | 3 +- contrib/openpam/doc/man/pam_conv.3 | 4 +- contrib/openpam/doc/man/pam_end.3 | 3 +- contrib/openpam/doc/man/pam_error.3 | 3 +- contrib/openpam/doc/man/pam_get_authtok.3 | 3 +- contrib/openpam/doc/man/pam_get_data.3 | 3 +- contrib/openpam/doc/man/pam_get_item.3 | 3 +- contrib/openpam/doc/man/pam_get_user.3 | 3 +- contrib/openpam/doc/man/pam_getenv.3 | 3 +- contrib/openpam/doc/man/pam_getenvlist.3 | 3 +- contrib/openpam/doc/man/pam_info.3 | 3 +- contrib/openpam/doc/man/pam_open_session.3 | 3 +- contrib/openpam/doc/man/pam_prompt.3 | 3 +- contrib/openpam/doc/man/pam_putenv.3 | 3 +- contrib/openpam/doc/man/pam_set_data.3 | 3 +- contrib/openpam/doc/man/pam_set_item.3 | 3 +- contrib/openpam/doc/man/pam_setcred.3 | 3 +- contrib/openpam/doc/man/pam_setenv.3 | 3 +- contrib/openpam/doc/man/pam_sm_acct_mgmt.3 | 3 +- contrib/openpam/doc/man/pam_sm_authenticate.3 | 3 +- contrib/openpam/doc/man/pam_sm_chauthtok.3 | 3 +- contrib/openpam/doc/man/pam_sm_close_session.3 | 3 +- contrib/openpam/doc/man/pam_sm_open_session.3 | 3 +- contrib/openpam/doc/man/pam_sm_setcred.3 | 3 +- contrib/openpam/doc/man/pam_start.3 | 3 +- contrib/openpam/doc/man/pam_strerror.3 | 3 +- contrib/openpam/doc/man/pam_verror.3 | 3 +- contrib/openpam/doc/man/pam_vinfo.3 | 3 +- contrib/openpam/doc/man/pam_vprompt.3 | 3 +- contrib/openpam/freebsd/Makefile.in | 33 + contrib/openpam/include/Makefile.am | 2 - contrib/openpam/include/Makefile.in | 29 +- contrib/openpam/include/security/Makefile.am | 2 - contrib/openpam/include/security/Makefile.in | 29 +- contrib/openpam/include/security/openpam.h | 2 - contrib/openpam/include/security/openpam_attr.h | 4 - contrib/openpam/include/security/openpam_version.h | 8 +- contrib/openpam/include/security/pam_appl.h | 2 - contrib/openpam/include/security/pam_constants.h | 2 - contrib/openpam/include/security/pam_modules.h | 2 - contrib/openpam/include/security/pam_types.h | 2 - contrib/openpam/install-sh | 172 +- contrib/openpam/lib/Makefile.am | 2 - contrib/openpam/lib/Makefile.in | 29 +- contrib/openpam/lib/libpam/Makefile.am | 2 - contrib/openpam/lib/libpam/Makefile.in | 29 +- contrib/openpam/lib/libpam/openpam_asprintf.c | 2 - contrib/openpam/lib/libpam/openpam_asprintf.h | 2 - contrib/openpam/lib/libpam/openpam_borrow_cred.c | 2 - .../openpam/lib/libpam/openpam_check_owner_perms.c | 2 - contrib/openpam/lib/libpam/openpam_configure.c | 2 - contrib/openpam/lib/libpam/openpam_constants.c | 2 - contrib/openpam/lib/libpam/openpam_constants.h | 2 - contrib/openpam/lib/libpam/openpam_cred.h | 2 - contrib/openpam/lib/libpam/openpam_ctype.h | 2 - contrib/openpam/lib/libpam/openpam_debug.h | 2 - contrib/openpam/lib/libpam/openpam_dispatch.c | 2 - contrib/openpam/lib/libpam/openpam_dlfunc.h | 2 - contrib/openpam/lib/libpam/openpam_dynamic.c | 2 - contrib/openpam/lib/libpam/openpam_features.c | 2 - contrib/openpam/lib/libpam/openpam_features.h | 2 - contrib/openpam/lib/libpam/openpam_findenv.c | 2 - contrib/openpam/lib/libpam/openpam_free_data.c | 2 - contrib/openpam/lib/libpam/openpam_free_envlist.c | 2 - contrib/openpam/lib/libpam/openpam_get_feature.c | 2 - contrib/openpam/lib/libpam/openpam_get_option.c | 2 - contrib/openpam/lib/libpam/openpam_impl.h | 2 - contrib/openpam/lib/libpam/openpam_load.c | 2 - contrib/openpam/lib/libpam/openpam_log.c | 2 - contrib/openpam/lib/libpam/openpam_nullconv.c | 2 - contrib/openpam/lib/libpam/openpam_readline.c | 2 - contrib/openpam/lib/libpam/openpam_readlinev.c | 4 - contrib/openpam/lib/libpam/openpam_readword.c | 3 - contrib/openpam/lib/libpam/openpam_restore_cred.c | 2 - contrib/openpam/lib/libpam/openpam_set_feature.c | 2 - contrib/openpam/lib/libpam/openpam_set_option.c | 5 +- contrib/openpam/lib/libpam/openpam_static.c | 2 - contrib/openpam/lib/libpam/openpam_straddch.c | 4 - contrib/openpam/lib/libpam/openpam_strlcat.c | 2 - contrib/openpam/lib/libpam/openpam_strlcat.h | 2 - contrib/openpam/lib/libpam/openpam_strlcmp.h | 2 - contrib/openpam/lib/libpam/openpam_strlcpy.c | 2 - contrib/openpam/lib/libpam/openpam_strlcpy.h | 2 - contrib/openpam/lib/libpam/openpam_strlset.c | 2 - contrib/openpam/lib/libpam/openpam_strlset.h | 2 - contrib/openpam/lib/libpam/openpam_subst.c | 7 +- contrib/openpam/lib/libpam/openpam_ttyconv.c | 2 - contrib/openpam/lib/libpam/openpam_vasprintf.c | 2 - contrib/openpam/lib/libpam/openpam_vasprintf.h | 2 - contrib/openpam/lib/libpam/pam_acct_mgmt.c | 2 - contrib/openpam/lib/libpam/pam_authenticate.c | 2 - .../lib/libpam/pam_authenticate_secondary.c | 2 - contrib/openpam/lib/libpam/pam_chauthtok.c | 2 - contrib/openpam/lib/libpam/pam_close_session.c | 2 - contrib/openpam/lib/libpam/pam_end.c | 2 - contrib/openpam/lib/libpam/pam_error.c | 2 - contrib/openpam/lib/libpam/pam_get_authtok.c | 2 - contrib/openpam/lib/libpam/pam_get_data.c | 2 - contrib/openpam/lib/libpam/pam_get_item.c | 2 - .../openpam/lib/libpam/pam_get_mapped_authtok.c | 2 - .../openpam/lib/libpam/pam_get_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_get_user.c | 2 - contrib/openpam/lib/libpam/pam_getenv.c | 2 - contrib/openpam/lib/libpam/pam_getenvlist.c | 2 - contrib/openpam/lib/libpam/pam_info.c | 2 - contrib/openpam/lib/libpam/pam_open_session.c | 2 - contrib/openpam/lib/libpam/pam_prompt.c | 2 - contrib/openpam/lib/libpam/pam_putenv.c | 2 - contrib/openpam/lib/libpam/pam_set_data.c | 2 - contrib/openpam/lib/libpam/pam_set_item.c | 2 - .../openpam/lib/libpam/pam_set_mapped_authtok.c | 2 - .../openpam/lib/libpam/pam_set_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_setcred.c | 2 - contrib/openpam/lib/libpam/pam_setenv.c | 2 - contrib/openpam/lib/libpam/pam_sm_acct_mgmt.c | 2 - contrib/openpam/lib/libpam/pam_sm_authenticate.c | 2 - .../lib/libpam/pam_sm_authenticate_secondary.c | 2 - contrib/openpam/lib/libpam/pam_sm_chauthtok.c | 2 - contrib/openpam/lib/libpam/pam_sm_close_session.c | 2 - .../openpam/lib/libpam/pam_sm_get_mapped_authtok.c | 2 - .../lib/libpam/pam_sm_get_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_sm_open_session.c | 2 - .../openpam/lib/libpam/pam_sm_set_mapped_authtok.c | 2 - .../lib/libpam/pam_sm_set_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_sm_setcred.c | 2 - contrib/openpam/lib/libpam/pam_start.c | 2 - contrib/openpam/lib/libpam/pam_strerror.c | 2 - contrib/openpam/lib/libpam/pam_verror.c | 2 - contrib/openpam/lib/libpam/pam_vinfo.c | 2 - contrib/openpam/lib/libpam/pam_vprompt.c | 2 - contrib/openpam/ltmain.sh | 855 +- contrib/openpam/m4/ax_compiler_vendor.m4 | 117 + contrib/openpam/m4/libtool.m4 | 227 +- contrib/openpam/m4/ltoptions.m4 | 4 +- contrib/openpam/m4/ltsugar.m4 | 2 +- contrib/openpam/m4/ltversion.m4 | 13 +- contrib/openpam/m4/lt~obsolete.m4 | 4 +- contrib/openpam/misc/Makefile.am | 2 +- contrib/openpam/misc/Makefile.in | 34 +- contrib/openpam/misc/coverage.sh.in | 33 - contrib/openpam/misc/gendoc.pl | 2 - contrib/openpam/missing | 2 +- contrib/openpam/mkpkgng.in | 177 - contrib/openpam/modules/Makefile.am | 2 - contrib/openpam/modules/Makefile.in | 29 +- contrib/openpam/modules/pam_deny/Makefile.am | 2 - contrib/openpam/modules/pam_deny/Makefile.in | 29 +- contrib/openpam/modules/pam_deny/pam_deny.c | 2 - contrib/openpam/modules/pam_permit/Makefile.am | 2 - contrib/openpam/modules/pam_permit/Makefile.in | 29 +- contrib/openpam/modules/pam_permit/pam_permit.c | 2 - contrib/openpam/modules/pam_return/Makefile.am | 2 - contrib/openpam/modules/pam_return/Makefile.in | 29 +- contrib/openpam/modules/pam_return/pam_return.c | 2 - contrib/openpam/modules/pam_unix/Makefile.am | 2 - contrib/openpam/modules/pam_unix/Makefile.in | 29 +- contrib/openpam/modules/pam_unix/pam_unix.c | 2 - contrib/openpam/t/Makefile.am | 4 +- contrib/openpam/t/Makefile.in | 87 +- contrib/openpam/t/t_openpam_ctype.c | 2 - contrib/openpam/t/t_openpam_dispatch.c | 2 - contrib/openpam/t/t_openpam_readlinev.c | 2 - contrib/openpam/t/t_openpam_readword.c | 2 - contrib/openpam/t/t_openpam_straddch.c | 183 + contrib/openpam/t/t_openpam_subst.c | 105 + contrib/openpam/t/t_pam_conv.c | 2 - contrib/openpam/t/t_pam_conv.h | 2 - contrib/openpam/t/t_pam_env.c | 2 - contrib/openpam/t/t_pam_err.c | 2 - contrib/openpam/t/t_pam_err.h | 2 - contrib/openpam/test-driver | 25 +- 227 files changed, 17395 insertions(+), 11816 deletions(-) diff --git a/contrib/openpam/CREDITS b/contrib/openpam/CREDITS index a560f9e12c1f..7dd4356fa824 100644 --- a/contrib/openpam/CREDITS +++ b/contrib/openpam/CREDITS @@ -45,6 +45,7 @@ ideas: Mikko Työläjärvi Nick Hibma Patrick Bihan-Faou + Robert Morris Robert Watson Ruslan Ermilov Sebastian Krahmer diff --git a/contrib/openpam/HISTORY b/contrib/openpam/HISTORY index 98032d7e5973..659c2ec430ff 100644 --- a/contrib/openpam/HISTORY +++ b/contrib/openpam/HISTORY @@ -1,3 +1,14 @@ +OpenPAM Ximenia 2023-06-27 + + - BUGFIX: Fix race condition in openpam_ttyconv(3) when used with + expect scripts. + + - BUGFIX: In openpam_set_option(3), when removing an option, properly + decrement the option count. + + - BUGFIX: In openpam_subst(3), avoid incrementing past the end of the + template. +============================================================================ OpenPAM Tabebuia 2019-02-24 - BUGFIX: Fix off-by-one bug in pam_getenv(3) which was introduced in diff --git a/contrib/openpam/LICENSE b/contrib/openpam/LICENSE index 879b34bc7beb..8c7e42564955 100644 --- a/contrib/openpam/LICENSE +++ b/contrib/openpam/LICENSE @@ -1,6 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. -Copyright (c) 2004-2019 Dag-Erling Smørgrav +Copyright (c) 2004-2023 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and diff --git a/contrib/openpam/Makefile.am b/contrib/openpam/Makefile.am index 6355cefcd5bc..89ec3a3cfa34 100644 --- a/contrib/openpam/Makefile.am +++ b/contrib/openpam/Makefile.am @@ -1,5 +1,3 @@ -# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ - ACLOCAL_AMFLAGS = -I m4 SUBDIRS = misc include lib bin modules @@ -19,3 +17,32 @@ EXTRA_DIST = \ RELNOTES \ autogen.sh \ misc/gendoc.pl + +if WITH_CODE_COVERAGE +covdir = @abs_top_builddir@/cov +coverage: coverage-clean all coverage-prepare coverage-run coverage-report +coverage-clean: + -rm -rf "${covdir}" +coverage-prepare: + mkdir "${covdir}" +if CLANG_CODE_COVERAGE +profdata = ${covdir}/@PACKAGE@.profdata +# hardcoding libpam.so here is horrible, need to find a better solution +coverage-run: + LLVM_PROFILE_FILE="${covdir}/@PACKAGE@.%p.raw" \ + ${MAKE} -C "@abs_top_builddir@" check +coverage-report: + llvm-profdata@clang_ver@ merge \ + --sparse "${covdir}/@PACKAGE@".*.raw -o "${profdata}" + llvm-cov@clang_ver@ show \ + --format=html --tab-size=8 \ + --output-dir="${covdir}" \ + --instr-profile="${profdata}" \ + --object "@abs_top_builddir@/lib/libpam/.libs/libpam.so" + @echo "coverage report: file://${covdir}/index.html" +endif +else +coverage: + echo "code coverage is not enabled." >&2 + false +endif diff --git a/contrib/openpam/Makefile.in b/contrib/openpam/Makefile.in index 05483ef6562d..50e7b492db11 100644 --- a/contrib/openpam/Makefile.in +++ b/contrib/openpam/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,8 +13,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -92,10 +90,11 @@ host_triplet = @host@ @WITH_DOC_TRUE@am__append_1 = doc subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pkg_config.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compiler_vendor.m4 \ + $(top_srcdir)/m4/ax_pkg_config.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -104,7 +103,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = mkpkgng +CONFIG_CLEAN_FILES = freebsd/Makefile CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -141,8 +140,8 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -159,13 +158,10 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope DIST_SUBDIRS = misc include lib bin modules doc t am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/mkpkgng.in INSTALL README TODO compile config.guess \ - config.sub install-sh ltmain.sh missing + $(top_srcdir)/freebsd/Makefile.in INSTALL README TODO compile \ + config.guess config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -204,6 +200,8 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -224,6 +222,12 @@ CPPFLAGS = @CPPFLAGS@ CRYB_TEST_CFLAGS = @CRYB_TEST_CFLAGS@ CRYB_TEST_LIBS = @CRYB_TEST_LIBS@ CRYB_TEST_VERSION = @CRYB_TEST_VERSION@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -235,8 +239,10 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -287,6 +293,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -300,6 +307,7 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +clang_ver = @clang_ver@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -326,6 +334,7 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -346,6 +355,8 @@ EXTRA_DIST = \ autogen.sh \ misc/gendoc.pl +@WITH_CODE_COVERAGE_TRUE@covdir = @abs_top_builddir@/cov +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@profdata = ${covdir}/@PACKAGE@.profdata all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -398,7 +409,7 @@ $(srcdir)/config.h.in: $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 -mkpkgng: $(top_builddir)/config.status $(srcdir)/mkpkgng.in +freebsd/Makefile: $(top_builddir)/config.status $(top_srcdir)/freebsd/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: @@ -515,7 +526,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -599,6 +609,10 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -641,6 +655,8 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -656,7 +672,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -818,21 +834,42 @@ uninstall-am: am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am .PRECIOUS: Makefile +@WITH_CODE_COVERAGE_TRUE@coverage: coverage-clean all coverage-prepare coverage-run coverage-report +@WITH_CODE_COVERAGE_TRUE@coverage-clean: +@WITH_CODE_COVERAGE_TRUE@ -rm -rf "${covdir}" +@WITH_CODE_COVERAGE_TRUE@coverage-prepare: +@WITH_CODE_COVERAGE_TRUE@ mkdir "${covdir}" +# hardcoding libpam.so here is horrible, need to find a better solution +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@coverage-run: +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ LLVM_PROFILE_FILE="${covdir}/@PACKAGE@.%p.raw" \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ ${MAKE} -C "@abs_top_builddir@" check +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@coverage-report: +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ llvm-profdata@clang_ver@ merge \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --sparse "${covdir}/@PACKAGE@".*.raw -o "${profdata}" +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ llvm-cov@clang_ver@ show \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --format=html --tab-size=8 \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --output-dir="${covdir}" \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --instr-profile="${profdata}" \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --object "@abs_top_builddir@/lib/libpam/.libs/libpam.so" +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ @echo "coverage report: file://${covdir}/index.html" +@WITH_CODE_COVERAGE_FALSE@coverage: +@WITH_CODE_COVERAGE_FALSE@ echo "code coverage is not enabled." >&2 +@WITH_CODE_COVERAGE_FALSE@ false # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/contrib/openpam/RELNOTES b/contrib/openpam/RELNOTES index 895370ae8774..3bbd7bb19721 100644 --- a/contrib/openpam/RELNOTES +++ b/contrib/openpam/RELNOTES @@ -1,6 +1,6 @@ - Release notes for OpenPAM Tabebuia - ================================== + Release notes for OpenPAM Ximenia + ================================= OpenPAM is developed primarily on FreeBSD, but is expected to work on almost any POSIX-like platform that has GNU autotools, GNU make and diff --git a/contrib/openpam/aclocal.m4 b/contrib/openpam/aclocal.m4 index 005a0f19d170..109e73063233 100644 --- a/contrib/openpam/aclocal.m4 +++ b/contrib/openpam/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, +[m4_warning([this file was generated for autoconf 2.71. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -108,9 +108,46 @@ AC_DEFUN([AM_AUX_DIR_EXPAND], am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) +# AM_COND_IF -*- Autoconf -*- + +# Copyright (C) 2008-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_COND_IF +# _AM_COND_ELSE +# _AM_COND_ENDIF +# -------------- +# These macros are only used for tracing. +m4_define([_AM_COND_IF]) +m4_define([_AM_COND_ELSE]) +m4_define([_AM_COND_ENDIF]) + +# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) +# --------------------------------------- +# If the shell condition COND is true, execute IF-TRUE, otherwise execute +# IF-FALSE. Allow automake to learn about conditional instantiating macros +# (the AC_CONFIG_FOOS). +AC_DEFUN([AM_COND_IF], +[m4_ifndef([_AM_COND_VALUE_$1], + [m4_fatal([$0: no such condition "$1"])])dnl +_AM_COND_IF([$1])dnl +if test -z "$$1_TRUE"; then : + m4_n([$2])[]dnl +m4_ifval([$3], +[_AM_COND_ELSE([$1])dnl +else + $3 +])dnl +_AM_COND_ENDIF([$1])dnl +fi[]dnl +]) + # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +178,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +369,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -371,7 +408,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -398,7 +437,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -426,6 +465,10 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -462,7 +505,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -514,6 +557,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -595,7 +652,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -616,7 +673,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,7 +694,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -680,7 +737,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -701,12 +758,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -721,7 +773,7 @@ fi # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -748,7 +800,7 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -777,7 +829,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -824,7 +876,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -843,7 +895,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -924,7 +976,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -984,7 +1036,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1012,7 +1064,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1031,7 +1083,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1162,6 +1214,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_compiler_vendor.m4]) m4_include([m4/ax_pkg_config.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) diff --git a/contrib/openpam/autogen.sh b/contrib/openpam/autogen.sh index 4573429d4ee9..92213e71d82c 100755 --- a/contrib/openpam/autogen.sh +++ b/contrib/openpam/autogen.sh @@ -1,7 +1,4 @@ #!/bin/sh -# -# $OpenPAM: autogen.sh 938 2017-04-30 21:34:42Z des $ -# libtoolize --copy --force aclocal -I m4 diff --git a/contrib/openpam/bin/Makefile.am b/contrib/openpam/bin/Makefile.am index ce57b7a74ab7..420748808ad2 100644 --- a/contrib/openpam/bin/Makefile.am +++ b/contrib/openpam/bin/Makefile.am @@ -1,5 +1,3 @@ -# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ - SUBDIRS = openpam_dump_policy if WITH_PAMTEST diff --git a/contrib/openpam/bin/Makefile.in b/contrib/openpam/bin/Makefile.in index 05e3166a03ee..8bc8aa6f51d1 100644 --- a/contrib/openpam/bin/Makefile.in +++ b/contrib/openpam/bin/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,8 +13,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -93,10 +91,11 @@ host_triplet = @host@ @WITH_SU_TRUE@am__append_2 = su subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pkg_config.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compiler_vendor.m4 \ + $(top_srcdir)/m4/ax_pkg_config.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -156,8 +155,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = openpam_dump_policy pamtest su am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -202,6 +199,12 @@ CPPFLAGS = @CPPFLAGS@ CRYB_TEST_CFLAGS = @CRYB_TEST_CFLAGS@ CRYB_TEST_LIBS = @CRYB_TEST_LIBS@ CRYB_TEST_VERSION = @CRYB_TEST_VERSION@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ *** 38391 LINES SKIPPED *** From nobody Mon Jul 3 15:14:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QvqGr32kMz4lDYW; Mon, 3 Jul 2023 15:15: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 4QvqGr2QQWz456b; Mon, 3 Jul 2023 15:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688397300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z6dD478OCm8E8+4Owf+5eoZC/BWrdycPQBm7WDZQvSA=; b=QvZkOR2ALx4vaj+ZQyEE8r58AdKZetmGBu/jkXVHUJWwdM4KCbv/owSJ9bSWZ4Xz9fZd6a BJtB2Clc97H+lwOwFPm588vpcZvjhRAAcUU6xxf0Mx5jAchnSRQN6FIPWBbTfc+Hu2xeKH dxpZ4xNUc62Mu3avlmNAfPl+lS3TQIXHeHDjt53aFOwNFz8OZnMcVPDBv7oLhB7euMeyB4 j1a0+j/lQca0yTTwf2Q44fo29Wz7vfUtrhRdobS7Ieq5gmenZg4rNIe4vYTz5+6zln5GQJ /EZ2LyVSgCbVvVugOUO8MdyI/S7hy3BOwUnBsSItyn6gl0h8bO/uhLDvoknDOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688397300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z6dD478OCm8E8+4Owf+5eoZC/BWrdycPQBm7WDZQvSA=; b=RO2Hlb5UPApPefSmOQkqriAVelvmSxyZmHG11Oub/OzhQKDWOFMdPMQycrUTxIa+ULxRcd 1lUrQv1hhGqvUMImaee+ZKpcuAmm0U7dLRMnpFT6v2V67+ucJvQ8kozZAFUK23QUuEJecW eV740dvsxhHikW7VOMIgyoJF3iqhoQdKbRgRl5hSWmuItTrElbO3affhpUKKekPf20cvs5 uplzyDrk5wefGfmBT3Vl8CrWe0ZEPvSerNclIbM5vjyhTf/UuWumEZi0s8GM15BJymjmlA 2q891YSgH50otMfhZtUYV6uk+kw7wj7lm4uXiK+5sS0Vho5QznwJu/TqUGXl3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688397300; a=rsa-sha256; cv=none; b=xIwB8AWX97y/iReE4O+2EQJRFc2cADDZTUpKh6RK2BrHZZqjv8Xi9S86wdy725SH6NAsOe oNk9/i/e7Ro2hXEpDlULUnE+Cn3z7lbJHAd1hRJF9DSfrQbBGEQctxz30m2TP0z5GeidqL zWuT7si/bbxRciJdPsLxaprR+uUYSrD46O+c0TcIw6wHSOtzvejNn1dsxiQ5daGLIrz0pZ s+0y/5bNzoWkFgo3+qyKQBinEkra/labh6/LHdCVaFf18YjfT6p4COpunB2Ych2LmQK4QP aGClAcOlaE7Y6Eci5A9VUun0SAyoCamltKymlve/PlN3hCggE2jfUSGAfmswkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QvqGr1JV1zvv4; Mon, 3 Jul 2023 15:15: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 363FF0Vl018079; Mon, 3 Jul 2023 15:15:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363FEx5k018068; Mon, 3 Jul 2023 15:14:59 GMT (envelope-from git) Date: Mon, 3 Jul 2023 15:14:59 GMT Message-Id: <202307031514.363FEx5k018068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 0f0b8bb211c7 - stable/12 - Upgrade to OpenPAM Ximenia. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0f0b8bb211c79845598805312ddcc2f36553452b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=0f0b8bb211c79845598805312ddcc2f36553452b commit 0f0b8bb211c79845598805312ddcc2f36553452b Author: Dag-Erling Smørgrav AuthorDate: 2023-06-27 17:03:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-07-03 15:13:49 +0000 Upgrade to OpenPAM Ximenia. Merge commit '5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b' (cherry picked from commit 3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456) --- contrib/openpam/CREDITS | 1 + contrib/openpam/HISTORY | 11 + contrib/openpam/LICENSE | 2 +- contrib/openpam/Makefile.am | 31 +- contrib/openpam/Makefile.in | 99 +- contrib/openpam/RELNOTES | 4 +- contrib/openpam/aclocal.m4 | 119 +- contrib/openpam/autogen.sh | 3 - contrib/openpam/bin/Makefile.am | 2 - contrib/openpam/bin/Makefile.in | 29 +- .../openpam/bin/openpam_dump_policy/Makefile.am | 2 - .../openpam/bin/openpam_dump_policy/Makefile.in | 29 +- .../bin/openpam_dump_policy/openpam_dump_policy.c | 2 - contrib/openpam/bin/pamtest/Makefile.am | 2 - contrib/openpam/bin/pamtest/Makefile.in | 29 +- contrib/openpam/bin/pamtest/pamtest.1 | 4 +- contrib/openpam/bin/pamtest/pamtest.c | 2 - contrib/openpam/bin/su/Makefile.am | 2 - contrib/openpam/bin/su/Makefile.in | 29 +- contrib/openpam/bin/su/su.1 | 4 +- contrib/openpam/bin/su/su.c | 2 - contrib/openpam/compile | 6 +- contrib/openpam/config.guess | 747 +- contrib/openpam/config.h.in | 114 +- contrib/openpam/config.sub | 1674 +- contrib/openpam/configure | 23391 +++++++++++-------- contrib/openpam/configure.ac | 55 +- contrib/openpam/depcomp | 2 +- contrib/openpam/doc/Makefile.am | 2 - contrib/openpam/doc/Makefile.in | 29 +- contrib/openpam/doc/man/Makefile.am | 2 - contrib/openpam/doc/man/Makefile.in | 27 +- contrib/openpam/doc/man/openpam.3 | 5 +- contrib/openpam/doc/man/openpam.man | 3 - contrib/openpam/doc/man/openpam_borrow_cred.3 | 3 +- contrib/openpam/doc/man/openpam_free_data.3 | 3 +- contrib/openpam/doc/man/openpam_free_envlist.3 | 3 +- contrib/openpam/doc/man/openpam_get_feature.3 | 3 +- contrib/openpam/doc/man/openpam_get_option.3 | 3 +- contrib/openpam/doc/man/openpam_log.3 | 3 +- contrib/openpam/doc/man/openpam_nullconv.3 | 3 +- contrib/openpam/doc/man/openpam_readline.3 | 3 +- contrib/openpam/doc/man/openpam_readlinev.3 | 3 +- contrib/openpam/doc/man/openpam_readword.3 | 3 +- contrib/openpam/doc/man/openpam_restore_cred.3 | 3 +- contrib/openpam/doc/man/openpam_set_feature.3 | 3 +- contrib/openpam/doc/man/openpam_set_option.3 | 3 +- contrib/openpam/doc/man/openpam_straddch.3 | 3 +- contrib/openpam/doc/man/openpam_subst.3 | 3 +- contrib/openpam/doc/man/openpam_ttyconv.3 | 3 +- contrib/openpam/doc/man/pam.3 | 5 +- contrib/openpam/doc/man/pam.conf.5 | 4 +- contrib/openpam/doc/man/pam.man | 3 - contrib/openpam/doc/man/pam_acct_mgmt.3 | 3 +- contrib/openpam/doc/man/pam_authenticate.3 | 3 +- contrib/openpam/doc/man/pam_chauthtok.3 | 3 +- contrib/openpam/doc/man/pam_close_session.3 | 3 +- contrib/openpam/doc/man/pam_conv.3 | 4 +- contrib/openpam/doc/man/pam_end.3 | 3 +- contrib/openpam/doc/man/pam_error.3 | 3 +- contrib/openpam/doc/man/pam_get_authtok.3 | 3 +- contrib/openpam/doc/man/pam_get_data.3 | 3 +- contrib/openpam/doc/man/pam_get_item.3 | 3 +- contrib/openpam/doc/man/pam_get_user.3 | 3 +- contrib/openpam/doc/man/pam_getenv.3 | 3 +- contrib/openpam/doc/man/pam_getenvlist.3 | 3 +- contrib/openpam/doc/man/pam_info.3 | 3 +- contrib/openpam/doc/man/pam_open_session.3 | 3 +- contrib/openpam/doc/man/pam_prompt.3 | 3 +- contrib/openpam/doc/man/pam_putenv.3 | 3 +- contrib/openpam/doc/man/pam_set_data.3 | 3 +- contrib/openpam/doc/man/pam_set_item.3 | 3 +- contrib/openpam/doc/man/pam_setcred.3 | 3 +- contrib/openpam/doc/man/pam_setenv.3 | 3 +- contrib/openpam/doc/man/pam_sm_acct_mgmt.3 | 3 +- contrib/openpam/doc/man/pam_sm_authenticate.3 | 3 +- contrib/openpam/doc/man/pam_sm_chauthtok.3 | 3 +- contrib/openpam/doc/man/pam_sm_close_session.3 | 3 +- contrib/openpam/doc/man/pam_sm_open_session.3 | 3 +- contrib/openpam/doc/man/pam_sm_setcred.3 | 3 +- contrib/openpam/doc/man/pam_start.3 | 3 +- contrib/openpam/doc/man/pam_strerror.3 | 3 +- contrib/openpam/doc/man/pam_verror.3 | 3 +- contrib/openpam/doc/man/pam_vinfo.3 | 3 +- contrib/openpam/doc/man/pam_vprompt.3 | 3 +- contrib/openpam/freebsd/Makefile.in | 33 + contrib/openpam/include/Makefile.am | 2 - contrib/openpam/include/Makefile.in | 29 +- contrib/openpam/include/security/Makefile.am | 2 - contrib/openpam/include/security/Makefile.in | 29 +- contrib/openpam/include/security/openpam.h | 2 - contrib/openpam/include/security/openpam_attr.h | 4 - contrib/openpam/include/security/openpam_version.h | 8 +- contrib/openpam/include/security/pam_appl.h | 2 - contrib/openpam/include/security/pam_constants.h | 2 - contrib/openpam/include/security/pam_modules.h | 2 - contrib/openpam/include/security/pam_types.h | 2 - contrib/openpam/install-sh | 172 +- contrib/openpam/lib/Makefile.am | 2 - contrib/openpam/lib/Makefile.in | 29 +- contrib/openpam/lib/libpam/Makefile.am | 2 - contrib/openpam/lib/libpam/Makefile.in | 29 +- contrib/openpam/lib/libpam/openpam_asprintf.c | 2 - contrib/openpam/lib/libpam/openpam_asprintf.h | 2 - contrib/openpam/lib/libpam/openpam_borrow_cred.c | 2 - .../openpam/lib/libpam/openpam_check_owner_perms.c | 2 - contrib/openpam/lib/libpam/openpam_configure.c | 2 - contrib/openpam/lib/libpam/openpam_constants.c | 2 - contrib/openpam/lib/libpam/openpam_constants.h | 2 - contrib/openpam/lib/libpam/openpam_cred.h | 2 - contrib/openpam/lib/libpam/openpam_ctype.h | 2 - contrib/openpam/lib/libpam/openpam_debug.h | 2 - contrib/openpam/lib/libpam/openpam_dispatch.c | 2 - contrib/openpam/lib/libpam/openpam_dlfunc.h | 2 - contrib/openpam/lib/libpam/openpam_dynamic.c | 2 - contrib/openpam/lib/libpam/openpam_features.c | 2 - contrib/openpam/lib/libpam/openpam_features.h | 2 - contrib/openpam/lib/libpam/openpam_findenv.c | 2 - contrib/openpam/lib/libpam/openpam_free_data.c | 2 - contrib/openpam/lib/libpam/openpam_free_envlist.c | 2 - contrib/openpam/lib/libpam/openpam_get_feature.c | 2 - contrib/openpam/lib/libpam/openpam_get_option.c | 2 - contrib/openpam/lib/libpam/openpam_impl.h | 2 - contrib/openpam/lib/libpam/openpam_load.c | 2 - contrib/openpam/lib/libpam/openpam_log.c | 2 - contrib/openpam/lib/libpam/openpam_nullconv.c | 2 - contrib/openpam/lib/libpam/openpam_readline.c | 2 - contrib/openpam/lib/libpam/openpam_readlinev.c | 4 - contrib/openpam/lib/libpam/openpam_readword.c | 3 - contrib/openpam/lib/libpam/openpam_restore_cred.c | 2 - contrib/openpam/lib/libpam/openpam_set_feature.c | 2 - contrib/openpam/lib/libpam/openpam_set_option.c | 5 +- contrib/openpam/lib/libpam/openpam_static.c | 2 - contrib/openpam/lib/libpam/openpam_straddch.c | 4 - contrib/openpam/lib/libpam/openpam_strlcat.c | 2 - contrib/openpam/lib/libpam/openpam_strlcat.h | 2 - contrib/openpam/lib/libpam/openpam_strlcmp.h | 2 - contrib/openpam/lib/libpam/openpam_strlcpy.c | 2 - contrib/openpam/lib/libpam/openpam_strlcpy.h | 2 - contrib/openpam/lib/libpam/openpam_strlset.c | 2 - contrib/openpam/lib/libpam/openpam_strlset.h | 2 - contrib/openpam/lib/libpam/openpam_subst.c | 7 +- contrib/openpam/lib/libpam/openpam_ttyconv.c | 2 - contrib/openpam/lib/libpam/openpam_vasprintf.c | 2 - contrib/openpam/lib/libpam/openpam_vasprintf.h | 2 - contrib/openpam/lib/libpam/pam_acct_mgmt.c | 2 - contrib/openpam/lib/libpam/pam_authenticate.c | 2 - .../lib/libpam/pam_authenticate_secondary.c | 2 - contrib/openpam/lib/libpam/pam_chauthtok.c | 2 - contrib/openpam/lib/libpam/pam_close_session.c | 2 - contrib/openpam/lib/libpam/pam_end.c | 2 - contrib/openpam/lib/libpam/pam_error.c | 2 - contrib/openpam/lib/libpam/pam_get_authtok.c | 2 - contrib/openpam/lib/libpam/pam_get_data.c | 2 - contrib/openpam/lib/libpam/pam_get_item.c | 2 - .../openpam/lib/libpam/pam_get_mapped_authtok.c | 2 - .../openpam/lib/libpam/pam_get_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_get_user.c | 2 - contrib/openpam/lib/libpam/pam_getenv.c | 2 - contrib/openpam/lib/libpam/pam_getenvlist.c | 2 - contrib/openpam/lib/libpam/pam_info.c | 2 - contrib/openpam/lib/libpam/pam_open_session.c | 2 - contrib/openpam/lib/libpam/pam_prompt.c | 2 - contrib/openpam/lib/libpam/pam_putenv.c | 2 - contrib/openpam/lib/libpam/pam_set_data.c | 2 - contrib/openpam/lib/libpam/pam_set_item.c | 2 - .../openpam/lib/libpam/pam_set_mapped_authtok.c | 2 - .../openpam/lib/libpam/pam_set_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_setcred.c | 2 - contrib/openpam/lib/libpam/pam_setenv.c | 2 - contrib/openpam/lib/libpam/pam_sm_acct_mgmt.c | 2 - contrib/openpam/lib/libpam/pam_sm_authenticate.c | 2 - .../lib/libpam/pam_sm_authenticate_secondary.c | 2 - contrib/openpam/lib/libpam/pam_sm_chauthtok.c | 2 - contrib/openpam/lib/libpam/pam_sm_close_session.c | 2 - .../openpam/lib/libpam/pam_sm_get_mapped_authtok.c | 2 - .../lib/libpam/pam_sm_get_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_sm_open_session.c | 2 - .../openpam/lib/libpam/pam_sm_set_mapped_authtok.c | 2 - .../lib/libpam/pam_sm_set_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_sm_setcred.c | 2 - contrib/openpam/lib/libpam/pam_start.c | 2 - contrib/openpam/lib/libpam/pam_strerror.c | 2 - contrib/openpam/lib/libpam/pam_verror.c | 2 - contrib/openpam/lib/libpam/pam_vinfo.c | 2 - contrib/openpam/lib/libpam/pam_vprompt.c | 2 - contrib/openpam/ltmain.sh | 855 +- contrib/openpam/m4/ax_compiler_vendor.m4 | 117 + contrib/openpam/m4/libtool.m4 | 227 +- contrib/openpam/m4/ltoptions.m4 | 4 +- contrib/openpam/m4/ltsugar.m4 | 2 +- contrib/openpam/m4/ltversion.m4 | 13 +- contrib/openpam/m4/lt~obsolete.m4 | 4 +- contrib/openpam/misc/Makefile.am | 2 +- contrib/openpam/misc/Makefile.in | 34 +- contrib/openpam/misc/coverage.sh.in | 33 - contrib/openpam/misc/gendoc.pl | 2 - contrib/openpam/missing | 2 +- contrib/openpam/mkpkgng.in | 177 - contrib/openpam/modules/Makefile.am | 2 - contrib/openpam/modules/Makefile.in | 29 +- contrib/openpam/modules/pam_deny/Makefile.am | 2 - contrib/openpam/modules/pam_deny/Makefile.in | 29 +- contrib/openpam/modules/pam_deny/pam_deny.c | 2 - contrib/openpam/modules/pam_permit/Makefile.am | 2 - contrib/openpam/modules/pam_permit/Makefile.in | 29 +- contrib/openpam/modules/pam_permit/pam_permit.c | 2 - contrib/openpam/modules/pam_return/Makefile.am | 2 - contrib/openpam/modules/pam_return/Makefile.in | 29 +- contrib/openpam/modules/pam_return/pam_return.c | 2 - contrib/openpam/modules/pam_unix/Makefile.am | 2 - contrib/openpam/modules/pam_unix/Makefile.in | 29 +- contrib/openpam/modules/pam_unix/pam_unix.c | 2 - contrib/openpam/t/Makefile.am | 4 +- contrib/openpam/t/Makefile.in | 87 +- contrib/openpam/t/t_openpam_ctype.c | 2 - contrib/openpam/t/t_openpam_dispatch.c | 2 - contrib/openpam/t/t_openpam_readlinev.c | 2 - contrib/openpam/t/t_openpam_readword.c | 2 - contrib/openpam/t/t_openpam_straddch.c | 183 + contrib/openpam/t/t_openpam_subst.c | 105 + contrib/openpam/t/t_pam_conv.c | 2 - contrib/openpam/t/t_pam_conv.h | 2 - contrib/openpam/t/t_pam_env.c | 2 - contrib/openpam/t/t_pam_err.c | 2 - contrib/openpam/t/t_pam_err.h | 2 - contrib/openpam/test-driver | 25 +- 227 files changed, 17395 insertions(+), 11816 deletions(-) diff --git a/contrib/openpam/CREDITS b/contrib/openpam/CREDITS index a560f9e12c1f..7dd4356fa824 100644 --- a/contrib/openpam/CREDITS +++ b/contrib/openpam/CREDITS @@ -45,6 +45,7 @@ ideas: Mikko Työläjärvi Nick Hibma Patrick Bihan-Faou + Robert Morris Robert Watson Ruslan Ermilov Sebastian Krahmer diff --git a/contrib/openpam/HISTORY b/contrib/openpam/HISTORY index 98032d7e5973..659c2ec430ff 100644 --- a/contrib/openpam/HISTORY +++ b/contrib/openpam/HISTORY @@ -1,3 +1,14 @@ +OpenPAM Ximenia 2023-06-27 + + - BUGFIX: Fix race condition in openpam_ttyconv(3) when used with + expect scripts. + + - BUGFIX: In openpam_set_option(3), when removing an option, properly + decrement the option count. + + - BUGFIX: In openpam_subst(3), avoid incrementing past the end of the + template. +============================================================================ OpenPAM Tabebuia 2019-02-24 - BUGFIX: Fix off-by-one bug in pam_getenv(3) which was introduced in diff --git a/contrib/openpam/LICENSE b/contrib/openpam/LICENSE index 879b34bc7beb..8c7e42564955 100644 --- a/contrib/openpam/LICENSE +++ b/contrib/openpam/LICENSE @@ -1,6 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. -Copyright (c) 2004-2019 Dag-Erling Smørgrav +Copyright (c) 2004-2023 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and diff --git a/contrib/openpam/Makefile.am b/contrib/openpam/Makefile.am index 6355cefcd5bc..89ec3a3cfa34 100644 --- a/contrib/openpam/Makefile.am +++ b/contrib/openpam/Makefile.am @@ -1,5 +1,3 @@ -# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ - ACLOCAL_AMFLAGS = -I m4 SUBDIRS = misc include lib bin modules @@ -19,3 +17,32 @@ EXTRA_DIST = \ RELNOTES \ autogen.sh \ misc/gendoc.pl + +if WITH_CODE_COVERAGE +covdir = @abs_top_builddir@/cov +coverage: coverage-clean all coverage-prepare coverage-run coverage-report +coverage-clean: + -rm -rf "${covdir}" +coverage-prepare: + mkdir "${covdir}" +if CLANG_CODE_COVERAGE +profdata = ${covdir}/@PACKAGE@.profdata +# hardcoding libpam.so here is horrible, need to find a better solution +coverage-run: + LLVM_PROFILE_FILE="${covdir}/@PACKAGE@.%p.raw" \ + ${MAKE} -C "@abs_top_builddir@" check +coverage-report: + llvm-profdata@clang_ver@ merge \ + --sparse "${covdir}/@PACKAGE@".*.raw -o "${profdata}" + llvm-cov@clang_ver@ show \ + --format=html --tab-size=8 \ + --output-dir="${covdir}" \ + --instr-profile="${profdata}" \ + --object "@abs_top_builddir@/lib/libpam/.libs/libpam.so" + @echo "coverage report: file://${covdir}/index.html" +endif +else +coverage: + echo "code coverage is not enabled." >&2 + false +endif diff --git a/contrib/openpam/Makefile.in b/contrib/openpam/Makefile.in index 05483ef6562d..50e7b492db11 100644 --- a/contrib/openpam/Makefile.in +++ b/contrib/openpam/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,8 +13,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -92,10 +90,11 @@ host_triplet = @host@ @WITH_DOC_TRUE@am__append_1 = doc subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pkg_config.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compiler_vendor.m4 \ + $(top_srcdir)/m4/ax_pkg_config.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -104,7 +103,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = mkpkgng +CONFIG_CLEAN_FILES = freebsd/Makefile CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -141,8 +140,8 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -159,13 +158,10 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope DIST_SUBDIRS = misc include lib bin modules doc t am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/mkpkgng.in INSTALL README TODO compile config.guess \ - config.sub install-sh ltmain.sh missing + $(top_srcdir)/freebsd/Makefile.in INSTALL README TODO compile \ + config.guess config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -204,6 +200,8 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -224,6 +222,12 @@ CPPFLAGS = @CPPFLAGS@ CRYB_TEST_CFLAGS = @CRYB_TEST_CFLAGS@ CRYB_TEST_LIBS = @CRYB_TEST_LIBS@ CRYB_TEST_VERSION = @CRYB_TEST_VERSION@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -235,8 +239,10 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -287,6 +293,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -300,6 +307,7 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +clang_ver = @clang_ver@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -326,6 +334,7 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -346,6 +355,8 @@ EXTRA_DIST = \ autogen.sh \ misc/gendoc.pl +@WITH_CODE_COVERAGE_TRUE@covdir = @abs_top_builddir@/cov +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@profdata = ${covdir}/@PACKAGE@.profdata all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -398,7 +409,7 @@ $(srcdir)/config.h.in: $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 -mkpkgng: $(top_builddir)/config.status $(srcdir)/mkpkgng.in +freebsd/Makefile: $(top_builddir)/config.status $(top_srcdir)/freebsd/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: @@ -515,7 +526,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -599,6 +609,10 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -641,6 +655,8 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -656,7 +672,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -818,21 +834,42 @@ uninstall-am: am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am .PRECIOUS: Makefile +@WITH_CODE_COVERAGE_TRUE@coverage: coverage-clean all coverage-prepare coverage-run coverage-report +@WITH_CODE_COVERAGE_TRUE@coverage-clean: +@WITH_CODE_COVERAGE_TRUE@ -rm -rf "${covdir}" +@WITH_CODE_COVERAGE_TRUE@coverage-prepare: +@WITH_CODE_COVERAGE_TRUE@ mkdir "${covdir}" +# hardcoding libpam.so here is horrible, need to find a better solution +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@coverage-run: +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ LLVM_PROFILE_FILE="${covdir}/@PACKAGE@.%p.raw" \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ ${MAKE} -C "@abs_top_builddir@" check +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@coverage-report: +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ llvm-profdata@clang_ver@ merge \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --sparse "${covdir}/@PACKAGE@".*.raw -o "${profdata}" +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ llvm-cov@clang_ver@ show \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --format=html --tab-size=8 \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --output-dir="${covdir}" \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --instr-profile="${profdata}" \ +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ --object "@abs_top_builddir@/lib/libpam/.libs/libpam.so" +@CLANG_CODE_COVERAGE_TRUE@@WITH_CODE_COVERAGE_TRUE@ @echo "coverage report: file://${covdir}/index.html" +@WITH_CODE_COVERAGE_FALSE@coverage: +@WITH_CODE_COVERAGE_FALSE@ echo "code coverage is not enabled." >&2 +@WITH_CODE_COVERAGE_FALSE@ false # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/contrib/openpam/RELNOTES b/contrib/openpam/RELNOTES index 895370ae8774..3bbd7bb19721 100644 --- a/contrib/openpam/RELNOTES +++ b/contrib/openpam/RELNOTES @@ -1,6 +1,6 @@ - Release notes for OpenPAM Tabebuia - ================================== + Release notes for OpenPAM Ximenia + ================================= OpenPAM is developed primarily on FreeBSD, but is expected to work on almost any POSIX-like platform that has GNU autotools, GNU make and diff --git a/contrib/openpam/aclocal.m4 b/contrib/openpam/aclocal.m4 index 005a0f19d170..109e73063233 100644 --- a/contrib/openpam/aclocal.m4 +++ b/contrib/openpam/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, +[m4_warning([this file was generated for autoconf 2.71. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -108,9 +108,46 @@ AC_DEFUN([AM_AUX_DIR_EXPAND], am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) +# AM_COND_IF -*- Autoconf -*- + +# Copyright (C) 2008-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_COND_IF +# _AM_COND_ELSE +# _AM_COND_ENDIF +# -------------- +# These macros are only used for tracing. +m4_define([_AM_COND_IF]) +m4_define([_AM_COND_ELSE]) +m4_define([_AM_COND_ENDIF]) + +# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) +# --------------------------------------- +# If the shell condition COND is true, execute IF-TRUE, otherwise execute +# IF-FALSE. Allow automake to learn about conditional instantiating macros +# (the AC_CONFIG_FOOS). +AC_DEFUN([AM_COND_IF], +[m4_ifndef([_AM_COND_VALUE_$1], + [m4_fatal([$0: no such condition "$1"])])dnl +_AM_COND_IF([$1])dnl +if test -z "$$1_TRUE"; then : + m4_n([$2])[]dnl +m4_ifval([$3], +[_AM_COND_ELSE([$1])dnl +else + $3 +])dnl +_AM_COND_ENDIF([$1])dnl +fi[]dnl +]) + # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +178,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +369,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -371,7 +408,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -398,7 +437,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -426,6 +465,10 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -462,7 +505,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -514,6 +557,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -595,7 +652,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -616,7 +673,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,7 +694,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -680,7 +737,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -701,12 +758,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -721,7 +773,7 @@ fi # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -748,7 +800,7 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -777,7 +829,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -824,7 +876,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -843,7 +895,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -924,7 +976,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -984,7 +1036,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1012,7 +1064,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1031,7 +1083,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1162,6 +1214,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_compiler_vendor.m4]) m4_include([m4/ax_pkg_config.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) diff --git a/contrib/openpam/autogen.sh b/contrib/openpam/autogen.sh index 4573429d4ee9..92213e71d82c 100755 --- a/contrib/openpam/autogen.sh +++ b/contrib/openpam/autogen.sh @@ -1,7 +1,4 @@ #!/bin/sh -# -# $OpenPAM: autogen.sh 938 2017-04-30 21:34:42Z des $ -# libtoolize --copy --force aclocal -I m4 diff --git a/contrib/openpam/bin/Makefile.am b/contrib/openpam/bin/Makefile.am index ce57b7a74ab7..420748808ad2 100644 --- a/contrib/openpam/bin/Makefile.am +++ b/contrib/openpam/bin/Makefile.am @@ -1,5 +1,3 @@ -# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ - SUBDIRS = openpam_dump_policy if WITH_PAMTEST diff --git a/contrib/openpam/bin/Makefile.in b/contrib/openpam/bin/Makefile.in index 05e3166a03ee..8bc8aa6f51d1 100644 --- a/contrib/openpam/bin/Makefile.in +++ b/contrib/openpam/bin/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,8 +13,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -93,10 +91,11 @@ host_triplet = @host@ @WITH_SU_TRUE@am__append_2 = su subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pkg_config.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compiler_vendor.m4 \ + $(top_srcdir)/m4/ax_pkg_config.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -156,8 +155,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = openpam_dump_policy pamtest su am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -202,6 +199,12 @@ CPPFLAGS = @CPPFLAGS@ CRYB_TEST_CFLAGS = @CRYB_TEST_CFLAGS@ CRYB_TEST_LIBS = @CRYB_TEST_LIBS@ CRYB_TEST_VERSION = @CRYB_TEST_VERSION@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ *** 38391 LINES SKIPPED *** From nobody Mon Jul 3 16:58:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QvsZS0YhZz4mDbM; Mon, 3 Jul 2023 16:58: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 4QvsZS07lfz4glq; Mon, 3 Jul 2023 16:58:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688403520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IdOThyw4kyxDJVQCW6RRsuSOjwFUk/vu2xdvTgWHcmM=; b=edzKCkyNuxWHJDO5FCFiNB74BQr0J5eajA4LqjQq5k1pgc8sCvbNYsbcDaCdo7nSw29UM2 iuDv6WOD0nqNp2m9TXEIug+AbJMMsO/6vhvm5wGdBAhWYfANv7l7J3Pwst0KdXWzn7X35P HcsM/ET16D7EjbCYb38qjy7iR5RvFgA5IFO6OmQP6aeEMb9G1WwhDhDQyP+vXdwUS4eqRz Sczfe5u4+dTDXNARdhstpKvx19nyXA7kqxh1oyok3JLUBiv95nD2HSLekF/PWzFDJpnMCg w1X2Clkhq3VO9g6EZhgWnnmptQHCdTGLA6wiXzPPKyIu5mvY/zScjh38vTXaJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688403520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IdOThyw4kyxDJVQCW6RRsuSOjwFUk/vu2xdvTgWHcmM=; b=hLBURZLZ6fBHLuhQ3js/aAni/W50jonh07juWapNARdet0gNrv0MsgeNklCc0+IoJH8Ajf eM0zBt97QgZNCMzcKEjvvrlqH77KJ5r09e5BkGBkr3kKBJ8DAP4jtpC7XZYLaf/ujnBlG+ HUc9pxQCpKxYEuY09x0fGXIct32qWEmodCnmZda1wZbxCVeZRu5LfjDb5ExKdeF9KT4xGh v64p1GX51r8YGRQkuD32cubVP/UVdb9BSV99Uy8NwYYCWNH9I6qQip/bVYvpT47RblIrdN ulQrUcnwEJcMY2QYVuOLMyWvv3dD5g0zyPzr+4iRkuYaU8HFfrVI3igyJXz6GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688403520; a=rsa-sha256; cv=none; b=Hvq/3ITAcdFdO6xUR/g7kqV3D/m5mZONEhwjy8UWUBu6nX2zrX7TJ+VRokYt0w5Ho+WNju JiqbEzlf6Gron+OnQdg/G8fycM+IteTAoA9c9ETOblpnXews7KZRpLGbZ6UnhMNx+lQADP Cmk1czDMTUKr87EgDZ8j+O0qHGC/ksRdx2TxSbXJKhPMc6BFPAxX6osgdpIkEmyfnJQsSU Es8WkbWTTBxDdarHFQno0PIaw90fBsylqFbIPoDYhm+H8LTx3Im8toS4QWGFW90VqycH6a mAmFyYuZcLZSoZl2kYABErjL3D40nvJs//g46iUGGs9Pl4Kb2gdAGoEMWNxQ1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QvsZR6LPqzyKl; Mon, 3 Jul 2023 16:58: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 363Gwd4E083719; Mon, 3 Jul 2023 16:58:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363Gwd3J083718; Mon, 3 Jul 2023 16:58:39 GMT (envelope-from git) Date: Mon, 3 Jul 2023 16:58:39 GMT Message-Id: <202307031658.363Gwd3J083718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 3a9dd387057c - main - Stop removing OpenSSL man pages that were revived in 3.0.9 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a9dd387057c5df7981e6b0fc8354b3ae305d182 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3a9dd387057c5df7981e6b0fc8354b3ae305d182 commit 3a9dd387057c5df7981e6b0fc8354b3ae305d182 Author: Dimitry Andric AuthorDate: 2023-07-03 16:58:11 +0000 Commit: Dimitry Andric CommitDate: 2023-07-03 16:58:24 +0000 Stop removing OpenSSL man pages that were revived in 3.0.9 PR: 271615 Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") --- ObsoleteFiles.inc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 25a1ce080c39..154f0d837599 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -9631,22 +9631,17 @@ OLD_FILES+=usr/share/openssl/man/man3/RAND_SSLeay.3.gz OLD_FILES+=usr/share/openssl/man/man3/RSA_PKCS1_SSLeay.3.gz OLD_FILES+=usr/share/openssl/man/man3/RSA_null_method.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_get_ex_new_index.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_need_tmp_rsa.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_custom_cli_ext.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_default_read_ahead.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_ecdh_auto.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_tmp_rsa.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_tmp_rsa_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_SESSION_get_ex_new_index.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_add_session.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_flush_sessions.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_get_accept_state.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_get_ex_new_index.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_get_msg_callback_arg.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_need_tmp_rsa.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_remove_session.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_set_ecdh_auto.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_set_tmp_rsa.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_set_tmp_rsa_callback.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSLeay.3.gz @@ -16678,7 +16673,6 @@ OLD_FILES+=usr/share/man/man3/SSL_get_current_cipher.3.gz OLD_FILES+=usr/share/man/man3/SSL_get_default_timeout.3.gz OLD_FILES+=usr/share/man/man3/SSL_get_error.3.gz OLD_FILES+=usr/share/man/man3/SSL_get_ex_data_X509_STORE_CTX_idx.3.gz -OLD_FILES+=usr/share/man/man3/SSL_get_ex_new_index.3.gz OLD_FILES+=usr/share/man/man3/SSL_get_fd.3.gz OLD_FILES+=usr/share/man/man3/SSL_get_peer_cert_chain.3.gz OLD_FILES+=usr/share/man/man3/SSL_get_peer_certificate.3.gz From nobody Mon Jul 3 19:29:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QvwwH3tVQz4lSr1; Mon, 3 Jul 2023 19:29: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 4QvwwH3LtGz49V5; Mon, 3 Jul 2023 19:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688412559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lT8N0kkY2n3LOv6vTx1pkka5Hu4sScf0rpR67naTWYg=; b=mt70sj4PkD4qr6/hqQQvxYBGtcFdfC1ITQezR27yaHlfu/TBjG6cAyIuPsc0CLozuMlAgM L2M3DmpMEXi2EBlOcJNaziqpQevhuvYzP+UnPcniwNyG0KYoAPTqWpfZ4xtyZisuSgxNwV H+YLYkkhp8TnB2YXJwfTL19UfPgYXPEPgMjM3D/xhuRtnXbuFo3eMWgiXxodesTEMOpPDw Bbynv23q0MUzqwmA6r1bS+TrwS4dh2DUSWEM7oWwPG9sSMmum/QcpipX8KSERg1euSA8T+ OGNhhqijsSvuwrt5jzz5hFWSJk5bsDCTPK49rlrzdk2c4TCthggwqxnhhq1fNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688412559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lT8N0kkY2n3LOv6vTx1pkka5Hu4sScf0rpR67naTWYg=; b=Fb9n0u1lVXttczzmkUNOp9PSpx4s0FH+j+DqN5RmHdd5ZlKBiP3xH116N/xkGanMqOGSgs IjJoozRDp5JKA6w76vspJX/QdN2wq/sy+Qq4476Oa+bvOVJzYFdTGtn5xu3V8osdo3ZlaH wD1oxTKavjcXoUXMibHonAQMwxHMF3ya1bsriGKbPUX8+M6pPF7Ux2onWKBv2niGYeKQFp nmvKtAjBDq/sGfyNyMUap4L8whuJLdoZ2M32uxJAyO9VwvfgOzuGUluRcdZ3XHKurKOl1r b8bwbKwLyaqWDtxXft/NVM8g04F+anl6Mo5UJ9FcOPGBC22b9+M9eZEMJLTmOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688412559; a=rsa-sha256; cv=none; b=giUIt0O/RX2ZlS/Nr2vZ8mWjL6OumKADyNHlcOPtT8ZzsX0HEHPkyHzSMbUpV4e8DsPkCp 5u/lCHtChuw7OfUtwmdWd1KV9THk/I+pWHv6psysHhzRO0OUcaL673czTYkdgifx82Rz29 FtgJ3nXyNVM09jNsaS3a7kCl9Qvgz6RvXKG/VP4yME+Fm1GSlDsbVUh8OaXBG/XajZhiMn NqMkwquAnOMYLsqYa9I0X6auq3Kb0T7Hl02tRtGwyS1iDvbtJKgORzht8Jtw/IUxTBKu/4 K29skqYxsbPj3BEmhYO7/06hO8E94yf3xnYh6g7RuhvccCvHPe5uUuBMhq60yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QvwwH2Qppz12YP; Mon, 3 Jul 2023 19:29: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 363JTJDN032430; Mon, 3 Jul 2023 19:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363JTJxj032429; Mon, 3 Jul 2023 19:29:19 GMT (envelope-from git) Date: Mon, 3 Jul 2023 19:29:19 GMT Message-Id: <202307031929.363JTJxj032429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: 3f21d3e0baba - main - release: update GCE configuration for python3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f21d3e0babacabb9a32e0e9a8ab290025d5577c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=3f21d3e0babacabb9a32e0e9a8ab290025d5577c commit 3f21d3e0babacabb9a32e0e9a8ab290025d5577c Author: Glen Barber AuthorDate: 2023-07-03 19:28:33 +0000 Commit: Glen Barber CommitDate: 2023-07-03 19:28:33 +0000 release: update GCE configuration for python3 Reported by: asomers PR: 272354 MFC after: 3 days Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd --- release/tools/gce.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 1acd789a88e6..725709e3f335 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -9,7 +9,7 @@ export VMSIZE=20g # Set to a list of packages to install. export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} firstboot-freebsd-update \ firstboot-pkgs \ google-cloud-sdk panicmail sudo \ - sysutils/py-google-compute-engine lang/python lang/python2 \ + sysutils/py-google-compute-engine lang/python \ lang/python3" # Set to a list of third-party software to enable in rc.conf(5). From nobody Mon Jul 3 19:32:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qvx0M2hpvz4lVbn; Mon, 3 Jul 2023 19: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 4Qvx0M1w9Qz4CYG; Mon, 3 Jul 2023 19: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=1688412771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T37rNxhQP9Hz8LyDqiTppixfWV0uk1pJvo9HF1/jQ0o=; b=ZURGZp+HhR7ueWQ3rNRmszwdbwx27OxhnNz2QQEpR83uKYOwRCoo+SeWNFYKRXUlxJtDlr u73GVYJnmvVjcYCh98H49m0lCrI5PkHTmxw4A4bIwA0rmIhRg79nIdywQV0kNh7MfPJsQ8 4x211NthiblcCXhACIAEyxSLjg5DnW3TSmE/nlcTjIR37Pn2XSH9d1Ia4vbMU48LpDGvU2 AfXMd7yUPeRnUuulAfzPoBt/B2bjrZcYbwDKYWgP6570qVa3d9sjow9wSFTr2zHEb80F1/ vL/WJGYpXZCPg7/Q2Sy94C9SG7glRQqqu7co8FEyRPMf6vOYFrsrEQACNyX5xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688412771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T37rNxhQP9Hz8LyDqiTppixfWV0uk1pJvo9HF1/jQ0o=; b=tx/DKt+JKHromwCZXZYLXsXmg4NVlv56afcHgcbFjrz7mjbvOEpfnoLWXmSdmMu+52sVNZ DcPJr/LAH/js9SN2xGc/neGgGsexXsmHEybZiTuptWwdOAj9To22EGVi7+YXTIoH5iCgXz /XGnz8jNEgTr/oI2NAShyFL++5j7tyGoZxyP5p2DYtcwKFWk45Zyu0UFNXeP1fJE0M68Li bXaF2Sl3BnEXvxCrzL/mslSOZwyEismEu3Wu9rVi1SVCptFVxxIpWnUCwwjQwuwx8FaYiI HPhWrTWmgy5flR+Geuu16zdsHIf/rk/F4PtDwnL6Hm6uDb+HHxZ4qFAmit9eBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688412771; a=rsa-sha256; cv=none; b=Uw4uz7uwkU521+eStGsbphqHSAR30RuTYmiprR4gxt64rytbXdSgELYgf022+/lbiJYFPB UVIHs1fLSy+2ZiY2Nmi0dz57wDXXyuzgHbzAw3JKzMIsPlBYmC7bmBg3LVhxdOBjSRaQR6 aLzGEtl26hDnsviaqNXebWELxkVcYodU0ltDFml8iX2g3P9jqgnHG/coHc/a8lSfTkHPUG qyBdT9tgrkwbC+Yw4HkLs6LoJF2W269uGNVu2+N+cVT5bQG2H3lOUsBDByBFlSvymeYmoo LPozLumJYQhuTGZhZcIeMHd5ufbL++Jhi0F4IGBKjSrwW8Ci81y1LB+WsYCcXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qvx0M0vCpz12wF; Mon, 3 Jul 2023 19: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 363JWpTb048007; Mon, 3 Jul 2023 19: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 363JWpfC048006; Mon, 3 Jul 2023 19:32:51 GMT (envelope-from git) Date: Mon, 3 Jul 2023 19:32:51 GMT Message-Id: <202307031932.363JWpfC048006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d0b0424fa0ca - main - altq codel: do not insert the same mtag twice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0b0424fa0ca8fb239e00d6bdd5e6340b7a85e68 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d0b0424fa0ca8fb239e00d6bdd5e6340b7a85e68 commit d0b0424fa0ca8fb239e00d6bdd5e6340b7a85e68 Author: Kristof Provost AuthorDate: 2023-07-03 17:02:23 +0000 Commit: Kristof Provost CommitDate: 2023-07-03 19:32:33 +0000 altq codel: do not insert the same mtag twice If we're called on an mbuf that's passed through codel before it may already contain the MTAG_CODEL tag. The code accounts for this and does not allocate a new mtag. However, it inserts the mtag unconditionally. That is, it inserts the existing mtag a second time. When the mbuf later gets freed we iterate over the list of mtags to fee them one by one, and we'll end up freeing an mtag that's already been freed. Only insert the mtag if we've allocated a new one. If we found one there's no need to insert it again. See also: https://redmine.pfsense.org/issues/14497 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/altq/altq_codel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net/altq/altq_codel.c b/sys/net/altq/altq_codel.c index be16a5aef3e5..5006920ca68d 100644 --- a/sys/net/altq/altq_codel.c +++ b/sys/net/altq/altq_codel.c @@ -289,16 +289,18 @@ codel_addq(struct codel *c, class_queue_t *q, struct mbuf *m) if (qlen(q) < qlimit(q)) { mtag = m_tag_locate(m, MTAG_CODEL, 0, NULL); - if (mtag == NULL) + if (mtag == NULL) { mtag = m_tag_alloc(MTAG_CODEL, 0, sizeof(uint64_t), M_NOWAIT); + if (mtag != NULL) + m_tag_prepend(m, mtag); + } if (mtag == NULL) { m_freem(m); return (-1); } enqueue_time = (uint64_t *)(mtag + 1); *enqueue_time = read_machclk(); - m_tag_prepend(m, mtag); _addq(q, m); return (0); } From nobody Mon Jul 3 19:32:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qvx0N45Fvz4lVbw; Mon, 3 Jul 2023 19: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 4Qvx0N2lpjz4Cj2; Mon, 3 Jul 2023 19: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=1688412772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XcxWFBzni8CW11xaQgJmUU2ZYymrajSCEiE2rzrNTA0=; b=gvNHu/G9LKjA7JoAnyqtf8Ge+2CLnvsgzS+3SjAME1uXkRvwCmgLWT+1NS8hadRffRVjig ccPQghLLwgLM7a3LsQ0VymGG+TOpjwGx+G6U0a93pLvtlaY2EAcOXeC2mGorvq9L0TEnHB IQgmVyz9XJkxc1HubTbvkZsoTV98+ZJ7ZL65pyDQGhugmBhNMT/3go7ZldQsawjoUErDqi rRxGDi5q870YCoZGNuy8XZiLuJ1NRiRkbYqW3kBaGXpC1ZK7nqZBAHcwB+7U7RM/iM6NPA mT2Ky3w7vI4+i6xGk/0NbHWqZIPl3p3jzOHXryV478HObjyRbD0yQUewo2Q73g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688412772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XcxWFBzni8CW11xaQgJmUU2ZYymrajSCEiE2rzrNTA0=; b=g1qwY7FpLG++BX0YdSi1wx5mFf2xnIz6RDk1nfbsJsSoWPbGkmZtf8oW8i5bqK93rOZ53R Ab/EEafU2uiJ8dVmRNPKr0kYPW6WFzxpzyKa9phhZ+6lBYREvZM0ZTW4/cPel6Arny3QNo oppwkTwiPWTczXQza8gCUOkg53vl9gCilRzf1RnAp843js0nYWjd/Uv0oWWFux3EYaKkLu T3w2Rzbf71a3d9JfUWpsF4GqiSycCCV+K1IW3AQTxPldfR0HuYfr3sxNV5JEhwRfVEtFxT 24xN2cRyNqL7mHW5aMCdAysorldBiNd7cADi58IGOmj+Zo3Mi55FQnvNlGNVEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688412772; a=rsa-sha256; cv=none; b=lpp28OBYwS48ilsW6+CV/bcWLVLn4NJ53bu+S4Ax8HSpCLaqmPYZRsBSNfkr+Gz5ttF3Z5 //Se37omcJTRhjUKob5e+PoZSswU9ZhOfI42iigJsyL84bs0jBH1XkbZlKiOcGIYtbMpmf e99l0lFv/r+FQbH88gf9bNcjOZVTteoOxtnjZejv2qbb1u6F9rGpyaYR7MaL4eaZaNSeYI ksKAQ8GFQZlotUmMyeYXg+lWF75QzAVvbF0S009sQ6afgpkQ48UoZPtf/GHFvhB2gGtICI 3d1dJviGfm3hsGo2B8DQiU1bBl4GaslibiaMRu1IMjA+1md5qfgEt/8/dEKGww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qvx0N1q76z12Z7; Mon, 3 Jul 2023 19: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 363JWq1g048026; Mon, 3 Jul 2023 19: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 363JWqhD048025; Mon, 3 Jul 2023 19:32:52 GMT (envelope-from git) Date: Mon, 3 Jul 2023 19:32:52 GMT Message-Id: <202307031932.363JWqhD048025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: e8423423737e - main - pf tests: test double-pass codel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8423423737ec0c08fc021d58795d5d34a55dda2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e8423423737ec0c08fc021d58795d5d34a55dda2 commit e8423423737ec0c08fc021d58795d5d34a55dda2 Author: Kristof Provost AuthorDate: 2023-07-03 17:06:06 +0000 Commit: Kristof Provost CommitDate: 2023-07-03 19:32:33 +0000 pf tests: test double-pass codel Build a setup where a given packet will be passed through the codel code twice. This used to trigger issues with double-free on mtags. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/altq.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 0ced82a3a942..57a9edf11366 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -288,6 +288,55 @@ prioritise_cleanup() altq_cleanup } +atf_test_case "codel_vlan" "cleanup" +codel_vlan_head() +{ + atf_set descr 'Test double-pass through ALTQ with codel' + atf_set require.user root +} + +codel_vlan_body() +{ + altq_init + is_altq_supported priq + is_altq_supported codel + + j=altq_vlan_codel + epair=$(vnet_mkepair) + + vnet_mkjail ${j}a ${epair}a + va=$(jexec ${j}a ifconfig vlan create) + jexec ${j}a ifconfig ${epair}a up + jexec ${j}a ifconfig ${va} vlan 42 vlandev ${epair}a up + jexec ${j}a ifconfig ${va} inet 192.0.2.1/24 + + vnet_mkjail ${j}b ${epair}b + vb=$(jexec ${j}b ifconfig vlan create) + jexec ${j}b ifconfig ${epair}b up + jexec ${j}b ifconfig ${vb} vlan 42 vlandev ${epair}b up + jexec ${j}b ifconfig ${vb} inet 192.0.2.2/24 + + # Sanity check + atf_check -s exit:0 -o ignore \ + jexec ${j}a ping -c 1 192.0.2.2 + + jexec ${j}a pfctl -e + pft_set_rules ${j}a \ + "altq on ${epair}a priq bandwidth 10Mb queue { slow }" \ + "queue slow priority 6 qlimit 50 priq ( default codel )" \ + "altq on ${va} priq bandwidth 10Mb queue { vslow }" \ + "queue vslow priority 6 qlimit 50 priq ( default codel )" \ + "pass queue (slow)" + + atf_check -s exit:0 -o ignore \ + jexec ${j}a ping -c 1 192.0.2.2 +} + +codel_vlan_cleanup() +{ + altq_cleanup +} + atf_init_test_cases() { atf_add_test_case "hfsc" @@ -295,4 +344,5 @@ atf_init_test_cases() atf_add_test_case "cbq_vlan" atf_add_test_case "codel_bridge" atf_add_test_case "prioritise" + atf_add_test_case "codel_vlan" } From nobody Mon Jul 3 20:23:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qvy730CYCz4lmqR; Mon, 3 Jul 2023 20:23: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 4Qvy7274wqz4NXF; Mon, 3 Jul 2023 20:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688415823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OSUY+88pONhAj/OYpjWB5lYYm8ZaRjAafAWsNoat5v4=; b=yTkiiBO9FeGMHTmS5zYH8712v5Rkf1+cxzWbpVQGbd2MORHgJmmo7Ns4hOkPFfY5kod5+o NPVewD02TAteb0JxbQQkjleS3NH6U60F4+SjGFFkx6oRF9XwbPoJZHE1IPzXxjdhNBbMXS nhzyHp8bqbKnXkjFIYqKoaTBex8a1ZdYVVjSRtYjJRvL1ROS6nm3cr0RrMutn1zGD+8MpN 2dJxyLwmlgEpN/KuhdGRIcomXWP4BysAllKxARzQxcck6j8e5+EhsJkA/GwKbnnIRysqgr 4YmWMP3Bt9UuzENk+CxmKAQ+Y33F8DsAXQ/dmHWRwS2iIYOWplmdG2ggeAi0Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688415823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OSUY+88pONhAj/OYpjWB5lYYm8ZaRjAafAWsNoat5v4=; b=mGqQ9Hex2RjkM5WuTe8+kSDwfhZwTvTpXMW/LLDkOm9O62oL8Bb7yUmUc+BkLoObGcX3vt PcTkRLnXAa5vdG5yngQKoRDxr6/SIj57TFr4Zcj/nUZasHCOrdNBZgXzzicQjRhQAvKqWM OW4rKrYJHH0DEHOPtxvkeO5YDVxoJfcFybAV8LZxwpbzP8w6d7gmc2BMUNxDMisOHP0cYo T28KTYmW/b7Up5nhaqODce6cdFy6dzxoq9PKF5j81JGACulfNuVJZbP4QkLk+534IcJFIO HLdyGUv4oNL0hRAHYfPjE6LJ1Qs96oRfbAOvjQbzxSDlb9G3CdDkzhoB+/PvuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688415823; a=rsa-sha256; cv=none; b=FJrHymlzaXNo5NkIabtj5BmxCnn+06jvhUsnLBPhUNvcnOzrMscLQS15hN5J6bgRQGsoeW rlCn7cGskWy9fpG6TuzDOPZiPvoSFXhBYvRHOZX8GedvokTrrd16YZOFyik7lg2c+JfNrn EiZ0uC/Ywwdj32B7UaPeU7rfXehBhe5cf0NGIcu68bzTlxbpZ4whN4Pn10y06lhLUPKvLc M3km/UZGeCkzLM1oQA3HNM4Yruum/xI86LWkHUF5MivRMH0lxgehaguTJRPmVbRlZpgvWd 7dhngDK6ueH1bH2dQ8PgIkoWA0/7QCntw2ZIZveN/lGXjDjcUbCknbbne9Vc7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qvy7268rSz13ql; Mon, 3 Jul 2023 20:23: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 363KNgaQ031896; Mon, 3 Jul 2023 20:23:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363KNg69031895; Mon, 3 Jul 2023 20:23:42 GMT (envelope-from git) Date: Mon, 3 Jul 2023 20:23:42 GMT Message-Id: <202307032023.363KNg69031895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 49390697b926 - main - lib/libc/tests/string: add unit tests for ffs, ffsl, ffsll, fls, flsl, and flsll List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49390697b9265d08d3f831cf38cdc2f79e216c48 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=49390697b9265d08d3f831cf38cdc2f79e216c48 commit 49390697b9265d08d3f831cf38cdc2f79e216c48 Author: Robert Clausecker AuthorDate: 2023-06-23 17:26:44 +0000 Commit: Robert Clausecker CommitDate: 2023-07-03 20:18:27 +0000 lib/libc/tests/string: add unit tests for ffs, ffsl, ffsll, fls, flsl, and flsll Also supply CFLAGS+=-fno-builtin to ensure our unit tests actually test libc functions and not clang's builtins. Sponsored by: FreeBSD Foundation Approved by: kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D40729 --- lib/libc/tests/string/Makefile | 9 ++++ lib/libc/tests/string/ffs_test.c | 88 ++++++++++++++++++++++++++++++++++++++ lib/libc/tests/string/ffsl_test.c | 32 ++++++++++++++ lib/libc/tests/string/ffsll_test.c | 32 ++++++++++++++ lib/libc/tests/string/fls_test.c | 88 ++++++++++++++++++++++++++++++++++++++ lib/libc/tests/string/flsl_test.c | 32 ++++++++++++++ lib/libc/tests/string/flsll_test.c | 32 ++++++++++++++ 7 files changed, 313 insertions(+) diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index 5d1944113a1a..e0b2db711682 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -1,5 +1,14 @@ # $FreeBSD$ +# ensure libc functions are tested, not clang's builtins +CFLAGS+= -fno-builtin + +ATF_TESTS_C+= ffs_test +ATF_TESTS_C+= ffsl_test +ATF_TESTS_C+= ffsll_test +ATF_TESTS_C+= fls_test +ATF_TESTS_C+= flsl_test +ATF_TESTS_C+= flsll_test ATF_TESTS_C+= memcmp_test ATF_TESTS_C+= memset_s_test ATF_TESTS_C+= stpncpy_test diff --git a/lib/libc/tests/string/ffs_test.c b/lib/libc/tests/string/ffs_test.c new file mode 100644 index 000000000000..aea61254482e --- /dev/null +++ b/lib/libc/tests/string/ffs_test.c @@ -0,0 +1,88 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ +#include + +#include +#include +#include +#include + +#ifndef FFS +# define FFS ffs +# define TYPE int +# define TYPE_MIN INT_MIN +#endif + +ATF_TC_WITHOUT_HEAD(zero); +ATF_TC_BODY(zero, tc) +{ + ATF_CHECK_EQ((TYPE)0, FFS(0)); +} + +ATF_TC_WITHOUT_HEAD(twobit); +ATF_TC_BODY(twobit, tc) +{ + const TYPE one = 1; + TYPE x; + const int n = sizeof(TYPE) * CHAR_BIT; + int i, j; + + for (i = 0; i < n - 1; i++) + for (j = 0; j <= i; j++) { + x = one << i | one << j; + ATF_CHECK_EQ_MSG(j + 1, FFS(x), + "%s(%#jx) == %d != %d", __STRING(FFS), (intmax_t)x, FFS(x), j + 1); + } +} + +ATF_TC_WITHOUT_HEAD(twobitneg); +ATF_TC_BODY(twobitneg, tc) +{ + const TYPE one = 1; + TYPE x; + const int n = sizeof(TYPE) * CHAR_BIT; + int i, j; + + for (i = 0; i < n - 1; i++) + for (j = 0; j <= i; j++) { + x = one << i | one << j | TYPE_MIN; + ATF_CHECK_EQ_MSG(j + 1, FFS(x), + "%s(%#jx) == %d != %d", __STRING(FFS), (intmax_t)x, FFS(x), j + 1); + } +} + + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, zero); + ATF_TP_ADD_TC(tp, twobit); + ATF_TP_ADD_TC(tp, twobitneg); + + return (atf_no_error()); +} diff --git a/lib/libc/tests/string/ffsl_test.c b/lib/libc/tests/string/ffsl_test.c new file mode 100644 index 000000000000..809cea3d3a93 --- /dev/null +++ b/lib/libc/tests/string/ffsl_test.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ +#define FFS ffsl +#define TYPE long +#define TYPE_MIN LONG_MIN + +#include "ffs_test.c" diff --git a/lib/libc/tests/string/ffsll_test.c b/lib/libc/tests/string/ffsll_test.c new file mode 100644 index 000000000000..1a620cbf9aba --- /dev/null +++ b/lib/libc/tests/string/ffsll_test.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ +#define FFS ffsll +#define TYPE long long +#define TYPE_MIN LLONG_MIN + +#include "ffs_test.c" diff --git a/lib/libc/tests/string/fls_test.c b/lib/libc/tests/string/fls_test.c new file mode 100644 index 000000000000..847977d260c9 --- /dev/null +++ b/lib/libc/tests/string/fls_test.c @@ -0,0 +1,88 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ +#include + +#include +#include +#include +#include + +#ifndef FLS +# define FLS fls +# define TYPE int +# define TYPE_MIN INT_MIN +#endif + +ATF_TC_WITHOUT_HEAD(zero); +ATF_TC_BODY(zero, tc) +{ + ATF_CHECK_EQ((TYPE)0, FLS(0)); +} + +ATF_TC_WITHOUT_HEAD(twobit); +ATF_TC_BODY(twobit, tc) +{ + const TYPE one = 1; + TYPE x; + const int n = sizeof(TYPE) * CHAR_BIT; + int i, j; + + for (i = 0; i < n - 1; i++) + for (j = 0; j <= i; j++) { + x = one << i | one << j; + ATF_CHECK_EQ_MSG(i + 1, FLS(x), + "%s(%#jx) == %d != %d", __STRING(FLS), (intmax_t)x, FLS(x), i + 1); + } +} + +ATF_TC_WITHOUT_HEAD(twobitneg); +ATF_TC_BODY(twobitneg, tc) +{ + const TYPE one = 1; + TYPE x; + const int n = sizeof(TYPE) * CHAR_BIT; + int i, j; + + for (i = 0; i < n - 1; i++) + for (j = 0; j <= i; j++) { + x = one << i | one << j | TYPE_MIN; + ATF_CHECK_EQ_MSG(n, FLS(x), + "%s(%#jx) == %d != %d", __STRING(FLS), (intmax_t)x, FLS(x), n); + } +} + + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, zero); + ATF_TP_ADD_TC(tp, twobit); + ATF_TP_ADD_TC(tp, twobitneg); + + return (atf_no_error()); +} diff --git a/lib/libc/tests/string/flsl_test.c b/lib/libc/tests/string/flsl_test.c new file mode 100644 index 000000000000..4b1e330d4564 --- /dev/null +++ b/lib/libc/tests/string/flsl_test.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ +#define FLS flsl +#define TYPE long +#define TYPE_MIN LONG_MIN + +#include "fls_test.c" diff --git a/lib/libc/tests/string/flsll_test.c b/lib/libc/tests/string/flsll_test.c new file mode 100644 index 000000000000..23f469b7b5de --- /dev/null +++ b/lib/libc/tests/string/flsll_test.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ +#define FLS flsll +#define TYPE long long +#define TYPE_MIN LLONG_MIN + +#include "fls_test.c" From nobody Mon Jul 3 20:23:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qvy741ZBTz4ln4Q; Mon, 3 Jul 2023 20:23: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 4Qvy740lQjz4NQJ; Mon, 3 Jul 2023 20:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688415824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r27bSu4qlg3cvU1CdlgfD8bJBRFoo3fFalNvEgGE1t4=; b=BHovsyIFPrh0ovwuHptmbRlezGv0Wb/FgnsXqstKtvLcKvae28Wi4Z5+MlO2qDQJXqDGdC E6KdEqllmMp8ZJjsh5tQ/PVkpr5mRVbNSSCheY4wyQy3jCL1Ls+F9ec7EXKReqt0BbLAkT 3jpiaolsooip2ZVqMpItKXa8OdCX9QDjzK4hWoTC3U/Jg3dR/FYf9TnU70Wyhp818CfxVx nNmPWTg52EiMBvcabFAkznKYJL9tea5YkNYZJ7OAHOIgskzhi2s3IZKw4nbNr+BkB0M49N LDPkBsf2A/lBWiz0DKDguFhEHEYSloJjQs+ZafErwJJvP00Djf6X9jFWq8K21A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688415824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r27bSu4qlg3cvU1CdlgfD8bJBRFoo3fFalNvEgGE1t4=; b=UJtFgFWj7TyeDFuV9Ajc2lEBdcijCsyl4lAl4+uCmEvBIFJtCnEiIOGA3NDiXz76KG1u2/ cJFFFddATU5XuBELOLwHQtW7rgX6FFY4aNoHSapo3o5jpy3KNWfP9TOd+GP61FkXA5u09o y+0x19iZMT1S3uK3Wrk/kmBo09QxiIqwVE2Lyn9Q97O8FhkZ9plwvjPX28kJGbToQ1tKWl lpS36Fec1e8YQDlOQFl4EYNfKQ/UU2ke7dMWmOpdPMqFB0IMY1RZt3uRrNnqVRV5u5c7qI RPOsJPJ65sBOCFsHG1Sqc9dIFNvQqJqVV8UmY2bKIpMxhMrAOpxtCfacOWQkHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688415824; a=rsa-sha256; cv=none; b=Ta853JTsjoGz+OKYdS6M+wBmyu0tzfK4lIT7ld4Xpq5G4G2qQ351+jSWSuGD2RBLFNywzN d8E91o9sljjYMPpbgGukX3+XcdQVbF5+u5r1/B5OHa7EGPUTYP0dnjChSiDSvnqTbgj1nK a6wU82q88LACcctLf5qv1kVQktF2kVN9McLq7EcSUiH9LDAFZgqBlut3n6encMknT6l0zu XasDO+kEJFBf8jMv2AbVc/vtjaSiNASBj2xa2/B7SPadh9shhLIvnMlkTtW86B33H+/ZtB kLGU0fgKfjjmRs1eWR4Xa3Zb0aDKdGbU8B6n82KzCsq767SvL+30MlIoN3FIEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qvy736xh8z14KG; Mon, 3 Jul 2023 20:23: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 363KNh5K031915; Mon, 3 Jul 2023 20:23:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 363KNhu6031914; Mon, 3 Jul 2023 20:23:43 GMT (envelope-from git) Date: Mon, 3 Jul 2023 20:23:43 GMT Message-Id: <202307032023.363KNhu6031914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: ee8b0c436d72 - main - lib/libc/string: replace ffs/fls implementations with clang builtins List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee8b0c436d7221c25e8be3c3fe1f9da78b9d5b16 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=ee8b0c436d7221c25e8be3c3fe1f9da78b9d5b16 commit ee8b0c436d7221c25e8be3c3fe1f9da78b9d5b16 Author: Robert Clausecker AuthorDate: 2023-06-23 16:22:54 +0000 Commit: Robert Clausecker CommitDate: 2023-07-03 20:18:27 +0000 lib/libc/string: replace ffs/fls implementations with clang builtins Most architectures we support (except for riscv64) have instructions to compute these functions very quickly. Replace old code with the ffs and clz builtin functions, allowing clang to generate good code for all architectures. As a consequence, toss out arm and i386 ffs() implementations. Sponsored by: FreeBSD Foundation Approved by: mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D40730 --- lib/libc/arm/string/Makefile.inc | 1 - lib/libc/arm/string/ffs.S | 57 --------------------------------------- lib/libc/i386/string/Makefile.inc | 1 - lib/libc/i386/string/ffs.S | 56 -------------------------------------- lib/libc/string/ffs.c | 12 ++++----- lib/libc/string/ffsl.c | 12 ++++----- lib/libc/string/ffsll.c | 12 ++++----- lib/libc/string/fls.c | 13 +++++---- lib/libc/string/flsl.c | 14 +++++----- lib/libc/string/flsll.c | 13 +++++---- 10 files changed, 34 insertions(+), 157 deletions(-) diff --git a/lib/libc/arm/string/Makefile.inc b/lib/libc/arm/string/Makefile.inc index cf3175ea4e8c..550de34adb0e 100644 --- a/lib/libc/arm/string/Makefile.inc +++ b/lib/libc/arm/string/Makefile.inc @@ -3,7 +3,6 @@ MDSRCS+= \ bcopy.S \ bzero.S \ - ffs.S \ memcmp.S \ memcpy.S \ memmove.S \ diff --git a/lib/libc/arm/string/ffs.S b/lib/libc/arm/string/ffs.S deleted file mode 100644 index 5756dd81d21d..000000000000 --- a/lib/libc/arm/string/ffs.S +++ /dev/null @@ -1,57 +0,0 @@ -/* $NetBSD: ffs.S,v 1.5 2003/04/05 23:08:52 bjh21 Exp $ */ -/* - * Copyright (c) 2001 Christopher Gilbert - * 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. - * 3. The name of the company nor the name of the author may be used to - * endorse or promote products derived from this software without specific - * prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -__FBSDID("$FreeBSD$"); - -.syntax unified - -/* - * ffs - find first set bit, this algorithm isolates the first set - * bit, then multiplies the number by 0x0450fbaf which leaves the top - * 6 bits as an index into the table. This algorithm should be a win - * over the checking each bit in turn as per the C compiled version. - * - * This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on - * 16 Feb 1994. - */ - -ENTRY(ffs) - /* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */ - rsb r1, r0, #0 - ands r0, r0, r1 - itt ne - clzne r0, r0 - rsbne r0, r0, #32 - RET -END(ffs) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/i386/string/Makefile.inc b/lib/libc/i386/string/Makefile.inc index a8c50a285cbd..f3678b93bec3 100644 --- a/lib/libc/i386/string/Makefile.inc +++ b/lib/libc/i386/string/Makefile.inc @@ -4,7 +4,6 @@ MDSRCS+= \ bcmp.S \ bcopy.S \ bzero.S \ - ffs.S \ memcmp.S \ memcpy.S \ memmove.S \ diff --git a/lib/libc/i386/string/ffs.S b/lib/libc/i386/string/ffs.S deleted file mode 100644 index 3a0431c6a845..000000000000 --- a/lib/libc/i386/string/ffs.S +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1993 Winning Strategies, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Winning Strategies, Inc. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -/* - * ffs(value) - * finds the first bit set in value and returns the index of - * that bit. Bits are numbered starting from 1, starting at the - * rightmost bit. A return value of 0 means that the argument - * was zero. - * - * Written by: - * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. - */ - -ENTRY(ffs) - bsfl 4(%esp),%eax - jz L1 /* ZF is set if all bits are 0 */ - incl %eax /* bits numbered from 1, not 0 */ - ret - - .align 2 -L1: xorl %eax,%eax /* clear result */ - ret -END(ffs) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c index 738ef90ce091..c011b3390612 100644 --- a/lib/libc/string/ffs.c +++ b/lib/libc/string/ffs.c @@ -3,6 +3,10 @@ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Robert Clausecker + * 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 @@ -43,11 +47,5 @@ __FBSDID("$FreeBSD$"); int ffs(int mask) { - int bit; - - if (mask == 0) - return(0); - for (bit = 1; !(mask & 1); bit++) - mask = (unsigned int)mask >> 1; - return (bit); + return (__builtin_ffs(mask)); } diff --git a/lib/libc/string/ffsl.c b/lib/libc/string/ffsl.c index dbd894b9655b..6e1ac8ec45c1 100644 --- a/lib/libc/string/ffsl.c +++ b/lib/libc/string/ffsl.c @@ -3,6 +3,10 @@ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Robert Clausecker + * 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 @@ -40,11 +44,5 @@ __FBSDID("$FreeBSD$"); int ffsl(long mask) { - int bit; - - if (mask == 0) - return (0); - for (bit = 1; !(mask & 1); bit++) - mask = (unsigned long)mask >> 1; - return (bit); + return (__builtin_ffsl(mask)); } diff --git a/lib/libc/string/ffsll.c b/lib/libc/string/ffsll.c index 91886de2f127..b945658b9008 100644 --- a/lib/libc/string/ffsll.c +++ b/lib/libc/string/ffsll.c @@ -3,6 +3,10 @@ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Robert Clausecker + * 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 @@ -40,11 +44,5 @@ __FBSDID("$FreeBSD$"); int ffsll(long long mask) { - int bit; - - if (mask == 0) - return (0); - for (bit = 1; !(mask & 1); bit++) - mask = (unsigned long long)mask >> 1; - return (bit); + return (__builtin_ffsll(mask)); } diff --git a/lib/libc/string/fls.c b/lib/libc/string/fls.c index d9edc41f9599..3c4719776778 100644 --- a/lib/libc/string/fls.c +++ b/lib/libc/string/fls.c @@ -3,6 +3,10 @@ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Robert Clausecker + * 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 @@ -32,6 +36,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include /* @@ -40,11 +45,5 @@ __FBSDID("$FreeBSD$"); int fls(int mask) { - int bit; - - if (mask == 0) - return (0); - for (bit = 1; mask != 1; bit++) - mask = (unsigned int)mask >> 1; - return (bit); + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clz(mask)); } diff --git a/lib/libc/string/flsl.c b/lib/libc/string/flsl.c index 60370cf7d832..f5280b77a4e2 100644 --- a/lib/libc/string/flsl.c +++ b/lib/libc/string/flsl.c @@ -3,6 +3,11 @@ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2023 The FreeBSD Foundation + + * + * Portions of this software were developed by Robert Clausecker + * 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 @@ -32,6 +37,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include /* @@ -40,11 +46,5 @@ __FBSDID("$FreeBSD$"); int flsl(long mask) { - int bit; - - if (mask == 0) - return (0); - for (bit = 1; mask != 1; bit++) - mask = (unsigned long)mask >> 1; - return (bit); + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clzl(mask)); } diff --git a/lib/libc/string/flsll.c b/lib/libc/string/flsll.c index 275aaa0e2e15..ab504b8e592f 100644 --- a/lib/libc/string/flsll.c +++ b/lib/libc/string/flsll.c @@ -3,6 +3,10 @@ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Robert Clausecker + * 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 @@ -32,6 +36,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include /* @@ -40,11 +45,5 @@ __FBSDID("$FreeBSD$"); int flsll(long long mask) { - int bit; - - if (mask == 0) - return (0); - for (bit = 1; mask != 1; bit++) - mask = (unsigned long long)mask >> 1; - return (bit); + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clzll(mask)); } From nobody Mon Jul 3 21:24:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QvzSz059nz4m1tk; Mon, 3 Jul 2023 21:24:19 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4QvzSx5KgBz3L4S; Mon, 3 Jul 2023 21:24:17 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net; dmarc=none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 3A7463C0199; Mon, 3 Jul 2023 21:24:11 +0000 (UTC) Date: Mon, 3 Jul 2023 21:24:11 +0000 From: Brooks Davis To: Ka Ho Ng Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 005aa1743b42 - main - modules: bzero the modspecific_t Message-ID: References: <202307012259.361MxM4i017090@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <202307012259.361MxM4i017090@gitrepo.freebsd.org> X-Spamd-Result: default: False [-1.79 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_MEDIUM(-0.99)[-0.994]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; BLOCKLISTDE_FAIL(0.00)[199.48.129.229:server fail]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[brooks]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QvzSx5KgBz3L4S X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Sat, Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote: > The branch main has been updated by khng: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D005aa1743b42b52fbd49b9d5ec= 44816902b6ee9f >=20 > commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f > Author: Ka Ho Ng > AuthorDate: 2023-07-01 19:41:53 +0000 > Commit: Ka Ho Ng > CommitDate: 2023-07-01 22:58:46 +0000 >=20 > modules: bzero the modspecific_t > =20 > Per https://reviews.llvm.org/D68115, only the first field is > zero-initialized, meanwhile other fields are undef. > =20 > The pattern can be observed on clang as well, that when > -ftrivial-auto-var-init=3Dpattern is specified 0xaa is filled for > non-active fields, otherwise they are zero-initialized. > Technically both are acceptable when using clang. However it > would be good to simply bzero the modspecific_t in such case to > be strict to the standard. IMO this is a move in the wrong direction. We should see about switching this file to C17 which IIRC removes this bug in the standard. Ideally we'd be moving to C23 where we can just do foo =3D {} to zero things, but we've got a ways to go... -- Brooks From nobody Tue Jul 4 00:07:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw35v4tgWz4l7hH; Tue, 4 Jul 2023 00:08:03 +0000 (UTC) (envelope-from khng300@gmail.com) Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (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 4Qw35v39rqz4CYq; Tue, 4 Jul 2023 00:08:03 +0000 (UTC) (envelope-from khng300@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-262d9e75438so3556545a91.2; Mon, 03 Jul 2023 17:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688429281; x=1691021281; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vtR6ZvZJ99ZA5O2X896T68Axt4rdLd5LHfgPaFCvx64=; b=aTfF2O8uEkMbZg6ygqgBEukbOPsdbNPr5plMIF2BiI6B1An3PBp5i6fDrD2Bwk3rZn Ks1qYaKGla0BUrfronW4hQwOEHFmjNLtzFc/wys1rtXntZcKYFpJVWnGLQ9xuMz3dXEz IMtun5GG08FAtmrUq2x1XpGaS1UCCvajeyxJ0HLUsBuTZdJyTtap+R/q0a3aRTDBlkZY eaY5raOsArU39f1mkwL71rFuP2o05XLINrmdumCAZTl/y4QXjVps/PsxRk7rhhvmJy+s xbycaL/B+DX1MYJIi1IsF6HjlxOC03CGZGY6TmHFLY/+fe3I5CpOKQu8FDMIafQ4DPbt GfAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688429281; x=1691021281; 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=vtR6ZvZJ99ZA5O2X896T68Axt4rdLd5LHfgPaFCvx64=; b=g2Y0ENms7s7LmEHYmYIbSzpV9RzuTCfpKvFw2Zrhx7KILlx7Dgr6I0SsRwdZFH5RYB 3xq8T/okSMHZ8wsfjf3yFuw1dXx+GmSNxzIeERJ4x+ElR4vdPt6eGOiHxPuYRm2BZpc2 MZzqcWYPoNn/GQCekrWEyWa2ZMEyoOrXAhzS+19VMvZ3S6Efu2zkqUAauQRl/flK9Lqv W/3/jjVjakhlcECeB9V+gK9PQkq9xfDPaptWBl0IvAHZ50SlxQ+IDz429c9YFp6crPfF ejAqw/U7SXzQ4S1MLbBUoZwaNoh4P7qBul85Sp7NsIaVJYLZuSq2WcXLoiGw/Ma4oPTQ JvpQ== X-Gm-Message-State: ABy/qLaRCzM6MY+dzr5kclXf/wdEAemkXJiHbCEcj0kEztDwIPrVvLeA yXXKOxrepx5fF7Vl6FCprUH8tmSpYnuJarleRwR5zUa5nSGMo39Y X-Google-Smtp-Source: APBJJlEwoX1/fIZmSC0XvSGyZT/u82SLxjktYvlSM9N7sOChFanIY4TaRKYlF6jYO5T/lAqUguU53fCLi7Dry8B8OsU= X-Received: by 2002:a17:903:18c:b0:1b8:3ab:e1c with SMTP id z12-20020a170903018c00b001b803ab0e1cmr13601701plg.30.1688429281491; Mon, 03 Jul 2023 17:08:01 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202307012259.361MxM4i017090@gitrepo.freebsd.org> In-Reply-To: From: Ka Ho Ng Date: Mon, 3 Jul 2023 20:07:50 -0400 Message-ID: Subject: Re: git: 005aa1743b42 - main - modules: bzero the modspecific_t To: Brooks Davis Cc: Ka Ho Ng , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000008d3efd05ff9e1329" X-Rspamd-Queue-Id: 4Qw35v39rqz4CYq X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000008d3efd05ff9e1329 Content-Type: text/plain; charset="UTF-8" On Mon, Jul 3, 2023, 17:24 Brooks Davis wrote: > On Sat, Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote: > > The branch main has been updated by khng: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=005aa1743b42b52fbd49b9d5ec44816902b6ee9f > > > > commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f > > Author: Ka Ho Ng > > AuthorDate: 2023-07-01 19:41:53 +0000 > > Commit: Ka Ho Ng > > CommitDate: 2023-07-01 22:58:46 +0000 > > > > modules: bzero the modspecific_t > > > > Per https://reviews.llvm.org/D68115, only the first field is > > zero-initialized, meanwhile other fields are undef. > > > > The pattern can be observed on clang as well, that when > > -ftrivial-auto-var-init=pattern is specified 0xaa is filled for > > non-active fields, otherwise they are zero-initialized. > > Technically both are acceptable when using clang. However it > > would be good to simply bzero the modspecific_t in such case to > > be strict to the standard. > > IMO this is a move in the wrong direction. We should see about > switching this file to C17 which IIRC removes this bug in the standard. > > Ideally we'd be moving to C23 where we can just do foo = {} > to zero things, but we've got a ways to go... > That seems like a good idea. Ka Ho --0000000000008d3efd05ff9e1329 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jul 3, 2023, 17:24 Brooks Davis <brooks@freebsd.org> wrote:
On Sat, Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote= :
> The branch main has been updated by khng:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D005aa1743b42b52fbd49b9d5ec4481= 6902b6ee9f
>
> commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f
> Author:=C2=A0 =C2=A0 =C2=A0Ka Ho Ng <khng@FreeBSD.org>
> AuthorDate: 2023-07-01 19:41:53 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Ka Ho Ng <khng@FreeBSD.org>
> CommitDate: 2023-07-01 22:58:46 +0000
>
>=C2=A0 =C2=A0 =C2=A0modules: bzero the modspecific_t
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Per https://reviews.llvm.org/D6811= 5, only the first field is
>=C2=A0 =C2=A0 =C2=A0zero-initialized, meanwhile other fields are undef.=
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0The pattern can be observed on clang as well, that = when
>=C2=A0 =C2=A0 =C2=A0-ftrivial-auto-var-init=3Dpattern is specified 0xaa= is filled for
>=C2=A0 =C2=A0 =C2=A0non-active fields, otherwise they are zero-initiali= zed.
>=C2=A0 =C2=A0 =C2=A0Technically both are acceptable when using clang. H= owever it
>=C2=A0 =C2=A0 =C2=A0would be good to simply bzero the modspecific_t in = such case to
>=C2=A0 =C2=A0 =C2=A0be strict to the standard.

IMO this is a move in the wrong direction.=C2=A0 We should see about
switching this file to C17 which IIRC removes this bug in the standard.

Ideally we'd be moving to C23 where we can just do foo =3D {}
to zero things, but we've got a ways to go...
That seems like a good idea.
Ka Ho
--0000000000008d3efd05ff9e1329-- From nobody Tue Jul 4 03:08:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw75y5rhPz4lRmK; Tue, 4 Jul 2023 03:08: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 4Qw75y53hPz3xRj; Tue, 4 Jul 2023 03:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eek7WVvx4wI3fx+k/B8Ob0olqFHRdAhYSPf54SaTR+w=; b=WX2t2gE6XJIH9o6C7uPS53eEmA386RlBpKitixpftYq3sPwHWAaLtYVd5G6jDdsxf+fFWt 0cKVBtKjnZjprqyAImjXzVnJaMG6cJKv/XZLZJBnricEocFoffT3ZFTL1A8E96Jc85c13A lB8BCxLq3Tav+GAZOK2VkvaOO7dRKlNCvMQazOJa1S+c28Mu4ZA8ufN8wFqyKxwPrCSQY1 BdkCP3L7qHF2oqrtkv0DHVVXb1WbgwjTTwfLgnJPG8zi9RuoEhNpNtDbT+VyS3jxbE8HqN G5mzQGsQDY6evHnR+kqwlKq060W1eOGiXtEMkL196MAhFLIgstDwJmn8NjducQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eek7WVvx4wI3fx+k/B8Ob0olqFHRdAhYSPf54SaTR+w=; b=U96uFkfEDeLbqZ6Fhqz4Ccv8bAVDO2JHHEGLldEiEz8N93aEbcgGeNQS4VPt3fy/aNAEzH Diy9gjiS2qbpVGQXkf9JK6azF5fPFPDQj3IJIPfLKZA86FPAn065cpqCT1x90PLHg9lDyi Ts6MD7Ss9ZzD3YQunv6qdB2l5rbk7o1c2bwpzjVoOiELp1qHc8KXAgDr8M+pBWjgggyN0/ QDz50YYbgRkLCWrntO7mfofaJcgxlaqeU9QotDCciJwBbn4dAENAnCrP6NrAsIK4lFCrkV 3tv/CgXEP3GFgoJcTgh4H2A0BRysqvCWEYD4oU+wGZPWQsk23N3dAC0q43Jg1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688440102; a=rsa-sha256; cv=none; b=qOlcor9/IXwc0/xeAWzm02ud6m57Iny3kA3+R3FaOLetvENcGZMRCv/s6yTADEBlQn44WE Y3lMVakJHhkA6l9LpR9wRvoVIbtjBNP2HpZJleQleTTeiJ+Fl9JzA0+HOZBSGdXHFMs34L Ehea2iu6Gx7yoyKJIuWzdvKeNQhpksfbc1QpLhF5sUCz5tVWu5pskff8ICNp/rrXPlBQ/g SWDKHtY/JQEeGHshXFRs330oK06V+sU0mp627jlJXXn1xOiH+SdsRDce+lA3C2UHfIBtl1 VtR72/DyB/CqBqXvPbyO9jUGt44cMWzok8+v9PE1bmCWxE/v1BUSAlXTAvQsaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw75y3ZrQzGTm; Tue, 4 Jul 2023 03:08: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 36438MAR093772; Tue, 4 Jul 2023 03:08:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36438MTA093771; Tue, 4 Jul 2023 03:08:22 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:08:22 GMT Message-Id: <202307040308.36438MTA093771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: 4456846a1a0d - main - bin/date: Upgrade calculations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf commit 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf Author: Pedro F. Giffuni AuthorDate: 2023-07-03 02:32:10 +0000 Commit: Pedro F. Giffuni CommitDate: 2023-07-04 03:08:01 +0000 bin/date: Upgrade calculations Use long instead of int for numerous calculations, fixing a number of date calculation overflow issues. Obtained from: DragonflyBSD Git log: 4238ce6f0c6df33ce677ae298b245c62cd60fb43 (only partial) --- bin/date/vary.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/date/vary.c b/bin/date/vary.c index 5f0123110ee3..6f3c59950ecf 100644 --- a/bin/date/vary.c +++ b/bin/date/vary.c @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); #include "vary.h" struct trans { - int val; + long val; const char *str; }; @@ -52,7 +52,7 @@ static struct trans trans_wday[] = { }; static char digits[] = "0123456789"; -static int adjhour(struct tm *, char, int, int); +static int adjhour(struct tm *, char, long, int); static int domktime(struct tm *t, char type) @@ -125,7 +125,7 @@ daysinmonth(const struct tm *t) static int -adjyear(struct tm *t, char type, int val, int mk) +adjyear(struct tm *t, char type, long val, int mk) { switch (type) { case '+': @@ -146,7 +146,7 @@ adjyear(struct tm *t, char type, int val, int mk) } static int -adjmon(struct tm *t, char type, int val, int istext, int mk) +adjmon(struct tm *t, char type, long val, int istext, int mk) { int lmdays; @@ -206,7 +206,7 @@ adjmon(struct tm *t, char type, int val, int istext, int mk) } static int -adjday(struct tm *t, char type, int val, int mk) +adjday(struct tm *t, char type, long val, int mk) { int lmdays; @@ -250,7 +250,7 @@ adjday(struct tm *t, char type, int val, int mk) } static int -adjwday(struct tm *t, char type, int val, int istext, int mk) +adjwday(struct tm *t, char type, long val, int istext, int mk) { if (val < 0) return 0; @@ -286,7 +286,7 @@ adjwday(struct tm *t, char type, int val, int istext, int mk) } static int -adjhour(struct tm *t, char type, int val, int mk) +adjhour(struct tm *t, char type, long val, int mk) { if (val < 0) return 0; @@ -331,7 +331,7 @@ adjhour(struct tm *t, char type, int val, int mk) } static int -adjmin(struct tm *t, char type, int val, int mk) +adjmin(struct tm *t, char type, long val, int mk) { if (val < 0) return 0; @@ -372,7 +372,7 @@ adjmin(struct tm *t, char type, int val, int mk) } static int -adjsec(struct tm *t, char type, int val, int mk) +adjsec(struct tm *t, char type, long val, int mk) { if (val < 0) return 0; @@ -419,7 +419,7 @@ vary_apply(const struct vary *v, struct tm *t) char which; char *arg; size_t len; - int val; + long val; for (; v; v = v->next) { type = *v->arg; From nobody Tue Jul 4 03:11:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7BM6HHHz4lTF1 for ; Tue, 4 Jul 2023 03:12:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 4Qw7BM483tz40N2 for ; Tue, 4 Jul 2023 03:12:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5149aafef44so5755556a12.0 for ; Mon, 03 Jul 2023 20:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1688440330; x=1691032330; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SxIw4UtlSqsll8BXyFK5XyV1Nt4pq9s7hx9Bnob71xo=; b=mG4cdlZGYcgQ5dIYNqeDwQ8Slsndbaw/lUXPn03zqn346Mrq+lbRFyFMrpwBn/O4/n nMxEGPSo9VPcKa5FbMtcOJrTDFsQ0GuHHMCAWDM4Es7xRRqsqUzVvsk1TLGVDeHhXlA6 llx14OgSbwrvJxNB7vh5fzAm7Hap/PJq0WZc6qjmbEesS/B90uJodf8RY20cMOFlG3qV 37w2dWnU2cdHtVsx5cO5CXXc1HrvloFLWB7Qhu2zUqX6wpyZl9skv4aPotHNjBtsW6+h FBXZy/dU2jqjOz7hWihtCp2XhPs6Gn3KHb4CtqOf5UVRhovS5xU3J0ir8xQGMHtHQzBY ojlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688440330; x=1691032330; 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=SxIw4UtlSqsll8BXyFK5XyV1Nt4pq9s7hx9Bnob71xo=; b=Qjls42iSfCAub2yx41LED16/+vZ2uQCFr9hMObKbG8ZKplIY2nB/oE8dyFSayvlQ8c 2WN9vihX7A2JKKA7buGDFTO47GCoqyQ5GzqEU0Z72YqkQjjz3kV/Xq0qq8kgIad+oT6M mybF5ctdDIgaRWYrOZObxb/F7fdDnYqnebEFRl0vkctmuMx4E/6NhCZnmUTZDNkxW1+D xMH6qY8uaPFv8+ydpHa+PbADoYpxy6fx1j8w1feolDzeSeCeSjBMyNcLbR7KPGRSARhm 5AekNB8PYZ7w+J71JpS9S5POiuJMH5sQTLv9E15DfolCrgtp0oDd3XEYGAV70FH5fOjD zpUw== X-Gm-Message-State: ABy/qLZGvVkdaqPBdnkHgWnyBw1KQTTRFImfkWtndBrY1B7b7tWWUjEw UQNc8yw2SLpbmVLUN6RnB1KnEY/bmHBlXNx+BnvJ0g== X-Google-Smtp-Source: APBJJlEyQoXf+HTM2N8kWq/YbM9Uaio48xy/c6iXMgOatYD8hhV6eSBpe9LM0mNWGtaS62fUQvIAmUrP9DL/JZcuwUI= X-Received: by 2002:aa7:d30c:0:b0:51d:87c6:bf28 with SMTP id p12-20020aa7d30c000000b0051d87c6bf28mr8463294edq.3.1688440329363; Mon, 03 Jul 2023 20:12:09 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202307040308.36438MTA093771@gitrepo.freebsd.org> In-Reply-To: <202307040308.36438MTA093771@gitrepo.freebsd.org> From: Warner Losh Date: Mon, 3 Jul 2023 21:11:58 -0600 Message-ID: Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations To: "Pedro F. Giffuni" Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000000e782a05ffa0a639" X-Rspamd-Queue-Id: 4Qw7BM483tz40N2 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000000e782a05ffa0a639 Content-Type: text/plain; charset="UTF-8" This is a nope on armv7 and i386. So it has no effect there. DF got it wrong. These should likely be int64_t to avoid the overflow. No? Warner On Mon, Jul 3, 2023, 9:08 PM Pedro F. Giffuni wrote: > The branch main has been updated by pfg: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf > > commit 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf > Author: Pedro F. Giffuni > AuthorDate: 2023-07-03 02:32:10 +0000 > Commit: Pedro F. Giffuni > CommitDate: 2023-07-04 03:08:01 +0000 > > bin/date: Upgrade calculations > > Use long instead of int for numerous calculations, fixing a number of > date calculation overflow issues. > > Obtained from: DragonflyBSD > Git log: 4238ce6f0c6df33ce677ae298b245c62cd60fb43 (only partial) > --- > bin/date/vary.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/bin/date/vary.c b/bin/date/vary.c > index 5f0123110ee3..6f3c59950ecf 100644 > --- a/bin/date/vary.c > +++ b/bin/date/vary.c > @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); > #include "vary.h" > > struct trans { > - int val; > + long val; > const char *str; > }; > > @@ -52,7 +52,7 @@ static struct trans trans_wday[] = { > }; > > static char digits[] = "0123456789"; > -static int adjhour(struct tm *, char, int, int); > +static int adjhour(struct tm *, char, long, int); > > static int > domktime(struct tm *t, char type) > @@ -125,7 +125,7 @@ daysinmonth(const struct tm *t) > > > static int > -adjyear(struct tm *t, char type, int val, int mk) > +adjyear(struct tm *t, char type, long val, int mk) > { > switch (type) { > case '+': > @@ -146,7 +146,7 @@ adjyear(struct tm *t, char type, int val, int mk) > } > > static int > -adjmon(struct tm *t, char type, int val, int istext, int mk) > +adjmon(struct tm *t, char type, long val, int istext, int mk) > { > int lmdays; > > @@ -206,7 +206,7 @@ adjmon(struct tm *t, char type, int val, int istext, > int mk) > } > > static int > -adjday(struct tm *t, char type, int val, int mk) > +adjday(struct tm *t, char type, long val, int mk) > { > int lmdays; > > @@ -250,7 +250,7 @@ adjday(struct tm *t, char type, int val, int mk) > } > > static int > -adjwday(struct tm *t, char type, int val, int istext, int mk) > +adjwday(struct tm *t, char type, long val, int istext, int mk) > { > if (val < 0) > return 0; > @@ -286,7 +286,7 @@ adjwday(struct tm *t, char type, int val, int istext, > int mk) > } > > static int > -adjhour(struct tm *t, char type, int val, int mk) > +adjhour(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -331,7 +331,7 @@ adjhour(struct tm *t, char type, int val, int mk) > } > > static int > -adjmin(struct tm *t, char type, int val, int mk) > +adjmin(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -372,7 +372,7 @@ adjmin(struct tm *t, char type, int val, int mk) > } > > static int > -adjsec(struct tm *t, char type, int val, int mk) > +adjsec(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -419,7 +419,7 @@ vary_apply(const struct vary *v, struct tm *t) > char which; > char *arg; > size_t len; > - int val; > + long val; > > for (; v; v = v->next) { > type = *v->arg; > --0000000000000e782a05ffa0a639 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This is a nope on armv7 and i386. So it has no effect the= re. DF got it wrong. These should likely be int64_t to avoid the overflow. = No?

Warner

On Mon, Jul 3,= 2023, 9:08 PM Pedro F. Giffuni <pfg@= freebsd.org> wrote:
The bran= ch main has been updated by pfg:

URL: ht= tps://cgit.FreeBSD.org/src/commit/?id=3D4456846a1a0d8cb6d0e6bae89f1134fa0a1= af5cf

commit 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf
Author:=C2=A0 =C2=A0 =C2=A0Pedro F. Giffuni <pfg@FreeBSD.org>
AuthorDate: 2023-07-03 02:32:10 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Pedro F. Giffuni <pfg@FreeBSD.org>
CommitDate: 2023-07-04 03:08:01 +0000

=C2=A0 =C2=A0 bin/date: Upgrade calculations

=C2=A0 =C2=A0 Use long instead of int for numerous calculations, fixing a n= umber of
=C2=A0 =C2=A0 date calculation overflow issues.

=C2=A0 =C2=A0 Obtained from:=C2=A0 DragonflyBSD
=C2=A0 =C2=A0 Git log:=C2=A0 =C2=A0 =C2=A0 =C2=A0 4238ce6f0c6df33ce677ae298= b245c62cd60fb43 (only partial)
---
=C2=A0bin/date/vary.c | 20 ++++++++++----------
=C2=A01 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/bin/date/vary.c b/bin/date/vary.c
index 5f0123110ee3..6f3c59950ecf 100644
--- a/bin/date/vary.c
+++ b/bin/date/vary.c
@@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
=C2=A0#include "vary.h"

=C2=A0struct trans {
-=C2=A0 int val;
+=C2=A0 long val;
=C2=A0 =C2=A0const char *str;
=C2=A0};

@@ -52,7 +52,7 @@ static struct trans trans_wday[] =3D {
=C2=A0};

=C2=A0static char digits[] =3D "0123456789";
-static int adjhour(struct tm *, char, int, int);
+static int adjhour(struct tm *, char, long, int);

=C2=A0static int
=C2=A0domktime(struct tm *t, char type)
@@ -125,7 +125,7 @@ daysinmonth(const struct tm *t)


=C2=A0static int
-adjyear(struct tm *t, char type, int val, int mk)
+adjyear(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0switch (type) {
=C2=A0 =C2=A0 =C2=A0case '+':
@@ -146,7 +146,7 @@ adjyear(struct tm *t, char type, int val, int mk)
=C2=A0}

=C2=A0static int
-adjmon(struct tm *t, char type, int val, int istext, int mk)
+adjmon(struct tm *t, char type, long val, int istext, int mk)
=C2=A0{
=C2=A0 =C2=A0int lmdays;

@@ -206,7 +206,7 @@ adjmon(struct tm *t, char type, int val, int istext, in= t mk)
=C2=A0}

=C2=A0static int
-adjday(struct tm *t, char type, int val, int mk)
+adjday(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0int lmdays;

@@ -250,7 +250,7 @@ adjday(struct tm *t, char type, int val, int mk)
=C2=A0}

=C2=A0static int
-adjwday(struct tm *t, char type, int val, int istext, int mk)
+adjwday(struct tm *t, char type, long val, int istext, int mk)
=C2=A0{
=C2=A0 =C2=A0if (val < 0)
=C2=A0 =C2=A0 =C2=A0return 0;
@@ -286,7 +286,7 @@ adjwday(struct tm *t, char type, int val, int istext, i= nt mk)
=C2=A0}

=C2=A0static int
-adjhour(struct tm *t, char type, int val, int mk)
+adjhour(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0if (val < 0)
=C2=A0 =C2=A0 =C2=A0return 0;
@@ -331,7 +331,7 @@ adjhour(struct tm *t, char type, int val, int mk)
=C2=A0}

=C2=A0static int
-adjmin(struct tm *t, char type, int val, int mk)
+adjmin(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0if (val < 0)
=C2=A0 =C2=A0 =C2=A0return 0;
@@ -372,7 +372,7 @@ adjmin(struct tm *t, char type, int val, int mk)
=C2=A0}

=C2=A0static int
-adjsec(struct tm *t, char type, int val, int mk)
+adjsec(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0if (val < 0)
=C2=A0 =C2=A0 =C2=A0return 0;
@@ -419,7 +419,7 @@ vary_apply(const struct vary *v, struct tm *t)
=C2=A0 =C2=A0char which;
=C2=A0 =C2=A0char *arg;
=C2=A0 =C2=A0size_t len;
-=C2=A0 int val;
+=C2=A0 long val;

=C2=A0 =C2=A0for (; v; v =3D v->next) {
=C2=A0 =C2=A0 =C2=A0type =3D *v->arg;
--0000000000000e782a05ffa0a639-- From nobody Tue Jul 4 03:17:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7LD2KpTz4lVgL for ; Tue, 4 Jul 2023 03:19:00 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qw7Jc65Qpz41Gd for ; Tue, 4 Jul 2023 03:17:36 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-3fbd33a57b6so40835815e9.2 for ; Mon, 03 Jul 2023 20:17:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688440655; x=1691032655; 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=+a+jpg6oHKSPEJ/k4SPIFgqa28OxfWipfdEeVHRo3bE=; b=im1nNmfol30hBtZXkt4GLAxKyeET+PqSn5Oei0O4wftGWHyPARGFXjioX3MNaBFI/i IVYWnIG2+/7nhOpKgrinY2Lsr2Zsu9VEGF4wwtDPDbf5KXg9gjDbKpnvK2aiW96jm+7x 7g6t1Oogum/vxEoIQ6NocieG41YD3fEkaen7APfu6ipYU0cOLMzqyozirW7Sgwbeg40K bflP8Sa9t5ePAdgDf32twZCbf2ieiebhvka5YYBTgZ0W3LOiFx1vYlh7auwbckkfXw4s 7uFsPaakYAY08Rn5ZFT8UZwjlUo87Qb19zRwsGDCxzptAEI4p0BnES5CrNaQfciRclKn Pf8A== X-Gm-Message-State: AC+VfDyFFrR2xF9jkzxkV6OxW9T/ZSswelPbkVApl9wgHDKP22Nost2n duMT60v2YsEeUhULlw/cIoahy6kirUpgjqzgau4btobH X-Google-Smtp-Source: ACHHUZ7r2HPz3V6SunVv2X5Przp4vPcs7pq7O1c/nEWyvPpNHV6ZZoe3/h9GJOy05AJyW1JlKEfzGg== X-Received: by 2002:a1c:7914:0:b0:3fa:984d:7e94 with SMTP id l20-20020a1c7914000000b003fa984d7e94mr15997798wme.18.1688440655007; Mon, 03 Jul 2023 20:17:35 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id v4-20020a05600c214400b003fa95890484sm24049080wml.20.2023.07.03.20.17.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jul 2023 20:17:34 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations From: Jessica Clarke In-Reply-To: Date: Tue, 4 Jul 2023 04:17:23 +0100 Cc: "Pedro F. Giffuni" , src-committers , "" , "" Content-Transfer-Encoding: quoted-printable Message-Id: <203AA4D5-CA21-4716-BF11-09DD20101538@freebsd.org> References: <202307040308.36438MTA093771@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4Qw7Jc65Qpz41Gd X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4 Jul 2023, at 04:11, Warner Losh wrote: >=20 > This is a nope on armv7 and i386. So it has no effect there. DF got it = wrong. These should likely be int64_t to avoid the overflow. No? Quite. Obviously DragonFly can ignore the issue because it=E2=80=99s amd64-only... but still a bit unnecessarily non-portable. Jess > On Mon, Jul 3, 2023, 9:08 PM Pedro F. Giffuni wrote: > The branch main has been updated by pfg: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D4456846a1a0d8cb6d0e6bae89f1134fa= 0a1af5cf >=20 > commit 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf > Author: Pedro F. Giffuni > AuthorDate: 2023-07-03 02:32:10 +0000 > Commit: Pedro F. Giffuni > CommitDate: 2023-07-04 03:08:01 +0000 >=20 > bin/date: Upgrade calculations >=20 > Use long instead of int for numerous calculations, fixing a number = of > date calculation overflow issues. >=20 > Obtained from: DragonflyBSD > Git log: 4238ce6f0c6df33ce677ae298b245c62cd60fb43 (only = partial) > --- > bin/date/vary.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) >=20 > diff --git a/bin/date/vary.c b/bin/date/vary.c > index 5f0123110ee3..6f3c59950ecf 100644 > --- a/bin/date/vary.c > +++ b/bin/date/vary.c > @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); > #include "vary.h" >=20 > struct trans { > - int val; > + long val; > const char *str; > }; >=20 > @@ -52,7 +52,7 @@ static struct trans trans_wday[] =3D { > }; >=20 > static char digits[] =3D "0123456789"; > -static int adjhour(struct tm *, char, int, int); > +static int adjhour(struct tm *, char, long, int); >=20 > static int > domktime(struct tm *t, char type) > @@ -125,7 +125,7 @@ daysinmonth(const struct tm *t) >=20 >=20 > static int > -adjyear(struct tm *t, char type, int val, int mk) > +adjyear(struct tm *t, char type, long val, int mk) > { > switch (type) { > case '+': > @@ -146,7 +146,7 @@ adjyear(struct tm *t, char type, int val, int mk) > } >=20 > static int > -adjmon(struct tm *t, char type, int val, int istext, int mk) > +adjmon(struct tm *t, char type, long val, int istext, int mk) > { > int lmdays; >=20 > @@ -206,7 +206,7 @@ adjmon(struct tm *t, char type, int val, int = istext, int mk) > } >=20 > static int > -adjday(struct tm *t, char type, int val, int mk) > +adjday(struct tm *t, char type, long val, int mk) > { > int lmdays; >=20 > @@ -250,7 +250,7 @@ adjday(struct tm *t, char type, int val, int mk) > } >=20 > static int > -adjwday(struct tm *t, char type, int val, int istext, int mk) > +adjwday(struct tm *t, char type, long val, int istext, int mk) > { > if (val < 0) > return 0; > @@ -286,7 +286,7 @@ adjwday(struct tm *t, char type, int val, int = istext, int mk) > } >=20 > static int > -adjhour(struct tm *t, char type, int val, int mk) > +adjhour(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -331,7 +331,7 @@ adjhour(struct tm *t, char type, int val, int mk) > } >=20 > static int > -adjmin(struct tm *t, char type, int val, int mk) > +adjmin(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -372,7 +372,7 @@ adjmin(struct tm *t, char type, int val, int mk) > } >=20 > static int > -adjsec(struct tm *t, char type, int val, int mk) > +adjsec(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -419,7 +419,7 @@ vary_apply(const struct vary *v, struct tm *t) > char which; > char *arg; > size_t len; > - int val; > + long val; >=20 > for (; v; v =3D v->next) { > type =3D *v->arg; From nobody Tue Jul 4 03:18:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7LF0byjz4lVVF; Tue, 4 Jul 2023 03:19: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 4Qw7LD5PvNz412q; Tue, 4 Jul 2023 03:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpiT+PLKxuj7RP96QyJkxrIYbp+Qs81RROhHVpM9tEI=; b=TGAgKF1IyaYj2anFlHAaKszHHQAShUDdguid6FzbRV6WDGjhbb8QCGrnTQgKTtcN8Pdaf8 dSa9i9W+cQkcjf6wej7tRgh//u1Wotbj3oCdU4juPIk2TQK6tSuHvsVSmFnMcxvDXMlOKh VD67Oexiim8i078uTLLydw6b/tL/gOidn6taIcQ6KROJKMGrudlpyuxAp2Aj+B+2XLUF8m i9fa/sBSwyPrddt9UbigucJFkUfVsFipLeCdUEMfpUJzqFVDghLpMeOU+EdUAPfRN9ncfq FxdbiXLZhP+EDYbvbbWwh+hckdbswBqWBDtk6oDFf8pF1hX8tzQGdnLAU6ggmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpiT+PLKxuj7RP96QyJkxrIYbp+Qs81RROhHVpM9tEI=; b=Ezbya//dZQHnndZaquEd3fSmtz2ZT864EBtanp64l84b1K+UA12XIM2k/2+qaIYY96ozQo hIa58Q6eFh3bOfOC8ZVWFm7dl+Unzzeam4wJwvqx01Mw1pkE1NB/mr1ITvzcb4gA6Ai51t lAorVKFM5ldTniQ8J+423+bqnyw8ke73MqvdlL3zLL0jQvUuk20sZxGh3yC52+9GHYqf6M cA35Yl55dzuWlz+xEzM8Xv9uvlrc3uIVEMiiDbtOb0waDHdlh7+ew+k/vLvudfvSi4LNRH xCy8lu49Jxdgjpyns3F3fo7vUVu+045kAejmNM+0W27Zw6Su5uEJjImoadqfYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688440740; a=rsa-sha256; cv=none; b=jF6UrJKoJ7Lafbo5zMIYC79qoz6RjcfmjifWzICVU+GaYVD/ljp7DYz7efKr1M45I9H50r aHN/HAhQ0wu23OV5Mk9ua7/C+myDzWTlRKU0sFjQbCRukDFRdL8IjG06pwIthCaOLJ/jN5 +/9DhECo9IgsfWUEnjNCgH442GeNUAvwdGLtE5XdgtXHo0ri9L/ly3KJvHrcF+1Di6H4oW 63ToY6gtO7pM7A7aFwn0HrtI31m/3GcLeujuRAaOuVbGrEcV4RyYeEpLpDHeyvTa6zT+kY kRfGCABCWYxYxc97jkXxMHjj5KV3Ri4uLwlYK1xHumJ9uBLGZobiTiIc4ymVXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw7KC1t3czGR7; Tue, 4 Jul 2023 03:18: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 3643I741009703; Tue, 4 Jul 2023 03:18:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3643I7kn009702; Tue, 4 Jul 2023 03:18:07 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:18:07 GMT Message-Id: <202307040318.3643I7kn009702@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 109230f383ac - stable/13 - fdescfs: improve linrdlnk mount option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 109230f383ac5a60a7bd4e40bbde361c28c430cf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=109230f383ac5a60a7bd4e40bbde361c28c430cf commit 109230f383ac5a60a7bd4e40bbde361c28c430cf Author: Konstantin Belousov AuthorDate: 2023-06-22 13:30:59 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 03:06:46 +0000 fdescfs: improve linrdlnk mount option PR: 272127 (cherry picked from commit 3bffa2262328e4ff1737516f176107f607e7bc76) --- sys/fs/fdescfs/fdesc_vnops.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 85a3c12f3419..b2ae6964551e 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -204,8 +204,9 @@ loop: fd->fd_type = ftype; fd->fd_fd = fd_fd; fd->fd_ix = ix; - if (ftype == Fdesc && fmp->flags & FMNT_LINRDLNKF) - vp->v_vflag |= VV_READLINK; + /* Cannot set v_type to VCHR */ + if (ftype == Fdesc && (fmp->flags & FMNT_LINRDLNKF) != 0) + vp->v_type = VLNK; error = insmntque1(vp, mp, fdesc_insmntque_dtr, NULL); if (error != 0) { *vpp = NULLVP; @@ -468,7 +469,8 @@ fdesc_getattr(struct vop_getattr_args *ap) break; case Fdesc: - vap->va_type = (vp->v_vflag & VV_READLINK) == 0 ? VCHR : VLNK; + vap->va_type = (VFSTOFDESC(vp->v_mount)->flags & + FMNT_LINRDLNKF) == 0 ? VCHR : VLNK; vap->va_nlink = 1; vap->va_size = 0; vap->va_rdev = makedev(0, vap->va_fileid); From nobody Tue Jul 4 03:18:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7LF0cSkz4lVGN; Tue, 4 Jul 2023 03:19: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 4Qw7LD435Rz41B6; Tue, 4 Jul 2023 03:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uwdvTOfvgpzSKupmMhIwAvgAt8twWF1LpWr3dVHLe5c=; b=MPtJE4MvTJNsxWpoSG+uHvdseSI1DDPMvleoVNVoza/sRRcLbGv5FgvAWX25PkgjDLHpO+ r2o/K9SNl9AFW/BZHAJsXnMkpef+ZDssle6FMtWf46IOUJf5de+Mg790MKwGCNb7IKDwml v2tn3Ld1gbp2WOesMAz/AsXj/RunHEK+FNgIWMM81Kc6t3fPdk2jhS43HmJoNkzC9SH+Q6 kNjTcJ3BJ5/y1Msppvs/U+HVqj76eywl0ShsDLDBDNQA93ceLEjPAB4tuoE9Cei2cmwo1Q ZIBj9n4GO0oxmXIWixafwI3C/AJ/g074Rr1uCB46ynerA+QXxiJARDjXBMSyvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uwdvTOfvgpzSKupmMhIwAvgAt8twWF1LpWr3dVHLe5c=; b=omXgzJCsiuOOC0IMLeScliMhbej2W4gxR7oMkA62ambFAY2sReTrlkBXdVTg5C91WaNCqX IovX7qY4o9CsvjugaQNf6IaK7zXWq0awXFH6RIWRmyDXNduGMfDYf1wWHoOFWDkVoKXAqK HSlwoW85zwCEgp9TGZMHxRCc5wjQYdDHRmk3GA8DSKzlqG4G2cV6u6XjC+8HSXWlCZYaZQ S0uGA52TnCOXNqEKlCByNQj1T7V8bekk6X35HiZRLdvIGeHiArEuNL7xANY06YycUZq6Qw wQBGUbMRYliPivdtQO9ZEhgkkpSjXvxV6fGmdCTi62GkkCkFP+2cKCGKwguF1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688440740; a=rsa-sha256; cv=none; b=KVleE62HUbna4wmOElFPYtlvENHo2pSc1qgYS4Dej0/vV16usz3RsmwH9E+MP8L+AjQssc J16jzHVNcCsZFwR8j0y3KHYK6nyJpFoPt3PkN5Nkr+jX19fsgu0Gaw4+p7dfO5U1/YjXY6 4W20KdG0dohOSyv3+9XrwGKsfpuj1bm5Y2ys5uydJkKVnDmgOPCPE4qvaQcte0nBy9N9u3 RTvrRFMASuW4EKGktB6yTrKH8hVtIXdazEaLq+I8m6kXNPI6wrDEoiXo8WzvofuVsRBSat TKawFJqjC2gUdBUUqNiiIEtSYklTeXL4YL3QbCLdZTuvYtYwfKsorxsMf/nlbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw7KD2qW9zGlM; Tue, 4 Jul 2023 03:18: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 3643I8De009722; Tue, 4 Jul 2023 03:18:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3643I8EL009721; Tue, 4 Jul 2023 03:18:08 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:18:08 GMT Message-Id: <202307040318.3643I8EL009721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: be9fd6f1f283 - stable/13 - VFS: Remove VV_READLINK flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: be9fd6f1f283e2ba11916dbb75dc1823cc25b24f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=be9fd6f1f283e2ba11916dbb75dc1823cc25b24f commit be9fd6f1f283e2ba11916dbb75dc1823cc25b24f Author: Konstantin Belousov AuthorDate: 2023-06-21 16:37:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 03:06:46 +0000 VFS: Remove VV_READLINK flag (cherry picked from commit 4a402dfe0bc44770c9eac6e58a501e4805e29413) --- sys/kern/vfs_subr.c | 5 +---- sys/kern/vfs_syscalls.c | 2 +- sys/sys/vnode.h | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2002f3b81937..dd742277a98f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4263,12 +4263,9 @@ vn_printf(struct vnode *vp, const char *fmt, ...) strlcat(buf, "|VV_MD", sizeof(buf)); if (vp->v_vflag & VV_FORCEINSMQ) strlcat(buf, "|VV_FORCEINSMQ", sizeof(buf)); - if (vp->v_vflag & VV_READLINK) - strlcat(buf, "|VV_READLINK", sizeof(buf)); flags = vp->v_vflag & ~(VV_ROOT | VV_ISTTY | VV_NOSYNC | VV_ETERNALDEV | VV_CACHEDLABEL | VV_VMSIZEVNLOCK | VV_COPYONWRITE | VV_SYSTEM | - VV_PROCDEP | VV_NOKNOTE | VV_DELETED | VV_MD | VV_FORCEINSMQ | - VV_READLINK); + VV_PROCDEP | VV_NOKNOTE | VV_DELETED | VV_MD | VV_FORCEINSMQ); if (flags != 0) { snprintf(buf2, sizeof(buf2), "|VV(0x%lx)", flags); strlcat(buf, buf2, sizeof(buf)); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 7f7836450811..b7cdac8540da 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2660,7 +2660,7 @@ kern_readlink_vp(struct vnode *vp, char *buf, enum uio_seg bufseg, size_t count, if (error != 0) return (error); #endif - if (vp->v_type != VLNK && (vp->v_vflag & VV_READLINK) == 0) + if (vp->v_type != VLNK) return (EINVAL); aiov.iov_base = buf; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 543eb06f2f16..82e9ba9a2237 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -271,7 +271,7 @@ struct xvnode { #define VV_DELETED 0x0400 /* should be removed */ #define VV_MD 0x0800 /* vnode backs the md device */ #define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */ -#define VV_READLINK 0x2000 /* fdescfs linux vnode */ +#define VV_UNUSED01 0x2000 /* was: fdescfs linux vnode */ #define VV_UNREF 0x4000 /* vunref, do not drop lock in inactive() */ #define VV_UNLINKED 0x8000 /* unlinked but stil open directory */ From nobody Tue Jul 4 03:18:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7LG19KWz4lVQ4; Tue, 4 Jul 2023 03:19: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 4Qw7LF54cQz41B9; Tue, 4 Jul 2023 03:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s4HIx2RQJmwBhcS05pGB+EkkNo/SGyKL24PWggpt2p0=; b=EZ34fPWNyEXF9vSRNZ5v1Cq/QtqeKuEHxGmun1PnaPkhcI2vhp6TkR0c5Za81ogWG6SIjz h+FIa9lXB77HmwcpkRYcxuq9QesX3crMpP86sSR+QswAcAMsb00F00U0lSwEMcTCp2DCaY FNDnazTUg4t6mxNff+V8KZSHyTAphD/DDfweqMiLkRoJn2MR4DEtVscdX0mgMvxF0b5Uib DhQ76t7XZNXvEotmZx7RaSl65uHxRBopYFw40kqskoqRtf+EaAs/mlqqCBWcm3YPec8eej 9BwwI16Mg4IGVh7LuR68wy/K4puYTPpi/T02e2nLqEQos7SwkYRMrzJrdwElBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s4HIx2RQJmwBhcS05pGB+EkkNo/SGyKL24PWggpt2p0=; b=QmV2aKUj31UUJugz3mj2OX/DBfR/2hnWpuo6QqcVSo4emMycxqnF4YoLhsHu+0peg2rzS9 Y4oTsPYRXVE9A021HWDgh4PTwU9VVRRpPFNVz+Q/Xx+dx27vFFFbNXuq+X8JAkZToI22zE tVrqslIqgk8cN/dGzpxVfeczpNXeSJSWBC6Vbmx+lIEvzxrJY04D79qjSm8CHjrQPwtzBs 7TOL9+SqNwlRnFR67VSxX7Xk5Y0dzryV1kN8cUsi1Hg9Vq+volsj5IZJay3Ngh72T3veqa qPQBsII1+Rq9XkVbsIauEi13ob+DSNBYrrWa23YD2TMm3Sm36MfgR8naWjHr3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688440741; a=rsa-sha256; cv=none; b=BOclPR+iKg7A42M3bKqA7B0lJNXEVwfQnNoQoB2jZ9serNEn3TbVie8Bf8uEyOpAM6YjIL 678NccVhcd0rMmmAmhw+JASZIZrYvVp2K9d14/J7ZQKAiY58xwsZM4M+IJd1drrAlhLQCy g7aOChKjpIHVzXCEpkM5krhP3mBgZT3PNEiuC/784aLEFpmry+GfwbLC4mRpIW2O4pv3WQ 6LCsCnyVg/ZkDEz9XgOOY6dNuLvxGyPY5ts3TOeh2ucdvCbKftNB71L3IDxk50m5hikr// kIs5BJpHUxkC+xYTR3Fz7djFLvaRjqagTFdjl9CuA/V+M7yBNChc4eaiPAcXBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw7KF3ln1zGkV; Tue, 4 Jul 2023 03:18: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 3643I9Ff009746; Tue, 4 Jul 2023 03:18:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3643I9iR009745; Tue, 4 Jul 2023 03:18:09 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:18:09 GMT Message-Id: <202307040318.3643I9iR009745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6f21f94b1583 - stable/13 - vm_fault: move FAULT_* return codes out of range for Mach errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6f21f94b158382762d528c514b58aa96c8ecdcd9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6f21f94b158382762d528c514b58aa96c8ecdcd9 commit 6f21f94b158382762d528c514b58aa96c8ecdcd9 Author: Konstantin Belousov AuthorDate: 2023-06-27 11:41:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 03:07:01 +0000 vm_fault: move FAULT_* return codes out of range for Mach errors (cherry picked from commit ef747607ead43552cb3ebb093fadd2c39c56a36d) --- sys/vm/vm_fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 4872990c33ec..51fb51f69f3d 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -159,7 +159,7 @@ struct faultstate { * Return codes for internal fault routines. */ enum fault_status { - FAULT_SUCCESS = 1, /* Return success to user. */ + FAULT_SUCCESS = 10000, /* Return success to user. */ FAULT_FAILURE, /* Return failure to user. */ FAULT_CONTINUE, /* Continue faulting. */ FAULT_RESTART, /* Restart fault. */ From nobody Tue Jul 4 03:19:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7LJ6jWtz4lVVh; Tue, 4 Jul 2023 03:19: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 4Qw7LJ5skzz41Nx; Tue, 4 Jul 2023 03:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=siF9ADhVa9iSMQcGbDx8ALTcrNuTjm0Cg/0SZo8wTd8=; b=GhawuJSYT3Agd6ucEczVAKrM65x7cMx3XIdn9KK4+0K2AjqJpZ7nNHEGd8tS+028LUV42Q nI8s8LE5RSbwtCqGWBrv3IqBmZiV2ZmcP23s84kH/WeHjG4wk5KTl3f9G1OI9CWRsrM3aJ AlePyc/W6MVRFLOlmZuHnT+/8HYip9BaJWwgAVs5IiPSHsI7aJinU8br3L6kmN8XWzSDTq a5VXW4tpbndKlEsm34F8YcnKsX8RZuSjsIL05nB+btqjqGFJOvwxzeRGLYHrMIEWZgeIig xHRBJimT98DsjC4lT1s0bSvXFBfE1A75bnwc2CjH9EH2PlWrmeqUaWhv8hbKNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=siF9ADhVa9iSMQcGbDx8ALTcrNuTjm0Cg/0SZo8wTd8=; b=udyLq7ggb+YJaHZR75E9V2fKl2DMaoUxBoB2052zBmZ5SS/mKCqZbHRlskYrOmtuRj+maf 8MkIBojosGuMpiMRT3cIrZojdqQEtZntMAmJkO9ssuZYvyUztUJ5AJR61Aqs+ZW4N146c7 N+/UN+H54AUPJTWu/DivwmIjFSNiP+PZ1V0rhusJHkOkmZ3WwFLOSmshHHVvT6Fs5vUX8j 324SjxAN6kJPWTQtq21MnRX/2AopaKOCBt9KAnZ+TBQmU0LCFEU84RG4PmP/XNh/4VxXHI VFIeeQ8E/xTeq1aYgct6Z4UUypIVigkLjy/YO43Mk8oetQNxYWji8UIwaoiC9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688440744; a=rsa-sha256; cv=none; b=pWsare7Yrx+WMYeEmLQLf8QZhF2Ooo6FQ1jFeaVTPoMQloA9lowj0M7bvp5Z6mck0gLbU4 Tw23yBy1bW04FhGLFjjK9Pnuv45BQiadOLRlaaJQSs0ps76jNgk7z6KykXONenj6mTc8NG jKfhw6l93qTNkwHQJyXKVuNDJ0G+nRiiollDXBWATZWC/9PYyNLoDECnENQaDSWblpjgsH 8GzmfWj/1afyxjZ32ShWI7+gk0eZEvTvklYQoTpcLhT58ixhf4viEGp4FOKsZu2iCYCDAC D7eTYkdvZ/M6k78xzgoetAL+7ypA6xBN+gj+NdDA4hjbUZ0rUt0gxQ4ZZCy7cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw7LJ4pv0zGR8; Tue, 4 Jul 2023 03:19: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 3643J4pL009961; Tue, 4 Jul 2023 03:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3643J4hC009960; Tue, 4 Jul 2023 03:19:04 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:19:04 GMT Message-Id: <202307040319.3643J4hC009960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: bdadd506cae4 - stable/13 - vn_lock_pair(): allow to request shared locking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bdadd506cae4e57010a8e1fed5d14b2b3af48939 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bdadd506cae4e57010a8e1fed5d14b2b3af48939 commit bdadd506cae4e57010a8e1fed5d14b2b3af48939 Author: Konstantin Belousov AuthorDate: 2023-04-06 04:11:08 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 03:07:02 +0000 vn_lock_pair(): allow to request shared locking (cherry picked from commit bb24eaea498268572aa140c35c02e02884cdf930) --- sys/kern/vfs_vnops.c | 86 ++++++++++++++++++++++++++++++++--------------- sys/sys/vnode.h | 4 +-- sys/ufs/ffs/ffs_softdep.c | 10 +++--- sys/ufs/ufs/ufs_vnops.c | 2 +- 4 files changed, 68 insertions(+), 34 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index dfaa6868c567..e314739fa0ad 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3868,50 +3868,74 @@ vn_lock_pair_pause(const char *wmesg) /* * Lock pair of vnodes vp1, vp2, avoiding lock order reversal. - * vp1_locked indicates whether vp1 is exclusively locked; if not, vp1 - * must be unlocked. Same for vp2 and vp2_locked. One of the vnodes - * can be NULL. + * vp1_locked indicates whether vp1 is locked; if not, vp1 must be + * unlocked. Same for vp2 and vp2_locked. One of the vnodes can be + * NULL. * - * The function returns with both vnodes exclusively locked, and - * guarantees that it does not create lock order reversal with other - * threads during its execution. Both vnodes could be unlocked - * temporary (and reclaimed). + * The function returns with both vnodes exclusively or shared locked, + * according to corresponding lkflags, and guarantees that it does not + * create lock order reversal with other threads during its execution. + * Both vnodes could be unlocked temporary (and reclaimed). + * + * If requesting shared locking, locked vnode lock must not be recursed. */ void -vn_lock_pair(struct vnode *vp1, bool vp1_locked, struct vnode *vp2, - bool vp2_locked) +vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, + struct vnode *vp2, bool vp2_locked, int lkflags2) { int error; + MPASS(lkflags1 == LK_SHARED || lkflags1 == LK_EXCLUSIVE); + MPASS(lkflags2 == LK_SHARED || lkflags2 == LK_EXCLUSIVE); + if (vp1 == NULL && vp2 == NULL) return; + if (vp1 != NULL) { - if (vp1_locked) - ASSERT_VOP_ELOCKED(vp1, "vp1"); - else + if (lkflags1 == LK_SHARED && + (vp1->v_vnlock->lock_object.lo_flags & LK_NOSHARE) != 0) + lkflags1 = LK_EXCLUSIVE; + if (vp1_locked && VOP_ISLOCKED(vp1) != LK_EXCLUSIVE) { + ASSERT_VOP_LOCKED(vp1, "vp1"); + if (lkflags1 == LK_EXCLUSIVE) { + VOP_UNLOCK(vp1); + ASSERT_VOP_UNLOCKED(vp1, + "vp1 shared recursed"); + vp1_locked = false; + } + } else if (!vp1_locked) ASSERT_VOP_UNLOCKED(vp1, "vp1"); } else { vp1_locked = true; } + if (vp2 != NULL) { - if (vp2_locked) - ASSERT_VOP_ELOCKED(vp2, "vp2"); - else + if (lkflags2 == LK_SHARED && + (vp2->v_vnlock->lock_object.lo_flags & LK_NOSHARE) != 0) + lkflags2 = LK_EXCLUSIVE; + if (vp2_locked && VOP_ISLOCKED(vp2) != LK_EXCLUSIVE) { + ASSERT_VOP_LOCKED(vp2, "vp2"); + if (lkflags2 == LK_EXCLUSIVE) { + VOP_UNLOCK(vp2); + ASSERT_VOP_UNLOCKED(vp2, + "vp2 shared recursed"); + vp2_locked = false; + } + } else if (!vp2_locked) ASSERT_VOP_UNLOCKED(vp2, "vp2"); } else { vp2_locked = true; } + if (!vp1_locked && !vp2_locked) { - vn_lock(vp1, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp1, lkflags1 | LK_RETRY); vp1_locked = true; } - for (;;) { - if (vp1_locked && vp2_locked) - break; + while (!vp1_locked || !vp2_locked) { if (vp1_locked && vp2 != NULL) { if (vp1 != NULL) { - error = VOP_LOCK1(vp2, LK_EXCLUSIVE | LK_NOWAIT, + error = VOP_LOCK1(vp2, lkflags2 | LK_NOWAIT, __FILE__, __LINE__); if (error == 0) break; @@ -3919,12 +3943,12 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, struct vnode *vp2, vp1_locked = false; vn_lock_pair_pause("vlp1"); } - vn_lock(vp2, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp2, lkflags2 | LK_RETRY); vp2_locked = true; } if (vp2_locked && vp1 != NULL) { if (vp2 != NULL) { - error = VOP_LOCK1(vp1, LK_EXCLUSIVE | LK_NOWAIT, + error = VOP_LOCK1(vp1, lkflags1 | LK_NOWAIT, __FILE__, __LINE__); if (error == 0) break; @@ -3932,14 +3956,22 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, struct vnode *vp2, vp2_locked = false; vn_lock_pair_pause("vlp2"); } - vn_lock(vp1, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp1, lkflags1 | LK_RETRY); vp1_locked = true; } } - if (vp1 != NULL) - ASSERT_VOP_ELOCKED(vp1, "vp1 ret"); - if (vp2 != NULL) - ASSERT_VOP_ELOCKED(vp2, "vp2 ret"); + if (vp1 != NULL) { + if (lkflags1 == LK_EXCLUSIVE) + ASSERT_VOP_ELOCKED(vp1, "vp1 ret"); + else + ASSERT_VOP_LOCKED(vp1, "vp1 ret"); + } + if (vp2 != NULL) { + if (lkflags2 == LK_EXCLUSIVE) + ASSERT_VOP_ELOCKED(vp2, "vp2 ret"); + else + ASSERT_VOP_LOCKED(vp2, "vp2 ret"); + } } int diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 82e9ba9a2237..e79bd1c9ddba 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -761,8 +761,8 @@ bool vn_isdisk_error(struct vnode *vp, int *errp); bool vn_isdisk(struct vnode *vp); int _vn_lock(struct vnode *vp, int flags, const char *file, int line); #define vn_lock(vp, flags) _vn_lock(vp, flags, __FILE__, __LINE__) -void vn_lock_pair(struct vnode *vp1, bool vp1_locked, struct vnode *vp2, - bool vp2_locked); +void vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, + struct vnode *vp2, bool vp2_locked, int lkflags2); int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp); int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, u_int vn_open_flags, struct ucred *cred, struct file *fp); diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index ff72dad97250..c86ae35ee8c5 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -3323,7 +3323,7 @@ softdep_prelink(struct vnode *dvp, if (vp != NULL) { VOP_UNLOCK(dvp); ffs_syncvnode(vp, MNT_NOWAIT, 0); - vn_lock_pair(dvp, false, vp, true); + vn_lock_pair(dvp, false, LK_EXCLUSIVE, vp, true, LK_EXCLUSIVE); if (dvp->v_data == NULL) goto out; } @@ -3335,7 +3335,8 @@ softdep_prelink(struct vnode *dvp, VOP_UNLOCK(dvp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_data == NULL) { - vn_lock_pair(dvp, false, vp, true); + vn_lock_pair(dvp, false, LK_EXCLUSIVE, vp, true, + LK_EXCLUSIVE); goto out; } ACQUIRE_LOCK(ump); @@ -3345,7 +3346,8 @@ softdep_prelink(struct vnode *dvp, VOP_UNLOCK(vp); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); if (dvp->v_data == NULL) { - vn_lock_pair(dvp, true, vp, false); + vn_lock_pair(dvp, true, LK_EXCLUSIVE, vp, false, + LK_EXCLUSIVE); goto out; } } @@ -3360,7 +3362,7 @@ softdep_prelink(struct vnode *dvp, journal_check_space(ump); FREE_LOCK(ump); - vn_lock_pair(dvp, false, vp, false); + vn_lock_pair(dvp, false, LK_EXCLUSIVE, vp, false, LK_EXCLUSIVE); out: ndp->ni_dvp_seqc = vn_seqc_read_any(dvp); if (vp != NULL) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 985641b02378..41bbb701c4fc 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -230,7 +230,7 @@ ufs_sync_nlink(struct vnode *vp, struct vnode *vp1) if (vp1 != NULL) VOP_UNLOCK(vp1); error = ufs_sync_nlink1(mp); - vn_lock_pair(vp, false, vp1, false); + vn_lock_pair(vp, false, LK_EXCLUSIVE, vp1, false, LK_EXCLUSIVE); return (error); } From nobody Tue Jul 4 03:20:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7MZ2k1Bz4lVwR; Tue, 4 Jul 2023 03:20: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 4Qw7MZ2FHpz4317; Tue, 4 Jul 2023 03:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=up7YXPp+g+gc6vM8tmyIraxT7O+zN6+bi/IIY+Rsio8=; b=TlC4q4NtPVfZMf9l+bTIaoq9B+GsJiCXsEskUd5CioYJcgmRUhAWtGOQP+01oRXGDogpLq Jhge0/VkAWIt82KSb5GbIFUo+K9oF1opOGRXCm+Md/gNd2gIyDDBi0okVZlVFx0sxe51gL TnSqeBFSoDuWf1sMae8snPv7HzZN0S0mldXWY26bVqN9nT9JQn+uYXTSOrSw6l3K3oPfGi zZKtJGCAas1zcN14ffdDODrvIVpcWMGElqCFiyB9DwPD8kH4CDTgneGwGBrL1IuNZj8Rpe hSbTwFXkdNMBJQboy3P1yw32LjOViUfPoN2ALaARl+9RadArlujyphAR3xmBXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688440810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=up7YXPp+g+gc6vM8tmyIraxT7O+zN6+bi/IIY+Rsio8=; b=gPamqy6E/vwY0aCMkayzUOZNWbZnBC+wZIwnMt7tM79TH+0AyBG4Y1PuJzNSDthVQmPIls Iu7jjzT3vicVKN2A9NBom8PR4FZpRwV1o81D9toCIfJYLy0jgAuaGhCN+1U7zG/L9Abi0j GiA+95bOFF/aDiBrem75HN7n0Wun5akhXIq2QpD1QMRgmrYecWxUBgzhE51F0s6qI+wLoj 2rF5DfwoJuVK5E1HAIHXapHXr8oLXz46u9YqCTwkKKYRH0FndActh+vrOogwwEXFtE62F1 zMfDDjWnRM32IpGjQSX3wesmdm9mtGiX3t3ZNGfV8Qz9UfsisD9v/XRTfO+Kfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688440810; a=rsa-sha256; cv=none; b=fILKKOMr9PhMnr0U5QOgOobOKHi3HJXnW+qUE5uadJYh/UjcGVqvA8q+6bawyyMEtOaJz1 IjHRU8HUXSXnpqCrebR19uz0JXMJcB9LpPg2+gLz6XUSESQWHv5LZO84cuue4g6ZVKvHm2 oGxjdMmeDtjmkWpb5MBwBwdyflKQzpV4X2v0z6riHx56LKuGcTzWCu0iVRjPEsJRROkT6k dRcTfH7QaCaVjWdxiQUAFPDzj0WsfLMTP40G0lrRh9e3X14BFfXxOKY5mE5/IG6bCsKdhY LZ+rjeT4shz7t+5PZFXdsrT3v11x3vzB+RNTeYF3To9Tt/QX+eKkcmkS2hZFYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw7MZ1GNczGnY; Tue, 4 Jul 2023 03:20: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 3643KAxD014351; Tue, 4 Jul 2023 03:20:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3643KAJR014345; Tue, 4 Jul 2023 03:20:10 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:20:10 GMT Message-Id: <202307040320.3643KAJR014345@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: d6b900c915c1 - main - vn_path_to_global_path_hardlink(): avoid freeing non-initialized pointer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6b900c915c19ac1bb5d57659695fd143864be66 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d6b900c915c19ac1bb5d57659695fd143864be66 commit d6b900c915c19ac1bb5d57659695fd143864be66 Author: Konstantin Belousov AuthorDate: 2023-07-03 17:22:33 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 03:19:47 +0000 vn_path_to_global_path_hardlink(): avoid freeing non-initialized pointer Reported by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 09a93c8303b2..25918f5a0b6e 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3866,7 +3866,7 @@ vn_path_to_global_path_hardlink(struct thread *td, struct vnode *vp, if (error != 0) { vrele(vp); - goto out; + return (error); } if (strlen(rpath) >= pathlen) { From nobody Tue Jul 4 03:34:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7gm58Msz4lcYD for ; Tue, 4 Jul 2023 03:34:12 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from sonic309-22.consmr.mail.ne1.yahoo.com (sonic309-22.consmr.mail.ne1.yahoo.com [66.163.184.148]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qw7gl3l9Mz462F for ; Tue, 4 Jul 2023 03:34:11 +0000 (UTC) (envelope-from pfg@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688441649; bh=Bfch/qpSy6a55HjicdTtlt9hnuoEUricyyDSWSLNvKM=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=tHqTvDcMIhiKL2P3QgSyf9iChctnZt/4gp0x1tlLEVZOvSU2MlraBu4jTfbF1RuNA+3pyxTOwkBhFnxhxub09jobWJj+bNVWJmZTYP4JCkM9Cy8TmGMNFLzfeCZ7TeeuExQdQMqNXFByid40mhqwi1hngBYQcdhl9EGVqQPUfWbPkro1gprci2iHMY8lP/+uoi+D8UYoRzCbG09jE5hTeoEHP9Xm73B718epxfa4DtK/csB+oq0Z1SigHgNjN8tQc0NPGNSATUoRN25w9ger2NKjLZ4ZGfOAJ/z02BE3cETQ4UhwMMIqlCuzx9fSYMX0GkC1HOjPK88JwFmZbx193Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688441649; bh=uSvWQ3SSCmogsKXUfyJoEmk6YuHMJXrews/A4RpvF8q=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=IQG0Um+HSqPnQ/prJqJNurptR5X+lXYMUC4y03li1VoyHEE4iwmN5WPewBTqQkjwCESRgUo0LixKGo5UrhN4F51SfHOj1/2ALysXyKzCqaIylkNrCNKVrq+cfirtCvshd/v5HoBgY+AuhIL1BtucCEsNmXMlxI0WTKdj9Nq6oWOkU2Sfn9sxErjspEZUehOR3/TUAj4j9NqslRnj2ZyzkCv/edW90LBI/T/15leYXrT+PbbJsLmLUGcbHz9QC22vtcpMcrLo9dKCJvTMJDc3IXzUvHI7ORWPgKuQoJ+3IE4KJNaPQsK6j6LA1azgFYXNjcp3NCFeaGhHFj8xZlIS/w== X-YMail-OSG: UCVZd1gVM1k_6MK7.wgagv53xTbWDz0tWVthovQjexBljYy6vjuLZnKO6b8pAHh r8fMgwKao0Fauhz2sgeNlTrTUR9Gj6bKukaNPe7gq8WnyKTbE8cdGH5sVTfLjTB7vWoVNBk4jMYb kX17QHqe7K.45p4iysKTNrnEpFTgqVVnVYmra7Y2Wz0smyi89w9FZpezgW4p16fHRqWFYv8neHkE eGUoUMYN5cXEKX6ir081CggQ.bfuR.deGgv39UoSueB16OFgnM2ZUjZrKOP98KK6yokVhfP.WAKY RSLAbA2BdLHjQUXbo4sxUpmjpyFW7NDmSq8yFSnNaJzMIEhTeaUXOoGP.O2Z9Tad3iFI84t8wSdK yPzIY8BTjo7iKau8MiL2JlHEOS3DaXY223zCLgIW_LhgneqqlCjbq.0PT0zUg02vF5GvP2up.phu SwGneAIhKMVRfLW.SlaPIcjJoM6nt3qgCgibnfgIz80t3S7PiSNxOpvY7LxCeUCUGtGnjw5.1au5 k0M1wnWG4s4eMec15Ua12I7wOckdRM1NtSvvywU_SKWoVFbpfSXxVBIaExJEJ22hgVD64KqNAPsq zI3RmSxovIcFIUL0NfuNAAS4yvdj9fffNPhF6JUoxvOy5_Bdmr6Jbu0fUHqjsBdUp8FC1KlzQnus UsMi38Yc8iL_vKMsbCAkSQYlxp01Kz_O88Jwjxtx5W4SkjpvQsCQj1X0TNfy6uF_.WQzb1vRgJny mcwgF8u4uNuKvZh3A9ElO9FdUDoLQBxy1DJsPQNJyg3qMIT3y4eAR2y54kZRn0xXgGtO_7pBOqGW 7sfzQAIm3AjOJYhBu_kMUSdU4roO2ilJ2CLWz4o4QaArLdGCsRqJupWuCZuP_jeJMQTvAaW54Bqy GThPdxXlZQjCO6cWjko3dz01A2C3RShKhU04k2YjvDc.Ye6Fk3JE_96snDuleTAJTwjNB43T5CUN 29IFsRmQ9JccYzpA_2O2TIIB4ENdF7eD2IQ51JN_SvZXsUWWTCobfBoWXmcfoA3JGsO2TQCoS.F6 afzmcS0h.kAxW4g__bBjcUwKnDRNiZZJwVtQve8VvQo9Yn0KmKM.88VVG98.AerLutu_2pvFJJQu mrgCOnZabz5_yj3pIN_M.3QYHMzn8WSZpsSOXWlI9ui_llXo9EjAqgqxCp.NRZ_01Zrmwd8MT1mE 3FllZITfRwvQKmnJu6Q_g6S1CwuqMwOfiIhvvK76kD.JkMujEA7gxXY1IIKKR4ILCmKkirHTPYsX S5gFAnda76i05YeTDSYlvO2yVMZexZ6KBDUUImozwpqxTZfrYHRUFCdkIpbWnqPUWMc7v9BFpZms 4pU4qf_5Dtj1UgNfPcFl7TZM_PE.AcyDcVrFJa8o8Loy5Z1KINyqs0LfdEOpN5trIUhAjw0OepyX HYGxR86tKc9zqq9HZAb3iCyn7fphwMgWlK_pjzGTnRgrIovRTHoAQ10trZbV_7xNmS_Sx7oltBFY VokoKkXA7GWcJMzs_WY5AakH_9GJHITSrMNsk1j7GAcykmqxBmOpZWVV8mmiBRvlUIeO_qnuB3fL CfEUSv9Nt.bm9T3hNUuQ3xGi_EbeCftz.FlHX_k2Keff8xsvfnSa4LQx_XIaqA89qfhVtb_vfpr. HJDx9OusnHZpz2Ls95vNWZKtksikr.tU3lpYrxYAIhYORBZm7LLrm6.evNL_SYBu3U7HOKgK5r5S ChdoAqX92OaCqmjdWqVvJOyiSUeW5zeVjr7m9NIJaRJZJd8fuk37fCtQ6WFfhePT.im5QP8biwXM L3jLJg7TOm0MpojkZVjd40fc4tYJit8pLYq9sEKHW_urdPeuWOL_wSWACLtPb4IRHxPnEhs_hhIJ JXU_qRi1RMTMsDoMrcK2ExOCo2hZvLAYCKlbgOuFBGiERo.CTcs3lwAXhG36mHb0m1rX7dCGBNxj 3.n0mya.xxfB8nJMpPJ8XHjbh1_..dEiOT.PzEAr.CptULm9B0eUawtYOlcwAfQ3RrjbGknSiG5S DNgMAKf4_VC5XsYXIYoMLy.SWH.cvwJWjKdatxA4kjMMBhpStttfk..Qt4k29560g0KbICqBbgud ch4uEnOlOJ_AnhzzQe7zDwGK1jdJsztVXDxHvAzQsbck_viXqnU.GwdBFWYY0qLV2zj2SdTmB2U4 IfClET6yH0M.poKYoj4AmAAtTSEPyuDL52Uhyy11ztAMgVqJPxRZD6y0N_ujHCco- X-Sonic-MF: X-Sonic-ID: c5c7a821-e95c-4216-8e70-c1654a75482f Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Tue, 4 Jul 2023 03:34:09 +0000 Date: Tue, 4 Jul 2023 03:34:07 +0000 (UTC) From: Pedro Giffuni To: Warner Losh Cc: src-committers , "" , "" Message-ID: <1037448433.54513.1688441647903@mail.yahoo.com> In-Reply-To: References: <202307040308.36438MTA093771@gitrepo.freebsd.org> Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_54512_580997230.1688441647901" X-Mailer: WebService/1.1.21612 YMailNorrin X-Rspamd-Queue-Id: 4Qw7gl3l9Mz462F X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N ------=_Part_54512_580997230.1688441647901 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hmm ... Dragonfly has no armv7 or i386, so they didn't get it too wrong.I guess=C2= =A0the int64_t would be a quick fix or another option, which I was considei= rng, was to look at unsigning it but taking care of the edge cases ... I wa= s too lazy for that. Please go ahead and do the quick fix ;) Pedro. On Monday, July 3, 2023 at 10:12:13 PM GMT-5, Warner Losh wrote: =20 =20 This is a nope on armv7 and i386. So it has no effect there. DF got it wro= ng. These should likely be int64_t to avoid the overflow. No? Warner On Mon, Jul 3, 2023, 9:08 PM Pedro F. Giffuni wrote: The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=3D4456846a1a0d8cb6d0e6bae89f11= 34fa0a1af5cf commit 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf Author:=C2=A0 =C2=A0 =C2=A0Pedro F. Giffuni AuthorDate: 2023-07-03 02:32:10 +0000 Commit:=C2=A0 =C2=A0 =C2=A0Pedro F. Giffuni CommitDate: 2023-07-04 03:08:01 +0000 =C2=A0 =C2=A0 bin/date: Upgrade calculations =C2=A0 =C2=A0 Use long instead of int for numerous calculations, fixing a n= umber of =C2=A0 =C2=A0 date calculation overflow issues. =C2=A0 =C2=A0 Obtained from:=C2=A0 DragonflyBSD =C2=A0 =C2=A0 Git log:=C2=A0 =C2=A0 =C2=A0 =C2=A0 4238ce6f0c6df33ce677ae298= b245c62cd60fb43 (only partial) --- =C2=A0bin/date/vary.c | 20 ++++++++++---------- =C2=A01 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/date/vary.c b/bin/date/vary.c index 5f0123110ee3..6f3c59950ecf 100644 --- a/bin/date/vary.c +++ b/bin/date/vary.c @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); =C2=A0#include "vary.h" =C2=A0struct trans { -=C2=A0 int val; +=C2=A0 long val; =C2=A0 =C2=A0const char *str; =C2=A0}; @@ -52,7 +52,7 @@ static struct trans trans_wday[] =3D { =C2=A0}; =C2=A0static char digits[] =3D "0123456789"; -static int adjhour(struct tm *, char, int, int); +static int adjhour(struct tm *, char, long, int); =C2=A0static int =C2=A0domktime(struct tm *t, char type) @@ -125,7 +125,7 @@ daysinmonth(const struct tm *t) =C2=A0static int -adjyear(struct tm *t, char type, int val, int mk) +adjyear(struct tm *t, char type, long val, int mk) =C2=A0{ =C2=A0 =C2=A0switch (type) { =C2=A0 =C2=A0 =C2=A0case '+': @@ -146,7 +146,7 @@ adjyear(struct tm *t, char type, int val, int mk) =C2=A0} =C2=A0static int -adjmon(struct tm *t, char type, int val, int istext, int mk) +adjmon(struct tm *t, char type, long val, int istext, int mk) =C2=A0{ =C2=A0 =C2=A0int lmdays; @@ -206,7 +206,7 @@ adjmon(struct tm *t, char type, int val, int istext, in= t mk) =C2=A0} =C2=A0static int -adjday(struct tm *t, char type, int val, int mk) +adjday(struct tm *t, char type, long val, int mk) =C2=A0{ =C2=A0 =C2=A0int lmdays; @@ -250,7 +250,7 @@ adjday(struct tm *t, char type, int val, int mk) =C2=A0} =C2=A0static int -adjwday(struct tm *t, char type, int val, int istext, int mk) +adjwday(struct tm *t, char type, long val, int istext, int mk) =C2=A0{ =C2=A0 =C2=A0if (val < 0) =C2=A0 =C2=A0 =C2=A0return 0; @@ -286,7 +286,7 @@ adjwday(struct tm *t, char type, int val, int istext, i= nt mk) =C2=A0} =C2=A0static int -adjhour(struct tm *t, char type, int val, int mk) +adjhour(struct tm *t, char type, long val, int mk) =C2=A0{ =C2=A0 =C2=A0if (val < 0) =C2=A0 =C2=A0 =C2=A0return 0; @@ -331,7 +331,7 @@ adjhour(struct tm *t, char type, int val, int mk) =C2=A0} =C2=A0static int -adjmin(struct tm *t, char type, int val, int mk) +adjmin(struct tm *t, char type, long val, int mk) =C2=A0{ =C2=A0 =C2=A0if (val < 0) =C2=A0 =C2=A0 =C2=A0return 0; @@ -372,7 +372,7 @@ adjmin(struct tm *t, char type, int val, int mk) =C2=A0} =C2=A0static int -adjsec(struct tm *t, char type, int val, int mk) +adjsec(struct tm *t, char type, long val, int mk) =C2=A0{ =C2=A0 =C2=A0if (val < 0) =C2=A0 =C2=A0 =C2=A0return 0; @@ -419,7 +419,7 @@ vary_apply(const struct vary *v, struct tm *t) =C2=A0 =C2=A0char which; =C2=A0 =C2=A0char *arg; =C2=A0 =C2=A0size_t len; -=C2=A0 int val; +=C2=A0 long val; =C2=A0 =C2=A0for (; v; v =3D v->next) { =C2=A0 =C2=A0 =C2=A0type =3D *v->arg; =20 ------=_Part_54512_580997230.1688441647901 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hmm ...

Dragonfly has no armv7 or i386, so they didn't get it too wrong.
I guess the int64_t would be a quick fix or another option, which I was consideirng, was to look at unsigning it but taking care of the edge cases ... I was too lazy for that.

Please go ahead and do the quick fix ;)

Pedro.

On Monday, July 3, 2023 at 10:12:13 PM GMT-5, Warner Losh <imp@bsdimp.com> wrote:


This is a nope on armv7 and i386. So it has no effect there. DF got it wrong. These should likely be int64_t to avoid the overflow. No?

Warner

On Mon, Jul 3, 2023, 9:08 PM Pedro F. Giffuni <pfg@freebsd.org> wrote:
The branch main has been updated by pfg:

URL: https://cgit.FreeBSD.org/src/commit/?id=4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf

commit 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf
Author:     Pedro F. Giffuni <pfg@FreeBSD.org>
AuthorDate: 2023-07-03 02:32:10 +0000
Commit:     Pedro F. Giffuni <pfg@FreeBSD.org>
CommitDate: 2023-07-04 03:08:01 +0000

    bin/date: Upgrade calculations

    Use long instead of int for numerous calculations, fixing a number of
    date calculation overflow issues.

    Obtained from:  DragonflyBSD
    Git log:        4238ce6f0c6df33ce677ae298b245c62cd60fb43 (only partial)
---
 bin/date/vary.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/bin/date/vary.c b/bin/date/vary.c
index 5f0123110ee3..6f3c59950ecf 100644
--- a/bin/date/vary.c
+++ b/bin/date/vary.c
@@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
 #include "vary.h"

 struct trans {
-  int val;
+  long val;
   const char *str;
 };

@@ -52,7 +52,7 @@ static struct trans trans_wday[] = {
 };

 static char digits[] = "0123456789";
-static int adjhour(struct tm *, char, int, int);
+static int adjhour(struct tm *, char, long, int);

 static int
 domktime(struct tm *t, char type)
@@ -125,7 +125,7 @@ daysinmonth(const struct tm *t)


 static int
-adjyear(struct tm *t, char type, int val, int mk)
+adjyear(struct tm *t, char type, long val, int mk)
 {
   switch (type) {
     case '+':
@@ -146,7 +146,7 @@ adjyear(struct tm *t, char type, int val, int mk)
 }

 static int
-adjmon(struct tm *t, char type, int val, int istext, int mk)
+adjmon(struct tm *t, char type, long val, int istext, int mk)
 {
   int lmdays;

@@ -206,7 +206,7 @@ adjmon(struct tm *t, char type, int val, int istext, int mk)
 }

 static int
-adjday(struct tm *t, char type, int val, int mk)
+adjday(struct tm *t, char type, long val, int mk)
 {
   int lmdays;

@@ -250,7 +250,7 @@ adjday(struct tm *t, char type, int val, int mk)
 }

 static int
-adjwday(struct tm *t, char type, int val, int istext, int mk)
+adjwday(struct tm *t, char type, long val, int istext, int mk)
 {
   if (val < 0)
     return 0;
@@ -286,7 +286,7 @@ adjwday(struct tm *t, char type, int val, int istext, int mk)
 }

 static int
-adjhour(struct tm *t, char type, int val, int mk)
+adjhour(struct tm *t, char type, long val, int mk)
 {
   if (val < 0)
     return 0;
@@ -331,7 +331,7 @@ adjhour(struct tm *t, char type, int val, int mk)
 }

 static int
-adjmin(struct tm *t, char type, int val, int mk)
+adjmin(struct tm *t, char type, long val, int mk)
 {
   if (val < 0)
     return 0;
@@ -372,7 +372,7 @@ adjmin(struct tm *t, char type, int val, int mk)
 }

 static int
-adjsec(struct tm *t, char type, int val, int mk)
+adjsec(struct tm *t, char type, long val, int mk)
 {
   if (val < 0)
     return 0;
@@ -419,7 +419,7 @@ vary_apply(const struct vary *v, struct tm *t)
   char which;
   char *arg;
   size_t len;
-  int val;
+  long val;

   for (; v; v = v->next) {
     type = *v->arg;
------=_Part_54512_580997230.1688441647901-- From nobody Tue Jul 4 03:44:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7vF6J49z4lh9P; Tue, 4 Jul 2023 03:44: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 4Qw7vF55VZz47qD; Tue, 4 Jul 2023 03:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688442249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gKTPI4O7Cga5bRHtJnZ+vxY64qto6EuEmBgro52Yasg=; b=KNfxHWKP+ss7YOA73XAVrk0OcDHSvqefSEzVVmnyn3sPzmmcGbJQq7jl3p1MUHXIiKvaWN w5bF207uUAH6bnaKbpw3PiWNaaGG7qBvmZJPRJMGn3USQDRBW3X8Swy/9d9eklj3v/LH66 i9rFmQJRf7f2DENAI5YdAATw4YA7zgGnotlAj5vULJBjEGW2jVx9suLA8JbZxEa334937N jqwblr+LrLjcoFCHSAiIi8296UtkpETeG7C9CzBueH1UBLisFR/CzYM9ipbDM5xoiMompb DnHlgBII2jIqw6mO7yDrydaJOdDnjoFIgIqHD50jqe1gVEpRYYSlLzDW/BLo8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688442249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gKTPI4O7Cga5bRHtJnZ+vxY64qto6EuEmBgro52Yasg=; b=kAJpVP7Zymd/IAreaEVTYhdFqv6xT3PMxircw2+ga3GkkewnsZXvidkfsZXE/Yqff2GbPv 5icUAhLieRh53Rq7tLaDkD2CACxzbjLHZ9du+biDpLssy8/2qhCjZz948wqJSa02UzWSnx BNs+Mq3OVX+2vxbjE8bUBzDip28ftrYm9V4KRrSZXHwWW/ikrpQdOw2G2Wjt2SJGG9xcDv 3F5gX1Ptly0W7LrPYKeZ+VZPp8StWe+2paMOpeCnOU2ESWly13fZEyCKgotauj7SXScRLj tlZ2spe53Hnb7isDHvI5UFMBKFIEQt1fQ/nBqmXcfdZ1xRtBNH25KbVple36VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688442249; a=rsa-sha256; cv=none; b=hwvjQrniGTcvHG+oMOstwPdaXKxNCR8weDFbwm6MP50Qz5e7OkDHknrL1ZgHgqAzoJlll8 SZmVm9v85XDUmo3ZRHuVFJbEVck7gH01SGoW7VIZowVAmaAvpE1+jbT+oqAgPvtWuCN4Rp Po1AcRfzVYKSKPWW4ISdCMtemsipsar+uhbfpOGoi1KvxtSdkk31aVMETuIIpLDG7Be0tw ISi0n2VqHxFCT8uergNNSlS11nLjPnzGTestPX39nXM1DD8d8EuNAYh/MgkM82AqOx+Pup xEf+bB2Lv20U+a+jyQpiI+PUv89ZvfMPiSqX38zw73sDW3kG/sZ9zI2Ydk3QDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw7vF49NTzHKL; Tue, 4 Jul 2023 03:44: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 3643i9U2058673; Tue, 4 Jul 2023 03:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3643i9sH058672; Tue, 4 Jul 2023 03:44:09 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:44:09 GMT Message-Id: <202307040344.3643i9sH058672@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: 4b59d1724b76 - main - killpg1(): update the herald comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b59d1724b765063891cb44c28079b4c503a02fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b59d1724b765063891cb44c28079b4c503a02fd commit 4b59d1724b765063891cb44c28079b4c503a02fd Author: Konstantin Belousov AuthorDate: 2023-06-16 09:02:04 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 03:21:53 +0000 killpg1(): update the herald comment Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40493 --- sys/kern/kern_sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 210ef24e52fa..167ebc1be4f3 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1825,7 +1825,7 @@ kill_processes_prison_cb(struct proc *p, void *arg) /* * Common code for kill process group/broadcast kill. - * cp is calling process. + * td is the calling thread, as usual. */ static int killpg1(struct thread *td, int sig, int pgid, int all, ksiginfo_t *ksi) From nobody Tue Jul 4 03:44:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7vG6XSSz4lhFM; Tue, 4 Jul 2023 03:44: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 4Qw7vG5krpz483C; Tue, 4 Jul 2023 03:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688442250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6OL2CJrQNQyJ2GOB+ZwxbzXbRxX9wGtZdP25F3r2NZ0=; b=q51nwA1l0lGiMd6GeTe3txlkPMHcQo09Z1qZ42YGWkN35TP3N1lu0RwTpp30CWFaCt8pXV BgI+N462gaXK6kq3FVOkqmx4iZ7G67ki+cjQ3RocWq5SZSQjzGglc9vQX86wuVPW23l5gL IGJgr5adN/wwf1NrMat6Zv2VvmH4WTJgISFEiNIL18bOiXSY0zr6+Gd7UShII0q/q+qGPq wh4dDWSbiZqb2z68kdKoBW8H3Y4NOW5sAq7jeOwnR8sBhl2KCAa5Enmi4spxbJzFSj+FQo wJdl11PCanE7t+X5Ob2/ea9ZTDp262rrp4zNq/EGeeIu2ahQR2bDQD/9Hdahjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688442250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6OL2CJrQNQyJ2GOB+ZwxbzXbRxX9wGtZdP25F3r2NZ0=; b=RpYnS7rhTOOXDmpYtu0lHGzhWSOuVDakfpn5mQ8+bC+fZQ7NFQAW4exMJ+rPLmBV5ed8po T74ebT3wwmmsvmGx9JmF185oOb0zTEIE1tpwP/AUymc8nDPHKo0eD97K/xbl4lYm2MowX7 YNDK0EzBHM0XrwAvTuurRQpF4ayHdFGZl1/DOrkhreyfDoujFRssfcoMttGbb0T1GMvXt1 MScOHZGDxUQNP4HidQYLGyPiZdXqknfjXCM65G05FvlbSKx2ekCHNVBywt53rqDLMO31lG Yslk+4VuaDRzxW5coFfs2qv3GVCBslVYyjdgaCwZEqmtfuolNEYfKiN2YOPstQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688442250; a=rsa-sha256; cv=none; b=ve3jqtxU5M4tRuJgjwWeozZki7GCzssblVfgazqupbhzOn464JsJLsAP/ChqXGO/56q4yK tp3p5l7jZg7750+YgjyjuPxx4Zh+7bpIX1EQF/R9jevmdFoHHl9HQ+E+qgjfWgda+4amRq K63VWrIkzn9gflv+uGuL5R3QniHbzwUdfQLC9g7rOmog3cNOFxRUnOr1BoQ1PpCU4JXCiM 7taYFU8ChCkeyTIoeS0XhK6tX30zpwNUzBvXg0x7ugrSadyPsGrM293z9imVkV+T8Pk+Ds 9jlhuvpSVnVOhilIZVeiu4PSAG2hXChghMznbMTnz3zvaEuk/6u8nvCSJBi0Jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw7vG4jWTzH9J; Tue, 4 Jul 2023 03:44: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 3643iAgj058699; Tue, 4 Jul 2023 03:44:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3643iAjr058698; Tue, 4 Jul 2023 03:44:10 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:44:10 GMT Message-Id: <202307040344.3643iAjr058698@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: 3360b48525fc - main - killpg(2): close a race with fork(2), part1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3360b48525fc966894e77b8cd9c124669664472d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3360b48525fc966894e77b8cd9c124669664472d commit 3360b48525fc966894e77b8cd9c124669664472d Author: Konstantin Belousov AuthorDate: 2023-06-12 07:33:43 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 03:21:53 +0000 killpg(2): close a race with fork(2), part1 If the process group member performs fork(), the child could escape signalling from killpg(). Prevent it by introducing an sx process group lock pg_killsx which is taken interruptibly shared around fork. If there is a pending signal, do the trip through userspace with ERESTART to handle signal ASTs. The lock is taken exclusively during killpg(). The lock is also locked exclusive when the process changes group membership, to avoid escaping a signal by this means, by ensuring that the process group is stable during fork. Note that the new lock is before proctree lock, so in some situations we could only do trylocking to obtain it. This relatively simple approach cannot work for REAP_KILL, because process potentially belongs to more than one reaper tree by having sub-reapers. Reported by: dchagin Tested by: dchagin, pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D40493 --- sys/kern/init_main.c | 1 + sys/kern/kern_fork.c | 28 ++++++++++++++++++++++++++++ sys/kern/kern_proc.c | 20 ++++++++++++++++++++ sys/kern/kern_prot.c | 17 +++++++++++++---- sys/kern/kern_sig.c | 8 ++++++++ sys/sys/proc.h | 2 ++ 6 files changed, 72 insertions(+), 4 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 77a0f5478eb6..abc6b3f6e2f2 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -495,6 +495,7 @@ proc0_init(void *dummy __unused) LIST_INSERT_HEAD(&allproc, p, p_list); LIST_INSERT_HEAD(PIDHASH(0), p, p_hash); mtx_init(&pgrp0.pg_mtx, "process group", NULL, MTX_DEF | MTX_DUPOK); + sx_init(&pgrp0.pg_killsx, "killpg racer"); p->p_pgrp = &pgrp0; LIST_INSERT_HEAD(PGRPHASH(0), &pgrp0, pg_hash); LIST_INIT(&pgrp0.pg_members); diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 944ecf494736..81bee99fa1ca 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -856,11 +856,13 @@ fork1(struct thread *td, struct fork_req *fr) struct vmspace *vm2; struct ucred *cred; struct file *fp_procdesc; + struct pgrp *pg; vm_ooffset_t mem_charged; int error, nprocs_new; static int curfail; static struct timeval lastfail; int flags, pages; + bool killsx_locked; flags = fr->fr_flags; pages = fr->fr_pages; @@ -917,6 +919,7 @@ fork1(struct thread *td, struct fork_req *fr) fp_procdesc = NULL; newproc = NULL; vm2 = NULL; + killsx_locked = false; /* * Increment the nprocs resource before allocations occur. @@ -946,6 +949,28 @@ fork1(struct thread *td, struct fork_req *fr) } } + /* + * Atomically check for signals and block threads from sending + * a signal to our process group until the child is visible. + */ + pg = p1->p_pgrp; + if (sx_slock_sig(&pg->pg_killsx) != 0) { + error = ERESTART; + goto fail2; + } else if (__predict_false(p1->p_pgrp != pg || sig_intr() != 0)) { + /* + * Either the process was moved to other process + * group, or there is pending signal. sx_slock_sig() + * does not check for signals if not sleeping for the + * lock. + */ + sx_sunlock(&pg->pg_killsx); + error = ERESTART; + goto fail2; + } else { + killsx_locked = true; + } + /* * If required, create a process descriptor in the parent first; we * will abandon it if something goes wrong. We don't finit() until @@ -1037,6 +1062,7 @@ fork1(struct thread *td, struct fork_req *fr) } do_fork(td, fr, newproc, td2, vm2, fp_procdesc); + sx_sunlock(&pg->pg_killsx); return (0); fail0: error = EAGAIN; @@ -1055,6 +1081,8 @@ fail2: fdrop(fp_procdesc, td); } atomic_add_int(&nprocs, -1); + if (killsx_locked) + sx_sunlock(&pg->pg_killsx); pause("fork", hz / 2); return (error); } diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 3983e536e70e..19b3b41aa6f3 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -310,6 +310,7 @@ pgrp_init(void *mem, int size, int flags) pg = mem; mtx_init(&pg->pg_mtx, "process group", NULL, MTX_DEF | MTX_DUPOK); + sx_init(&pg->pg_killsx, "killpg racer"); return (0); } @@ -573,6 +574,7 @@ errout: int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess) { + struct pgrp *old_pgrp; sx_assert(&proctree_lock, SX_XLOCKED); @@ -584,6 +586,11 @@ enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess) KASSERT(!SESS_LEADER(p), ("enterpgrp: session leader attempted setpgrp")); + old_pgrp = p->p_pgrp; + if (!sx_try_xlock(&old_pgrp->pg_killsx)) + return (ERESTART); + MPASS(old_pgrp == p->p_pgrp); + if (sess != NULL) { /* * new session @@ -625,6 +632,7 @@ enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess) doenterpgrp(p, pgrp); + sx_xunlock(&old_pgrp->pg_killsx); return (0); } @@ -634,6 +642,7 @@ enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess) int enterthispgrp(struct proc *p, struct pgrp *pgrp) { + struct pgrp *old_pgrp; sx_assert(&proctree_lock, SX_XLOCKED); PROC_LOCK_ASSERT(p, MA_NOTOWNED); @@ -646,8 +655,19 @@ enterthispgrp(struct proc *p, struct pgrp *pgrp) KASSERT(pgrp != p->p_pgrp, ("%s: p %p belongs to pgrp %p", __func__, p, pgrp)); + old_pgrp = p->p_pgrp; + if (!sx_try_xlock(&old_pgrp->pg_killsx)) + return (ERESTART); + MPASS(old_pgrp == p->p_pgrp); + if (!sx_try_xlock(&pgrp->pg_killsx)) { + sx_xunlock(&old_pgrp->pg_killsx); + return (ERESTART); + } + doenterpgrp(p, pgrp); + sx_xunlock(&pgrp->pg_killsx); + sx_xunlock(&old_pgrp->pg_killsx); return (0); } diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 3d8f3e222b4c..733a92839f53 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -332,12 +332,13 @@ sys_setsid(struct thread *td, struct setsid_args *uap) struct pgrp *newpgrp; struct session *newsess; - error = 0; pgrp = NULL; newpgrp = uma_zalloc(pgrp_zone, M_WAITOK); newsess = malloc(sizeof(struct session), M_SESSION, M_WAITOK | M_ZERO); +again: + error = 0; sx_xlock(&proctree_lock); if (p->p_pgid == p->p_pid || (pgrp = pgfind(p->p_pid)) != NULL) { @@ -345,7 +346,12 @@ sys_setsid(struct thread *td, struct setsid_args *uap) PGRP_UNLOCK(pgrp); error = EPERM; } else { - (void)enterpgrp(p, p->p_pid, newpgrp, newsess); + error = enterpgrp(p, p->p_pid, newpgrp, newsess); + if (error == ERESTART) { + sx_xunlock(&proctree_lock); + goto again; + } + MPASS(error == 0); td->td_retval[0] = p->p_pid; newpgrp = NULL; newsess = NULL; @@ -391,10 +397,11 @@ sys_setpgid(struct thread *td, struct setpgid_args *uap) if (uap->pgid < 0) return (EINVAL); - error = 0; - newpgrp = uma_zalloc(pgrp_zone, M_WAITOK); +again: + error = 0; + sx_xlock(&proctree_lock); if (uap->pid != 0 && uap->pid != curp->p_pid) { if ((targp = pfind(uap->pid)) == NULL) { @@ -456,6 +463,8 @@ done: sx_xunlock(&proctree_lock); KASSERT((error == 0) || (newpgrp != NULL), ("setpgid failed and newpgrp is NULL")); + if (error == ERESTART) + goto again; uma_zfree(pgrp_zone, newpgrp); return (error); } diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 167ebc1be4f3..948ef97c0715 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1847,6 +1847,7 @@ killpg1(struct thread *td, int sig, int pgid, int all, ksiginfo_t *ksi) prison_proc_iterate(td->td_ucred->cr_prison, kill_processes_prison_cb, &arg); } else { +again: sx_slock(&proctree_lock); if (pgid == 0) { /* @@ -1862,10 +1863,17 @@ killpg1(struct thread *td, int sig, int pgid, int all, ksiginfo_t *ksi) } } sx_sunlock(&proctree_lock); + if (!sx_try_xlock(&pgrp->pg_killsx)) { + PGRP_UNLOCK(pgrp); + sx_xlock(&pgrp->pg_killsx); + sx_xunlock(&pgrp->pg_killsx); + goto again; + } LIST_FOREACH(p, &pgrp->pg_members, p_pglist) { killpg1_sendsig(p, false, &arg); } PGRP_UNLOCK(pgrp); + sx_xunlock(&pgrp->pg_killsx); } MPASS(arg.ret != 0 || arg.found || !arg.sent); if (arg.ret == 0 && !arg.sent) diff --git a/sys/sys/proc.h b/sys/sys/proc.h index ca3911e9db66..d79b7a440168 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -113,6 +113,8 @@ struct pgrp { pid_t pg_id; /* (c) Process group id. */ struct mtx pg_mtx; /* Mutex to protect members */ int pg_flags; /* (m) PGRP_ flags */ + struct sx pg_killsx; /* Mutual exclusion between group member + * fork() and killpg() */ }; #define PGRP_ORPHANED 0x00000001 /* Group is orphaned */ From nobody Tue Jul 4 03:44:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw7vJ2gnTz4lhTK; Tue, 4 Jul 2023 03:44: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 4Qw7vJ0K4yz48F8; Tue, 4 Jul 2023 03:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688442252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AtoSzvNSYBmqG35iQXvELKipwqwPhfaBL1/7OzxEOmA=; b=ARIWIMznG3yjdm2WCahAm+z3pcxYJCq6bxUw0a9d5Zh2+dIPS7BjFhqg5Bj/QbchaBGbjb G601H3Vg14h3Sj/aRpBcj8jUiP0lQbCQuJkDcbjzzl2YJQScx/MB/rTh3RKkkxZPlbPHHJ u90x8IOYtxCMGe+WbeAez9bA9DGixfLZkeZDBly/eaQRBdOeKgRI6MuBUnDHVz6TUtQvp/ nUR0vJEIkq36X7paB4Z/Weamz/C7yARnJAoZJeb1Y6R921heca5RWPbuNHkAcUTs1ToLwB j8D14ylkO6KrLriZLAlCEuUvV2h+lXawlXgAZ5VnRehOYqEDgl90XlMe/43NVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688442252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AtoSzvNSYBmqG35iQXvELKipwqwPhfaBL1/7OzxEOmA=; b=ABsjgNdfpZp1SE5apQfW1oJS9XreaT31pAC9rL8oX8wzhYgC5bHfY3w1Pbi4kyepN2J9Z4 S8GROQlNgABpFxfuQmXyxctcW0SNjcb0bmlRc33Xqn0sLGCXG6k80MnolDtsoLgaUGpe2D 5saZ7vKus8Lu5fJqn81RXreMpGkfq1Jj0VnUuyNhP79KLU7RPCrw/OOQdKH0t1ybp/sJsg 9sd+UTmvE68mfR/jAn7nNv4Mg5edXlzCoUZKTcgq+GGcH3iZcf/d5GF5Tp4HVTIUMaHsx3 fwPwHdlzaTD7YTBDr/KsXnznNsjIeM3htpaWC1CIOl0egDh3pcnezHy7TeQiEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688442252; a=rsa-sha256; cv=none; b=Iu0AHmW8S3V2jQs139a/P8ZieiK1VCuYRqLi9fXddc8HZzWNeur+gtAIGzEuglHYZvmdbF xOjUMVKsK4lqt/cZA38BWPRXpb21/dPYn01181vuromUo0R39++VrywgjOGlTwTiux2Jqk oYYuO1qaga+9/JufSMOJHCz6/88W675pBQxDdvgdljtpnneHmwHERPuoIbRXyDY/0zTUKB Xo73GIN1inFMBD6r4oJOMEwkk0U2zIh8jCnR/FHPmBzVtg+mcvOP1nXwsIa1elXBgAWgte /Z0DX2ooIoG8mH1+dvszB2Zh8ttJ3E4kgmBnRoPtkuiX5A0boAFYKfyV/hyvNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw7vH5hS6zHKM; Tue, 4 Jul 2023 03:44: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 3643iBLp058719; Tue, 4 Jul 2023 03:44:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3643iBdi058718; Tue, 4 Jul 2023 03:44:11 GMT (envelope-from git) Date: Tue, 4 Jul 2023 03:44:11 GMT Message-Id: <202307040344.3643iBdi058718@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: 81a37995c757 - main - killpg(): close a race with fork(), part 2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=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: 81a37995c757b4e3ad8a5c699864197fd1ebdcf5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=81a37995c757b4e3ad8a5c699864197fd1ebdcf5 commit 81a37995c757b4e3ad8a5c699864197fd1ebdcf5 Author: Konstantin Belousov AuthorDate: 2023-06-16 09:52:10 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 03:43:16 +0000 killpg(): close a race with fork(), part 2 When we are sending terminating signal to the group, killpg() needs to guarantee that all group members are to be terminated (it does not need to ensure that they are terminated on return from killpg()). The pg_killsx change eliminates the largest window there, but still, if a multithreaded process is signalled, the following could happen: - thread 1 is selected for the signal delivery and gets descheduled - thread 2 waits for pg_killsx lock, obtains it and forks - thread 1 continue executing and terminates the process This scenario allows the child to escape still. To fix it, count the number of signals sent to the process with killpg(2), in p_killpg_cnt variable, which is incremented in killpg() and decremented after signal handler frame is created or in exit1() after single-threading. This way we avoid forking if the termination is due. Noted and reviewed by: markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D40493 --- sys/kern/kern_exit.c | 13 ++++++++++++- sys/kern/kern_fork.c | 3 ++- sys/kern/kern_sig.c | 37 ++++++++++++++++++++++++++++++++----- sys/kern/kern_thread.c | 6 +++--- sys/sys/proc.h | 2 ++ sys/sys/signalvar.h | 3 ++- 6 files changed, 53 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index a92d5cc0f642..a6f3ca2a2d66 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -220,13 +220,19 @@ proc_set_p2_wexit(struct proc *p) p->p_flag2 |= P2_WEXIT; } +void +exit1(struct thread *td, int rval, int signo) +{ + exit2(td, rval, signo, false); +} + /* * Exit: deallocate address space and other resources, change proc state to * zombie, and unlink proc from allproc and parent's lists. Save exit status * and rusage for wait(). Check for child processes and orphan them. */ void -exit1(struct thread *td, int rval, int signo) +exit2(struct thread *td, int rval, int signo, bool dec_killpg_cnt) { struct proc *p, *nq, *q, *t; struct thread *tdt; @@ -304,6 +310,11 @@ exit1(struct thread *td, int rval, int signo) ("exit1: proc %p exiting with %d threads", p, p->p_numthreads)); racct_sub(p, RACCT_NTHR, 1); + if (dec_killpg_cnt) { + MPASS(atomic_load_int(&p->p_killpg_cnt) > 0); + atomic_add_int(&p->p_killpg_cnt, -1); + } + /* Let event handler change exit status */ p->p_xexit = rval; p->p_xsig = signo; diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 81bee99fa1ca..180c96ae33ef 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -957,7 +957,8 @@ fork1(struct thread *td, struct fork_req *fr) if (sx_slock_sig(&pg->pg_killsx) != 0) { error = ERESTART; goto fail2; - } else if (__predict_false(p1->p_pgrp != pg || sig_intr() != 0)) { + } else if (__predict_false(p1->p_pgrp != pg || sig_intr() != 0 || + atomic_load_int(&p1->p_killpg_cnt) != 0)) { /* * Either the process was moved to other process * group, or there is pending signal. sx_slock_sig() diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 948ef97c0715..18756d53e98c 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -121,6 +121,7 @@ static int filt_signal(struct knote *kn, long hint); static struct thread *sigtd(struct proc *p, int sig, bool fast_sigblock); static void sigqueue_start(void); static void sigfastblock_setpend(struct thread *td, bool resched); +static void sigexit1(struct thread *td, int sig, ksiginfo_t *ksi) __dead2; static uma_zone_t ksiginfo_zone = NULL; struct filterops sig_filtops = { @@ -371,6 +372,15 @@ sigqueue_start(void) TDP_OLDMASK, ast_sigsuspend); } +static void +sig_handle_killpg(struct proc *p, ksiginfo_t *ksi) +{ + if ((ksi->ksi_flags & KSI_KILLPG) != 0 && p != NULL) { + MPASS(atomic_load_int(&p->p_killpg_cnt) > 0); + atomic_add_int(&p->p_killpg_cnt, -1); + } +} + ksiginfo_t * ksiginfo_alloc(int mwait) { @@ -470,6 +480,7 @@ sigqueue_take(ksiginfo_t *ksi) p = sq->sq_proc; TAILQ_REMOVE(&sq->sq_list, ksi, ksi_link); ksi->ksi_sigq = NULL; + sig_handle_killpg(p, ksi); if (!(ksi->ksi_flags & KSI_EXT) && p != NULL) p->p_pendingcnt--; @@ -567,6 +578,7 @@ sigqueue_flush(sigqueue_t *sq) while ((ksi = TAILQ_FIRST(&sq->sq_list)) != NULL) { TAILQ_REMOVE(&sq->sq_list, ksi, ksi_link); ksi->ksi_sigq = NULL; + sig_handle_killpg(p, ksi); if (ksiginfo_tryfree(ksi) && p != NULL) p->p_pendingcnt--; } @@ -642,6 +654,7 @@ sigqueue_delete_set(sigqueue_t *sq, const sigset_t *set) if (SIGISMEMBER(*set, ksi->ksi_signo)) { TAILQ_REMOVE(&sq->sq_list, ksi, ksi_link); ksi->ksi_sigq = NULL; + sig_handle_killpg(p, ksi); if (ksiginfo_tryfree(ksi) && p != NULL) p->p_pendingcnt--; } @@ -1458,7 +1471,7 @@ kern_sigtimedwait(struct thread *td, sigset_t waitset, ksiginfo_t *ksi, #endif if (sig == SIGKILL) { proc_td_siginfo_capture(td, &ksi->ksi_info); - sigexit(td, sig); + sigexit1(td, sig, ksi); } } PROC_UNLOCK(p); @@ -1936,8 +1949,10 @@ kern_kill(struct thread *td, pid_t pid, int signum) case -1: /* broadcast signal */ return (killpg1(td, signum, 0, 1, &ksi)); case 0: /* signal own process group */ + ksi.ksi_flags |= KSI_KILLPG; return (killpg1(td, signum, 0, 0, &ksi)); default: /* negative explicit process group */ + ksi.ksi_flags |= KSI_KILLPG; return (killpg1(td, signum, -pid, 0, &ksi)); } /* NOTREACHED */ @@ -1988,6 +2003,7 @@ okillpg(struct thread *td, struct okillpg_args *uap) ksi.ksi_code = SI_USER; ksi.ksi_pid = td->td_proc->p_pid; ksi.ksi_uid = td->td_ucred->cr_ruid; + ksi.ksi_flags |= KSI_KILLPG; return (killpg1(td, uap->signum, uap->pgid, 0, &ksi)); } #endif /* COMPAT_43 */ @@ -2375,6 +2391,10 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) ret = sigqueue_add(sigqueue, sig, ksi); if (ret != 0) return (ret); + if ((ksi->ksi_flags & KSI_KILLPG) != 0) { + sx_assert(&p->p_pgrp->pg_killsx, SX_XLOCKED); + atomic_add_int(&p->p_killpg_cnt, 1); + } signotify(td); /* * Defer further processing for signals which are held, @@ -3425,7 +3445,7 @@ postsig(int sig) */ mtx_unlock(&ps->ps_mtx); proc_td_siginfo_capture(td, &ksi.ksi_info); - sigexit(td, sig); + sigexit1(td, sig, &ksi); /* NOTREACHED */ } else { /* @@ -3453,6 +3473,7 @@ postsig(int sig) if (p->p_sig == sig) { p->p_sig = 0; } + sig_handle_killpg(p, &ksi); (*p->p_sysent->sv_sendsig)(action, &ksi, &returnmask); postsig_done(sig, td, ps); } @@ -3610,8 +3631,8 @@ killproc(struct proc *p, const char *why) * If dumping core, save the signal number for the debugger. Calls exit and * does not return. */ -void -sigexit(struct thread *td, int sig) +static void +sigexit1(struct thread *td, int sig, ksiginfo_t *ksi) { struct proc *p = td->td_proc; @@ -3650,10 +3671,16 @@ sigexit(struct thread *td, int sig) sig & WCOREFLAG ? " (core dumped)" : ""); } else PROC_UNLOCK(p); - exit1(td, 0, sig); + exit2(td, 0, sig, ksi != NULL && (ksi->ksi_flags & KSI_KILLPG) != 0); /* NOTREACHED */ } +void +sigexit(struct thread *td, int sig) +{ + sigexit1(td, sig, NULL); +} + /* * Send queued SIGCHLD to parent when child process's state * is changed. diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 67712450c128..fad1abd1be6c 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -99,7 +99,7 @@ _Static_assert(offsetof(struct proc, p_pid) == 0xc4, "struct proc KBI p_pid"); _Static_assert(offsetof(struct proc, p_filemon) == 0x3c8, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, +_Static_assert(offsetof(struct proc, p_comm) == 0x3e4, "struct proc KBI p_comm"); _Static_assert(offsetof(struct proc, p_emuldata) == 0x4d0, "struct proc KBI p_emuldata"); @@ -119,9 +119,9 @@ _Static_assert(offsetof(struct proc, p_pid) == 0x78, "struct proc KBI p_pid"); _Static_assert(offsetof(struct proc, p_filemon) == 0x270, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x284, +_Static_assert(offsetof(struct proc, p_comm) == 0x288, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x318, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x31c, "struct proc KBI p_emuldata"); #endif diff --git a/sys/sys/proc.h b/sys/sys/proc.h index d79b7a440168..5c77c2d683c1 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -722,6 +722,7 @@ struct proc { int p_pendingexits; /* (c) Count of pending thread exits. */ struct filemon *p_filemon; /* (c) filemon-specific data. */ int p_pdeathsig; /* (c) Signal from parent on exit. */ + int p_killpg_cnt; /* End area that is zeroed on creation. */ #define p_endzero p_magic @@ -1236,6 +1237,7 @@ void userret(struct thread *, struct trapframe *); void cpu_exit(struct thread *); void exit1(struct thread *, int, int) __dead2; +void exit2(struct thread *, int, int, bool) __dead2; void cpu_copy_thread(struct thread *td, struct thread *td0); bool cpu_exec_vmspace_reuse(struct proc *p, struct vm_map *map); int cpu_fetch_syscall_args(struct thread *td); diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h index 59b26105effd..611eb11a8629 100644 --- a/sys/sys/signalvar.h +++ b/sys/sys/signalvar.h @@ -240,7 +240,8 @@ typedef struct ksiginfo { #define KSI_SIGQ 0x08 /* Generated by sigqueue, might ret EAGAIN. */ #define KSI_HEAD 0x10 /* Insert into head, not tail. */ #define KSI_PTRACE 0x20 /* Generated by ptrace. */ -#define KSI_COPYMASK (KSI_TRAP | KSI_SIGQ | KSI_PTRACE) +#define KSI_KILLPG 0x40 /* killpg - update p_killpg_cnt */ +#define KSI_COPYMASK (KSI_TRAP | KSI_SIGQ | KSI_PTRACE | KSI_KILLPG) #define KSI_ONQ(ksi) ((ksi)->ksi_sigq != NULL) From nobody Tue Jul 4 04:00:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw8GV2rCfz4lpGR for ; Tue, 4 Jul 2023 04:00:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qw8GV1R9cz4FPS for ; Tue, 4 Jul 2023 04:00:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2b6a0d91e80so82645021fa.3 for ; Mon, 03 Jul 2023 21:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1688443247; x=1691035247; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=abTrg2YC73mkzIf50yIvs/bldISrMmzLuOmj3GQMgXc=; b=dhRge76lx8zKYrq4JE2+Fn1muKcgBJAggrp3YaciR8qi4ZJMJIKfcRo89aqTQtWWq+ ymXcmia1veAuFCn5WTdOioBLMLR5MI/4TiRZ4fLZrKCsazunCtoz1He/noSgFCYB1Pd0 LxMOj+7TH6XGCP1bZxM4V6SMygootR2X9ggnu0Yl7p2a6fQuDFVdSI8bLoMSpUo5L9bt 2lNmZn536ww4YBODF+0DsSZT9qgCkTzsdveWFoWDUH4SyOFUFsUMAl2oXK2xrszBD7kv liSExJcxSlUbf0+/0XwLM9KtTURiJ+9xBbmmF+BD07Cij4A72C517DcuCxvkt0BIS6Gz z7Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688443247; x=1691035247; 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=abTrg2YC73mkzIf50yIvs/bldISrMmzLuOmj3GQMgXc=; b=lzTqjF/O2D5QVyiRJefZq022DZbdmV8eXz61BWwu4insF3InvhePxf84MlwTViGx6Y nY7U/6J1OAl2IiQyMNAsWWSqtktHS2Ah2fGJ0e1gkDujPQYAEU7ODtbuP0yl9edf1bga LlBGLnmlGW+p12Xy6enNHDpnQrpTn3D2s9PNOlU4mjQrGf0DksvunQAIiukEbO3Qz5ym mPzYOK3vlCrRl9gYaxZ2zRchqB96w7wMf6i48Q59FSj0JTABuRcKl3EWzPsqDqZzxDrR AfWNNJYekH7SsE6cL7I1JD32y+5D14ZVIEcBw/MFm1FM2qAvGPMS/Yjc43/Xh5J7OujI X2og== X-Gm-Message-State: ABy/qLaZbbR1nT7KhFBrUKJynftyERaoZbJxP/sWl6tfG0IT3mwGZvV/ kISSG4XwNrBZFgvco3O1TDTC67a5RnCR34Nxr4jb2Q== X-Google-Smtp-Source: APBJJlHT4AxgM/FTL7y4jtXmMpjSqARatQF/Esos03FbkmetaoWm1QG8c8XfU1fPhPCPxNMsoqKXFuTlg7xcn24C9dc= X-Received: by 2002:a2e:8e8a:0:b0:2b4:5cad:f246 with SMTP id z10-20020a2e8e8a000000b002b45cadf246mr8479740ljk.7.1688443246105; Mon, 03 Jul 2023 21:00:46 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202307040308.36438MTA093771@gitrepo.freebsd.org> <1037448433.54513.1688441647903@mail.yahoo.com> In-Reply-To: <1037448433.54513.1688441647903@mail.yahoo.com> From: Warner Losh Date: Mon, 3 Jul 2023 22:00:34 -0600 Message-ID: Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations To: Pedro Giffuni Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000e86aeb05ffa1535c" X-Rspamd-Queue-Id: 4Qw8GV1R9cz4FPS X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000e86aeb05ffa1535c Content-Type: text/plain; charset="UTF-8" On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni wrote: > Hmm ... > > Dragonfly has no armv7 or i386, so they didn't get it too wrong. > I guess the int64_t would be a quick fix or another option, which I was > consideirng, was to look at unsigning it but taking care of the edge cases > ... I was too lazy for that. > > Please go ahead and do the quick fix ;) > What makes you say it's a quick fix? If the calculations need 64 bits, int64_t is the proper data type. How is that analysis wrong? Also, it's tradition that you should fix it... Warner > Pedro. > > On Monday, July 3, 2023 at 10:12:13 PM GMT-5, Warner Losh > wrote: > > > This is a nope on armv7 and i386. So it has no effect there. DF got it > wrong. These should likely be int64_t to avoid the overflow. No? > > Warner > > On Mon, Jul 3, 2023, 9:08 PM Pedro F. Giffuni wrote: > > The branch main has been updated by pfg: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf > > commit 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf > Author: Pedro F. Giffuni > AuthorDate: 2023-07-03 02:32:10 +0000 > Commit: Pedro F. Giffuni > CommitDate: 2023-07-04 03:08:01 +0000 > > bin/date: Upgrade calculations > > Use long instead of int for numerous calculations, fixing a number of > date calculation overflow issues. > > Obtained from: DragonflyBSD > Git log: 4238ce6f0c6df33ce677ae298b245c62cd60fb43 (only partial) > --- > bin/date/vary.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/bin/date/vary.c b/bin/date/vary.c > index 5f0123110ee3..6f3c59950ecf 100644 > --- a/bin/date/vary.c > +++ b/bin/date/vary.c > @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); > #include "vary.h" > > struct trans { > - int val; > + long val; > const char *str; > }; > > @@ -52,7 +52,7 @@ static struct trans trans_wday[] = { > }; > > static char digits[] = "0123456789"; > -static int adjhour(struct tm *, char, int, int); > +static int adjhour(struct tm *, char, long, int); > > static int > domktime(struct tm *t, char type) > @@ -125,7 +125,7 @@ daysinmonth(const struct tm *t) > > > static int > -adjyear(struct tm *t, char type, int val, int mk) > +adjyear(struct tm *t, char type, long val, int mk) > { > switch (type) { > case '+': > @@ -146,7 +146,7 @@ adjyear(struct tm *t, char type, int val, int mk) > } > > static int > -adjmon(struct tm *t, char type, int val, int istext, int mk) > +adjmon(struct tm *t, char type, long val, int istext, int mk) > { > int lmdays; > > @@ -206,7 +206,7 @@ adjmon(struct tm *t, char type, int val, int istext, > int mk) > } > > static int > -adjday(struct tm *t, char type, int val, int mk) > +adjday(struct tm *t, char type, long val, int mk) > { > int lmdays; > > @@ -250,7 +250,7 @@ adjday(struct tm *t, char type, int val, int mk) > } > > static int > -adjwday(struct tm *t, char type, int val, int istext, int mk) > +adjwday(struct tm *t, char type, long val, int istext, int mk) > { > if (val < 0) > return 0; > @@ -286,7 +286,7 @@ adjwday(struct tm *t, char type, int val, int istext, > int mk) > } > > static int > -adjhour(struct tm *t, char type, int val, int mk) > +adjhour(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -331,7 +331,7 @@ adjhour(struct tm *t, char type, int val, int mk) > } > > static int > -adjmin(struct tm *t, char type, int val, int mk) > +adjmin(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -372,7 +372,7 @@ adjmin(struct tm *t, char type, int val, int mk) > } > > static int > -adjsec(struct tm *t, char type, int val, int mk) > +adjsec(struct tm *t, char type, long val, int mk) > { > if (val < 0) > return 0; > @@ -419,7 +419,7 @@ vary_apply(const struct vary *v, struct tm *t) > char which; > char *arg; > size_t len; > - int val; > + long val; > > for (; v; v = v->next) { > type = *v->arg; > > --000000000000e86aeb05ffa1535c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni <pfg@freebsd.org> wrote:
Hmm ...

Dragonfly has no armv7 or i386, so they didn't get it too wron= g.
I guess=C2=A0the = int64_t would be a quick fix or another option, which I was c= onsideirng, was to look at unsigning it but taking care of the edge cases .= .. I was too lazy for that.

Please go = ahead and do the quick fix ;)

What makes you say it's a qu= ick fix? If the calculations need 64 bits, int64_t is the proper data type.= How is that analysis wrong?

Also, it's tradition that you should fix it...

Warner


Pedro.

=20
=20
On Monday, July 3, 2023 at 10:12:13 PM GMT-5, Warner Lo= sh <imp@bsdimp.com> wrote:


This is a nope on armv7 and i386. So it has no effect there.= DF got it wrong. These should likely be int64_t to avoid the overflow. No?=

Warner

On Mon, Jul 3, 2023, 9:08 PM Pedro F. Giffuni <pfg@freebsd.org> wrote:
The = branch main has been updated by pfg:

URL: https://cgit.FreeBSD.org/src/commit/?id=3D4456846a1a0d8cb6d0e6b= ae89f1134fa0a1af5cf

commit 4456846a1a0d8cb6d0e6bae89f1134fa0a1af5cf
Author:=C2=A0 =C2=A0 =C2=A0Pedro F. Giffuni <pfg@FreeBSD.org>
AuthorDate: 2023-07-03 02:32:10 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Pedro F. Giffuni <pfg@FreeBSD.org>
CommitDate: 2023-07-04 03:08:01 +0000

=C2=A0 =C2=A0 bin/date: Upgrade calculations

=C2=A0 =C2=A0 Use long instead of int for numerous calculations, fixing a n= umber of
=C2=A0 =C2=A0 date calculation overflow issues.

=C2=A0 =C2=A0 Obtained from:=C2=A0 DragonflyBSD
=C2=A0 =C2=A0 Git log:=C2=A0 =C2=A0 =C2=A0 =C2=A0 4238ce6f0c6df33ce677ae298= b245c62cd60fb43 (only partial)
---
=C2=A0bin/date/vary.c | 20 ++++++++++----------
=C2=A01 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/bin/date/vary.c b/bin/date/vary.c
index 5f0123110ee3..6f3c59950ecf 100644
--- a/bin/date/vary.c
+++ b/bin/date/vary.c
@@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
=C2=A0#include "vary.h"

=C2=A0struct trans {
-=C2=A0 int val;
+=C2=A0 long val;
=C2=A0 =C2=A0const char *str;
=C2=A0};

@@ -52,7 +52,7 @@ static struct trans trans_wday[] =3D {
=C2=A0};

=C2=A0static char digits[] =3D "0123456789";
-static int adjhour(struct tm *, char, int, int);
+static int adjhour(struct tm *, char, long, int);

=C2=A0static int
=C2=A0domktime(struct tm *t, char type)
@@ -125,7 +125,7 @@ daysinmonth(const struct tm *t)


=C2=A0static int
-adjyear(struct tm *t, char type, int val, int mk)
+adjyear(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0switch (type) {
=C2=A0 =C2=A0 =C2=A0case '+':
@@ -146,7 +146,7 @@ adjyear(struct tm *t, char type, int val, int mk)
=C2=A0}

=C2=A0static int
-adjmon(struct tm *t, char type, int val, int istext, int mk)
+adjmon(struct tm *t, char type, long val, int istext, int mk)
=C2=A0{
=C2=A0 =C2=A0int lmdays;

@@ -206,7 +206,7 @@ adjmon(struct tm *t, char type, int val, int istext, in= t mk)
=C2=A0}

=C2=A0static int
-adjday(struct tm *t, char type, int val, int mk)
+adjday(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0int lmdays;

@@ -250,7 +250,7 @@ adjday(struct tm *t, char type, int val, int mk)
=C2=A0}

=C2=A0static int
-adjwday(struct tm *t, char type, int val, int istext, int mk)
+adjwday(struct tm *t, char type, long val, int istext, int mk)
=C2=A0{
=C2=A0 =C2=A0if (val < 0)
=C2=A0 =C2=A0 =C2=A0return 0;
@@ -286,7 +286,7 @@ adjwday(struct tm *t, char type, int val, int istext, i= nt mk)
=C2=A0}

=C2=A0static int
-adjhour(struct tm *t, char type, int val, int mk)
+adjhour(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0if (val < 0)
=C2=A0 =C2=A0 =C2=A0return 0;
@@ -331,7 +331,7 @@ adjhour(struct tm *t, char type, int val, int mk)
=C2=A0}

=C2=A0static int
-adjmin(struct tm *t, char type, int val, int mk)
+adjmin(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0if (val < 0)
=C2=A0 =C2=A0 =C2=A0return 0;
@@ -372,7 +372,7 @@ adjmin(struct tm *t, char type, int val, int mk)
=C2=A0}

=C2=A0static int
-adjsec(struct tm *t, char type, int val, int mk)
+adjsec(struct tm *t, char type, long val, int mk)
=C2=A0{
=C2=A0 =C2=A0if (val < 0)
=C2=A0 =C2=A0 =C2=A0return 0;
@@ -419,7 +419,7 @@ vary_apply(const struct vary *v, struct tm *t)
=C2=A0 =C2=A0char which;
=C2=A0 =C2=A0char *arg;
=C2=A0 =C2=A0size_t len;
-=C2=A0 int val;
+=C2=A0 long val;

=C2=A0 =C2=A0for (; v; v =3D v->next) {
=C2=A0 =C2=A0 =C2=A0type =3D *v->arg;
--000000000000e86aeb05ffa1535c-- From nobody Tue Jul 4 04:07:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw8Px1Z5Gz4ls0y for ; Tue, 4 Jul 2023 04:07:17 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from sonic305-20.consmr.mail.ne1.yahoo.com (sonic305-20.consmr.mail.ne1.yahoo.com [66.163.185.146]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qw8Pw63DGz4GTJ for ; Tue, 4 Jul 2023 04:07:16 +0000 (UTC) (envelope-from pfg@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688443634; bh=cdpvHP5/LX/plmr0TNOe8Kdt4gxh4FCZJ9ZatDM6xsQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=TiVCovbl454OVepULyLyyMNuzmJfjezoyhyJLLHuwKL/bxYt/nIY5cnxhAEO1GwHwyPUzfcKoHIfYlmBSeqdD3r6+Lxbu83IV+nzqaAaTV5Fu7nTMlI+Sn7iDOxRxjiFF4mOU4zpsFWW0O5+on/O2sLGj9XYuLMPQ8GWx6gHIUqZYYoZfIDIzV2lyhhcM2WKBam5MhC45dLyktQsDJUKfZlx0n/QFMny/+8GsLOO7NcyZ++5sZiMx5N7kEPeMomMydMyirDEkTK4H9NGeWM5Zh4Bl+KP2AhLKNIViZqn4+Dm/SPu+Ud3Xqc5J/NgJN/6SiPajl3eV06LZYHo/cNrrQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688443634; bh=Rs3XTjRjjKUr6P1ObhqA+C+iBS8YjRW3PrbYRBXXRqC=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=mZ3WAEOv6q4vm8taj/d1KvxAxG8BZz5WIXoc1YFlUeWcenakzCGjoWk/NUXNL83zfSRD+7bIxEzrLAhlQnsMkeQyp1QrQJfvs6Lv5VVVhDR1tDieAk5n3govDyel0HBqlaCzBeJfGUMQ2vsgmpaxpQPFGzKnrIFm3Tc7F3gUfsV2qRa0pBqstx4PCrg3Y9SHWbYAtcWNmkh5zJ4SuuqI1zo5WJnBpuACT1LPC3k0Ohz1GHskXTdjE6mi1h3AXJUAvSi8DaLm+j67lpuZuTuaArbdvGMvBMP2h9i5cQQPTKkkkJfpSv/TQxD7Y1Sleg4IZhvOqQoQRUoBkTebGWKuTA== X-YMail-OSG: VdmTaq0VM1lNEugXshnicnPEjIyOu9m7sGvUbGPq.UyJdwJvryJtuxDH4M8QrnJ dtbzqHIW2AouewbYfvsL2O5kIyD3uZKU99yO7j.CcPuUawBvR138KLpveeG1RpOiYpZrOr7ZQJtM tF6pn5CWcedYE.YviqlEbZ8ekDSy.x2ZR8XJtdOl_NZ3V5Zih6Wj3P1V9BRa_qTOc4ASpXS68cMH lakHqFqoZr6oFBEUc3i0rr.GUYVz1LxtLt5FH7s6bbvbpi2xOQWABtSwoWI7Dd5G22mLkss9JU8y _d2hHCM.rh.rbJg9KzZiQ8kDWTYd_wRC20OETkgcGRKubgKlbrm7RIRP5Ns1uqzlrxXOReW_wqd3 UE23oKVD9k1x5G0f2hR1HO5Urm5yom43ZEo5GkoZEf7XarEvakS.uoy82FQ0jLdQvSS1wIZtLxQ9 1YTp5HcRmFLeNTwA.L1IIpZtyqHHcTtqCdY.VkQTIus5r6tTKliDVHhFazbWa1UU14L8.o7hDAXz SjHjOjO4f1uzKC5_rwTvVwrSOjKdMgDcEWVzDpzY9B.XN5NMy0qrtKvHmNvsYqPAFylrD9YKch3O vvjoW2QQBuIu.eNAI9D1NX7OSAQOMwjGMylt2PXcLJRLNrQ2RFwoHyW7axvC2oWMLvnmUvatJ9eb T6ml6yjcY_mLQPCsev.JnRQ40X5SwLy0Pbgit_h_pPF1pnsJN0AYTbiafxQHPCsV.IlqBjK28343 XX0ocABtapxCW92QxyGVkcwFQEEZ2Yg32zf2aeRtib8pS22gtBV7MzMLF6BKIahpBOA9Kge77_BF ty7By.cWRklE7gsq8TeRsugCrxNiDvgIRwmnaxYVmvrbCU3TXuf4W4z6vwuGsxr.WNbhIfMEwtHS gDyrGet0UWNQwaA98Qz3fZpWYb_2dbRq6b1yoMYqYJFCcITtE_Zux5rGIB..aZ.hXBNjMYnw9gpe XE4v0E8_LCzEubEGTNo4qfsxBmKOK9kigH_OUuhTnY5HwCv5X4y0AafKHnCthVksuJWIbaivDOaF h4aU0aLOPzt.jOp2q1o5XhNijhU1Nmq_ZHT.ZOB2feMkDGe5WMt7GPHiFwnslDVgfTS4NgmGQAlK JAvD2QEGvOalW9Nlj1KdLqiDo.zRUvOPJ_EuxGGXrji.Nf8vwhF84SN5rUYILlfdHE_y9Zry6nt3 mNsCI0gOxFuOePv70WM0tetoQS7zqVatznSx6iB8lSV4izXPokiSUb4wyCvcm1eNWfYIIoHCtth. 5REK4QmOiTDrZerTuE.YBn.7YHUGQBjMPbk6RJyYQRlMFg0JCTAe_rE3N3bEm5TSsajVCdCuK2jT cI1OjfAulIJefRgHmAS_wkR510NXGK4zw20xRKANJ6R8fKbpuMnPhgniE1f9cKDg56WF_rnuvnrV IsWeZ25LLboeiM.VEGTTJtpExxyxoTHDE7VTxSBdoWSyjf7vREqLDbYY.rM3FLckAwC2ck.jQeXi fj951X3.x27mLtPZ41KLg1SnMkT33g0bcBYhNBb6ok1MZ6KmB3_Un4Us.mYx0uB81h6zlis44r7H VoHGQJgr_AlaI_br6kCCv36pB3qjQiunZguw7LL_7XxExI5x3kfSn0mYZVstnw9ljsToSqJS8X7a DJ3guyspjhlv0rznrTuT4OnTSuIqnuyq6YizWyK0yFdP5Q5YP0a5rKlKGNHEq5gQn2pzlsOEIGuy OI0fgyB.Xtg398KxdmXSP25QwnL0vMpbVP9hFIf0LMU.b3PyGc0kDGid0uLpfluVzwgfQ3oi4z6J m9MZZdeo.58OnpLS.Ra3onC.ERFFZ.fyn3mp036ZWZkebPJ4ZR2t3SdtxqV1RRGl80cJGJHP7cdN Z0wqqvrH9lZZZoJS2ugq9dKtBPgVF8Xd_JD.beNWgqkxB_ljB4Oil_Pcu_ZBrEZKUWrwqBDIZ4nU UDaakmXQZdAscamH5GCsQYIl074xCCXSuHpO2L0144HAbxUKcAUuW3G1PgfA.clW0W9ltGyyQ_Oz ttxrXjxuilnjF8NTc3HFh15RAdECo8hRlTc5ZohiasuBVnqI3_zgcbEZf4XZ.uKiuz6Y5xMam3mc AuzGgYtjm1jCJE_n85.3EWospyX1CCxUOHsgZ1t7qIVsPfvmpUAK1GkqIyyGxqb5p_YWTt0bQ0pN eO77E36OoJeL_FCKdgE6ee5SZn4fC6jbX X-Sonic-MF: X-Sonic-ID: a68c1913-c47d-4ca0-a729-7255f1b6d7fc Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Tue, 4 Jul 2023 04:07:14 +0000 Date: Tue, 4 Jul 2023 04:07:14 +0000 (UTC) From: Pedro Giffuni To: Warner Losh Cc: src-committers , "" , "" Message-ID: <1767168745.2134945.1688443634249@mail.yahoo.com> In-Reply-To: References: <202307040308.36438MTA093771@gitrepo.freebsd.org> <1037448433.54513.1688441647903@mail.yahoo.com> Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2134944_1918056855.1688443634248" X-Mailer: WebService/1.1.21612 YMailNorrin X-Rspamd-Queue-Id: 4Qw8Pw63DGz4GTJ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N ------=_Part_2134944_1918056855.1688443634248 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable (Sorry for top posting) Oh yes, the analysis is fine, and it is quicker to fix than what I had in m= ind. I'll take a look at fixing it now, but due to external issues I may have to= leave the fix for next weekend. Pedro. On Monday, July 3, 2023 at 11:00:51 PM GMT-5, Warner Losh wrote: =20 =20 =20 On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni wrote: Hmm ... Dragonfly has no armv7 or i386, so they didn't get it too wrong.I guess=C2= =A0the int64_t would be a quick fix or another option, which I was considei= rng, was to look at unsigning it but taking care of the edge cases ... I wa= s too lazy for that. Please go ahead and do the quick fix ;) What makes you say it's a quick fix? If the calculations need 64 bits, int6= 4_t is the proper data type. How is that analysis wrong? Also, it's tradition that you should fix it... Warner =20 ------=_Part_2134944_1918056855.1688443634248 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
(Sorry for top posting)

Oh yes, the analysis= is fine, and it is quicker to fix than what I had in mind.

I'll take a look at fixing it now, but due to external issues I may ha= ve to leave the fix for next weekend.

Pedro.


=20
=20
On Monday, July 3, 2023 at 11:00:51 PM GMT-5, Warner Lo= sh <imp@bsdimp.com> wrote:



O= n Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni <pfg@freebsd.org= > wrote:
Hmm ...

<= /div>
Dragonfly has no armv7 or i386, so they didn't get it= too wrong.
I guess the int64_t would be a quick fix or another option, = which I was consideirng, was to look at unsigning it but taking care of the= edge cases ... I was too lazy for that.

Please go ahead and do the quick fix ;)
=

What makes you = say it's a quick fix? If the calculations need 64 bits, int64_t is the prop= er data type. How is that analysis wrong?

Also, it's tradition that you should fix it...

Warner
------=_Part_2134944_1918056855.1688443634248-- From nobody Tue Jul 4 04:13:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw8YM70MDz4lvVl; Tue, 4 Jul 2023 04:13: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 4Qw8YM3Z0zz4Jvq; Tue, 4 Jul 2023 04:13:43 +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 ESMTP id GREgqJGX66NwhGXQ6qkAJo; Tue, 04 Jul 2023 04:13:42 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id GXQ4qQkGAHFsOGXQ5qPQLw; Tue, 04 Jul 2023 04:13:42 +0000 X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=64a39c76 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=ws7JD89P4LkA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=7Qk2ozbKAAAA:8 a=9nHnTFONeok8Fs7o54MA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=1lyxoWkJIXJV6VJUPhuM:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 44D3D4F28; Mon, 3 Jul 2023 21:13:40 -0700 (PDT) Received: from slippy (localhost [IPv6:::1]) by slippy.cwsent.com (Postfix) with ESMTP id 2F7D032E; Mon, 3 Jul 2023 21:13:40 -0700 (PDT) Date: Mon, 3 Jul 2023 21:13:40 -0700 From: Cy Schubert To: Pedro Giffuni Cc: Warner Losh , src-committers , "" , "" Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations Message-ID: <20230703211340.1a26d3fa@slippy> In-Reply-To: <1767168745.2134945.1688443634249@mail.yahoo.com> References: <202307040308.36438MTA093771@gitrepo.freebsd.org> <1037448433.54513.1688441647903@mail.yahoo.com> <1767168745.2134945.1688443634249@mail.yahoo.com> Organization: KOMQUATS X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-CMAE-Envelope: MS4xfE2mmXZwQNuIOXzbDtKA+WrW0jDhUps2loJdmzd+4qvSM8BmO+IRaI1p0cYEijk7XlPGEU5SQ/3YjUUoWpuUKrQY7Hq1k402bUGRYv8H+xmm/FhuBzsG G09MqUHdJlYYK3lBzIbTowH/+2Bg2uKu0qpOBLUMzxQyz1InTucYKzqnq4asWYFSlg3z5RFR+Hq8GXtY/mcY9xur/pb3qT+j7Vu3b5EzOBiMo0E+2im+v54g l3wSPhkpJGX52CLlJe2k7qZAmhsDJeUt9PkwBO+9MJKZ1Iolx7J3XJIgtj/m6hmDitQkuIImZ12VkxUvM7lXH3+kqBg8JQrJPHK/g9rMM0N02KQrGyJJ0Ag0 4qIYlXiD X-Rspamd-Queue-Id: 4Qw8YM3Z0zz4Jvq X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, 4 Jul 2023 04:07:14 +0000 (UTC) Pedro Giffuni wrote: > (Sorry for top posting) > Oh yes, the analysis is fine, and it is quicker to fix than what I had in= mind. > I'll take a look at fixing it now, but due to external issues I may have = to leave the fix for next weekend. > Pedro. You can't leave the tree broken for 5-7 days. Can you? --=20 Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=3D0 >=20 > On Monday, July 3, 2023 at 11:00:51 PM GMT-5, Warner Losh wrote: =20 > =20 > =20 >=20 > On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni wrote: >=20 > Hmm ... > Dragonfly has no armv7 or i386, so they didn't get it too wrong.I guess= =C2=A0the int64_t would be a quick fix or another option, which I was consi= deirng, was to look at unsigning it but taking care of the edge cases ... I= was too lazy for that. > Please go ahead and do the quick fix ;) >=20 > What makes you say it's a quick fix? If the calculations need 64 bits, in= t64_t is the proper data type. How is that analysis wrong? > Also, it's tradition that you should fix it... > Warner =20 From nobody Tue Jul 4 04:15:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw8c3176Lz4lwPQ for ; Tue, 4 Jul 2023 04:16:03 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from sonic320-21.consmr.mail.ne1.yahoo.com (sonic320-21.consmr.mail.ne1.yahoo.com [66.163.191.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qw8c249jKz4KY9 for ; Tue, 4 Jul 2023 04:16:02 +0000 (UTC) (envelope-from pfg@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688444160; bh=536fmTKDU6dI/oZ1KNf3LaAi5Tt2i3y8DniTuH0yy/I=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=Iem0G2fCTchszc7bbsqcaPDyUp3jW/Xp7FyuRQfnviIytUWZwEvIE2w/wla2nYZsgjIDg+8l7Kctqw031qUmOKbqtUFYrhw80U5jpPw0Ap33bzAgfPwgyXi7xAtVBbAkdNZOZ43Uv6gWAwYi/uoWxKc8jgrGWoY0I7dZtiO0oZIbjzP9ifEFDWupGeuRbBixYs4d+YnY3Z5HBZnv719bgXdu/rRW2Xoixz8htM3P8klICNN5Hi1gpivPW0RcNg4gjWbt6DTT9wl9jRiKPkrCo7t35/dtg9G35mVw3czAR3iz30eANozde4hSBkvPKEs+kR18IU5E5WlTisAYQffV6Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688444161; bh=GSnBLcqexLlkCZHj15gkJmEIJnyL0d5JImPJ3VtD7VL=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=hvZa5GakdsDVU3hdleGxaGi1fHzNlikLJR9f+TynF2ttmLKDOaWk7ku+glH6jUamEjX0K2+mR544ANkUIrBGNEtVNQNUZel7QE1nKh73lYnplBhY8kkU5ppoviIsiMlsftRT2CaAQoY3JF9jAeH9LPvUO3so8kFVym+uMaoqj1uQY6eWr7y6aXExpbm1gTky4wB/2izd7p/UT0j8agG4JnE+HCtbK1ps1OyRJ+6T0wGFKJgZQe3Hglkd45Ik9/PUAqsdfIAEpUe2EV0SZAfN5lW0wgZ3bvipE9XMAMAgluGsQNTBarZ1vj9M5uYS9yPCnwAGIXR78ynt8+BRnCrieQ== X-YMail-OSG: d5Hf0C8VM1n3uo9xwIvdsqwhcA.SfH7uodE9IAWOjBWH2pO7tjTxOKzw4a0v3ND s.gBnEoj3zq2JYahjKjg7rl28.__U_S6mvvrrX5It1WS9Vmpfl6CdE6pifnhe9inB7DIjdtfNaie R49_ng6wnZyIcOTT2g_IDZvPfjbjgOPx56OuIjAm0E_NOR.s..vkdmUG9Wa4zjxYeLyG.GJA2.o6 ug2fjQzqe1g.JDr6TLCFA8uPCZx50Rdw3vbjtUiBdJsqcOVgsx4VlB5Z9ss0TrjawGHA4J_RE.p7 zh0EqggxJlEcSVSbqJ5RekU1XCGnkHSRkjqMoQ2z6dXK5oGy9wgKCF00hkdbUjXOC.rjwt2Rt8GB 04wyHXEhLnCw4cusa3AILoGg4AHIodMvzl.SX7ChW.IAoR86IrQYwgqwWh4ZSoCBtRjPpHaFH3fs k6wE23kz5D1YaejTcynSZDBCe5bJKeIWOSz5tfh5sn6dsnkZb6ggsVr.7wBFZ_0Oj84isC9W9.EF 5Ev8888Ks9A54i1rkYp7ghowDWbPHxp.1t7vKX_8JmGskNiGS0EFbOVYCtnLHFwWMR3C3GPt_FlF 3Tdo066b2Y9n0AkVPKp8Y3MQiPCrhkpOLZcSeJzv7VFCgJwLJGa4jNgUkojInshTSgojOpypfSgM wFCMI4VkljVArl9qUZLDBUm9jWbQ3e1JZ6cBK8OOJHJEY94NH0OI0I2X86Tdx3z6tmZdxKZJam2H 05qI4Tln62pmMiH06MI3d0647_mbvmeTqj_eDr0Qm.WrwAsUT9YHwKmNQP4ORsLFMgvw9MyOqqhR .I3zWPY3utOQEtRJuhb_QEjhtqm.p0OmVd0egLjSOItx09sJfQMzjSjUX0QWD3IK9HaelBjTn1v3 0c1aYbCzBBL1_1jIPJgpLUvvED02qoQCroAGgRRBArV4mxp9TgxZ.maGQm0RoFbwEY13tZ55Acb5 A153OFAUAR5wnSKWn4gYar5texjNbpnEajaAP7bF5rfL.T5xA6tcEkvClzDVEvXlzvDhPJeAqcMp 1cleoLCwDjTgFycH5TPopwCU5xot7B1_P97ik6TyQOT1cVO2de7pRQmnu6yDK_YDIffzOK3tjNu4 YXNHbnVWegrKA.IjbDOcloegEcSB6AIV22om_KlgUyOT23Dz9OsXZTWbmt5Ed5qk3LCLOeMVBf3X VlT65p2fK2yrrOAR9azlFJmfFv_TKsJ6quM7aC7MVSKTyBtiEf6VT3nmae_OQlNZfgqYH0kaxt1r 4jx8MZdM1.UOtMS6BHhWmpYfxjMgvS5rGs8JfY1DViOcY7LCeaaUu3zRXFeFVkg4DP0j0AXYwdkS 2f1Z2I_46tXhB0gdXKDZySIqUodRoS8CrEEaxagY3Q1Jx87PrxSnV6ur_n84fMj.ufjwx.BobFCM iPtsb4sCmyy6t29mlUUUou5.wRqrcEl8hwUhqsJLuCBfxdFWktt9nJqoRP0GsRpRqIIwGB84fZ4c 44d7vY.Hf3w338c3lLC45j1vAQkLDj80geFNUGxRdExa1SIXY7RECH2nPjI2MZle5Ib5csfM9qi. an0bO33IPpBJ7WrPJ.PbnOeETZOT3UmhbPyALt9B4RpfDAsljd5Qz_BoL7Nq2mCR3K_7hsyUZPXD q6xRHQrjYQhbQc_VQvesD9_8Jwok6f3Mms5j5PGGsY_4JfzTgNJtsQFX6rccftNxYcx3vR1pOwe6 fBCfjukh.e.ZeAKfeoZYorI6LoSgtUqDbAV.IpR37sw8Umkzeegn80qAavK7iu2fL8Vtru_feEog Apabvt5bY481Qov.isd1k.Vs1LuFbUic8Q1naHmz.falov30HFmGfXlXt15zyEKP2PjZOMJGVTxK s0r2xE4_8rlFnJ_IaOspeQ7uMQlVQiDE2Z0ldzCfn0EFUGzr1xuYGezWGmoX4ZkiacP0o0aBSuHU KbSN_CD4s2bIhfL39UE7dZsytDx_lIYq7DaP7gxlSVeVOSh3_FM5zE0A_AJMX9FWdiplsXRxJ0V5 U_wYP.9l_wHTW4MQPrXzjyZkNifCrDndf0sU83kN2xi2aCR6Xe6bGOeiRX2Uq_XtCujDFwOomXMk ekazhTvy0mC30M_.stRXxGvszYdExhy0e239ZtCio3QKQve6R2n0gd0WzyWM.QBZFwNiJuqOHYx6 hboc_Wz5SLHh2RnW8V.aB3CZxaccfMvAHFA-- X-Sonic-MF: X-Sonic-ID: b475bfde-53f7-463b-b142-21aa09ca6f60 Received: from sonic.gate.mail.ne1.yahoo.com by sonic320.consmr.mail.ne1.yahoo.com with HTTP; Tue, 4 Jul 2023 04:16:00 +0000 Date: Tue, 4 Jul 2023 04:15:57 +0000 (UTC) From: Pedro Giffuni To: Cy Schubert Cc: Warner Losh , src-committers , "" , "" Message-ID: <1819984925.2142325.1688444157561@mail.yahoo.com> In-Reply-To: <20230703211340.1a26d3fa@slippy> References: <202307040308.36438MTA093771@gitrepo.freebsd.org> <1037448433.54513.1688441647903@mail.yahoo.com> <1767168745.2134945.1688443634249@mail.yahoo.com> <20230703211340.1a26d3fa@slippy> Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2142324_1520604610.1688444157560" X-Mailer: WebService/1.1.21612 YMailNorrin X-Rspamd-Queue-Id: 4Qw8c249jKz4KY9 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N ------=_Part_2142324_1520604610.1688444157560 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable It's not broken, ... but OK, I am working on it now. Pedro. On Monday, July 3, 2023 at 11:13:44 PM GMT-5, Cy Schubert wrote: =20 =20 On Tue, 4 Jul 2023 04:07:14 +0000 (UTC) Pedro Giffuni wrote: >=C2=A0 (Sorry for top posting) > Oh yes, the analysis is fine, and it is quicker to fix than what I had in= mind. > I'll take a look at fixing it now, but due to external issues I may have = to leave the fix for next weekend. > Pedro. You can't leave the tree broken for 5-7 days. Can you? --=20 Cheers, Cy Schubert FreeBSD UNIX:=C2=A0 =C2=A0 Web:=C2=A0 https://FreeBSD.org NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Web:=C2= =A0 https://nwtime.org =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 e^(i*pi)+1=3D0 >=20 >=C2=A0 =C2=A0 On Monday, July 3, 2023 at 11:00:51 PM GMT-5, Warner Losh wrote:=C2=A0=20 >=C2=A0=20 >=C2=A0=20 >=20 > On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni wrote: >=20 >=C2=A0 Hmm ... > Dragonfly has no armv7 or i386, so they didn't get it too wrong.I guess= =C2=A0the int64_t would be a quick fix or another option, which I was consi= deirng, was to look at unsigning it but taking care of the edge cases ... I= was too lazy for that. > Please go ahead and do the quick fix ;) >=20 > What makes you say it's a quick fix? If the calculations need 64 bits, in= t64_t is the proper data type. How is that analysis wrong? > Also, it's tradition that you should fix it... > Warner=C2=A0=20 =20 ------=_Part_2142324_1520604610.1688444157560 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It's not broken, ... but OK,= I am working on it now.

Pedro.

=20
=20
On Monday, July 3, 2023 at 11:13:44 PM GMT-5, Cy Schube= rt <cy.schubert@cschubert.com> wrote:


On Tue, 4 Jul 2023 04:07:14 +0000 (UT= C)
Pedro Giffuni <pfg@freebsd.org> wr= ote:

>  (Sorry for top posting= )
> Oh yes, the analysis is fine, and it is quicker to= fix than what I had in mind.
> I'll take a look at fi= xing it now, but due to external issues I may have to leave the fix for nex= t weekend.
> Pedro.

You can't leave the tree broken for 5-7 days. Can you?


--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <
cy@FreeBSD.org>  Web:  https://FreeBSD.org
N= TP:          <cy@nwtime.org>&nb= sp;   Web:  https://nwtime.org

            e^(i*= pi)+1=3D0


>
> =   On Monday, July 3, 2023 at 11:00:51 PM GMT-5, Warner Losh <imp@bsdimp.com> wrote: 


>
> O= n Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni <pfg@freebsd.org= > wrote:
>
>  Hmm ...> Dragonfly has no armv7 or i386, so they didn't get it = too wrong.I guess the int64_t would be a quick fix or another option, = which I was consideirng, was to look at unsigning it but taking care of the= edge cases ... I was too lazy for that.
> Please go a= head and do the quick fix ;)
>
>= What makes you say it's a quick fix? If the calculations need 64 bits, int= 64_t is the proper data type. How is that analysis wrong?
> Also, it's tradition that you should fix it...
>= Warner 

------=_Part_2142324_1520604610.1688444157560-- From nobody Tue Jul 4 04:36:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw94L39Ffz4l5RX for ; Tue, 4 Jul 2023 04:37:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qw94L2Mpfz4QRl for ; Tue, 4 Jul 2023 04:37:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-51d7e8dd118so6450887a12.1 for ; Mon, 03 Jul 2023 21:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1688445425; x=1691037425; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=i7qQrYasDz+wkhaew2eWKzH7KtnfuaUyugdjognILq0=; b=t8jfmq6eLsIuqKwqL+WaLCjm7O4JtaKDepUSI4Dx+hBcHuxk2KVoyTRL/Rk/Y0WXJa vX8jyyZL8sFXhEGYaIDvMXp1n0ZvBkRUMTE28NwdR9+zd9uESUim8uOM8QvDJxtfWuX0 hepz1OGfQ/n89cFufHuVOSef17ZnLBZgiTYZY9OAICplDDMtV6fncQ6Gc60dx9AqYTVZ +TaGGWEQs6e1h98T/czHVyosqk7Np5sw35M61yEGS87ZXCacX3bM4j+kXZEKk3niIdK6 6i86orCyQIWEuIL9E918T8qB1ALDObieHEFYhZmRmruB+uNbRWLoN8JBOxqAB6nHECR2 Xl6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688445425; x=1691037425; 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=i7qQrYasDz+wkhaew2eWKzH7KtnfuaUyugdjognILq0=; b=EFjdtcfyb4BvdPXcnNxvHvd4NDzmwEQhc8wGu6tGBUoHxypQulTtT55GhxjK+gGJJ1 12Dh4KRpwRwh4Ra8FIZS0EB0ZEwM06BJSwxHHiE6vI9GkM87lmncc7TSYuf0MwGp1nJb CTuoAooE+Wa8Nb+V6PDiZFxTa+obKajkzs9CkG3gpky+hB3r745nxpj3mmNBjK934gP/ GDW3ErPUSOZRfqEOWQsGpJhtBOAHHIZOFXRCOiZaHllHxydBk5xIGGrWws3gXJ9In0gb t2khzN5K2hEscHUaTHfEd3nXaEPaYfXkokdqhY8qWaK5Wa/Rnz1aCvjiYksRUlwzGLz2 zFGw== X-Gm-Message-State: ABy/qLZhBCEoBap9zWZJ9EeslYUWrVJeBXCWeIG46JLhvHSwXxU42oBP w02B7UEfpbcTAPrMdAOnxSUZblpDpxdlJ2CLM9kMUT6skim7tg3q X-Google-Smtp-Source: APBJJlHUodAmLzw446crzgboXFP6y7STqUBBMjSXbGV2fxFmodDUbKmcrkP/BaHHhh7E+mfA7JY9pazxWn67+i+wxhA= X-Received: by 2002:aa7:d78b:0:b0:51e:d60:b6b5 with SMTP id s11-20020aa7d78b000000b0051e0d60b6b5mr4062922edq.41.1688445424804; Mon, 03 Jul 2023 21:37:04 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202307040308.36438MTA093771@gitrepo.freebsd.org> <1037448433.54513.1688441647903@mail.yahoo.com> <1767168745.2134945.1688443634249@mail.yahoo.com> In-Reply-To: <1767168745.2134945.1688443634249@mail.yahoo.com> From: Warner Losh Date: Mon, 3 Jul 2023 22:36:53 -0600 Message-ID: Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations To: Pedro Giffuni Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000c4b79205ffa1d586" X-Rspamd-Queue-Id: 4Qw94L2Mpfz4QRl X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000c4b79205ffa1d586 Content-Type: text/plain; charset="UTF-8" On Mon, Jul 3, 2023, 10:07 PM Pedro Giffuni wrote: > (Sorry for top posting) > > Oh yes, the analysis is fine, and it is quicker to fix than what I had in > mind. > > I'll take a look at fixing it now, but due to external issues I may have > to leave the fix for next weekend. > Ah great. I'll not have time to fix this... thanks for taking care of this... sorry if i was a It grumpy... it's been a day... Warner Pedro. > > > On Monday, July 3, 2023 at 11:00:51 PM GMT-5, Warner Losh > wrote: > > > > > On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni wrote: > > Hmm ... > > Dragonfly has no armv7 or i386, so they didn't get it too wrong. > I guess the int64_t would be a quick fix or another option, which I was > consideirng, was to look at unsigning it but taking care of the edge cases > ... I was too lazy for that. > > Please go ahead and do the quick fix ;) > > > What makes you say it's a quick fix? If the calculations need 64 bits, > int64_t is the proper data type. How is that analysis wrong? > > Also, it's tradition that you should fix it... > > Warner > --000000000000c4b79205ffa1d586 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jul 3, 2023, 10:07 PM Pedro Giffuni <pfg@freebsd.org> wrote:
(Sorry for top posting)

Oh yes, the analysis is fine, and it is quicker to fix than what= I had in mind.

I'll t= ake a look at fixing it now, but due to external issues I may have to leave= the fix for next weekend.

Ah great. I'll not have time to= fix this... thanks for taking care of this... sorry if i was a It grumpy..= . it's been a day...

Warner

Pe= dro.


=20
=20
On Monday, July 3, 2023 at 11:00:51 PM GMT-5, Warner Lo= sh <imp@bsdimp.com> wrote:




On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni <p= fg@freebsd.org> wrote:
Hmm ...

<= /div>
Dragonfly has no armv7 or i386, so they didn't ge= t it too wrong.
I guess=C2=A0the int64_t would be a quick fix or another option, = which I was consideirng, was to look at unsigning it but taking care of the= edge cases ... I was too lazy for that.

Please go ahead and do the quick fix ;)
=

What makes you = say it's a quick fix? If the calculations need 64 bits, int64_t is the = proper data type. How is that analysis wrong?

=
Also, it's tradition that you should fix it...
Warner
--000000000000c4b79205ffa1d586-- From nobody Tue Jul 4 04:40:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw98168sCz4l6b5; Tue, 4 Jul 2023 04:40: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 4Qw98153S3z4RJH; Tue, 4 Jul 2023 04:40:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688445617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W5m9R3AxJy43ZM1ypKJuvRtMxCF4fPF4HrSQzcwLHn4=; b=FqryLog1ADRgfHombsdeLX3szgNneFbgkk1B6M0EXo4/RwkLLTYdiLMFq7qJ+WBzcFc69H KQDKbt4WSYUvU9kmij78oYpoOt5msLY+PRm2QCV8U9flVMDwMfR/fLy2Gn4Z2d7TjSZ/yO 6igGu3axBW2BNs6Kd1IyuHcULKEeWd2RSmTTifMIkmBw3zmfynqjAHwE4NB3ulSG6iT3WT 6sNg2C/yFxaKll9GpgXSsyvkMrVQPPmYVln+Oo59d2NglJjv0aGoM7ezNZw91iKiUuGrg1 jv+n8ITkLMUJDJpCvkF23LoSmtkpl2cadO1QRlD02PJnnFKPnF7zYsiy2d/hxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688445617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W5m9R3AxJy43ZM1ypKJuvRtMxCF4fPF4HrSQzcwLHn4=; b=jjRrjVQIKsYRY7D89M4FGmQzMK82ilcnLiUlD7EiV3akCkuMVJ3L7vpplq8ezDsdNUrd7S L0HFP5djTVkJ39Sv9kwfGUJRW/HeXyBSPeHyB8S+osxCfMgDOyaW+SCD+wKLOQRRGjWo4w 48FqxTgodVaCrn2nHxPyjtoPdsva5IyeIt9EUl1o9MehRKpBlfqKrs/pGRHwX8miwlafMd I3pJhARtvg4MBOeLyzUktcZAxfAGpYuG80BiJl/Je4OvnUsl79nqocLNVt/NfF3Ru2ci2k XB45xR05J0uPBYd2HIT+/NyeC2rPxNKm8TLFmzN4OW/HwDnbdPsUshY6hlhiIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688445617; a=rsa-sha256; cv=none; b=LrcqGOGgV7CdhXmEBkd9fbi+kh/Gzg2y/2LAJu5yya50AoaCD1n3EdH2lLTV0e5TjPM9y0 7dweCpSphH3RpxUS7byRK7znaDLNHciZePAz4IpC+uqcHIPffRfarSEX7TnKB9GfGa/u4w +ywBhB1wWpNMvjWiqqm78qAzZh4oUoyg6wca0in+0uYTdzQs16t1rrC9No1pPDJsDn2j0j rk99fIdofGadtZpvzw4E5eXBKrBAa8EdyJQXt5uk992hrER8A62Q/kB/R13M//bru0EAnN z8yX5MjXi+xMKZwpIwtpmZc2P4Y02AqSog5oQt45jPAsXSb6s5lLjJcjHDDegQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qw9813WvWzJQv; Tue, 4 Jul 2023 04:40: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 3644eHot051110; Tue, 4 Jul 2023 04:40:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3644eHqf051107; Tue, 4 Jul 2023 04:40:17 GMT (envelope-from git) Date: Tue, 4 Jul 2023 04:40:17 GMT Message-Id: <202307040440.3644eHqf051107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: 4ef3964b5f85 - main - bin/date: Upgrade calculations (take 2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ef3964b5f85f162c3a1bef5eeb5f18c253f08ad Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=4ef3964b5f85f162c3a1bef5eeb5f18c253f08ad commit 4ef3964b5f85f162c3a1bef5eeb5f18c253f08ad Author: Pedro F. Giffuni AuthorDate: 2023-07-04 04:39:00 +0000 Commit: Pedro F. Giffuni CommitDate: 2023-07-04 04:39:00 +0000 bin/date: Upgrade calculations (take 2) Use uint64_t instead of long, as this type is not correct for platforms like i386 or armv7. Pointed out by: imp --- bin/date/vary.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/bin/date/vary.c b/bin/date/vary.c index 6f3c59950ecf..a067489bb728 100644 --- a/bin/date/vary.c +++ b/bin/date/vary.c @@ -29,12 +29,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include "vary.h" struct trans { - long val; + int64_t val; const char *str; }; @@ -52,7 +53,7 @@ static struct trans trans_wday[] = { }; static char digits[] = "0123456789"; -static int adjhour(struct tm *, char, long, int); +static int adjhour(struct tm *, char, int64_t, int); static int domktime(struct tm *t, char type) @@ -125,7 +126,7 @@ daysinmonth(const struct tm *t) static int -adjyear(struct tm *t, char type, long val, int mk) +adjyear(struct tm *t, char type, int64_t val, int mk) { switch (type) { case '+': @@ -146,7 +147,7 @@ adjyear(struct tm *t, char type, long val, int mk) } static int -adjmon(struct tm *t, char type, long val, int istext, int mk) +adjmon(struct tm *t, char type, int64_t val, int istext, int mk) { int lmdays; @@ -206,7 +207,7 @@ adjmon(struct tm *t, char type, long val, int istext, int mk) } static int -adjday(struct tm *t, char type, long val, int mk) +adjday(struct tm *t, char type, int64_t val, int mk) { int lmdays; @@ -250,7 +251,7 @@ adjday(struct tm *t, char type, long val, int mk) } static int -adjwday(struct tm *t, char type, long val, int istext, int mk) +adjwday(struct tm *t, char type, int64_t val, int istext, int mk) { if (val < 0) return 0; @@ -286,7 +287,7 @@ adjwday(struct tm *t, char type, long val, int istext, int mk) } static int -adjhour(struct tm *t, char type, long val, int mk) +adjhour(struct tm *t, char type, int64_t val, int mk) { if (val < 0) return 0; @@ -331,7 +332,7 @@ adjhour(struct tm *t, char type, long val, int mk) } static int -adjmin(struct tm *t, char type, long val, int mk) +adjmin(struct tm *t, char type, int64_t val, int mk) { if (val < 0) return 0; @@ -372,7 +373,7 @@ adjmin(struct tm *t, char type, long val, int mk) } static int -adjsec(struct tm *t, char type, long val, int mk) +adjsec(struct tm *t, char type, int64_t val, int mk) { if (val < 0) return 0; @@ -419,7 +420,7 @@ vary_apply(const struct vary *v, struct tm *t) char which; char *arg; size_t len; - long val; + int64_t val; for (; v; v = v->next) { type = *v->arg; From nobody Tue Jul 4 04:49:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qw9Lj0Mwfz4lB4k for ; Tue, 4 Jul 2023 04:49:33 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from sonic316-22.consmr.mail.ne1.yahoo.com (sonic316-22.consmr.mail.ne1.yahoo.com [66.163.187.148]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qw9Lh35VXz4T5m for ; Tue, 4 Jul 2023 04:49:32 +0000 (UTC) (envelope-from pfg@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688446170; bh=a+Oe5hpQpzqqgLB0R/p4IRkkilH/sJDHikIqns41MBs=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=OnegpoQqxoyxE8CrCQc2JlRWkzYWMk9ITDGim/S6WD6E6kul035KDW93QOYN0A2taOOwaQhxlVtBqGRubH0qeLg/gg2mgMsdiBmsU2ZK6ENJPYtcS2y8RoAE9xO5cbkXoZoC+GOr87m/BXxbaNzveffie1E+jwn1gs7zXkU3m3D3TBguWhG2EPESk4lQlxzzE30tVvrDn6kW2uDhCsfe7/kXiv8fuZ5GjiYdmPqqvbhp+T+nFbluyiZ2pz3Xp0hTBjCqoaYetbqY3MoVSC/V4L+JnWY4MSzabApqXzwps2IK+E7MeIMuhjVdDZWpxQogAiQLigc/1QCb2ReDkJT9cw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688446170; bh=3eBV8csMWyfM1RDDE9s4vbMdn34Z+Lac96zK+vbbH3U=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=LC4+N9GYGlwKQxxap41BULjEVQ00Wj977TmeHvwsL+a2ETzrGKCu0VqJLr0/b/EO9QoToIDhZEvRgh0L1m8Z11xdKHjWkRlYZPqNKlAmSSquTLED+G0roNI6yP+InQH+GDOfpiwul6+eQN1MINSeeWDvQoxwW6GTPQInvSphjDpvNECMrm6jAlxWATH+iSGMuOSRH4kFm+aVfe8GWtLWJJS4qu1uNPLUCpYNwiBVPYmoiMyPjUjRH3qgXLXx6YHTvDAQoqNcKDl5hOp+u8ZqsLNRRnPWdPZ0Bz4ztS2v+smUP/2pGMQB7mDaBCsuMttA5Q3TDHnQeijaSfAc7qvBsQ== X-YMail-OSG: puuekZwVM1lyOVc2cUFTFsdw94j1sEs7UbZXzNkE3huHzAP3548tIaXjkHW02Qq yupecsGrLv5d98gXw.75Zr_OJdc7jG3LuWQW7YNGaivySRhzDMYtGLV4wn6EBY50am7rNs1hX01D Bhb_DUOEAQ1sD6PqdEl.fzn6ka7dFT1nW4Pxa3LLhj4ofvtQrCRf3Uf6qxxf3ZEayHe7BJuI9PNr L19UL0RvKF3ks_yjQq.LAUFrhrQ5.IHTnv4OUZ6WHralqAxHbM1JMgki9TPJqCyvBFvy3rJKVvo2 3FzSCFezw1tROfyeFybm5pzjDkbqlXduXT27prBzrQLJ79ZqBK9IKl0okxWacT_Cf2JZXzTzWAVC mb5ebnX3dbHF6kl7_peJ_KmCQMwJvEnAuRgASPTEDvKpg.cTIMFhR74dDsILTlkitiK.jDq1TrfZ F_gH8E4Dy8XJqLn.MsBGylteEFF9xtDnslDTRW4.lAB5GaxxVZeNGXVAnHd4gSZtnNjnAcUxZDlQ kNW.AVLkyZ4Yxx78XOIQGYz7nw8i1QeF8jrmrpe7Wo0KzY.mPeTVCLNqQyj41c01GEPugID3TXpW HgN2R8MzsdVNaOEcGb3CvpX4Sm22VPURQdepO9ih_jfC1nRKJHq8SyrcGKR158HwJxPEMuxzNxu5 bEiI9CsGLrILVhEolQLHGhbaDw_Wy2t2RvNf9HahjV420FKlrN5goPSLQyB2LmmeeuM.41AABYA6 GYNU456i3LTA2WGpJrxyB2awBHVl8414LND8c8nY5puVjXUn7quVq3900w3JMNXq9.Fxe1pGtaWe YWGsRDNxAYddALrjX4XPlKhTdMM9od8L6PPT.PjBKGZptyTHqbAlaX37lhlx0MKfH4993r.8bxSy zPp5RRITNQ8j2oGRTZrPAKlovRxrdgXLox5gQLWLYynVsIKmoaxJRpAyU.PGanjzS256isnrMSIz PVa2P7t5nsqcQZyTVLU3yeiR8yq.8ayi4FFigfpDTB3quV1bkWByKKXHow4y.3eZ5RzmWfLesDoz pp1ye4uFWyMnp6hTbs38ylgwMrADcWlwmdnmPADPMJ5opBUuHsZv3P5QKbl50uohmaAQdJ.LCV8p As_TDBZTy.7yAcoKfRxhF4ZZozNUIdBKhwKxfKfz4AsrGEVa8T0cs1O6dKp3LyGtKMCicskTyJVE IcQyQoqu9w.ETGYT9xX2m.wDgmaPpKKXTuom67XMSAiAECa5SwoWiY9OI1gavNV7lK42Ll42Lh3c UqUNbI0B1zVHKqKJVSAkCvMa7Vs6_2ZY5M2xuTf7mYwyMeSjkz5yjSIcdGJ.jBSdYDafQSnT2s.C eFSf0IU28NuSa2MIwfJseXvfgqqdtIHEroNEEq.9XcX762357NEsoHqq2wqLcBVrz6tSHfPmnX0I RCfbt_6EyhcUu2F7vlnfa98ZbxadRy_bruFUChO8K5pAGPJP7JrahQ37mwQ7fZKapiPzPmfjxraY 1TuC9iV.nl2d0axBG7e0Xc7Q_bMpfDK1e.9M569uLPEW7F_EYjFZYGZLnhiX4FIau.SgzfiW0Svi sUwQFQODkYZKhIYZCGtwHquLGROrT5JVfi6Mv8SqKn40OZ80zUl3Sl64L1jM.zN0R0mTkApCkK3o j8Ca2dP1VQvuaW3nEAg0yQN5ycGDSbuKah81eGLT3vmtvwtz7b7oAEKjrRhoxJFcwUOCyzhjPxrz FLUJ0Wu02QRns5sE4dWuu5N5ovTiYhmDNMdtLVG4wrC7vA3yQwMlICvVTaPBAMN8E0wo3m4fdwNT 5xcz5Nf.NU9xUrRthQvIWd_eFerL.oi6h1srH.cSDQ0j5wqEII8xoJh4Yi1CZkOQ.lvXwIpREuv. X02Gf5yweXqw37wotrehCPh9shbpIbq8hqLzMatOSySHgUu5AB4VlEGpkk2TD55othlrPur18fJm Y52aQz9nnTGf4iPvMRkbY4sRYLaKI4e56PFPf8OdNM4NrYtkhv53HN8NqBewCPib.voaFM4wAe76 mAyV5Tt9SCpu7cDPCCvmCBfLNghCpQaaf5L8mA1xilXlHzBOl3upgadLMwl9Jm4sZuAWxTusRIJW OA1CDFk0WxpcMkx1YX6DtNjele_KCdV4jh1hs4TRVGVgP5D2KeLyFhH..WjJSJZs6KasLEKkQ8BI ZR2iETd9QO3DRf_TL0uIbaLMQgpN2OnbB1X0AmjAbBA-- X-Sonic-MF: X-Sonic-ID: f7847eea-183f-46a3-9420-87ee8c95fb0c Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Tue, 4 Jul 2023 04:49:30 +0000 Date: Tue, 4 Jul 2023 04:49:27 +0000 (UTC) From: Pedro Giffuni To: Warner Losh Cc: src-committers , "" , "" Message-ID: <518821019.2139852.1688446167878@mail.yahoo.com> In-Reply-To: References: <202307040308.36438MTA093771@gitrepo.freebsd.org> <1037448433.54513.1688441647903@mail.yahoo.com> <1767168745.2134945.1688443634249@mail.yahoo.com> Subject: Re: git: 4456846a1a0d - main - bin/date: Upgrade calculations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2139851_1304661400.1688446167877" X-Mailer: WebService/1.1.21612 YMailNorrin X-Rspamd-Queue-Id: 4Qw9Lh35VXz4T5m X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N ------=_Part_2139851_1304661400.1688446167877 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable OK done .. and you are right .. the fix was my responsibility .. if I didn= 't have the time to complete it I should have left it for a while longer in= my disk :-(. For the record, Dragonfly added incomplete support for the GNU -d option, b= ut I didn't find that interesting, and I have no plans to merge that. Pedro. On Monday, July 3, 2023 at 11:37:08 PM GMT-5, Warner Losh wrote: =20 =20 =20 On Mon, Jul 3, 2023, 10:07 PM Pedro Giffuni wrote: (Sorry for top posting) Oh yes, the analysis is fine, and it is quicker to fix than what I had in m= ind. I'll take a look at fixing it now, but due to external issues I may have to= leave the fix for next weekend. Ah great. I'll not have time to fix this... thanks for taking care of this.= .. sorry if i was a It grumpy... it's been a day... Warner Pedro. On Monday, July 3, 2023 at 11:00:51 PM GMT-5, Warner Losh wrote: =20 =20 =20 On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni wrote: Hmm ... Dragonfly has no armv7 or i386, so they didn't get it too wrong.I guess=C2= =A0the int64_t would be a quick fix or another option, which I was considei= rng, was to look at unsigning it but taking care of the edge cases ... I wa= s too lazy for that. Please go ahead and do the quick fix ;) What makes you say it's a quick fix? If the calculations need 64 bits, int6= 4_t is the proper data type. How is that analysis wrong? Also, it's tradition that you should fix it... Warner =20 =20 ------=_Part_2139851_1304661400.1688446167877 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
OK done .. and you are right= .. the fix was my responsibility .. if I didn't have the time to complete = it I should have left it for a while longer in my disk :-(.

For the record, Dragonfly added incomplete support for the GNU -d opti= on, but I didn't find that interesting, and I have no plans to merge that.<= /div>

Pedro.

=20
=20
On Monday, July 3, 2023 at 11:37:08 PM GMT-5, Warner Lo= sh <imp@bsdimp.com> wrote:






=20




On Mon, Jul 3, 2023, 9:34 PM Pedro Giffuni <= ;pfg@freebsd.org> wrote:
Hmm ...

<= /div>
Dragonfly has no armv7 or i386, so they didn't get it= too wrong.
I guess the int64_t would be a quick fix or another option, = which I was consideirng, was to look at unsigning it but taking care of the= edge cases ... I was too lazy for that.

Please go ahead and do the quick fix ;)
=

What makes you = say it's a quick fix? If the calculations need 64 bits, int64_t is the prop= er data type. How is that analysis wrong?

Also, it's tradition that you should fix it...

Warner
------=_Part_2139851_1304661400.1688446167877-- From nobody Tue Jul 4 12:41:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwMqG3fkGz4lJDp; Tue, 4 Jul 2023 12:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwMqG2ScDz43fc; Tue, 4 Jul 2023 12:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688474490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w/AEwCISP6jF13U7dqdxuqbhkaSUmQaeCVG69fywyHQ=; b=LxH/CacfngqdBFwyReqt/1KKlqCI0wkmSEdeg/qZ4OaCkUn+pVMhQsfrnc149QGOLsuHEA +jR8WUa9EPVQzjq9dlCpeSmDvE0R0vqsucQjOkyOWJXslpZK3nlry23RIKDs5NEjfCZqEH 4vp8udcAYIQxWIsLkrQjAC2pKlnbdSGSvDolY20QngSoYFBApG4zc0J3jxRm1DgV+lRTVR jMx7ICFx4n6rbkc9ABLzBlRMgmJ5pM7Qm6eUBi/0jb/GhAArUZNU2QjhnBYXP1g0U2EBKa 0hzrZRspZagIUS6TjnC+06iEl2B/FwjMbB1VO6CfHH5zMLCp0X7KF+2/W0E/mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688474490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w/AEwCISP6jF13U7dqdxuqbhkaSUmQaeCVG69fywyHQ=; b=s9F/ZU8CEWpOC49yfx5x8W+KhU9raEvbeNa8lm3WeCC2CdDpDvyET5CuRpAruMT8KziMad N5TonWSkgdL/H+ms+KG7qgGGcIMcLBsmojyI6IPYjHA/XPI0K2ZIhiFJr8DezJ5ObKMz88 erKeD0qbb8THOoKJp3LZCWc0YHw+WbOSDjHNZS+rsOkp/5RbixukCpZ2/ru2Aikqaav3In k2UaH26SiKe4qrMA1HH+sWOmwsjyvqgfS+vBy/v33Xs1T4CBq5LatiyPGcOcNY8f3Mlt62 EkLvtNjmFQ1SHwzzVC4Gz29wdfzWwmqMpts6pQ8HJfSU0jV4vKrU9Re/Q2rw0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688474490; a=rsa-sha256; cv=none; b=mT58ePZvqrgjWZNJPkMMVA1JEwes57CNGAT5kPl/b68/A4Bm3ivWu7Mbsco3Tes7p48OtI bkwngBXJFb4S6A2yZny08xX3W3dX8Dj/bLqujbtEnIy9iSA2vx3M9RSHbUUhwpk0TYrpCq 6g7qVa8n7RxcEBfUfJ09Y2nmdGpon5OAPRIDZFx7B/ktZFEWcpFq+h1MX4UvInu6rnFdd7 DH75nT9ApkvY/PEKQ4qtZ7rXHV/s5X/8MkvsSr62ulp7NPDfD1Rr5Itku2WU8Rhm/GWVUB PwUocwHzowNq+CVjxkoPRSqgOSFFIH5BEqUaOobTpX4/4t65nHU4KHxYPNF6jQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwMqG1WZ8zY02; Tue, 4 Jul 2023 12:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 364CfUCG048054; Tue, 4 Jul 2023 12:41:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364CfUpx048053; Tue, 4 Jul 2023 12:41:30 GMT (envelope-from git) Date: Tue, 4 Jul 2023 12:41:30 GMT Message-Id: <202307041241.364CfUpx048053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 4c20e26e26ec - stable/13 - syscalls: fix modspecific_t stack content leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4c20e26e26ec33664475900de028c9e77bffd8bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=4c20e26e26ec33664475900de028c9e77bffd8bf commit 4c20e26e26ec33664475900de028c9e77bffd8bf Author: Ka Ho Ng AuthorDate: 2023-06-27 19:33:46 +0000 Commit: Ka Ho Ng CommitDate: 2023-07-04 12:41:07 +0000 syscalls: fix modspecific_t stack content leak Zero-initialize the whole modspecific_t so that there would not be kernel stack content leak in the unused part. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D40815 (cherry picked from commit 2cab2d43b83bddd44ecc1f267afb5e2725975ac7) --- sys/kern/kern_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c index b4fec879708a..fa1df225ee3b 100644 --- a/sys/kern/kern_syscalls.c +++ b/sys/kern/kern_syscalls.c @@ -173,7 +173,7 @@ kern_syscall_module_handler(struct sysent *sysents, struct module *mod, int what, void *arg) { struct syscall_module_data *data = arg; - modspecific_t ms; + modspecific_t ms = { 0 }; int error; switch (what) { From nobody Tue Jul 4 12:53:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwN4j0RxWz4lPf4; Tue, 4 Jul 2023 12:53:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwN4h6DGpz463p; Tue, 4 Jul 2023 12:53:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688475188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B68Mbnr3RJTqbeEcP4ClHgbAaPhYyHipyd60bcS/Ufo=; b=PUMrwiGcDLbe/WvbtQ9qu29XZvSvhwTwt7EsKnlvi9PRuR/fGRDMO/uCL4XhKj7wjcIDAO XyGip9Y6wSj/mSCfuBnwHWNmY8R/V/EE8T8fY4MnxtdoizpapodzwpVC4t16tAI3KFrOtu Sj5P5eafhy6ItxK+INp7w/RyTXwEI4pWnE/lat0DsvOjgXfHTajTY/zGrv6k6BHg8pAz6I 8QKyHFbLIuvTtg7ycdPBm9WeFp6rfoWFboSIySjx9TbbzAFwISR4lNntBAyovD2ybB3Gnw St1stuGaFIz5MxqvBGwZYe9ITx5IG7tuLIoT8x269i7AaIpSG8+E5AADbmgyTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688475188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B68Mbnr3RJTqbeEcP4ClHgbAaPhYyHipyd60bcS/Ufo=; b=AHiuWlZlTWOCwRvV56D/QBdJ15YphInrm8Ho/1rpp6Zjn9aum3+YdeM/4SZkeRekoY1150 GOE7J6PF7HNgaxD7Sk2heXDNW5vNjiSSFrdE1Xv1MC4r9YqXPPALdOSw5il2bjam/DvTOn zpdhgZWB3JWHXQOaurov2NOLACWIfWN6T3p96WKnaOfuRhuuYri1lvQG0X03UaVhwobG1n VMorVM/XXbnCf6CNI25IFAkvRSj6xtK8nUc3J5nO7brnsWpfKOUoKASNckgL46IidK2lNY 25yheCwt6NNegr+cjtqHc4Mn4aAEBngOTAMJK17xysLIPOS0/yvpQY6EvuPnTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688475188; a=rsa-sha256; cv=none; b=GuCIXcBKPtSJYJRds58zX3v6GtIrj7zgYTU2f7+sF23iHUKld9ayIkxY1GHblk93DflaB6 C+u0IatWdTCZP8kRnbqLjSiZrJGuzBPlzq7iSCrg/ibxZZUNAaAV9JCYER2g8fC570JvJn Jxf1XnwbZOz4jDEY+v/c+JoS9Vg9oiDA9qXjE+tVctFy5UnfTnWWdfvrfMzxXUeNmMTBMD G53WBX2VKHSYOmUXh0g8ERaobOCWTrEPHk3xgnN5p/gIcKK01vAK1a7iWNEHGBnEjCyiAZ q0O0OiN7Oe9tkdgSlHF4ZdkjFTBE2hA+azG7MBpAHSbH4l92W0m86ddm0xy0dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwN4h5J9nzY8D; Tue, 4 Jul 2023 12:53: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 364Cr88K067007; Tue, 4 Jul 2023 12:53:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Cr82H067006; Tue, 4 Jul 2023 12:53:08 GMT (envelope-from git) Date: Tue, 4 Jul 2023 12:53:08 GMT Message-Id: <202307041253.364Cr82H067006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 2d148ce84d29 - stable/12 - syscalls: fix modspecific_t stack content leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2d148ce84d29321f5f1a0ccb405c5238f5859005 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=2d148ce84d29321f5f1a0ccb405c5238f5859005 commit 2d148ce84d29321f5f1a0ccb405c5238f5859005 Author: Ka Ho Ng AuthorDate: 2023-06-27 19:33:46 +0000 Commit: Ka Ho Ng CommitDate: 2023-07-04 12:52:50 +0000 syscalls: fix modspecific_t stack content leak Zero-initialize the whole modspecific_t so that there would not be kernel stack content leak in the unused part. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D40815 (cherry picked from commit 2cab2d43b83bddd44ecc1f267afb5e2725975ac7) --- sys/kern/kern_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c index 035e169bbe0e..0af8e18890c8 100644 --- a/sys/kern/kern_syscalls.c +++ b/sys/kern/kern_syscalls.c @@ -164,7 +164,7 @@ kern_syscall_module_handler(struct sysent *sysents, struct module *mod, int what, void *arg) { struct syscall_module_data *data = arg; - modspecific_t ms; + modspecific_t ms = { 0 }; int error; switch (what) { From nobody Tue Jul 4 14:00:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwPZ26VWLz4l6Zl; Tue, 4 Jul 2023 14:00: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 4QwPZ25nQNz3Cjv; Tue, 4 Jul 2023 14:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688479210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z5ekxNPrVC1LTJJ87M6wzC/naXCObwE/2xu7kt9ruH8=; b=Rg1+I/gvdyjhvZKTn3RcNGs1Yvw7z1bu+rRG4Cij1gxOvlcOgOKsFhyYKeIZGc2arIE/hC YTZe1rqtPtuUKpJc1jJ63OL4txBjhMVSzOupUm6auKan0G59DbHQy2waDh+hoDtQVM7npW pDMdqAsgd38Z8U//Mnxr1gH2t4c3eLQevjaL/gzNirkuHoJW3KkKESE/SBk2si+FARdHHr /pZDkz4J298plZslj5Bz3uQqVDUIhOI0gEVl8gWJhM0pzDboGAO5VcvT5DivIT/3Blr8PJ IoomTM8Pj5+fON4wI9CicBfGdDP9xKBxRrtLYFnlfCNvnbxwbKFn9lJRH28srA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688479210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z5ekxNPrVC1LTJJ87M6wzC/naXCObwE/2xu7kt9ruH8=; b=OKb3hbEWbMBrljoHm0lhjAbNyN04NZDTNs3V/5TnfSOqvdHCUrHBO4eWzyX/49iBq8vNkU dk3hF1hgq779NCNToXZjev63dizwBy3TZg2e/9RF96d7VyTbgdlmFSLnaxTsyMKrag1737 KVP4UI6109xeQ5MFQRmAdTatuMu+CpfEuArr6tQO1ZwnVCBFau2AVrc02qy6H7RJoWZ9OL 4uMq9yYPn89wdak7hOPGErM0wKuz2l+coUSdZLP3UJE+nG+6e1+v0zK4u7NmdE0HmDKZjv 9G0ucB53PBQMhOHfJhOqJjZfH9VT2efdR5R9bc8UpYvdlO+6feFdEvGD5KDS6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688479210; a=rsa-sha256; cv=none; b=TX6xg43omoPWMtsXNGUE29+xgk+/j+QdFxz7owiqSLRZzB/RcnR+MS4VYDecZvX4w3HFSf jzr8D6kRoG5JAjfIUoK1zlURz2fiyIyaK5ez5NMvQ6uVR3yOtOpfJDw5KWG7/sMkrgusBT or2DgcutUhr6ezNoF0NsPZb2A1HuHq4rqj8GJCNPe3M8DCUV1laQVpIkRiVgXJHbGho8MF 2/2aRk02GdtYPinYvuTdKgpGBNFryLyhM9079jfFqvJ2UG/FE88obpbs7yH65S9/hkKL8e RPB24XSCQCvHRMsENcutydW2Z6fLnKbRw+ilJ7nkFWzPQTsydu5F1QO6RzTY4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwPZ24hrnzbNP; Tue, 4 Jul 2023 14:00: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 364E0Anw071476; Tue, 4 Jul 2023 14:00:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364E0AGM071474; Tue, 4 Jul 2023 14:00:10 GMT (envelope-from git) Date: Tue, 4 Jul 2023 14:00:10 GMT Message-Id: <202307041400.364E0AGM071474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: b9e80b5280b7 - main - ena: Initialize statistics before the interface is available List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9e80b5280b75f2c641d680245df44b8ff26a7b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=b9e80b5280b75f2c641d680245df44b8ff26a7b0 commit b9e80b5280b75f2c641d680245df44b8ff26a7b0 Author: Osama Abboud AuthorDate: 2023-01-18 13:19:07 +0000 Commit: Marcin Wojtas CommitDate: 2023-07-04 13:51:16 +0000 ena: Initialize statistics before the interface is available In [1], the FBSD community exposed a bug in the fbsd/ena driver. Bug description: ---------------- Current function call order is as follows: 1. ena_attach() 1.1. ena_setup_ifnet() 1.1.1. Registration of ena_get_counter() 1.1.2. ether_ifattach(ifp, adapter->mac_addr); 1.2. Statistics allocation and initialization. At point 1.1.2, when ether_ifattach() returns, the interface is available, and stats can be read before they are allocated, leading to kernel panic. Also fixed a potential memory leak by freeing the stats since they were not freed in case the following calls failed. Fix: ---- This commit moves the statistics allocation and initialization to happen before ena_setup_ifnet() [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268934 Fixes: 9b8d05b8ac78 ("Add support for Amazon Elastic Network Adapter (ENA) NIC") Fixes: 30217e2dff10 ("Rework counting of hardware statistics in ENA driver") MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index a4762ce9ebb1..a62b99d5ee1b 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3479,6 +3479,15 @@ ena_reset_task(void *arg, int pending) ENA_LOCK_UNLOCK(); } +static void +ena_free_stats(struct ena_adapter *adapter) +{ + ena_free_counters((counter_u64_t *)&adapter->hw_stats, + sizeof(struct ena_hw_stats)); + ena_free_counters((counter_u64_t *)&adapter->dev_stats, + sizeof(struct ena_stats_dev)); + +} /** * ena_attach - Device Initialization Routine * @pdev: device information struct @@ -3656,6 +3665,13 @@ ena_attach(device_t pdev) /* initialize rings basic information */ ena_init_io_rings(adapter); + /* Initialize statistics */ + ena_alloc_counters((counter_u64_t *)&adapter->dev_stats, + sizeof(struct ena_stats_dev)); + ena_alloc_counters((counter_u64_t *)&adapter->hw_stats, + sizeof(struct ena_hw_stats)); + ena_sysctl_add_nodes(adapter); + /* setup network interface */ rc = ena_setup_ifnet(pdev, adapter, &get_feat_ctx); if (unlikely(rc != 0)) { @@ -3677,13 +3693,6 @@ ena_attach(device_t pdev) taskqueue_start_threads(&adapter->metrics_tq, 1, PI_NET, "%s metricsq", device_get_nameunit(adapter->pdev)); - /* Initialize statistics */ - ena_alloc_counters((counter_u64_t *)&adapter->dev_stats, - sizeof(struct ena_stats_dev)); - ena_alloc_counters((counter_u64_t *)&adapter->hw_stats, - sizeof(struct ena_hw_stats)); - ena_sysctl_add_nodes(adapter); - #ifdef DEV_NETMAP rc = ena_netmap_attach(adapter); if (rc != 0) { @@ -3706,6 +3715,7 @@ err_detach: ether_ifdetach(adapter->ifp); #endif /* DEV_NETMAP */ err_msix_free: + ena_free_stats(adapter); ena_com_dev_reset(adapter->ena_dev, ENA_REGS_RESET_INIT_ERR); ena_free_mgmnt_irq(adapter); ena_disable_msix(adapter); @@ -3778,10 +3788,7 @@ ena_detach(device_t pdev) netmap_detach(adapter->ifp); #endif /* DEV_NETMAP */ - ena_free_counters((counter_u64_t *)&adapter->hw_stats, - sizeof(struct ena_hw_stats)); - ena_free_counters((counter_u64_t *)&adapter->dev_stats, - sizeof(struct ena_stats_dev)); + ena_free_stats(adapter); rc = ena_free_rx_dma_tag(adapter); if (unlikely(rc != 0)) From nobody Tue Jul 4 14:00:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwPZ40g0Cz4l6Zn; Tue, 4 Jul 2023 14:00: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 4QwPZ36gKLz3D0R; Tue, 4 Jul 2023 14:00:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688479211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iEnj+oULCeJVqtrdImFyp4HvFcvMUkzszaov7FvAQ80=; b=Lcq3WNBAPOotcTzUf0fLHpCZ5mCjNgqDOLTumljH/6Xi9LkfNDnvWZwYG0wLQirXntyxvC qxqvFXhLKtdUx05HGysXYYmPBuOkBL6Uln88Ek4mAOGTKd/8OpAxzTJwjIPEjT342ukTy0 4mVy80v4eIKwfq2H3WQjVk+CPworjLqFF+iUFSPpjVmH+xrbAK4PT5bmoz+eBoPmuAX/JR Fk7fjxw8BVevRv4ZJVIiuTzyHdbSdbNkyN+HrgE+gywNcPLQ63C0fHBkd5txreDxLAOq1j xcWibRUDklT7ftyxmIqPxFxYon3x0MQ2ALLpJZcZzCEGvrjQ73CnF15kL7QE2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688479211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iEnj+oULCeJVqtrdImFyp4HvFcvMUkzszaov7FvAQ80=; b=WbygcigWAO8K9TCfh8LDDdLWLb8rYNXq1yOqWGOy6tUOA2EoZcqt3ySF57lLLpBzHGsq3z Z/M5ZnYY/zx/bcqzttfd0PCusnwq25ywTQf5EHpgLMLddplDIvxgBU859jSzDZFUGgsWtd uOkzfXttF7abolvcPZhmeN+PeOMw8nUtzNy3UHi/rb3zx2SZSSuOnx6yNORl4GKyS1Fd7w 6AOd0NxkiBOx9nchS+X91UZX6gPErPNJLNgiHwpB8D553+egQ6nPkOontbu2WVYcCO584m 4mEoqG0bU7hivfdCJkpnJBggHm1QKgAfYhiEX8L7f3VYVu/zTfo94v61d+MV9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688479211; a=rsa-sha256; cv=none; b=whEF5kJHo7ujDcqG5Ii3pfC7vq9JSs0SIOAJFE0cN6REeTqHNvYTREhqxdGYCGQbsbe+5h v3+c/y/pwWobzcm00rv6e26zWeA/fVL6aBIKLw6zViXbGnwvZVO2v9XBzF7ZvJLMvl0073 koOKIgo7TXj27L2EpSNrZ1C16jEGblnBYYp6wAOyo/TwD4AAtXSqKIcVAeueyMzKQgn6bp ZRievivr5e4wLZLaYQ+gB14uX16aGloUhvNQ4OBUV8fM+20jmhMtexItmHLoWc0xzSdyaj 6NGnX0WySO4Slr28M2LUlOy46JkLFxnLA30pFLPCpePo0wQUoYG3rO2xeYrXnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwPZ3576zzZN8; Tue, 4 Jul 2023 14:00: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 364E0Bon072105; Tue, 4 Jul 2023 14:00:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364E0BBJ072097; Tue, 4 Jul 2023 14:00:11 GMT (envelope-from git) Date: Tue, 4 Jul 2023 14:00:11 GMT Message-Id: <202307041400.364E0BBJ072097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: c59a5fbd8a2e - main - ena: Fix driver unload crash List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c59a5fbd8a2ef68ed0842cbb1df4450edd654129 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=c59a5fbd8a2ef68ed0842cbb1df4450edd654129 commit c59a5fbd8a2ef68ed0842cbb1df4450edd654129 Author: Arthur Kiyanovski AuthorDate: 2023-05-21 12:31:54 +0000 Commit: Marcin Wojtas CommitDate: 2023-07-04 13:57:15 +0000 ena: Fix driver unload crash When ena_detach is called, we first call ether_ifdetach(), which destroys internal addresses of ifp. One such address is ifp->if_addr->ifa_addr. Then during ena_destroy_device(), if_link_state_change() is called, eventually trying to access ifp->if_addr->ifa_addr->sa_family. This causes an access to garbage memory and crashes the kernel. Ticket [1] was opened to the FreeBSD community to add null check in the code of if_link_state_change(). A fix was submitted in commit [2], however it was noted that it is our driver's responsibilty to not call if_link_state_change() after calling ether_ifdetach(). This commit makes sure if_link_state_change() is not called after ether_ifdetach(). [1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270813 [2]: https://reviews.freebsd.org/D39614 Fixes: 32f63fa7f975 ("Split ENA reset routine into restore and destroy stages") MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index a62b99d5ee1b..8429dcd3390f 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3291,7 +3291,8 @@ ena_destroy_device(struct ena_adapter *adapter, bool graceful) if (!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter)) return; - if_link_state_change(ifp, LINK_STATE_DOWN); + if (!graceful) + if_link_state_change(ifp, LINK_STATE_DOWN); ENA_TIMER_DRAIN(adapter); From nobody Tue Jul 4 14:00:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwPZ52t73z4l6pd; Tue, 4 Jul 2023 14:00: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 4QwPZ503gwz3D0m; Tue, 4 Jul 2023 14:00:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688479213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3ZUHO/g/9o3hwgkQ2vlSIbM7QgsQ0skwHwPbVVXB+o=; b=qcMWwovQ9H0GBZS0jP2D0TgvBiHNXCrpjFj/1OWh3KGYG9lT7+LQOxc39vN5CankbHIKDA XgPY3shUqoC/tpzDYWRdtlUfVUthKaO3DzoyViFXVmH86VqCGq/4xIa1HnXZYCdB58h3d0 17LN2t27p0pUDNYLSB4XdWS78B1nqeHR7dZoVshis1/tlS5xkGNZi8LJ7Qqq578vvUkM+F 7KvP6fa6TvmR5s/zZcOMLKwxa8qA81tIA+cR2szc25YnsM7wuUfV2b7KjNfYODOboAm5AV orsh38vTf5FpJKxUe1tz4WwSb/nrQPOserctHDJ7/IzdHx1vRVy0EP2Uu7AIlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688479213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3ZUHO/g/9o3hwgkQ2vlSIbM7QgsQ0skwHwPbVVXB+o=; b=e5cBqx8TvIUa2GIqCzDW31B1pQVzwQTpWvqa/Byell2B5pBDrNS0SAkS7HDm1/Q8Hxr3Sj vxmp+1cTeMb7v1L/XoQGW48HCHWctSR8lI9v6oekOmvkgt+zrhEm5L4tbz7wlKPqQkq5Wh MgZgeqVpbBD3S4pME98qMzXi64hRMxMFtaoN702iKZkHJ7CbdpHzUPKykvEDgWmVU/pHLH P/pdgi7TdP8YNREplJpZNC3W6mLcs2cI+dfmSmXttZ3UXX2PfsV684C03pi0lI+yXDGN1/ K7f/Ggxkg+wBicvRW9bQpAzZH2LcqpjVIyl/lzsmEziwLOa8BNLZTynkdFdMlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688479213; a=rsa-sha256; cv=none; b=FCmTsM2CL6qtaS9GzT4oOQwZ1GCPWlHCvvBZpGf1rZ6QFPaW29ANcMCSq0yr2eqbJpY8R7 p1SVnY2nVidmIAkHZ9ogTQ6s/h3ockRgYdtMkNwVcrTU4qbg8+DAt1saeNiNde+66tNH/2 1TO3QM/mw7f2Q6gJMprflVX4FP8oXampaQac1ep+95CAKf/oTK4V548896NU02MMWCsme3 ASpJSZ9Od4QdUfbWViVDxaeOKt8DnlZVMQ/hNG/8Vxww6PHQxpaxKMo99Rln9v8EwhzhSw uQEsYaWvfZZo33IsUx2YJEwxFWQs7XSFddjd/hKNAbaG8J2NnpznP5/QFE6dAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwPZ45hZhzZxv; Tue, 4 Jul 2023 14:00: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 364E0CaK072730; Tue, 4 Jul 2023 14:00:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364E0Cgl072727; Tue, 4 Jul 2023 14:00:12 GMT (envelope-from git) Date: Tue, 4 Jul 2023 14:00:12 GMT Message-Id: <202307041400.364E0Cgl072727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: ac40021c935d - main - ena: Update driver version to v2.6.3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac40021c935d77d86e68d28c6d33187ce9638ec6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=ac40021c935d77d86e68d28c6d33187ce9638ec6 commit ac40021c935d77d86e68d28c6d33187ce9638ec6 Author: Arthur Kiyanovski AuthorDate: 2023-05-28 08:42:05 +0000 Commit: Marcin Wojtas CommitDate: 2023-07-04 13:58:47 +0000 ena: Update driver version to v2.6.3 Bug Fixes: * Initialize statistics before the interface is available * Fix driver unload crash Minor Changes: * Mechanically convert ena(4) to DrvAPI * Remove usage of IFF_KNOWSEPOCH MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index ff33f526ca01..67f5b196bdad 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -41,7 +41,7 @@ #define ENA_DRV_MODULE_VER_MAJOR 2 #define ENA_DRV_MODULE_VER_MINOR 6 -#define ENA_DRV_MODULE_VER_SUBMINOR 2 +#define ENA_DRV_MODULE_VER_SUBMINOR 3 #define ENA_DRV_MODULE_NAME "ena" From nobody Tue Jul 4 15:39:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwRm53h88z4m9lT; Tue, 4 Jul 2023 15:39: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 4QwRm53HzJz45FY; Tue, 4 Jul 2023 15:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LzczIkX03a9e/CBlypL7SKfJBHSIepuUeOz4YTuHN48=; b=svLDui4ajduCqOXxgVk8I2EymKud3/Rqe7mpB+HV/riDGYNmqPo5o+bzP1ZnaLH+JaY92X r6VfkEOFPv2MXh8QR6XxRCbZMSWe2LIK6iYMsn1Hd2Z/9TEl2gxuCJ2EPlABqSC3JRWsEh u8J2B4C+F4veMbc6DWUDnFiz/PYlOFzZK1QGyhNMzUzjcw3d15qjtB8iRtwTQbY28cwdx9 IjQeD18Gn+yQs5RQoY6TNyEfr4mmoxafvGu44rW7OclcoSUze7efhTXlOm6cZIiXQn6MaP Mqf9Gs9pczrfUYlsO6rfkALlaEGBs8Gx8pIIX2BfNe7WTSfrfqrqXgwWEjZpmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LzczIkX03a9e/CBlypL7SKfJBHSIepuUeOz4YTuHN48=; b=P40lvXRx5txOidzCN9qBn/Ueb3p0CbqBrXcoh3D+mf+vkZfb00VlDDLo3pwmWh/p+SdZsx POusY0AI1kQ9dL2NrT/YomWoAz0usPHNsxrPG4NHCQLT/jKM3WUHbVs+rZtc4YT8m2O5o7 +7fSCPZM/JWctsQuLiEFhsnTFFDebnia4R71wAiGWhHPlmJ/5Zb9VE7f99tiP4dk2CfdrA ZpqcegfG4nv9gu1mpirVh4McOyrLx4MMfRxJZn7CCKLaSA8r2A14CqlDgsyuxHYS/tGcAl Zy7g93GqcjWFM2ta7ctB8iy7ukkoAj+B9A5V6u5WHzuM7OqEea+cIH5BdLASQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688485141; a=rsa-sha256; cv=none; b=J+BFufkZdEqz4GVKdfpQOtyQekLt2f6vjJa2HL/H0Qhr8Q5E2bl09j8J4ArYAMjkhVtFyM ACdXzdmTP0yd0IzieLNZms/GjO3ebObaitHsySowIObyplkbzGT4hEhkbuqvJMLh80jiPn 0pDUlu/mDTYFP8LFNgfc/ApQEtTj6/seHuwIOe7ITuE1zMalZE5LBD3eTXXpBXDEL09kbE EGPgGxiWSDlKKBHSpsXtvE4RZrmDuy5ao4Kw/V1Pnt1WMzqKCFvkwBCtEtVUsWx5qyxI66 PF9WWjevoMhp97teZkqe/M9cxX0MvNgK6uBN6/bn/vE8ezCHWM0sxaIB/zr0uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwRm52NtQzdkn; Tue, 4 Jul 2023 15:39: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 364Fd1dq032656; Tue, 4 Jul 2023 15:39:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Fd1UT032655; Tue, 4 Jul 2023 15:39:01 GMT (envelope-from git) Date: Tue, 4 Jul 2023 15:39:01 GMT Message-Id: <202307041539.364Fd1UT032655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 2e28f8cc3929 - main - kinst: accommodate other architectures in Makefile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e28f8cc39299223fe398b81676f06c419b804bc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2e28f8cc39299223fe398b81676f06c419b804bc commit 2e28f8cc39299223fe398b81676f06c419b804bc Author: Christos Margiolis AuthorDate: 2023-07-04 15:37:44 +0000 Commit: Christos Margiolis CommitDate: 2023-07-04 15:37:44 +0000 kinst: accommodate other architectures in Makefile Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40871 --- sys/modules/dtrace/kinst/Makefile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/modules/dtrace/kinst/Makefile b/sys/modules/dtrace/kinst/Makefile index 76304a430cd6..1cbfe5e72ff1 100644 --- a/sys/modules/dtrace/kinst/Makefile +++ b/sys/modules/dtrace/kinst/Makefile @@ -1,16 +1,23 @@ SYSDIR?= ${SRCTOP}/sys -.PATH: ${SYSDIR}/cddl/dev/kinst \ - ${SYSDIR}/cddl/dev/kinst/${MACHINE_CPUARCH} - KMOD= kinst SRCS= kinst.c kinst_isa.c trampoline.c CFLAGS+= ${OPENZFS_CFLAGS} \ -I${SYSDIR}/cddl/dev/kinst \ - -I${SYSDIR}/cddl/dev/dtrace/x86 \ -I${SYSDIR}/cddl/dev/kinst/${MACHINE_CPUARCH} +.PATH: ${SYSDIR}/cddl/dev/kinst \ + ${SYSDIR}/cddl/dev/kinst/${MACHINE_CPUARCH} + +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +CFLAGS+= -I${SYSDIR}/cddl/dev/dtrace/x86 +.PATH: ${SYSDIR}/cddl/dev/dtrace/x86 +.else +CFLAGS+= -I${SYSDIR}/cddl/dev/dtrace/${MACHINE_CPUARCH} +.PATH: ${SYSDIR}/cddl/dev/dtrace/${MACHINE_CPUARCH} +.endif + .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h From nobody Tue Jul 4 15:39:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwRm65Pgrz4m9fy; Tue, 4 Jul 2023 15:39: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 4QwRm64Y8hz45Qk; Tue, 4 Jul 2023 15:39:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=54NN6ZmZ0t1CXG0cnZTUjbp3+YOhzTOkVw++qpNZRjY=; b=wmYfpxPSETbG/+2dD+BhNhNCr3t91X+omDUS94gXCqtGlZcdKTERu3ODlZb22rlqV7nGQL YiWrHYh4sLi8CRCHbXtdkveeAkZYvC4ZsVsgBHkz8dvvhNr7TYrdk5zG4q2yPd148psNmg kHE25C7MwBObQy3iyFlvcZqSSF6jwTh8oryUPb1Di61vl5DzdkLPCOyO2vDNtWGtjswEn7 1APjSo9GhjdK3Q1bO5NAWyGxfJoEyTUomUGpIeTRz6bEvfJsbnilw1u54kIpreu9yDaOzV IWgqrmNIcoiit0avUW+CNqoL7XlThPL5O5aTg+6/R5EumuiesQDm+mcD9PJ14Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=54NN6ZmZ0t1CXG0cnZTUjbp3+YOhzTOkVw++qpNZRjY=; b=DW5aMOeu8eYvwk/IeBQ1Ap3p+skCWzteCk+p1n3xksCW4/zyJhnCyT3UKirkMR4NK1KsyF NvZRD/wFIeqx5uSeCwwg2vLNYBeb7Lo/sAZ3TLG+IAKAJNPQSfAT86ZizYW9kzoyPwOE8A jzRmGQErczhHiCEFSvtZY1WwgyMqu146FX7ueRfveTd5hgME6zKvnoO0FLK3NDahZrgqGI NnZRyP/gtsRInzVSs1rgIHxzrM+/S//WBLc9Qxa0CaQd+/LAbX/IgTnxdH1HP/ZB1erw4N ABP4LVW2KTpaM3/fxONstZpd2D64Q2t6UE9ULMjAHwrQ37VT4LBmGHg6EWHIdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688485142; a=rsa-sha256; cv=none; b=O6Lb/kdjB8WaJSY78F8xPwq+L2QyNqGafOzXSpX8DPECxHytNv+pJjgpTsEgCKkq7B4AyO asmpOhhE7bJ5rroxX0f8ocHiiWOtEZbOx9myzCkJBvX0ae4ff5JDbsjvz3SfTOzT8730Md j8NXJg+zuy4bgSAN7cbRGg1Kn1GDrXmtlxuReEGCmF8ozPsSuDXerfKUF4hR8S3MFzXnry f656QGVw+G0LJIteSj0S0NceXWe4gLhP6vIpc+fnRpFMRZ71IHz8NlgoHwtte3gGJbjlx+ Fh1a1+pKx00L2vP7lPMIa26k6YKtxNecRPvkElW8uLhU6gUvK1/vSosHlofrXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwRm635DHzdT6; Tue, 4 Jul 2023 15:39: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 364Fd2hZ032675; Tue, 4 Jul 2023 15:39:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Fd2dY032674; Tue, 4 Jul 2023 15:39:02 GMT (envelope-from git) Date: Tue, 4 Jul 2023 15:39:02 GMT Message-Id: <202307041539.364Fd2dY032674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 22508c8b6c28 - main - dtrace: cache current probe in kdtrace_thread_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22508c8b6c284ad9ad1385c703e224e1ed3fbd7c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=22508c8b6c284ad9ad1385c703e224e1ed3fbd7c commit 22508c8b6c284ad9ad1385c703e224e1ed3fbd7c Author: Christos Margiolis AuthorDate: 2023-07-04 15:37:55 +0000 Commit: Christos Margiolis CommitDate: 2023-07-04 15:37:55 +0000 dtrace: cache current probe in kdtrace_thread_t Needed by the forthcoming RISC-V and ARM64 ports. Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40872 --- sys/cddl/dev/dtrace/dtrace_cddl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cddl/dev/dtrace/dtrace_cddl.h b/sys/cddl/dev/dtrace/dtrace_cddl.h index 720c231bfca8..6a4aba15bfab 100644 --- a/sys/cddl/dev/dtrace/dtrace_cddl.h +++ b/sys/cddl/dev/dtrace/dtrace_cddl.h @@ -89,6 +89,7 @@ typedef struct kdtrace_thread { uint64_t td_fasttrap_tp_gen; /* Tracepoint hash table gen. */ struct trapframe *td_dtrace_trapframe; /* Trap frame from invop. */ void *td_kinst_tramp; + void *td_kinst_curprobe; } kdtrace_thread_t; /* @@ -119,6 +120,7 @@ typedef struct kdtrace_thread { #define t_fasttrap_tp_gen td_dtrace->td_fasttrap_tp_gen #define t_dtrace_trapframe td_dtrace->td_dtrace_trapframe #define t_kinst_tramp td_dtrace->td_kinst_tramp +#define t_kinst_curprobe td_dtrace->td_kinst_curprobe #define p_dtrace_helpers p_dtrace->p_dtrace_helpers #define p_dtrace_count p_dtrace->p_dtrace_count #define p_dtrace_probes p_dtrace->p_dtrace_probes From nobody Tue Jul 4 15:39:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwRm75Tntz4m9qx; Tue, 4 Jul 2023 15:39: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 4QwRm74sfGz45RQ; Tue, 4 Jul 2023 15:39:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7nZ6vS4os1RrpPRdUjxLnwvsDA/+pjxZ6iYhHvXuB5k=; b=jrrIolamQvK2HID+PaNSGfxHxJF2opGue7DcK5Dwuzc9JYrNdq9zaFI3BzmWl1YEso2gXn 2qZTk+aCArzv5JTiM6ZDzUkVYX9cIGq64H/Vjx3NTIEzQmt2wwGsEaKsc4caD7em7bJiM2 bPHJj0okf2KqtaAlBu3bFuNwHzfteU++KwwhAiZXXS4eCo7pyzuv1gjDBTtalfiNvL297O JX3h40zZSb+lEdTs6MpOdCFYSRZlivoxu5lVjWn1EqBtL8T/FvaNp7Gp059PTXaeTsUu/1 bz1qHIKwPpsIGo08KNG9L0y4YRRDOsUZsSPY0awD5LdTMVRgVXA5yJraY6drGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7nZ6vS4os1RrpPRdUjxLnwvsDA/+pjxZ6iYhHvXuB5k=; b=Yp9rJC2l2iCUnlCCyvhdGvRxrH0WKAXJgG838H/VaKRiBEbLMLwA/crXNOwR6NWpde5QN5 Bzw319Jckls7FZkfrOBPA2SQYU4mZ2TgLwngWBovuzDexjb0uwBLQLkS8X8XUMd89t1BVY rfCWUs/JISvudtZPbGDI3sPpIQM3jkl9ysGyEFFJEGgxbS+0HghShE+7vL/p/PKIpI+qrz rbE5PgIkX0BHTr+vkfZDYOqrARGqzk0atFqKTeTUbUZ7sft/wqws4Zxje9pkkGxK6CJ10N C/AUoWF7vaFe7NfafOX7fKGbP7/WMFRreKNfhULWJMWoW/3S9vlcA9vbpW3YqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688485143; a=rsa-sha256; cv=none; b=I0xWINSQHhOjz40Uo80xT21M0qPtcqpMZzJXXkLwPMNjaP9gEAKnAnuMVJbhwAwVf7gM+H mj0DrYWM27jO0DL7gmRvxwrgjA/06ARAQGXcz7yzcQAuB5fzcutajnCWIwo6oYzPlqs2OO SCeBaORbi157vQn7a1pk1MxODwNPcMAak12fkYfBUOwylxt1MM1BSfBcMJwOImcvLWPKvr bXUYVYLqdvwHQpwb1MrsIpJi81/w/cJTe3wLwkYcwaV0ieMBBDMmiRMTCOcGLl3NgEXSbe rYREnOzup3SYM0oFE+A/semcmawXnK/8qAyHfmhy1GvkwyoYj722WToWiuEXsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwRm73xqkzdRD; Tue, 4 Jul 2023 15:39: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 364Fd3WF032694; Tue, 4 Jul 2023 15:39:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Fd350032693; Tue, 4 Jul 2023 15:39:03 GMT (envelope-from git) Date: Tue, 4 Jul 2023 15:39:03 GMT Message-Id: <202307041539.364Fd350032693@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 2d7bb03adb43 - main - kinst: port to riscv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d7bb03adb43dd605464db3a9634ff33bf74ca5f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2d7bb03adb43dd605464db3a9634ff33bf74ca5f commit 2d7bb03adb43dd605464db3a9634ff33bf74ca5f Author: Christos Margiolis AuthorDate: 2023-07-04 15:38:01 +0000 Commit: Christos Margiolis CommitDate: 2023-07-04 15:38:01 +0000 kinst: port to riscv Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39884 --- sys/cddl/dev/kinst/riscv/kinst_isa.c | 616 +++++++++++++++++++++++++++++++++++ sys/cddl/dev/kinst/riscv/kinst_isa.h | 31 ++ sys/modules/dtrace/Makefile | 3 + 3 files changed, 650 insertions(+) diff --git a/sys/cddl/dev/kinst/riscv/kinst_isa.c b/sys/cddl/dev/kinst/riscv/kinst_isa.c new file mode 100644 index 000000000000..8bd4449a027a --- /dev/null +++ b/sys/cddl/dev/kinst/riscv/kinst_isa.c @@ -0,0 +1,616 @@ +/* + * SPDX-License-Identifier: CDDL 1.0 + * + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. + */ + +#include + +#include +#include + +#include "kinst.h" + +/* + * Per-CPU trampolines used when the interrupted thread is executing with + * interrupts disabled. If an interrupt is raised while executing a trampoline, + * the interrupt thread cannot safely overwrite its trampoline if it hits a + * kinst probe while executing the interrupt handler. + */ +DPCPU_DEFINE_STATIC(uint8_t *, intr_tramp); + +/* + * The double-breakpoint mechanism needs to save the current probe for the next + * call to kinst_invop(). As with per-CPU trampolines, this also has to be done + * per-CPU when interrupts are disabled. + */ +DPCPU_DEFINE_STATIC(struct kinst_probe *, intr_probe); + +#define _MATCH_REG(reg) \ + (offsetof(struct trapframe, tf_ ## reg) / sizeof(register_t)) + +static int +kinst_regoff(struct trapframe *frame, int n) +{ + switch (n) { + case 0: + /* There is no zero register in the trapframe structure. */ + return (-1); + case 1: + return (_MATCH_REG(ra)); + case 2: + return (_MATCH_REG(sp)); + case 3: + return (_MATCH_REG(gp)); + case 4: + return (_MATCH_REG(tp)); + case 5 ... 7: + return (_MATCH_REG(t[n - 5])); + case 8 ... 9: + return (_MATCH_REG(s[n - 8])); + case 10 ... 17: + return (_MATCH_REG(a[n - 10])); + case 18 ... 27: + return (_MATCH_REG(s[n - 18 + 2])); + case 28 ... 31: + return (_MATCH_REG(t[n - 28 + 3])); + default: + panic("%s: unhandled register index %d", __func__, n); + } +} + +static int +kinst_c_regoff(struct trapframe *frame, int n) +{ + switch (n) { + case 0 ... 1: + return (_MATCH_REG(s[n])); + case 2 ... 7: + return (_MATCH_REG(a[n - 2])); + default: + panic("%s: unhandled register index %d", __func__, n); + } +} + +#undef _MATCH_REG + +static int +kinst_emulate(struct trapframe *frame, struct kinst_probe *kp) +{ + kinst_patchval_t instr = kp->kp_savedval; + register_t prevpc; + uint64_t imm; + uint16_t off; + uint8_t funct; + + if (kp->kp_md.instlen == INSN_SIZE) { +#define rs1_index ((instr & RS1_MASK) >> RS1_SHIFT) +#define rs2_index ((instr & RS2_MASK) >> RS2_SHIFT) +#define rd_index ((instr & RD_MASK) >> RD_SHIFT) +#define rs1 ((register_t *)frame)[kinst_regoff(frame, rs1_index)] +#define rs2 ((register_t *)frame)[kinst_regoff(frame, rs2_index)] +#define rd ((register_t *)frame)[kinst_regoff(frame, rd_index)] +#define rs1_lval (rs1_index != 0 ? rs1 : 0) +#define rs2_lval (rs2_index != 0 ? rs2 : 0) + switch (instr & 0x7f) { + case 0b1101111: /* jal */ + imm = 0; + imm |= ((instr >> 21) & 0x03ff) << 1; + imm |= ((instr >> 20) & 0x0001) << 11; + imm |= ((instr >> 12) & 0x00ff) << 12; + imm |= ((instr >> 31) & 0x0001) << 20; + if (imm & 0x0000000000100000) + imm |= 0xfffffffffff00000; + if (rd_index != 0) + rd = frame->tf_sepc + INSN_SIZE; + frame->tf_sepc += imm; + break; + case 0b1100111: /* jalr */ + prevpc = frame->tf_sepc; + imm = (instr & IMM_MASK) >> IMM_SHIFT; + if (imm & 0x0000000000000800) + imm |= 0xfffffffffffff000; + frame->tf_sepc = (rs1_lval + imm) & ~1; + if (rd_index != 0) + rd = prevpc + INSN_SIZE; + break; + case 0b1100011: /* branch */ + imm = 0; + imm |= ((instr >> 8) & 0x000f) << 1; + imm |= ((instr >> 25) & 0x003f) << 5; + imm |= ((instr >> 7) & 0x0001) << 11; + imm |= ((instr >> 31) & 0x0001) << 12; + if (imm & 0x0000000000001000) + imm |= 0xfffffffffffff000; + funct = (instr >> 12) & 0x07; + switch (funct) { + case 0b000: /* beq */ + if (rs1_lval == rs2_lval) + frame->tf_sepc += imm; + else + frame->tf_sepc += INSN_SIZE; + break; + case 0b001: /* bne */ + if (rs1_lval != rs2_lval) + frame->tf_sepc += imm; + else + frame->tf_sepc += INSN_SIZE; + break; + case 0b100: /* blt */ + if ((int64_t)rs1_lval < (int64_t)rs2_lval) + frame->tf_sepc += imm; + else + frame->tf_sepc += INSN_SIZE; + break; + case 0b110: /* bltu */ + if ((uint64_t)rs1_lval < (uint64_t)rs2_lval) + frame->tf_sepc += imm; + else + frame->tf_sepc += INSN_SIZE; + break; + case 0b101: /* bge */ + if ((int64_t)rs1_lval >= (int64_t)rs2_lval) + frame->tf_sepc += imm; + else + frame->tf_sepc += INSN_SIZE; + break; + case 0b111: /* bgeu */ + if ((uint64_t)rs1_lval >= (uint64_t)rs2_lval) + frame->tf_sepc += imm; + else + frame->tf_sepc += INSN_SIZE; + break; + } + break; + case 0b0010111: /* auipc */ + imm = instr & 0xfffff000; + rd = frame->tf_sepc + + (imm & 0x0000000080000000 ? + imm | 0xffffffff80000000 : imm); + frame->tf_sepc += INSN_SIZE; + break; + } +#undef rs1_lval +#undef rs2_lval +#undef rs1 +#undef rs2 +#undef rd +#undef rs1_index +#undef rs2_index +#undef rd_index + } else { + switch (instr & 0x03) { +#define rs1 \ + ((register_t *)frame)[kinst_c_regoff(frame, (instr >> 7) & 0x07)] + case 0b01: + funct = (instr >> 13) & 0x07; + switch (funct) { + case 0b101: /* c.j */ + off = (instr >> 2) & 0x07ff; + imm = 0; + imm |= ((off >> 1) & 0x07) << 1; + imm |= ((off >> 9) & 0x01) << 4; + imm |= ((off >> 0) & 0x01) << 5; + imm |= ((off >> 5) & 0x01) << 6; + imm |= ((off >> 4) & 0x01) << 7; + imm |= ((off >> 7) & 0x03) << 8; + imm |= ((off >> 6) & 0x01) << 10; + imm |= ((off >> 10) & 0x01) << 11; + if (imm & 0x0000000000000800) + imm |= 0xfffffffffffff000; + frame->tf_sepc += imm; + break; + case 0b110: /* c.beqz */ + case 0b111: /* c.bnez */ + imm = 0; + imm |= ((instr >> 3) & 0x03) << 1; + imm |= ((instr >> 10) & 0x03) << 3; + imm |= ((instr >> 2) & 0x01) << 5; + imm |= ((instr >> 5) & 0x03) << 6; + imm |= ((instr >> 12) & 0x01) << 8; + if (imm & 0x0000000000000100) + imm |= 0xffffffffffffff00; + if (funct == 0b110 && rs1 == 0) + frame->tf_sepc += imm; + else if (funct == 0b111 && rs1 != 0) + frame->tf_sepc += imm; + else + frame->tf_sepc += INSN_C_SIZE; + break; + } + break; +#undef rs1 +#define rs1_index ((instr & RD_MASK) >> RD_SHIFT) +#define rs1 ((register_t *)frame)[kinst_regoff(frame, rs1_index)] + case 0b10: + funct = (instr >> 13) & 0x07; + if (funct == 0b100 && rs1_index != 0) { + /* c.jr/c.jalr */ + prevpc = frame->tf_sepc; + frame->tf_sepc = rs1; + if (((instr >> 12) & 0x01) != 0) + frame->tf_ra = prevpc + INSN_C_SIZE; + } + break; +#undef rs1 +#undef rs1_index + } + } + + return (MATCH_C_NOP); +} + +static int +kinst_jump_next_instr(struct trapframe *frame, struct kinst_probe *kp) +{ + frame->tf_sepc = (register_t)((uint8_t *)kp->kp_patchpoint + + kp->kp_md.instlen); + + return (MATCH_C_NOP); +} + +static void +kinst_trampoline_populate(struct kinst_probe *kp, uint8_t *tramp) +{ + static uint16_t nop = MATCH_C_NOP; + static uint32_t ebreak = MATCH_EBREAK; + int ilen; + + ilen = kp->kp_md.instlen; + kinst_memcpy(tramp, &kp->kp_savedval, ilen); + + /* + * Since we cannot encode large displacements in a single instruction + * in order to encode a far-jump back to the next instruction, and we + * also cannot clobber a register inside the trampoline, we execute a + * breakpoint after the copied instruction. kinst_invop() is + * responsible for detecting this special case and performing the + * "jump" manually. + * + * Add a NOP after a compressed instruction for padding. + */ + if (ilen == INSN_C_SIZE) + kinst_memcpy(&tramp[ilen], &nop, INSN_C_SIZE); + + kinst_memcpy(&tramp[INSN_SIZE], &ebreak, INSN_SIZE); + + fence_i(); +} + +/* + * There are two ways by which an instruction is traced: + * + * - By using the trampoline. + * - By emulating it in software (see kinst_emulate()). + * + * The trampoline is used for instructions that can be copied and executed + * as-is without additional modification. However, instructions that use + * PC-relative addressing have to be emulated, because RISC-V doesn't allow + * encoding of large displacements in a single instruction, and since we cannot + * clobber a register in order to encode the two-instruction sequence needed to + * create large displacements, we cannot use the trampoline at all. + * Fortunately, the instructions are simple enough to be emulated in just a few + * lines of code. + * + * The problem discussed above also means that, unlike amd64, we cannot encode + * a far-jump back from the trampoline to the next instruction. The mechanism + * employed to achieve this functionality, is to use a breakpoint instead of a + * jump after the copied instruction. This breakpoint is detected and handled + * by kinst_invop(), which performs the jump back to the next instruction + * manually (see kinst_jump_next_instr()). + */ +int +kinst_invop(uintptr_t addr, struct trapframe *frame, uintptr_t scratch) +{ + solaris_cpu_t *cpu; + struct kinst_probe *kp; + uint8_t *tramp; + + /* + * Use per-CPU trampolines and probes if the thread executing the + * instruction was executing with interrupts disabled. + */ + if ((frame->tf_sstatus & SSTATUS_SPIE) == 0) { + tramp = DPCPU_GET(intr_tramp); + kp = DPCPU_GET(intr_probe); + } else { + tramp = curthread->t_kinst_tramp; + kp = curthread->t_kinst_curprobe; + } + + /* + * Detect if the breakpoint was triggered by the trampoline, and + * manually set the PC to the next instruction. + */ + if (addr == (uintptr_t)(tramp + INSN_SIZE)) + return (kinst_jump_next_instr(frame, kp)); + + LIST_FOREACH(kp, KINST_GETPROBE(addr), kp_hashnext) { + if ((uintptr_t)kp->kp_patchpoint == addr) + break; + } + if (kp == NULL) + return (0); + + cpu = &solaris_cpu[curcpu]; + cpu->cpu_dtrace_caller = addr; + dtrace_probe(kp->kp_id, 0, 0, 0, 0, 0); + cpu->cpu_dtrace_caller = 0; + + if (kp->kp_md.emulate) + return (kinst_emulate(frame, kp)); + + if (tramp == NULL) { + /* + * A trampoline allocation failed, so this probe is + * effectively disabled. Restore the original + * instruction. + * + * We can't safely print anything here, but the + * trampoline allocator should have left a breadcrumb in + * the dmesg. + */ + kinst_patch_tracepoint(kp, kp->kp_savedval); + frame->tf_sepc = (register_t)kp->kp_patchpoint; + } else { + kinst_trampoline_populate(kp, tramp); + frame->tf_sepc = (register_t)tramp; + if ((frame->tf_sstatus & SSTATUS_SPIE) == 0) + DPCPU_SET(intr_probe, kp); + else + curthread->t_kinst_curprobe = kp; + } + + return (MATCH_C_NOP); +} + +void +kinst_patch_tracepoint(struct kinst_probe *kp, kinst_patchval_t val) +{ + switch (kp->kp_patchval) { + case KINST_C_PATCHVAL: + *(uint16_t *)kp->kp_patchpoint = (uint16_t)val; + fence_i(); + break; + case KINST_PATCHVAL: + *kp->kp_patchpoint = val; + fence_i(); + break; + } +} + +static void +kinst_instr_dissect(struct kinst_probe *kp, int instrsize) +{ + struct kinst_probe_md *kpmd; + kinst_patchval_t instr = kp->kp_savedval; + uint8_t funct; + + kpmd = &kp->kp_md; + kpmd->instlen = instrsize; + kpmd->emulate = false; + + /* + * The following instructions use PC-relative addressing and need to be + * emulated in software. + */ + if (kpmd->instlen == INSN_SIZE) { + switch (instr & 0x7f) { + case 0b1101111: /* jal */ + case 0b1100111: /* jalr */ + case 0b1100011: /* branch */ + case 0b0010111: /* auipc */ + kpmd->emulate = true; + break; + } + } else { + switch (instr & 0x03) { + case 0b01: + funct = (instr >> 13) & 0x07; + switch (funct) { + case 0b101: /* c.j */ + case 0b110: /* c.beqz */ + case 0b111: /* c.bnez */ + kpmd->emulate = true; + break; + } + break; + case 0b10: + funct = (instr >> 13) & 0x07; + if (funct == 0b100 && + ((instr >> 7) & 0x1f) != 0 && + ((instr >> 2) & 0x1f) == 0) + kpmd->emulate = true; /* c.jr/c.jalr */ + break; + } + } +} + +static bool +kinst_instr_system(kinst_patchval_t instr) +{ + if (dtrace_match_opcode(instr, MATCH_C_EBREAK, MASK_C_EBREAK) || + (instr & 0x7f) == 0b1110011) + return (true); + + return (false); +} + +static bool +kinst_instr_lr(kinst_patchval_t instr) +{ + if (dtrace_match_opcode(instr, MATCH_LR_W, MASK_LR_W) || + dtrace_match_opcode(instr, MATCH_LR_D, MASK_LR_D)) + return (true); + + return (false); +} + +static bool +kinst_instr_sc(kinst_patchval_t instr) +{ + if (dtrace_match_opcode(instr, MATCH_SC_W, MASK_SC_W) || + dtrace_match_opcode(instr, MATCH_SC_D, MASK_SC_D)) + return (true); + + return (false); +} + +int +kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, + void *opaque) +{ + struct kinst_probe *kp; + dtrace_kinst_probedesc_t *pd; + const char *func; + kinst_patchval_t *insn, v; + uint8_t *instr, *limit; + int instrsize, n, off; + bool lrsc_block, store_found, ret_found; + + pd = opaque; + func = symval->name; + + if (kinst_excluded(func)) + return (0); + if (strcmp(func, pd->kpd_func) != 0) + return (0); + + instr = (uint8_t *)(symval->value); + limit = (uint8_t *)(symval->value + symval->size); + if (instr >= limit) + return (0); + + /* Check for the usual function prologue. */ + for (insn = (kinst_patchval_t *)instr; + insn < (kinst_patchval_t *)limit; insn++) { + if (dtrace_instr_sdsp(&insn) || dtrace_instr_c_sdsp(&insn)) + store_found = true; + else if (dtrace_instr_ret(&insn) || dtrace_instr_c_ret(&insn)) + ret_found = true; + if (store_found && ret_found) + break; + } + if (!store_found || !ret_found) + return (0); + + n = 0; + lrsc_block = false; + while (instr < limit) { + instrsize = dtrace_instr_size(instr); + off = (int)(instr - (uint8_t *)symval->value); + + /* + * Avoid undefined behavior (i.e simply casting `*instr` to + * `kinst_patchval_t`) in case the pointer is unaligned. + * memcpy() can safely operate on unaligned pointers. + */ + memcpy(&v, instr, sizeof(kinst_patchval_t)); + + /* Skip SYSTEM instructions. */ + if (kinst_instr_system(v)) + goto cont; + + /* + * Skip LR/SC blocks used to build atomic operations. If a + * breakpoint is placed in a LR/SC block, the loop becomes + * unconstrained. In this case we violate the operation and the + * loop might fail on some implementations (see section 8.3 of + * the RISC-V unprivileged spec). + */ + if (kinst_instr_lr(v)) + lrsc_block = true; + else if (kinst_instr_sc(v)) { + lrsc_block = false; + goto cont; + } + if (lrsc_block) + goto cont; + + if (pd->kpd_off != -1 && off != pd->kpd_off) + goto cont; + + /* + * Prevent separate dtrace(1) instances from creating copies of + * the same probe. + */ + LIST_FOREACH(kp, KINST_GETPROBE(instr), kp_hashnext) { + if (strcmp(kp->kp_func, func) == 0 && + strtol(kp->kp_name, NULL, 10) == off) + return (0); + } + if (++n > KINST_PROBETAB_MAX) { + KINST_LOG("probe list full: %d entries", n); + return (ENOMEM); + } + kp = malloc(sizeof(struct kinst_probe), M_KINST, + M_WAITOK | M_ZERO); + kp->kp_func = func; + snprintf(kp->kp_name, sizeof(kp->kp_name), "%d", off); + kp->kp_patchpoint = (kinst_patchval_t *)instr; + kp->kp_savedval = v; + if (instrsize == INSN_SIZE) + kp->kp_patchval = KINST_PATCHVAL; + else + kp->kp_patchval = KINST_C_PATCHVAL; + + kinst_instr_dissect(kp, instrsize); + kinst_probe_create(kp, lf); +cont: + instr += instrsize; + } + if (lrsc_block) + KINST_LOG("warning: unterminated LR/SC block"); + + return (0); +} + +int +kinst_md_init(void) +{ + uint8_t *tramp; + int cpu; + + CPU_FOREACH(cpu) { + tramp = kinst_trampoline_alloc(M_WAITOK); + if (tramp == NULL) + return (ENOMEM); + DPCPU_ID_SET(cpu, intr_tramp, tramp); + } + + return (0); +} + +void +kinst_md_deinit(void) +{ + uint8_t *tramp; + int cpu; + + CPU_FOREACH(cpu) { + tramp = DPCPU_ID_GET(cpu, intr_tramp); + if (tramp != NULL) { + kinst_trampoline_dealloc(tramp); + DPCPU_ID_SET(cpu, intr_tramp, NULL); + } + } +} + +/* + * Exclude machine-dependent functions that are not safe-to-trace. + */ +bool +kinst_md_excluded(const char *name) +{ + if (strcmp(name, "cpu_exception_handler") == 0 || + strcmp(name, "cpu_exception_handler_supervisor") == 0 || + strcmp(name, "cpu_exception_handler_user") == 0 || + strcmp(name, "do_trap_supervisor") == 0 || + strcmp(name, "do_trap_user") == 0) + return (true); + + return (false); +} diff --git a/sys/cddl/dev/kinst/riscv/kinst_isa.h b/sys/cddl/dev/kinst/riscv/kinst_isa.h new file mode 100644 index 000000000000..bd7c2b3b8dcf --- /dev/null +++ b/sys/cddl/dev/kinst/riscv/kinst_isa.h @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: CDDL 1.0 + * + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. + */ + +#ifndef _KINST_ISA_H_ +#define _KINST_ISA_H_ + +#include +#include + +#define KINST_PATCHVAL MATCH_EBREAK +#define KINST_C_PATCHVAL MATCH_C_EBREAK + +/* + * The trampoline contains [instruction, [nop padding], ebreak]. + */ +#define KINST_TRAMP_SIZE 8 + +typedef uint32_t kinst_patchval_t; + +struct kinst_probe_md { + int instlen; /* original instr len */ + bool emulate; /* emulate in sw */ +}; + +#endif /* _KINST_ISA_H_ */ diff --git a/sys/modules/dtrace/Makefile b/sys/modules/dtrace/Makefile index 31beadb4d890..e38e2687e8a7 100644 --- a/sys/modules/dtrace/Makefile +++ b/sys/modules/dtrace/Makefile @@ -21,6 +21,9 @@ SUBDIR+= fasttrap systrace_linux SUBDIR+= systrace_linux32 SUBDIR+= kinst .endif +.if ${MACHINE_CPUARCH} == "riscv" +SUBDIR+= kinst +.endif .if ${MACHINE_CPUARCH} == "powerpc" SUBDIR+= fasttrap .endif From nobody Tue Jul 4 15:39:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwRm871sGz4m9p5; Tue, 4 Jul 2023 15:39:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwRm85P0Wz45PF; Tue, 4 Jul 2023 15:39:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ldekwRDjjiBXHwEVD/YXb32Oqr/c42YibRo8SwbaUgw=; b=clcaImqksCd9qN1BTqP0hldPvNm6nC4yYNM6/xZ8oTFvwnRJ3L7X3ADAlcfyDJ3buXEE5N Fu4aUMAWSF0s+oC1jDY1e3vUptMwzjNHI/fmAeG+4u/xu95hQM5CFoXG3CFI+agbqxG/K8 LoXNyUNmIxsgfzO4XQEFbx1m6LZB9Y2nztceQqKvcIuEhstixUDsaPKM5jiWQMFLqAStzb mBvaBIhsyrCDTbRRFo+zoePRD9hzpgY7R+IVfEEjLkZpbhGmXeILwuGbtCVVLCNWs4Uvu3 voilnrBcvBFEOpaH9BA8MwlYoXK0y0OZMDY7d4W4YDbQIF0kJ8DzFV59JC+Q2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ldekwRDjjiBXHwEVD/YXb32Oqr/c42YibRo8SwbaUgw=; b=X6QBfB8cxbVujFyXGGtM/gXuvqsREIyuJ2HAsX75yscWGJV9oTX2riJhcAkI/yt8C15i2E s0pzab0nL4T5LxOCG21aR+SsNf2uw5nwojIqVV511Q8U122G9ZMAdjPtdd4et5lGZ7Ci39 mkyRhIbAaOPDb0wp2bAbphBxWPVbb64Sw8T+MEsYaoPw8fEa96rgk01rVz/TSr/UHT70jJ zR6iRv+z9v5umPJkEkiu4Za+9ogHr3bjMCagXiTPZqZGx5HSoaHXemfWPHyoj8rn5VOZ5Y 3kkBRD+Ir4NJxH9CYtzSR9YdtQh0XcYhawSqAnUWovAY0MzOOR6cmc62ujjf4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688485144; a=rsa-sha256; cv=none; b=tbkHSzkh2c9mZgPq9iN0C2/Z4bdX7Ymo/ulLQCr5YbP8und8UrfzMIHF07GJQzyfVkzqIa hmmFzNv30CXdOw96aNzEPc+MFHYqKEf1CVAt0zPkDLg0Nhuj4JRDFwip8J59IWx49xhYdV FWf3YApYQGA0jQ0f4vO2amDrpLjt1aHHwyWdveXRGnjKd9FjQGS5b8/vin/ejaWiPHUm6k 2aiMDM8qLgyhiN7lDF3vACT569MvG++3fApXEZg60FjS5aGSQ/q08D/conojskLnGDUo9h enjE1cUkwvr4EVwvk4O9Km6e4/AQE4zJzoso+S1YvC510Etq5anbPmO1xzU49w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwRm84V65zdHF; Tue, 4 Jul 2023 15:39:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 364Fd4Uf032713; Tue, 4 Jul 2023 15:39:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Fd4GG032712; Tue, 4 Jul 2023 15:39:04 GMT (envelope-from git) Date: Tue, 4 Jul 2023 15:39:04 GMT Message-Id: <202307041539.364Fd4GG032712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9310bf540494 - main - kinst: update LICENSE headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9310bf54049422a9bd127100f697e6cbb189d889 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9310bf54049422a9bd127100f697e6cbb189d889 commit 9310bf54049422a9bd127100f697e6cbb189d889 Author: Christos Margiolis AuthorDate: 2023-07-04 15:38:25 +0000 Commit: Christos Margiolis CommitDate: 2023-07-04 15:38:25 +0000 kinst: update LICENSE headers Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40875 --- sys/cddl/dev/kinst/amd64/kinst_isa.c | 8 ++++++-- sys/cddl/dev/kinst/amd64/kinst_isa.h | 8 ++++++-- sys/cddl/dev/kinst/kinst.c | 6 +++++- sys/cddl/dev/kinst/kinst.h | 6 +++++- sys/cddl/dev/kinst/trampoline.c | 8 ++++++-- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/sys/cddl/dev/kinst/amd64/kinst_isa.c b/sys/cddl/dev/kinst/amd64/kinst_isa.c index 76b590f271bf..908dc79e9247 100644 --- a/sys/cddl/dev/kinst/amd64/kinst_isa.c +++ b/sys/cddl/dev/kinst/amd64/kinst_isa.c @@ -1,8 +1,12 @@ /* * SPDX-License-Identifier: CDDL 1.0 * - * Copyright 2022 Christos Margiolis - * Copyright 2022 Mark Johnston + * Copyright (c) 2022 Christos Margiolis + * Copyright (c) 2022 Mark Johnston + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. */ #include diff --git a/sys/cddl/dev/kinst/amd64/kinst_isa.h b/sys/cddl/dev/kinst/amd64/kinst_isa.h index 4e5873628b75..93d3a1d3ddeb 100644 --- a/sys/cddl/dev/kinst/amd64/kinst_isa.h +++ b/sys/cddl/dev/kinst/amd64/kinst_isa.h @@ -1,8 +1,12 @@ /* * SPDX-License-Identifier: CDDL 1.0 * - * Copyright 2022 Christos Margiolis - * Copyright 2022 Mark Johnston + * Copyright (c) 2022 Christos Margiolis + * Copyright (c) 2022 Mark Johnston + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. */ #ifndef _KINST_ISA_H_ diff --git a/sys/cddl/dev/kinst/kinst.c b/sys/cddl/dev/kinst/kinst.c index ea55b6fe5d0a..1c5b4372055d 100644 --- a/sys/cddl/dev/kinst/kinst.c +++ b/sys/cddl/dev/kinst/kinst.c @@ -1,7 +1,11 @@ /* * SPDX-License-Identifier: CDDL 1.0 * - * Copyright 2022 Christos Margiolis + * Copyright (c) 2022 Christos Margiolis + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. */ #include diff --git a/sys/cddl/dev/kinst/kinst.h b/sys/cddl/dev/kinst/kinst.h index 831526cb8a20..d2ccac50595c 100644 --- a/sys/cddl/dev/kinst/kinst.h +++ b/sys/cddl/dev/kinst/kinst.h @@ -1,7 +1,11 @@ /* * SPDX-License-Identifier: CDDL 1.0 * - * Copyright 2022 Christos Margiolis + * Copyright (c) 2022 Christos Margiolis + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. */ #ifndef _KINST_H_ diff --git a/sys/cddl/dev/kinst/trampoline.c b/sys/cddl/dev/kinst/trampoline.c index babbf84f1d88..87c01e39745b 100644 --- a/sys/cddl/dev/kinst/trampoline.c +++ b/sys/cddl/dev/kinst/trampoline.c @@ -1,8 +1,12 @@ /* * SPDX-License-Identifier: CDDL 1.0 * - * Copyright 2022 Christos Margiolis - * Copyright 2022 Mark Johnston + * Copyright (c) 2022 Christos Margiolis + * Copyright (c) 2022 Mark Johnston + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. */ #include From nobody Tue Jul 4 15:39:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwRmB0DrJz4m9ch; Tue, 4 Jul 2023 15:39: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 4QwRm96KQnz45XV; Tue, 4 Jul 2023 15:39:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lZWXRFNsLYKgU1txrP0UhhFolR42kT6MXUDUBNWlDMI=; b=EBXNrJ/yxsMVq5PP8hBe4epo3RIpRnwGljEHRnoX323WASQ1WzDLjS/iNI/iUI2xgyrBoj YlHNKgyp8hVsURtYoNsqgyaTfExKw1i6d9zy4VTdLcuN+lXaszO2fLf1V3Rk07DBLk22lv AP9st0DRRns+20LnF3kcJgTIYBNNn4DpAZ2x+9pQpPfuJr659BH0TusSFd3s+6QH63yb5H d+UaLiNzlgkQ/RN4d6FBqqoOh9UBaTL0XbvECMAG80TaCFNxbmOa/Dv2thxtekTcv3nFYJ kQyXTkxDImMy+azTClFKrzBsN1g9FxUThFYgGPiwq1hdLPVMkddb7y0LAwGO0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lZWXRFNsLYKgU1txrP0UhhFolR42kT6MXUDUBNWlDMI=; b=x4UvuhWrBfMzOwA5vfKT0jX4MBvzBiGNEQQT3GkfXX5XnVfHhpXAW+1T3R/F/rLJicDrcU uITSDhLcAow29nIfEPC5iTaNGLKxtUXmaS1Fcgpnsb44On1+n6Kbyz42R5zgujfqH3Gr0p tCGrEelgjLcUjJCOlNiq0qf+Z5wyg6IZHoiLOxHCfcvqv70e9erLcG2IRhsmwxy3wgogkH 6jbgdE42Li3tOtZfPReo5aHyx/vjsH+PgdADzDjuQSgFoEYatAmDJuupEGseNCKTDDezhW CJBp3wa3Cm6W7p8W5DhTkUwYjHz8tYcQlT0k6GR3SyXD0wU7up9MOaeoxnrTUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688485145; a=rsa-sha256; cv=none; b=uCbHFsEqfBAuushtvRXf2+kAu/6Ht5SQC55rbADdDIehpf8E8/E5aXQ31mkCNFh+QXGFYv emaBFT7liUaiMUquqhOBua6v1m20KhXXf8sAu5J1KitiAg2Rnbcdz4FFPZoFcUNp1OWGCI VC3HTwcOSlLFKzw9IeoyNXOzJ3pl1e3HxiwPHSpf6mX++crNiv7qZj1L2ieWiSb0EPsFGK RaYN6foBYXqznN5gTdBATLHOFWRV8v6f2K94kfrLqVOZ/NrhBcBnngpDsWiWZ4qGZWOaP/ gX0zQL4Pxb+HhrPHQKuaGKDlHXDWhQg6CnawMW4qCb97amY2GQ19tmTHfi2cEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwRm95Q9yzdT7; Tue, 4 Jul 2023 15:39: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 364Fd55m032732; Tue, 4 Jul 2023 15:39:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Fd5fo032731; Tue, 4 Jul 2023 15:39:05 GMT (envelope-from git) Date: Tue, 4 Jul 2023 15:39:05 GMT Message-Id: <202307041539.364Fd5fo032731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 1c776124513c - main - riscv: improve register dumping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c776124513c0a1976d599077e50b5a1c034dadc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1c776124513c0a1976d599077e50b5a1c034dadc commit 1c776124513c0a1976d599077e50b5a1c034dadc Author: Christos Margiolis AuthorDate: 2023-07-04 15:38:37 +0000 Commit: Christos Margiolis CommitDate: 2023-07-04 15:38:37 +0000 riscv: improve register dumping Search for and print kernel symbols in case a register's value is a kernel address. Also improve column alignment. Reviewed by: mhorne, jhb Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40829 --- sys/riscv/riscv/trap.c | 67 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index ac481c313e15..49da91235c66 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -35,6 +35,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ddb.h" + #include #include #include @@ -69,6 +71,11 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef DDB +#include +#include +#endif + int (*dtrace_invop_jump_addr)(struct trapframe *); /* Called from exception.S */ @@ -127,31 +134,57 @@ cpu_fetch_syscall_args(struct thread *td) #include "../../kern/subr_syscall.c" +static void +print_with_symbol(const char *name, uint64_t value) +{ +#ifdef DDB + c_db_sym_t sym; + db_expr_t sym_value; + db_expr_t offset; + const char *sym_name; +#endif + + printf("%7s: 0x%016lx", name, value); + +#ifdef DDB + if (value >= VM_MIN_KERNEL_ADDRESS) { + sym = db_search_symbol(value, DB_STGY_ANY, &offset); + if (sym != C_DB_SYM_NULL) { + db_symbol_values(sym, &sym_name, &sym_value); + printf(" (%s + 0x%lx)", sym_name, offset); + } + } +#endif + printf("\n"); +} + static void dump_regs(struct trapframe *frame) { - int n; + char name[6]; int i; - n = nitems(frame->tf_t); - for (i = 0; i < n; i++) - printf("t[%d] == 0x%016lx\n", i, frame->tf_t[i]); - - n = nitems(frame->tf_s); - for (i = 0; i < n; i++) - printf("s[%d] == 0x%016lx\n", i, frame->tf_s[i]); + for (i = 0; i < nitems(frame->tf_t); i++) { + snprintf(name, sizeof(name), "t[%d]", i); + print_with_symbol(name, frame->tf_t[i]); + } - n = nitems(frame->tf_a); - for (i = 0; i < n; i++) - printf("a[%d] == 0x%016lx\n", i, frame->tf_a[i]); + for (i = 0; i < nitems(frame->tf_s); i++) { + snprintf(name, sizeof(name), "s[%d]", i); + print_with_symbol(name, frame->tf_s[i]); + } - printf("ra == 0x%016lx\n", frame->tf_ra); - printf("sp == 0x%016lx\n", frame->tf_sp); - printf("gp == 0x%016lx\n", frame->tf_gp); - printf("tp == 0x%016lx\n", frame->tf_tp); + for (i = 0; i < nitems(frame->tf_a); i++) { + snprintf(name, sizeof(name), "a[%d]", i); + print_with_symbol(name, frame->tf_a[i]); + } - printf("sepc == 0x%016lx\n", frame->tf_sepc); - printf("sstatus == 0x%016lx\n", frame->tf_sstatus); + print_with_symbol("ra", frame->tf_ra); + print_with_symbol("sp", frame->tf_sp); + print_with_symbol("gp", frame->tf_gp); + print_with_symbol("tp", frame->tf_tp); + print_with_symbol("sepc", frame->tf_sepc); + printf("sstatus: 0x%016lx\n", frame->tf_sstatus); } static void From nobody Tue Jul 4 15:47:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwRxj6C1Zz4mGD0; Tue, 4 Jul 2023 15:47: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 4QwRxj5mKgz49XF; Tue, 4 Jul 2023 15:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gHHyoZMZn/RxXcB9kd4lyJpCLeXKVHmqYk4lELqD748=; b=lDznugotTnwkIUe1SkO1wck/tML2Ciqsvc9JFeb1Kmrz5iMI3hTFdxileNzqWH4mb5wLX2 kfvpOLIl3Y5N+iTai4NbcBLdXQliER9URO7423bv9q724uXh4XUKbBz1rrL3Zo3lPGJ1oi vUD4L/0hHCzUCB30fMXWxdfcUmSpFy4xmV1YzbG52d628jHi6cPYudWU/bgFIYy0+AguCZ S/Gh1VXXpBZFz7WYx+lezSP0qHgVUOwj8touDuBq8js1sY8e4eJ895CXmN3v09Eiu3OKxp dDv0KbazBnexjJr0nKNoctbMkIQqC1aWsyvwQJns+J9Gdp4G3bK08+6uqHpZMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688485641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gHHyoZMZn/RxXcB9kd4lyJpCLeXKVHmqYk4lELqD748=; b=gXgElFLDGjYAMnuUezrXxfKauR+32U79JOpDwli3SLgKrWEjrgD6gmsg9u/vOlj5uShwim ICYMEIO9AzeKKoBlYr1AjiiEH7dcWGjmtaiC4B1Xuk+R0MY3pWrrRVN1r3nT1oue+r3xFO m683eLuE+KTm1YLR29kN5ToDctOkPAms58D0+oGhEKHZSz6kJwaT8Yy9Zox4UI7j9ipIb+ +iEKCfuErJEJGzE2DVf5a1ZNmUOxktVWr0kj+3ty8nOy+rkrRncsKZMEL6KJmqhHT2CxV4 Jm+Z3bBkKEkoe63vLaHQCLd7iMwyQ7v9j/6SUuTWzjjSoG2I7Qqmh6z4H0l4rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688485641; a=rsa-sha256; cv=none; b=S24FmiPpOsjdQA9WKxeu62DEfZCB6XttmnA5tmS1WVv6q+ZWQLn2W8s1MvFpcqLzLB1XRQ 5WLuMbVq+o/rwg6Z3smjkAgDSnNKD+JqVYTFIHYSGFbNo9Yk61l/SEHIdw6o+l27EqT3kd Cpn39KRGQAWhoOdKiNuW+uNnZa0RFcQT05gZR9FV/LwokF6JYDR2GjzIBpPudjMIufbnaW QgB95nIC7wa4mixA9YPwMA0OJQyk3U/t6J6IXx886/6faTncnqWj0nMQa1xT6YYNrrc3GZ KOGQVdt4cSI6s5/HoaX/SXcmIW5klLI2tUNZfA3ZpoheCr22/MTQQFPB91Z6yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwRxj4q4yzf0f; Tue, 4 Jul 2023 15:47: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 364FlLlq049383; Tue, 4 Jul 2023 15:47:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364FlL6t049382; Tue, 4 Jul 2023 15:47:21 GMT (envelope-from git) Date: Tue, 4 Jul 2023 15:47:21 GMT Message-Id: <202307041547.364FlL6t049382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 911f0260390e - main - dtrace: move kinst tests to common List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 911f0260390e18cf85f3dbf2c719b593efdc1e3c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=911f0260390e18cf85f3dbf2c719b593efdc1e3c commit 911f0260390e18cf85f3dbf2c719b593efdc1e3c Author: Christos Margiolis AuthorDate: 2023-07-04 15:46:59 +0000 Commit: Christos Margiolis CommitDate: 2023-07-04 15:46:59 +0000 dtrace: move kinst tests to common Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40414 --- .../cmd/dtrace/test/tst/{amd64 => common}/kinst/tst.basic.ksh | 0 cddl/usr.sbin/dtrace/tests/amd64/Makefile | 3 +-- cddl/usr.sbin/dtrace/tests/common/Makefile | 1 + cddl/usr.sbin/dtrace/tests/{amd64 => common}/kinst/Makefile | 0 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/kinst/tst.basic.ksh similarity index 100% rename from cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh rename to cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/kinst/tst.basic.ksh diff --git a/cddl/usr.sbin/dtrace/tests/amd64/Makefile b/cddl/usr.sbin/dtrace/tests/amd64/Makefile index db421ea0880f..39ccd333bedf 100644 --- a/cddl/usr.sbin/dtrace/tests/amd64/Makefile +++ b/cddl/usr.sbin/dtrace/tests/amd64/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/amd64 -TESTS_SUBDIRS+= arrays \ - kinst +TESTS_SUBDIRS+= arrays .PATH: ${.CURDIR:H:H:H:H:H}/tests KYUAFILE= YES diff --git a/cddl/usr.sbin/dtrace/tests/common/Makefile b/cddl/usr.sbin/dtrace/tests/common/Makefile index c395269e7aa9..1b552bf56889 100644 --- a/cddl/usr.sbin/dtrace/tests/common/Makefile +++ b/cddl/usr.sbin/dtrace/tests/common/Makefile @@ -32,6 +32,7 @@ TESTS_SUBDIRS+= aggs \ ip \ java_api \ json \ + kinst \ lexer \ llquantize \ mdb \ diff --git a/cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile b/cddl/usr.sbin/dtrace/tests/common/kinst/Makefile similarity index 100% rename from cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile rename to cddl/usr.sbin/dtrace/tests/common/kinst/Makefile From nobody Tue Jul 4 16:00:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwSDx01Kkz4l9Mk; Tue, 4 Jul 2023 16:00: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 4QwSDw5g4bz4Ft7; Tue, 4 Jul 2023 16:00:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688486432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vkzHs9CdYTDSj6ieMiiLUFBmyqf/H4CCVm3iXq3Ll1Y=; b=vFIahMWbLpoGVlCc9NP1jvf83aST5UbhCuGvP41hxmZxt+Bofm8evF4P9uel8nfa028jiI qvDzjMdadTAuqCR7y3nRHQlxRR8ffYZ5jZpLdZWYfNY6U67ShB3B+maKNfCPe1DhFgch2t 5j6XdKIPr4+Nq6Gm5rfjO2vfoQPoyV51gR7sYSd5NqbyOIs2YBGCv7hqPnhfyK5NwUPMWs Bsv953FiHD6D2WzEgr+DC9lnHZZvdipAnnCk+Y4pIg+TfdZj9mGL0ZrotG5XjomSDFVvHF b+YO9FeiAqZJrmRAtUn+WRdZY7ZjUa+e/XCJ34LpueSbUX1VLFyG1JSZtThMPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688486432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vkzHs9CdYTDSj6ieMiiLUFBmyqf/H4CCVm3iXq3Ll1Y=; b=wOCsr0Dc1lwNIzjRRi7heN6IKT7wklujEqFLf0R4M0uuEMHQknjjEx0euGpZe8SXInM3HS 715T1Uu1hX0UgpFZuky3IrJaJImSybpJY7XEfNecWCZNNCcOcFd8WOshHYjLIf/iTG69Kw FmjyomY9d4kVxAUzLEsieM09mf9J7t/4GDt6nxBmaq4dGUnjLDM6xzTmiml4gp1pv54aVr tZZKFWAzHiOxizxCplUVmnGbnTdhmpTSbUn7Jpy+R7w0YrlKvfyRxXOntyJrNSO92jG67L oJM+wzjii9jfMq6DTgK/VqtyJC8U2J8TVy1naC9oQ0xoqTYrvn4Uk5LudwxI6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688486432; a=rsa-sha256; cv=none; b=nkV32OT05qmedzVqUwAw+4TWfMCpP1/7FpcOyhlYXfqA8/l3rY37cmn2/7F+Cf3nbL2M2Q /bVUl8XCiVSKdrlIUMOZCryB0J0UvsYykGjlSq9nabIlSqmnfZp5xePRkJnnYnr8pSkAej zO8TTLTFLl6QCMtAjS7ivYqarFuPpC2vb9CR3kmZz6QQe5TAeD2MqnWM6y1hm8STbC5HtU avJQr2yvq0dwZWTqZfLUGKuF9gw/pNF67kp9FEy3vJIESCaLD+AVz0UJwHBTxzMpmDqWrq scONjCy+IvC0E707HXTVbiy712lpGh3NEA4nVeX4XWe0m9m+SKukcKkaSag+Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwSDw4ln5zf21; Tue, 4 Jul 2023 16:00: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 364G0WB6075956; Tue, 4 Jul 2023 16:00:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364G0Wke075955; Tue, 4 Jul 2023 16:00:32 GMT (envelope-from git) Date: Tue, 4 Jul 2023 16:00:32 GMT Message-Id: <202307041600.364G0Wke075955@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: d7614c010c76 - main - vn_path_to_global_path_hardlink(): initialize len List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7614c010c762dcb29110073e7fbecf048fa3a32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d7614c010c762dcb29110073e7fbecf048fa3a32 commit d7614c010c762dcb29110073e7fbecf048fa3a32 Author: Konstantin Belousov AuthorDate: 2023-07-04 07:46:15 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 16:00:24 +0000 vn_path_to_global_path_hardlink(): initialize len before calling vn_fullpath_hardlink(). Otherwise we get random failures when the len is automatically clipped. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 25918f5a0b6e..1310800fce4e 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3861,6 +3861,7 @@ vn_path_to_global_path_hardlink(struct thread *td, struct vnode *vp, * name. */ VOP_UNLOCK(vp); + len = pathlen; error = vn_fullpath_hardlink(vp, dvp, leaf_name, leaf_length, &rpath, &fbuf, &len); From nobody Tue Jul 4 17:31:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwVH83Wq3z4lBLG; Tue, 4 Jul 2023 17:32:36 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [IPv6:2001:1640:5::8:31]) (using TLSv1.3 with cipher TLS_AES_256_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 4QwVH811KHz3lxZ; Tue, 4 Jul 2023 17:32:35 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub1.goneo.de (hub1.goneo.de [85.220.129.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id 530DC10A1E83; Tue, 4 Jul 2023 19:32:27 +0200 (CEST) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id 60F95105ED92; Tue, 4 Jul 2023 19:32:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1688491945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YA+her3Zyltf112Idnh1hVixKQUNOZWyod3F1VvnmwE=; b=jC3QcVUZzM/maG2ru7NFrCbQwvy6MimRfBAWV9/rJ7Y6H7benPCd+KP3vLduuQ7JFU9KgH 8MGmbggvKXScGBP2zL40ziHKFdcX7NAUpQyCReT308EOffo5NIM8Alv322VZ1DsrMB/109 9JCvgruI+GcPU7UR4+PCgSeBOurVPJhNDDvwdZtLQkMUqtHM32ywJ+QE27Myj9kEPaxwiz hFodGkyapWK9ZU65/ugoOQBHwPCrHCUHNCBHdJ+J8iO9koACdJZgxJu/9DBf81LOSvme+F CW8GPAQuJwm2ajEljRi0YS8ZhPr6jk0uqs7SEAMyCmIWokTg7TFHh3aLNzNgKw== Received: from thor.intern.walstatt.dynvpn.de (dynamic-089-014-087-069.89.14.pool.telefonica.de [89.14.87.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id 0838D1060975; Tue, 4 Jul 2023 19:32:24 +0200 (CEST) Date: Tue, 4 Jul 2023 19:31:57 +0200 From: FreeBSD User To: Robert Clausecker Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ee8b0c436d72 - main - lib/libc/string: replace ffs/fls implementations with clang builtins: cc: error: no such file or directory: '/usr/src/lib/libc/i386/string/ffs.S' Message-ID: <20230704193224.392af7f9@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202307032023.363KNhu6031914@gitrepo.freebsd.org> References: <202307032023.363KNhu6031914@gitrepo.freebsd.org> Organization: walstatt-de.de List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-UID: 903584 X-Rspamd-UID: af4b60 X-Rspamd-Queue-Id: 4QwVH811KHz3lxZ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:25394, ipnet:2001:1640::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Am Mon, 3 Jul 2023 20:23:43 GMT Robert Clausecker schrieb: This commit seems to break buildworld: [...] cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd14.0 -m32 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 -fpic -DPIC -O2 -pipe -O3 -fno-common -DNO__SCCSID -DNO__RCSID -I/usr/src/lib/libc/include -I/usr/src/include -I/usr/src/lib/libc/i386 -DNLS -ftls-model=initial-exec -DCRT_IRELOC_REL -DINIT_IRELOCS="init_cpu_features()" -I/usr/src/lib/libc/csu/i386 -D__DBINTERFACE_PRIVATE -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libmd -I/usr/src/contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD -MF.depend.ffs.pico -MTffs.pico -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninit--- ffs.nossppico --- cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd14.0 -m32 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 -fpic -DPIC -O2 -pipe -O3 -fno-common -DNO__SCCSID -DNO__RCSID -I/usr/src/lib/libc/include -I/usr/src/include -I/usr/src/lib/libc/i386 -DNLS -ftls-model=initial-exec -DCRT_IRELOC_REL -DINIT_IRELOCS="init_cpu_features()" -I/usr/src/lib/libc/csu/i386 -D__DBINTERFACE_PRIVATE -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libmd -I/usr/src/contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD -MF.depend.ffs.nossppico -MTffs.nossppico -std=gnu99 -Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointe--- ffsl.nossppico --- cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd14.0 -m32 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 -fpic -DPIC -O2 -pipe -O3 -fno-common -DNO__SCCSID -DNO__RCSID -I/usr/src/lib/libc/include -I/usr/src/include -I/usr/src/lib/libc/i386 -DNLS -ftls-model=initial-exec -DCRT_IRELOC_REL -DINIT_IRELOCS="init_cpu_features()" -I/usr/src/lib/libc/csu/i386 -D__DBINTERFACE_PRIVATE -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libmd -I/usr/src/contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD -MF.depend.ffsl.nossppico -MTffsl.nossppico -std=gnu99 -Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-p--- ffs.pico --- ialized -Wno-pointer-sign -Wdate-time -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-parameter -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -I/usr/src/lib/libutil -I/usr/src/lib/msun/i387 -I/usr/src/lib/msun/x86 -I/usr/src/lib/msun/src -c /usr/src/lib/libc/i386/string/ffs.S -o ffs.pico cc: error: no such file or directory: '/usr/src/lib/libc/i386/string/ffs.S' cc: error: no input files [...] --- ffs.pico --- *** [ffs.pico] Error code 1 make[4]: stopped in /usr/src/lib/libc --- ffs.nossppico --- cc: error: no such file or directory: '/usr/src/lib/libc/i386/string/ffs.S' cc: error: no input files *** [ffs.nossppico] Error code 1 [...] > The branch main has been updated by fuz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ee8b0c436d7221c25e8be3c3fe1f9da78b9d5b16 > > commit ee8b0c436d7221c25e8be3c3fe1f9da78b9d5b16 > Author: Robert Clausecker > AuthorDate: 2023-06-23 16:22:54 +0000 > Commit: Robert Clausecker > CommitDate: 2023-07-03 20:18:27 +0000 > > lib/libc/string: replace ffs/fls implementations with clang builtins > > Most architectures we support (except for riscv64) have instructions > to compute these functions very quickly. Replace old code with the > ffs and clz builtin functions, allowing clang to generate good code > for all architectures. > > As a consequence, toss out arm and i386 ffs() implementations. > > Sponsored by: FreeBSD Foundation > Approved by: mhorne > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D40730 > --- > lib/libc/arm/string/Makefile.inc | 1 - > lib/libc/arm/string/ffs.S | 57 --------------------------------------- > lib/libc/i386/string/Makefile.inc | 1 - > lib/libc/i386/string/ffs.S | 56 -------------------------------------- > lib/libc/string/ffs.c | 12 ++++----- > lib/libc/string/ffsl.c | 12 ++++----- > lib/libc/string/ffsll.c | 12 ++++----- > lib/libc/string/fls.c | 13 +++++---- > lib/libc/string/flsl.c | 14 +++++----- > lib/libc/string/flsll.c | 13 +++++---- > 10 files changed, 34 insertions(+), 157 deletions(-) > > diff --git a/lib/libc/arm/string/Makefile.inc b/lib/libc/arm/string/Makefile.inc > index cf3175ea4e8c..550de34adb0e 100644 > --- a/lib/libc/arm/string/Makefile.inc > +++ b/lib/libc/arm/string/Makefile.inc > @@ -3,7 +3,6 @@ > MDSRCS+= \ > bcopy.S \ > bzero.S \ > - ffs.S \ > memcmp.S \ > memcpy.S \ > memmove.S \ > diff --git a/lib/libc/arm/string/ffs.S b/lib/libc/arm/string/ffs.S > deleted file mode 100644 > index 5756dd81d21d..000000000000 > --- a/lib/libc/arm/string/ffs.S > +++ /dev/null > @@ -1,57 +0,0 @@ > -/* $NetBSD: ffs.S,v 1.5 2003/04/05 23:08:52 bjh21 Exp $ */ > -/* > - * Copyright (c) 2001 Christopher Gilbert > - * 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. > - * 3. The name of the company nor the name of the author may be used to > - * endorse or promote products derived from this software without specific > - * prior written permission. > - * > - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > - * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > - * SUCH DAMAGE. > - */ > - > -#include > - > -__FBSDID("$FreeBSD$"); > - > -.syntax unified > - > -/* > - * ffs - find first set bit, this algorithm isolates the first set > - * bit, then multiplies the number by 0x0450fbaf which leaves the top > - * 6 bits as an index into the table. This algorithm should be a win > - * over the checking each bit in turn as per the C compiled version. > - * > - * This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on > - * 16 Feb 1994. > - */ > - > -ENTRY(ffs) > - /* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */ > - rsb r1, r0, #0 > - ands r0, r0, r1 > - itt ne > - clzne r0, r0 > - rsbne r0, r0, #32 > - RET > -END(ffs) > - > - .section .note.GNU-stack,"",%progbits > diff --git a/lib/libc/i386/string/Makefile.inc b/lib/libc/i386/string/Makefile.inc > index a8c50a285cbd..f3678b93bec3 100644 > --- a/lib/libc/i386/string/Makefile.inc > +++ b/lib/libc/i386/string/Makefile.inc > @@ -4,7 +4,6 @@ MDSRCS+= \ > bcmp.S \ > bcopy.S \ > bzero.S \ > - ffs.S \ > memcmp.S \ > memcpy.S \ > memmove.S \ > diff --git a/lib/libc/i386/string/ffs.S b/lib/libc/i386/string/ffs.S > deleted file mode 100644 > index 3a0431c6a845..000000000000 > --- a/lib/libc/i386/string/ffs.S > +++ /dev/null > @@ -1,56 +0,0 @@ > -/* > - * Copyright (c) 1993 Winning Strategies, Inc. > - * All rights reserved. > - * > - * Redistribution and use in source and binary forms, with or without > - * modification, are permitted provided that the following conditions > - * are met: > - * 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. > - * 3. All advertising materials mentioning features or use of this software > - * must display the following acknowledgement: > - * This product includes software developed by Winning Strategies, Inc. > - * 4. The name of the author may not be used to endorse or promote products > - * derived from this software without specific prior written permission > - * > - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > - */ > - > -#include > -__FBSDID("$FreeBSD$"); > - > -/* > - * ffs(value) > - * finds the first bit set in value and returns the index of > - * that bit. Bits are numbered starting from 1, starting at the > - * rightmost bit. A return value of 0 means that the argument > - * was zero. > - * > - * Written by: > - * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. > - */ > - > -ENTRY(ffs) > - bsfl 4(%esp),%eax > - jz L1 /* ZF is set if all bits are 0 */ > - incl %eax /* bits numbered from 1, not 0 */ > - ret > - > - .align 2 > -L1: xorl %eax,%eax /* clear result */ > - ret > -END(ffs) > - > - .section .note.GNU-stack,"",%progbits > diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c > index 738ef90ce091..c011b3390612 100644 > --- a/lib/libc/string/ffs.c > +++ b/lib/libc/string/ffs.c > @@ -3,6 +3,10 @@ > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > + * Copyright (c) 2023 The FreeBSD Foundation > + * > + * Portions of this software were developed by Robert Clausecker > + * 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 > @@ -43,11 +47,5 @@ __FBSDID("$FreeBSD$"); > int > ffs(int mask) > { > - int bit; > - > - if (mask == 0) > - return(0); > - for (bit = 1; !(mask & 1); bit++) > - mask = (unsigned int)mask >> 1; > - return (bit); > + return (__builtin_ffs(mask)); > } > diff --git a/lib/libc/string/ffsl.c b/lib/libc/string/ffsl.c > index dbd894b9655b..6e1ac8ec45c1 100644 > --- a/lib/libc/string/ffsl.c > +++ b/lib/libc/string/ffsl.c > @@ -3,6 +3,10 @@ > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > + * Copyright (c) 2023 The FreeBSD Foundation > + * > + * Portions of this software were developed by Robert Clausecker > + * 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 > @@ -40,11 +44,5 @@ __FBSDID("$FreeBSD$"); > int > ffsl(long mask) > { > - int bit; > - > - if (mask == 0) > - return (0); > - for (bit = 1; !(mask & 1); bit++) > - mask = (unsigned long)mask >> 1; > - return (bit); > + return (__builtin_ffsl(mask)); > } > diff --git a/lib/libc/string/ffsll.c b/lib/libc/string/ffsll.c > index 91886de2f127..b945658b9008 100644 > --- a/lib/libc/string/ffsll.c > +++ b/lib/libc/string/ffsll.c > @@ -3,6 +3,10 @@ > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > + * Copyright (c) 2023 The FreeBSD Foundation > + * > + * Portions of this software were developed by Robert Clausecker > + * 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 > @@ -40,11 +44,5 @@ __FBSDID("$FreeBSD$"); > int > ffsll(long long mask) > { > - int bit; > - > - if (mask == 0) > - return (0); > - for (bit = 1; !(mask & 1); bit++) > - mask = (unsigned long long)mask >> 1; > - return (bit); > + return (__builtin_ffsll(mask)); > } > diff --git a/lib/libc/string/fls.c b/lib/libc/string/fls.c > index d9edc41f9599..3c4719776778 100644 > --- a/lib/libc/string/fls.c > +++ b/lib/libc/string/fls.c > @@ -3,6 +3,10 @@ > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > + * Copyright (c) 2023 The FreeBSD Foundation > + * > + * Portions of this software were developed by Robert Clausecker > + * 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 > @@ -32,6 +36,7 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include > #include > > /* > @@ -40,11 +45,5 @@ __FBSDID("$FreeBSD$"); > int > fls(int mask) > { > - int bit; > - > - if (mask == 0) > - return (0); > - for (bit = 1; mask != 1; bit++) > - mask = (unsigned int)mask >> 1; > - return (bit); > + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clz(mask)); > } > diff --git a/lib/libc/string/flsl.c b/lib/libc/string/flsl.c > index 60370cf7d832..f5280b77a4e2 100644 > --- a/lib/libc/string/flsl.c > +++ b/lib/libc/string/flsl.c > @@ -3,6 +3,11 @@ > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > + * Copyright (c) 2023 The FreeBSD Foundation > + > + * > + * Portions of this software were developed by Robert Clausecker > + * 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 > @@ -32,6 +37,7 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include > #include > > /* > @@ -40,11 +46,5 @@ __FBSDID("$FreeBSD$"); > int > flsl(long mask) > { > - int bit; > - > - if (mask == 0) > - return (0); > - for (bit = 1; mask != 1; bit++) > - mask = (unsigned long)mask >> 1; > - return (bit); > + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clzl(mask)); > } > diff --git a/lib/libc/string/flsll.c b/lib/libc/string/flsll.c > index 275aaa0e2e15..ab504b8e592f 100644 > --- a/lib/libc/string/flsll.c > +++ b/lib/libc/string/flsll.c > @@ -3,6 +3,10 @@ > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > + * Copyright (c) 2023 The FreeBSD Foundation > + * > + * Portions of this software were developed by Robert Clausecker > + * 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 > @@ -32,6 +36,7 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include > #include > > /* > @@ -40,11 +45,5 @@ __FBSDID("$FreeBSD$"); > int > flsll(long long mask) > { > - int bit; > - > - if (mask == 0) > - return (0); > - for (bit = 1; mask != 1; bit++) > - mask = (unsigned long long)mask >> 1; > - return (bit); > + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clzll(mask)); > } > -- O. Hartmann From nobody Tue Jul 4 17:46:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwVbB03DXz4lLNp for ; Tue, 4 Jul 2023 17:46:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwVb95km4z3r7R for ; Tue, 4 Jul 2023 17:46:29 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-3fbc244d386so64306865e9.2 for ; Tue, 04 Jul 2023 10:46:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688492788; x=1691084788; 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=lD1hE0TiWoEGoQcNBUDh+f9AD1z7SpbkOQhN7WOJYYA=; b=EqKOkOC3A8zqfYkYq+vaR1c14pNKIt18L+Wan4nN/j6GVCecQfyJ7dwpwpUIDXBxb3 GDjEmzk5A3B3WBTa+EKfecggkuz/8phJjxtENHwGj87cf6aWXL+1gu6HVRA2aT9aBiw4 1eWLHulsApIU8XRN6GND+3KbQQmG9KOhpCyrwqiK5KW0j384XVv98ARNh417Fxlt1D+q 24Xg1RsHwLasBgmK770Z/ChJtxgmZghx+bIQK7TxOZ7+WEcohR7x40Z/ISjWWSW8uJ6N bU8duJlFzsrX2u6TRD8Y/2Bh01aeEpBlx9eWcTV7BAbVV/4KqWBYP4wQ+TQPVpnngm1W /YUg== X-Gm-Message-State: ABy/qLbXtOYkwzum4MZ3/k7Z2NgilV38ZFKwni3q0MxHMrbySvh9wp3R /GndKYKh/4arpudF0RHIvWUQ5A== X-Google-Smtp-Source: APBJJlH/lg4oTSZbHAKPN8rwOR56sbPzFQ7heIkgJJwm526RXVKLXK+YgdRFG1edBknUKdndhVUQew== X-Received: by 2002:a05:600c:2059:b0:3fb:d1db:545a with SMTP id p25-20020a05600c205900b003fbd1db545amr7934769wmg.15.1688492787580; Tue, 04 Jul 2023 10:46:27 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id p8-20020a7bcc88000000b003fb225d414fsm24327367wma.21.2023.07.04.10.46.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2023 10:46:26 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: ee8b0c436d72 - main - lib/libc/string: replace ffs/fls implementations with clang builtins: cc: error: no such file or directory: '/usr/src/lib/libc/i386/string/ffs.S' From: Jessica Clarke In-Reply-To: <20230704193224.392af7f9@thor.intern.walstatt.dynvpn.de> Date: Tue, 4 Jul 2023 18:46:16 +0100 Cc: Robert Clausecker , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202307032023.363KNhu6031914@gitrepo.freebsd.org> <20230704193224.392af7f9@thor.intern.walstatt.dynvpn.de> To: FreeBSD User X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4QwVb95km4z3r7R X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4 Jul 2023, at 18:31, FreeBSD User wrote: >=20 > Am Mon, 3 Jul 2023 20:23:43 GMT > Robert Clausecker schrieb: >=20 > This commit seems to break buildworld: >=20 > [...] >=20 > cc -DCOMPAT_32BIT -march=3Di686 -mmmx -msse -msse2 -target = x86_64-unknown-freebsd14.0 -m32 > --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp = -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 -fpic -DPIC -O2 -pipe -O3 = -fno-common > -DNO__SCCSID -DNO__RCSID -I/usr/src/lib/libc/include = -I/usr/src/include > -I/usr/src/lib/libc/i386 -DNLS -ftls-model=3Dinitial-exec = -DCRT_IRELOC_REL > -DINIT_IRELOCS=3D"init_cpu_features()" -I/usr/src/lib/libc/csu/i386 = -D__DBINTERFACE_PRIVATE > -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 > -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc = -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE > -DPOSIX_MISTAKE -I/usr/src/lib/libmd = -I/usr/src/contrib/jemalloc/include -DMALLOC_PRODUCTION > -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN = -I/usr/src/lib/libc/rpc -DYP > -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD -MF.depend.ffs.pico = -MTffs.pico -std=3Dgnu99 > -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers = -Wall -Wno-format-y2k > -Wno-uninit--- ffs.nossppico --- cc -DCOMPAT_32BIT -march=3Di686 -mmmx = -msse -msse2 -target > x86_64-unknown-freebsd14.0 -m32 = --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin = -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 -fpic > -DPIC -O2 -pipe -O3 -fno-common -DNO__SCCSID -DNO__RCSID = -I/usr/src/lib/libc/include > -I/usr/src/include -I/usr/src/lib/libc/i386 -DNLS = -ftls-model=3Dinitial-exec -DCRT_IRELOC_REL > -DINIT_IRELOCS=3D"init_cpu_features()" -I/usr/src/lib/libc/csu/i386 = -D__DBINTERFACE_PRIVATE > -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 > -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc = -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE > -DPOSIX_MISTAKE -I/usr/src/lib/libmd = -I/usr/src/contrib/jemalloc/include -DMALLOC_PRODUCTION > -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN = -I/usr/src/lib/libc/rpc -DYP > -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD -MF.depend.ffs.nossppico = -MTffs.nossppico > -std=3Dgnu99 -Wno-format-zero-length -Wsystem-headers -Wall = -Wno-format-y2k -Wno-uninitialized > -Wno-pointe--- ffsl.nossppico --- cc -DCOMPAT_32BIT -march=3Di686 = -mmmx -msse -msse2 -target > x86_64-unknown-freebsd14.0 -m32 = --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin = -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 -fpic > -DPIC -O2 -pipe -O3 -fno-common -DNO__SCCSID -DNO__RCSID = -I/usr/src/lib/libc/include > -I/usr/src/include -I/usr/src/lib/libc/i386 -DNLS = -ftls-model=3Dinitial-exec -DCRT_IRELOC_REL > -DINIT_IRELOCS=3D"init_cpu_features()" -I/usr/src/lib/libc/csu/i386 = -D__DBINTERFACE_PRIVATE > -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 > -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc = -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE > -DPOSIX_MISTAKE -I/usr/src/lib/libmd = -I/usr/src/contrib/jemalloc/include -DMALLOC_PRODUCTION > -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN = -I/usr/src/lib/libc/rpc -DYP > -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD = -MF.depend.ffsl.nossppico -MTffsl.nossppico > -std=3Dgnu99 -Wno-format-zero-length -Wsystem-headers -Wall = -Wno-format-y2k -Wno-uninitialized > -Wno-p--- ffs.pico --- ialized -Wno-pointer-sign -Wdate-time = -Wno-empty-body > -Wno-string-plus-int -Wno-unused-const-variable = -Wno-error=3Dunused-but-set-parameter > -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality = -Wno-unused-function > -Wno-enum-conversion -Wno-unused-local-typedef = -Wno-address-of-packed-member -Wno-switch > -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments = -I/usr/src/lib/libutil > -I/usr/src/lib/msun/i387 -I/usr/src/lib/msun/x86 = -I/usr/src/lib/msun/src -c > /usr/src/lib/libc/i386/string/ffs.S -o ffs.pico cc: error: no such = file or directory: > '/usr/src/lib/libc/i386/string/ffs.S' cc: error: no input files >=20 > [...] > --- ffs.pico --- > *** [ffs.pico] Error code 1 >=20 > make[4]: stopped in /usr/src/lib/libc > --- ffs.nossppico --- > cc: error: no such file or directory: = '/usr/src/lib/libc/i386/string/ffs.S' > cc: error: no input files > *** [ffs.nossppico] Error code 1 > [...] That looks like a missing depends cleanup (needed for arm and i386). I assume this is a -DWITHOUT_CLEAN (-DNO_CLEAN) build? Jess >> The branch main has been updated by fuz: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dee8b0c436d7221c25e8be3c3fe1f9da7= 8b9d5b16 >>=20 >> commit ee8b0c436d7221c25e8be3c3fe1f9da78b9d5b16 >> Author: Robert Clausecker >> AuthorDate: 2023-06-23 16:22:54 +0000 >> Commit: Robert Clausecker >> CommitDate: 2023-07-03 20:18:27 +0000 >>=20 >> lib/libc/string: replace ffs/fls implementations with clang = builtins >>=20 >> Most architectures we support (except for riscv64) have = instructions >> to compute these functions very quickly. Replace old code with = the >> ffs and clz builtin functions, allowing clang to generate good = code >> for all architectures. >>=20 >> As a consequence, toss out arm and i386 ffs() implementations. >>=20 >> Sponsored by: FreeBSD Foundation >> Approved by: mhorne >> MFC after: 1 week >> Differential Revision: https://reviews.freebsd.org/D40730 >> --- >> lib/libc/arm/string/Makefile.inc | 1 - >> lib/libc/arm/string/ffs.S | 57 = --------------------------------------- >> lib/libc/i386/string/Makefile.inc | 1 - >> lib/libc/i386/string/ffs.S | 56 = -------------------------------------- >> lib/libc/string/ffs.c | 12 ++++----- >> lib/libc/string/ffsl.c | 12 ++++----- >> lib/libc/string/ffsll.c | 12 ++++----- >> lib/libc/string/fls.c | 13 +++++---- >> lib/libc/string/flsl.c | 14 +++++----- >> lib/libc/string/flsll.c | 13 +++++---- >> 10 files changed, 34 insertions(+), 157 deletions(-) >>=20 >> diff --git a/lib/libc/arm/string/Makefile.inc = b/lib/libc/arm/string/Makefile.inc >> index cf3175ea4e8c..550de34adb0e 100644 >> --- a/lib/libc/arm/string/Makefile.inc >> +++ b/lib/libc/arm/string/Makefile.inc >> @@ -3,7 +3,6 @@ >> MDSRCS+=3D \ >> bcopy.S \ >> bzero.S \ >> - ffs.S \ >> memcmp.S \ >> memcpy.S \ >> memmove.S \ >> diff --git a/lib/libc/arm/string/ffs.S b/lib/libc/arm/string/ffs.S >> deleted file mode 100644 >> index 5756dd81d21d..000000000000 >> --- a/lib/libc/arm/string/ffs.S >> +++ /dev/null >> @@ -1,57 +0,0 @@ >> -/* $NetBSD: ffs.S,v 1.5 2003/04/05 23:08:52 bjh21 Exp $ */ >> -/* >> - * Copyright (c) 2001 Christopher Gilbert >> - * 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. >> - * 3. The name of the company nor the name of the author may be used = to >> - * endorse or promote products derived from this software without = specific >> - * prior written permission. >> - * >> - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS = OR >> - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED = WARRANTIES >> - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE = DISCLAIMED. >> - * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY = DIRECT, >> - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL = DAMAGES >> - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS = OR >> - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) >> - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT >> - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY >> - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF >> - * SUCH DAMAGE. >> - */ >> - >> -#include >> - >> -__FBSDID("$FreeBSD$"); >> - >> -.syntax unified >> - >> -/* >> - * ffs - find first set bit, this algorithm isolates the first set >> - * bit, then multiplies the number by 0x0450fbaf which leaves the = top >> - * 6 bits as an index into the table. This algorithm should be a = win >> - * over the checking each bit in turn as per the C compiled version. >> - * >> - * This is the ffs algorithm devised by d.seal and posted to = comp.sys.arm on >> - * 16 Feb 1994. >> - */ >> - >> -ENTRY(ffs) >> - /* Standard trick to isolate bottom bit in r0 or 0 if r0 =3D 0 on = entry */ >> - rsb r1, r0, #0 >> - ands r0, r0, r1 >> - itt ne >> - clzne r0, r0 >> - rsbne r0, r0, #32 >> - RET >> -END(ffs) >> - >> - .section .note.GNU-stack,"",%progbits >> diff --git a/lib/libc/i386/string/Makefile.inc = b/lib/libc/i386/string/Makefile.inc >> index a8c50a285cbd..f3678b93bec3 100644 >> --- a/lib/libc/i386/string/Makefile.inc >> +++ b/lib/libc/i386/string/Makefile.inc >> @@ -4,7 +4,6 @@ MDSRCS+=3D \ >> bcmp.S \ >> bcopy.S \ >> bzero.S \ >> - ffs.S \ >> memcmp.S \ >> memcpy.S \ >> memmove.S \ >> diff --git a/lib/libc/i386/string/ffs.S b/lib/libc/i386/string/ffs.S >> deleted file mode 100644 >> index 3a0431c6a845..000000000000 >> --- a/lib/libc/i386/string/ffs.S >> +++ /dev/null >> @@ -1,56 +0,0 @@ >> -/* >> - * Copyright (c) 1993 Winning Strategies, Inc. >> - * All rights reserved. >> - * >> - * Redistribution and use in source and binary forms, with or = without >> - * modification, are permitted provided that the following = conditions >> - * are met: >> - * 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. >> - * 3. All advertising materials mentioning features or use of this = software >> - * must display the following acknowledgement: >> - * This product includes software developed by Winning = Strategies, Inc. >> - * 4. The name of the author may not be used to endorse or promote = products >> - * derived from this software without specific prior written = permission >> - * >> - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS = OR >> - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED = WARRANTIES >> - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE = DISCLAIMED. >> - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, >> - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES = (INCLUDING, BUT >> - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS = OF USE, >> - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON = ANY >> - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR = TORT >> - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE = USE OF >> - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >> - */ >> - >> -#include >> -__FBSDID("$FreeBSD$"); >> - >> -/* >> - * ffs(value) >> - * finds the first bit set in value and returns the index of=20 >> - * that bit. Bits are numbered starting from 1, starting at the >> - * rightmost bit. A return value of 0 means that the argument >> - * was zero. >> - * >> - * Written by: >> - * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. >> - */ >> - >> -ENTRY(ffs) >> - bsfl 4(%esp),%eax >> - jz L1 /* ZF is set if all bits are 0 */ >> - incl %eax /* bits numbered from 1, not 0 */ >> - ret >> - >> - .align 2 >> -L1: xorl %eax,%eax /* clear result */ >> - ret >> -END(ffs) >> - >> - .section .note.GNU-stack,"",%progbits >> diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c >> index 738ef90ce091..c011b3390612 100644 >> --- a/lib/libc/string/ffs.c >> +++ b/lib/libc/string/ffs.c >> @@ -3,6 +3,10 @@ >> * >> * Copyright (c) 1990, 1993 >> * The Regents of the University of California. All rights reserved. >> + * Copyright (c) 2023 The FreeBSD Foundation >> + * >> + * Portions of this software were developed by Robert Clausecker >> + * 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 >> @@ -43,11 +47,5 @@ __FBSDID("$FreeBSD$"); >> int >> ffs(int mask) >> { >> - int bit; >> - >> - if (mask =3D=3D 0) >> - return(0); >> - for (bit =3D 1; !(mask & 1); bit++) >> - mask =3D (unsigned int)mask >> 1; >> - return (bit); >> + return (__builtin_ffs(mask)); >> } >> diff --git a/lib/libc/string/ffsl.c b/lib/libc/string/ffsl.c >> index dbd894b9655b..6e1ac8ec45c1 100644 >> --- a/lib/libc/string/ffsl.c >> +++ b/lib/libc/string/ffsl.c >> @@ -3,6 +3,10 @@ >> * >> * Copyright (c) 1990, 1993 >> * The Regents of the University of California. All rights reserved. >> + * Copyright (c) 2023 The FreeBSD Foundation >> + * >> + * Portions of this software were developed by Robert Clausecker >> + * 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 >> @@ -40,11 +44,5 @@ __FBSDID("$FreeBSD$"); >> int >> ffsl(long mask) >> { >> - int bit; >> - >> - if (mask =3D=3D 0) >> - return (0); >> - for (bit =3D 1; !(mask & 1); bit++) >> - mask =3D (unsigned long)mask >> 1; >> - return (bit); >> + return (__builtin_ffsl(mask)); >> } >> diff --git a/lib/libc/string/ffsll.c b/lib/libc/string/ffsll.c >> index 91886de2f127..b945658b9008 100644 >> --- a/lib/libc/string/ffsll.c >> +++ b/lib/libc/string/ffsll.c >> @@ -3,6 +3,10 @@ >> * >> * Copyright (c) 1990, 1993 >> * The Regents of the University of California. All rights reserved. >> + * Copyright (c) 2023 The FreeBSD Foundation >> + * >> + * Portions of this software were developed by Robert Clausecker >> + * 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 >> @@ -40,11 +44,5 @@ __FBSDID("$FreeBSD$"); >> int >> ffsll(long long mask) >> { >> - int bit; >> - >> - if (mask =3D=3D 0) >> - return (0); >> - for (bit =3D 1; !(mask & 1); bit++) >> - mask =3D (unsigned long long)mask >> 1; >> - return (bit); >> + return (__builtin_ffsll(mask)); >> } >> diff --git a/lib/libc/string/fls.c b/lib/libc/string/fls.c >> index d9edc41f9599..3c4719776778 100644 >> --- a/lib/libc/string/fls.c >> +++ b/lib/libc/string/fls.c >> @@ -3,6 +3,10 @@ >> * >> * Copyright (c) 1990, 1993 >> * The Regents of the University of California. All rights reserved. >> + * Copyright (c) 2023 The FreeBSD Foundation >> + * >> + * Portions of this software were developed by Robert Clausecker >> + * 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 >> @@ -32,6 +36,7 @@ >> #include >> __FBSDID("$FreeBSD$"); >>=20 >> +#include >> #include >>=20 >> /* >> @@ -40,11 +45,5 @@ __FBSDID("$FreeBSD$"); >> int >> fls(int mask) >> { >> - int bit; >> - >> - if (mask =3D=3D 0) >> - return (0); >> - for (bit =3D 1; mask !=3D 1; bit++) >> - mask =3D (unsigned int)mask >> 1; >> - return (bit); >> + return (mask =3D=3D 0 ? 0 : CHAR_BIT * sizeof(mask) - = __builtin_clz(mask)); >> } >> diff --git a/lib/libc/string/flsl.c b/lib/libc/string/flsl.c >> index 60370cf7d832..f5280b77a4e2 100644 >> --- a/lib/libc/string/flsl.c >> +++ b/lib/libc/string/flsl.c >> @@ -3,6 +3,11 @@ >> * >> * Copyright (c) 1990, 1993 >> * The Regents of the University of California. All rights reserved. >> + * Copyright (c) 2023 The FreeBSD Foundation >> + >> + * >> + * Portions of this software were developed by Robert Clausecker >> + * 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 >> @@ -32,6 +37,7 @@ >> #include >> __FBSDID("$FreeBSD$"); >>=20 >> +#include >> #include >>=20 >> /* >> @@ -40,11 +46,5 @@ __FBSDID("$FreeBSD$"); >> int >> flsl(long mask) >> { >> - int bit; >> - >> - if (mask =3D=3D 0) >> - return (0); >> - for (bit =3D 1; mask !=3D 1; bit++) >> - mask =3D (unsigned long)mask >> 1; >> - return (bit); >> + return (mask =3D=3D 0 ? 0 : CHAR_BIT * sizeof(mask) - = __builtin_clzl(mask)); >> } >> diff --git a/lib/libc/string/flsll.c b/lib/libc/string/flsll.c >> index 275aaa0e2e15..ab504b8e592f 100644 >> --- a/lib/libc/string/flsll.c >> +++ b/lib/libc/string/flsll.c >> @@ -3,6 +3,10 @@ >> * >> * Copyright (c) 1990, 1993 >> * The Regents of the University of California. All rights reserved. >> + * Copyright (c) 2023 The FreeBSD Foundation >> + * >> + * Portions of this software were developed by Robert Clausecker >> + * 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 >> @@ -32,6 +36,7 @@ >> #include >> __FBSDID("$FreeBSD$"); >>=20 >> +#include >> #include >>=20 >> /* >> @@ -40,11 +45,5 @@ __FBSDID("$FreeBSD$"); >> int >> flsll(long long mask) >> { >> - int bit; >> - >> - if (mask =3D=3D 0) >> - return (0); >> - for (bit =3D 1; mask !=3D 1; bit++) >> - mask =3D (unsigned long long)mask >> 1; >> - return (bit); >> + return (mask =3D=3D 0 ? 0 : CHAR_BIT * sizeof(mask) - = __builtin_clzll(mask)); >> } >>=20 >=20 >=20 >=20 > --=20 > O. Hartmann Jess From nobody Tue Jul 4 18:04:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwW114hQFz4lYyW; Tue, 4 Jul 2023 18:05:25 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [IPv6:2001:1640:5::8:31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwW1130dGz3x4v; Tue, 4 Jul 2023 18:05:25 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub2.goneo.de (hub2.goneo.de [85.220.129.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id 8BD0610A1E9A; Tue, 4 Jul 2023 20:05:22 +0200 (CEST) Received: from hub2.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPS id B2BE41040904; Tue, 4 Jul 2023 20:05:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1688493920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IJhPbhzcj1sfAwYwDFRPNJDAmsFnRyPwnM3GETEAk9Q=; b=o0XJNea75uG+T4R/yEkEh82vt8lECKBAkSDTvE8wzhflKa4ZnMkQnd/oUC5SrqfUCRe36H VWRn+qxgF42SehA9fPF6hIjOKgnEeAr3a0QsTixCpMg8rU+FYYxhN+UI2gnQCDDwUy742B lDfJNSpmhdZb905ut0qND6v3mrf8svsYx0PQj2JpLSBGzt0pzhQkSE88VJYiQK0tmikcK1 NmBE1A9SD708kKeYzRsMPx64EGhjD7UmeUgB0/l0ugCTMGkR58Ax8D5lXFz62B/x30P+lN 8C14LYwDXAKmyU65jr/TLPAOxJNMhVHJCO+nuj+hCqJhV0Ymk16b2iLptHje0w== Received: from thor.intern.walstatt.dynvpn.de (dynamic-089-014-087-069.89.14.pool.telefonica.de [89.14.87.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPSA id 606121040901; Tue, 4 Jul 2023 20:05:20 +0200 (CEST) Date: Tue, 4 Jul 2023 20:04:52 +0200 From: FreeBSD User To: Jessica Clarke Cc: Robert Clausecker , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: ee8b0c436d72 - main - lib/libc/string: replace ffs/fls implementations with clang builtins: cc: error: no such file or directory: '/usr/src/lib/libc/i386/string/ffs.S' Message-ID: <20230704200519.7be7c45e@thor.intern.walstatt.dynvpn.de> In-Reply-To: References: <202307032023.363KNhu6031914@gitrepo.freebsd.org> <20230704193224.392af7f9@thor.intern.walstatt.dynvpn.de> Organization: walstatt-de.de List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-UID: 8029e9 X-Rspamd-UID: 7133f8 X-Rspamd-Queue-Id: 4QwW1130dGz3x4v X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:25394, ipnet:2001:1640::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Am Tue, 4 Jul 2023 18:46:16 +0100 Jessica Clarke schrieb: > On 4 Jul 2023, at 18:31, FreeBSD User wrote: > > > > Am Mon, 3 Jul 2023 20:23:43 GMT > > Robert Clausecker schrieb: > > > > This commit seems to break buildworld: > > > > [...] > > > > cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd14.0 -m32 > > --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin > > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 -fpic -DPIC -O2 -pipe -O3 -fno-common > > -DNO__SCCSID -DNO__RCSID -I/usr/src/lib/libc/include -I/usr/src/include > > -I/usr/src/lib/libc/i386 -DNLS -ftls-model=initial-exec -DCRT_IRELOC_REL > > -DINIT_IRELOCS="init_cpu_features()" -I/usr/src/lib/libc/csu/i386 -D__DBINTERFACE_PRIVATE > > -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 > > -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE > > -DPOSIX_MISTAKE -I/usr/src/lib/libmd -I/usr/src/contrib/jemalloc/include > > -DMALLOC_PRODUCTION -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN > > -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD > > -MF.depend.ffs.pico -MTffs.pico -std=gnu99 -Wno-format-zero-length > > -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninit--- > > ffs.nossppico --- cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target > > x86_64-unknown-freebsd14.0 -m32 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 > > -fpic -DPIC -O2 -pipe -O3 -fno-common -DNO__SCCSID -DNO__RCSID -I/usr/src/lib/libc/include > > -I/usr/src/include -I/usr/src/lib/libc/i386 -DNLS -ftls-model=initial-exec > > -DCRT_IRELOC_REL -DINIT_IRELOCS="init_cpu_features()" -I/usr/src/lib/libc/csu/i386 > > -D__DBINTERFACE_PRIVATE -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 > > -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc -I/usr/src/lib/libc/resolv > > -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libmd -I/usr/src/contrib/jemalloc/include > > -DMALLOC_PRODUCTION -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN > > -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD > > -MF.depend.ffs.nossppico -MTffs.nossppico -std=gnu99 -Wno-format-zero-length > > -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointe--- ffsl.nossppico > > --- cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd14.0 > > -m32 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/tmp/usr/lib32 > > -fpic -DPIC -O2 -pipe -O3 -fno-common -DNO__SCCSID -DNO__RCSID > > -I/usr/src/lib/libc/include -I/usr/src/include -I/usr/src/lib/libc/i386 -DNLS > > -ftls-model=initial-exec -DCRT_IRELOC_REL -DINIT_IRELOCS="init_cpu_features()" > > -I/usr/src/lib/libc/csu/i386 -D__DBINTERFACE_PRIVATE -I/usr/src/contrib/gdtoa > > -I/usr/src/contrib/libc-vis -DINET6 -I/usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc > > -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libmd > > -I/usr/src/contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/src/lib/libc/locale > > -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING > > -DSYMBOL_VERSIONING -DNDEBUG -MD -MF.depend.ffsl.nossppico -MTffsl.nossppico -std=gnu99 > > -Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized > > -Wno-p--- ffs.pico --- ialized -Wno-pointer-sign -Wdate-time -Wno-empty-body > > -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-parameter > > -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function > > -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch > > -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -I/usr/src/lib/libutil > > -I/usr/src/lib/msun/i387 -I/usr/src/lib/msun/x86 -I/usr/src/lib/msun/src -c > > /usr/src/lib/libc/i386/string/ffs.S -o ffs.pico cc: error: no such file or directory: > > '/usr/src/lib/libc/i386/string/ffs.S' cc: error: no input files > > > > [...] > > --- ffs.pico --- > > *** [ffs.pico] Error code 1 > > > > make[4]: stopped in /usr/src/lib/libc > > --- ffs.nossppico --- > > cc: error: no such file or directory: '/usr/src/lib/libc/i386/string/ffs.S' > > cc: error: no input files > > *** [ffs.nossppico] Error code 1 > > [...] > > That looks like a missing depends cleanup (needed for arm and i386). I > assume this is a -DWITHOUT_CLEAN (-DNO_CLEAN) build? > > Jess Yes, indeed. oh > > >> The branch main has been updated by fuz: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=ee8b0c436d7221c25e8be3c3fe1f9da78b9d5b16 > >> > >> commit ee8b0c436d7221c25e8be3c3fe1f9da78b9d5b16 > >> Author: Robert Clausecker > >> AuthorDate: 2023-06-23 16:22:54 +0000 > >> Commit: Robert Clausecker > >> CommitDate: 2023-07-03 20:18:27 +0000 > >> > >> lib/libc/string: replace ffs/fls implementations with clang builtins > >> > >> Most architectures we support (except for riscv64) have instructions > >> to compute these functions very quickly. Replace old code with the > >> ffs and clz builtin functions, allowing clang to generate good code > >> for all architectures. > >> > >> As a consequence, toss out arm and i386 ffs() implementations. > >> > >> Sponsored by: FreeBSD Foundation > >> Approved by: mhorne > >> MFC after: 1 week > >> Differential Revision: https://reviews.freebsd.org/D40730 > >> --- > >> lib/libc/arm/string/Makefile.inc | 1 - > >> lib/libc/arm/string/ffs.S | 57 --------------------------------------- > >> lib/libc/i386/string/Makefile.inc | 1 - > >> lib/libc/i386/string/ffs.S | 56 -------------------------------------- > >> lib/libc/string/ffs.c | 12 ++++----- > >> lib/libc/string/ffsl.c | 12 ++++----- > >> lib/libc/string/ffsll.c | 12 ++++----- > >> lib/libc/string/fls.c | 13 +++++---- > >> lib/libc/string/flsl.c | 14 +++++----- > >> lib/libc/string/flsll.c | 13 +++++---- > >> 10 files changed, 34 insertions(+), 157 deletions(-) > >> > >> diff --git a/lib/libc/arm/string/Makefile.inc b/lib/libc/arm/string/Makefile.inc > >> index cf3175ea4e8c..550de34adb0e 100644 > >> --- a/lib/libc/arm/string/Makefile.inc > >> +++ b/lib/libc/arm/string/Makefile.inc > >> @@ -3,7 +3,6 @@ > >> MDSRCS+= \ > >> bcopy.S \ > >> bzero.S \ > >> - ffs.S \ > >> memcmp.S \ > >> memcpy.S \ > >> memmove.S \ > >> diff --git a/lib/libc/arm/string/ffs.S b/lib/libc/arm/string/ffs.S > >> deleted file mode 100644 > >> index 5756dd81d21d..000000000000 > >> --- a/lib/libc/arm/string/ffs.S > >> +++ /dev/null > >> @@ -1,57 +0,0 @@ > >> -/* $NetBSD: ffs.S,v 1.5 2003/04/05 23:08:52 bjh21 Exp $ */ > >> -/* > >> - * Copyright (c) 2001 Christopher Gilbert > >> - * 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. > >> - * 3. The name of the company nor the name of the author may be used to > >> - * endorse or promote products derived from this software without specific > >> - * prior written permission. > >> - * > >> - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > >> - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > >> - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > >> - * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > >> - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > >> - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > >> - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > >> - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > >> - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > >> - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > >> - * SUCH DAMAGE. > >> - */ > >> - > >> -#include > >> - > >> -__FBSDID("$FreeBSD$"); > >> - > >> -.syntax unified > >> - > >> -/* > >> - * ffs - find first set bit, this algorithm isolates the first set > >> - * bit, then multiplies the number by 0x0450fbaf which leaves the top > >> - * 6 bits as an index into the table. This algorithm should be a win > >> - * over the checking each bit in turn as per the C compiled version. > >> - * > >> - * This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on > >> - * 16 Feb 1994. > >> - */ > >> - > >> -ENTRY(ffs) > >> - /* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */ > >> - rsb r1, r0, #0 > >> - ands r0, r0, r1 > >> - itt ne > >> - clzne r0, r0 > >> - rsbne r0, r0, #32 > >> - RET > >> -END(ffs) > >> - > >> - .section .note.GNU-stack,"",%progbits > >> diff --git a/lib/libc/i386/string/Makefile.inc b/lib/libc/i386/string/Makefile.inc > >> index a8c50a285cbd..f3678b93bec3 100644 > >> --- a/lib/libc/i386/string/Makefile.inc > >> +++ b/lib/libc/i386/string/Makefile.inc > >> @@ -4,7 +4,6 @@ MDSRCS+= \ > >> bcmp.S \ > >> bcopy.S \ > >> bzero.S \ > >> - ffs.S \ > >> memcmp.S \ > >> memcpy.S \ > >> memmove.S \ > >> diff --git a/lib/libc/i386/string/ffs.S b/lib/libc/i386/string/ffs.S > >> deleted file mode 100644 > >> index 3a0431c6a845..000000000000 > >> --- a/lib/libc/i386/string/ffs.S > >> +++ /dev/null > >> @@ -1,56 +0,0 @@ > >> -/* > >> - * Copyright (c) 1993 Winning Strategies, Inc. > >> - * All rights reserved. > >> - * > >> - * Redistribution and use in source and binary forms, with or without > >> - * modification, are permitted provided that the following conditions > >> - * are met: > >> - * 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. > >> - * 3. All advertising materials mentioning features or use of this software > >> - * must display the following acknowledgement: > >> - * This product includes software developed by Winning Strategies, Inc. > >> - * 4. The name of the author may not be used to endorse or promote products > >> - * derived from this software without specific prior written permission > >> - * > >> - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > >> - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > >> - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > >> - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > >> - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > >> - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > >> - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > >> - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > >> - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > >> - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > >> - */ > >> - > >> -#include > >> -__FBSDID("$FreeBSD$"); > >> - > >> -/* > >> - * ffs(value) > >> - * finds the first bit set in value and returns the index of > >> - * that bit. Bits are numbered starting from 1, starting at the > >> - * rightmost bit. A return value of 0 means that the argument > >> - * was zero. > >> - * > >> - * Written by: > >> - * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. > >> - */ > >> - > >> -ENTRY(ffs) > >> - bsfl 4(%esp),%eax > >> - jz L1 /* ZF is set if all bits are 0 */ > >> - incl %eax /* bits numbered from 1, not 0 */ > >> - ret > >> - > >> - .align 2 > >> -L1: xorl %eax,%eax /* clear result */ > >> - ret > >> -END(ffs) > >> - > >> - .section .note.GNU-stack,"",%progbits > >> diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c > >> index 738ef90ce091..c011b3390612 100644 > >> --- a/lib/libc/string/ffs.c > >> +++ b/lib/libc/string/ffs.c > >> @@ -3,6 +3,10 @@ > >> * > >> * Copyright (c) 1990, 1993 > >> * The Regents of the University of California. All rights reserved. > >> + * Copyright (c) 2023 The FreeBSD Foundation > >> + * > >> + * Portions of this software were developed by Robert Clausecker > >> + * 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 > >> @@ -43,11 +47,5 @@ __FBSDID("$FreeBSD$"); > >> int > >> ffs(int mask) > >> { > >> - int bit; > >> - > >> - if (mask == 0) > >> - return(0); > >> - for (bit = 1; !(mask & 1); bit++) > >> - mask = (unsigned int)mask >> 1; > >> - return (bit); > >> + return (__builtin_ffs(mask)); > >> } > >> diff --git a/lib/libc/string/ffsl.c b/lib/libc/string/ffsl.c > >> index dbd894b9655b..6e1ac8ec45c1 100644 > >> --- a/lib/libc/string/ffsl.c > >> +++ b/lib/libc/string/ffsl.c > >> @@ -3,6 +3,10 @@ > >> * > >> * Copyright (c) 1990, 1993 > >> * The Regents of the University of California. All rights reserved. > >> + * Copyright (c) 2023 The FreeBSD Foundation > >> + * > >> + * Portions of this software were developed by Robert Clausecker > >> + * 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 > >> @@ -40,11 +44,5 @@ __FBSDID("$FreeBSD$"); > >> int > >> ffsl(long mask) > >> { > >> - int bit; > >> - > >> - if (mask == 0) > >> - return (0); > >> - for (bit = 1; !(mask & 1); bit++) > >> - mask = (unsigned long)mask >> 1; > >> - return (bit); > >> + return (__builtin_ffsl(mask)); > >> } > >> diff --git a/lib/libc/string/ffsll.c b/lib/libc/string/ffsll.c > >> index 91886de2f127..b945658b9008 100644 > >> --- a/lib/libc/string/ffsll.c > >> +++ b/lib/libc/string/ffsll.c > >> @@ -3,6 +3,10 @@ > >> * > >> * Copyright (c) 1990, 1993 > >> * The Regents of the University of California. All rights reserved. > >> + * Copyright (c) 2023 The FreeBSD Foundation > >> + * > >> + * Portions of this software were developed by Robert Clausecker > >> + * 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 > >> @@ -40,11 +44,5 @@ __FBSDID("$FreeBSD$"); > >> int > >> ffsll(long long mask) > >> { > >> - int bit; > >> - > >> - if (mask == 0) > >> - return (0); > >> - for (bit = 1; !(mask & 1); bit++) > >> - mask = (unsigned long long)mask >> 1; > >> - return (bit); > >> + return (__builtin_ffsll(mask)); > >> } > >> diff --git a/lib/libc/string/fls.c b/lib/libc/string/fls.c > >> index d9edc41f9599..3c4719776778 100644 > >> --- a/lib/libc/string/fls.c > >> +++ b/lib/libc/string/fls.c > >> @@ -3,6 +3,10 @@ > >> * > >> * Copyright (c) 1990, 1993 > >> * The Regents of the University of California. All rights reserved. > >> + * Copyright (c) 2023 The FreeBSD Foundation > >> + * > >> + * Portions of this software were developed by Robert Clausecker > >> + * 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 > >> @@ -32,6 +36,7 @@ > >> #include > >> __FBSDID("$FreeBSD$"); > >> > >> +#include > >> #include > >> > >> /* > >> @@ -40,11 +45,5 @@ __FBSDID("$FreeBSD$"); > >> int > >> fls(int mask) > >> { > >> - int bit; > >> - > >> - if (mask == 0) > >> - return (0); > >> - for (bit = 1; mask != 1; bit++) > >> - mask = (unsigned int)mask >> 1; > >> - return (bit); > >> + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clz(mask)); > >> } > >> diff --git a/lib/libc/string/flsl.c b/lib/libc/string/flsl.c > >> index 60370cf7d832..f5280b77a4e2 100644 > >> --- a/lib/libc/string/flsl.c > >> +++ b/lib/libc/string/flsl.c > >> @@ -3,6 +3,11 @@ > >> * > >> * Copyright (c) 1990, 1993 > >> * The Regents of the University of California. All rights reserved. > >> + * Copyright (c) 2023 The FreeBSD Foundation > >> + > >> + * > >> + * Portions of this software were developed by Robert Clausecker > >> + * 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 > >> @@ -32,6 +37,7 @@ > >> #include > >> __FBSDID("$FreeBSD$"); > >> > >> +#include > >> #include > >> > >> /* > >> @@ -40,11 +46,5 @@ __FBSDID("$FreeBSD$"); > >> int > >> flsl(long mask) > >> { > >> - int bit; > >> - > >> - if (mask == 0) > >> - return (0); > >> - for (bit = 1; mask != 1; bit++) > >> - mask = (unsigned long)mask >> 1; > >> - return (bit); > >> + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clzl(mask)); > >> } > >> diff --git a/lib/libc/string/flsll.c b/lib/libc/string/flsll.c > >> index 275aaa0e2e15..ab504b8e592f 100644 > >> --- a/lib/libc/string/flsll.c > >> +++ b/lib/libc/string/flsll.c > >> @@ -3,6 +3,10 @@ > >> * > >> * Copyright (c) 1990, 1993 > >> * The Regents of the University of California. All rights reserved. > >> + * Copyright (c) 2023 The FreeBSD Foundation > >> + * > >> + * Portions of this software were developed by Robert Clausecker > >> + * 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 > >> @@ -32,6 +36,7 @@ > >> #include > >> __FBSDID("$FreeBSD$"); > >> > >> +#include > >> #include > >> > >> /* > >> @@ -40,11 +45,5 @@ __FBSDID("$FreeBSD$"); > >> int > >> flsll(long long mask) > >> { > >> - int bit; > >> - > >> - if (mask == 0) > >> - return (0); > >> - for (bit = 1; mask != 1; bit++) > >> - mask = (unsigned long long)mask >> 1; > >> - return (bit); > >> + return (mask == 0 ? 0 : CHAR_BIT * sizeof(mask) - __builtin_clzll(mask)); > >> } > >> > > > > > > > > -- > > O. Hartmann > > > Jess > > -- O. Hartmann From nobody Tue Jul 4 19:08:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwXPc2XfXz4lGLN; Tue, 4 Jul 2023 19:08: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 4QwXPb6Lgbz4L23; Tue, 4 Jul 2023 19:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688497699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKCCVPLdA7KbLUFhkgZHZPuUGhVIkBYbg/llzf5+M10=; b=qR94YUfkGDZ6nCMpI6xxFsk0+yJqlvCkR21nNQdk+7H4wouRWERprAhL92V/405nPFRYqy AFCxn78ZeQPb+0PqSxr+JgcfgFL/p8LnLy5OBnzzFVzA1B0PWc+vl0WdZSxAsjjxHED0c5 1sw55cDYstbdc/BEdJnJ1w9p1NFVcMk31v2jzE/bllPJ+7eeUyJAVD1SrRK5AD/KT9rDxT kHc7S99h8I1rVSgvU+g3864XRwNATZ0H/WWncxZtXKHi13DL4yCGBXYHVoWj33Lnm/Z2ct yPIK6/MkbT+NdDocLkGsd9+Uu8RE0Dg7FoVFCHQufn/UXLA2oMTIw2Lr32+o9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688497699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKCCVPLdA7KbLUFhkgZHZPuUGhVIkBYbg/llzf5+M10=; b=Djf5417PHDQVxTBvvxTuTFAhJLvAqyc7mUFLYdFye+DBWUhXp4Dq92ay+51WQdQ6PwH+bs Fk47QiFmPGbBzVJPSWn1Oe50WvdPxnO4JjQ3W2fd626I0INFYrUmtWzp0svPU06jnJXW9k J9CLmYqO42mnOiJv3gLZ7fBMq1b+NASxv5ulrcbwvEKEhYET1U+mCdOtRvuOB64Bl+j3MR EDLxKu1nAk8KU03OtvqWss+ycPPHj+/avpeq77EwVR7y3Ez5jIO8atcRqXsLKWQ0wBhc6Z FVWWDX8OAt2+++W+SxDxtQS8q/kUyPKzY0VR1rEAoAi1OS/TR6deAVNsB4sfVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688497699; a=rsa-sha256; cv=none; b=S47/pDoOD9iCGe5/mCON2Z0jFyq3hqnj0tjd7t80eigLHcSykbCKh/btyLFqKiWQlYgD5u bJMwku6Xx0IEqJy7GO+GkJyHxhrDZtmscGdpYE5E8rXYXzsPfJ4MAm9HhKqr7O4K2sKnPq hQNp3m3sBfMa5K0mKpdM70y3Jr91J5UGQOs/UTo14me+UHssgYJI53FfxUPlmomtp/lxDp rmDAEIy3YBgHaHl3QPCnb2ZElbrzxDPkOhxXMI1UgpaNeZGKXGUMwijU4R9SZT5MZndo0B wiNj22f+ihPl3g6tA9FP2169MaH09H4eDdN+Zu0Q6RBXkNGb2x3AreWa2yjIeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwXPb589DzkZs; Tue, 4 Jul 2023 19:08: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 364J8JCY080976; Tue, 4 Jul 2023 19:08:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364J8Jai080975; Tue, 4 Jul 2023 19:08:19 GMT (envelope-from git) Date: Tue, 4 Jul 2023 19:08:19 GMT Message-Id: <202307041908.364J8Jai080975@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: 0457eebbe83f - main - libcrypto: add missing symbols to the legacy provider List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0457eebbe83f951238387f6f720597f3165c3828 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0457eebbe83f951238387f6f720597f3165c3828 commit 0457eebbe83f951238387f6f720597f3165c3828 Author: Pierre Pronchery AuthorDate: 2023-06-29 21:32:59 +0000 Commit: Mark Johnston CommitDate: 2023-07-04 19:04:04 +0000 libcrypto: add missing symbols to the legacy provider OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. One such provider, "legacy", ships with OpenSSL 3 directly, and groups obsoleted algorithms that can still optionally be used anyway. The import of OpenSSL 3.0.9 was building this provider incorrectly, missing symbols required for proper operation. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- secure/lib/libcrypto/modules/Makefile.inc | 3 ++- secure/lib/libcrypto/modules/legacy/Makefile | 34 +++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc index e2f8e9437953..9047c938ef1d 100644 --- a/secure/lib/libcrypto/modules/Makefile.inc +++ b/secure/lib/libcrypto/modules/Makefile.inc @@ -11,6 +11,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include .include -.PATH: ${LCRYPTO_SRC}/providers +.PATH: ${LCRYPTO_SRC}/providers \ + ${LCRYPTO_SRC}/providers/common WARNS?= 0 diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index 3ed4bed6cd52..3eef2549d44f 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -2,6 +2,38 @@ SHLIB_NAME?= legacy.so -SRCS= legacyprov.c +SRCS= legacyprov.c prov_running.c + +# common +SRCS+= provider_err.c provider_ctx.c +SRCS+= provider_util.c + +# ciphers +SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ + ciphercommon_gcm.c ciphercommon_gcm_hw.c \ + ciphercommon_ccm.c ciphercommon_ccm_hw.c +SRCS+= cipher_desx.c cipher_desx_hw.c cipher_des.c cipher_des_hw.c +SRCS+= cipher_tdes_common.c +SRCS+= cipher_blowfish.c cipher_blowfish_hw.c +SRCS+= cipher_cast5.c cipher_cast5_hw.c +SRCS+= cipher_rc2.c cipher_rc2_hw.c +SRCS+= cipher_rc4.c cipher_rc4_hw.c +SRCS+= cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c +SRCS+= cipher_seed.c cipher_seed_hw.c + +# digests +SRCS+= digestcommon.c +SRCS+= md4_prov.c wp_prov.c ripemd_prov.c + +# kdfs +SRCS+= pbkdf1.c + +# ssl +SRCS+= record/tls_pad.c .include + +.PATH: ${LCRYPTO_SRC}/providers/implementations/ciphers \ + ${LCRYPTO_SRC}/providers/implementations/digests \ + ${LCRYPTO_SRC}/providers/implementations/kdfs \ + ${LCRYPTO_SRC}/ssl From nobody Tue Jul 4 19:08:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwXPd1j3tz4lG94; Tue, 4 Jul 2023 19:08: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 4QwXPc6mHLz4L26; Tue, 4 Jul 2023 19:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688497701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/MaRfDYwPdJzXvxpW2rClvrLGBeKCF9437D3AN0z3lA=; b=SwbwXDSGvk20Uhu2Q6ye//KbRXYvKRTYwFMTGGJpGy/Jx7vWmgoSVODUiw9g0q3mj8viFd +CRPCP4gfse+EpjoPJu69UEpQVirtTgCPaNbpToOyjrW1toUnGBoPU3sSYu6m6qvOg7G9a BG6juPTvKfiinuk883bhd03ICr52E5durSc8NJBgdjF4nzd6yKF32sVO4r/vDPTqTW9/Rh J+Bftuw+1LblVjBlaOppHFxHbIpKqsowJqU4dI31ncmtOCW9G3NcQjRgvPJpqwp41SQQJB bj7WZaf/XoEsSZ/52MVjSxomqpBwJJ/3b5babaM1fgOrDHyeeDxYSXb7o/rsFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688497700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/MaRfDYwPdJzXvxpW2rClvrLGBeKCF9437D3AN0z3lA=; b=FGtVAtkpOpJ0b3UHYfDRSNUwcNgZI0gsM7aibXAGjUiFJv3z+9fWzwIkdaVSCpDCJ1qj6e dCnV8lSuGy5kUhW+PcHesJpjakC7AP0MfKlHbYaiFqHVj8BqpH1uxpLETZgvy9uLlxUOUe kB5v93P+I6C5UM7Y1EhMEiiefVN1BDAn8AjaIw2/P0zE0P7Klq1S8nlihJGCdUmL+vpj2y kQx9uFDyXfX4xxowW9n87bUH6S8Lrmjz2LWNH664zExkhWHXuxFv3R52tW2/cQgl9k/u86 otbFl7XX9rKSsINONrDsBeZYuycSC94T2zzLmtZ5Wnlcqzbkm1/BwP4ZI6ZS9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688497700; a=rsa-sha256; cv=none; b=ybVivUTcXl1M2wxumv1ZwL9diR7Sf3IwX/1vKWqZeVs322X7ojrXwTPTiBLO7rb6Vjsshb S/iojiZLzj0pO/IdG/15uG468AhADf/4k0a12kotCdki8yRGxKHiYM39Hx+1ckBS8mSpna PnlaDUaX8M5sv5ExFiGiN4Q3ADJJF6ouYlhlP3BSXAl1ZSgGjyZlgrAa1WqttJvT6qA3lr CUmqiMYF122P3aXaNZz68c4b8FHZ80KdtIN1zqRwMnXsap6GumqutTVSmZb3vUXlkVMK2u pLFpFvhyOChQxTgAiDKS+F4ic75Ex7vHxWIgC3406+7RHyVtASesEWZJrwzzcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwXPc5rvxzkyB; Tue, 4 Jul 2023 19:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 364J8KLq080995; Tue, 4 Jul 2023 19:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364J8K57080994; Tue, 4 Jul 2023 19:08:20 GMT (envelope-from git) Date: Tue, 4 Jul 2023 19:08:20 GMT Message-Id: <202307041908.364J8K57080994@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: 0102ee0d5937 - main - libcrypto: add missing symbols to the fips provider List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0102ee0d59379e17476e4228ce670a6997ac3574 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0102ee0d59379e17476e4228ce670a6997ac3574 commit 0102ee0d59379e17476e4228ce670a6997ac3574 Author: Pierre Pronchery AuthorDate: 2023-06-29 22:24:33 +0000 Commit: Mark Johnston CommitDate: 2023-07-04 19:04:49 +0000 libcrypto: add missing symbols to the fips provider OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. One such provider, "fips", ships with OpenSSL 3 directly, and groups algorithms that can be FIPS 140-2 validated. The import of OpenSSL 3.0.9 was building this provider incorrectly, missing symbols required for proper operation. In addition, without the change in OpenSSL's crypto/bn/bn_const.c, the FIPS module fails loading: `Undefined symbol "ossl_bignum_modp_1536_p"`. This change is consistent with crypto/bn/bn_dh.c though. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- crypto/openssl/crypto/bn/bn_const.c | 2 + secure/lib/libcrypto/modules/fips/Makefile | 356 ++++++++++++++++++++++++++++- 2 files changed, 357 insertions(+), 1 deletion(-) diff --git a/crypto/openssl/crypto/bn/bn_const.c b/crypto/openssl/crypto/bn/bn_const.c index a36e0ac792dd..bc7ede575d62 100644 --- a/crypto/openssl/crypto/bn/bn_const.c +++ b/crypto/openssl/crypto/bn/bn_const.c @@ -82,10 +82,12 @@ BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn) * RFC2312 specifies a generator of 22. */ +#ifndef FIPS_MODULE BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn) { return COPY_BN(bn, ossl_bignum_modp_1536_p); } +#endif /*- * "2048-bit MODP Group" from RFC3526, Section 3. diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 46c5ec2a091f..84123381bb1d 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -2,9 +2,363 @@ SHLIB_NAME?= fips.so +CFLAGS+= -DFIPS_MODULE + SRCS= fips_entry.c fipsprov.c self_test.c self_test_kats.c +# XXX from secure/lib/libcrypto/Makefile.inc +.include + +#.include +# +#.if ${TARGET_ENDIANNESS} == 1234 +#CFLAGS+= -DL_ENDIAN +#.elif ${TARGET_ENDIANNESS} == 4321 +#CFLAGS+= -DB_ENDIAN +#.endif + +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" +ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ + ${MACHINE_ARCH} == "powerpc64le" +ASM_${MACHINE_ARCH}= +.endif + +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) +CFLAGS+= -DOPENSSL_CPUID_OBJ +.if defined(ASM_aarch64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_amd64) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_arm) +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DBSAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_i386) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DRMD160_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DWHIRLPOOL_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.elif defined(ASM_powerpc64le) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.endif +.endif + +# crypto +SRCS+= provider_core.c provider_predefined.c \ + core_fetch.c core_algorithm.c core_namemap.c self_test_core.c + +# crypto/ec +SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ + ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ + ec2_smpl.c \ + ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ + ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ + curve448/f_generic.c curve448/scalar.c \ + curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ + ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ + curve448/arch_32/f_impl32.c +SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ + threads_pthread.c threads_none.c initthread.c \ + context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ + param_build_set.c der_writer.c threads_lib.c params_dup.c + +SRCS+= cpuid.c ctype.c +.if defined(ASM_aarch64) +SRCS+= arm64cpuid.S armcap.c +ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto +.elif defined(ASM_amd64) +SRCS+= x86_64cpuid.S +.elif defined(ASM_arm) +SRCS+= armv4cpuid.S armcap.c +.elif defined(ASM_i386) +SRCS+= x86cpuid.S +.elif defined(ASM_powerpc) +SRCS+= ppccpuid.S ppccap.c +.elif defined(ASM_powerpc64) +SRCS+= ppccpuid.S ppccap.c +.elif defined(ASM_powerpc64le) +SRCS+= ppccpuid.S ppccap.c +.else +SRCS+= mem_clr.c +.endif + +# crypto/bn +SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \ + bn_mod.c bn_conv.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ + bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_sqr.c \ + bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \ + bn_intern.c bn_dh.c bn_rsa_fips186_4.c bn_const.c +.if defined(ASM_aarch64) +SRCS+= armv8-mont.S bn_asm.c +.elif defined(ASM_amd64) +SRCS+= rsaz-avx2.S rsaz-avx512.S rsaz-x86_64.S rsaz_exp.c rsaz_exp_x2.c +SRCS+= x86_64-gcc.c x86_64-gf2m.S x86_64-mont.S x86_64-mont5.S +.elif defined(ASM_arm) +SRCS+= armv4-gf2m.S armv4-mont.S bn_asm.c +.elif defined(ASM_i386) +SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S +.elif defined(ASM_powerpc) +SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S +.elif defined(ASM_powerpc64) +SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S +.elif defined(ASM_powerpc64le) +SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S +.else +SRCS+= bn_asm.c +.endif + +# crypto/dh +SRCS+= dh_lib.c dh_key.c dh_group_params.c dh_check.c dh_backend.c dh_gen.c \ + dh_kdf.c + +# crypto/dsa +SRCS+= dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \ + dsa_key.c dsa_backend.c dsa_gen.c + +# crypto/ec +.if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} +SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c +.endif +.if defined(ASM_aarch64) +SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c +.elif defined(ASM_amd64) +SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S +.elif defined(ASM_arm) +SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c +.elif defined(ASM_i386) +SRCS+= ecp_nistz256-x86.S ecp_nistz256.c +.elif defined(ASM_powerpc64) +SRCS+= ecp_nistp521-ppc64.S ecp_nistz256-ppc64.S ecp_nistz256.c ecp_ppc.c x25519-ppc64.S +.elif defined(ASM_powerpc64le) +SRCS+= ecp_nistp521-ppc64.S ecp_nistz256-ppc64.S ecp_nistz256.c ecp_ppc.c x25519-ppc64.S +.endif + +# crypto/evp +SRCS+= digest.c evp_enc.c evp_lib.c evp_fetch.c evp_utils.c \ + mac_lib.c mac_meth.c keymgmt_meth.c keymgmt_lib.c kdf_lib.c kdf_meth.c \ + m_sigver.c pmeth_lib.c signature.c p_lib.c pmeth_gn.c exchange.c \ + evp_rand.c asymcipher.c kem.c dh_support.c ec_support.c pmeth_check.c + +# crypto/ffc +SRCS+= ffc_params.c ffc_params_generate.c ffc_key_generate.c \ + ffc_params_validate.c ffc_key_validate.c ffc_backend.c \ + ffc_dh.c + +# crypto/lhash +SRCS+= lhash.c + +# crypto/property +SRCS+= property_string.c property_parse.c property_query.c property.c defn_cache.c + +# crypto/rsa +SRCS+= rsa_ossl.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_pk1.c \ + rsa_none.c rsa_oaep.c rsa_chk.c rsa_pss.c rsa_x931.c rsa_crpt.c \ + rsa_sp800_56b_gen.c rsa_sp800_56b_check.c rsa_backend.c \ + rsa_mp_names.c rsa_schemes.c +SRCS+= rsa_acvp_test_params.c + +# crypto/sha +SRCS+= sha1dgst.c sha256.c sha512.c sha3.c +.if defined(ASM_aarch64) +SRCS+= keccak1600-armv8.S sha1-armv8.S sha256-armv8.S sha512-armv8.S +.elif defined(ASM_amd64) +SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S +SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S +.elif defined(ASM_arm) +SRCS+= keccak1600-armv4.S sha1-armv4-large.S sha256-armv4.S sha512-armv4.S +.elif defined(ASM_i386) +SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S +.elif defined(ASM_powerpc) +SRCS+= keccak1600.c sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S +.elif defined(ASM_powerpc64) +SRCS+= keccak1600-ppc64.S sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S +.elif defined(ASM_powerpc64le) +SRCS+= keccak1600-ppc64.S sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S +.else +SRCS+= keccak1600.c +.endif + +# common +SRCS+= provider_err.c provider_ctx.c +SRCS+= provider_util.c capabilities.c bio_prov.c digest_to_nid.c \ + securitycheck.c provider_seeding.c +SRCS+= securitycheck_fips.c + +# common/der +SRCS+= der_rsa_gen.c der_rsa_key.c +SRCS+= der_rsa_sig.c + +SRCS+= der_dsa_gen.c der_dsa_key.c +SRCS+= der_dsa_sig.c + +SRCS+= der_ec_gen.c der_ec_key.c +SRCS+= der_ec_sig.c + +SRCS+= der_ecx_gen.c der_ecx_key.c + +SRCS+= der_wrap_gen.c + +# asymciphers +SRCS+= rsa_enc.c + +# ciphers +SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ + ciphercommon_gcm.c ciphercommon_gcm_hw.c \ + ciphercommon_ccm.c ciphercommon_ccm_hw.c +SRCS+= cipher_aes.c cipher_aes_hw.c \ + cipher_aes_xts.c cipher_aes_xts_hw.c \ + cipher_aes_gcm.c cipher_aes_gcm_hw.c \ + cipher_aes_ccm.c cipher_aes_ccm_hw.c \ + cipher_aes_wrp.c \ + cipher_aes_cbc_hmac_sha.c \ + cipher_aes_cbc_hmac_sha256_hw.c cipher_aes_cbc_hmac_sha1_hw.c \ + cipher_cts.c +SRCS+= cipher_aes_xts_fips.c +SRCS+= cipher_tdes.c cipher_tdes_common.c cipher_tdes_hw.c + +# digests +SRCS+= digestcommon.c +SRCS+= sha2_prov.c +SRCS+= sha3_prov.c + +# exchange +SRCS+= dh_exch.c +SRCS+= ecx_exch.c +SRCS+= ecdh_exch.c +SRCS+= kdf_exch.c + +# kdfs +SRCS+= tls1_prf.c +SRCS+= hkdf.c +SRCS+= kbkdf.c +SRCS+= pbkdf2.c +SRCS+= pbkdf2_fips.c +SRCS+= sskdf.c +SRCS+= sshkdf.c +SRCS+= x942kdf.c + +# kem +SRCS+= rsa_kem.c + +# keymgmt +SRCS+= dh_kmgmt.c +SRCS+= dsa_kmgmt.c +SRCS+= ec_kmgmt.c +SRCS+= ecx_kmgmt.c +SRCS+= kdf_legacy_kmgmt.c +SRCS+= mac_legacy_kmgmt.c +SRCS+= rsa_kmgmt.c + +# macs +SRCS+= gmac_prov.c +SRCS+= hmac_prov.c +SRCS+= kmac_prov.c +SRCS+= cmac_prov.c + +# rands +SRCS+= drbg.c test_rng.c drbg_ctr.c drbg_hash.c drbg_hmac.c crngt.c + +# signature +SRCS+= dsa_sig.c +SRCS+= eddsa_sig.c ecdsa_sig.c +SRCS+= mac_legacy_sig.c +SRCS+= rsa_sig.c + +# ssl +SRCS+= record/tls_pad.c s3_cbc.c + .include +.if defined(ASM_${MACHINE_CPUARCH}) +.PATH: ${SRCTOP}/secure/lib/libcrypto/arch/${MACHINE_CPUARCH} +.if defined(ASM_amd64) +.PATH: ${LCRYPTO_SRC}/crypto/bn/asm +.endif +.elif defined(ASM_${MACHINE_ARCH}) +.PATH: ${SRCTOP}/secure/lib/libcrypto/arch/${MACHINE_ARCH} +.endif + .PATH: ${LCRYPTO_SRC}/crypto \ - ${LCRYPTO_SRC}/providers/fips + ${LCRYPTO_SRC}/crypto/bio \ + ${LCRYPTO_SRC}/crypto/bn \ + ${LCRYPTO_SRC}/crypto/dh \ + ${LCRYPTO_SRC}/crypto/dsa \ + ${LCRYPTO_SRC}/crypto/ec \ + ${LCRYPTO_SRC}/crypto/evp \ + ${LCRYPTO_SRC}/crypto/ffc \ + ${LCRYPTO_SRC}/crypto/lhash \ + ${LCRYPTO_SRC}/crypto/property \ + ${LCRYPTO_SRC}/crypto/rsa \ + ${LCRYPTO_SRC}/crypto/sha \ + ${LCRYPTO_SRC}/providers/fips \ + ${LCRYPTO_SRC}/providers/common/der \ + ${LCRYPTO_SRC}/providers/implementations/asymciphers \ + ${LCRYPTO_SRC}/providers/implementations/ciphers \ + ${LCRYPTO_SRC}/providers/implementations/digests \ + ${LCRYPTO_SRC}/providers/implementations/exchange \ + ${LCRYPTO_SRC}/providers/implementations/kdfs \ + ${LCRYPTO_SRC}/providers/implementations/kem \ + ${LCRYPTO_SRC}/providers/implementations/keymgmt \ + ${LCRYPTO_SRC}/providers/implementations/macs \ + ${LCRYPTO_SRC}/providers/implementations/rands \ + ${LCRYPTO_SRC}/providers/implementations/signature \ + ${LCRYPTO_SRC}/ssl From nobody Tue Jul 4 19:08:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwXPf2XHxz4lGRj; Tue, 4 Jul 2023 19:08: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 4QwXPf0s74z4LHV; Tue, 4 Jul 2023 19:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688497702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwriQhmYf+QTRAQBcorqYwwDZcawbRaRCYWN2daay94=; b=mirz9IhEk1u6pgQEqNrE8RG81ZD6JM+5fUtGnGGupWyI+OBbiTVHgC0a497n+efq6YlBu6 aMNl6i32/h63vybKSft/CUsO1eWRaNNnATvbI4P3lvzo07m4KKoUAZDmrBrGAD0a6TUIgS htbKglVZGePoohVdX9euWZZw5f+B1j+nEEHk5sT50q3TLUyF7mSZpNjvWvued5k/6Tgayx k91VFkkXY8VHy0wLe+WLtHdx6eoQkNYh+/geKGCCOdZrP8I+lDEx5vlzJ4ralRxxfpJDj9 veH49BOSAbUoQXMLqSv/3bQRG3dRIxBUoSoZRYHVGWjqIs09ii1BE7XuWLZM6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688497702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwriQhmYf+QTRAQBcorqYwwDZcawbRaRCYWN2daay94=; b=oo5hVRsPlm0q0ki+zzO+949HpbnU3JmXTlCcX65aixV2p0TPAF81lxgaYcOWjlvGOpmCDI J+NqPxXnnSCetmTePUlYBSdtxnKnkmT1RMWE3I2ZfkY8UzPqufwtNBO+AmEo6u3za2VPbY WlIO+8SL7i0h+bn6VwN7al3uxlDB2jsedHjkoC6K6Mi5E5A1eJuE3kRnjXH6wn/KvGgTEc Q6eze1lCcb1AN4tNIFGvcMAo0IAgDnn5D/IhnZ1iiw3lY32T7SMNAHunbt5DlbxKtJIgKU 2N5kto1f4lReUxyKWQmM8E1D4uyzDIzgD3qlA40yNTraLo47HTuQMARWr6fyOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688497702; a=rsa-sha256; cv=none; b=Ph2Nw7YDGFJ+CeaL3ZIGYKYAbmgjXEzdAVmTOKjuqqotK9DxxLrgLtk2XsyqxRX7Sg9asC F1pdHQeKUdtPiedR+PRo9iCvCEpuwDW98k/MvqLdZgfM+qBHSF2LtqxSUAUi99MJ7JFVLR f0qkk3qj1ETyiXZLLMafCjRM+DofJ9TwTByObyXhvoTqYfQqQqoVyKyKSCZ5ueL8xFLr88 F7ItPzZ5QiALvcdl0xeZsmHMb14S2VYvPTnVS20FZluBgUyhNzTk3r+4Kyt3z9cnXAN+fo oJAZE+FtQgE9R90AWBsS3mmf9kmj0Hi1HCM/mFwc90f49l2TIPINd/8IgVULLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwXPd6mtDzl1Z; Tue, 4 Jul 2023 19:08: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 364J8LII081014; Tue, 4 Jul 2023 19:08:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364J8LTs081013; Tue, 4 Jul 2023 19:08:21 GMT (envelope-from git) Date: Tue, 4 Jul 2023 19:08:21 GMT Message-Id: <202307041908.364J8LTs081013@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: 0b27be500a94 - main - libcrypto: expand the common Makefile for providers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b27be500a947b76385a4a179e6f61d83af6adb3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0b27be500a947b76385a4a179e6f61d83af6adb3 commit 0b27be500a947b76385a4a179e6f61d83af6adb3 Author: Pierre Pronchery AuthorDate: 2023-06-30 17:20:31 +0000 Commit: Mark Johnston CommitDate: 2023-07-04 19:04:56 +0000 libcrypto: expand the common Makefile for providers OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. This change adds mandatory source files to every provider. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- secure/lib/libcrypto/modules/Makefile.inc | 4 +++- secure/lib/libcrypto/modules/fips/Makefile | 3 +-- secure/lib/libcrypto/modules/legacy/Makefile | 6 +----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc index 9047c938ef1d..6e74ff36a9cf 100644 --- a/secure/lib/libcrypto/modules/Makefile.inc +++ b/secure/lib/libcrypto/modules/Makefile.inc @@ -9,7 +9,9 @@ CFLAGS+= -I${LCRYPTO_SRC}/include CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -.include +# common +SRCS+= provider_err.c provider_ctx.c +SRCS+= provider_util.c .PATH: ${LCRYPTO_SRC}/providers \ ${LCRYPTO_SRC}/providers/common diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 84123381bb1d..510d017d27ab 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -238,8 +238,7 @@ SRCS+= keccak1600.c .endif # common -SRCS+= provider_err.c provider_ctx.c -SRCS+= provider_util.c capabilities.c bio_prov.c digest_to_nid.c \ +SRCS+= capabilities.c bio_prov.c digest_to_nid.c \ securitycheck.c provider_seeding.c SRCS+= securitycheck_fips.c diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index 3eef2549d44f..c98ca9553e20 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -2,11 +2,7 @@ SHLIB_NAME?= legacy.so -SRCS= legacyprov.c prov_running.c - -# common -SRCS+= provider_err.c provider_ctx.c -SRCS+= provider_util.c +SRCS+= legacyprov.c prov_running.c # ciphers SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ From nobody Tue Jul 4 19:08:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwXPg3QvXz4lGLq; Tue, 4 Jul 2023 19:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwXPg1kxcz4L9c; Tue, 4 Jul 2023 19:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688497703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r2X81rHzvdMBiLC+nTYna/d46fR9iQc8HV10UegPIQg=; b=EQVeOkrPHb4sw6KCDIzvtskKyp6DtbKKEIITbwqKvNV336U3XwQLWpLkywcD3EAZ/80ejw bmygkKxcA2zZrOopQ85XdIsU5ssyinYPswdOFFiuUiQjE1m3LF1+hfYaEyLBxHPoiqZi18 sfJucBNu3SRQJWU3O7i3kOvKMTirsOGawmZnrFQAtwiGX/POA7JTQhbTqJz2x7E8xuohha 1aGNY48UIoovKhu3hSlxcsGhtUj7s552G08rhp4TXmHYmbOQ1cFVCDUDVyXxEVC8/qGMev qh9pEI5x7eMiaWAJ0GPbTdnbVTOZyPesSIoqGYuZC0TRUZLeu96qcBAGt9U8mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688497703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r2X81rHzvdMBiLC+nTYna/d46fR9iQc8HV10UegPIQg=; b=VAabueGEoOQI0sr592nR2lVzGnlCzS4WuwQkEXQ44nEreGmtg+R2VfmnxHGR4EXt3ZICiA mP1mNUacFQLvL9fRGLW9TvkWrIHh2r/qWkrO1YmF3Go22RF+MGpD0LOw4v6UM+QF8+l1+d EBVU7P0qE2S0JD72LVKmetkMkfJrmDphDFYPujCezFk35tq2qZwbkdCs9SYSQrlKSvWqow FSNvzBZawDENWBxzDXsSeSItU2gAHPum/xwPx6bH/ROcFQduWpNgBmIs6965+Rk8ZJlmOJ TvZSkoeMzBE6KXyfxnpyygxANo1SFJlyUfvc6rMJxFKcRz4kVGx9dvgoGsOumA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688497703; a=rsa-sha256; cv=none; b=s/7PaVOrf1q19VEw1QSxKbULJOV9sucVwpWJV2zpVOOLNBSEdLdEnhawEmuAKYRWfgjW44 dEs89MiBUXPlxR/dbluRyEftVOgeRpuVxJra0VM8pxR+OE6ZfU6u2lFV8UgCdn3Rsv5j/q 7HWGlMq2aJ2AXGkZKYgE1vi4wNkHMMaS3at1hbX7cbmBSEAPVNLwoiwyiR/4+3FqAeRcAG oA99nRCl/Ja3+j41KNxRjCoDSLVKTidOOue6wA8RBNIpvWSJ7UuB2lI1CX7/yHG7ts8Ko0 VCm011WBNJRfONEtKDxj1/06atJ9Gpdc244mGQ99y3RYyzursT75h42oFqXaTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwXPg0ZPwzl1b; Tue, 4 Jul 2023 19:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 364J8M1Y081039; Tue, 4 Jul 2023 19:08:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364J8Mjg081038; Tue, 4 Jul 2023 19:08:22 GMT (envelope-from git) Date: Tue, 4 Jul 2023 19:08:22 GMT Message-Id: <202307041908.364J8Mjg081038@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: c4b7fe91fcb8 - main - libcrypto: group definitions for libcrypto and fips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4b7fe91fcb879b6e7fc360c932845e7cc5d78f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c4b7fe91fcb879b6e7fc360c932845e7cc5d78f1 commit c4b7fe91fcb879b6e7fc360c932845e7cc5d78f1 Author: Pierre Pronchery AuthorDate: 2023-06-30 17:23:57 +0000 Commit: Mark Johnston CommitDate: 2023-07-04 19:05:01 +0000 libcrypto: group definitions for libcrypto and fips OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. This change makes sure the FIPS module matches build instructions used for libcrypto. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- secure/lib/libcrypto/Makefile.common | 102 ++++++++++++++++++++++ secure/lib/libcrypto/Makefile.inc | 103 +---------------------- secure/lib/libcrypto/modules/fips/Makefile | 130 ++++------------------------- 3 files changed, 121 insertions(+), 214 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/Makefile.common new file mode 100644 index 000000000000..ff9050e72370 --- /dev/null +++ b/secure/lib/libcrypto/Makefile.common @@ -0,0 +1,102 @@ +# $FreeBSD$ + +.include + +.if ${TARGET_ENDIANNESS} == 1234 +CFLAGS+= -DL_ENDIAN +.elif ${TARGET_ENDIANNESS} == 4321 +CFLAGS+= -DB_ENDIAN +.endif + +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" +ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ + ${MACHINE_ARCH} == "powerpc64le" +ASM_${MACHINE_ARCH}= +.endif + +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) +CFLAGS+= -DOPENSSL_CPUID_OBJ +.if defined(ASM_aarch64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_amd64) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_arm) +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DBSAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_i386) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DRMD160_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DWHIRLPOOL_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.elif defined(ASM_powerpc64le) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.endif +.endif + +MANDIR= ${SHAREDIR}/openssl/man/man + +CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" +CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines-3\"" +CFLAGS+= -DMODULESDIR="\"${LIBDIR}/ossl-modules\"" + +CFLAGS+= -DNDEBUG diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index d995fb2a0cb2..d462d9f82857 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -14,108 +14,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/include CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -.include - -.if ${TARGET_ENDIANNESS} == 1234 -CFLAGS+= -DL_ENDIAN -.elif ${TARGET_ENDIANNESS} == 4321 -CFLAGS+= -DB_ENDIAN -.endif - -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" -ASM_${MACHINE_CPUARCH}= -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "powerpc64le" -ASM_${MACHINE_ARCH}= -.endif - -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) -CFLAGS+= -DOPENSSL_CPUID_OBJ -.if defined(ASM_aarch64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_amd64) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_arm) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DBSAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_i386) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DRMD160_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DWHIRLPOOL_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.elif defined(ASM_powerpc64le) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.endif -.endif - -.if defined(LIB) -CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" -CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines-3\"" -CFLAGS+= -DMODULESDIR="\"${LIBDIR}/ossl-modules\"" -.endif - -CFLAGS+= -DNDEBUG - -MANDIR= ${SHAREDIR}/openssl/man/man +.include "Makefile.common" .for pcfile in ${PCFILES} ${pcfile}: ${pcfile}.in diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 510d017d27ab..c8b79e3badfd 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -4,123 +4,14 @@ SHLIB_NAME?= fips.so CFLAGS+= -DFIPS_MODULE -SRCS= fips_entry.c fipsprov.c self_test.c self_test_kats.c - -# XXX from secure/lib/libcrypto/Makefile.inc -.include - -#.include -# -#.if ${TARGET_ENDIANNESS} == 1234 -#CFLAGS+= -DL_ENDIAN -#.elif ${TARGET_ENDIANNESS} == 4321 -#CFLAGS+= -DB_ENDIAN -#.endif - -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" -ASM_${MACHINE_CPUARCH}= -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "powerpc64le" -ASM_${MACHINE_ARCH}= -.endif +SRCS+= fips_entry.c fipsprov.c self_test.c self_test_kats.c -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) -CFLAGS+= -DOPENSSL_CPUID_OBJ -.if defined(ASM_aarch64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_amd64) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_arm) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DBSAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_i386) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DRMD160_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DWHIRLPOOL_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.elif defined(ASM_powerpc64le) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.endif -.endif +.include "../../Makefile.common" # crypto SRCS+= provider_core.c provider_predefined.c \ core_fetch.c core_algorithm.c core_namemap.c self_test_core.c -# crypto/ec -SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ - ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ - ec2_smpl.c \ - ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ - ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ - curve448/f_generic.c curve448/scalar.c \ - curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ - ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ - curve448/arch_32/f_impl32.c -SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ - threads_pthread.c threads_none.c initthread.c \ - context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ - param_build_set.c der_writer.c threads_lib.c params_dup.c - SRCS+= cpuid.c ctype.c .if defined(ASM_aarch64) SRCS+= arm64cpuid.S armcap.c @@ -172,9 +63,24 @@ SRCS+= dh_lib.c dh_key.c dh_group_params.c dh_check.c dh_backend.c dh_gen.c \ # crypto/dsa SRCS+= dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \ - dsa_key.c dsa_backend.c dsa_gen.c + dsa_key.c dsa_backend.c dsa_gen.c # crypto/ec +SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ + ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ + ec2_smpl.c \ + ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ + ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ + curve448/f_generic.c curve448/scalar.c \ + curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ + ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ + curve448/arch_32/f_impl32.c +SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ + threads_pthread.c threads_none.c initthread.c \ + context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ + param_build_set.c der_writer.c threads_lib.c params_dup.c + +.include .if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c .endif From nobody Tue Jul 4 19:19:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwXfj20pLz4lNxD; Tue, 4 Jul 2023 19:19: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 4QwXfj1SThz4QH5; Tue, 4 Jul 2023 19:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688498381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y2YHF9FolAUYIrS4lO7PaBcnny9YISg/KnpojweUZ0Q=; b=t15i56DiKCK9vne4IC9/7Sa0r27r7iIDcZz1zF2Lbtt9ysuT7PVoKWUDBIsI7IlVxZH+Rc r+EhdomwPUGPXNO8SpgqnYrVTmV0xaIexyUPt5jhSc83C0zOfn5kC4rTbCroKY/BFMNBZh d/XBQtsyqSLSQhl/VmYrlU6MJBEV6EElqHpUTWxaiy1Pizv1VExnYfAl63Ft4gJ8kvKhAF rASU2NA+XMYLrMw31NaqNdU2CZpVn5rNEzI+EKKBMynNfwg9B6S4FEF11viub1PTHj3kL1 +jX20hNDnfnxQBbdMLkFlF6HcywGyEKP6MnKcUvnPmZDIvGHYRAcjhDSEKfJ4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688498381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y2YHF9FolAUYIrS4lO7PaBcnny9YISg/KnpojweUZ0Q=; b=ZEFzD72rho+4KSckgpR1b2UrqLqfInZrriZM0XxBn4lBLE6MPWMgwtlyFMRteWxzdMWmBe LBoJwDvDMRzzJf/P5MPBR3Y9EDZXRFx5gF4yjy0lppbe9Si3/NwISOcoajUWIeZY7XDRlw ORUSAlCpXBCsnXufIBGTnfH7CwrOilRICjc50cYCU/z3ufIi1NMS25k417JvUrWpgGO2Vk wB6NGO6+ce5iNiXrb8jLb5j54ccS/RW3QIRzfZmJl537zEdvdMqocCWGTIqWr/k/PrTzEl xuiocU1WoH2F83dGDDIvLRH17YaWoC2byYP0s9kSsUbk0w8FrOXQMD3TCPCsWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688498381; a=rsa-sha256; cv=none; b=a9/ztl4N0Imbae+LVNcNLA6zF2PVZnGC5FBsvPEj9BFqGzeXoJWkyd2XZ1Y+XA2+VTyFOE nXXBzbLOrsuoGa75JICJX9FCLtmuxjG0fEiKKEI1BCQbExsZ3+5MYJ9PNoUWr4+d/7v0Qq 8KtFVcTiQ2RBWXC4IUf5iF2sL1OtkOOQvibe1ZW8coehufheyNo+hlT5h6VLb3KVqpeLEW NSJcOraj2NDGUH5+2+71t9CsZ31aN5+/HAQpR03SUCWzPnKR1F4BDw/8lBOYHQNKDNa5y+ f/ciH8JURZKBrDP9FXeRKwhJ1viN/dL6ZBhGZ+h4pM+ouGXBEQCHxglymCeLhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwXfj0QH9zlGG; Tue, 4 Jul 2023 19:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 364JJetW097104; Tue, 4 Jul 2023 19:19:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364JJeB1097103; Tue, 4 Jul 2023 19:19:40 GMT (envelope-from git) Date: Tue, 4 Jul 2023 19:19:40 GMT Message-Id: <202307041919.364JJeB1097103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: 150d8ca9f3ba - main - socket afinet tests: using dynamic ports instead of the same static port List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 150d8ca9f3baa0c0b049ce2e6ba4a88dc5d8e341 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=150d8ca9f3baa0c0b049ce2e6ba4a88dc5d8e341 commit 150d8ca9f3baa0c0b049ce2e6ba4a88dc5d8e341 Author: Olivier Cochard AuthorDate: 2023-07-04 19:11:24 +0000 Commit: Olivier Cochard CommitDate: 2023-07-04 19:17:56 +0000 socket afinet tests: using dynamic ports instead of the same static port Allows these tests to be run in parallel. Approved by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D40859 --- tests/sys/netinet/socket_afinet.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/sys/netinet/socket_afinet.c b/tests/sys/netinet/socket_afinet.c index 482f767dd094..8c6bb4ccd294 100644 --- a/tests/sys/netinet/socket_afinet.c +++ b/tests/sys/netinet/socket_afinet.c @@ -82,7 +82,7 @@ ATF_TC_BODY(socket_afinet_bind_ok, tc) bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); - sin.sin_port = htons(6666); + sin.sin_port = htons(0); sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); rc = bind(sd, (struct sockaddr *)&sin, sizeof(sin)); ATF_CHECK_EQ(0, rc); @@ -95,6 +95,7 @@ ATF_TC_BODY(socket_afinet_poll_no_rdhup, tc) { int ss, ss2, cs, rc; struct sockaddr_in sin; + socklen_t slen; struct pollfd pfd; int one = 1; @@ -108,12 +109,15 @@ ATF_TC_BODY(socket_afinet_poll_no_rdhup, tc) bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); - sin.sin_port = htons(6666); + sin.sin_port = htons(0); sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); rc = bind(ss, (struct sockaddr *)&sin, sizeof(sin)); ATF_CHECK_EQ(0, rc); rc = listen(ss, 1); ATF_CHECK_EQ(0, rc); + slen = sizeof(sin); + rc = getsockname(ss, (struct sockaddr *)&sin, &slen); + ATF_CHECK_EQ(0, rc); /* Client connects, server accepts. */ cs = socket(PF_INET, SOCK_STREAM, 0); @@ -154,6 +158,7 @@ ATF_TC_BODY(socket_afinet_poll_rdhup, tc) { int ss, ss2, cs, rc; struct sockaddr_in sin; + socklen_t slen; struct pollfd pfd; char buffer; int one = 1; @@ -168,12 +173,15 @@ ATF_TC_BODY(socket_afinet_poll_rdhup, tc) bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); - sin.sin_port = htons(6666); + sin.sin_port = htons(0); sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); rc = bind(ss, (struct sockaddr *)&sin, sizeof(sin)); ATF_CHECK_EQ(0, rc); rc = listen(ss, 1); ATF_CHECK_EQ(0, rc); + slen = sizeof(sin); + rc = getsockname(ss, (struct sockaddr *)&sin, &slen); + ATF_CHECK_EQ(0, rc); /* Client connects, server accepts. */ cs = socket(PF_INET, SOCK_STREAM, 0); @@ -232,6 +240,7 @@ ATF_TC_WITHOUT_HEAD(socket_afinet_stream_reconnect); ATF_TC_BODY(socket_afinet_stream_reconnect, tc) { struct sockaddr_in sin; + socklen_t slen; int ss, cs, rc; /* @@ -245,12 +254,15 @@ ATF_TC_BODY(socket_afinet_stream_reconnect, tc) bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); - sin.sin_port = htons(6666); + sin.sin_port = htons(0); sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); rc = bind(ss, (struct sockaddr *)&sin, sizeof(sin)); ATF_CHECK_EQ(0, rc); rc = listen(ss, 1); ATF_CHECK_EQ(0, rc); + slen = sizeof(sin); + rc = getsockname(ss, (struct sockaddr *)&sin, &slen); + ATF_CHECK_EQ(0, rc); /* Client connects, shuts down. */ cs = socket(PF_INET, SOCK_STREAM, 0); From nobody Tue Jul 4 19:43:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwY9m34Vbz4lfZP; Tue, 4 Jul 2023 19:43: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 4QwY9m2G2Bz4XjV; Tue, 4 Jul 2023 19:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688499788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6cAE/Y1g/TBcDw0kKPoEl0B6qXmV6k5hokp8H7c7V7s=; b=p817o5eWG1LXjNHaBQ4awcRQaum8GSZezp9vv7pRfF8HlIMcVoAJRFit230Us7uWuTwI19 NJo09eDoj1MaYWBpF3eb4nBWBdL8RhdVxsC2u7YiKhjJqpBcAw7IJ9mqFSGXqBTVkC8WU9 QNXA9G2U8XwsyqDzfsTp+aJj9S+SqmMsp2NnjB1bGB5+smUPzvnddxrfzcphoKTAN2C4N0 z0CvH5GU0skjHIhPNFTCGhmJrYRXl/yOPuHdiCyrZRYT2BjmGUdGP1NCercH25IPonRCkm Iqviri9Fme51GuzVFCv1XmnFgnqAzpLGHpTMP7hI09Fd8Db54xgA14Ryo5dMHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688499788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6cAE/Y1g/TBcDw0kKPoEl0B6qXmV6k5hokp8H7c7V7s=; b=fkQ66TS5ZysRbySdqNCMuULiqPgNDic5fhqkcbGynCak+EhqMvYSEsI0gtSx10HGdDoUpG zFEct8AGYfmY6iWjvWCVEi+FfjyIN3Djp2x6hfPs8DsdaziwqAq6WXlnr7tLGplbOr9pLq 1NLe0SiABfLmcdkKPQOg1P54KMxnqiXAw6kkp7hGH/0G6WKi6OjDD3zkpgzCSeBZ8N9QIK ktuolsObEBE+91r4wg8uMXDuMbGQd4wpgRxH0FwBKxeuu2eUCn8WfnqM7p8+34uC0a4L1o ULJSyXARI9V1dMUOOwkuEDBPKmujA6n71mgOaBqS5qUC+CjAtn7st394pdcHPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688499788; a=rsa-sha256; cv=none; b=vx+TAS7uOqFoDqOvZ/cBHtGfh5EnTUoPbVNLwPj/uPzYeJwqoqhMat0yeL9niuVq3nHLET H9kwhpglFhObogrelNkKo2SlPwOnn2XDnIY6sRr3sk+575x8h4Vu3wdwiNZyErKSkQsdCc 79cm0kBGLrzafIR8Zd4SwEcNPp4F4juesOQFMoG6vWnGG3vHqQASBAhWKBE716DhaTtV8V ZaEsRPQHo9ElhBKyeTLcxgDY9jmVa0vdt9AD2eTWy8rPJxs/2I/d9UVtU6I5v14EYt+atG rG77oRHfDufPtp7grdihHCe/sp83RSL7QDr+/NNyy8M7yNX4S3TrGkuFMCQvCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwY9m1KdwzlRQ; Tue, 4 Jul 2023 19:43: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 364Jh83Y045586; Tue, 4 Jul 2023 19:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Jh8AX045585; Tue, 4 Jul 2023 19:43:08 GMT (envelope-from git) Date: Tue, 4 Jul 2023 19:43:08 GMT Message-Id: <202307041943.364Jh8AX045585@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: b35ea9bac974 - main - man(1): use gzcat for .gz files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b35ea9bac974a5650dcc234c06b3dc41d127f1d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b35ea9bac974a5650dcc234c06b3dc41d127f1d7 commit b35ea9bac974a5650dcc234c06b3dc41d127f1d7 Author: Mohamed Akram AuthorDate: 2023-07-03 15:20:51 +0000 Commit: Mark Johnston CommitDate: 2023-07-04 19:42:55 +0000 man(1): use gzcat for .gz files POSIX zcat appends the .Z suffix to file arguments causing the command to fail with .gz files. Signed-off-by: Mohamed Akram Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/789 --- 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 2b20c4394733..4fd6f886e87f 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -910,7 +910,7 @@ setup_cattool() { case "$1" in *.bz) cattool='/usr/bin/bzcat' ;; *.bz2) cattool='/usr/bin/bzcat' ;; - *.gz) cattool='/usr/bin/zcat' ;; + *.gz) cattool='/usr/bin/gzcat' ;; *.lzma) cattool='/usr/bin/lzcat' ;; *.xz) cattool='/usr/bin/xzcat' ;; *.zst) cattool='/usr/bin/zstdcat' ;; From nobody Tue Jul 4 19:43:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwY9n43ggz4lfZS; Tue, 4 Jul 2023 19:43: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 4QwY9n3V5kz4XZl; Tue, 4 Jul 2023 19:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688499789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dhufFT6+vlgkwBby3Rr3JSG4eRvDwL7HSD3j9G1nN2Y=; b=ELA/eg93LVPeul2R2NtE5XXEIrsiacl2R9ZaeWo09W9aP6J39ueY4gm34h9CaT1v0HVPyT +VqMERUo1zEvHiP58mVFQFME5yZfeNfWC9KIefGZn9CfyjiXeiivNzecUtSAwnsDI2nB8T 6RkNNNMLLbNtSnS3b/6F77CpB7w+nrAoVnKaczSG3LK6wBt7yDTa/DTkppYovSFKMsQCbU LKaJCqVD3KtEW/cA0iJdoQjjIQ/gXVMCvkxGqslZ7vAsm2nhaHiEY1H2GAu7X7ekMHlt7y YmPAU0c+UbZjPW0A3KJkdWLuKkOWFUfKgBeNSfBeWrlhSaSrGnri+N5Cj9ogNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688499789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dhufFT6+vlgkwBby3Rr3JSG4eRvDwL7HSD3j9G1nN2Y=; b=LJmPNQamx8RlEbbxvAD0MEge7pQRmiCfGI4/aCXeWYX2JmnQqcOC5OoRDT5eCqFHOr+Vxu avO0xZJ731a0nkk5u6kePOaCftkSAJsNP487xhx0ASsAnrxwRPtDzEbzPDUYcAuDxTOc6/ sc2S+sepPwnFw3bEpVYuQAVUJAkUzkzu6DgqXFbWc6WromW3mymGrCHn4au0K9HrBg9xio mRLXhJVX1dLAog+cVbN7fnLmQ64KYsb3Je3irIHrKFmEhTg58PgYXH/p9Fv6+cAacNhY4O K5X6LN79ioE5eYwkarXCElHgJXcg2wBGFxr7cAPSeAaFroWSLSEeGQi6PBrJ2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688499789; a=rsa-sha256; cv=none; b=LwtF2wxzL+Dwn5LeD+H9V+7Z8d+WL/wWLMIJE5q4KPTB0LdJfk1OWhIT3yvNN8lviCWmeJ IFYncZS+rC1iUNYrtESlwWC5px0XKC4qrGaCs9dveEVBYt8UtQIw+uXdjTy27LRqbxkfHY T5tAhgXLsFIWotepBeRcVx/ndGP7csBey929jvKd5oxmADq2eiAM66Smj3iU73QWpDMJh4 TcetkOA12zIDw1jVtmhXDoMDOUr0YzK3IrEN9oOCh+cuexRUwFg0BJZEppknchevEl9bbQ SiXeY1xqfH/eZUzP3ce1FSClaSlx3AjfCVYp1KVg2QtGkl1yZjIeo/tZXn8p7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwY9n2Bhtzllh; Tue, 4 Jul 2023 19:43: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 364Jh97n045612; Tue, 4 Jul 2023 19:43:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Jh9vQ045611; Tue, 4 Jul 2023 19:43:09 GMT (envelope-from git) Date: Tue, 4 Jul 2023 19:43:09 GMT Message-Id: <202307041943.364Jh9vQ045611@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: 53a03e312cf2 - main - ure(4): add support for Thinkpad Hybrid USB-C with USB-A dock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53a03e312cf27fca9b672c22d9b1687a66785cfb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=53a03e312cf27fca9b672c22d9b1687a66785cfb commit 53a03e312cf27fca9b672c22d9b1687a66785cfb Author: Joerg Pulz AuthorDate: 2023-07-04 16:08:13 +0000 Commit: Mark Johnston CommitDate: 2023-07-04 19:42:55 +0000 ure(4): add support for Thinkpad Hybrid USB-C with USB-A dock Add support for LAN port found on Thinkpad Hybrid USB-C with USB-A dock. While here fix a small typo - s/UBS/USB/ Sponsored by: Technical University of Munich Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/791 --- sys/dev/usb/net/if_ure.c | 1 + sys/dev/usb/usbdevs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index 374c48c23ecf..5a698dc69d20 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -106,6 +106,7 @@ static const STRUCT_USB_HOST_ID ure_devs[] = { URE_DEV(LENOVO, RTL8153_04, URE_FLAG_8153), URE_DEV(LENOVO, USBCLAN, 0), URE_DEV(LENOVO, USBCLANGEN2, 0), + URE_DEV(LENOVO, USBCLANHYBRID, 0), URE_DEV(MICROSOFT, WINDEVETH, 0), URE_DEV(NVIDIA, RTL8153, URE_FLAG_8153), URE_DEV(REALTEK, RTL8152, URE_FLAG_8152), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index a7802257e3d6..84b5c8f9b9ce 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2832,7 +2832,8 @@ product LENOVO RTL8153_04 0x720c USB 3.0 Ethernet product LENOVO TBT3LAN 0x3069 LAN port in Thinkpad TB3 dock product LENOVO USBCLAN 0x3062 LAN port in Thinkpad USB-C dock product LENOVO TBT3LANGEN2 0x3082 LAN port in Thinkpad TB3 dock gen2 -product LENOVO USBCLANGEN2 0xa387 LAN port in Thinkpad UBS-C dock gen2 +product LENOVO USBCLANGEN2 0xa387 LAN port in Thinkpad USB-C dock gen2 +product LENOVO USBCLANHYBRID 0xa359 LAN port in Thinkpad Hybrid USB-C with USB-A dock /* Lexar products */ product LEXAR JUMPSHOT 0x0001 jumpSHOT CompactFlash Reader From nobody Tue Jul 4 19:55:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwYSb29ckz4lnwP for ; Tue, 4 Jul 2023 19:55: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 4QwYSb1ldjz4cZc; Tue, 4 Jul 2023 19:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688500559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ts+w20P4TcxriVOusNr+O7GaiI5Xp65W286Eksw5hI=; b=gG4FJvZu7kZIeUQpBiAAm7fVwD8FOteAtx5QZTmmfLKsuWMFPuHaugIsW8AC5YfZyDiINj NRxRuXgr5MVLkzw8yBTtVFLH2n29TQj9z3PQZ4vlsGbPzkUxG2uDvPpJu+kvTsugaoKDe4 h+GSkPRWQd2EarCVy0xcW/ez9fh9sZlP8vP2m5RKwEBXXncujgcGbrczqNJpO8gpUt/8Gd pTwxgFfV8TMZ+c7dngv4vcEEuxl7XyYiFfAVs3AMeG2qyI06j/nm4YqFovAgnmxbRufMdi /3Wqjfg/0zQJm+TxR9Xcq2tOMUSja6hxBhEgBp8hKf6Gs5WBymtG4y63LJrj8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688500559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ts+w20P4TcxriVOusNr+O7GaiI5Xp65W286Eksw5hI=; b=ZD2WCzHFtaxphrcSSCOCxeyrys/TlarcDsr0U2AmFMherZL6dvY2jop+Z3p5qWnrhFqKZw dEytqmIMfCpdH0xm4fcmnmhaYohrKZDFPvm66dPB385EHIr+hB0xFGYRVQEe7IVnlJZRwC fPRIht+8hzguNimw/lYgJ6sfn+EPlEjn5DwJui8/5AXYsWCtkyTWsysRL1RKKSPrCYKjPq 5+mkNIL/lBPpc295I54tzFM11IYozYPI8Oniwy1+ALu9h9CQ3W9KA/oEgaG2smUp9fBIPG J2+WE5r7kVnQ2fd3Gj/WDrAv4u9NgHACiPVkAVmOxLtoN8flBPM3Wm072cLOLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688500559; a=rsa-sha256; cv=none; b=v4zZ5uAn32HjXkRUp384hgGgnEzh6yTmodYQPKi0eXcFLuT/AiyfycV2ymthoUopmTWCBC KacP9oNx7WKRkluNc66rt6oAwM+YA6oCuS3YjjDCCTy74lTd3s5k13TgU9U6DcpU7wrkn4 OpyORppN2bnTS2LcAMspI7jiDrVd59+XNLuqmT14GsFtXvni5ccj6xtO/KeHRS0H8bKGSB qSNanG2yUEpbBABRpwO155gvR8ZtB45DdBhJWFJpV7l8Mk29tmlXuzZEgwMRqBvGyGrV96 WQ+yN/VzhYVI9yRKjtk9Lm0UJ8XC9bnSOiTiAZXCvD2HZmF7MeECnAMN3L7/qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwYSb0pcnzm8Q; Tue, 4 Jul 2023 19:55: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 364Jtxa4063159; Tue, 4 Jul 2023 19:55:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364Jtxnh063157; Tue, 4 Jul 2023 19:55:59 GMT (envelope-from git) Date: Tue, 4 Jul 2023 19:55:59 GMT Message-Id: <202307041955.364Jtxnh063157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "George V. Neville-Neil" Subject: git: b046521cc424 - internal/admin - Free jkoshy from re-mentorship List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: b046521cc42426c0ee50b6325d1dafbe0f8bf545 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch internal/admin has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=b046521cc42426c0ee50b6325d1dafbe0f8bf545 commit b046521cc42426c0ee50b6325d1dafbe0f8bf545 Author: George V. Neville-Neil AuthorDate: 2023-07-04 19:55:21 +0000 Commit: George V. Neville-Neil CommitDate: 2023-07-04 19:55:21 +0000 Free jkoshy from re-mentorship Approved by: core (implicit) --- mentors | 1 - 1 file changed, 1 deletion(-) diff --git a/mentors b/mentors index 0a98138d53b9..cd0ff8a4916f 100644 --- a/mentors +++ b/mentors @@ -21,7 +21,6 @@ dsl bz gordon delphij Co-mentor: emaste jceel trasz jkh rwatson -jkoshy gnn kadesai ken Co-mentor: scottl, ambrisko mjoras rstone nick philip Co-mentor: kp From nobody Tue Jul 4 20:20:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwZ0g6ygNz4m48T; Tue, 4 Jul 2023 20:20:19 +0000 (UTC) (envelope-from SRS0=WHe0=CW=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwZ0g2jpjz3HYN; Tue, 4 Jul 2023 20:20:19 +0000 (UTC) (envelope-from SRS0=WHe0=CW=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; none Date: Tue, 4 Jul 2023 22:20:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1688502012; 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=l2L8qpGMy0baTAWWtZGvrH0k/h0B5Y22c4qzgauAuRo=; b=reyr9Tvv6K6spFjIad0S3r934J/UjDG2TzjvDHBGTNTQoNhLqCzTR2S43sRtPDeDkGud/g TZYX9U0EBPijib0S8sw31FZR0yNuAYzG9N2qGpNFcFW0ZBsH82ElawIF2LAswcHYjJ2e4o LhYEFaguBt3cV2NPCKFHJGjsNRou+R+tgPjfqQBBxB3+j2FDWcRmDF+eJPVORMmVekyxrw +C6JUhaabu2opC4Ww2eJQvUZiwD6VGK8Jk3tVzA2t59NS0EWkqVMuNFiBl4wAx2uJCcLuZ 737uDa+3CgwZotcbVH1fp5B7N9ip2m/nHx4/cOgdUjVyfZLJKve0S7a5c4nbIg== From: Ronald Klop To: Mark Johnston Cc: dev-commits-src-all@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: <1622400002.13877.1688502012123@localhost> In-Reply-To: <202307041908.364J8Mjg081038@gitrepo.freebsd.org> References: <202307041908.364J8Mjg081038@gitrepo.freebsd.org> Subject: Re: git: c4b7fe91fcb8 - main - libcrypto: group definitions for libcrypto and fips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13876_1125706365.1688502012050" X-Mailer: Realworks (660.143) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 4QwZ0g2jpjz3HYN X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N ------=_Part_13876_1125706365.1688502012050 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Can this compile error be related? cc -target aarch64-unknown-freebsd14.0 --sysroot=3D/home/ronald/dev/freebsd= /obj/home/ronald/dev/freebsd/src/arm64.aarch64/tmp -B/home/ ronald/dev/freebsd/obj/home/ronald/dev/freebsd/src/arm64.aarch64/tmp/usr/bi= n -fpic -DPIC -O2 -pipe -fno-common -DFIPS_MODULE -DL_ENDIAN -DOPENSSL_CPUI= D_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK16= 00_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR=3D"\"/etc= /ssl\"" -DENGINESDIR=3D"\"/usr/lib/engines-3\"" -DMODULESDIR=3D"\"/usr/lib/= ossl-modules\"" -DNDEBUG -I/home/ronald/dev/freebsd/src/crypto/openssl -I= /home/ronald/dev/freebsd/src/crypto/openssl/include -I/home/ronald/dev/free= bsd/src/crypto/openssl/providers/common/include -I/home/ronald/dev/freebsd/= src/crypto/openssl/providers/implementations/include -g -gz=3Dzlib -MD -MF= .depend.arm64cpuid.pico -MTarm64cpuid.pico -std=3Dgnu99 -Wno-format-zero-le= ngth -fstack-protector-strong -Wno-pointer-sign -Wdate-time -Wno-empty-body= -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=3Dunused-but-se= t-parameter -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-eq= uality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef = -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promote= d-parameter -Wno-parentheses -Qunused-arguments -march=3Darmv8-a+crypt= o -c /home/ronald/dev/freebsd/src/secure/lib/libcrypto/arch/aarch64/arm64= cpuid.S -o arm64cpuid.pico /home/ronald/dev/freebsd/src/secure/lib/libcrypto/arch/aarch64/arm64cpuid.S= :3:10: fatal error: 'arm_arch.h' file not found #include "arm_arch.h" ^~~~~~~~~~~~ 1 error generated. *** Error code 1 Stop. make[6]: stopped in /home/ronald/dev/freebsd/src/secure/lib/libcrypto/modul= es/fips *** Error code 1 I tried make clean in src/secure/lib but that didn't help. Regards, Ronald. =20 Van: Mark Johnston Datum: dinsdag, 4 juli 2023 21:08 Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commi= ts-src-main@FreeBSD.org Onderwerp: git: c4b7fe91fcb8 - main - libcrypto: group definitions for libc= rypto and fips >=20 > The branch main has been updated by markj: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc4b7fe91fcb879b6e7fc360c93= 2845e7cc5d78f1 >=20 > commit c4b7fe91fcb879b6e7fc360c932845e7cc5d78f1 > Author: Pierre Pronchery > AuthorDate: 2023-06-30 17:23:57 +0000 > Commit: Mark Johnston > CommitDate: 2023-07-04 19:05:01 +0000 >=20 > libcrypto: group definitions for libcrypto and fips > =20 > OpenSSL 3 supports a modular architecture, allowing different provide= rs > to bring specific implementations of cryptographical algorithms. This > change makes sure the FIPS module matches build instructions used for > libcrypto. > =20 > Sponsored by: The FreeBSD Foundation > Pull Request: https://github.com/freebsd/freebsd-src/pull/787 > --- > secure/lib/libcrypto/Makefile.common | 102 ++++++++++++++++++++++ > secure/lib/libcrypto/Makefile.inc | 103 +---------------------- > secure/lib/libcrypto/modules/fips/Makefile | 130 ++++-------------------= ------ > 3 files changed, 121 insertions(+), 214 deletions(-) >=20 > diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/= Makefile.common > new file mode 100644 > index 000000000000..ff9050e72370 > --- /dev/null > +++ b/secure/lib/libcrypto/Makefile.common > @@ -0,0 +1,102 @@ > +# $FreeBSD$ > + > +.include > + > +.if ${TARGET_ENDIANNESS} =3D=3D 1234 > +CFLAGS+=3D -DL_ENDIAN > +.elif ${TARGET_ENDIANNESS} =3D=3D 4321 > +CFLAGS+=3D -DB_ENDIAN > +.endif > + > +.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "am= d64" || \ > + ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} =3D=3D "i386" > +ASM_${MACHINE_CPUARCH}=3D > +.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powerp= c64" || \ > + ${MACHINE_ARCH} =3D=3D "powerpc64le" > +ASM_${MACHINE_ARCH}=3D > +.endif > + > +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) > +CFLAGS+=3D -DOPENSSL_CPUID_OBJ > +.if defined(ASM_aarch64) > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > +CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > +CFLAGS+=3D -DKECCAK1600_ASM > +CFLAGS+=3D -DVPAES_ASM > +CFLAGS+=3D -DECP_NISTZ256_ASM > +CFLAGS+=3D -DPOLY1305_ASM > +.elif defined(ASM_amd64) > +CFLAGS+=3D -DOPENSSL_IA32_SSE2 > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 > +CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > +CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > +CFLAGS+=3D -DKECCAK1600_ASM > +CFLAGS+=3D -DRC4_ASM > +CFLAGS+=3D -DMD5_ASM > +CFLAGS+=3D -DVPAES_ASM > +CFLAGS+=3D -DGHASH_ASM > +CFLAGS+=3D -DECP_NISTZ256_ASM -DX25519_ASM > +CFLAGS+=3D -DPADLOCK_ASM > +CFLAGS+=3D -DPOLY1305_ASM > +.elif defined(ASM_arm) > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m > +CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > +CFLAGS+=3D -DKECCAK1600_ASM > +CFLAGS+=3D -DBSAES_ASM > +CFLAGS+=3D -DGHASH_ASM > +CFLAGS+=3D -DECP_NISTZ256_ASM > +CFLAGS+=3D -DPOLY1305_ASM > +.elif defined(ASM_i386) > +CFLAGS+=3D -DOPENSSL_IA32_SSE2 > +CFLAGS+=3D -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT > +CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > +CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > +CFLAGS+=3D -DRC4_ASM > +CFLAGS+=3D -DMD5_ASM > +CFLAGS+=3D -DRMD160_ASM > +CFLAGS+=3D -DVPAES_ASM > +CFLAGS+=3D -DWHIRLPOOL_ASM > +CFLAGS+=3D -DGHASH_ASM > +CFLAGS+=3D -DECP_NISTZ256_ASM > +CFLAGS+=3D -DPADLOCK_ASM > +CFLAGS+=3D -DPOLY1305_ASM > +.elif defined(ASM_powerpc) > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > +CFLAGS+=3D -DAES_ASM > +CFLAGS+=3D -DVPAES_ASM > +CFLAGS+=3D -DSHA1_ASM > +CFLAGS+=3D -DSHA256_ASM > +CFLAGS+=3D -DSHA512_ASM > +CFLAGS+=3D -DPOLY1305_ASM > +.elif defined(ASM_powerpc64) > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > +CFLAGS+=3D -DAES_ASM > +CFLAGS+=3D -DVPAES_ASM > +CFLAGS+=3D -DSHA1_ASM > +CFLAGS+=3D -DSHA256_ASM > +CFLAGS+=3D -DSHA512_ASM > +CFLAGS+=3D -DPOLY1305_ASM > +CFLAGS+=3D -DECP_NISTZ256_ASM > +CFLAGS+=3D -DX25519_ASM > +CFLAGS+=3D -DKECCAK1600_ASM > +.elif defined(ASM_powerpc64le) > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > +CFLAGS+=3D -DAES_ASM > +CFLAGS+=3D -DVPAES_ASM > +CFLAGS+=3D -DSHA1_ASM > +CFLAGS+=3D -DSHA256_ASM > +CFLAGS+=3D -DSHA512_ASM > +CFLAGS+=3D -DPOLY1305_ASM > +CFLAGS+=3D -DECP_NISTZ256_ASM > +CFLAGS+=3D -DX25519_ASM > +CFLAGS+=3D -DKECCAK1600_ASM > +.endif > +.endif > + > +MANDIR=3D ${SHAREDIR}/openssl/man/man > + > +CFLAGS+=3D -DOPENSSLDIR=3D"\"/etc/ssl\"" > +CFLAGS+=3D -DENGINESDIR=3D"\"${LIBDIR}/engines-3\"" > +CFLAGS+=3D -DMODULESDIR=3D"\"${LIBDIR}/ossl-modules\"" > + > +CFLAGS+=3D -DNDEBUG > diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Mak= efile.inc > index d995fb2a0cb2..d462d9f82857 100644 > --- a/secure/lib/libcrypto/Makefile.inc > +++ b/secure/lib/libcrypto/Makefile.inc > @@ -14,108 +14,7 @@ CFLAGS+=3D -I${LCRYPTO_SRC}/include > CFLAGS+=3D -I${LCRYPTO_SRC}/providers/common/include > CFLAGS+=3D -I${LCRYPTO_SRC}/providers/implementations/include > =20 > -.include > - > -.if ${TARGET_ENDIANNESS} =3D=3D 1234 > -CFLAGS+=3D -DL_ENDIAN > -.elif ${TARGET_ENDIANNESS} =3D=3D 4321 > -CFLAGS+=3D -DB_ENDIAN > -.endif > - > -.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "am= d64" || \ > - ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} =3D=3D "i386" > -ASM_${MACHINE_CPUARCH}=3D > -.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powerp= c64" || \ > - ${MACHINE_ARCH} =3D=3D "powerpc64le" > -ASM_${MACHINE_ARCH}=3D > -.endif > - > -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) > -CFLAGS+=3D -DOPENSSL_CPUID_OBJ > -.if defined(ASM_aarch64) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_amd64) > -CFLAGS+=3D -DOPENSSL_IA32_SSE2 > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 > -CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -CFLAGS+=3D -DRC4_ASM > -CFLAGS+=3D -DMD5_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DGHASH_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM -DX25519_ASM > -CFLAGS+=3D -DPADLOCK_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_arm) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -CFLAGS+=3D -DBSAES_ASM > -CFLAGS+=3D -DGHASH_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_i386) > -CFLAGS+=3D -DOPENSSL_IA32_SSE2 > -CFLAGS+=3D -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > -CFLAGS+=3D -DRC4_ASM > -CFLAGS+=3D -DMD5_ASM > -CFLAGS+=3D -DRMD160_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DWHIRLPOOL_ASM > -CFLAGS+=3D -DGHASH_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DPADLOCK_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_powerpc) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DAES_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DSHA1_ASM > -CFLAGS+=3D -DSHA256_ASM > -CFLAGS+=3D -DSHA512_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_powerpc64) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DAES_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DSHA1_ASM > -CFLAGS+=3D -DSHA256_ASM > -CFLAGS+=3D -DSHA512_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DX25519_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -.elif defined(ASM_powerpc64le) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DAES_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DSHA1_ASM > -CFLAGS+=3D -DSHA256_ASM > -CFLAGS+=3D -DSHA512_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DX25519_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -.endif > -.endif > - > -.if defined(LIB) > -CFLAGS+=3D -DOPENSSLDIR=3D"\"/etc/ssl\"" > -CFLAGS+=3D -DENGINESDIR=3D"\"${LIBDIR}/engines-3\"" > -CFLAGS+=3D -DMODULESDIR=3D"\"${LIBDIR}/ossl-modules\"" > -.endif > - > -CFLAGS+=3D -DNDEBUG > - > -MANDIR=3D ${SHAREDIR}/openssl/man/man > +.include "Makefile.common" > =20 > .for pcfile in ${PCFILES} > ${pcfile}: ${pcfile}.in > diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libc= rypto/modules/fips/Makefile > index 510d017d27ab..c8b79e3badfd 100644 > --- a/secure/lib/libcrypto/modules/fips/Makefile > +++ b/secure/lib/libcrypto/modules/fips/Makefile > @@ -4,123 +4,14 @@ SHLIB_NAME?=3D fips.so > =20 > CFLAGS+=3D -DFIPS_MODULE > =20 > -SRCS=3D fips_entry.c fipsprov.c self_test.c self_test_kats.c > - > -# XXX from secure/lib/libcrypto/Makefile.inc > -.include > - > -#.include > -# > -#.if ${TARGET_ENDIANNESS} =3D=3D 1234 > -#CFLAGS+=3D -DL_ENDIAN > -#.elif ${TARGET_ENDIANNESS} =3D=3D 4321 > -#CFLAGS+=3D -DB_ENDIAN > -#.endif > - > -.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "am= d64" || \ > - ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} =3D=3D "i386" > -ASM_${MACHINE_CPUARCH}=3D > -.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powerp= c64" || \ > - ${MACHINE_ARCH} =3D=3D "powerpc64le" > -ASM_${MACHINE_ARCH}=3D > -.endif > +SRCS+=3D fips_entry.c fipsprov.c self_test.c self_test_kats.c > =20 > -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) > -CFLAGS+=3D -DOPENSSL_CPUID_OBJ > -.if defined(ASM_aarch64) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_amd64) > -CFLAGS+=3D -DOPENSSL_IA32_SSE2 > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 > -CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -CFLAGS+=3D -DRC4_ASM > -CFLAGS+=3D -DMD5_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DGHASH_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM -DX25519_ASM > -CFLAGS+=3D -DPADLOCK_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_arm) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -CFLAGS+=3D -DBSAES_ASM > -CFLAGS+=3D -DGHASH_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_i386) > -CFLAGS+=3D -DOPENSSL_IA32_SSE2 > -CFLAGS+=3D -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > -CFLAGS+=3D -DRC4_ASM > -CFLAGS+=3D -DMD5_ASM > -CFLAGS+=3D -DRMD160_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DWHIRLPOOL_ASM > -CFLAGS+=3D -DGHASH_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DPADLOCK_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_powerpc) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DAES_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DSHA1_ASM > -CFLAGS+=3D -DSHA256_ASM > -CFLAGS+=3D -DSHA512_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -.elif defined(ASM_powerpc64) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DAES_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DSHA1_ASM > -CFLAGS+=3D -DSHA256_ASM > -CFLAGS+=3D -DSHA512_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DX25519_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -.elif defined(ASM_powerpc64le) > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > -CFLAGS+=3D -DAES_ASM > -CFLAGS+=3D -DVPAES_ASM > -CFLAGS+=3D -DSHA1_ASM > -CFLAGS+=3D -DSHA256_ASM > -CFLAGS+=3D -DSHA512_ASM > -CFLAGS+=3D -DPOLY1305_ASM > -CFLAGS+=3D -DECP_NISTZ256_ASM > -CFLAGS+=3D -DX25519_ASM > -CFLAGS+=3D -DKECCAK1600_ASM > -.endif > -.endif > +.include "../../Makefile.common" > =20 > # crypto > SRCS+=3D provider_core.c provider_predefined.c \ > core_fetch.c core_algorithm.c core_namemap.c self_test_core.c > =20 > -# crypto/ec > -SRCS+=3D ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ > - ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ > - ec2_smpl.c \ > - ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ > - ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ > - curve448/f_generic.c curve448/scalar.c \ > - curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c = \ > - ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.= c \ > - curve448/arch_32/f_impl32.c > -SRCS+=3D cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_st= r.c \ > - threads_pthread.c threads_none.c initthread.c \ > - context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ > - param_build_set.c der_writer.c threads_lib.c params_dup.c > - > SRCS+=3D cpuid.c ctype.c > .if defined(ASM_aarch64) > SRCS+=3D arm64cpuid.S armcap.c > @@ -172,9 +63,24 @@ SRCS+=3D dh_lib.c dh_key.c dh_group_params.c dh_chec= k.c dh_backend.c dh_gen.c \ > =20 > # crypto/dsa > SRCS+=3D dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \ > - dsa_key.c dsa_backend.c dsa_gen.c > + dsa_key.c dsa_backend.c dsa_gen.c > =20 > # crypto/ec > +SRCS+=3D ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ > + ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ > + ec2_smpl.c \ > + ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ > + ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ > + curve448/f_generic.c curve448/scalar.c \ > + curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ > + ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ > + curve448/arch_32/f_impl32.c > +SRCS+=3D cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_st= r.c \ > + threads_pthread.c threads_none.c initthread.c \ > + context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ > + param_build_set.c der_writer.c threads_lib.c params_dup.c > + > +.include > .if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} > SRCS+=3D ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c > .endif > =20 >=20 >=20 >=20 =20 ------=_Part_13876_1125706365.1688502012050 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable Can this compile error be related?

cc -target aarch64-unknown-freebsd14.0 --sysroot=3D/home/ronald/dev/freebsd= /obj/home/ronald/dev/freebsd/src/arm64.aarch64/tmp -B/home/
ronald/dev/freebsd/obj/home/ronald/dev/freebsd/src/arm64.aarch64/tmp/usr/bi= n -fpic -DPIC -O2 -pipe -fno-common -DFIPS_MODULE -DL_ENDIAN -DOPENSSL_CPUI= D_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK16= 00_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR=3D"\"/etc= /ssl\"" -DENGINESDIR=3D"\"/usr/lib/engines-3\"" -DMODULESDIR=3D"\"/usr/lib/= ossl-modules\"" -DNDEBUG   -I/home/ronald/dev/freebsd/src/crypto/= openssl -I/home/ronald/dev/freebsd/src/crypto/openssl/include -I/home/ronal= d/dev/freebsd/src/crypto/openssl/providers/common/include -I/home/ronald/de= v/freebsd/src/crypto/openssl/providers/implementations/include -g -gz=3Dzli= b -MD  -MF.depend.arm64cpuid.pico -MTarm64cpuid.pico -std=3Dgnu99 -Wno= -format-zero-length -fstack-protector-strong -Wno-pointer-sign -Wdate-time = -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error= =3Dunused-but-set-parameter -Wno-tautological-compare -Wno-unused-value -Wn= o-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unuse= d-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum = -Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-arguments =     -march=3Darmv8-a+crypto   -c /home/ronald/dev/= freebsd/src/secure/lib/libcrypto/arch/aarch64/arm64cpuid.S -o arm64cpuid.pi= co
/home/ronald/dev/freebsd/src/secure/lib/libcrypto/arch/aarch64/arm64cpuid.S= :3:10: fatal error: 'arm_arch.h' file not found
#include "arm_arch.h"
         ^~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[6]: stopped in /home/ronald/dev/freebsd/src/secure/lib/libcrypto/modul= es/fips
*** Error code 1


I tried make clean in src/secure/lib but that didn't help.

Regards,

Ronald.

 

Van: Mark Johnston <markj@FreeBSD.org>
Datum: dinsdag, 4 juli 2023 21:08
Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeB= SD.org, dev-commits-src-main@FreeBSD.org
Onderwerp: git: c4b7fe91fcb8 - main - libcrypto: group def= initions for libcrypto and fips

The branch main has been updated = by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc4b7fe91= fcb879b6e7fc360c932845e7cc5d78f1

commit c4b7fe91fcb879b6e7fc360c932845e7cc5d78f1
Author:     Pierre Pronchery <pierre@freebsdfoundati= on.org>
AuthorDate: 2023-06-30 17:23:57 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-07-04 19:05:01 +0000

    libcrypto: group definitions for libcrypto and fips=
    
    OpenSSL 3 supports a modular architecture, allowing= different providers
    to bring specific implementations of cryptographica= l algorithms. This
    change makes sure the FIPS module matches build ins= tructions used for
    libcrypto.
    
    Sponsored by:   The FreeBSD Foundation     Pull Request:   https://github.com/freebsd/freebsd-src/p= ull/787
---
 secure/lib/libcrypto/Makefile.common      &n= bsp;| 102 ++++++++++++++++++++++
 secure/lib/libcrypto/Makefile.inc       = ;   | 103 +----------------------
 secure/lib/libcrypto/modules/fips/Makefile | 130 ++++----------------= ---------
 3 files changed, 121 insertions(+), 214 deletions(-)

diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/Ma= kefile.common
new file mode 100644
index 000000000000..ff9050e72370
--- /dev/null
+++ b/secure/lib/libcrypto/Makefile.common
@@ -0,0 +1,102 @@
+# $FreeBSD$
+
+.include <bsd.endian.mk>
+
+.if ${TARGET_ENDIANNESS} =3D=3D 1234
+CFLAGS+=3D   -DL_ENDIAN
+.elif ${TARGET_ENDIANNESS} =3D=3D 4321
+CFLAGS+=3D   -DB_ENDIAN
+.endif
+
+.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "amd6= 4" || \
+    ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} = =3D=3D "i386"
+ASM_${MACHINE_CPUARCH}=3D
+.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powerpc6= 4" || \
+    ${MACHINE_ARCH} =3D=3D "powerpc64le"
+ASM_${MACHINE_ARCH}=3D
+.endif
+
+.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH})
+CFLAGS+=3D   -DOPENSSL_CPUID_OBJ
+.if defined(ASM_aarch64)
+CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
+CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
+CFLAGS+=3D   -DKECCAK1600_ASM
+CFLAGS+=3D   -DVPAES_ASM
+CFLAGS+=3D   -DECP_NISTZ256_ASM
+CFLAGS+=3D   -DPOLY1305_ASM
+.elif defined(ASM_amd64)
+CFLAGS+=3D   -DOPENSSL_IA32_SSE2
+CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
+CFLAGS+=3D   -DOPENSSL_BN_ASM_GF2m
+CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
+CFLAGS+=3D   -DKECCAK1600_ASM
+CFLAGS+=3D   -DRC4_ASM
+CFLAGS+=3D   -DMD5_ASM
+CFLAGS+=3D   -DVPAES_ASM
+CFLAGS+=3D   -DGHASH_ASM
+CFLAGS+=3D   -DECP_NISTZ256_ASM -DX25519_ASM
+CFLAGS+=3D   -DPADLOCK_ASM
+CFLAGS+=3D   -DPOLY1305_ASM
+.elif defined(ASM_arm)
+CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
+CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
+CFLAGS+=3D   -DKECCAK1600_ASM
+CFLAGS+=3D   -DBSAES_ASM
+CFLAGS+=3D   -DGHASH_ASM
+CFLAGS+=3D   -DECP_NISTZ256_ASM
+CFLAGS+=3D   -DPOLY1305_ASM
+.elif defined(ASM_i386)
+CFLAGS+=3D   -DOPENSSL_IA32_SSE2
+CFLAGS+=3D   -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT +CFLAGS+=3D   -DOPENSSL_BN_ASM_GF2m
+CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
+CFLAGS+=3D   -DRC4_ASM
+CFLAGS+=3D   -DMD5_ASM
+CFLAGS+=3D   -DRMD160_ASM
+CFLAGS+=3D   -DVPAES_ASM
+CFLAGS+=3D   -DWHIRLPOOL_ASM
+CFLAGS+=3D   -DGHASH_ASM
+CFLAGS+=3D   -DECP_NISTZ256_ASM
+CFLAGS+=3D   -DPADLOCK_ASM
+CFLAGS+=3D   -DPOLY1305_ASM
+.elif defined(ASM_powerpc)
+CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
+CFLAGS+=3D   -DAES_ASM
+CFLAGS+=3D   -DVPAES_ASM
+CFLAGS+=3D   -DSHA1_ASM
+CFLAGS+=3D   -DSHA256_ASM
+CFLAGS+=3D   -DSHA512_ASM
+CFLAGS+=3D   -DPOLY1305_ASM
+.elif defined(ASM_powerpc64)
+CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
+CFLAGS+=3D   -DAES_ASM
+CFLAGS+=3D   -DVPAES_ASM
+CFLAGS+=3D   -DSHA1_ASM
+CFLAGS+=3D   -DSHA256_ASM
+CFLAGS+=3D   -DSHA512_ASM
+CFLAGS+=3D   -DPOLY1305_ASM
+CFLAGS+=3D   -DECP_NISTZ256_ASM
+CFLAGS+=3D   -DX25519_ASM
+CFLAGS+=3D   -DKECCAK1600_ASM
+.elif defined(ASM_powerpc64le)
+CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
+CFLAGS+=3D   -DAES_ASM
+CFLAGS+=3D   -DVPAES_ASM
+CFLAGS+=3D   -DSHA1_ASM
+CFLAGS+=3D   -DSHA256_ASM
+CFLAGS+=3D   -DSHA512_ASM
+CFLAGS+=3D   -DPOLY1305_ASM
+CFLAGS+=3D   -DECP_NISTZ256_ASM
+CFLAGS+=3D   -DX25519_ASM
+CFLAGS+=3D   -DKECCAK1600_ASM
+.endif
+.endif
+
+MANDIR=3D        ${SHAREDIR}/openssl/ma= n/man
+
+CFLAGS+=3D   -DOPENSSLDIR=3D"\"/etc/ssl\""
+CFLAGS+=3D   -DENGINESDIR=3D"\"${LIBDIR}/engines-3\""
+CFLAGS+=3D   -DMODULESDIR=3D"\"${LIBDIR}/ossl-modules\""
+
+CFLAGS+=3D   -DNDEBUG
diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makef= ile.inc
index d995fb2a0cb2..d462d9f82857 100644
--- a/secure/lib/libcrypto/Makefile.inc
+++ b/secure/lib/libcrypto/Makefile.inc
@@ -14,108 +14,7 @@ CFLAGS+=3D    -I${LCRYPTO_SRC}/include  CFLAGS+=3D   -I${LCRYPTO_SRC}/providers/common/include
 CFLAGS+=3D   -I${LCRYPTO_SRC}/providers/implementations/inc= lude
 
-.include <bsd.endian.mk>
-
-.if ${TARGET_ENDIANNESS} =3D=3D 1234
-CFLAGS+=3D   -DL_ENDIAN
-.elif ${TARGET_ENDIANNESS} =3D=3D 4321
-CFLAGS+=3D   -DB_ENDIAN
-.endif
-
-.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "amd6= 4" || \
-    ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} = =3D=3D "i386"
-ASM_${MACHINE_CPUARCH}=3D
-.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powerpc6= 4" || \
-    ${MACHINE_ARCH} =3D=3D "powerpc64le"
-ASM_${MACHINE_ARCH}=3D
-.endif
-
-.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH})
-CFLAGS+=3D   -DOPENSSL_CPUID_OBJ
-.if defined(ASM_aarch64)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
-CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_amd64)
-CFLAGS+=3D   -DOPENSSL_IA32_SSE2
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
-CFLAGS+=3D   -DOPENSSL_BN_ASM_GF2m
-CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-CFLAGS+=3D   -DRC4_ASM
-CFLAGS+=3D   -DMD5_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DGHASH_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM -DX25519_ASM
-CFLAGS+=3D   -DPADLOCK_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_arm)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-CFLAGS+=3D   -DBSAES_ASM
-CFLAGS+=3D   -DGHASH_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_i386)
-CFLAGS+=3D   -DOPENSSL_IA32_SSE2
-CFLAGS+=3D   -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+=3D   -DOPENSSL_BN_ASM_GF2m
-CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
-CFLAGS+=3D   -DRC4_ASM
-CFLAGS+=3D   -DMD5_ASM
-CFLAGS+=3D   -DRMD160_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DWHIRLPOOL_ASM
-CFLAGS+=3D   -DGHASH_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DPADLOCK_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_powerpc)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
-CFLAGS+=3D   -DAES_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DSHA1_ASM
-CFLAGS+=3D   -DSHA256_ASM
-CFLAGS+=3D   -DSHA512_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_powerpc64)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
-CFLAGS+=3D   -DAES_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DSHA1_ASM
-CFLAGS+=3D   -DSHA256_ASM
-CFLAGS+=3D   -DSHA512_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DX25519_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-.elif defined(ASM_powerpc64le)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
-CFLAGS+=3D   -DAES_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DSHA1_ASM
-CFLAGS+=3D   -DSHA256_ASM
-CFLAGS+=3D   -DSHA512_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DX25519_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-.endif
-.endif
-
-.if defined(LIB)
-CFLAGS+=3D   -DOPENSSLDIR=3D"\"/etc/ssl\""
-CFLAGS+=3D   -DENGINESDIR=3D"\"${LIBDIR}/engines-3\""
-CFLAGS+=3D   -DMODULESDIR=3D"\"${LIBDIR}/ossl-modules\""
-.endif
-
-CFLAGS+=3D   -DNDEBUG
-
-MANDIR=3D        ${SHAREDIR}/openssl/ma= n/man
+.include "Makefile.common"
 
 .for pcfile in ${PCFILES}
 ${pcfile}: ${pcfile}.in
diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcry= pto/modules/fips/Makefile
index 510d017d27ab..c8b79e3badfd 100644
--- a/secure/lib/libcrypto/modules/fips/Makefile
+++ b/secure/lib/libcrypto/modules/fips/Makefile
@@ -4,123 +4,14 @@ SHLIB_NAME?=3D fips.so
 
 CFLAGS+=3D   -DFIPS_MODULE
 
-SRCS=3D  fips_entry.c fipsprov.c self_test.c self_test_kats.c
-
-# XXX from secure/lib/libcrypto/Makefile.inc
-.include <bsd.own.mk>
-
-#.include <bsd.endian.mk>
-#
-#.if ${TARGET_ENDIANNESS} =3D=3D 1234
-#CFLAGS+=3D  -DL_ENDIAN
-#.elif ${TARGET_ENDIANNESS} =3D=3D 4321
-#CFLAGS+=3D  -DB_ENDIAN
-#.endif
-
-.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "amd6= 4" || \
-    ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} = =3D=3D "i386"
-ASM_${MACHINE_CPUARCH}=3D
-.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powerpc6= 4" || \
-    ${MACHINE_ARCH} =3D=3D "powerpc64le"
-ASM_${MACHINE_ARCH}=3D
-.endif
+SRCS+=3D fips_entry.c fipsprov.c self_test.c self_test_kats.c
 
-.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH})
-CFLAGS+=3D   -DOPENSSL_CPUID_OBJ
-.if defined(ASM_aarch64)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
-CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_amd64)
-CFLAGS+=3D   -DOPENSSL_IA32_SSE2
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
-CFLAGS+=3D   -DOPENSSL_BN_ASM_GF2m
-CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-CFLAGS+=3D   -DRC4_ASM
-CFLAGS+=3D   -DMD5_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DGHASH_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM -DX25519_ASM
-CFLAGS+=3D   -DPADLOCK_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_arm)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-CFLAGS+=3D   -DBSAES_ASM
-CFLAGS+=3D   -DGHASH_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_i386)
-CFLAGS+=3D   -DOPENSSL_IA32_SSE2
-CFLAGS+=3D   -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+=3D   -DOPENSSL_BN_ASM_GF2m
-CFLAGS+=3D   -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
-CFLAGS+=3D   -DRC4_ASM
-CFLAGS+=3D   -DMD5_ASM
-CFLAGS+=3D   -DRMD160_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DWHIRLPOOL_ASM
-CFLAGS+=3D   -DGHASH_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DPADLOCK_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_powerpc)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
-CFLAGS+=3D   -DAES_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DSHA1_ASM
-CFLAGS+=3D   -DSHA256_ASM
-CFLAGS+=3D   -DSHA512_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-.elif defined(ASM_powerpc64)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
-CFLAGS+=3D   -DAES_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DSHA1_ASM
-CFLAGS+=3D   -DSHA256_ASM
-CFLAGS+=3D   -DSHA512_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DX25519_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-.elif defined(ASM_powerpc64le)
-CFLAGS+=3D   -DOPENSSL_BN_ASM_MONT
-CFLAGS+=3D   -DAES_ASM
-CFLAGS+=3D   -DVPAES_ASM
-CFLAGS+=3D   -DSHA1_ASM
-CFLAGS+=3D   -DSHA256_ASM
-CFLAGS+=3D   -DSHA512_ASM
-CFLAGS+=3D   -DPOLY1305_ASM
-CFLAGS+=3D   -DECP_NISTZ256_ASM
-CFLAGS+=3D   -DX25519_ASM
-CFLAGS+=3D   -DKECCAK1600_ASM
-.endif
-.endif
+.include "../../Makefile.common"
 
 # crypto
 SRCS+=3D provider_core.c provider_predefined.c \
    core_fetch.c core_algorithm.c core_namemap.c self_t= est_core.c
 
-# crypto/ec
-SRCS+=3D ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ -        ec_curve.c ec_check.c ec_key.c = ec_kmeth.c ecx_key.c ec_asn1.c \
-        ec2_smpl.c \
-        ecp_oct.c ec2_oct.c ec_oct.c ec= dh_ossl.c \
-        ecdsa_ossl.c ecdsa_sign.c ecdsa= _vrf.c curve25519.c \
-        curve448/f_generic.c curve448/s= calar.c \
-        curve448/curve448_tables.c curv= e448/eddsa.c curve448/curve448.c \
-        ec_backend.c ecx_backend.c ecdh= _kdf.c curve448/arch_64/f_impl64.c \
-        curve448/arch_32/f_impl32.c
-SRCS+=3D cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.= c \
-   threads_pthread.c threads_none.c initthread.c \
-   context.c sparse_array.c asn1_dsa.c packet.c param_build.c \<= br> -   param_build_set.c der_writer.c threads_lib.c params_dup.c
-
 SRCS+=3D cpuid.c ctype.c
 .if defined(ASM_aarch64)
 SRCS+=3D arm64cpuid.S armcap.c
@@ -172,9 +63,24 @@ SRCS+=3D  dh_lib.c dh_key.c dh_group_params.c dh_c= heck.c dh_backend.c dh_gen.c \
 
 # crypto/dsa
 SRCS+=3D dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \
-        dsa_key.c dsa_backend.c dsa_gen= .c
+   dsa_key.c dsa_backend.c dsa_gen.c
 
 # crypto/ec
+SRCS+=3D ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ +   ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c= \
+   ec2_smpl.c \
+   ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \
+   ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \
+   curve448/f_generic.c curve448/scalar.c \
+   curve448/curve448_tables.c curve448/eddsa.c curve448/curve448= .c \
+   ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl= 64.c \
+   curve448/arch_32/f_impl32.c
+SRCS+=3D cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.= c \
+   threads_pthread.c threads_none.c initthread.c \
+   context.c sparse_array.c asn1_dsa.c packet.c param_build.c \<= br> +   param_build_set.c der_writer.c threads_lib.c params_dup.c
+
+.include <bsd.opts.mk>
 .if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64}  SRCS+=3D ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c=
 .endif
 


  ------=_Part_13876_1125706365.1688502012050-- From nobody Tue Jul 4 20:25:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwZ6R2fnnz4m752; Tue, 4 Jul 2023 20:25: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 4QwZ6R2FG0z3KJ3; Tue, 4 Jul 2023 20:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688502319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gY/gVgfhW4HvSk+3yx2kZQm+w7mZYmXh0BT2znirHO4=; b=l4FEG3QF+D2QqMddRgmb2i8RpWabOy5iIZ6cihT7RdB0IKPiW8lZqy/0eAK56qnL64Hobd vPoRTpgyeCCgMicc4twT03PwaQxMOCKoasT+N/BF4g08edt16MiaNuxeN3ec404gXKcoGi cnotuT9lwi4rhwWjdB/xjVaYF3C8SFrMP/IKKHE+XLrSG2fBRUphuz1K4gL0l6VStJqAP6 WVqkrCvMKjkUKARUox2M1x4Myrpcz0y0uZ2mz+g8wRlevtVB8X63lHf2EQdVKXK2FKy4/U 1aVtDwbdmi4Thqro4MWO4E5H20Of5lFj+C1xeO4PqIKycHwsnnAaO9k3RKnpAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688502319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gY/gVgfhW4HvSk+3yx2kZQm+w7mZYmXh0BT2znirHO4=; b=GOg/GsJATk2fiLUWHAp8Ejtz+1EZMmPi6msAfd8sBV6Xjd0N1IfYog5Lf+eZZd/EfF+ZOB Nh4Yj8ITMvYAcggoc877ZboTZBOgeQUO5PzGVhFrasDzfckcXArDkXfqfrQ5A8lkmczppr rkIKN6jhTS+u76snI3IqwhoZBIOdf4iOf1ixlBo0Oslbse5RG56/7NbZBMx0we5TMCa6dM VfiSgl2T48+KJYBKNUuK8WZwAroCpXoN4GQRCZ7vpiwf+MHZObV15Nc1yMH7feMQWIeObp zL2MHyeKRXbeFS2HzHGWGeFq38nPp9MtnaCA2w5UQBIwNNuqjDw/MLcNHVSBiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688502319; a=rsa-sha256; cv=none; b=b1K1jd+YjdcHmAp8e5MJ/ttdkvYkgc3y50f4+osquUUib7CL1nxpYX2mYufWJ2aBOmsMef TPM5ksdLZehSZdd8DCNDSVMaQd4OG56C4IaF/H56g1M2Ua2jMIFu+X7cLvjmSgFjxw2CdY fNo7jMZqNbfIDBkbAMb+LGxfqUQg5NgY8ApC/66vUGEqHxhiXyJSXcF/Afvzwj+2898ngv obQNM8Zi2GfwHbPjmX7mbH1KoiR5D340q6+IhO0k7TPV9ecWcW2DoL30zXBIo02xz7OMb+ Bd1u1lJKIfejPjDVBqfFNMT5iykpAS7dwrJY4o2jbciwxd/t55wWW+GFX2yFFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwZ6R1JThzmhM; Tue, 4 Jul 2023 20:25: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 364KPJLm013343; Tue, 4 Jul 2023 20:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364KPJnU013342; Tue, 4 Jul 2023 20:25:19 GMT (envelope-from git) Date: Tue, 4 Jul 2023 20:25:19 GMT Message-Id: <202307042025.364KPJnU013342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: fea4a44c1965 - main - release/DVD_PACKAGES: Update the names of drm-kmod ports List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fea4a44c1965d4b709362a74abb0ab4b28ec29ac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=fea4a44c1965d4b709362a74abb0ab4b28ec29ac commit fea4a44c1965d4b709362a74abb0ab4b28ec29ac Author: Li-Wen Hsu AuthorDate: 2023-07-04 20:24:52 +0000 Commit: Li-Wen Hsu CommitDate: 2023-07-04 20:24:52 +0000 release/DVD_PACKAGES: Update the names of drm-kmod ports Reviewed by: x11 (manu), re (gjb) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40770 --- release/scripts/pkg-stage.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index e2a51e4ef2f0..24973540ca6d 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -15,8 +15,9 @@ export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/git emulators/linux_base-c7 -graphics/drm-legacy-kmod -graphics/drm-stable-kmod +graphics/drm-kmod +graphics/drm-510-kmod +graphics/drm-515-kmod misc/freebsd-doc-all net/mpd5 net/rsync From nobody Tue Jul 4 20:38:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwZQ15hcHz4mFVw; Tue, 4 Jul 2023 20:38: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 4QwZQ15XBTz3Nvj; Tue, 4 Jul 2023 20:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688503129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lkIv7MYQd9QbuXJhdXlJKQco3HIfin5qW6YnJciuxV4=; b=nKq05o9vfmpqDWBC0W/Lr+chyeVg++vWd8Hpep5aQT7rqj5Bd0saZ1pXk5AQtvnWqyS/F2 4LuijNxwXZuHlI2Hg9EMQolm7objDPLAIzDJgIP/+LBWhD0afouIJDwEpd6wpEHMjJ8VF7 6kgZF80ZIV7llDZbrKJ2ZwIymPArzCGI0lC0lDEnBxdT4Ha2pCsHy/iyBy+qHC483KDQK8 YJ/o/QvmsU6EQbdDO/HCHabD/9mIIHTpglrHl9JPNCW8yQ6b2v2EnPOaVHG8qL4KNV4WEg LEm1+wQ1dVPCMuuLnH1y+MHcPg0Qf8/i4en7NE4Z8UB6hj2hQIPtMn1ZVWEkPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688503129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lkIv7MYQd9QbuXJhdXlJKQco3HIfin5qW6YnJciuxV4=; b=hiSFXgV2EetRNiwE5wM5EYecvJnb+neTdkTcG4gMkD4nbSs4B2sFyNdfdZgsVkOO9KJizQ TnYyuSyClzGEDrCSCA7HZ8aNHk+9/xJC+LV4bQwZ/ZL15+TbnOzCT4fMXoIHEsIPjd61zJ zVFNXnNVpsRrNFQeP2vauKcOWTRKEj03F8n1OabwVI+7B/IEbvIXU6F1drPJDhJjqYvOVb eJea5q9l4r/5tSwWBA53B3mKgUwMWeY/2AF1Dxvdv31SZk5/QmoSLGFnM0mOVcujhzm5Wf U3Eumybs1ukImCvAKyUF4SWerStiena8QpAceYfZoIsWrkdxhXzfV96APckUFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688503129; a=rsa-sha256; cv=none; b=Vybgg4xFkfw2650c0Uykbv2zfOWj9vYUOlIL/BiTykFpQnfAvTOuhGTX/ET2mCZkzSrkX1 M3l++Io75ACJEJ2/q2ag8dgUG6e1bhH/NvTwaTz2Aiq6jDvDTjleV9mDlGgRSUksU58CSb gQ4c4vsGNRGt57dzGhJJSHHcBmX/GriJ8Q+/WjxAjnvVKyOtsx4hjPZPwFYJGNDgiMMVmb enZaFqolNc2tjF4y7aID25MajrUL7RNrj5e6dBDz+7cTmdR4H+tCfTnSmz6d+kbN3n5K2w Z/1PjXph4JPMSgjiuJ5j9x1Cbj8MR4334U5BFRn8I0pVzl2wm1PIsfoxvteT6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwZQ14cYbzmfd; Tue, 4 Jul 2023 20:38: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 364KcnYF030344; Tue, 4 Jul 2023 20:38:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364KcnZe030343; Tue, 4 Jul 2023 20:38:49 GMT (envelope-from git) Date: Tue, 4 Jul 2023 20:38:49 GMT Message-Id: <202307042038.364KcnZe030343@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: 8e7046ff29a0 - main - libcrypto: Revert recent changes to fix legacy and fips providers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e7046ff29a09852584b87f5237c230283023e11 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8e7046ff29a09852584b87f5237c230283023e11 commit 8e7046ff29a09852584b87f5237c230283023e11 Author: Mark Johnston AuthorDate: 2023-07-04 20:37:21 +0000 Commit: Mark Johnston CommitDate: 2023-07-04 20:38:26 +0000 libcrypto: Revert recent changes to fix legacy and fips providers They break the !amd64 builds due to an underspecified include path and will be re-applied once that's fixed. Reported by: Ronald Klop --- crypto/openssl/crypto/bn/bn_const.c | 2 - secure/lib/libcrypto/Makefile.common | 102 ----------- secure/lib/libcrypto/Makefile.inc | 103 ++++++++++- secure/lib/libcrypto/modules/Makefile.inc | 7 +- secure/lib/libcrypto/modules/fips/Makefile | 263 +-------------------------- secure/lib/libcrypto/modules/legacy/Makefile | 30 +-- 6 files changed, 107 insertions(+), 400 deletions(-) diff --git a/crypto/openssl/crypto/bn/bn_const.c b/crypto/openssl/crypto/bn/bn_const.c index bc7ede575d62..a36e0ac792dd 100644 --- a/crypto/openssl/crypto/bn/bn_const.c +++ b/crypto/openssl/crypto/bn/bn_const.c @@ -82,12 +82,10 @@ BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn) * RFC2312 specifies a generator of 22. */ -#ifndef FIPS_MODULE BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn) { return COPY_BN(bn, ossl_bignum_modp_1536_p); } -#endif /*- * "2048-bit MODP Group" from RFC3526, Section 3. diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/Makefile.common deleted file mode 100644 index ff9050e72370..000000000000 --- a/secure/lib/libcrypto/Makefile.common +++ /dev/null @@ -1,102 +0,0 @@ -# $FreeBSD$ - -.include - -.if ${TARGET_ENDIANNESS} == 1234 -CFLAGS+= -DL_ENDIAN -.elif ${TARGET_ENDIANNESS} == 4321 -CFLAGS+= -DB_ENDIAN -.endif - -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" -ASM_${MACHINE_CPUARCH}= -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "powerpc64le" -ASM_${MACHINE_ARCH}= -.endif - -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) -CFLAGS+= -DOPENSSL_CPUID_OBJ -.if defined(ASM_aarch64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_amd64) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_arm) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DBSAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_i386) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DRMD160_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DWHIRLPOOL_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.elif defined(ASM_powerpc64le) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.endif -.endif - -MANDIR= ${SHAREDIR}/openssl/man/man - -CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" -CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines-3\"" -CFLAGS+= -DMODULESDIR="\"${LIBDIR}/ossl-modules\"" - -CFLAGS+= -DNDEBUG diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index d462d9f82857..d995fb2a0cb2 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -14,7 +14,108 @@ CFLAGS+= -I${LCRYPTO_SRC}/include CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -.include "Makefile.common" +.include + +.if ${TARGET_ENDIANNESS} == 1234 +CFLAGS+= -DL_ENDIAN +.elif ${TARGET_ENDIANNESS} == 4321 +CFLAGS+= -DB_ENDIAN +.endif + +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" +ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ + ${MACHINE_ARCH} == "powerpc64le" +ASM_${MACHINE_ARCH}= +.endif + +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) +CFLAGS+= -DOPENSSL_CPUID_OBJ +.if defined(ASM_aarch64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_amd64) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_arm) +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DBSAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_i386) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DRMD160_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DWHIRLPOOL_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.elif defined(ASM_powerpc64le) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.endif +.endif + +.if defined(LIB) +CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" +CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines-3\"" +CFLAGS+= -DMODULESDIR="\"${LIBDIR}/ossl-modules\"" +.endif + +CFLAGS+= -DNDEBUG + +MANDIR= ${SHAREDIR}/openssl/man/man .for pcfile in ${PCFILES} ${pcfile}: ${pcfile}.in diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc index 6e74ff36a9cf..e2f8e9437953 100644 --- a/secure/lib/libcrypto/modules/Makefile.inc +++ b/secure/lib/libcrypto/modules/Makefile.inc @@ -9,11 +9,8 @@ CFLAGS+= -I${LCRYPTO_SRC}/include CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -# common -SRCS+= provider_err.c provider_ctx.c -SRCS+= provider_util.c +.include -.PATH: ${LCRYPTO_SRC}/providers \ - ${LCRYPTO_SRC}/providers/common +.PATH: ${LCRYPTO_SRC}/providers WARNS?= 0 diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index c8b79e3badfd..46c5ec2a091f 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -2,268 +2,9 @@ SHLIB_NAME?= fips.so -CFLAGS+= -DFIPS_MODULE - -SRCS+= fips_entry.c fipsprov.c self_test.c self_test_kats.c - -.include "../../Makefile.common" - -# crypto -SRCS+= provider_core.c provider_predefined.c \ - core_fetch.c core_algorithm.c core_namemap.c self_test_core.c - -SRCS+= cpuid.c ctype.c -.if defined(ASM_aarch64) -SRCS+= arm64cpuid.S armcap.c -ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto -.elif defined(ASM_amd64) -SRCS+= x86_64cpuid.S -.elif defined(ASM_arm) -SRCS+= armv4cpuid.S armcap.c -.elif defined(ASM_i386) -SRCS+= x86cpuid.S -.elif defined(ASM_powerpc) -SRCS+= ppccpuid.S ppccap.c -.elif defined(ASM_powerpc64) -SRCS+= ppccpuid.S ppccap.c -.elif defined(ASM_powerpc64le) -SRCS+= ppccpuid.S ppccap.c -.else -SRCS+= mem_clr.c -.endif - -# crypto/bn -SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \ - bn_mod.c bn_conv.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ - bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_sqr.c \ - bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \ - bn_intern.c bn_dh.c bn_rsa_fips186_4.c bn_const.c -.if defined(ASM_aarch64) -SRCS+= armv8-mont.S bn_asm.c -.elif defined(ASM_amd64) -SRCS+= rsaz-avx2.S rsaz-avx512.S rsaz-x86_64.S rsaz_exp.c rsaz_exp_x2.c -SRCS+= x86_64-gcc.c x86_64-gf2m.S x86_64-mont.S x86_64-mont5.S -.elif defined(ASM_arm) -SRCS+= armv4-gf2m.S armv4-mont.S bn_asm.c -.elif defined(ASM_i386) -SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S -.elif defined(ASM_powerpc) -SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S -.elif defined(ASM_powerpc64) -SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S -.elif defined(ASM_powerpc64le) -SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S -.else -SRCS+= bn_asm.c -.endif - -# crypto/dh -SRCS+= dh_lib.c dh_key.c dh_group_params.c dh_check.c dh_backend.c dh_gen.c \ - dh_kdf.c - -# crypto/dsa -SRCS+= dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \ - dsa_key.c dsa_backend.c dsa_gen.c - -# crypto/ec -SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ - ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ - ec2_smpl.c \ - ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ - ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ - curve448/f_generic.c curve448/scalar.c \ - curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ - ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ - curve448/arch_32/f_impl32.c -SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ - threads_pthread.c threads_none.c initthread.c \ - context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ - param_build_set.c der_writer.c threads_lib.c params_dup.c - -.include -.if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} -SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c -.endif -.if defined(ASM_aarch64) -SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c -.elif defined(ASM_amd64) -SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S -.elif defined(ASM_arm) -SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c -.elif defined(ASM_i386) -SRCS+= ecp_nistz256-x86.S ecp_nistz256.c -.elif defined(ASM_powerpc64) -SRCS+= ecp_nistp521-ppc64.S ecp_nistz256-ppc64.S ecp_nistz256.c ecp_ppc.c x25519-ppc64.S -.elif defined(ASM_powerpc64le) -SRCS+= ecp_nistp521-ppc64.S ecp_nistz256-ppc64.S ecp_nistz256.c ecp_ppc.c x25519-ppc64.S -.endif - -# crypto/evp -SRCS+= digest.c evp_enc.c evp_lib.c evp_fetch.c evp_utils.c \ - mac_lib.c mac_meth.c keymgmt_meth.c keymgmt_lib.c kdf_lib.c kdf_meth.c \ - m_sigver.c pmeth_lib.c signature.c p_lib.c pmeth_gn.c exchange.c \ - evp_rand.c asymcipher.c kem.c dh_support.c ec_support.c pmeth_check.c - -# crypto/ffc -SRCS+= ffc_params.c ffc_params_generate.c ffc_key_generate.c \ - ffc_params_validate.c ffc_key_validate.c ffc_backend.c \ - ffc_dh.c - -# crypto/lhash -SRCS+= lhash.c - -# crypto/property -SRCS+= property_string.c property_parse.c property_query.c property.c defn_cache.c - -# crypto/rsa -SRCS+= rsa_ossl.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_pk1.c \ - rsa_none.c rsa_oaep.c rsa_chk.c rsa_pss.c rsa_x931.c rsa_crpt.c \ - rsa_sp800_56b_gen.c rsa_sp800_56b_check.c rsa_backend.c \ - rsa_mp_names.c rsa_schemes.c -SRCS+= rsa_acvp_test_params.c - -# crypto/sha -SRCS+= sha1dgst.c sha256.c sha512.c sha3.c -.if defined(ASM_aarch64) -SRCS+= keccak1600-armv8.S sha1-armv8.S sha256-armv8.S sha512-armv8.S -.elif defined(ASM_amd64) -SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S -SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S -.elif defined(ASM_arm) -SRCS+= keccak1600-armv4.S sha1-armv4-large.S sha256-armv4.S sha512-armv4.S -.elif defined(ASM_i386) -SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S -.elif defined(ASM_powerpc) -SRCS+= keccak1600.c sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S -.elif defined(ASM_powerpc64) -SRCS+= keccak1600-ppc64.S sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S -.elif defined(ASM_powerpc64le) -SRCS+= keccak1600-ppc64.S sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S -.else -SRCS+= keccak1600.c -.endif - -# common -SRCS+= capabilities.c bio_prov.c digest_to_nid.c \ - securitycheck.c provider_seeding.c -SRCS+= securitycheck_fips.c - -# common/der -SRCS+= der_rsa_gen.c der_rsa_key.c -SRCS+= der_rsa_sig.c - -SRCS+= der_dsa_gen.c der_dsa_key.c -SRCS+= der_dsa_sig.c - -SRCS+= der_ec_gen.c der_ec_key.c -SRCS+= der_ec_sig.c - -SRCS+= der_ecx_gen.c der_ecx_key.c - -SRCS+= der_wrap_gen.c - -# asymciphers -SRCS+= rsa_enc.c - -# ciphers -SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ - ciphercommon_gcm.c ciphercommon_gcm_hw.c \ - ciphercommon_ccm.c ciphercommon_ccm_hw.c -SRCS+= cipher_aes.c cipher_aes_hw.c \ - cipher_aes_xts.c cipher_aes_xts_hw.c \ - cipher_aes_gcm.c cipher_aes_gcm_hw.c \ - cipher_aes_ccm.c cipher_aes_ccm_hw.c \ - cipher_aes_wrp.c \ - cipher_aes_cbc_hmac_sha.c \ - cipher_aes_cbc_hmac_sha256_hw.c cipher_aes_cbc_hmac_sha1_hw.c \ - cipher_cts.c -SRCS+= cipher_aes_xts_fips.c -SRCS+= cipher_tdes.c cipher_tdes_common.c cipher_tdes_hw.c - -# digests -SRCS+= digestcommon.c -SRCS+= sha2_prov.c -SRCS+= sha3_prov.c - -# exchange -SRCS+= dh_exch.c -SRCS+= ecx_exch.c -SRCS+= ecdh_exch.c -SRCS+= kdf_exch.c - -# kdfs -SRCS+= tls1_prf.c -SRCS+= hkdf.c -SRCS+= kbkdf.c -SRCS+= pbkdf2.c -SRCS+= pbkdf2_fips.c -SRCS+= sskdf.c -SRCS+= sshkdf.c -SRCS+= x942kdf.c - -# kem -SRCS+= rsa_kem.c - -# keymgmt -SRCS+= dh_kmgmt.c -SRCS+= dsa_kmgmt.c -SRCS+= ec_kmgmt.c -SRCS+= ecx_kmgmt.c -SRCS+= kdf_legacy_kmgmt.c -SRCS+= mac_legacy_kmgmt.c -SRCS+= rsa_kmgmt.c - -# macs -SRCS+= gmac_prov.c -SRCS+= hmac_prov.c -SRCS+= kmac_prov.c -SRCS+= cmac_prov.c - -# rands -SRCS+= drbg.c test_rng.c drbg_ctr.c drbg_hash.c drbg_hmac.c crngt.c - -# signature -SRCS+= dsa_sig.c -SRCS+= eddsa_sig.c ecdsa_sig.c -SRCS+= mac_legacy_sig.c -SRCS+= rsa_sig.c - -# ssl -SRCS+= record/tls_pad.c s3_cbc.c +SRCS= fips_entry.c fipsprov.c self_test.c self_test_kats.c .include -.if defined(ASM_${MACHINE_CPUARCH}) -.PATH: ${SRCTOP}/secure/lib/libcrypto/arch/${MACHINE_CPUARCH} -.if defined(ASM_amd64) -.PATH: ${LCRYPTO_SRC}/crypto/bn/asm -.endif -.elif defined(ASM_${MACHINE_ARCH}) -.PATH: ${SRCTOP}/secure/lib/libcrypto/arch/${MACHINE_ARCH} -.endif - .PATH: ${LCRYPTO_SRC}/crypto \ - ${LCRYPTO_SRC}/crypto/bio \ - ${LCRYPTO_SRC}/crypto/bn \ - ${LCRYPTO_SRC}/crypto/dh \ - ${LCRYPTO_SRC}/crypto/dsa \ - ${LCRYPTO_SRC}/crypto/ec \ - ${LCRYPTO_SRC}/crypto/evp \ - ${LCRYPTO_SRC}/crypto/ffc \ - ${LCRYPTO_SRC}/crypto/lhash \ - ${LCRYPTO_SRC}/crypto/property \ - ${LCRYPTO_SRC}/crypto/rsa \ - ${LCRYPTO_SRC}/crypto/sha \ - ${LCRYPTO_SRC}/providers/fips \ - ${LCRYPTO_SRC}/providers/common/der \ - ${LCRYPTO_SRC}/providers/implementations/asymciphers \ - ${LCRYPTO_SRC}/providers/implementations/ciphers \ - ${LCRYPTO_SRC}/providers/implementations/digests \ - ${LCRYPTO_SRC}/providers/implementations/exchange \ - ${LCRYPTO_SRC}/providers/implementations/kdfs \ - ${LCRYPTO_SRC}/providers/implementations/kem \ - ${LCRYPTO_SRC}/providers/implementations/keymgmt \ - ${LCRYPTO_SRC}/providers/implementations/macs \ - ${LCRYPTO_SRC}/providers/implementations/rands \ - ${LCRYPTO_SRC}/providers/implementations/signature \ - ${LCRYPTO_SRC}/ssl + ${LCRYPTO_SRC}/providers/fips diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index c98ca9553e20..3ed4bed6cd52 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -2,34 +2,6 @@ SHLIB_NAME?= legacy.so -SRCS+= legacyprov.c prov_running.c - -# ciphers -SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ - ciphercommon_gcm.c ciphercommon_gcm_hw.c \ - ciphercommon_ccm.c ciphercommon_ccm_hw.c -SRCS+= cipher_desx.c cipher_desx_hw.c cipher_des.c cipher_des_hw.c -SRCS+= cipher_tdes_common.c -SRCS+= cipher_blowfish.c cipher_blowfish_hw.c -SRCS+= cipher_cast5.c cipher_cast5_hw.c -SRCS+= cipher_rc2.c cipher_rc2_hw.c -SRCS+= cipher_rc4.c cipher_rc4_hw.c -SRCS+= cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c -SRCS+= cipher_seed.c cipher_seed_hw.c - -# digests -SRCS+= digestcommon.c -SRCS+= md4_prov.c wp_prov.c ripemd_prov.c - -# kdfs -SRCS+= pbkdf1.c - -# ssl -SRCS+= record/tls_pad.c +SRCS= legacyprov.c .include - -.PATH: ${LCRYPTO_SRC}/providers/implementations/ciphers \ - ${LCRYPTO_SRC}/providers/implementations/digests \ - ${LCRYPTO_SRC}/providers/implementations/kdfs \ - ${LCRYPTO_SRC}/ssl From nobody Tue Jul 4 20:39:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwZQb5Yrhz4mFv1; Tue, 4 Jul 2023 20:39:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (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 4QwZQb1dpLz3PL7; Tue, 4 Jul 2023 20:39:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-7659dc74d91so635401285a.0; Tue, 04 Jul 2023 13:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688503158; x=1691095158; 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=k9W17kwyz5dYNOnPpWfIGiT/IOdlAJLkcD/j+H8C7P0=; b=a8Mny1mvvsKDcSMFVX7/EHxrTyNBdumq2gMGaOxuV71pQsupmuuJkYBK00tlbiE3+4 Kl1R7Xl77BeXqvIeSS1IaVhK9nwA9t7ize6MZmyXG9kvxByBfN+GTllpyNE3FGCu386G VpHG4HH4CLTJzmeDPo8kpKs1/PcUyjroiY55pzj9LSf33DrsLQQB2QS7yuTKCA5ICXbr ckL9D4820Pj7+H1Gj0g/TaPiW7wloNCtDQ+ZqraVZ0wNCC1+8ddA0Mwn6yp12ReQbF6A 3tQ3Lp7HRtEVv75ZKrMn70IFDsvdfqJDkP3T8ljYp2IULirplnB1N0r4mUTGOEb1UR2z kIaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688503158; x=1691095158; 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=k9W17kwyz5dYNOnPpWfIGiT/IOdlAJLkcD/j+H8C7P0=; b=cTXE6btqRLzpm/EcrZ6hcpPcHpuUTWMPVCgWoLYDUgy4FwVsNiYZ1aGSxCWyhytUlS rVpRNF7BO5q4k4oY2/wgDDzndB7v3gQKiQEjTe+yR9rcabc6TVENkszZprwerNHzNzdT Bkj9CNbyBwfcQLEe5Lc1CBhGWSoWCfoaAD6r+u/pdTEL+zzBl/jZcX+qCwgmqWMZnV0x tBQvKnseoV4NVncV/B3LAyNnJSphyUIpd2q45artlnW7+OJb7ATCKCMPBmEmQ0JomTCa Qp/HcbWRpBLKYxbOn6MWiicK2n6Jt3JTcAPteWoml8UHHZLDxSGvmfRsYLaTsNNjnl+9 qRIQ== X-Gm-Message-State: ABy/qLbOtFq25XsYdUBd/XADcDftnCaA9LgPUId3HZeYMpXFc1NAbNvO vAzZeJDzoxkn625RwBuLER6x13U5XeA= X-Google-Smtp-Source: APBJJlHn3R2fJ3nx7tiXrkgrX1eG2ZvoaXaLCMVsPe4A6CvqDT+wtkDaAVmRRBOcD5aNZcxfofaaHA== X-Received: by 2002:a05:6214:d0e:b0:629:58a7:9a9d with SMTP id 14-20020a0562140d0e00b0062958a79a9dmr16329076qvh.10.1688503157734; Tue, 04 Jul 2023 13:39:17 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id fb9-20020ad44f09000000b0062b76c29978sm12865925qvb.6.2023.07.04.13.39.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 13:39:17 -0700 (PDT) Date: Tue, 4 Jul 2023 16:39:14 -0400 From: Mark Johnston To: Ronald Klop Cc: dev-commits-src-all@freebsd.org, src-committers@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c4b7fe91fcb8 - main - libcrypto: group definitions for libcrypto and fips Message-ID: References: <202307041908.364J8Mjg081038@gitrepo.freebsd.org> <1622400002.13877.1688502012123@localhost> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1622400002.13877.1688502012123@localhost> X-Rspamd-Queue-Id: 4QwZQb1dpLz3PL7 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, Jul 04, 2023 at 10:20:12PM +0200, Ronald Klop wrote: > Can this compile error be related? >=20 > cc -target aarch64-unknown-freebsd14.0 --sysroot=3D/home/ronald/dev/freeb= sd/obj/home/ronald/dev/freebsd/src/arm64.aarch64/tmp -B/home/ > ronald/dev/freebsd/obj/home/ronald/dev/freebsd/src/arm64.aarch64/tmp/usr/= bin -fpic -DPIC -O2 -pipe -fno-common -DFIPS_MODULE -DL_ENDIAN -DOPENSSL_CP= UID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK= 1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR=3D"\"/e= tc/ssl\"" -DENGINESDIR=3D"\"/usr/lib/engines-3\"" -DMODULESDIR=3D"\"/usr/li= b/ossl-modules\"" -DNDEBUG -I/home/ronald/dev/freebsd/src/crypto/openssl = -I/home/ronald/dev/freebsd/src/crypto/openssl/include -I/home/ronald/dev/fr= eebsd/src/crypto/openssl/providers/common/include -I/home/ronald/dev/freebs= d/src/crypto/openssl/providers/implementations/include -g -gz=3Dzlib -MD -= MF.depend.arm64cpuid.pico -MTarm64cpuid.pico -std=3Dgnu99 -Wno-format-zero-= length -fstack-protector-strong -Wno-pointer-sign -Wdate-time -Wno-empty-bo= dy -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=3Dunused-but-= set-parameter -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-= equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typede= f -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promo= ted-parameter -Wno-parentheses -Qunused-arguments -march=3Darmv8-a+cry= pto -c /home/ronald/dev/freebsd/src/secure/lib/libcrypto/arch/aarch64/arm= 64cpuid.S -o arm64cpuid.pico > /home/ronald/dev/freebsd/src/secure/lib/libcrypto/arch/aarch64/arm64cpuid= =2ES:3:10: fatal error: 'arm_arch.h' file not found > #include "arm_arch.h" > ^~~~~~~~~~~~ > 1 error generated. > *** Error code 1 >=20 > Stop. > make[6]: stopped in /home/ronald/dev/freebsd/src/secure/lib/libcrypto/mod= ules/fips > *** Error code 1 >=20 >=20 > I tried make clean in src/secure/lib but that didn't help. Indeed, there is something missing in the build glue. The problem isn't immediately obvious to me so I reverted the changes in the meantime. > Regards, >=20 > Ronald. >=20 >=20 > Van: Mark Johnston > Datum: dinsdag, 4 juli 2023 21:08 > Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-com= mits-src-main@FreeBSD.org > Onderwerp: git: c4b7fe91fcb8 - main - libcrypto: group definitions for li= bcrypto and fips > >=20 > > The branch main has been updated by markj: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc4b7fe91fcb879b6e7fc360c= 932845e7cc5d78f1 > >=20 > > commit c4b7fe91fcb879b6e7fc360c932845e7cc5d78f1 > > Author: Pierre Pronchery > > AuthorDate: 2023-06-30 17:23:57 +0000 > > Commit: Mark Johnston > > CommitDate: 2023-07-04 19:05:01 +0000 > >=20 > > libcrypto: group definitions for libcrypto and fips > > OpenSSL 3 supports a modular architecture, allowing different provi= ders > > to bring specific implementations of cryptographical algorithms. Th= is > > change makes sure the FIPS module matches build instructions used f= or > > libcrypto. > > Sponsored by: The FreeBSD Foundation > > Pull Request: https://github.com/freebsd/freebsd-src/pull/787 > > --- > > secure/lib/libcrypto/Makefile.common | 102 ++++++++++++++++++++++ > > secure/lib/libcrypto/Makefile.inc | 103 +--------------------= -- > > secure/lib/libcrypto/modules/fips/Makefile | 130 ++++-----------------= -------- > > 3 files changed, 121 insertions(+), 214 deletions(-) > >=20 > > diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypt= o/Makefile.common > > new file mode 100644 > > index 000000000000..ff9050e72370 > > --- /dev/null > > +++ b/secure/lib/libcrypto/Makefile.common > > @@ -0,0 +1,102 @@ > > +# $FreeBSD$ > > + > > +.include > > + > > +.if ${TARGET_ENDIANNESS} =3D=3D 1234 > > +CFLAGS+=3D -DL_ENDIAN > > +.elif ${TARGET_ENDIANNESS} =3D=3D 4321 > > +CFLAGS+=3D -DB_ENDIAN > > +.endif > > + > > +.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "= amd64" || \ > > + ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} =3D=3D "i386" > > +ASM_${MACHINE_CPUARCH}=3D > > +.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powe= rpc64" || \ > > + ${MACHINE_ARCH} =3D=3D "powerpc64le" > > +ASM_${MACHINE_ARCH}=3D > > +.endif > > + > > +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) > > +CFLAGS+=3D -DOPENSSL_CPUID_OBJ > > +.if defined(ASM_aarch64) > > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > +CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > +CFLAGS+=3D -DKECCAK1600_ASM > > +CFLAGS+=3D -DVPAES_ASM > > +CFLAGS+=3D -DECP_NISTZ256_ASM > > +CFLAGS+=3D -DPOLY1305_ASM > > +.elif defined(ASM_amd64) > > +CFLAGS+=3D -DOPENSSL_IA32_SSE2 > > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 > > +CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > > +CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > +CFLAGS+=3D -DKECCAK1600_ASM > > +CFLAGS+=3D -DRC4_ASM > > +CFLAGS+=3D -DMD5_ASM > > +CFLAGS+=3D -DVPAES_ASM > > +CFLAGS+=3D -DGHASH_ASM > > +CFLAGS+=3D -DECP_NISTZ256_ASM -DX25519_ASM > > +CFLAGS+=3D -DPADLOCK_ASM > > +CFLAGS+=3D -DPOLY1305_ASM > > +.elif defined(ASM_arm) > > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m > > +CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > +CFLAGS+=3D -DKECCAK1600_ASM > > +CFLAGS+=3D -DBSAES_ASM > > +CFLAGS+=3D -DGHASH_ASM > > +CFLAGS+=3D -DECP_NISTZ256_ASM > > +CFLAGS+=3D -DPOLY1305_ASM > > +.elif defined(ASM_i386) > > +CFLAGS+=3D -DOPENSSL_IA32_SSE2 > > +CFLAGS+=3D -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT > > +CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > > +CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > +CFLAGS+=3D -DRC4_ASM > > +CFLAGS+=3D -DMD5_ASM > > +CFLAGS+=3D -DRMD160_ASM > > +CFLAGS+=3D -DVPAES_ASM > > +CFLAGS+=3D -DWHIRLPOOL_ASM > > +CFLAGS+=3D -DGHASH_ASM > > +CFLAGS+=3D -DECP_NISTZ256_ASM > > +CFLAGS+=3D -DPADLOCK_ASM > > +CFLAGS+=3D -DPOLY1305_ASM > > +.elif defined(ASM_powerpc) > > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > +CFLAGS+=3D -DAES_ASM > > +CFLAGS+=3D -DVPAES_ASM > > +CFLAGS+=3D -DSHA1_ASM > > +CFLAGS+=3D -DSHA256_ASM > > +CFLAGS+=3D -DSHA512_ASM > > +CFLAGS+=3D -DPOLY1305_ASM > > +.elif defined(ASM_powerpc64) > > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > +CFLAGS+=3D -DAES_ASM > > +CFLAGS+=3D -DVPAES_ASM > > +CFLAGS+=3D -DSHA1_ASM > > +CFLAGS+=3D -DSHA256_ASM > > +CFLAGS+=3D -DSHA512_ASM > > +CFLAGS+=3D -DPOLY1305_ASM > > +CFLAGS+=3D -DECP_NISTZ256_ASM > > +CFLAGS+=3D -DX25519_ASM > > +CFLAGS+=3D -DKECCAK1600_ASM > > +.elif defined(ASM_powerpc64le) > > +CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > +CFLAGS+=3D -DAES_ASM > > +CFLAGS+=3D -DVPAES_ASM > > +CFLAGS+=3D -DSHA1_ASM > > +CFLAGS+=3D -DSHA256_ASM > > +CFLAGS+=3D -DSHA512_ASM > > +CFLAGS+=3D -DPOLY1305_ASM > > +CFLAGS+=3D -DECP_NISTZ256_ASM > > +CFLAGS+=3D -DX25519_ASM > > +CFLAGS+=3D -DKECCAK1600_ASM > > +.endif > > +.endif > > + > > +MANDIR=3D ${SHAREDIR}/openssl/man/man > > + > > +CFLAGS+=3D -DOPENSSLDIR=3D"\"/etc/ssl\"" > > +CFLAGS+=3D -DENGINESDIR=3D"\"${LIBDIR}/engines-3\"" > > +CFLAGS+=3D -DMODULESDIR=3D"\"${LIBDIR}/ossl-modules\"" > > + > > +CFLAGS+=3D -DNDEBUG > > diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/M= akefile.inc > > index d995fb2a0cb2..d462d9f82857 100644 > > --- a/secure/lib/libcrypto/Makefile.inc > > +++ b/secure/lib/libcrypto/Makefile.inc > > @@ -14,108 +14,7 @@ CFLAGS+=3D -I${LCRYPTO_SRC}/include > > CFLAGS+=3D -I${LCRYPTO_SRC}/providers/common/include > > CFLAGS+=3D -I${LCRYPTO_SRC}/providers/implementations/include > > -.include > > - > > -.if ${TARGET_ENDIANNESS} =3D=3D 1234 > > -CFLAGS+=3D -DL_ENDIAN > > -.elif ${TARGET_ENDIANNESS} =3D=3D 4321 > > -CFLAGS+=3D -DB_ENDIAN > > -.endif > > - > > -.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "= amd64" || \ > > - ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} =3D=3D "i386" > > -ASM_${MACHINE_CPUARCH}=3D > > -.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powe= rpc64" || \ > > - ${MACHINE_ARCH} =3D=3D "powerpc64le" > > -ASM_${MACHINE_ARCH}=3D > > -.endif > > - > > -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) > > -CFLAGS+=3D -DOPENSSL_CPUID_OBJ > > -.if defined(ASM_aarch64) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_amd64) > > -CFLAGS+=3D -DOPENSSL_IA32_SSE2 > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 > > -CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -CFLAGS+=3D -DRC4_ASM > > -CFLAGS+=3D -DMD5_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DGHASH_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM -DX25519_ASM > > -CFLAGS+=3D -DPADLOCK_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_arm) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m > > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -CFLAGS+=3D -DBSAES_ASM > > -CFLAGS+=3D -DGHASH_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_i386) > > -CFLAGS+=3D -DOPENSSL_IA32_SSE2 > > -CFLAGS+=3D -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > -CFLAGS+=3D -DRC4_ASM > > -CFLAGS+=3D -DMD5_ASM > > -CFLAGS+=3D -DRMD160_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DWHIRLPOOL_ASM > > -CFLAGS+=3D -DGHASH_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DPADLOCK_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_powerpc) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DAES_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DSHA1_ASM > > -CFLAGS+=3D -DSHA256_ASM > > -CFLAGS+=3D -DSHA512_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_powerpc64) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DAES_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DSHA1_ASM > > -CFLAGS+=3D -DSHA256_ASM > > -CFLAGS+=3D -DSHA512_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DX25519_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -.elif defined(ASM_powerpc64le) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DAES_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DSHA1_ASM > > -CFLAGS+=3D -DSHA256_ASM > > -CFLAGS+=3D -DSHA512_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DX25519_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -.endif > > -.endif > > - > > -.if defined(LIB) > > -CFLAGS+=3D -DOPENSSLDIR=3D"\"/etc/ssl\"" > > -CFLAGS+=3D -DENGINESDIR=3D"\"${LIBDIR}/engines-3\"" > > -CFLAGS+=3D -DMODULESDIR=3D"\"${LIBDIR}/ossl-modules\"" > > -.endif > > - > > -CFLAGS+=3D -DNDEBUG > > - > > -MANDIR=3D ${SHAREDIR}/openssl/man/man > > +.include "Makefile.common" > > .for pcfile in ${PCFILES} > > ${pcfile}: ${pcfile}.in > > diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/li= bcrypto/modules/fips/Makefile > > index 510d017d27ab..c8b79e3badfd 100644 > > --- a/secure/lib/libcrypto/modules/fips/Makefile > > +++ b/secure/lib/libcrypto/modules/fips/Makefile > > @@ -4,123 +4,14 @@ SHLIB_NAME?=3D fips.so > > CFLAGS+=3D -DFIPS_MODULE > > -SRCS=3D fips_entry.c fipsprov.c self_test.c self_test_kats.c > > - > > -# XXX from secure/lib/libcrypto/Makefile.inc > > -.include > > - > > -#.include > > -# > > -#.if ${TARGET_ENDIANNESS} =3D=3D 1234 > > -#CFLAGS+=3D -DL_ENDIAN > > -#.elif ${TARGET_ENDIANNESS} =3D=3D 4321 > > -#CFLAGS+=3D -DB_ENDIAN > > -#.endif > > - > > -.if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D "= amd64" || \ > > - ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} =3D=3D "i386" > > -ASM_${MACHINE_CPUARCH}=3D > > -.elif ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D "powe= rpc64" || \ > > - ${MACHINE_ARCH} =3D=3D "powerpc64le" > > -ASM_${MACHINE_ARCH}=3D > > -.endif > > +SRCS+=3D fips_entry.c fipsprov.c self_test.c self_test_kats.c > > -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) > > -CFLAGS+=3D -DOPENSSL_CPUID_OBJ > > -.if defined(ASM_aarch64) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_amd64) > > -CFLAGS+=3D -DOPENSSL_IA32_SSE2 > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 > > -CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -CFLAGS+=3D -DRC4_ASM > > -CFLAGS+=3D -DMD5_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DGHASH_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM -DX25519_ASM > > -CFLAGS+=3D -DPADLOCK_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_arm) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m > > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -CFLAGS+=3D -DBSAES_ASM > > -CFLAGS+=3D -DGHASH_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_i386) > > -CFLAGS+=3D -DOPENSSL_IA32_SSE2 > > -CFLAGS+=3D -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DOPENSSL_BN_ASM_GF2m > > -CFLAGS+=3D -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM > > -CFLAGS+=3D -DRC4_ASM > > -CFLAGS+=3D -DMD5_ASM > > -CFLAGS+=3D -DRMD160_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DWHIRLPOOL_ASM > > -CFLAGS+=3D -DGHASH_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DPADLOCK_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_powerpc) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DAES_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DSHA1_ASM > > -CFLAGS+=3D -DSHA256_ASM > > -CFLAGS+=3D -DSHA512_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -.elif defined(ASM_powerpc64) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DAES_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DSHA1_ASM > > -CFLAGS+=3D -DSHA256_ASM > > -CFLAGS+=3D -DSHA512_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DX25519_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -.elif defined(ASM_powerpc64le) > > -CFLAGS+=3D -DOPENSSL_BN_ASM_MONT > > -CFLAGS+=3D -DAES_ASM > > -CFLAGS+=3D -DVPAES_ASM > > -CFLAGS+=3D -DSHA1_ASM > > -CFLAGS+=3D -DSHA256_ASM > > -CFLAGS+=3D -DSHA512_ASM > > -CFLAGS+=3D -DPOLY1305_ASM > > -CFLAGS+=3D -DECP_NISTZ256_ASM > > -CFLAGS+=3D -DX25519_ASM > > -CFLAGS+=3D -DKECCAK1600_ASM > > -.endif > > -.endif > > +.include "../../Makefile.common" > > # crypto > > SRCS+=3D provider_core.c provider_predefined.c \ > > core_fetch.c core_algorithm.c core_namemap.c self_test_core.c > > -# crypto/ec > > -SRCS+=3D ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ > > - ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ > > - ec2_smpl.c \ > > - ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ > > - ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ > > - curve448/f_generic.c curve448/scalar.c \ > > - curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.= c \ > > - ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl6= 4.c \ > > - curve448/arch_32/f_impl32.c > > -SRCS+=3D cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_= str.c \ > > - threads_pthread.c threads_none.c initthread.c \ > > - context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ > > - param_build_set.c der_writer.c threads_lib.c params_dup.c > > - > > SRCS+=3D cpuid.c ctype.c > > .if defined(ASM_aarch64) > > SRCS+=3D arm64cpuid.S armcap.c > > @@ -172,9 +63,24 @@ SRCS+=3D dh_lib.c dh_key.c dh_group_params.c dh_ch= eck.c dh_backend.c dh_gen.c \ > > # crypto/dsa > > SRCS+=3D dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \ > > - dsa_key.c dsa_backend.c dsa_gen.c > > + dsa_key.c dsa_backend.c dsa_gen.c > > # crypto/ec > > +SRCS+=3D ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ > > + ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ > > + ec2_smpl.c \ > > + ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ > > + ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ > > + curve448/f_generic.c curve448/scalar.c \ > > + curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ > > + ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ > > + curve448/arch_32/f_impl32.c > > +SRCS+=3D cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_= str.c \ > > + threads_pthread.c threads_none.c initthread.c \ > > + context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ > > + param_build_set.c der_writer.c threads_lib.c params_dup.c > > + > > +.include > > .if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} > > SRCS+=3D ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c > > .endif > >=20 > >=20 > >=20 >=20 >=20 From nobody Tue Jul 4 23:12:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qwdpz0ycgz4lh9w; Tue, 4 Jul 2023 23:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qwdpz0Gs7z3HTS; Tue, 4 Jul 2023 23:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688512331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oxji3Qj3TDADjTqXT9Sr1lkuCivmgtAMAABXUn+9sJA=; b=ZU9hYCuK1Hqp1N0X/e0nDEv7XU5vAcgJcDav94kAy39CN0idvpN+BwRcd1rR6HNM9ZIJTh kZbRsIrsLC1NHbX7utb1Ub8rcBb9iXwCb4tc52bQY7sQ78wvymOYWh4VnH0vvd4bXGUgz8 IVe7aSwWuk4c0s3oaFT7Ooba9bE27zeFP9IqXg/Ax1wpCwDwts/VL9chlG6QrjY9vzxtE6 wrEzHfU9+5h9miWVXjnbmsG4f9kn6+wv97isyIJSzxJN5ZEFbyHdUDomY2Vz/B4Fv9Wf+G rESOIhbptYKnqGdrtkKEr0hsqNXB2Z6sqG/9Kx7QeNpm+3RPhcjR8il1HDCSbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688512331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oxji3Qj3TDADjTqXT9Sr1lkuCivmgtAMAABXUn+9sJA=; b=qorA9tUBIcsfjDBhku9lMzGxjBtL84VAZ6QjoofTrD5UgFJJ4NpqpJRyk7EetzpSofNPZ8 svkn84D2eIWegB6Xn1zZW3e0o77IPBDUgKWNsBYdpNsgUbnBDcr/d5oOTmDOYM9Lru/lTV ZD536neutCBtrGkaeGYuialS0f+nA/uuvWE5UbI8xaF6ldYLNa3G1ZflhDmnV1yXuVkwYU BbN+wIDYQ5XOvmvJDjPFDAz53EcWpkUL9LvQzC2ehTAkjTQzSQAu2xrgzxAAq3IxQmCsYA 7qjUmVteT0VsePlMNh8YfdkGo9prKl8zZ2TAwFZtLz6hkYsqy9wg1N04qLF0vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688512331; a=rsa-sha256; cv=none; b=BCSAlNDaVGtLM2T/X0XzwK5BksmfLJ49i2yfXbOyXB8U9SDHq5/8zSA9dAwgo0aaboSQoj 4EtttN7CRYp6+qiUQO359Imuzri5Lid2tV4m2i84/M2Z2MKeQQymZQylvrT5v6g+n0KMzb PtNl0K+lYLK1rUS0EQiuDkFGkeLaNy+j6eI8vg0ASh6MQ0B5bqzZdjYkVv8B2THaVokJQ7 3vdAOk7DOcSY2d2go0HFxaxGa6MP1GK+WWBugKMzPqgew6g7NWKTzS69v4SsGyV8hVQHtP UwVB+AN8L+DE8/W6nDTo/zg+CICPIG1hhBL3U9T5vn0Amu+G6XE2WfefmTYbdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qwdpy6RxjzrXp; Tue, 4 Jul 2023 23:12: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 364NCA8G088774; Tue, 4 Jul 2023 23:12:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 364NCAAl088773; Tue, 4 Jul 2023 23:12:10 GMT (envelope-from git) Date: Tue, 4 Jul 2023 23:12:10 GMT Message-Id: <202307042312.364NCAAl088773@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: 658e7620672f - main - kern_lockf.c: fix typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 658e7620672f8eb650695992b4a73e004c5f101b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=658e7620672f8eb650695992b4a73e004c5f101b commit 658e7620672f8eb650695992b4a73e004c5f101b Author: Konstantin Belousov AuthorDate: 2023-07-04 22:23:57 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-04 23:11:37 +0000 kern_lockf.c: fix typo Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/kern/kern_lockf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index 171a0a861c6d..f551972ed33e 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -195,7 +195,7 @@ static void lf_print_owner(struct lock_owner *); struct lock_owner { LIST_ENTRY(lock_owner) lo_link; /* (l) hash chain */ int lo_refs; /* (l) Number of locks referring to this */ - int lo_flags; /* (c) Flags passwd to lf_advlock */ + int lo_flags; /* (c) Flags passed to lf_advlock */ caddr_t lo_id; /* (c) Id value passed to lf_advlock */ pid_t lo_pid; /* (c) Process Id of the lock owner */ int lo_sysid; /* (c) System Id of the lock owner */ From nobody Wed Jul 5 06:32:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwqbX6mwTz4lnr2; Wed, 5 Jul 2023 06: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 4QwqbX6YFwz3HmQ; Wed, 5 Jul 2023 06: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=1688538776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RO0/L7iHkUOJ41IhCyoRjLHlJS9Pg/gkOFu/MYl/MwU=; b=iFEW/j0/g+0fScQ0HnnZQyJE5FYp1BEOjSOdgNlgufxWfGMGh1E5thO5SbkZSrpv1pXgFb vUJQJtzX0bcu94Z/8yaFjzpLRVFeHDhzyATDFfvYetWV0jkWLvQRdu9iS5kPRv73u4KhtL w7xbTtzL7ntyQYfdrLI9YIFTUptefXkAaJuwsVxRf8I5XZv7uwZkPX14Of193IJB/hPHN7 nXqBqrREyQr0Kk+9H06g/Qez+XcnDtw2CHJ1JsR9Fri9v/gY9ksi94meTumK3Ig2CWFp+N Uvsyryv6UkA0i8IkbLRxL+urb8Ac6YYwCFOplnvER6C9nyDKWuxqvQhNozTAhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688538776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RO0/L7iHkUOJ41IhCyoRjLHlJS9Pg/gkOFu/MYl/MwU=; b=YNf0cFDVv+EgXlffLnDVHNbHSWRKsDtxG9ZzuqyanF+gHK1kpkdZF+oX9u375V+b50WJ4M rdDl1r8+SBFeDM8R8fK+erHumluyI0z66isJVsU3OFbv4szAj+sGT6CsEEU15vxt6+ZDGG bsn3Kxh9l8JM3L5YJBAwjP8TGgenbHb5v8momFQGnKSOK+RNm0D/0rnhP3c/7xqQLnjYiX lL9dJkfCYr1xc5T2FVLoWjPyqHfRa6akbchbM4YDDh2n4OwvhGZUtWCVkRFUsq2C2ufvCj zyol+DrZvmDJ1DE7oIh/11v1jSkoxnoWqBhGmFXtawRjpGYIpYCLd3wyG4JUkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688538776; a=rsa-sha256; cv=none; b=gda6XwlnL7ELIWU7RUAFymsDYQgdwR+gTxxd7/A/RTjWM0jEKjWQgUa/JmxCPiFNLu04Sv XomrNjvLWArUYcmWKmSSvOOms1s0GxHfHbhtHKXwwGzvX0ESs96irXBoO8VnmKC+e5CDJ0 73Ddc1myGtsR4pCbiIW9d9aTEmOAwSULGWcMkcori+hiPfdrhMZ1ex6VTosR7dgHugeuXo aV3hT5b3MfhbswFi0OIEs24c3iLJ9DPRYC30i7qeLLNYvFEib/1Xda1o9OkAmKekpjve4X j30juKNc/IH60BZXXWhCW6gnGhJerLtDn0ySHSh72oQJQe4hheke5vrpJRZBww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwqbX5XVcz14cH; Wed, 5 Jul 2023 06: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 3656Wu6O025240; Wed, 5 Jul 2023 06: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 3656WuF4025239; Wed, 5 Jul 2023 06:32:56 GMT (envelope-from git) Date: Wed, 5 Jul 2023 06:32:56 GMT Message-Id: <202307050632.3656WuF4025239@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: 3743f3d020bb - main - pci_vendors: update to 2023-06-19 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3743f3d020bbb8899af68fc5e01086113468fd2c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=3743f3d020bbb8899af68fc5e01086113468fd2c commit 3743f3d020bbb8899af68fc5e01086113468fd2c Author: Baptiste Daroussin AuthorDate: 2023-07-05 06:30:42 +0000 Commit: Baptiste Daroussin CommitDate: 2023-07-05 06:31:37 +0000 pci_vendors: update to 2023-06-19 --- share/misc/pci_vendors | 150 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 130 insertions(+), 20 deletions(-) diff --git a/share/misc/pci_vendors b/share/misc/pci_vendors index fb0a22837428..29f7a824bbaf 100644 --- a/share/misc/pci_vendors +++ b/share/misc/pci_vendors @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2023.05.15 -# Date: 2023-05-15 03:15:02 +# Version: 2023.06.19 +# Date: 2023-06-19 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -768,7 +768,6 @@ 1028 213e PERC H765i MX 1028 213f PERC H365i Adapter 1028 2140 PERC H365i Front - 1028 2141 PERC H365i MX 1028 2142 HBA465e Adapter 1028 2209 HBA465i Adapter 1028 220a HBA465i Front @@ -2876,7 +2875,7 @@ 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 Gaming X 8GB 1462 3416 Radeon RX 570 - 1462 3418 Radeon RX 580 Armor 4G OC + 1462 3418 Radeon RX 580 ARMOR 8G OC 1462 341b Radeon RX 570 Armor 8G OC 1462 341e Radeon RX 570 Armor 4G OC 1462 809e Radeon RX 480 4GB @@ -3566,6 +3565,8 @@ 103c 3580 Radeon HD 5450 1043 0386 Radeon HD 5450 1043 03c2 EAH5450 SILENT/DI/512MD2 (LP) +# GV-R545SC-1GI + 1458 21d8 Radeon HD 5450 1GB DDR3 Silent 1462 2130 Radeon HD 5450 1462 2131 Radeon HD 5450 1462 2133 Radeon HD 6350 @@ -3909,7 +3910,9 @@ 73df Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] 1043 16c2 Radeon RX 6800M 1458 2408 Radeon RX 6750 XT GAMING OC 12G + 1462 3980 Radeon RX 6700 XT Mech 2X 12G [MSI] 1849 5219 Radeon RX 6700 XT Challenger D + 1849 5222 RX 6700 XT Challenger D OC 1da2 e445 Sapphire Radeon RX 6700 1eae 6601 Speedster QICK 319 RX 6700 XT 73e0 Navi 23 @@ -3935,10 +3938,12 @@ 1da2 e457 PULSE AMD Radeon RX 6500 XT 7448 Navi31 [Radeon Pro W7900] 744c Navi 31 [Radeon RX 7900 XT/7900 XTX] + 1da2 471e PULSE RX 7900 XTX 1da2 e471 NITRO+ RX 7900 XTX Vapor-X 1eae 7901 RX-79XMERCB9 [SPEEDSTER MERC 310 RX 7900 XTX] - 745e Navi 31 + 745e Navi31 [Radeon Pro W7800] 7480 Navi 33 [Radeon RX 7700S/7600S/7600M XT] + 1849 5313 RX 7600 Challenger OC 7483 Navi 33 [Radeon RX 7600M/7600M XT] 7489 Navi 33 7833 RS350 Host Bridge @@ -9437,8 +9442,10 @@ 103c 0024 Pavilion ze4400 builtin USB 103c 0025 XE4500 Notebook 104d 810f VAIO PCG-U1 USB/OHCI Revision 1.0 + 10b9 5237 M5273 USB OHCI PCI adapter 1849 5237 ASRock 939Dual-SATA2 Motherboard 5239 USB 2.0 Controller + 10b9 5239 M5273 USB PCI adapter 1849 5239 ASRock 939Dual-SATA2 Motherboard 5243 M1541 PCI to AGP Controller 5246 AGP8X Controller @@ -12672,7 +12679,7 @@ 20f3 GA100 [A800-SXM4-80GB] 20f5 GA100 [A800 80GB PCIe] 20f6 GA100 [A800 40GB PCIe] - 20fd GA100 [A100T] + 20fd GA100 [AX800 Converged Accelerator] 20fe GA100 20ff GA100 2182 TU116 [GeForce GTX 1660 Ti] @@ -12719,13 +12726,14 @@ 22ba AD102 High Definition Audio Controller 2302 GH100 2313 GH100 [H100 CNX] - 2321 GH100 + 2321 GH100 [H100L 94GB] 2322 GH100 [H800 PCIe] 2324 GH100 [H800] - 2330 GH100[H100 SXM5 80GB] + 2330 GH100 [H100 SXM5 80GB] 2331 GH100 [H100 PCIe] 2336 GH100 [H100] 2339 GH100 [H100] + 233a GH100 [H800L 94GB] 2414 GA103 [GeForce RTX 3060 Ti] 2420 GA103M [GeForce RTX 3080 Ti Mobile] 2438 GA103GLM [RTX A5500 Laptop GPU] @@ -12827,7 +12835,7 @@ 2730 AD103GLM [RTX 5000 Ada Generation Laptop GPU] 2757 GN21-X11 2782 AD104 [GeForce RTX 4070 Ti] - 2785 AD104 + 2785 AD104 [AC AD104 20GB] 2786 AD104 [GeForce RTX 4070] 27a0 AD104M [GeForce RTX 4080 Max-Q / Mobile] 27b0 AD104GL [RTX 4000 SFF Ada Generation] @@ -16754,6 +16762,7 @@ 0720 SM720 Lynx3DM 0730 SM731 Cougar3DR 0750 SM750 + 0768 SM768 0810 SM810 LynxE 0811 SM811 LynxE 0820 SM820 Lynx3D @@ -17542,6 +17551,8 @@ 5163 RealSSD P425m 5180 9100 PRO NVMe SSD 5181 9100 MAX NVMe SSD + 5188 7100 ECO NVMe SSD + 5189 7100 MAX NVMe SSD 5190 9200 ECO NVMe SSD 5191 9200 PRO NVMe SSD 5192 9200 MAX NVMe SSD @@ -17604,6 +17615,10 @@ 51c3 7450 PRO NVMe SSD 51c4 7450 MAX NVMe SSD 1344 3000 U.3 1600GB [MTFDKCB1T6TFS/MTFDKCC1T6TFS] + 5410 2200S NVMe SSD + 5411 2450 NVMe SSD (DRAM-less) + 5414 3460 NVMe SSD + 6001 2100AI NVMe SSD [Nitro] 1345 Arescom Inc 1347 Odetics 1349 Sumitomo Electric Industries, Ltd. @@ -19642,6 +19657,7 @@ # MT7612E too? 7662 MT7662E 802.11ac PCI Express Wireless Network Adapter 7915 MT7915E 802.11ax PCI Express Wireless Network Adapter + 7916 MT7905D/MT7975 # WiFi 6E capable 7922 MT7922 802.11ax PCI Express Wireless Network Adapter 7961 MT7921 802.11ax PCI Express Wireless Network Adapter @@ -20248,6 +20264,7 @@ 14e4 df24 NetXtreme-E NGM2100D BCM57508 2x100G KR Mezz Ethernet 1751 BCM57504 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb/200Gb Ethernet 1028 09d4 PowerEdge XR11/XR12 LOM + 1028 0b1b PowerEdge XR5610 LOM 14e4 5045 NetXtreme-E BCM57504 4x25G OCP3.0 14e4 5100 NetXtreme-E Single-port 100G QSFP56 Ethernet OCP 3.0 Adapter (BCM957504-N1100G) 14e4 5105 NetXtreme-E Single-port 100G DSFP Ethernet OCP 3.0 Adapter (BCM957504-N1100GD) @@ -20578,7 +20595,7 @@ f800 BCM78800 Switch ASIC [Trident5-X12] f900 BCM78900 Switch ASIC [Tomahawk5] f903 BCM78903 Switch ASIC [Tomahawk6] - f905 BCM78905 Switch ASIC [Tomahawk5] + f905 BCM78905 Switch ASIC [Tomahawk5+] f910 BCM78910 Switch ASIC [Tomahawk6] f914 BCM78914 Switch ASIC [Tomahawk6] f917 BCM78917 Switch ASIC [Tomahawk6] @@ -21525,12 +21542,15 @@ 5004 PC SN520 NVMe SSD 5005 PC SN520 NVMe SSD 5006 WD Black SN750 / PC SN730 NVMe SSD + 5007 PC SN530 NVMe SSD (DRAM-less) + 5008 PC SN530 NVMe SSD 5009 WD Blue SN550 NVMe SSD 15b7 5009 WD Blue SN550 NVMe SSD 500b PC SN530 NVMe SSD 1414 500b Xbox Series X 500d WD Ultrastar DC SN340 NVMe SSD 5011 WD PC SN810 / Black SN850 NVMe SSD + 5015 PC SN740 NVMe SSD 5017 WD Black SN770 NVMe SSD 501a WD Blue SN570 NVMe SSD 1TB 5025 WD Blue SN570 NVMe SSD 2TB @@ -23588,6 +23608,8 @@ 5013 PS5013 E13 NVMe Controller 5016 E16 PCIe4 NVMe Controller 5018 E18 PCIe4 NVMe Controller + 5019 PS5019-E19 PCIe4 NVMe Controller (DRAM-less) + 5021 PS5021-E21 PCIe4 NVMe Controller (DRAM-less) 1989 Montilio Inc. 0001 RapidFile Bridge 8001 RapidFile @@ -24499,11 +24521,13 @@ 1284 PC300 NVMe Solid State Drive 512GB 1285 PC300 NVMe Solid State Drive 1TB 1327 BC501 NVMe Solid State Drive - 1339 BC511 + 1339 BC511 NVMe SSD 1504 PC400 NVMe SSD 1527 PC401 NVMe Solid State Drive 256GB - 174a Gold P31/PC711 NVMe Solid State Drive - 1959 Platinum P41 NVMe Solid State Drive 2TB + 1639 PC611 NVMe Solid State Drive + 174a Gold P31/BC711/PC711 NVMe Solid State Drive + 1959 Platinum P41/PC801 NVMe Solid State Drive + 1d59 BC901 NVMe Solid State Drive (DRAM-less) 2204 960GB TLC PCIe Gen3 x4 NVMe M.2 22110 243b PE6110 NVMe Solid State Drive 1c5c 0100 PE6110 NVMe Solid State Drive @@ -24518,6 +24542,14 @@ 1028 214a DC NVMe PE8010 RI U.2 7.68TB 1c5c 0100 PE8000 Series NVMe Solid State Drive 2849 PE81x0 U.2/3 NVMe Solid State Drive + 1028 2262 DC NVMe OPAL PE8110 RI U.2 960GB + 1028 2263 DC NVMe OPAL PE8110 RI U.2 1920GB + 1028 2264 DC NVMe OPAL PE8110 RI U.2 3840GB + 1028 2265 DC NVMe OPAL PE8110 RI U.2 7680GB + 1028 2266 DC NVMe ISE PE8110 RI U.2 960GB + 1028 2267 DC NVMe ISE PE8110 RI U.2 1920GB + 1028 2268 DC NVMe ISE PE8110 RI U.2 3840GB + 1028 2269 DC NVMe ISE PE8110 RI U.2 7680GB 1c5c 0101 PE81x0 U.2/3 NVMe Solid State Drive 1c5f Beijing Memblaze Technology Co. Ltd. 000d PBlaze5 520/526 @@ -24583,7 +24615,7 @@ 1c5f 4b41 NVMe SSD PBlaze6 6936 6400GB 2.5" U.3 1c5f 4b51 NVMe SSD PBlaze6 6936 12800GB 2.5" U.3 1c5f 4b61 NVMe SSD PBlaze6 6936 25600GB 2.5" U.3 - 003f PBlaze7 7940/7946 Gen5 NVMe SSD + 003f PBlaze7 7940/7946 NVMe SSD 0540 PBlaze4 NVMe SSD 0550 PBlaze5 700/900 0555 PBlaze5 510/516 @@ -24818,6 +24850,7 @@ 08b1 AQC108 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 11b1 AQC111 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 12b1 AQC112 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] + 14c0 AQC113C NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 87b1 AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 94c0 AQC113CS NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 1043 87f5 ProArt X570-CREATOR WIFI @@ -24982,7 +25015,9 @@ 0001 Colossus GC2 [C2] 0002 Colossus GC1 [S1] 1d97 Shenzhen Longsys Electronics Co., Ltd. + 1d97 Lexar NM620 NVME SSD (DRAM-less) 2263 SM2263EN/SM2263XT-based OEM SSD + 2269 Lexar NM760 NVME SSD (DRAM-less) # nee Facebook, Inc. 1d9b Meta Platforms, Inc. 0010 Networking DOM Engine @@ -25485,6 +25520,7 @@ 1201 NVMe SSD Controller MAP1201 1202 NVMe SSD Controller MAP1202 1601 NVMe SSD Controller MAP1601 + 1602 NVMe SSD Controller MAP1602 1e4c GSI Technology 0010 Associative Processing Unit [Leda] 1e4c 0120 SE120 @@ -25537,6 +25573,8 @@ 1002 NVMe SSD [3DNAND] 2.5" U.2 (LJ1) 1e95 1101 NVMe SSD [3DNAND] 2.5" U.2 (LJ1) 1ea0 5636 TP1500 Series U.2 NVMe Datacenter SSD + 9100 CL1-3D256-Q11 NVMe SSD M.2 +1e96 Drut Technologies Inc. 1e9f Lynxi Technologies Co., Ltd. 1ea0 Tencent Technology (Shenzhen) Company Limited 2a16 Cloud Intelligent Inference Controller @@ -25558,19 +25596,40 @@ 3401 SSD Contoller 1ebd EMERGETECH Company Ltd. 0101 Seirios 2063 Video Codec -1ec6 Vastai Technologies (Shanghai) Inc. +1ec6 Vastai Technologies 0100 SV100 + 1ec6 0010 VA1V + 1ec6 0011 VA1A + 1ec6 0012 VA1 + 1ec6 0013 VA1E + 1ec6 0020 VA10V + 1ec6 0021 VA10A + 1ec6 0022 VA10 + 1ec6 0030 VE1P + 1ec6 0031 VE1S + 1ec6 0032 VE1V + 1ec6 0033 VE1M + 1ec6 0034 VE1E + 1ec6 0040 VV1U + 1ec6 0041 VA1U + 0200 SG100 + 1ec6 0060 VG1200 + 1ec6 0061 VG1600 + 1ec6 0062 VG1800 + 1ec6 0063 VG1000 + 020f SG100 vGPU 1ec8 Innosilicon Co Ltd 8800 Fantasy I 1ec8 12a2 Fantasy I Device 8810 Fantasy I + 1ec8 12a2 Fantasy I Device 9800 Fantasy II 1ec8 12a2 Fantasy II Device 9802 Fantasy II 1ec8 12a2 Fantasy II Device 9804 Fantasy II 1ec8 12a2 Fantasy II Device - 9810 Fantasy II + 9810 Fantasy II-M 1ec8 12a2 Fantasy II Device 1ec9 Wingtech Group(HongKong)Limited 1eca Lightmatter @@ -25607,6 +25666,7 @@ 1ee1 0009 Airglow A430 NVMe SSD U.2 1.6TB 1ee1 000a Airglow A430 NVMe SSD U.2 3.2TB 1ee1 000b Airglow A430 NVMe SSD U.2 4.8TB + 1ee1 0012 Airglow Z400 NVMe ZNS SSD U.2 5.76TB 1ee4 PETAIO INC 1180 P8118 U.2 Single Port SSD 1ee9 SUSE LLC @@ -25855,6 +25915,7 @@ 500d OM3PDP3 NVMe SSD 500e SNVS2000G [NV1 NVMe PCIe SSD 2TB] 5012 DC1500M U.2 Enterprise SSD + 5013 FURY Renegade NVMe SSD 270b Xantel Corporation 270f Chaintech Computer Co. Ltd 2711 AVID Technology Inc. @@ -26720,13 +26781,16 @@ 02b4 Comet Lake PCI Express Root Port #13 02b8 Comet Lake PCI Express Root Port #1 02bc Comet Lake PCI Express Root Port #5 + 02bf Comet Lake PCI Express Root Port #8 02c5 Comet Lake Serial IO I2C Host Controller 1028 09be Latitude 7410 02c8 Comet Lake PCH-LP cAVS 1028 09be Latitude 7410 02d3 Comet Lake SATA AHCI Controller + 02d7 Comet Lake RAID Controller 02e0 Comet Lake Management Engine Interface 1028 09be Latitude 7410 + 02e3 Comet Lake AMT SOL Redirection 02e8 Serial IO I2C Host Controller 1028 09be Latitude 7410 02e9 Comet Lake Serial IO I2C Host Controller @@ -27346,7 +27410,7 @@ 0d58 Ethernet Controller XXV710 Intel(R) FPGA Programmable Acceleration Card N3000 for Networking 8086 0000 Ethernet Controller XXV710 Intel(R) FPGA Programmable Acceleration Card N3000 for Networking 8086 0001 Ethernet Controller XXV710 Intel(R) FPGA Programmable Acceleration Card N3000 for Networking - 0d9f Ethernet Controller (2) I225-IT + 0d9f Ethernet Controller I225-IT 0dcd Ethernet Connection C825-X 0dd2 Ethernet Network Adapter I710 1137 0000 I710T4LG 4x1 GbE RJ45 PCIe NIC @@ -28301,6 +28365,7 @@ 1250 430HX - 82439HX TXC [Triton II] 125b Ethernet Controller I226-LM 125c Ethernet Controller I226-V + 125d Ethernet Controller I226-IT 1360 82806AA PCI64 Hub PCI Bridge 1361 82806AA PCI64 Hub Controller (HRes) 8086 1361 82806AA PCI64 Hub Controller (HRes) @@ -29105,6 +29170,8 @@ 1b48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE LR Server Adapter 8086 a11f PRO/10GbE LR Server Adapter + 1bd2 Sapphire Rapids SATA AHCI Controller + 1bf2 Sapphire Rapids SATA AHCI Controller 1c00 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 0-3) 1c01 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 0-3) 1c02 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller @@ -33281,12 +33348,15 @@ 8086 1216 WiMAX/WiFi Link 5150 ABG 8086 1311 WiMAX/WiFi Link 5150 AGN 8086 1316 WiMAX/WiFi Link 5150 ABG + 4389 WM590 Chipset LPC Controller 438b Tiger Lake-H LPC/eSPI Controller 43a3 Tiger Lake-H SMBus Controller 43a4 Tiger Lake-H SPI Controller 43b0 Tiger Lake-H PCI Express Root Port #9 + 43ba Tiger Lake-H PCIe Root Port #3 43bc Tiger Lake-H PCI Express Root Port #5 43c8 Tiger Lake-H HD Audio Controller + 43d3 Tiger Lake SATA AHCI Controller 43e0 Tiger Lake-H Management Engine Interface 43e8 Tiger Lake-H Serial IO I2C Controller #0 43e9 Tiger Lake-H Serial IO I2C Controller #1 @@ -33303,6 +33373,7 @@ 4538 Elkhart Lake PCI-e Root Complex 4555 Elkhart Lake [UHD Graphics Gen11 16EU] 4571 Elkhart Lake [UHD Graphics Gen11 32EU] + 4602 Alder Lake Host and DRAM Controller 460d 12th Gen Core Processor PCI Express x16 Controller #1 461d Alder Lake Innovation Platform Framework Processor Participant 1028 0b10 Precision 3571 @@ -33326,6 +33397,7 @@ 464d 12th Gen Core Processor PCI Express x4 Controller #0 464f 12th Gen Core Processor Gaussian & Neural Accelerator 1028 0b10 Precision 3571 + 465d Alder Lake Imaging Signal Processor 4660 12th Gen Core Processor Host Bridge/DRAM Registers 4668 12th Gen Core Processor Host Bridge/DRAM Registers 466d Alder Lake-P Thunderbolt 4 NHI #1 @@ -33369,7 +33441,10 @@ 4b24 Elkhart Lake SPI (Flash) Controller 4b38 Elkhart Lake PCH PCI Express Root Port #0 4b39 Elkhart Lake PCH PCI Express Root Port #1 + 4b3c Elkhart Lake PCIe Root Port #4 4b3e Elkhart Lake PCH PCI Express Root Port #6 + 4b4b Elkhart Lake Serial IO I2C Controller #4 + 4b4d Elkhart Lake Serial IO UART Controller #2 4b58 Elkhart Lake High Density Audio bus interface 4b63 Elkhart Lake SATA AHCI 4b70 Elkhart Lake Management Engine Interface @@ -33448,18 +33523,22 @@ 5181 Alder Lake PCH-P LPC/eSPI Controller 5182 Alder Lake PCH eSPI Controller 1028 0b10 Precision 3571 + 5187 Alder Lake LPC Controller 51a3 Alder Lake PCH-P SMBus Host Controller 1028 0b10 Precision 3571 51a4 Alder Lake-P PCH SPI Controller 1028 0b10 Precision 3571 51a8 Alder Lake PCH UART #0 51a9 Alder Lake PCH UART #1 + 51aa Alder Lake SPI Controller + 51ab Alder Lake SPI Controller 51b1 Alder Lake PCI Express x1 Root Port #10 51bf Alder Lake PCH-P PCI Express Root Port #9 51c5 Alder Lake-P Serial IO I2C Controller #0 51c6 Alder Lake-P Serial IO I2C Controller #1 51c8 Alder Lake PCH-P High Definition Audio Controller 1028 0b10 Precision 3571 + 51cc Alder Lake Smart Sound Technology Audio Controller 51d3 Alder Lake-P SATA AHCI Controller 1028 0b10 Precision 3571 51d8 Alder Lake-P Serial IO I2C Controller #2 @@ -33499,18 +33578,38 @@ 5693 DG2 [Arc A370M] 5694 DG2 [Arc A350M] 5695 DG2 [Iris Xe MAX A200M] + 5696 DG2 [Arc A570M] + 5697 DG2 [Arc A530M] + 5698 DG2 [Arc Xe Graphics] 56a0 DG2 [Arc A770] 56a1 DG2 [Arc A750] 56a2 DG2 [Arc A580] + 56a3 DG2 [Arc Xe Graphics] + 56a4 DG2 [Arc Xe Graphics] 56a5 DG2 [Arc A380] 56a6 DG2 [Arc A310] + 56a7 DG2 [Arc Xe Graphics] + 56a8 DG2 [Arc Xe Graphics] + 56a9 DG2 [Arc Xe Graphics] 56b0 DG2 [Arc Pro A30M] 56b1 DG2 [Arc Pro A40/A50] - 56c0 Data Center GPU Flex 170 - 56c1 Data Center GPU Flex 140 + 56b2 DG2 [Arc Pro A60M] + 56b3 DG2 [Arc Pro A60] + 56c0 ATS-M [Data Center GPU Flex 170] + 56c1 ATS-M [Data Center GPU Flex 140] + 5780 Thunderbolt 80/120G Bridge [Barlow Ridge Host 80G 2023] + 5781 Thunderbolt 80/120G NHI [Barlow Ridge Host 80G 2023] + 5782 Thunderbolt 80/120G USB Controller [Barlow Ridge Host 80G 2023] + 5783 Thunderbolt Bridge [Barlow Ridge Host 40G 2023] + 5784 Thunderbolt NHI [Barlow Ridge Host 40G 2023] + 5785 Thunderbolt USB Controller [Barlow Ridge Host 40G 2023] + 5786 Thunderbolt 80/120G Bridge [Barlow Ridge Hub 80G 2023] + 5787 Thunderbolt 80/120G USB Controller [Barlow Ridge Hub 80G 2023] 579c Ethernet Connection E825-C for backplane 579d Ethernet Connection E825-C for QSFP 579e Ethernet Connection E825-C for SFP + 57a4 Thunderbolt Bridge [Barlow Ridge Hub 40G 2023] + 57a5 Thunderbolt USB Controller [Barlow Ridge Hub 40G 2023] 57b1 Ethernet Controller E610 1GBASE T 8086 0000 Ethernet Converged Network Adapter E610 5845 QEMU NVM Express Controller @@ -33907,6 +34006,11 @@ 7afc Alder Lake-S PCH Serial IO I2C Controller #4 7afd Alder Lake-S PCH Serial IO I2C Controller #5 7d0b Volume Management Device NVMe RAID Controller Intel Corporation + 7d40 Meteor Lake-M [Intel Graphics] + 7d45 Meteor Lake-P [Intel Graphics] + 7d55 Meteor Lake-P [Intel Graphics] + 7d60 Meteor Lake-M [Intel Graphics] + 7dd5 Meteor Lake-P [Intel Graphics] 7e01 Meteor Lake-P LPC/eSPI Controller 7e22 Meteor Lake-P SMBus Controller 7e23 Meteor Lake-P SPI Controller @@ -35076,9 +35180,13 @@ 1bd4 0084 Ethernet Controller RP1000 for 10GbE SFP+(lldp) 1bd4 0085 Ethernet Controller SP1000A for 10GBASE-T 8088 0000 Ethernet Network Adaptor RP1000 for 10GbE SFP+ + 8088 0300 Ethernet Network Adaptor RP1000-A03 for 10GbE SFP+ + 8088 0400 Ethernet Network Adaptor RP1000-A04 for 10GbE SFP+ 2000 Ethernet Controller RP2000 Virtual Function for 10GbE SFP+ 2001 Ethernet Controller RP2000 for 10GbE SFP+ 8088 2000 Ethernet Network Adaptor RP2000 for 10GbE SFP+ + 8088 2300 Ethernet Network Adaptor RP2000-A03 for 10GbE SFP+ + 8088 2400 Ethernet Network Adaptor RP2000-A04 for 10GbE SFP+ 80ee InnoTek Systemberatung GmbH beef VirtualBox Graphics Adapter cafe VirtualBox Guest Service @@ -35101,7 +35209,7 @@ 1001 Ethernet Controller N400 Series for 1GbE (Dual-port) 1020 Ethernet Controller N10 Series for 10GbE (Quad-port) 1021 Ethernet Controller N400 Series for 1GbE (Quad-port) - 1060 Ethernet Controller N10 Series for 10GbE (8-port) + 1060 Ethernet Controller N10 Series for 1GbE or 10GbE (8-port) 1080 Ethernet Controller N10 Series Virtual Function 1081 Ethernet Controller N400 Series Virtual Function 8308 Ethernet Controller N500 Series for 1GbE (Quad-port, Copper RJ45) @@ -35673,9 +35781,11 @@ 1500 STAR1500 PCIe NVMe SSD Controller 1501 STAR1500C NVMe SSD 1502 STAR1500E NVMe SSD + 1504 STAR1500L NVMe SSD 2000 STAR2000 NVMe Controller 2001 STAR2000E NVMe SSD 2002 STAR2000C NVMe SSD + 2003 STAR2000L NVMe SSD a000 Asix Electronics Corporation (Wrong ID) a0a0 AOPEN Inc. a0f1 UNISYS Corporation From nobody Wed Jul 5 09:46:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwvtT2zGcz4lJVH; Wed, 5 Jul 2023 09:46: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 4QwvtT2XcFz3Bnv; Wed, 5 Jul 2023 09:46:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688550369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Y1ZRNrSNHAmCN2B8Yb35w/sulwRlUTIyWcvMd3VJRU=; b=S4VRC7FI3/5BcSiFaSCbcJBN6RVWZOafiCi4Z5fFs44yPmli2twer6Mm5xX46aVVelb5w7 9G8iNM7VvlfEDGp6SZZH3nM33ipvzKW43TE0b3c2KV2rTUSOdAGEHC4n8FCqBU0o2/CONK nTnKlXy1qvnam+QzrDDeLN0mwB/EQIwcUwb2nnKnNVDejpFSC5SuZVODQbard9OFaZ5Tnx ENbG63MVo+p1SZHEm7cZBWBu8h8OLJjr+z+6BAPjk4kbEOPxZxbw2Ucbs+2WmD3SzyiHOd MvjubPulBZ9BPQEKYtsJZ9uVw76JesUHrIuX1LoUg4fw2fk8CYAtA1iC0RWWwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688550369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Y1ZRNrSNHAmCN2B8Yb35w/sulwRlUTIyWcvMd3VJRU=; b=afhRko2PHl476LfHHnrOogmk86bXxDQMEdBdlPy/1GoMKYkEIXrnqS6h54lpW5QDSysfT1 ++stkXXXXe/qxtUUWEwq0O1STbGjYwsZh3YIAOtkvREXer17rfAaB015H/sCUW/MoHp/3+ HzzWrv+6AiXXvYi4oQ1GZpukxReoB1USoR0DAZ5wA3vXB5OKKtdgLFOP/jb3LWUKcxhZEQ ATEbNbdjsuvTVem3EQ2VcPwiwut2jfWWI/iaJh30yPqHl7Sz8mKnjq6d3el59bz2RPK3ri yurkuAGPRg39mGflQpuFzgX6h75+duO7RGq/n2IK78Ry3YfSGpJPohjPWkgL9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688550369; a=rsa-sha256; cv=none; b=pwkvdwzlQ2jymVgcDG8k4SmawX6cULWtXL/F2D2WIAkilspKUFEupBnzAfcxnAm1HE+Gug v0LWiZs5mHfN7Ed8xlmsh1KmS4l+CRQOeJxpar11pOEB3myIaJUtknb4yd+oqhTg9Z6y4E S0QgFFhSIJI1O4oo++syKxBSkKVFBPVgoGc17cMd3RbOSBFm90VvHk9UmkCe3F+dKkopRg r0IwP5i/ffvWGP/qm3wCxUza2A+fHVbUpb/eDLgpm3VjKBxw65Np9YrAK8bu0h1CWSZqv3 OxKhUWba2Lggc/kaiWmuErnC1bMubXIGNdO5mMpcpVVZp84WF6EBEZ2IQqaSiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwvtT1c5Sz18tv; Wed, 5 Jul 2023 09:46: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 3659k9g7039195; Wed, 5 Jul 2023 09:46:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3659k9Xw039194; Wed, 5 Jul 2023 09:46:09 GMT (envelope-from git) Date: Wed, 5 Jul 2023 09:46:09 GMT Message-Id: <202307050946.3659k9Xw039194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 6b1f53295148 - main - arm64: Fix a use of update_lower_register List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b1f53295148fb1a10b1193dbd22cb00a796f8d6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=6b1f53295148fb1a10b1193dbd22cb00a796f8d6 commit 6b1f53295148fb1a10b1193dbd22cb00a796f8d6 Author: Andrew Turner AuthorDate: 2023-07-03 09:38:10 +0000 Commit: Andrew Turner CommitDate: 2023-07-05 09:42:14 +0000 arm64: Fix a use of update_lower_register In get_kernel_reg_masked we use update_lower_register to get the lower value of two registers for a given field. It will return the entire register value with just the single field updated. Because of this get_kernel_reg_masked needs to use the returned value directly rather than ORing each field together. Fix this by updating the mask and returning that from get_kernel_reg_masked. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40846 --- sys/arm64/arm64/identcpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 20ef74f58de2..bbb3e2d1484b 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1821,12 +1821,12 @@ get_kernel_reg_masked(u_int reg, uint64_t *valp, uint64_t mask) for (int i = 0; i < nitems(user_regs); i++) { if (user_regs[i].reg == reg) { val = CPU_DESC_FIELD(kern_cpu_desc, i); - *valp = 0; fields = user_regs[i].fields; for (int j = 0; fields[j].type != 0; j++) { - *valp |= update_lower_register(mask, val, + mask = update_lower_register(mask, val, fields[j].shift, 4, fields[j].sign); } + *valp = mask; return (true); } } From nobody Wed Jul 5 09:46:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwvtV3yJvz4lJDy; Wed, 5 Jul 2023 09:46: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 4QwvtV3T8Lz3C6g; Wed, 5 Jul 2023 09:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688550370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Tbh3qGGC0mjcG+EN3Y/lHV65ZzsCcCKDSY9nY/i1J8=; b=t3FyjvzZ4AdgslOWIQpts5+wNu3DcDZGoToZ/H7YRhz7xuhDG0wdMMgtNm3S30xu0BD7Ih 9QEPzt1jto7rZXFm/35qW3KHXLn72j40utaDs8pU1A3mZ+aIZrvAQvJC7sr+nLp6F31Vi/ 7fcK2kDoZ/uAHfnxa4SS9TSjjKcfszYdUYKVmZQCwUGzmpeNQz2HP93g0jYls4bKf8MmHe bAnu6HWy+nHKeoC3YNQP3eplX8i45OwTGxjkav9hDQ9PlqMJBLQLpE/LB5uX+wZC5AJvpD fZmqIRFH8vf7uOelLcD2dwNEWfgPzj7poaRqRF2/ljOuydH1vChSuPqZgED/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688550370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Tbh3qGGC0mjcG+EN3Y/lHV65ZzsCcCKDSY9nY/i1J8=; b=GvFbvruH50raI4CtvlimLx2HiS7Z7Zo8xBFTDRXGZDj6y+ctmnIcavYJJcX/lGX1/LHEVF BVBmtG8Xu/qdQANBtxfw4euCvT6Z5oK2tTcDl05sEdq4/A0IQuZDfdtYYWfr+5VQjzi+gN imzSewjrdZM1+EIm1qP5fYtTJXiHGfGgig6dxNZ1IX8mhFjvvDAjPytxqk8eYRcQMEP2WZ ue6GW8zaaf3Qnk65rJLRgr6BsnHFkvh51Y8ex7LHyIId27J5lq1Bjw7sEebm+mc8XLRZf7 Pf5lAlWIq0jw1INfRzb1xsdD+g3QRovFzV3h16ygZYaCf22Go+1uB11t1yU0mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688550370; a=rsa-sha256; cv=none; b=wu/eQ3ZHqaw9fbTR7gMQhtJaSV2El0HFZatuqP0Geh6RTL9B7kELBwtLvX6QiuM7BuVDNz kzUomIl6sqVw2j3EdcW6p4rl3JrWoDgL4svukiQ2N0TxYsrdjoHbFsEJqpgDEC9gX+tVUK uLEvLrrjs7KcfAbhk+szc56l9AqSYXNFbB3WOLTQCULShndxeui4Q/5EbFQ/7njnZsaGkc CvTQPYqE/Dq62EhIIuUiYZCSmfdO2M/L3LnjdglF9PqMbXXfl1bcfFV1m9Z2HzkY5k+RpB 9mONmDFtqs4pui17xEh9pKpmQuC3LxenrovuuGHFhzKTXhNoU1lmS7877QZH4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwvtV2WSSz1956; Wed, 5 Jul 2023 09:46: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 3659kA5d039214; Wed, 5 Jul 2023 09:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3659kAkA039213; Wed, 5 Jul 2023 09:46:10 GMT (envelope-from git) Date: Wed, 5 Jul 2023 09:46:10 GMT Message-Id: <202307050946.3659kAkA039213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: df0d0fc99093 - main - Add helpers to allocate an arm64 VFP state struct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df0d0fc99093cbdcab9b84911376ee52e58ce7f2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=df0d0fc99093cbdcab9b84911376ee52e58ce7f2 commit df0d0fc99093cbdcab9b84911376ee52e58ce7f2 Author: Andrew Turner AuthorDate: 2023-05-16 10:09:11 +0000 Commit: Andrew Turner CommitDate: 2023-07-05 09:42:14 +0000 Add helpers to allocate an arm64 VFP state struct This will be used by bhyve and will allow the size to change, e.g. for SVE. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40131 --- sys/arm64/arm64/mp_machdep.c | 2 +- sys/arm64/arm64/vfp.c | 57 +++++++++++++++++++++++++++++++++++++++++--- sys/arm64/include/vfp.h | 6 ++++- 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index babeee331be0..9aef6a9a080f 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -274,7 +274,7 @@ init_secondary(uint64_t cpu) cpu_initclocks_ap(); #ifdef VFP - vfp_init(); + vfp_init_secondary(); #endif dbg_init(); diff --git a/sys/arm64/arm64/vfp.c b/sys/arm64/arm64/vfp.c index 22b15ee78596..46ae5d8e8fcd 100644 --- a/sys/arm64/arm64/vfp.c +++ b/sys/arm64/arm64/vfp.c @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -57,6 +59,9 @@ struct fpu_kern_ctx { struct vfpstate state; }; +static uma_zone_t fpu_save_area_zone; +static struct vfpstate *fpu_initialstate; + void vfp_enable(void) { @@ -280,7 +285,7 @@ vfp_restore_state(void) } void -vfp_init(void) +vfp_init_secondary(void) { uint64_t pfr; @@ -291,9 +296,34 @@ vfp_init(void) /* Disable to be enabled when it's used */ vfp_disable(); +} + +static void +vfp_init(const void *dummy __unused) +{ + uint64_t pfr; + + /* Check if there is a vfp unit present */ + pfr = READ_SPECIALREG(id_aa64pfr0_el1); + if ((pfr & ID_AA64PFR0_FP_MASK) == ID_AA64PFR0_FP_NONE) + return; + + fpu_save_area_zone = uma_zcreate("VFP_save_area", + sizeof(struct vfpstate), NULL, NULL, NULL, NULL, + _Alignof(struct vfpstate) - 1, 0); + fpu_initialstate = uma_zalloc(fpu_save_area_zone, M_WAITOK | M_ZERO); - if (PCPU_GET(cpuid) == 0) - thread0.td_pcb->pcb_fpusaved->vfp_fpcr = VFPCR_INIT; + /* Ensure the VFP is enabled before accessing it in vfp_store */ + vfp_enable(); + vfp_store(fpu_initialstate); + + /* Disable to be enabled when it's used */ + vfp_disable(); + + /* Zero the VFP registers but keep fpcr and fpsr */ + bzero(fpu_initialstate->vfp_regs, sizeof(fpu_initialstate->vfp_regs)); + + thread0.td_pcb->pcb_fpusaved->vfp_fpcr = VFPCR_INIT; } SYSINIT(vfp, SI_SUB_CPU, SI_ORDER_ANY, vfp_init, NULL); @@ -433,4 +463,25 @@ is_fpu_kern_thread(u_int flags __unused) curpcb = curthread->td_pcb; return ((curpcb->pcb_fpflags & PCB_FP_KERN) != 0); } + +/* + * FPU save area alloc/free/init utility routines + */ +struct vfpstate * +fpu_save_area_alloc(void) +{ + return (uma_zalloc(fpu_save_area_zone, M_WAITOK)); +} + +void +fpu_save_area_free(struct vfpstate *fsa) +{ + uma_zfree(fpu_save_area_zone, fsa); +} + +void +fpu_save_area_reset(struct vfpstate *fsa) +{ + memcpy(fsa, fpu_initialstate, sizeof(*fsa)); +} #endif diff --git a/sys/arm64/include/vfp.h b/sys/arm64/include/vfp.h index 4f64b0396417..79e710694268 100644 --- a/sys/arm64/include/vfp.h +++ b/sys/arm64/include/vfp.h @@ -66,7 +66,7 @@ struct vfpstate { struct pcb; struct thread; -void vfp_init(void); +void vfp_init_secondary(void); void vfp_enable(void); void vfp_disable(void); void vfp_discard(struct thread *); @@ -94,6 +94,10 @@ int fpu_kern_leave(struct thread *, struct fpu_kern_ctx *); int fpu_kern_thread(u_int); int is_fpu_kern_thread(u_int); +struct vfpstate *fpu_save_area_alloc(void); +void fpu_save_area_free(struct vfpstate *fsa); +void fpu_save_area_reset(struct vfpstate *fsa); + /* Convert to and from Aarch32 FPSCR to Aarch64 FPCR/FPSR */ #define VFP_FPSCR_FROM_SRCR(vpsr, vpcr) ((vpsr) | ((vpcr) & 0x7c00000)) #define VFP_FPSR_FROM_FPSCR(vpscr) ((vpscr) &~ 0x7c00000) From nobody Wed Jul 5 10:03:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwwGR700Mz4lLvs; Wed, 5 Jul 2023 10:03: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 4QwwGR4jgSz3GCT; Wed, 5 Jul 2023 10:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tq6LuGiMd+PxAXNRsvGLc7WWc7Kl8L3QZcmiLb3ScFE=; b=rgF7KXFizas9Nr8dHQJsHrpHZtalfhwsen0MzkdTCLBCQZwYqQ3vBG0OX9s9QLCJOS04/x r2OEcPVq1NHanpDMK5Aw1H/LVUZXB65sDbLAMPlcVkN4yvqutiyz9law5c3R1eaWTaFewr GMW+Q/W8fBYEtFUcLA9dtx3jPAnTFbBMEqm8cfZcNJ3biiokLOlxYUOXhp+vtY9dt7E5AM hrg0KVYJD+KycXIcXw7z6wDKjQyjGHkS0CMSmIIkjhGLRdvVY2wI/VBbYw/Yo6LXHqIM+T URROqdVfniUr1CaL78mFrpSSWo5SEMRf2GbYWZyVIWyaBuJuuDsJ4ecuwlv77Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tq6LuGiMd+PxAXNRsvGLc7WWc7Kl8L3QZcmiLb3ScFE=; b=cJe4V2yriRtkZooWqpWq1x6otdgcjdK3jq1DQ01p1oZzs0GRdvvPb42ZawXQ0HefkKzAO+ ozwWt5WmSTLs8d5WFmOw3rA9JLXB71TX5hyIxoK8gGONuYZWKkD1QPid2D+/S9gDzCQ/7u kpL+A9GzliCxxxpdb4Vx27dWyphun2CZYSsxYZF6SDwXb83a9oRJGhORztmWXWx7msqIEf X65wMqtvJiom6dGvmo3CEcXbQj2q0fHZVmLgD19rHPnJLjqKHMgFWaOsEiw0phZ5AhD0z7 o9eU4gg6UdjFhehRDYf4g4U67NcR0OZuL4YDigqzw4CLVI6HoFtxbMZopifCUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688551407; a=rsa-sha256; cv=none; b=lXNqrYFZwTFGSwoiwow/Yqo+Otnney0YE6outunS9i2RiL65YZWe1CfwpDJQ3Xx7FRiSuH dT09Mp9hXMLpxqBFSxLnk3MACs16BFfT0ueVC7m0SkOqtaOQXGD9Z3xxXjuHEQAamlyvSH x4NEQS5gDu2iDnyI/Cu8+x+RM5TyeMdGRsTcBdi6OSHGcI29bvKWd6k1s6jTAdX3JDXazW vlyJW2Y/lrETZaGAmBIrlUQ/TQW1GvULTc3Nby9rGvCygUpbHBxlByl+yhtXg4q7gMrZIy xUFfJlxcxO0xnaDUn1oaY22EOlOe1efNdBEieYnT6nBzykMg9J5hzQOAWruYgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwwGR3qs1z18pr; Wed, 5 Jul 2023 10:03: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 365A3ROc072877; Wed, 5 Jul 2023 10:03:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365A3RqR072876; Wed, 5 Jul 2023 10:03:27 GMT (envelope-from git) Date: Wed, 5 Jul 2023 10:03:27 GMT Message-Id: <202307051003.365A3RqR072876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 55e0aefae688 - main - ping: low-effort fix to make it compilable without inet6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55e0aefae688075718e212594e823fe5fbfba4bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=55e0aefae688075718e212594e823fe5fbfba4bf commit 55e0aefae688075718e212594e823fe5fbfba4bf Author: Mateusz Guzik AuthorDate: 2023-07-05 09:59:40 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 10:02:32 +0000 ping: low-effort fix to make it compilable without inet6 --- sbin/ping/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile index 23bac6d62d90..ad5dce03363f 100644 --- a/sbin/ping/Makefile +++ b/sbin/ping/Makefile @@ -34,6 +34,8 @@ CFLAGS+=-DWITH_CASPER CFLAGS+=-DIPSEC LIBADD+= ipsec +CFLAGS+= -Wno-error=unused-but-set-variable + HAS_TESTS= SUBDIR.${MK_TESTS}+= tests From nobody Wed Jul 5 10:03:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwwGT2lDBz4lMJF; Wed, 5 Jul 2023 10:03: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 4QwwGS6Csbz3G97; Wed, 5 Jul 2023 10:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqelXcEMxjl7bj8GsSAqoqOXrs6w0cI/teIb2bnvvXQ=; b=a5y6Q7Sv8kEVo15OCdVX4TMpjl+nbyL2y3vMeeRrZNzSUOKoxRW8SHc3S+8SNnm3lk7g99 Pv9/v47G1/DqNZQIw83a4EkszX1NWY+G7jD1uK/jwsvWahPEwGbZyOpRREkaJef0uPXc2y bCNKhFmVgUj7jMP9Sb3ENvGxvVaG+mjZySVQ9PXpwOo5j8fnWvAkd16Z8QFatXjRl/arvK +488MgUqLIvfPst95ZCN6FA8KB1dcewm39CKDTv25wcWiTdumjlwMLy4AX2y6xBGmiuP9N 2y30zR8b4IZN2PMDv50sDRBY+/qE2wk+8NB30PDHvd4eg8wcUunvDCpTe4AEUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqelXcEMxjl7bj8GsSAqoqOXrs6w0cI/teIb2bnvvXQ=; b=GXtGzZp0nrYdd4fYCjLG28Ib/l6tiCuaPsx73vv2J6vTtedgovkt7o5EXvNdMOevpAmXrv /i9EagK4+VPf1LlHB9AHMNe4SVqIy/fiZcEtfih8wfwZBzUbD1Lc4NefyoYb2HWthn6ZQ2 r4yThkWdsZ0JmFvYu3reDTKHMcyESWt7UOtVd5FQgv/UKyXVloWaOqjO4DzVnnKGAFeAD0 Tug8sMPFiRRYfLGDTIQb62bAmDDuqAi+6jLziwAv4e9bj2AYf5/XL+mtXZQGtcYytOo9tC 81PxeFY2YGUrZO8l99qaNgMemRAAnEBf64reozR0pnZTHX1CVS+9tth37+V2hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688551408; a=rsa-sha256; cv=none; b=KZDNdtHQuIxaQbSFFT5+4KBBnO/Jt592/0WG8bicnFZZcCF7/aRPZeArsTZniJX/ub2Klh aDvTuHJGqykd8X/IGgEnIUdc9FQfetjMDoUzphcSdPCH54//T7ym5oVrT83CE0RYvDkiUP SaiV5Ii/VkQbUOhoSTgAUow3coc9G8YkjjVsdSidMi5/zs9fVNohAjr7XHJSaLoIRYuaOR XEVQF7IqEz+XQVh4pjMdV9y9xnUu8I6WPBqWEBvF0cXDxs0JAv3/OvOkbjKVyF/eOIQ0C9 IQSGxrqo1d7NcTUbQulCKxr7r+TS3cgoaPmMe7xOlxe0vLRyWlT/eaUmCZmM+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 4QwwGS51mrz19k4; Wed, 5 Jul 2023 10:03: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 365A3S50072896; Wed, 5 Jul 2023 10:03:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365A3SYx072895; Wed, 5 Jul 2023 10:03:28 GMT (envelope-from git) Date: Wed, 5 Jul 2023 10:03:28 GMT Message-Id: <202307051003.365A3SYx072895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: cea9f49f820e - main - ping: low-effort fix to make it compilable without inet List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cea9f49f820e7dfab48fc4d1fac3497bc138081b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cea9f49f820e7dfab48fc4d1fac3497bc138081b commit cea9f49f820e7dfab48fc4d1fac3497bc138081b Author: Mateusz Guzik AuthorDate: 2023-07-05 10:00:44 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 10:02:32 +0000 ping: low-effort fix to make it compilable without inet --- sbin/ifconfig/ifpfsync.c | 4 ++++ sbin/ifconfig/ifvxlan.c | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/sbin/ifconfig/ifpfsync.c b/sbin/ifconfig/ifpfsync.c index b97b9925c644..3e880c96a97c 100644 --- a/sbin/ifconfig/ifpfsync.c +++ b/sbin/ifconfig/ifpfsync.c @@ -125,6 +125,10 @@ pfsync_syncpeer_nvlist_to_sockaddr(const nvlist_t *nvl, { int af; +#if (!defined INET && !defined INET6) + (void)sa; +#endif + if (!nvlist_exists_number(nvl, "af")) return (EINVAL); if (!nvlist_exists_binary(nvl, "address")) diff --git a/sbin/ifconfig/ifvxlan.c b/sbin/ifconfig/ifvxlan.c index 72e2eac35c2d..6a0bacfc32a6 100644 --- a/sbin/ifconfig/ifvxlan.c +++ b/sbin/ifconfig/ifvxlan.c @@ -213,7 +213,9 @@ setvxlan_local(if_ctx *ctx, const char *addr, int dummy __unused) { struct ifvxlancmd cmd; struct addrinfo *ai; +#if (defined INET || defined INET6) struct sockaddr *sa; +#endif int error; bzero(&cmd, sizeof(cmd)); @@ -222,7 +224,9 @@ setvxlan_local(if_ctx *ctx, const char *addr, int dummy __unused) errx(1, "error in parsing local address string: %s", gai_strerror(error)); +#if (defined INET || defined INET6) sa = ai->ai_addr; +#endif switch (ai->ai_family) { #ifdef INET @@ -273,7 +277,9 @@ setvxlan_remote(if_ctx *ctx, const char *addr, int dummy __unused) { struct ifvxlancmd cmd; struct addrinfo *ai; +#if (defined INET || defined INET6) struct sockaddr *sa; +#endif int error; bzero(&cmd, sizeof(cmd)); @@ -282,7 +288,9 @@ setvxlan_remote(if_ctx *ctx, const char *addr, int dummy __unused) errx(1, "error in parsing remote address string: %s", gai_strerror(error)); +#if (defined INET || defined INET6) sa = ai->ai_addr; +#endif switch (ai->ai_family) { #ifdef INET @@ -333,7 +341,9 @@ setvxlan_group(if_ctx *ctx, const char *addr, int dummy __unused) { struct ifvxlancmd cmd; struct addrinfo *ai; +#if (defined INET || defined INET6) struct sockaddr *sa; +#endif int error; bzero(&cmd, sizeof(cmd)); @@ -342,7 +352,9 @@ setvxlan_group(if_ctx *ctx, const char *addr, int dummy __unused) errx(1, "error in parsing group address string: %s", gai_strerror(error)); +#if (defined INET || defined INET6) sa = ai->ai_addr; +#endif switch (ai->ai_family) { #ifdef INET From nobody Wed Jul 5 10:03:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwwGV1mKfz4lLtD; Wed, 5 Jul 2023 10:03: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 4QwwGT6Rv6z3G71; Wed, 5 Jul 2023 10:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TN5VzcMjJWyqJ8ouAaBtdbCGMwkF/9ObOPUyIdkcD1A=; b=GSAX+gA2GWQehvrpLeuvTaeyoQNAA/qKd3YA8NJFl4xZgG1UNcM0XXdZRx/fJFGzVz17zz I7W+XeI5/NXq9oSMNvwyL2dhFfTBKQk0Y1iqK1UG1DC2knSLZsafENWowNE6bKs3Mnn2i1 9GI2YBG4Qi1p834/ZfOcRea0F4Gcfbq0RtHFvc1aiv1LhOho2b6GkJ0JsbspB4Xe3agGKX J7bokWZ6iMJuS1vMGI/NPbyA+MXBe0Je76dZcmpONcrpxNOU4whGDcVsYQZKkmFoKOgyLF QsvE67BLYyoPadxgnrVRipAw7sxCPzPxF23EgafyduzZTvNnwP9mSKz1aSC+Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TN5VzcMjJWyqJ8ouAaBtdbCGMwkF/9ObOPUyIdkcD1A=; b=ffnSxs37Bxuz70BER0Bt1lHoZtO/7AVu8tLWgbaeiyHkZr6TSxgGYOhlbyqXTDVm8G28of 5C2lY5Jj38/kf0AmGVlh7Fug1RoNTmpt3Cij5z6PIikas3rr34UBxHsBRMq/6JPMmhrmOO kROJC0unFR31ayBaZLuRvs1gkiWu/IFSr0Oew+YmjYPGPW0+HqKHfvPXM1rKoGqnWW3/oM f4vzaBBQjQbR7Yustc18mVfi9QkO3udlg6FVDhlIKDuElkJR7YZP3knCb834TRU3iGS1xG xryGLb3iJ+KPx7hCvVEfycrPyxWnSu9rW/gsZRruX7ihIiI/r7t7xVPQCiLwtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688551409; a=rsa-sha256; cv=none; b=FQlYCA91U9IrMxBdkxLk0YKyoPROoUcaNvxDqg7+ZNI7znUIG86A8Mj6TqGB6J0rWvsjmC AOvxJbxzUm521KERstXwae37QdesAJ2k1SqEGV8rbD9BNmugSkVHkJd3dRvWirK/RYmi8u qalWoON9EMNP8kbC5X0vg4wTGHs5S+LdBrHPTVz9+bSNwhAS2JLWvDoHRposGaEsAOdMcd 7iKpDDayeq+BdTOX6IkD8VeNH0NTEOgRPkijLYE4uyh5ScArN+z9ck6pPyLmdaxfivd1f+ wArgd1BwYARHgJuMOOn5bTauUtyppCH7mkAuFIX5vnM4Pzfs387MhJZVarKXBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwwGT5Wbyz19k5; Wed, 5 Jul 2023 10:03: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 365A3TeI072915; Wed, 5 Jul 2023 10:03:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365A3TQG072914; Wed, 5 Jul 2023 10:03:29 GMT (envelope-from git) Date: Wed, 5 Jul 2023 10:03:29 GMT Message-Id: <202307051003.365A3TQG072914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: e01f9fe10c04 - main - ipf: low-effort fix to make it compilable without inet6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e01f9fe10c04a4203bd7fc52b205e8bfb0c05985 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e01f9fe10c04a4203bd7fc52b205e8bfb0c05985 commit e01f9fe10c04a4203bd7fc52b205e8bfb0c05985 Author: Mateusz Guzik AuthorDate: 2023-07-05 10:01:00 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 10:02:32 +0000 ipf: low-effort fix to make it compilable without inet6 --- sbin/ipf/ipf/Makefile | 1 + sbin/ipf/ipmon/Makefile | 1 + sbin/ipf/ipnat/Makefile | 1 + sbin/ipf/ippool/Makefile | 1 + 4 files changed, 4 insertions(+) diff --git a/sbin/ipf/ipf/Makefile b/sbin/ipf/ipf/Makefile index f1b87ac20fae..dd8a3b76bfa3 100644 --- a/sbin/ipf/ipf/Makefile +++ b/sbin/ipf/ipf/Makefile @@ -6,6 +6,7 @@ SRCS= ${GENHDRS} ipf.c ipfcomp.c ipf_y.c ipf_l.c bpf_filter.c MAN= ipfilter.4 ipfilter.5 ipf.8 ipf.4 ipf.5 ipl.4 MLINKS= ipf.5 ipf.conf.5 ipf.5 ipf6.conf.5 CFLAGS+= -I. -DIPFILTER_BPF -DHAS_SYS_MD5_H +CFLAGS+= -Wno-error=unused-but-set-variable GENHDRS= ipf_l.h ipf_y.h CLEANFILES+= ${GENHDRS} ipf_y.c ipf_l.c diff --git a/sbin/ipf/ipmon/Makefile b/sbin/ipf/ipmon/Makefile index 7225f8c8bcb1..c16192a5dd8a 100644 --- a/sbin/ipf/ipmon/Makefile +++ b/sbin/ipf/ipmon/Makefile @@ -7,6 +7,7 @@ MAN= ipmon.5 ipmon.8 MLINKS= ipmon.5 ipmon.conf.5 CFLAGS+= -DLOGFAC=LOG_LOCAL0 -I. +CFLAGS+= -Wno-error=unused-but-set-variable GENHDRS+= ipmon_l.h ipmon_y.h CLEANFILES+= ${GENHDRS} ipmon_y.c ipmon_l.c diff --git a/sbin/ipf/ipnat/Makefile b/sbin/ipf/ipnat/Makefile index 1bdbe61235fb..8a9094db65bc 100644 --- a/sbin/ipf/ipnat/Makefile +++ b/sbin/ipf/ipnat/Makefile @@ -6,6 +6,7 @@ SRCS= ${GENHDRS} ipnat.c ipnat_y.c ipnat_l.c MAN= ipnat.8 ipnat.4 ipnat.5 MLINKS= ipnat.5 ipnat.conf.5 CFLAGS+= -I. +CFLAGS+= -Wno-error=unused-but-set-variable GENHDRS= ipnat_l.h ipnat_y.h CLEANFILES+= ${GENHDRS} ipnat_y.c ipnat_l.c diff --git a/sbin/ipf/ippool/Makefile b/sbin/ipf/ippool/Makefile index 622952be0477..57b31f1744a0 100644 --- a/sbin/ipf/ippool/Makefile +++ b/sbin/ipf/ippool/Makefile @@ -5,6 +5,7 @@ PROG= ippool SRCS= ${GENHDRS} ippool_y.c ippool_l.c ippool.c MAN= ippool.5 ippool.8 CFLAGS+= -I. +CFLAGS+= -Wno-error=unused-but-set-variable GENHDRS= ippool_l.h ippool_y.h CLEANFILES+= ${GENHDRS} ippool_y.c ippool_l.c From nobody Wed Jul 5 10:03:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwwGW46R0z4lMLW; Wed, 5 Jul 2023 10:03: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 4QwwGV72VRz3GG7; Wed, 5 Jul 2023 10:03:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tsjPFM1cEU5rGaKINqqC7JqQua2iXWWaedfl6TJCGYE=; b=CmaDds9O8cadr1WeWp5Zgu/9u1P7q9+tLGzSPfrZ5NxTm9r8YKtLf5XMiNFg/SbnGLH+3Z UyMrJc35LLRSNZBJ2dhCwf3M4Jn+hKh3/SD34xdoeVMhrlNlFy8A+6FGoVq9T/McnKu1dt oFTja5qC9gQrJ3NUWnJWfIWFCiu/dndeGhlX9i9zeQBFHKECuYWbXLyytT14Krecd39BLO aSD/f19xi/GzFTOi3FvnA9EAjyz7VMebbqI4vdohqeb/3RblbQTWD2AB3eeVPkofPms9ir w4KqsCD/rPlxew13LxNGj2vRFgqfT/WdeYV9EsJdzGDDOVdvceX/26FKWUgctw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tsjPFM1cEU5rGaKINqqC7JqQua2iXWWaedfl6TJCGYE=; b=wgwHVDErwAX+04gD/bx2D1/QWxx/8IzlsAnxsaTLW4URi+TOrGx75iBbjFY5nlp1J/kcjc OyWicW60dUxBRqbGs+qUpIcU/2HVwLq2fPYPNQiJttgy5LgzjaK9cMlqSvFEp7jsfp44sM hWt8LgsiUHU40o2FD1e6MA6Idi7pqTumZY965Bs7FO16QUXhNIG3dctJ1AnDS9HEI7HUIu 4tGBgb+cG3jt5tX08N0YRykoRIys8de7y2Ujt4nQ0y42YCwWqq6OXM9See+pDLO6Z/NOD5 AsYJzpyJW0V6vyqBgDFwYAteOqlHxCoG6Zu4V/hATAD9ldv32VRHJ4lMtN1wwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688551411; a=rsa-sha256; cv=none; b=fmdORM/t2y1xvu44xJzqoP64Wc9RRLb2iPafv7Gh3K/uwTHXFZoFHnFrF1cd2oSRhar3tj sSKkHu21zFlgXchkTmGvuMD9eZNZ7xSbuEtEne217NmsRqJUI6NVFZqDkSCUopdEM4uhHk dwiLmrzgyMgatIhi4FMBPCdq3NRAss/XPVvDUE/oa5AeXTW0YBLFnyzKx/oclWymTGhF5D SxyyitmOTTFT1yaemUyD2Vq1ZfjGRX77aDLMM9DQuFs5SzfEoy4G6BksWBpi4zQfT9bRfT GGvhyMpoECA88yJdoo58Ekfru+2YB5UkQhJnjicnEccGDzCknZe6Gre7ZDX3+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 4QwwGV68Bzz19Wx; Wed, 5 Jul 2023 10:03:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365A3UrH072934; Wed, 5 Jul 2023 10:03:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365A3UU2072933; Wed, 5 Jul 2023 10:03:30 GMT (envelope-from git) Date: Wed, 5 Jul 2023 10:03:30 GMT Message-Id: <202307051003.365A3UU2072933@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: fda83023cdef - main - jls: low-effort fix to make it compilable with neither inet nor inet6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fda83023cdefd62ae693cfb853ef204ad4e1d7fb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fda83023cdefd62ae693cfb853ef204ad4e1d7fb commit fda83023cdefd62ae693cfb853ef204ad4e1d7fb Author: Mateusz Guzik AuthorDate: 2023-07-05 10:01:28 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 10:03:07 +0000 jls: low-effort fix to make it compilable with neither inet nor inet6 --- usr.sbin/jls/jls.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c index 8773df3cef1c..9d0bebe4855a 100644 --- a/usr.sbin/jls/jls.c +++ b/usr.sbin/jls/jls.c @@ -384,7 +384,10 @@ print_jail(int pflags, int jflags) { char *nname, *xo_nname; char **param_values; - int i, jid, n, spc; + int i, jid, spc; +#if (defined INET || defined INET6) + int n; +#endif jid = jailparam_get(params, nparams, jflags); if (jid < 0) @@ -402,7 +405,9 @@ print_jail(int pflags, int jflags) (char *)params[3].jp_value, *(int *)params[4].jp_value ? "DYING" : "ACTIVE"); xo_emit("{P: }{:cpusetid/%d}\n", *(int *)params[5].jp_value); +#if (defined INET || defined INET6) n = 6; +#endif #ifdef INET if (ip4_ok && !strcmp(params[n].jp_name, "ip4.addr")) { emit_ip_addr_list(AF_INET, "ipv4_addrs", params + n); From nobody Wed Jul 5 10:03:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwwGX5ZXDz4lMB7; Wed, 5 Jul 2023 10:03: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 4QwwGX139Wz3GMV; Wed, 5 Jul 2023 10:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLnC/FIutRwLj8cRTjkkyCYRProp31MKmDgpfEyJoDo=; b=qth5y2A3ZqoCc9xLnbIK/uNRBfOFmGlxutc5dKZuKX/3MNKbS6tre9M0mqwnhGH6EuqIVL 1HbbhLi4ybDKkQJ6vYwWl2z9ztZ7vZ9/VNMrVvuKk4ZBO1iZjvFrchOCyxJo4ZIdBuCxsq C732E953W58DFxe6LOfShEM+AOn/dYPuc3BpvbO3ZqrO7FuhWv/kZ8U9/f/GD9WPwnr5f8 N2ZqK7apXSIMmmquZ6Kz1UoJAYw6M/DpQ8qvzYMwImzze//zMTUqS3j+7zR5iMO+mqUdYD MgxztVyA16MlAsxUIBDyq9EmFXckNm7u+YJhg7M0vr/yLPGgfZYI4uuhQTkwnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLnC/FIutRwLj8cRTjkkyCYRProp31MKmDgpfEyJoDo=; b=PrdRHnb7lx8IW6uum1NOTtRWkzoB4dnwHYDcY5y8ycNDIe1lo6A9Ug9usvyM251zNU2Bbi +ARTPeWD9BLpPTLdnt+W4vmax3FDKdERnElWxRtCf3Un+wGaRsCP0fgPaHZqx74NmTM/KH HzJhGYRv/xdB5nzXu5zEK/PmsrC9unixZ4m7xgofgaVTG8cH0/ZRNNRVeAbYdHSoeaa8i+ n9M6s5dlAqpFXrlK6VoVZE97r14O8i1Q7mBEAZdqYf/+OdenF2kwTwc4FNO8sf03PhLc2i DcQgfgFhnEiltXmdpej00k5crmuoP/BSs4baS5PRREAgSStwYVW9kR9KF5/xfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688551412; a=rsa-sha256; cv=none; b=DCSryYyYCzPWcIX2MDZC3CIwZ8gIuSrEHMdTSsUhT2QJe4vZG54i3eG5TeRGdC3Xi7DOJr hUVAbiZVQ2DBejj4vHrLHEf+so4p3RgHWkvLL+0H+bwj9moOWmvl6/IJx8yyA/sbHCVL1g f/f9nguDDlDr0f0Yg8F/quevKyP0dUX+tr1tnPD4HolrhyEqn9NqxnvprM8sot/Ghqlumk V9nWU8foIg2GdLk9cXgQk24qJ5VsHb7MeT43YxNmo1kQtxKhugTIFGISqJagUxRZVm57Qq /djgA1i03xhDRnPrpHQf3AdH8ue59AONLn/nH7bB6Za7q1xh0jC0D3ndTQkjeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwwGX099Vz18ps; Wed, 5 Jul 2023 10:03: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 365A3VcA072953; Wed, 5 Jul 2023 10:03:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365A3VeG072952; Wed, 5 Jul 2023 10:03:31 GMT (envelope-from git) Date: Wed, 5 Jul 2023 10:03:31 GMT Message-Id: <202307051003.365A3VeG072952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 65e55a0a2ae1 - main - flowctl: low-effort fix to make it compilable with neither inet nor inet6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65e55a0a2ae1ef4576850cddfeba2d7488575d4e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=65e55a0a2ae1ef4576850cddfeba2d7488575d4e commit 65e55a0a2ae1ef4576850cddfeba2d7488575d4e Author: Mateusz Guzik AuthorDate: 2023-07-05 10:02:03 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 10:03:10 +0000 flowctl: low-effort fix to make it compilable with neither inet nor inet6 --- usr.sbin/flowctl/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/flowctl/Makefile b/usr.sbin/flowctl/Makefile index 8bd63893cc6a..b746c21cd75e 100644 --- a/usr.sbin/flowctl/Makefile +++ b/usr.sbin/flowctl/Makefile @@ -17,4 +17,6 @@ CFLAGS+= -DINET6 CFLAGS+= -DINET .endif +CFLAGS+= -Wno-error=unused-but-set-variable + .include From nobody Wed Jul 5 10:11:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwwRn1QLkz4lN9M for ; Wed, 5 Jul 2023 10:11:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwwRm6NZzz3JKQ for ; Wed, 5 Jul 2023 10:11:32 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-4fb960b7c9dso10154932e87.0 for ; Wed, 05 Jul 2023 03:11:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688551891; x=1691143891; 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=GeSWi/bz+QFR/UvC2aL7xZP4kMGerH8NBQKHTrW92SU=; b=dA4SttxbF8Ksq/yJLk9aQst8DOJ5nqxRMUbFsk/ue3nXzqimuZsjfnwBYR8YGDtjv2 N1pkqEUE64BU/qA0v8DTVPpFiO9a+4eEx1p4ZkmE2dp8KeZrCpTyKcwWr7Q7FiU6J5dK 4UIjcvotbDJ+xzmvB6fYevLelltXODOaTAhweU1YJ4jcrRxBXgjDo5Wa73vKHolbsVVV qP3fWOoge7TDPd3J/kFkkhfYnm+LlJyuMpGqaUaCX2231KhxFCzW675UijHahbdp8Zhj 4G26LQO6OXKbDftaljbuCV3LaPsusfBIDJfh4dUIR0pwtpp9kG9MRrdkYlOpH+NQqbTA gBPA== X-Gm-Message-State: ABy/qLY3r3JON1yfCKfVu0PfJ2lOrjYtApBpOP03189UbwlcCWvugBVQ oux8fiakPW3QEnvfe6gsmg5CvlqAKlMAhupIfNEPpA== X-Google-Smtp-Source: APBJJlE2il1xEsJUWR4MtluGhmTt6soe74TcaADGdr+pi7ChGTh0Kgq0H2Cu2onVQrCG9lu9mEp77g== X-Received: by 2002:a05:6512:3a8e:b0:4fb:987b:ec3c with SMTP id q14-20020a0565123a8e00b004fb987bec3cmr13767291lfu.56.1688551890822; Wed, 05 Jul 2023 03:11:30 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id c23-20020a05600c0ad700b003fa95890484sm1677491wmr.20.2023.07.05.03.11.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2023 03:11:30 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 55e0aefae688 - main - ping: low-effort fix to make it compilable without inet6 From: Jessica Clarke In-Reply-To: <202307051003.365A3RqR072876@gitrepo.freebsd.org> Date: Wed, 5 Jul 2023 11:11:19 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202307051003.365A3RqR072876@gitrepo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4QwwRm6NZzz3JKQ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5 Jul 2023, at 11:03, Mateusz Guzik wrote: >=20 > The branch main has been updated by mjg: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D55e0aefae688075718e212594e823fe5= fbfba4bf >=20 > commit 55e0aefae688075718e212594e823fe5fbfba4bf > Author: Mateusz Guzik > AuthorDate: 2023-07-05 09:59:40 +0000 > Commit: Mateusz Guzik > CommitDate: 2023-07-05 10:02:32 +0000 >=20 > ping: low-effort fix to make it compilable without inet6 > --- > sbin/ping/Makefile | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile > index 23bac6d62d90..ad5dce03363f 100644 > --- a/sbin/ping/Makefile > +++ b/sbin/ping/Makefile > @@ -34,6 +34,8 @@ CFLAGS+=3D-DWITH_CASPER > CFLAGS+=3D-DIPSEC > LIBADD+=3D ipsec >=20 > +CFLAGS+=3D -Wno-error=3Dunused-but-set-variable > + If we=E2=80=99re going to go with bodges like this should they not at = least be gated on MK_INET6 =3D=3D no or similar? Otherwise the default build = where we are warning-clean today isn=E2=80=99t going to fail when new warnings = are introduced, which is sub-optimal. Jess > HAS_TESTS=3D > SUBDIR.${MK_TESTS}+=3D tests >=20 From nobody Wed Jul 5 10:11:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwwS31G05z4lNHD; Wed, 5 Jul 2023 10:11: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 4QwwS30pYtz3JXq; Wed, 5 Jul 2023 10:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ec33dULY45qZVEooj+eI8SU+z59may4IAb55c+l+n8M=; b=QdlcMXH7ozeAX3PSlgedQ/x0qryVO29JiSiMHAY/7665LWH7VbBVVrpvxrbu73m8YxZ4dR OpTY0Z8q55UCvvTVOQob3XL/jl47Q67dDoXQn40rL0Wq6SOEncafwkHrJ39za8bzOhcmcF Q5qJjzwx4VRh5RtNFShKV97hR64gccR2Jf76Zf0xQBgQKkt4baRQz/vU5wyQBgXQxzUzmF Hi52IiVI4VwRRYuEMMipD1YaZcGUQYNH3hV+clog+wTc6dwQA6t5I8j2bxHsk0EowdZxV0 061BNQIJ3cdatEAmD7KOwrX9bJlQ2dtfj5UylY4Y2ubC3T8xsf8dqh5dGNmK2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688551907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ec33dULY45qZVEooj+eI8SU+z59may4IAb55c+l+n8M=; b=hHzlJd+F0VA/HZgyG1jTSvqzaHcpPRUMZjdNRYP23M4/Jjz5L36vqUmQnVElZDRJoz9W9t 6ExW6Ma+0ft2skpUJ9iZ0o1zaaHWTZwXMuWfs6BOe1+51CQU0GfHHkxJtg8QwuMtnh54lD 9pA7NL00OVqKGJDgpMy8oAy+5+gcsdmPgVByDJcrtz9pcHJFnn2atpGGG1++Wpl5z6gp9r YE1DmLghx0tVz/b5jUZa0ZpJWGH12OAEo6HzhBnZWCr/B/yyDHSNyXb/iofItpPByCgYcd H4kfvVOZp+DLgzHrDRClY/NdxigB1udMYi5hFGPiz5vQAsmnDn0XbvVptXji+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688551907; a=rsa-sha256; cv=none; b=VbxbWNzq2AHEvG+l2DeViR5711AiH9gfSy22JPhfXsq7JRXf8GiB7e/UP38UKuveJULC/p zaQLYDbZiV2m/rlP73LLzE3LQ9shAUCk9rYq6k7R26uPe4NpnZy1hHQlE0vUjcSMZym6HB 6u4bweYC4h3rpusqxQTmqF4+TPfnBJbfs1w+S2Q7ZIoFalLyviISneBZW8QLUL4XVGiOGh EQytMthlpjzU2HXCSHFSRMprt3vRbpTrE70qgUpStCAyAlxNDz3qVSvaCRsA+2o/X99Vqt oXtl5CNyu6Ee+QK9nF7m6Wf3wTgkYcySCwVpvzpa3HEpVfM2GYi0iAjMGooHZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QwwS26zprz19wq; Wed, 5 Jul 2023 10:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365ABkNP087127; Wed, 5 Jul 2023 10:11:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365ABkk2087126; Wed, 5 Jul 2023 10:11:46 GMT (envelope-from git) Date: Wed, 5 Jul 2023 10:11:46 GMT Message-Id: <202307051011.365ABkk2087126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 51fc92e68e9f - main - Make some arm64 debug monitor functions static List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51fc92e68e9fdba5657cf5fa4dfff1a63215220b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=51fc92e68e9fdba5657cf5fa4dfff1a63215220b commit 51fc92e68e9fdba5657cf5fa4dfff1a63215220b Author: Andrew Turner AuthorDate: 2023-05-22 13:38:08 +0000 Commit: Andrew Turner CommitDate: 2023-07-05 10:05:38 +0000 Make some arm64 debug monitor functions static These are only used within debug_monitor.c so can become static. Sponsored by: Arm Ltd --- sys/arm64/arm64/debug_monitor.c | 9 +++++++-- sys/arm64/include/debug_monitor.h | 3 --- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c index 52bcf1e5e603..be79f1184fe9 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -62,6 +62,11 @@ static struct debug_monitor_state kernel_monitor = { .dbg_flags = DBGMON_KERNEL }; +static int dbg_setup_watchpoint(struct debug_monitor_state *, vm_offset_t, + vm_size_t, enum dbg_access_t); +static int dbg_remove_watchpoint(struct debug_monitor_state *, vm_offset_t, + vm_size_t); + /* Called from the exception handlers */ void dbg_monitor_enter(struct thread *); void dbg_monitor_exit(struct thread *, struct trapframe *); @@ -380,7 +385,7 @@ dbg_find_slot(struct debug_monitor_state *monitor, enum dbg_t type, return (-1); } -int +static int dbg_setup_watchpoint(struct debug_monitor_state *monitor, vm_offset_t addr, vm_size_t size, enum dbg_access_t access) { @@ -447,7 +452,7 @@ dbg_setup_watchpoint(struct debug_monitor_state *monitor, vm_offset_t addr, return (0); } -int +static int dbg_remove_watchpoint(struct debug_monitor_state *monitor, vm_offset_t addr, vm_size_t size) { diff --git a/sys/arm64/include/debug_monitor.h b/sys/arm64/include/debug_monitor.h index befc51e88304..22ed8b5f0e24 100644 --- a/sys/arm64/include/debug_monitor.h +++ b/sys/arm64/include/debug_monitor.h @@ -56,9 +56,6 @@ enum dbg_access_t { void dbg_monitor_init(void); void dbg_register_sync(struct debug_monitor_state *); -int dbg_setup_watchpoint(struct debug_monitor_state *, vm_offset_t, vm_size_t, - enum dbg_access_t); -int dbg_remove_watchpoint(struct debug_monitor_state *, vm_offset_t, vm_size_t); #ifdef DDB void dbg_show_watchpoint(void); From nobody Wed Jul 5 12:31:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwzYN2PH7z4lqpL; Wed, 5 Jul 2023 12:31:36 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc31.google.com (mail-oo1-xc31.google.com [IPv6:2607:f8b0:4864:20::c31]) (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 4QwzYN033vz4DR3; Wed, 5 Jul 2023 12:31:36 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-5634808e16eso4618641eaf.2; Wed, 05 Jul 2023 05:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688560294; x=1691152294; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=uB22mReXrzxWg1ET03Yj8WSrfwDhZTAHfIhNK0SK9bU=; b=e0n9FWcx9/l/Ta5z+WipE3UWeGszyL6rto1ioHosyqqA24m9W1uwg1R7B+T4LZGZod ieVOtGVDi3nRybJTCKJGYgVA7eQHBbNqcr6yW+AxTYrwWufvfwYZRYnSAvQepjDSvV/p Qn3Lwydsg5LXRTWSObzj1pjhbE7Yn5SF6kr0xe12DLKk/Ys4eAeDrbI5te5U6qdUA90C X7wEBtXG1l5wkwrwt1Pfb00BlJz9hu7iTBFHcSoDKQOnh1oUhe1MDQ16qtvrqrqfxRDN 7ibDy1zHxcNLBWZ+5T74OqT0/GOXYUsHKMP3mjInPsq/PR8K64EWSbGThD4DkdH+DWqM l1DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688560294; x=1691152294; h=content-transfer-encoding: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=uB22mReXrzxWg1ET03Yj8WSrfwDhZTAHfIhNK0SK9bU=; b=NhkT/1kJGOnlTQPH4MWDMY8dRaDgkIoURFQ9N2jOKztjipQk79H830x9nCLSTrbsbq t+rBoZcbi2GxbUst3TF8FG08m90xb0sBhAp5kFRiO6vL8gfYkTGRGNej5H9MIkS54PY7 PvOAP6Zeai3fB0LV3yr2cgtxaRJOQzBWcGxennr3BmBcpjWBbEC/Ybv0BFgsqsyO4pGC zuPfKMGMbG0EZPadNrVjYMq7yed3gT5PG/0Z+xq1XL+mubVHfimg7ophc3xztspJFyA1 LItklogPd9ryNfb8qnc6jgoNGSWCryfOAKCo4rJm5jqZG9DYnhQKUK18eLckRYShd752 ROdQ== X-Gm-Message-State: AC+VfDwuqvXOFhfTT0IThwGK1qMPqb+p2KzcHO8b1QcPjoikR4xl2GEq D8eXGd3h3xk/9x2PbUTtojHWSUWVMmB+N3HDVmrYKWAC X-Google-Smtp-Source: ACHHUZ6+Dw5e0/Ile8tjaZ5cDBCYpaD+kzZ2gLgBJbqpjrYRKUP6gyelR4PZ7TDzOWr5FWYxy6clG/sjf2CEMyWOkio= X-Received: by 2002:a4a:d64e:0:b0:565:a8a8:6601 with SMTP id y14-20020a4ad64e000000b00565a8a86601mr12151471oos.8.1688560294079; Wed, 05 Jul 2023 05:31:34 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:a8a:1109:0:b0:4e1:6042:cdc9 with HTTP; Wed, 5 Jul 2023 05:31:33 -0700 (PDT) In-Reply-To: References: <202307051003.365A3RqR072876@gitrepo.freebsd.org> From: Mateusz Guzik Date: Wed, 5 Jul 2023 14:31:33 +0200 Message-ID: Subject: Re: git: 55e0aefae688 - main - ping: low-effort fix to make it compilable without inet6 To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QwzYN033vz4DR3 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 7/5/23, Jessica Clarke wrote: > On 5 Jul 2023, at 11:03, Mateusz Guzik wrote: >> >> The branch main has been updated by mjg: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=3D55e0aefae688075718e212594e823f= e5fbfba4bf >> >> commit 55e0aefae688075718e212594e823fe5fbfba4bf >> Author: Mateusz Guzik >> AuthorDate: 2023-07-05 09:59:40 +0000 >> Commit: Mateusz Guzik >> CommitDate: 2023-07-05 10:02:32 +0000 >> >> ping: low-effort fix to make it compilable without inet6 >> --- >> sbin/ping/Makefile | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile >> index 23bac6d62d90..ad5dce03363f 100644 >> --- a/sbin/ping/Makefile >> +++ b/sbin/ping/Makefile >> @@ -34,6 +34,8 @@ CFLAGS+=3D-DWITH_CASPER >> CFLAGS+=3D-DIPSEC >> LIBADD+=3D ipsec >> >> +CFLAGS+=3D -Wno-error=3Dunused-but-set-variable >> + > > If we=E2=80=99re going to go with bodges like this should they not at lea= st be > gated on MK_INET6 =3D=3D no or similar? Otherwise the default build where > we are warning-clean today isn=E2=80=99t going to fail when new warnings = are > introduced, which is sub-optimal. > That is a valid point but I don't think it warrants patching anything -- note that detection of the issue remains enabled, it just no longer fails the build. Thus if someone was to patch ping and build it standalone, they will still see the message. That said, if someone insists on tightening when the flag is used, I'm not going to stand in the way. --=20 Mateusz Guzik From nobody Wed Jul 5 12:35:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwzdV6x7Qz4lsq7; Wed, 5 Jul 2023 12:35: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 4QwzdV6TM5z4G3B; Wed, 5 Jul 2023 12:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688560510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bktnkrZnD63MQRjQiwVfd31IjV6s9dgJfsuOj4mwm+Q=; b=hc0Hc0gLfwXLO3ESLf5ZoZ8QS8l/N93IgVEV78RXXSvityYa/v8mR6HquPDiCkfzWP8+hn 4WmxFsyrsvJYbW8Hx4LPkVQL5JNSkoFO8S39ut/ifMMsk3eLV1FUGEI3UAkFha2KZtG2+u EeVQ5IDLq/JRoEuO9dEknBCBdEL5nAuVKy3zqq51wgh/Vp1I806+l7GUMG4wca8NHJgOQh zS2tlwwpbDa67rH7X0RllaxpfYXdFrOmRzD4b1Ntc9Kk6Jrhakszen1Y80VJcpYeQZHivr fldpnCpgzxOyEX1z4qww1fy66sMRKMSyNEW3mGBufqbnPcodQKIWwTo0XfJF+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688560510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bktnkrZnD63MQRjQiwVfd31IjV6s9dgJfsuOj4mwm+Q=; b=pFJ9ftxQmH/9nvJ84znt8ptbTnZV3Q+x5VqMabpCCD3T66SrpOFCHKRXSWsXjlW3hG6KNq FX6DEaUE0seh+tQM2rmDUKzZUyQVMZkdbyCvqgr59hwAsIM82BS0r35oIUvEopKDN6COGB ZZ62sArjLKnERvdte/puuXv/E7UtXYmgs+HAC/UTt7XzswKXBhfXkflUfWQODPRHyTL7SV Rtxh8DAC35mSNN90ku495RE9J+bpN9QGYMXq8DjUbVIW0RXf9OekyYgQM9Z84Z5QlhnCOc LExaiNbffzOBjsit/yFn3368YaXci38Mbe7IB1REt1UTQIb7hTKA8QfoPD1thA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688560510; a=rsa-sha256; cv=none; b=UipvCn3coH2frd8xLkOlP4nsc0gl1m/MslZHBGC17fVr70Dg4G53zZQ3JsZhgS7g40ryRr bvkYYnHCadUTIpY5+GgPFjRVaHf23tkXkW3+MpHl0qBsnriQ4dk86JNYCbSyWl8pK5lERN DC7AX6+ZGBzi8FO13C9GKkMJdUeGf1qXUABnNimmXrKD/2HdKWGvUbLxWGKBmKdKMoNClc wGDPqYb0AYGNlnF8mt0MHdiRZfizRljL8KWoIihqni1DAKR9K4vzwLiuAKjKbeH6KenI38 9qJG+GyK0jtJdJPVqQQk0QBC3pCjpJ9cVC9Nd+tSMlYkmMgt2c5VPR2zKwYL/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 4QwzdV5YfhzFTX; Wed, 5 Jul 2023 12:35: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 365CZAdG020429; Wed, 5 Jul 2023 12:35:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365CZA8E020428; Wed, 5 Jul 2023 12:35:10 GMT (envelope-from git) Date: Wed, 5 Jul 2023 12:35:10 GMT Message-Id: <202307051235.365CZA8E020428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: cbca929869a8 - stable/13 - libpthread: allocate rwlocks and spinlocks in dedicated cachelines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cbca929869a818c9b3353753df71210816a126d6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cbca929869a818c9b3353753df71210816a126d6 commit cbca929869a818c9b3353753df71210816a126d6 Author: Greg Becker AuthorDate: 2023-06-27 01:08:29 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 12:34:09 +0000 libpthread: allocate rwlocks and spinlocks in dedicated cachelines Reduces severe performance degradation due to false-sharing. Note that this does not account for hardware which can perform adjacent cacheline prefetch. [mjg: massaged the commit message and the patch to use aligned_alloc instead of malloc] PR: 272238 MFC after: 1 week (cherry picked from commit a6c0d801ca5934bb9b9cca6870ea7406d5db0641) --- lib/libthr/thread/thr_pspinlock.c | 3 ++- lib/libthr/thread/thr_rwlock.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libthr/thread/thr_pspinlock.c b/lib/libthr/thread/thr_pspinlock.c index d1a53446f654..b1b8164c9777 100644 --- a/lib/libthr/thread/thr_pspinlock.c +++ b/lib/libthr/thread/thr_pspinlock.c @@ -60,7 +60,8 @@ _pthread_spin_init(pthread_spinlock_t *lock, int pshared) if (lock == NULL) return (EINVAL); if (pshared == PTHREAD_PROCESS_PRIVATE) { - lck = malloc(sizeof(struct pthread_spinlock)); + lck = aligned_alloc(CACHE_LINE_SIZE, + roundup(sizeof(struct pthread_spinlock), CACHE_LINE_SIZE)); if (lck == NULL) return (ENOMEM); *lock = lck; diff --git a/lib/libthr/thread/thr_rwlock.c b/lib/libthr/thread/thr_rwlock.c index 1d110a7bf285..8457250e60f7 100644 --- a/lib/libthr/thread/thr_rwlock.c +++ b/lib/libthr/thread/thr_rwlock.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "namespace.h" #include @@ -102,9 +103,11 @@ rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr) if (attr == NULL || *attr == NULL || (*attr)->pshared == PTHREAD_PROCESS_PRIVATE) { - prwlock = calloc(1, sizeof(struct pthread_rwlock)); + prwlock = aligned_alloc(CACHE_LINE_SIZE, + roundup(sizeof(struct pthread_rwlock), CACHE_LINE_SIZE)); if (prwlock == NULL) return (ENOMEM); + memset(prwlock, 0, sizeof(struct pthread_rwlock)); *rwlock = prwlock; } else { prwlock = __thr_pshared_offpage(rwlock, 1); From nobody Wed Jul 5 12:46:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwztK6JQlz4m0vY; Wed, 5 Jul 2023 12:46:17 +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 4QwztJ1DXdz4K8Z; Wed, 5 Jul 2023 12:46:16 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id H0oQqRm67LAoIH1tfqy4Bi; Wed, 05 Jul 2023 12:46:15 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id H1tdqQZJrcyvuH1teq3DZF; Wed, 05 Jul 2023 12:46:15 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=64a56617 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=ws7JD89P4LkA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=DcqMjoWEGrXR3VHqvaQA:9 a=QEXdDO2ut3YA: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 22D8D1DC2; Wed, 5 Jul 2023 05:46:13 -0700 (PDT) Received: from slippy (localhost [IPv6:::1]) by slippy.cwsent.com (Postfix) with ESMTP id 12A8C310; Wed, 5 Jul 2023 05:46:13 -0700 (PDT) Date: Wed, 5 Jul 2023 05:46:13 -0700 From: Cy Schubert To: Jessica Clarke Cc: Mateusz Guzik , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 55e0aefae688 - main - ping: low-effort fix to make it compilable without inet6 Message-ID: <20230705054613.211731f9@slippy> In-Reply-To: References: <202307051003.365A3RqR072876@gitrepo.freebsd.org> Organization: KOMQUATS X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-CMAE-Envelope: MS4xfOYYE4bqq7o0U3DoSr82qKWFrDpfNWptcSN+zeavuhFnkXbGDTymqG7bATwGjKF+rgawVgFp1hO4Vqos8FlyX1fvEFk+833D7KY87Xdax49DUK4Ro/QP ArvCBVwNs98LAU7AFF115R3s0fJFdinrjea40qJkKAAgddj2OMM1UqBAmQjTs6L50FhZMGtGrGUQ060E5UAlhXaxY9WMFjCop51gobqgWDYLRcBEe7Ec1FXU 65pQ5IvweXI8Gj4JdlCoM8mHowwwr53fH+Xt5cDuob+s0+iSZrXFDBxSxtKjzG+SSX+yD8oS9Hr4ge6h1ATRVh+rzsJdoadH/1/NIpG0wgPYJECV3iT1OSeq ClH81YcI X-Rspamd-Queue-Id: 4QwztJ1DXdz4K8Z X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, 5 Jul 2023 11:11:19 +0100 Jessica Clarke wrote: > On 5 Jul 2023, at 11:03, Mateusz Guzik wrote: > >=20 > > The branch main has been updated by mjg: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D55e0aefae688075718e21259= 4e823fe5fbfba4bf > >=20 > > commit 55e0aefae688075718e212594e823fe5fbfba4bf > > Author: Mateusz Guzik > > AuthorDate: 2023-07-05 09:59:40 +0000 > > Commit: Mateusz Guzik > > CommitDate: 2023-07-05 10:02:32 +0000 > >=20 > > ping: low-effort fix to make it compilable without inet6 > > --- > > sbin/ping/Makefile | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile > > index 23bac6d62d90..ad5dce03363f 100644 > > --- a/sbin/ping/Makefile > > +++ b/sbin/ping/Makefile > > @@ -34,6 +34,8 @@ CFLAGS+=3D-DWITH_CASPER > > CFLAGS+=3D-DIPSEC > > LIBADD+=3D ipsec > >=20 > > +CFLAGS+=3D -Wno-error=3Dunused-but-set-variable > > + =20 >=20 > If we=E2=80=99re going to go with bodges like this should they not at lea= st be > gated on MK_INET6 =3D=3D no or similar? Otherwise the default build where > we are warning-clean today isn=E2=80=99t going to fail when new warnings = are > introduced, which is sub-optimal. Agreed. It's also too easy for someone to subsequently remove the flag when cleaning up. Not everyone reads through commit logs first when commencing work on a component. >=20 > Jess >=20 > > HAS_TESTS=3D > > SUBDIR.${MK_TESTS}+=3D tests > > =20 >=20 --=20 Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=3D0 From nobody Wed Jul 5 13:07:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx0MH0FgCz4mDm7; Wed, 5 Jul 2023 13:07: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 4Qx0MG6mSDz3CQw; Wed, 5 Jul 2023 13:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688562475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ftFMI6ZBFPGl26R3glg6WPHH7DeXFtoI9k0rJhiEcM=; b=nVrGxiBpt3mpocPhG8HCzceiwWLT85iZ+layVpGvk7k27trZYSCfLUu5oDUeWKen33h8mS UtulHGRie4yUMPDn0QKrykCujLcZKNBoFiaE9zeq0L3Qa5C2T3ARW863nN8j+O99QgFukG FLlqqQyflZ7I7re/pl7m3byUc0U63RZhBVJEbfSZhm4nCiu3sBoGLmqKDAnz5aQeiunxNi XOhZ6WTTeNiIpy5n57l7Ipg9f8BM5o2LZYKfESU4QORgP5rnsgaD7D0G5BFeupVNOm/yuM oWyPEwgbVDBGj5zudoQAaYwW5w32a35WC/jJ9AZPOYtoEBOmWHLu9ITHrEl+Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688562474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ftFMI6ZBFPGl26R3glg6WPHH7DeXFtoI9k0rJhiEcM=; b=ZzN34+tMk4/vtXSC7TYdTj5U4Zm+E7zOIA4V2zX4q5dBjlpWGZQ62M6DcOfMh2+c2zJ2ig 1SFtHwHG4/D0TcajAO5tuc+eF7kyvotfqhpDYH2j5q0vimr6m1kuY5j3fwDKusibMgLGqh MrtXexb5MQHKdKk77B/EqbL1I0Bi5oTiW+IFYGOINV0rIJBPD+btoiCgqdw7Fxmj1mtdsj drN2wqx5FoNgCB7VM55DMVk/zRggswI4zSffS+PvOyEVb90V2Ihop4k1QuQJKrA6t1ILfT AtYQcMQ+KMnR8VyM8f17mGixZDFb7yJe8QmF8TVIcp3teCH+PFu2Kqomtgj+2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688562474; a=rsa-sha256; cv=none; b=r23THODru7QbFRmVVmj14/Tor/Q3JTELQwovKpbdghbiq7EZ1st4E5ePaBxyQSAfoFjwyj /mY6yLGDRUDwWIziDn2aQjkECKrwevXvctYSWsgyXQa1jhUGCaV57xY6QVhAofrDvZBPRr C9MiR4SvEB6iedZe0qCfr5qdlR8Gg6hErQrzpH+Y1VxV4BiSY9qrUGCvi4es85Ew2yUtwC FAqpqh6WL4Gh1fzH9uJD1cRu+6nSUkiHSz/FaBoBC74NNumwjSXnTqHl+RWKS3vg0PWU8m bYfMzlR9lJkDLc5UODAiYAZCwnNXdRilCRGvpL3f9PfjA7KR9NZqRv0P/1V/yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx0MG5ncNzGfF; Wed, 5 Jul 2023 13:07: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 365D7sWB071231; Wed, 5 Jul 2023 13:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365D7sf8071230; Wed, 5 Jul 2023 13:07:54 GMT (envelope-from git) Date: Wed, 5 Jul 2023 13:07:54 GMT Message-Id: <202307051307.365D7sf8071230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b16a120b3b9b - stable/13 - bhyve: Rename a pci_cfgrw() parameter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b16a120b3b9b682944da8d54d826e52fa7720e04 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b16a120b3b9b682944da8d54d826e52fa7720e04 commit b16a120b3b9b682944da8d54d826e52fa7720e04 Author: Mark Johnston AuthorDate: 2023-06-28 20:06:37 +0000 Commit: Mark Johnston CommitDate: 2023-07-05 13:06:59 +0000 bhyve: Rename a pci_cfgrw() parameter pci_cfgrw() may be called via a write to the extended config space, which is memory-mapped. In this case, the name "eax" is misleading. Give it a more generic name. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40732 (cherry picked from commit f4841d8af0cd42c16fa66529bfde7b3a8b4f16d6) --- usr.sbin/bhyve/pci_emul.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 41b7718e6935..34ce3cb7d49a 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -2099,7 +2099,7 @@ pci_emul_cmdsts_write(struct pci_devinst *pi, int coff, uint32_t new, int bytes) static void pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, - uint32_t *eax) + uint32_t *valp) { struct businfo *bi; struct slotinfo *si; @@ -2121,7 +2121,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, if (pi == NULL || (bytes != 1 && bytes != 2 && bytes != 4) || (coff & (bytes - 1)) != 0) { if (in) - *eax = 0xffffffff; + *valp = 0xffffffff; return; } @@ -2131,7 +2131,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, */ if (coff >= PCI_REGMAX + 1) { if (in) { - *eax = 0xffffffff; + *valp = 0xffffffff; /* * Extended capabilities begin at offset 256 in config * space. Absence of extended capabilities is signaled @@ -2139,7 +2139,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, * offset 256. */ if (coff <= PCI_REGMAX + 4) - *eax = 0x00000000; + *valp = 0x00000000; } return; } @@ -2152,19 +2152,19 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, if (in) { /* Let the device emulation override the default handler */ if (pe->pe_cfgread != NULL) { - needcfg = pe->pe_cfgread(pi, coff, bytes, eax); + needcfg = pe->pe_cfgread(pi, coff, bytes, valp); } else { needcfg = 1; } if (needcfg) - *eax = CFGREAD(pi, coff, bytes); + *valp = CFGREAD(pi, coff, bytes); - pci_emul_hdrtype_fixup(bus, slot, coff, bytes, eax); + pci_emul_hdrtype_fixup(bus, slot, coff, bytes, valp); } else { /* Let the device emulation override the default handler */ if (pe->pe_cfgwrite != NULL && - (*pe->pe_cfgwrite)(pi, coff, bytes, *eax) == 0) + (*pe->pe_cfgwrite)(pi, coff, bytes, *valp) == 0) return; /* @@ -2193,7 +2193,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, pi->pi_bar[idx].addr = bar = 0; break; case PCIBAR_IO: - addr = *eax & mask; + addr = *valp & mask; addr &= 0xffff; bar = addr | pi->pi_bar[idx].lobits; /* @@ -2205,7 +2205,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, } break; case PCIBAR_MEM32: - addr = bar = *eax & mask; + addr = bar = *valp & mask; bar |= pi->pi_bar[idx].lobits; if (addr != pi->pi_bar[idx].addr) { update_bar_address(pi, addr, idx, @@ -2213,7 +2213,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, } break; case PCIBAR_MEM64: - addr = bar = *eax & mask; + addr = bar = *valp & mask; bar |= pi->pi_bar[idx].lobits; if (addr != (uint32_t)pi->pi_bar[idx].addr) { update_bar_address(pi, addr, idx, @@ -2222,7 +2222,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, break; case PCIBAR_MEMHI64: mask = ~(pi->pi_bar[idx - 1].size - 1); - addr = ((uint64_t)*eax << 32) & mask; + addr = ((uint64_t)*valp << 32) & mask; bar = addr >> 32; if (bar != pi->pi_bar[idx - 1].addr >> 32) { update_bar_address(pi, addr, idx - 1, @@ -2230,12 +2230,12 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, } break; case PCIBAR_ROM: - addr = bar = *eax & mask; + addr = bar = *valp & mask; if (memen(pi) && romen(pi)) { unregister_bar(pi, idx); } pi->pi_bar[idx].addr = addr; - pi->pi_bar[idx].lobits = *eax & + pi->pi_bar[idx].lobits = *valp & PCIM_BIOS_ENABLE; /* romen could have changed it value */ if (memen(pi) && romen(pi)) { @@ -2249,11 +2249,11 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, pci_set_cfgdata32(pi, coff, bar); } else if (pci_emul_iscap(pi, coff)) { - pci_emul_capwrite(pi, coff, bytes, *eax, 0, 0); + pci_emul_capwrite(pi, coff, bytes, *valp, 0, 0); } else if (coff >= PCIR_COMMAND && coff < PCIR_REVID) { - pci_emul_cmdsts_write(pi, coff, *eax, bytes); + pci_emul_cmdsts_write(pi, coff, *valp, bytes); } else { - CFGWRITE(pi, coff, *eax, bytes); + CFGWRITE(pi, coff, *valp, bytes); } } } From nobody Wed Jul 5 13:07:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx0MJ3LmFz4mDmF; Wed, 5 Jul 2023 13:07: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 4Qx0MJ04wMz3CHp; Wed, 5 Jul 2023 13:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688562476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jIM4jcVE1QBjgTPAImZhBmsBPu9pCuuaPrFocbcwTy4=; b=QZ69ZMtBN2hUJ3K5G05hCV6MeGbDACCt3AWDYbDnB0XgQSUDY6RiE2T6J02hEVp9EInhVu bVvvbGSFIMhER35GAYkxSj96HaF4SvdRsata2i5HyIvqiQ/NvMlMZfibKPyFWgNNV9zErK 3gq4zQ1ANxFrizI8XtqgrAPGliBUvNvcK8dgCjN+nk6Pk1IuBwAwTmXo/PYmeiUKGsEUeK J51v+Y9iph5E4iZE/wwPenxDnsP2L/J/WavEVcy4WKYFBoTdHgkP6GAtDtu5GQPukKD4e1 K++3qAkKetXKyqclne8zibFUoByBUV3qAKjbH7OG//CVB9n1SotyC+7xbKAq4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688562476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jIM4jcVE1QBjgTPAImZhBmsBPu9pCuuaPrFocbcwTy4=; b=nhGUuZk3USdarCaG14XOKnYnK3C4vMgPuA0dQ23qtTVL0ixEoPEWaJu8Ex3UM9mL2rTCsz g54l9aAujATFXVlLG/7+It7uSfJVTXuXu7wk9xm0LrqvBb8fwUbiCqvRcz2vffQ0r1pB7h Ncov5VSJe0Gx3MzhJ9BGkvKUjxK5+nUDYT+EbvtYTQyXC9W4+estT+kCjuNc9YoPqupXdA uuftYiGmFCZ5YIEQog84N+G44W+CfZu6fOy/CKgorN/6VkVMMkAwA7ygf8D999VjXeQI0k 72ifWI9sFThfuU688w+EOxogA4CUp35I/DJ7/snKasLAyNQaqJPkvD7SQvdxoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688562476; a=rsa-sha256; cv=none; b=lmeTA8nAJFhnPuKXmdb48hL/y6SsUotcSw06Snq/gAtpFLgX9PXO/pOPafcnoNgTxNLBSh GZ9hG62x5GjGcj5B6PP6UoL0s+KHbDUV/jrO+dg8kErjYpVSmz0RjQp1bubyQo5x9rSWsc tt4JCGekDx1pu1GR8DO9BJq98Yy11+KpdwX4BCGqaZa+7Iel27/k2+L4/1rsAO9Qdeu9qB Cu1rwGRWbzyrh0Eb2Az1Ro7ycqX3kKHbnQqeFzXKlR0z4pKJIroWeCkx2f4R44MTLnG7ZD zxRj0fIHH9r3jNui639mM+Bp2WIBB/dFEtqkBHAjBH/cyhjD23ll50qLKMCLpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx0MH6HZ0zGcb; Wed, 5 Jul 2023 13:07: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 365D7ttR071265; Wed, 5 Jul 2023 13:07:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365D7t5r071264; Wed, 5 Jul 2023 13:07:55 GMT (envelope-from git) Date: Wed, 5 Jul 2023 13:07:55 GMT Message-Id: <202307051307.365D7t5r071264@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 44ee4e90a3a6 - stable/13 - ctfconvert: Integer encoding types are unsigned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 44ee4e90a3a6d68fe1ef7684fe60f8b9a60d4ae2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=44ee4e90a3a6d68fe1ef7684fe60f8b9a60d4ae2 commit 44ee4e90a3a6d68fe1ef7684fe60f8b9a60d4ae2 Author: Mark Johnston AuthorDate: 2023-06-06 17:28:02 +0000 Commit: Mark Johnston CommitDate: 2023-07-05 13:07:06 +0000 ctfconvert: Integer encoding types are unsigned Before this change, encodings in the user-defined range were being sign-extended. MFC after: 1 week Sponsored by: Innovate UK (cherry picked from commit 258a0d760aa8b42899a000e30f610f900a402556) --- cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c index 9c422fb58fa1..861fda0931af 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c @@ -1367,7 +1367,7 @@ static const fp_size_map_t fp_encodings[] = { }; static uint_t -die_base_type2enc(dwarf_t *dw, Dwarf_Off off, Dwarf_Signed enc, size_t sz) +die_base_type2enc(dwarf_t *dw, Dwarf_Off off, Dwarf_Unsigned enc, size_t sz) { const fp_size_map_t *map = fp_encodings; uint_t szidx = dw->dw_ptrsz == sizeof (uint64_t); @@ -1398,9 +1398,9 @@ static intr_t * die_base_from_dwarf(dwarf_t *dw, Dwarf_Die base, Dwarf_Off off, size_t sz) { intr_t *intr = xcalloc(sizeof (intr_t)); - Dwarf_Signed enc; + Dwarf_Unsigned enc; - (void) die_signed(dw, base, DW_AT_encoding, &enc, DW_ATTR_REQ); + (void) die_unsigned(dw, base, DW_AT_encoding, &enc, DW_ATTR_REQ); switch (enc) { case DW_ATE_unsigned: From nobody Wed Jul 5 13:45:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx1BH5qSPz4lQwP; Wed, 5 Jul 2023 13:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qx1BH5Gk6z3PS0; Wed, 5 Jul 2023 13:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688564711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwHDyeRTv7JfqGB+HlXVMuCVTiGumf2lHwdojO3dp0M=; b=fgB8poz6ztJv+hmK2jEFgcp4KxDkgkQEB5L4civCAvv4pofnFj/GVNmLnEamMKviPhEISS v+UMXCvmwk3JfL3BlYHPxnvTA3r98oYbUeTHcjdv4hXvV93lEFjO7iEao8E3AcK3NNXrpw LizeNEn4sbUGjFD0rXbA6fSihy42xlCWD3xwqJFjW2fRT6mV0xk5WaKbajqv9CCmtuCWPr n10FE8AKqBNQPCyTNb1SYw0IK1q0vaRzQFp3dZBX11y1zp4Wektw0MCqyVfwHO72RHXdMf XSNZaXGshfDKlFyA+quKzTveesI15kOgds5pkxKQnaCX+qc5u4VKUIxE6I7NUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688564711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwHDyeRTv7JfqGB+HlXVMuCVTiGumf2lHwdojO3dp0M=; b=Y2OS4FktFgvyXX+tSzpyOkXXiQ8fNwwcQ0kslr+DQwAz7UjiFQbiBfp/L0FhFw1tCtscLN aL7logCAKKRB4tp0+G8D3/3gz+3/DL7JZWRCFrd4Em1dXR78FtmI3qg+uFZxZFKTBAHzMy hfExK0ClHOXI+2bd3DvFb9SyFHbkMbWYhqKx1jvb9pb+RLJOgib/pChqGRmUiTR685m54H bHqh+TdkhHpXTEr3T3yom0q3GNEfF48edE3CHpigbZhC3in/z+qjeFqQPGQIc6lnti9KGS k7Cynq+XYMD5svtNzVYFeDT72TuWCInDxUiNy785J9V7SJaijrd2TWlhWslzzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688564711; a=rsa-sha256; cv=none; b=AcgNbz4gfIQKli56Gzyet9nnAntw2+SaP8qmeL7XxShBxOGnnC3yWqRgQfbyuBG09vTKDi bkMiUbTIhN8W53faojDywoZPOUblszSqB7ssonTTaq0gHlPRRXWxo4scMcME+uky3aOlXu BeLuWlTe+cPYE+MhasLpcTJP2O32e8WuYLFerqOuf/YvonVYDQ0GfnnSKHXXl/0qK+HAp8 GsD9pfXrJ/88GnuQhNL+dukMawL49ahXWfD2VF/ANf9m54wkE6/EZXRSoOEr/2i1mVLpos Pt4+qSiILEMBo67wXtwgJ3dcdFRAuMgzUTvSfVEyD2wZRi+Vao05i6KmpvW9yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx1BH4M6xzHVB; Wed, 5 Jul 2023 13:45: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 365DjBCv036003; Wed, 5 Jul 2023 13:45:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365DjBWF036002; Wed, 5 Jul 2023 13:45:11 GMT (envelope-from git) Date: Wed, 5 Jul 2023 13:45:11 GMT Message-Id: <202307051345.365DjBWF036002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 5842f73dbc2a - main - vfs: compute_lk_cnflags(): Remove unused argument 'cnflags'; Rename List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5842f73dbc2a4408f63da37623096ddfb0c84bc1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5842f73dbc2a4408f63da37623096ddfb0c84bc1 commit 5842f73dbc2a4408f63da37623096ddfb0c84bc1 Author: Olivier Certner AuthorDate: 2023-07-05 13:40:22 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 13:43:38 +0000 vfs: compute_lk_cnflags(): Remove unused argument 'cnflags'; Rename Argument unused since commit 93a0ba8f4990785f. Rename it to enforce_lkflags(), which seems to more aptly describe what it does. [mjg: massaged the commit message a little] Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D40848 --- sys/kern/vfs_lookup.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 73df48e96efe..44fc91c1bd11 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -748,7 +748,7 @@ out: } static int -compute_cn_lkflags(struct mount *mp, int lkflags, int cnflags) +enforce_lkflags(struct mount *mp, int lkflags) { if (mp == NULL || ((lkflags & LK_SHARED) && @@ -815,9 +815,7 @@ vfs_lookup_degenerate(struct nameidata *ndp, struct vnode *dp, int wantparent) cnp->cn_lkflags |= LK_EXCLUSIVE; } - vn_lock(dp, - compute_cn_lkflags(mp, cnp->cn_lkflags | LK_RETRY, - cnp->cn_flags)); + vn_lock(dp, enforce_lkflags(mp, cnp->cn_lkflags | LK_RETRY)); if (dp->v_type != VDIR) { error = ENOTDIR; @@ -1009,8 +1007,7 @@ vfs_lookup(struct nameidata *ndp) * we adjust based on the requesting flags. */ vn_lock(dp, - compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | LK_RETRY, - cnp->cn_flags)); + enforce_lkflags(dp->v_mount, cnp->cn_lkflags | LK_RETRY)); dirloop: /* @@ -1149,8 +1146,8 @@ dirloop: VREF(dp); vput(tdp); vn_lock(dp, - compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | - LK_RETRY, ISDOTDOT)); + enforce_lkflags(dp->v_mount, cnp->cn_lkflags | + LK_RETRY)); error = nameicap_check_dotdot(ndp, dp); if (error != 0) { capdotdot: @@ -1196,8 +1193,7 @@ unionlookup: vn_printf(dp, "lookup in "); #endif lkflags_save = cnp->cn_lkflags; - cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags, - cnp->cn_flags); + cnp->cn_lkflags = enforce_lkflags(dp->v_mount, cnp->cn_lkflags); error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp); cnp->cn_lkflags = lkflags_save; if (error != 0) { @@ -1213,8 +1209,8 @@ unionlookup: VREF(dp); vput(tdp); vn_lock(dp, - compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | - LK_RETRY, cnp->cn_flags)); + enforce_lkflags(dp->v_mount, cnp->cn_lkflags | + LK_RETRY)); nameicap_tracker_add(ndp, dp); goto unionlookup; } @@ -1303,8 +1299,7 @@ good: KASSERT(mp != NULL, ("%s: NULL mountpoint for VIRF_MOUNTPOINT vnode", __func__)); crosslock = (dp->v_vflag & VV_CROSSLOCK) != 0; - crosslkflags = compute_cn_lkflags(mp, cnp->cn_lkflags, - cnp->cn_flags); + crosslkflags = enforce_lkflags(mp, cnp->cn_lkflags); if (__predict_false(crosslock)) { /* * We are going to be holding the vnode lock, which From nobody Wed Jul 5 15:38:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx3jP4jx1z4lLj4; Wed, 5 Jul 2023 15:38: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 4Qx3jP4BgQz4B76; Wed, 5 Jul 2023 15:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688571529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/mudbF7kLueZSumbm6jNf4l2wIAoCf1+55cbRCvZOrU=; b=B/piArr/BdmUvzK27IjGUwAS1q2p1tWlNauW+KiM9irrOHoLXPhbN3R99IBPem7jqu4D5Z 5UTiCWv2YxhxEnfCwFNJQHSgXVSBOiLJzV3IfZrKabjX/KEzA2wHJMJoFs28IHYjAlPkiY U2Ncgt4pw52qjg8zi/pGktJK4OkbsoREjxhARXflOZdcrJQMzuVrlF+dJnzopIoMSgv1lA VnnLY1Tw45wDHBijit/IdQBP/HnnQEq7TUVrEQQ/IJNjERSSHvzZoVBYiPzG8JqO+ZE08e oN2E2+ekQxw9oM7RZzP7cDcfgu5I9bWlBEAOROijw7yCEgN7qj1CwyQkl/keMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688571529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/mudbF7kLueZSumbm6jNf4l2wIAoCf1+55cbRCvZOrU=; b=VLHUKK5UkIHS7W8AvFMSNjtCvEIJHKaTlmvNpQQT6XncLS3ZFB5L1ctN39m4u5JIl8y2Mv YLYjsm8JcFdFMKgZETR/3AjLG/F2WibGm2CCQ7K+hEQ59Efug37udmL3OkO9dHlqaGRAyi F8OnC2J+Li2lkdwR5cjzBGcZDjShxdXpIBHB0KpiwUB1+tyPlmHDew2y4niCCP8s16IiGI k5j5tsxzgd8uMmPV6VJan2jf2Zo7ws3Zyn7RGpGwOESDGLdGKHUD3Ww+AFwgn0Gb0XKRPR xlr7qJvOQUWJlz7iVDjJnvja5+A4ACZiBNJ+S89AyB2StoJH8wVQi5ijPNmgTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688571529; a=rsa-sha256; cv=none; b=mcCS2P0wfMH295viMzNnkb4YReMWw36KkbH6pJaCJ8cLXEh9kKllfau3EJ5VGfmiiZPNY9 mQgBC23EU9LNuxKe7xu9r0UNvvH/5qsTZ3dQ0I/glFBaA2XI7lAiQWDsS45Xs5XdGTH+nR rvPSpWoMLBMdTRujfMzM4Uvddv0eu71Q0wUGV2RpaYL1Z4rr27+8qwBzZEPAzXvCSpBu6D aV139dJpf23nqF2Tunqi+wo4D9DzhT+2QATRw4brpqoOt6wSJeV72MxnwxxbGC99JuxSDd DZeW22ZgdPgTcZO5uUz2yMC2Lkoj6EgoZfRELhQI9kN/0Qe4EgSIWukAWmYCQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx3jP3Fl7zLLZ; Wed, 5 Jul 2023 15:38: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 365FcnpC017963; Wed, 5 Jul 2023 15:38:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365FcnHD017962; Wed, 5 Jul 2023 15:38:49 GMT (envelope-from git) Date: Wed, 5 Jul 2023 15:38:49 GMT Message-Id: <202307051538.365FcnHD017962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 9def8ea689ed - main - vfs: list enums on separate lines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9def8ea689edd4b5a133d6fca13fcb39798d1c47 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9def8ea689edd4b5a133d6fca13fcb39798d1c47 commit 9def8ea689edd4b5a133d6fca13fcb39798d1c47 Author: Mateusz Guzik AuthorDate: 2023-04-21 18:06:13 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 14:46:30 +0000 vfs: list enums on separate lines Requested by: kib --- sys/sys/vnode.h | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 428bf31b3996..8b108c73b355 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -56,15 +56,34 @@ /* * Vnode types. VNON means no type. */ -enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD, - VMARKER }; -#define VLASTTYPE VMARKER +enum vtype { + VNON, + VREG, + VDIR, + VBLK, + VCHR, + VLNK, + VSOCK, + VFIFO, + VBAD, + VMARKER, + VLASTTYPE = VMARKER, +}; + +enum vstate { + VSTATE_UNINITIALIZED, + VSTATE_CONSTRUCTED, + VSTATE_DESTROYING, + VSTATE_DEAD, + VLASTSTATE = VSTATE_DEAD, +}; -enum vstate { VSTATE_UNINITIALIZED, VSTATE_CONSTRUCTED, VSTATE_DESTROYING, - VSTATE_DEAD }; -#define VLASTSTATE VSTATE_DEAD +enum vgetstate { + VGET_NONE, + VGET_HOLDCNT, + VGET_USECOUNT, +}; -enum vgetstate { VGET_NONE, VGET_HOLDCNT, VGET_USECOUNT }; /* * Each underlying filesystem allocates its own private area and hangs * it from v_data. If non-null, this area is freed in getnewvnode(). From nobody Wed Jul 5 15:38:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx3jQ5fW5z4lLgL; Wed, 5 Jul 2023 15:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qx3jQ54lDz4B7f; Wed, 5 Jul 2023 15:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688571530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aOUUSPwvV2eT2GWR3QX6liUaKQH4WDANAQ1h5Zf/BF8=; b=hqRcORsWqw0CyQp9QZCF9QPjWwVFkJ8J6ANUWUPBFOyyPRDkLOJGaXILZJIRAQnOK9Jpw4 WCHjNClyhEzQhegsPNTPTF2Tt3yhGr/k8xWGnkQd1wK/gfzJrFYRqj5CQDXQ/ARh1BxWdT V2yG8lYUppsoQbg0bgrvMCCoMLX3qdWVuHbFNjhPQQDZRIkwGZiGIOyeSMdr2sdpw5Kwbu 5GmISQoUq6H0jng5w782OtJCdnBbbnL43T0TKx0Bm0Nq73ImzOEGD/c+TyB57l8JnW8MlX li+y5xG2v0IbPKwWualciOE1BtrbHOMzNAfG4cLho4S/aJ8EJSNxmdXgLDIkfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688571530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aOUUSPwvV2eT2GWR3QX6liUaKQH4WDANAQ1h5Zf/BF8=; b=kYdPcu3x5DiQfSxQMGD2hI03IicyzSBvBi0Q5CAAokG/qp3YuG3dk+EHdVaMrScQ4zRaIP G+5T+tF9/CvwP2WWtHQ1IdeYE+AMyScNnKSK1Ey/ZiziAMRNNoIM6PPJZNlKAMgWw8w45Z AnxAa6YZ7kNNoARZrG/5NbXq5mk5R7nLjzYAQzsppq3ujpWTpftqrZEX7Q+LzmCgtlQsma UTBXscBljT8YZXWI0MYIrPC9zWPjwLUZwbv+7eyF05ijzf5yOlwlH9lqgveO+7HJcyaTLQ DH2gQh/mYWKznYfpp1X7EC1aX+9n7CKCz/o4oUvzOOOEjzzPw2ADCzrXEcdKFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688571530; a=rsa-sha256; cv=none; b=WeispA7S2lCLR37KBxklW9839Rglgth8Rr4ij+7xD5lRtLqvKVfUDKLje1ByAmuDgxozPe RRjkyJmoaTAa9Ghm/jslTjqdsxZkbhYCaJVlQqw+z61iHRVKyalJA5+YVbmNXjAj3zZliH dPdZusbcWRUUT9scTxS+dKG1OWtbP/4YxtmpzWqUXpYQpjwbFwGQY+lPDhK/JmrkUC2V0O PKURXYZRJ+o/FYBQ7oM9BhDXS7FUUPuCuG0ClITo4/o3neQtiV95GGChTrKh919+/6SYAv KrnYpyg1TAanbY7CuDybXBlFeFA32dVUBj1YYlXib739s+WCDO7eJPNyvUKJfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx3jQ49PFzL6H; Wed, 5 Jul 2023 15:38: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 365FcoHP017984; Wed, 5 Jul 2023 15:38:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365FcoZR017983; Wed, 5 Jul 2023 15:38:50 GMT (envelope-from git) Date: Wed, 5 Jul 2023 15:38:50 GMT Message-Id: <202307051538.365FcoZR017983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: cebb8646c4ee - main - Support byte-sized enums List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cebb8646c4ee559aedcbc1b27bf30faa70a1f716 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cebb8646c4ee559aedcbc1b27bf30faa70a1f716 commit cebb8646c4ee559aedcbc1b27bf30faa70a1f716 Author: Mateusz Guzik AuthorDate: 2023-03-12 19:29:20 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 14:46:30 +0000 Support byte-sized enums To that end add __enum_uint8_decl and __enum_uint8. By default enums take 4 bytes, but vast majority of them have values which would fit in a byte. One can try to workaround the problem by using bitfields, like so: enum some_small_enum foo:8; but that's ugly and runs into trouble when using atomic_load (you can't take an address of a bitfield, even if it is sized to a multiply of a byte). Both gcc 13 and clang support specifying the size, and for older variants one can fallback to the "packed" attribute. Names are mangled in order to avoid mix use with plain enum. Reviewed by: Differential Revision: https://reviews.freebsd.org/D39031 --- sys/sys/types.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/sys/types.h b/sys/sys/types.h index 0846f2a57670..c6f7abe1f524 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -347,6 +347,18 @@ __makedev(int _Major, int _Minor) ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); } +#if (defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 13)) +#define __enum_uint8_decl(name) enum enum_ ## name ## _uint8 : uint8_t +#define __enum_uint8(name) enum enum_ ## name ## _uint8 +#else +/* + * Note: there is no real size checking here, but the code below can be + * removed once we require GCC 13. + */ +#define __enum_uint8_decl(name) enum __attribute__((packed)) enum_ ## name ## _uint8 +#define __enum_uint8(name) enum __attribute__((packed)) enum_ ## name ## _uint8 +#endif + /* * These declarations belong elsewhere, but are repeated here and in * to give broken programs a better chance of working with From nobody Wed Jul 5 15:38:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx3jR6ZJsz4lLXW; Wed, 5 Jul 2023 15:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qx3jR65phz4BHq; Wed, 5 Jul 2023 15:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688571531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e0gTr6ou5uNuBCD78HPM9obilZdYA8EWgwGHMzeBnQw=; b=W72k3kB5SAluHVrIktOf7tnphNBeKZsSmOSnDp4tDm3l9sJKnMD/CvocOG7Aq+BVNh+XNC cTpoBG/+yLh70MpRqX/jg88Elcs+UsxUWxHar9At3LK5YFJ4Y/6wZaVRFvZO/q6mBmr0oZ iNQeuIxZWqix4W3qjPyAolMPXIFNCrYWQTonIIZHhrbUcXhFQk+yI7pU+roorRtaRGYI6W VpmmdK9iitUNG6rTF44lNXBp9VuE4T0RoGs6UKJo7rxRtF1i8ZIUKRLvNCcD6LPIcgiu/0 Av4GE81IA3jF8cPXjkl2aTkTp4btNrAZnHIqd7aiq2KCF93nhlm/5A6XZIyRYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688571531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e0gTr6ou5uNuBCD78HPM9obilZdYA8EWgwGHMzeBnQw=; b=VIsnRO2UWSkIS3OBgvFyMnxGTNXQ68r/7N6zJRLk0ue7agDWo2XVlfzDqXr7GkHFUcOf2l /wsRU3BiVT34ACAIvnvG2t5roH/sQ23Io70kXXF7enYxroZ0Zx6oxIwaFraopCAgzZ1a2m WGAevI7f9EOXYvJguZZ/CIgiXLPY9a1URo/ugyUW6kmAsvKCVXGV0PjQUJtWy2Yy8SrMBI S2Y9X2h4jtYOIRM9xSUJIClWO+qL/d9K40xH3aFMdQy74MiO+7ZRcYX6BvxJgozAnZ+yR+ 1nXk2RBgfvOkQjPMwpVHDGxlJ/hV4/m9UOIyTT76zaiWffA98h/DphafT4DuGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688571531; a=rsa-sha256; cv=none; b=ar7vxikDLjV/WhNiYpZtG7DmBcbNi1CXE9yuZuwWkIakqUMdn7YkdmcUkdNKezTsVv842y VWofm7NRS56PVDy1FYQyMXYmoYGF5PhAEp+82D0pe3OcMGOr69oM7A0JVtuG7XMlchAof1 gZR0YWMTMuCxC3/S8lTBxfDPcQHMtX+V0UCqIsFW1QnJy3PnItYnbNyhQfWwBMb9cFDKgu 1Pov+95UhBJ1Mdiv8dZ+tT5BnVjD624nbZaAAeskvjjXiYEYihD+RZ2ymAjqWMlkkD5INR l4JJaqG9h5ujBfZuKH65tv+deDnBj61iZn7UMSPEOwNdARQbylvzPaZ0P/aI5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx3jR5C00zKs8; Wed, 5 Jul 2023 15:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365FcpRQ018003; Wed, 5 Jul 2023 15:38:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365Fcpew018002; Wed, 5 Jul 2023 15:38:51 GMT (envelope-from git) Date: Wed, 5 Jul 2023 15:38:51 GMT Message-Id: <202307051538.365Fcpew018002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ba8cc6d7271a - main - vfs: use __enum_uint8 for vtype and vstate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba8cc6d7271a50fec978a1d3a088aec7985fae48 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ba8cc6d7271a50fec978a1d3a088aec7985fae48 commit ba8cc6d7271a50fec978a1d3a088aec7985fae48 Author: Mateusz Guzik AuthorDate: 2023-03-12 19:31:27 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 15:06:30 +0000 vfs: use __enum_uint8 for vtype and vstate This whacks hackery around only reading v_type once. Bump __FreeBSD_version to 1400093 --- .../openzfs/include/os/freebsd/spl/sys/vnode.h | 2 +- sys/fs/fuse/fuse_internal.c | 8 ++++---- sys/fs/fuse/fuse_internal.h | 8 ++++---- sys/fs/fuse/fuse_node.c | 8 ++++---- sys/fs/fuse/fuse_node.h | 4 ++-- sys/fs/fuse/fuse_vfsops.c | 2 +- sys/fs/fuse/fuse_vnops.c | 4 ++-- sys/fs/nfs/nfs_commonacl.c | 10 ++++----- sys/fs/nfs/nfs_commonsubs.c | 4 ++-- sys/fs/nfs/nfs_var.h | 6 +++--- sys/fs/nfsclient/nfs_clcomsubs.c | 4 ++-- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- sys/fs/nfsserver/nfs_nfsdport.c | 4 ++-- sys/fs/nfsserver/nfs_nfsdserv.c | 6 +++--- sys/fs/tarfs/tarfs.h | 4 ++-- sys/fs/tarfs/tarfs_subr.c | 2 +- sys/fs/tmpfs/tmpfs.h | 4 ++-- sys/fs/tmpfs/tmpfs_subr.c | 2 +- sys/fs/unionfs/union_subr.c | 2 +- sys/kern/kern_linker.c | 2 +- sys/kern/subr_acl_nfs4.c | 2 +- sys/kern/subr_acl_posix1e.c | 2 +- sys/kern/vfs_cache.c | 11 ++-------- sys/kern/vfs_subr.c | 6 +++--- sys/sys/param.h | 2 +- sys/sys/vnode.h | 24 +++++++++++----------- sys/ufs/ffs/ffs_alloc.c | 2 +- sys/ufs/ffs/ffs_extern.h | 4 ++-- sys/ufs/ffs/ffs_snapshot.c | 4 ++-- sys/ufs/ffs/softdep.h | 4 ++-- 30 files changed, 71 insertions(+), 78 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 ab1727dca0c9..91dadfae6613 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h @@ -36,7 +36,7 @@ struct xucred; typedef struct flock flock64_t; typedef struct vnode vnode_t; typedef struct vattr vattr_t; -typedef enum vtype vtype_t; +#define vtype_t __enum_uint8(vtype) #include #include diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index 6ac7b4432e23..37394330632c 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -793,7 +793,7 @@ int fuse_internal_newentry_core(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, - enum vtype vtyp, + __enum_uint8(vtype) vtyp, struct fuse_dispatcher *fdip) { int err = 0; @@ -834,7 +834,7 @@ fuse_internal_newentry(struct vnode *dvp, enum fuse_opcode op, void *buf, size_t bufsize, - enum vtype vtype) + __enum_uint8(vtype) vtype) { int err; struct fuse_dispatcher fdi; @@ -899,7 +899,7 @@ fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, struct timespec old_atime = fvdat->cached_attrs.va_atime; struct timespec old_ctime = fvdat->cached_attrs.va_ctime; struct timespec old_mtime = fvdat->cached_attrs.va_mtime; - enum vtype vtyp; + __enum_uint8(vtype) vtyp; int err; ASSERT_VOP_LOCKED(vp, __func__); @@ -1141,7 +1141,7 @@ int fuse_internal_setattr(struct vnode *vp, struct vattr *vap, pid_t pid = td->td_proc->p_pid; struct fuse_data *data; int err = 0; - enum vtype vtyp; + __enum_uint8(vtype) vtyp; ASSERT_VOP_ELOCKED(vp, __func__); diff --git a/sys/fs/fuse/fuse_internal.h b/sys/fs/fuse/fuse_internal.h index 5d852b420366..3146f6158b9b 100644 --- a/sys/fs/fuse/fuse_internal.h +++ b/sys/fs/fuse/fuse_internal.h @@ -90,7 +90,7 @@ vnode_mount(struct vnode *vp) return (vp->v_mount); } -static inline enum vtype +static inline __enum_uint8(vtype) vnode_vtype(struct vnode *vp) { return (vp->v_type); @@ -284,7 +284,7 @@ void fuse_internal_clear_suid_on_write(struct vnode *vp, struct ucred *cred, /* entity creation */ static inline int -fuse_internal_checkentry(struct fuse_entry_out *feo, enum vtype vtyp) +fuse_internal_checkentry(struct fuse_entry_out *feo, __enum_uint8(vtype) vtyp) { if (vtyp != IFTOVT(feo->attr.mode)) { return (EINVAL); @@ -303,14 +303,14 @@ fuse_internal_checkentry(struct fuse_entry_out *feo, enum vtype vtyp) int fuse_internal_newentry(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, enum fuse_opcode op, void *buf, size_t bufsize, - enum vtype vtyp); + __enum_uint8(vtype) vtyp); void fuse_internal_newentry_makerequest(struct mount *mp, uint64_t dnid, struct componentname *cnp, enum fuse_opcode op, void *buf, size_t bufsize, struct fuse_dispatcher *fdip); int fuse_internal_newentry_core(struct vnode *dvp, struct vnode **vpp, - struct componentname *cnp, enum vtype vtyp, struct fuse_dispatcher *fdip); + struct componentname *cnp, __enum_uint8(vtype) vtyp, struct fuse_dispatcher *fdip); /* entity destruction */ diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index 1abf6e75cc3e..07695a30d272 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -154,7 +154,7 @@ sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS) static void fuse_vnode_init(struct vnode *vp, struct fuse_vnode_data *fvdat, - uint64_t nodeid, enum vtype vtyp) + uint64_t nodeid, __enum_uint8(vtype) vtyp) { fvdat->nid = nodeid; LIST_INIT(&fvdat->handles); @@ -189,13 +189,13 @@ fuse_vnode_cmp(struct vnode *vp, void *nidp) return (VTOI(vp) != *((uint64_t *)nidp)); } -SDT_PROBE_DEFINE3(fusefs, , node, stale_vnode, "struct vnode*", "enum vtype", +SDT_PROBE_DEFINE3(fusefs, , node, stale_vnode, "struct vnode*", "uint8_t", "uint64_t"); static int fuse_vnode_alloc(struct mount *mp, struct thread *td, uint64_t nodeid, - enum vtype vtyp, + __enum_uint8(vtype) vtyp, struct vnode **vpp) { struct fuse_data *data; @@ -289,7 +289,7 @@ fuse_vnode_get(struct mount *mp, struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, - enum vtype vtyp) + __enum_uint8(vtype) vtyp) { struct thread *td = curthread; /* diff --git a/sys/fs/fuse/fuse_node.h b/sys/fs/fuse/fuse_node.h index 8eb299361bd0..fe3f3c0cd927 100644 --- a/sys/fs/fuse/fuse_node.h +++ b/sys/fs/fuse/fuse_node.h @@ -125,7 +125,7 @@ struct fuse_vnode_data { struct timespec last_local_modify; struct vattr cached_attrs; uint64_t nlookup; - enum vtype vtype; + __enum_uint8(vtype) vtype; struct vn_clusterw clusterw; }; @@ -201,7 +201,7 @@ void fuse_vnode_destroy(struct vnode *vp); int fuse_vnode_get(struct mount *mp, struct fuse_entry_out *feo, uint64_t nodeid, struct vnode *dvp, struct vnode **vpp, - struct componentname *cnp, enum vtype vtyp); + struct componentname *cnp, __enum_uint8(vtype) vtyp); void fuse_vnode_open(struct vnode *vp, int32_t fuse_open_flags, struct thread *td); diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index 93916b34be83..c17937178d00 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -543,7 +543,7 @@ fuse_vfsop_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp) struct fuse_vnode_data *fvdat; struct timespec now; const char dot[] = "."; - enum vtype vtyp; + __enum_uint8(vtype) vtyp; int error; if (!(data->dataflags & FSESS_EXPORT_SUPPORT)) { diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 1bb5b3834c76..6354167ab27f 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1391,7 +1391,7 @@ struct fuse_lookup_alloc_arg { struct fuse_entry_out *feo; struct componentname *cnp; uint64_t nid; - enum vtype vtyp; + __enum_uint8(vtype) vtyp; }; /* Callback for vn_get_ino */ @@ -1439,7 +1439,7 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) struct fuse_dispatcher fdi; bool did_lookup = false; struct fuse_entry_out *feo = NULL; - enum vtype vtyp; /* vnode type of target */ + __enum_uint8(vtype) vtyp; /* vnode type of target */ uint64_t nid; diff --git a/sys/fs/nfs/nfs_commonacl.c b/sys/fs/nfs/nfs_commonacl.c index e47218106186..a7ea072f86d9 100644 --- a/sys/fs/nfs/nfs_commonacl.c +++ b/sys/fs/nfs/nfs_commonacl.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); extern int nfsrv_useacl; static int nfsrv_acemasktoperm(u_int32_t acetype, u_int32_t mask, int owner, - enum vtype type, acl_perm_t *permp); + __enum_uint8(vtype) type, acl_perm_t *permp); /* * Handle xdr for an ace. @@ -188,7 +188,7 @@ nfsmout: */ static int nfsrv_acemasktoperm(u_int32_t acetype, u_int32_t mask, int owner, - enum vtype type, acl_perm_t *permp) + __enum_uint8(vtype) type, acl_perm_t *permp) { acl_perm_t perm = 0x0; int error = 0; @@ -278,14 +278,14 @@ out: /* local functions */ static int nfsrv_buildace(struct nfsrv_descript *, u_char *, int, - enum vtype, int, int, struct acl_entry *); + __enum_uint8(vtype), int, int, struct acl_entry *); /* * This function builds an NFS ace. */ static int nfsrv_buildace(struct nfsrv_descript *nd, u_char *name, int namelen, - enum vtype type, int group, int owner, struct acl_entry *ace) + __enum_uint8(vtype) type, int group, int owner, struct acl_entry *ace) { u_int32_t *tl, aceflag = 0x0, acemask = 0x0, acetype; int full_len; @@ -393,7 +393,7 @@ nfsrv_buildace(struct nfsrv_descript *nd, u_char *name, int namelen, * Build an NFSv4 ACL. */ int -nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *aclp, enum vtype type, +nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *aclp, __enum_uint8(vtype) type, NFSPROC_T *p) { int i, entrycnt = 0, retlen; diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index cb12f5a59a6e..e3a61a5f912a 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -62,8 +62,8 @@ u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1; /* And other global data */ nfstype nfsv34_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK, NFFIFO, NFNON }; -enum vtype newnv2tov_type[8] = { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON }; -enum vtype nv34tov_type[8]={ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO }; +__enum_uint8(vtype) newnv2tov_type[8] = { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON }; +__enum_uint8(vtype) nv34tov_type[8]={ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO }; struct timeval nfsboottime; /* Copy boottime once, so it never changes */ int nfscl_ticks; int nfsrv_useacl = 1; diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 8fabe6f92fc6..294cf90fa235 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -440,7 +440,7 @@ int nfs_supportsnfsv4acls(vnode_t); /* nfs_commonacl.c */ int nfsrv_dissectace(struct nfsrv_descript *, struct acl_entry *, bool, int *, int *, NFSPROC_T *); -int nfsrv_buildacl(struct nfsrv_descript *, NFSACL_T *, enum vtype, +int nfsrv_buildacl(struct nfsrv_descript *, NFSACL_T *, __enum_uint8(vtype), NFSPROC_T *); int nfsrv_compareacl(NFSACL_T *, NFSACL_T *); @@ -478,7 +478,7 @@ int nfsrpc_read(vnode_t, struct uio *, struct ucred *, NFSPROC_T *, int nfsrpc_write(vnode_t, struct uio *, int *, int *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, int, int); int nfsrpc_mknod(vnode_t, char *, int, struct vattr *, u_int32_t, - enum vtype, struct ucred *, NFSPROC_T *, struct nfsvattr *, + __enum_uint8(vtype), struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *); int nfsrpc_create(vnode_t, char *, int, struct vattr *, nfsquad_t, int, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, @@ -770,7 +770,7 @@ int nfsvno_listxattr(struct vnode *, uint64_t, struct ucred *, struct thread *, u_char **, uint32_t *, bool *); void nfsm_trimtrailing(struct nfsrv_descript *, struct mbuf *, char *, int, int); -bool nfsrv_checkwrongsec(struct nfsrv_descript *, int, enum vtype); +bool nfsrv_checkwrongsec(struct nfsrv_descript *, int, __enum_uint8(vtype)); void nfsrv_checknospc(void); /* nfs_commonkrpc.c */ diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index 640d47fed93d..2481c45cab98 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$"); extern struct nfsstatsv1 nfsstatsv1; extern int ncl_mbuf_mlen; -extern enum vtype newnv2tov_type[8]; -extern enum vtype nv34tov_type[8]; +extern __enum_uint8(vtype) newnv2tov_type[8]; +extern __enum_uint8(vtype) nv34tov_type[8]; NFSCLSTATEMUTEX; /* diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 70c7619e679a..9e53bcc2dc0a 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2308,7 +2308,7 @@ nfsmout: */ int nfsrpc_mknod(vnode_t dvp, char *name, int namelen, struct vattr *vap, - u_int32_t rdev, enum vtype vtyp, struct ucred *cred, NFSPROC_T *p, + u_int32_t rdev, __enum_uint8(vtype) vtyp, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap, struct nfsvattr *nnap, struct nfsfh **nfhpp, int *attrflagp, int *dattrflagp) { diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 6b5f357ecaf9..40065a01131f 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -1283,7 +1283,7 @@ nfsvno_mknod(struct nameidata *ndp, struct nfsvattr *nvap, struct ucred *cred, struct thread *p) { int error = 0; - enum vtype vtyp; + __enum_uint8(vtype) vtyp; vtyp = nvap->na_type; /* @@ -7034,7 +7034,7 @@ nfsm_trimtrailing(struct nfsrv_descript *nd, struct mbuf *mb, char *bpos, * be identified by the fact that the file handle's type is VDIR. */ bool -nfsrv_checkwrongsec(struct nfsrv_descript *nd, int nextop, enum vtype vtyp) +nfsrv_checkwrongsec(struct nfsrv_descript *nd, int nextop, __enum_uint8(vtype) vtyp) { if ((nd->nd_flag & ND_NFSV4) == 0) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index a4fa3a934090..7e53ad63820f 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); /* Global vars */ extern u_int32_t newnfs_false, newnfs_true; -extern enum vtype nv34tov_type[8]; +extern __enum_uint8(vtype) nv34tov_type[8]; extern struct timeval nfsboottime; extern int nfsrv_enable_crossmntpt; extern int nfsrv_statehashsize; @@ -1156,7 +1156,7 @@ nfsrvd_create(struct nfsrv_descript *nd, __unused int isdgram, fhandle_t fh; char *bufp; u_long *hashp; - enum vtype vtyp; + __enum_uint8(vtype) vtyp; int32_t cverf[2], tverf[2] = { 0, 0 }; struct thread *p = curthread; @@ -1320,7 +1320,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, __unused int isdgram, struct nameidata named; int error = 0, dirfor_ret = 1, diraft_ret = 1, pathlen; u_int32_t major, minor; - enum vtype vtyp = VNON; + __enum_uint8(vtype) vtyp = VNON; nfstype nfs4type = NFNON; vnode_t vp, dirp = NULL; nfsattrbit_t attrbits; diff --git a/sys/fs/tarfs/tarfs.h b/sys/fs/tarfs/tarfs.h index 444d7b39941d..ff1985e488cd 100644 --- a/sys/fs/tarfs/tarfs.h +++ b/sys/fs/tarfs/tarfs.h @@ -56,7 +56,7 @@ struct tarfs_node { struct vnode *vnode; struct tarfs_mount *tmp; - enum vtype type; + __enum_uint8(vtype) type; ino_t ino; off_t offset; size_t size; @@ -227,7 +227,7 @@ VP_TO_TARFS_NODE(struct vnode *vp) } int tarfs_alloc_node(struct tarfs_mount *tmp, const char *name, - size_t namelen, enum vtype type, off_t off, size_t sz, + size_t namelen, __enum_uint8(vtype) type, off_t off, size_t sz, time_t mtime, uid_t uid, gid_t gid, mode_t mode, unsigned int flags, const char *linkname, dev_t rdev, struct tarfs_node *parent, struct tarfs_node **node); diff --git a/sys/fs/tarfs/tarfs_subr.c b/sys/fs/tarfs/tarfs_subr.c index a0077c611f25..431aa352cd38 100644 --- a/sys/fs/tarfs/tarfs_subr.c +++ b/sys/fs/tarfs/tarfs_subr.c @@ -163,7 +163,7 @@ tarfs_lookup_dir(struct tarfs_node *tnp, off_t cookie) int tarfs_alloc_node(struct tarfs_mount *tmp, const char *name, size_t namelen, - enum vtype type, off_t off, size_t sz, time_t mtime, uid_t uid, gid_t gid, + __enum_uint8(vtype) type, off_t off, size_t sz, time_t mtime, uid_t uid, gid_t gid, mode_t mode, unsigned int flags, const char *linkname, dev_t rdev, struct tarfs_node *parent, struct tarfs_node **retnode) { diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index dac77771a2ec..126b99acba6b 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -183,7 +183,7 @@ struct tmpfs_node { * types instead of a custom enumeration is to make things simpler * and faster, as we do not need to convert between two types. */ - enum vtype tn_type; /* (c) */ + __enum_uint8(vtype) tn_type; /* (c) */ /* * See the top comment. Reordered here to fill LP64 hole. @@ -455,7 +455,7 @@ struct tmpfs_dir_cursor { */ void tmpfs_ref_node(struct tmpfs_node *node); -int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, enum vtype, +int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, __enum_uint8(vtype), uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *, const char *, dev_t, struct tmpfs_node **); int tmpfs_fo_close(struct file *fp, struct thread *td); diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 6eee5ade1d9b..28834a96ee9a 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -535,7 +535,7 @@ tmpfs_ref_node(struct tmpfs_node *node) * Returns zero on success or an appropriate error code on failure. */ int -tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, enum vtype type, +tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, __enum_uint8(vtype) type, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *parent, const char *target, dev_t rdev, struct tmpfs_node **node) { diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 702b10bb6204..fccc07a1ea76 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -308,7 +308,7 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, u_long hashmask; int error; int lkflags; - enum vtype vt; + __enum_uint8(vtype) vt; error = 0; ump = MOUNTTOUNIONFSMOUNT(mp); diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 9dc7ff42cc38..8a3a0e5f0681 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -1858,7 +1858,7 @@ linker_lookup_file(const char *path, int pathlen, const char *name, const char * const *cpp, *sep; char *result; int error, len, extlen, reclen, flags; - enum vtype type; + __enum_uint8(vtype) type; extlen = 0; for (cpp = linker_ext_list; *cpp; cpp++) { diff --git a/sys/kern/subr_acl_nfs4.c b/sys/kern/subr_acl_nfs4.c index 3fc9bb3df61d..ecaf1df4c8c0 100644 --- a/sys/kern/subr_acl_nfs4.c +++ b/sys/kern/subr_acl_nfs4.c @@ -170,7 +170,7 @@ _acl_denies(const struct acl *aclp, int access_mask, struct ucred *cred, } int -vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_t file_gid, +vaccess_acl_nfs4(__enum_uint8(vtype) type, uid_t file_uid, gid_t file_gid, struct acl *aclp, accmode_t accmode, struct ucred *cred) { accmode_t priv_granted = 0; diff --git a/sys/kern/subr_acl_posix1e.c b/sys/kern/subr_acl_posix1e.c index 38239d8c6e65..82d0bcc566f1 100644 --- a/sys/kern/subr_acl_posix1e.c +++ b/sys/kern/subr_acl_posix1e.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); * errno value. */ int -vaccess_acl_posix1e(enum vtype type, uid_t file_uid, gid_t file_gid, +vaccess_acl_posix1e(__enum_uint8(vtype) type, uid_t file_uid, gid_t file_gid, struct acl *acl, accmode_t accmode, struct ucred *cred) { struct acl_entry *acl_other, *acl_mask; diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 1310800fce4e..d315892953e1 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3654,7 +3654,7 @@ vn_fullpath_hardlink(struct vnode *vp, struct vnode *dvp, struct pwd *pwd; size_t addend; int error; - enum vtype type; + __enum_uint8(vtype) type; if (*buflen < 2) return (EINVAL); @@ -3676,15 +3676,8 @@ vn_fullpath_hardlink(struct vnode *vp, struct vnode *dvp, * before we get to evaluate the condition. If this happens, we will * populate part of the buffer and descend to vn_fullpath_dir with * vp == vp_crossmp. Prevent the problem by checking for VBAD. - * - * This should be atomic_load(&vp->v_type) but it is illegal to take - * an address of a bit field, even if said field is sized to char. - * Work around the problem by reading the value into a full-sized enum - * and then re-reading it with atomic_load which will still prevent - * the compiler from re-reading down the road. */ - type = vp->v_type; - type = atomic_load_int(&type); + type = atomic_load_8(&vp->v_type); if (type == VBAD) { error = ENOENT; goto out_bad; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 252e0ca60c3b..b7d43863a228 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -145,7 +145,7 @@ SYSCTL_COUNTER_U64(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, * Conversion tables for conversion from vnode types to inode formats * and back. */ -enum vtype iftovt_tab[16] = { +__enum_uint8(vtype) iftovt_tab[16] = { VNON, VFIFO, VCHR, VNON, VDIR, VNON, VBLK, VNON, VREG, VNON, VLNK, VNON, VSOCK, VNON, VNON, VNON }; @@ -5259,7 +5259,7 @@ out_error: * Returns 0 on success, or an errno on failure. */ int -vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid, +vaccess(__enum_uint8(vtype) type, mode_t file_mode, uid_t file_uid, gid_t file_gid, accmode_t accmode, struct ucred *cred) { accmode_t dac_granted; @@ -7013,7 +7013,7 @@ vn_getsize(struct vnode *vp, off_t *size, struct ucred *cred) #ifdef INVARIANTS void -vn_set_state_validate(struct vnode *vp, enum vstate state) +vn_set_state_validate(struct vnode *vp, __enum_uint8(vstate) state) { switch (vp->v_state) { diff --git a/sys/sys/param.h b/sys/sys/param.h index 904eb9825b92..137bd80c77cb 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400092 +#define __FreeBSD_version 1400093 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 8b108c73b355..e7ebc39ada1d 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -56,7 +56,7 @@ /* * Vnode types. VNON means no type. */ -enum vtype { +__enum_uint8_decl(vtype) { VNON, VREG, VDIR, @@ -70,7 +70,7 @@ enum vtype { VLASTTYPE = VMARKER, }; -enum vstate { +__enum_uint8_decl(vstate) { VSTATE_UNINITIALIZED, VSTATE_CONSTRUCTED, VSTATE_DESTROYING, @@ -129,8 +129,8 @@ struct vnode { * Fields which define the identity of the vnode. These fields are * owned by the filesystem (XXX: and vgone() ?) */ - enum vtype v_type:8; /* u vnode type */ - enum vstate v_state:8; /* u vnode state */ + __enum_uint8(vtype) v_type; /* u vnode type */ + __enum_uint8(vstate) v_state; /* u vnode state */ short v_irflag; /* i frequently read flags */ seqc_t v_seqc; /* i modification count */ uint32_t v_nchash; /* u namecache hash */ @@ -281,7 +281,7 @@ _Static_assert(sizeof(struct vnode) <= 448, "vnode size crosses 448 bytes"); * is unavailable (getattr) or which is not to be changed (setattr). */ struct vattr { - enum vtype va_type; /* vnode type (for create) */ + __enum_uint8(vtype) va_type; /* vnode type (for create) */ u_short va_mode; /* files access mode and type */ u_short va_padding0; uid_t va_uid; /* owner user id */ @@ -405,7 +405,7 @@ extern const u_int io_hold_cnt; * Convert between vnode types and inode formats (since POSIX.1 * defines mode word of stat structure in terms of inode formats). */ -extern enum vtype iftovt_tab[]; +extern __enum_uint8(vtype) iftovt_tab[]; extern int vttoif_tab[]; #define IFTOVT(mode) (iftovt_tab[((mode) & S_IFMT) >> 12]) #define VTTOIF(indx) (vttoif_tab[(int)(indx)]) @@ -720,13 +720,13 @@ int vn_path_to_global_path(struct thread *td, struct vnode *vp, int vn_path_to_global_path_hardlink(struct thread *td, struct vnode *vp, struct vnode *dvp, char *path, u_int pathlen, const char *leaf_name, size_t leaf_length); -int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, +int vaccess(__enum_uint8(vtype) type, mode_t file_mode, uid_t file_uid, gid_t file_gid, accmode_t accmode, struct ucred *cred); int vaccess_vexec_smr(mode_t file_mode, uid_t file_uid, gid_t file_gid, struct ucred *cred); -int vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_t file_gid, +int vaccess_acl_nfs4(__enum_uint8(vtype) type, uid_t file_uid, gid_t file_gid, struct acl *aclp, accmode_t accmode, struct ucred *cred); -int vaccess_acl_posix1e(enum vtype type, uid_t file_uid, +int vaccess_acl_posix1e(__enum_uint8(vtype) type, uid_t file_uid, gid_t file_gid, struct acl *acl, accmode_t accmode, struct ucred *cred); void vattr_null(struct vattr *vap); @@ -1144,11 +1144,11 @@ int vn_dir_check_exec(struct vnode *vp, struct componentname *cnp); int vn_lktype_write(struct mount *mp, struct vnode *vp); #ifdef INVARIANTS -void vn_set_state_validate(struct vnode *vp, enum vstate state); +void vn_set_state_validate(struct vnode *vp, __enum_uint8(vstate) state); #endif static inline void -vn_set_state(struct vnode *vp, enum vstate state) +vn_set_state(struct vnode *vp, __enum_uint8(vstate) state) { #ifdef INVARIANTS vn_set_state_validate(vp, state); @@ -1156,7 +1156,7 @@ vn_set_state(struct vnode *vp, enum vstate state) vp->v_state = state; } -static inline enum vstate +static inline __enum_uint8(vstate) vn_get_state(struct vnode *vp) { return (vp->v_state); diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 957be753ce15..6ac43b4b84d5 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -2644,7 +2644,7 @@ ffs_blkfree(struct ufsmount *ump, ufs2_daddr_t bno, long size, ino_t inum, - enum vtype vtype, + __enum_uint8(vtype) vtype, struct workhead *dephd, u_long key) { diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 5bfc88aa5d19..9e8eb7a74980 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -62,7 +62,7 @@ int ffs_balloc_ufs1(struct vnode *a_vp, off_t a_startoffset, int a_size, int ffs_balloc_ufs2(struct vnode *a_vp, off_t a_startoffset, int a_size, struct ucred *a_cred, int a_flags, struct buf **a_bpp); void ffs_blkfree(struct ufsmount *, struct fs *, struct vnode *, - ufs2_daddr_t, long, ino_t, enum vtype, struct workhead *, u_long); + ufs2_daddr_t, long, ino_t, __enum_uint8(vtype), struct workhead *, u_long); ufs2_daddr_t ffs_blkpref_ufs1(struct inode *, ufs_lbn_t, int, ufs1_daddr_t *); ufs2_daddr_t ffs_blkpref_ufs2(struct inode *, ufs_lbn_t, int, ufs2_daddr_t *); void ffs_blkrelease_finish(struct ufsmount *, u_long); @@ -99,7 +99,7 @@ int ffs_sbput(void *, struct fs *, off_t, int (*)(void *, off_t, void *, int ffs_sbupdate(struct ufsmount *, int, int); void ffs_setblock(struct fs *, u_char *, ufs1_daddr_t); int ffs_snapblkfree(struct fs *, struct vnode *, ufs2_daddr_t, long, ino_t, - enum vtype, struct workhead *); + __enum_uint8(vtype), struct workhead *); void ffs_snapremove(struct vnode *vp); int ffs_snapshot(struct mount *mp, char *snapfile); void ffs_snapshot_mount(struct mount *mp); diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index fa744f0fab79..ec459bb7c2d7 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -91,7 +91,7 @@ ffs_snapblkfree(struct fs *fs, ufs2_daddr_t bno, long size, ino_t inum, - enum vtype vtype, + __enum_uint8(vtype) vtype, struct workhead *wkhd) { return (EINVAL); @@ -1755,7 +1755,7 @@ ffs_snapblkfree(struct fs *fs, ufs2_daddr_t bno, long size, ino_t inum, - enum vtype vtype, + __enum_uint8(vtype) vtype, struct workhead *wkhd) { struct buf *ibp, *cbp, *savedcbp = NULL; diff --git a/sys/ufs/ffs/softdep.h b/sys/ufs/ffs/softdep.h index e45abb9def32..e7caa202a208 100644 --- a/sys/ufs/ffs/softdep.h +++ b/sys/ufs/ffs/softdep.h @@ -562,7 +562,7 @@ struct freefrag { ufs2_daddr_t ff_blkno; /* fragment physical block number */ long ff_fragsize; /* size of fragment being deleted */ ino_t ff_inum; /* owning inode number */ - enum vtype ff_vtype; /* owning inode's file type */ + __enum_uint8(vtype) ff_vtype; /* owning inode's file type */ int ff_key; /* trim key when deleted */ }; @@ -590,7 +590,7 @@ struct freeblks { off_t fb_len; /* Length we're truncating to. */ ufs2_daddr_t fb_chkcnt; /* Blocks released. */ ino_t fb_inum; /* inode owner of blocks */ - enum vtype fb_vtype; /* inode owner's file type */ + __enum_uint8(vtype) fb_vtype; /* inode owner's file type */ uid_t fb_uid; /* uid of previous owner of blocks */ int fb_ref; /* Children outstanding. */ int fb_cgwait; /* cg writes outstanding. */ From nobody Wed Jul 5 15:42:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx3nc2D2kz4lMhg for ; Wed, 5 Jul 2023 15:42:28 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 4Qx3nb3BTjz4DPf for ; Wed, 5 Jul 2023 15:42:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-313e09a5b19so824925f8f.0 for ; Wed, 05 Jul 2023 08:42:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688571745; x=1691163745; 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=4YXqLWdK9bTo/MafNo+Az/k/SN1YFvgrZuAd9Rhc4kw=; b=kh2n7X63HPtK9h87Ll/NuXLcl3grX8JsQOiEnxidb7ro7nk3B7Z+nYA0qba1a8H54q K9ay55Elsf8vfJTCEbFDLGELEKSk6pNDqUMlYhIN8uiuNnqBv/WiuMHZAZ/4a9cNmVNV 6TaX9L76yvNTPwo/9vZZgNCzJlaz9tBYbzNGL/uufjN6y4tTDCgLQxSRhEPmAWx5MkQF kKBlGQSlk2gPya82RyPcB9IS8Q4l5nHRUzF1f/R4w3mUtrsfsD4WArmGlFXZ+E0bkqld g4JWxoF5pw7p0x3gSXPbpGUjZKhW7bLXshRfwh2Gwpi0VYASf2aEOteYV9ZsjZIpdt4m 9anA== X-Gm-Message-State: ABy/qLbOxaLGUHlmED9x0I0Pk7MAtp28jtIU0BCoJZTq9GtVH/chp1tp eCSyNlfMXDB7QII79VcrgVK+Zg== X-Google-Smtp-Source: APBJJlG+wP8QnVZ0h0QpUHPh1Yvxb0Q99XD9vA73LtSVJ6wzcteBWSi4R7VBS9VBkGVsga9ZbneNAQ== X-Received: by 2002:adf:ed02:0:b0:306:3352:5b8c with SMTP id a2-20020adfed02000000b0030633525b8cmr2793889wro.7.1688571745325; Wed, 05 Jul 2023 08:42:25 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id m6-20020adffa06000000b00314417f5272sm4326669wrr.64.2023.07.05.08.42.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2023 08:42:24 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: cebb8646c4ee - main - Support byte-sized enums From: Jessica Clarke In-Reply-To: <202307051538.365FcoZR017983@gitrepo.freebsd.org> Date: Wed, 5 Jul 2023 16:42:14 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <0AD6BA4D-E6B1-4C56-B7B7-A85D57188A34@freebsd.org> References: <202307051538.365FcoZR017983@gitrepo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4Qx3nb3BTjz4DPf X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5 Jul 2023, at 16:38, Mateusz Guzik wrote: >=20 > The branch main has been updated by mjg: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dcebb8646c4ee559aedcbc1b27bf30faa= 70a1f716 >=20 > commit cebb8646c4ee559aedcbc1b27bf30faa70a1f716 > Author: Mateusz Guzik > AuthorDate: 2023-03-12 19:29:20 +0000 > Commit: Mateusz Guzik > CommitDate: 2023-07-05 14:46:30 +0000 >=20 > Support byte-sized enums >=20 > To that end add __enum_uint8_decl and __enum_uint8. >=20 > By default enums take 4 bytes, but vast majority of them have = values > which would fit in a byte. >=20 > One can try to workaround the problem by using bitfields, like so: > enum some_small_enum foo:8; >=20 > but that's ugly and runs into trouble when using atomic_load (you = can't > take an address of a bitfield, even if it is sized to a multiply of = a > byte). >=20 > Both gcc 13 and clang support specifying the size, and for older > variants one can fallback to the "packed" attribute. >=20 > Names are mangled in order to avoid mix use with plain enum. >=20 > Reviewed by: > Differential Revision: https://reviews.freebsd.org/D39031 > --- > sys/sys/types.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/sys/sys/types.h b/sys/sys/types.h > index 0846f2a57670..c6f7abe1f524 100644 > --- a/sys/sys/types.h > +++ b/sys/sys/types.h > @@ -347,6 +347,18 @@ __makedev(int _Major, int _Minor) > ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); > } >=20 > +#if (defined(__clang__) || (defined(__GNUC__) && __GNUC__ >=3D 13)) > +#define __enum_uint8_decl(name) enum enum_ ## name ## _uint8 : = uint8_t > +#define __enum_uint8(name) enum enum_ ## name ## _uint8 What happened to zlei@=E2=80=99s feedback about making it so = __enum_uint8 isn=E2=80=99t needed everywhere? Jess > +#else > +/* > + * Note: there is no real size checking here, but the code below can = be > + * removed once we require GCC 13. > + */ > +#define __enum_uint8_decl(name) enum __attribute__((packed)) enum_ ## = name ## _uint8 > +#define __enum_uint8(name) enum __attribute__((packed)) enum_ ## name = ## _uint8 > +#endif > + > /* > * These declarations belong elsewhere, but are repeated here and in > * to give broken programs a better chance of working with From nobody Wed Jul 5 15:50:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx3zM5Z7Cz4lPVr; Wed, 5 Jul 2023 15:50:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) (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 4Qx3zM3rmNz4GHg; Wed, 5 Jul 2023 15:50:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-56598263d1dso4378044eaf.0; Wed, 05 Jul 2023 08:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688572254; x=1691164254; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9gsg7IgfkA6ZNW7nO0fOmoEiP5BlnzVO4lATFdRAMRI=; b=ZO0BnBkrMFLN6SxG456NRFBmJ3GqTS457W5dMS4x/kePK4PMs4r04vWV+rrpwJH66p 2dd8X/vOROrS/pbW8oocSY7g9giC0n2LLHA9X0VvDfevkpyYU9hTey45VTTof/K2sty1 gBA+9aZ11wIRMO1g1XTIfjGDOElaUe6PQPiPg2IdK4itRxV+exv5fXt6/9HeQCToWZ+V oKAI6zoDyN3d6Wo56/0SQVakw4IqhAul9mMsZhFziNFvtg5Bmi1M5QX1AtWwUdx9GVE8 o3XU+6hDLQX6cfKmuVsGwF7e+YC67KSii2ldwwF/u0SFz/IcB3sB/Gs9wgAfaAUGZeCI AZqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688572254; x=1691164254; h=content-transfer-encoding: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=9gsg7IgfkA6ZNW7nO0fOmoEiP5BlnzVO4lATFdRAMRI=; b=Sb6Nu+eeJ5LkobVx6SjYcGNRWcJcW+AczyEllUIfgOeQ7NwmP4WA//CfV0Cn5W4Kal o0Fz154lkt7CqJJYilKhaxGYfjglUoK04rWREwRUPv5HnPbEeZMsYO/UFGNMD1afkwri z4/MTQ1j+h14WvdRIC85rMsrBOmbPzrhGU9JDdtCHsh2Bn+uUkfdM+TapPqP80KkDjwf jBAV+CYe3aMyynnnAlQLyhZkiOE0uPfJa/71TE+4wdag5nRM5kYuVWE6G0bJbTHmqjVu doP8sOw2VtXcNck3r8MMuim00VYJbDBaaUtUr526w0ETkGBbnbHQJnkYZosOSI6tYVq/ /rNQ== X-Gm-Message-State: AC+VfDyCjIPwlVe94icHCrrTTqPvpTq3Xsds5lNu4hqXWJ7LewG00Mje kg9Xch5N94fYdrEv29wRf/wikXTsd96/3At697adpe3Y X-Google-Smtp-Source: ACHHUZ5pJ8CUPwcMKcCFIegmYd8Cx4iAbAcHFBnGaVXLc5Jop/st5k3vK43FusUTjOAuCfchOM1/sJPHKDzyFoNleJU= X-Received: by 2002:a4a:5805:0:b0:565:32bc:2166 with SMTP id f5-20020a4a5805000000b0056532bc2166mr11682959oob.9.1688572253846; Wed, 05 Jul 2023 08:50:53 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:a8a:1109:0:b0:4e1:6042:cdc9 with HTTP; Wed, 5 Jul 2023 08:50:53 -0700 (PDT) In-Reply-To: <0AD6BA4D-E6B1-4C56-B7B7-A85D57188A34@freebsd.org> References: <202307051538.365FcoZR017983@gitrepo.freebsd.org> <0AD6BA4D-E6B1-4C56-B7B7-A85D57188A34@freebsd.org> From: Mateusz Guzik Date: Wed, 5 Jul 2023 17:50:53 +0200 Message-ID: Subject: Re: git: cebb8646c4ee - main - Support byte-sized enums To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Qx3zM3rmNz4GHg X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 7/5/23, Jessica Clarke wrote: > On 5 Jul 2023, at 16:38, Mateusz Guzik wrote: >> >> The branch main has been updated by mjg: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=3Dcebb8646c4ee559aedcbc1b27bf30f= aa70a1f716 >> >> commit cebb8646c4ee559aedcbc1b27bf30faa70a1f716 >> Author: Mateusz Guzik >> AuthorDate: 2023-03-12 19:29:20 +0000 >> Commit: Mateusz Guzik >> CommitDate: 2023-07-05 14:46:30 +0000 >> >> Support byte-sized enums >> >> To that end add __enum_uint8_decl and __enum_uint8. >> >> By default enums take 4 bytes, but vast majority of them have values >> which would fit in a byte. >> >> One can try to workaround the problem by using bitfields, like so: >> enum some_small_enum foo:8; >> >> but that's ugly and runs into trouble when using atomic_load (you >> can't >> take an address of a bitfield, even if it is sized to a multiply of a >> byte). >> >> Both gcc 13 and clang support specifying the size, and for older >> variants one can fallback to the "packed" attribute. >> >> Names are mangled in order to avoid mix use with plain enum. >> >> Reviewed by: >> Differential Revision: https://reviews.freebsd.org/D39031 >> --- >> sys/sys/types.h | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/sys/sys/types.h b/sys/sys/types.h >> index 0846f2a57670..c6f7abe1f524 100644 >> --- a/sys/sys/types.h >> +++ b/sys/sys/types.h >> @@ -347,6 +347,18 @@ __makedev(int _Major, int _Minor) >> ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); >> } >> >> +#if (defined(__clang__) || (defined(__GNUC__) && __GNUC__ >=3D 13)) >> +#define __enum_uint8_decl(name) enum enum_ ## name ## _uint8 : uint8_t >> +#define __enum_uint8(name) enum enum_ ## name ## _uint8 > > What happened to zlei@=E2=80=99s feedback about making it so __enum_uint8= isn=E2=80=99t > needed everywhere? > The feedback got addressed before it got issued, both in the commit message (pasted in the review) and my earlier comment. It explicitly, albeit tersely, states the point was to disallow accidental size mismatch. Here is a trivial I ran into: there was struct xvnode containing 'enum vtype vtype;' which was exported to userspace. Changing the size of the enum changed the size in struct vnode (as excpected) and uintentionally changed the size of the field in that struct xvnode as well and there was no indication of it at compilation time. (Turns out the struct was stale so it got whacked altogether btw.) Making sure a resized enum is only accessible with dedicated naming prevents the above kind of a problem from occurring and makes it clear for all consumers what size they are getting. > >> +#else >> +/* >> + * Note: there is no real size checking here, but the code below can be >> + * removed once we require GCC 13. >> + */ >> +#define __enum_uint8_decl(name) enum __attribute__((packed)) enum_ ## >> name ## _uint8 >> +#define __enum_uint8(name) enum __attribute__((packed)) enum_ ## name #= # >> _uint8 >> +#endif >> + >> /* >> * These declarations belong elsewhere, but are repeated here and in >> * to give broken programs a better chance of working with > > --=20 Mateusz Guzik From nobody Wed Jul 5 19:37:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx91F10K5z4l8QW; Wed, 5 Jul 2023 19:37: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 4Qx91F0NR0z3MmH; Wed, 5 Jul 2023 19:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688585873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MUcdnvIEHq+zjt5p/0qNDHKn2dqQW2K9ktvmdS+x56s=; b=kXQGeQbfwNbNIiWdmD6UeXj9FYbCMg18PkNDkKYmeiMSZbIXSxUpycZIrZASewMYaBzrlx dlC0/BPGhkYiGGElRFLZohpKzSaOTbfVggxtyygmr+yma8zDGe86EcwuK43tqYTH1qXMAj ndMK+vgsh/QLgLqm5cpCVbDgdxdnDEJX8vk6OLnkHEsjosf2/kE134vB6ABGjTe+Yatue7 iLe9YoMWOxDmBweXPNeJtomMea5PewEQke3Pho9djUEW3S5HwxSXs6f7gw76kvwZUDKAqa nhnrZrPXqbGaikChiTHMR6Ar2AVOLZCtv3sIx8kRsSOaoIBb4PIfbNdQ/yCyAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688585873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MUcdnvIEHq+zjt5p/0qNDHKn2dqQW2K9ktvmdS+x56s=; b=NgXOLHH65O+Mz0oYXhPUQce1+nvQa0TAP+r2kqWJ3JZFIRRFFbtVPr2rmdS6T8tMK7MGny s2IEbHaCL/jvAqCoVgqpIHtG0QsxnQ1ywIGIjtoAl35oGYjcoyu0wTKvfMgcTsXEUw7xvy Eee8IUfBhOfDymi7S67EU3i0PrQEXKVSSmDYePSVk30Otpn961TPMq2j9OmwlFau6hTUhT n/J6T9UvWK3cH0UVMvJioiBgynsHtHnmOgjIo2FwyNFf3Cbg89gnYcreOuOhIqR2y03xL0 57kxKJs09o8ImLLk4858Ki0pf/IZc/db9Pfcp9KYD4+lNtsj2/egHlZIAWk8/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688585873; a=rsa-sha256; cv=none; b=fEQupSTnfIDMq3aLEBrDQd5oJmXfVYf80BTzJOeNbe2qkAZSP/nmXgSxnCo4Z3wyBbeawz lpEOb0BX3CNHiH+caMGjkk16XahorSP+d/O78xxmw9wtKqXDjBpr2LR4lLWjYM8M0MJv4U FZU123n70RL7FmJtzpoPmm00qXaYdpdgJ4gjcGeguQNQFLzxEow4w17SasdoFlbYze//ny HL8Qek8Yp0AzasH/fPQ2uNkHd90C2GH3a8EL4hEI2M+JRp+8IKpDdSsi+hi1gso+PX8Qz4 Stoy7pUNtd1XsNwR0KMQKeJUBo5yevw8xiD+Hhc/GMQXW/MRVR7BzuIKYekkdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx91D6RyfzS3x; Wed, 5 Jul 2023 19:37: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 365JbqCR014922; Wed, 5 Jul 2023 19:37:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365JbqLT014921; Wed, 5 Jul 2023 19:37:52 GMT (envelope-from git) Date: Wed, 5 Jul 2023 19:37:52 GMT Message-Id: <202307051937.365JbqLT014921@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: 9c3478cb2263 - main - libsecureboot: do not accept certificate we cannot decode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c3478cb226385c468c0d029337f4e78e69931c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9c3478cb226385c468c0d029337f4e78e69931c8 commit 9c3478cb226385c468c0d029337f4e78e69931c8 Author: Simon J. Gerraty AuthorDate: 2023-07-05 19:37:14 +0000 Commit: Simon J. Gerraty CommitDate: 2023-07-05 19:37:14 +0000 libsecureboot: do not accept certificate we cannot decode Although we care more about the CN of a certificate than its status (for purpose of reporting), we should skip if we have errors decoding. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. --- lib/libsecureboot/vets.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c index 12191097ff8c..ca1eb12937bb 100644 --- a/lib/libsecureboot/vets.c +++ b/lib/libsecureboot/vets.c @@ -243,12 +243,10 @@ x509_cn_get(br_x509_certificate *xc, char *buf, size_t len) mc.vtable->end_cert(&mc.vtable); /* we don't actually care about cert status - just its name */ err = mc.vtable->end_chain(&mc.vtable); + (void)err; /* keep compiler quiet */ - if (!cn.status) { + if (cn.status <= 0) buf = NULL; - if (err == 0) /* keep compiler happy */ - buf = NULL; - } return (buf); } From nobody Wed Jul 5 20:01:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx9X84XYNz4lFkb; Wed, 5 Jul 2023 20:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qx9X845mBz3QmY; Wed, 5 Jul 2023 20:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zYf1gqSwSLz/FzpepEJkfxZ0OqcE5NLTVN6ta3iZoIM=; b=TTNI6YyVGwGGOKTu10y6q/gyIn9PJYQLFfzIJRdPRwToC4vHqHJssuBkhfcgu1kl0R7w3U SUZBBag8Nxt2Cr8niRJjzJ+OqUT/riSWMzCv6bYcDwQav1jLU8aKIMeg7TrZSPafxq9rJw nYgUyzaEXWzts4ugtmlrQaDgiIgPxU8OSKLUc5uGd4lOb24bJ/iVb7XHJiomI9SXUFrB41 jayssLLy149uSABwc3PUKwwVzDXj3lZlMdIgHYX5/pe4AChlNnX+5g6gttcRusKmgnxZae Uc2Q53V6gzIkQTtibWsT68ZcFJj1+cMGUzGFjImoSFC4U0U+hC/vl1fVfY70Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zYf1gqSwSLz/FzpepEJkfxZ0OqcE5NLTVN6ta3iZoIM=; b=fKn9+rzdaWpNjLTf8D88ta/C7+ChTf1L9dpPjkZkEZt70oE20c/D7uD4XYDDvGCDvkqDXR 5CvCugvOHki3n7EtbVAS7keu8GVSVKjM4mZVGzupMcnE4YHmqgexbz7xqdl+1hPF8R/zX6 jTyPVLNtj8VgKE4ERyZnQ+BAwEJI3JM/7cculPCsBDMESdDGDRmcJcY3wReL8uCNaFkOZh YP3JWzc3AFn41+Vs6JWF9dIfP3/6N5/CONDgzAOSxxXwWUcpJUYX1zjVcUnbmmcvv82YUP +WGTMXHaQfBCMwytGTf1fNVD3+YdX7sHrlEDrlYWcu3I73V6SW8oOKGD4npW0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688587272; a=rsa-sha256; cv=none; b=awfEd0qUEi7AaH+KwEg7QypCLUw6RPOP2RTxhmmsI/52+rIpMpMCu0kBaM+PGPsvQJs/to 1uYeqM74KPj1DE7acUaOZUt0R60kuAVsnlv6BKiMtcL/iUrwldFRXyCAOZHllpvhh+/vwQ SrGe4E0/5P0BPL7G7LQ5ft2YueVbWVKjooxfIg7SI5fDlftkGfs4IB8pvHg3WXj4LdXHk0 bMYZ8VsqHiZ5aes8t9VTSjnArAhoyvFW7QoPOcIUR3giFIutOmuXEQh17EPI+4NAPZyoJ5 nDxuwENBExtgKauJz5etraAc55e+brm972SrWFLmP2F0qYRzYgYgEMaDIwNlCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx9X837rYzRwv; Wed, 5 Jul 2023 20:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365K1CbI058596; Wed, 5 Jul 2023 20:01:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365K1Cpf058595; Wed, 5 Jul 2023 20:01:12 GMT (envelope-from git) Date: Wed, 5 Jul 2023 20:01:12 GMT Message-Id: <202307052001.365K1Cpf058595@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: 87e08018b175 - main - libcrypto: add missing symbols to the legacy provider List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87e08018b175e564b6a19ee41bc65af66f55e078 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=87e08018b175e564b6a19ee41bc65af66f55e078 commit 87e08018b175e564b6a19ee41bc65af66f55e078 Author: Pierre Pronchery AuthorDate: 2023-06-29 21:32:59 +0000 Commit: Mark Johnston CommitDate: 2023-07-05 20:00:53 +0000 libcrypto: add missing symbols to the legacy provider OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. One such provider, "legacy", ships with OpenSSL 3 directly, and groups obsoleted algorithms that can still optionally be used anyway. The import of OpenSSL 3.0.9 was building this provider incorrectly, missing symbols required for proper operation. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- secure/lib/libcrypto/modules/Makefile.inc | 3 ++- secure/lib/libcrypto/modules/legacy/Makefile | 34 +++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc index e2f8e9437953..9047c938ef1d 100644 --- a/secure/lib/libcrypto/modules/Makefile.inc +++ b/secure/lib/libcrypto/modules/Makefile.inc @@ -11,6 +11,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include .include -.PATH: ${LCRYPTO_SRC}/providers +.PATH: ${LCRYPTO_SRC}/providers \ + ${LCRYPTO_SRC}/providers/common WARNS?= 0 diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index 3ed4bed6cd52..3eef2549d44f 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -2,6 +2,38 @@ SHLIB_NAME?= legacy.so -SRCS= legacyprov.c +SRCS= legacyprov.c prov_running.c + +# common +SRCS+= provider_err.c provider_ctx.c +SRCS+= provider_util.c + +# ciphers +SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ + ciphercommon_gcm.c ciphercommon_gcm_hw.c \ + ciphercommon_ccm.c ciphercommon_ccm_hw.c +SRCS+= cipher_desx.c cipher_desx_hw.c cipher_des.c cipher_des_hw.c +SRCS+= cipher_tdes_common.c +SRCS+= cipher_blowfish.c cipher_blowfish_hw.c +SRCS+= cipher_cast5.c cipher_cast5_hw.c +SRCS+= cipher_rc2.c cipher_rc2_hw.c +SRCS+= cipher_rc4.c cipher_rc4_hw.c +SRCS+= cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c +SRCS+= cipher_seed.c cipher_seed_hw.c + +# digests +SRCS+= digestcommon.c +SRCS+= md4_prov.c wp_prov.c ripemd_prov.c + +# kdfs +SRCS+= pbkdf1.c + +# ssl +SRCS+= record/tls_pad.c .include + +.PATH: ${LCRYPTO_SRC}/providers/implementations/ciphers \ + ${LCRYPTO_SRC}/providers/implementations/digests \ + ${LCRYPTO_SRC}/providers/implementations/kdfs \ + ${LCRYPTO_SRC}/ssl From nobody Wed Jul 5 20:01:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx9X95kpCz4lFcq; Wed, 5 Jul 2023 20:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qx9X94wvFz3QkV; Wed, 5 Jul 2023 20:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h0C6/0J26eBPZgx9hRp4Yi04GFvn2G9mJ+3vMaS4JXY=; b=GKClVnyBGREl9Hfs9J6IAt9FwYBeY+XSb0B6aMHkuHwHysevlqzkyVXlUNdAeIfcgGZZN0 YW0NXfRRs97xZWiVeX7IeerjUXbERrENZmLwWxeDwre7lFZ8yBajsNmYkmiRjCweEdjZkQ 3O9vb3X9hQ6JlLx9e9VXpFZZm2qwhU4q4pA6arSHZQZWTJt6HSMpxHfWSrIUx1r95Fjp6N tI4ksJL5mrkipsoxZLVyUFjUJ5VvECOfqwiMnkY0VXJE2jPBwqvLj+IeYkZYsQQTNNEieC ZFTlymJ/iJH1fpYKkisMEuEERHu1hv20rEvld6XeLO5aQy1grvDfo0ZeEmziQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h0C6/0J26eBPZgx9hRp4Yi04GFvn2G9mJ+3vMaS4JXY=; b=PNteBI4l6ZhqYznArAmfd/fAb+6uivqadUDmIW5yP2lNmqt73n4eplgHjOE2/mD+xLGjSD pYPNpmTO6Fv9Vt71mnl/cCQM9DK1cePokCVGHOKuz/qNRVEBveeV4ywE6AOvncNLzBdify /L4iLph310XbkhSp2A4MSINOQCUAIZcM0niKuj3N6fTVJ9sbCgDgtqlb/z+ZmfVTQdAQRq 7mOEFEQBQ6K20DHi/ucq2MVU1l9QkdYa0reu/xX7YhjKQOUZwoPKMKzlDChqmsgHKDYEjB I2pNEyJuD0yxDGbZ3uXSOZ1V91BgIV/hvAQF0ZjVhDjvgxEnHUofdecCFPc7Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688587273; a=rsa-sha256; cv=none; b=QvjGrVNInTU6grwm7pQ2FRQ2BA7sXpzBBM3hvEmuVVIkUTiartnnUWASdoO+H8kbGICtNp kXnVZjZ9QN4GwpvHBT4zEj4wR1Ot4XroognV5g20UNM07d17fLmlxgjbp900DlsA8lMWwV eON6U90/eGozaEC1kSw1BA7gfKubsxvx8NRG/+/vh9v///esO78dXgB8304wwxcfRipF91 +rVxzdvvjPsrF1a2mm3CpskXFsgFpIN8zOIcL223OzymC40piee3KuaCq3NeycLLXHz/rq jAHQQ2IIRSJFZHyMWbowg07kgNO0dPOyocXOcs0dqTEG46UgRPK4a84H6c3PuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx9X942DzzSYS; Wed, 5 Jul 2023 20:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365K1DM6058628; Wed, 5 Jul 2023 20:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365K1Dnw058627; Wed, 5 Jul 2023 20:01:13 GMT (envelope-from git) Date: Wed, 5 Jul 2023 20:01:13 GMT Message-Id: <202307052001.365K1Dnw058627@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: 7a991ecd1a26 - main - libcrypto: add missing symbols to the fips provider List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a991ecd1a260c2e2a4e37317f1f478723d60926 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7a991ecd1a260c2e2a4e37317f1f478723d60926 commit 7a991ecd1a260c2e2a4e37317f1f478723d60926 Author: Pierre Pronchery AuthorDate: 2023-06-29 22:24:33 +0000 Commit: Mark Johnston CommitDate: 2023-07-05 20:00:54 +0000 libcrypto: add missing symbols to the fips provider OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. One such provider, "fips", ships with OpenSSL 3 directly, and groups algorithms that can be FIPS 140-2 validated. The import of OpenSSL 3.0.9 was building this provider incorrectly, missing symbols required for proper operation. In addition, without the change in OpenSSL's crypto/bn/bn_const.c, the FIPS module fails loading: `Undefined symbol "ossl_bignum_modp_1536_p"`. This change is consistent with crypto/bn/bn_dh.c though. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- crypto/openssl/crypto/bn/bn_const.c | 2 + secure/lib/libcrypto/modules/fips/Makefile | 356 ++++++++++++++++++++++++++++- 2 files changed, 357 insertions(+), 1 deletion(-) diff --git a/crypto/openssl/crypto/bn/bn_const.c b/crypto/openssl/crypto/bn/bn_const.c index a36e0ac792dd..bc7ede575d62 100644 --- a/crypto/openssl/crypto/bn/bn_const.c +++ b/crypto/openssl/crypto/bn/bn_const.c @@ -82,10 +82,12 @@ BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn) * RFC2312 specifies a generator of 22. */ +#ifndef FIPS_MODULE BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn) { return COPY_BN(bn, ossl_bignum_modp_1536_p); } +#endif /*- * "2048-bit MODP Group" from RFC3526, Section 3. diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 46c5ec2a091f..84123381bb1d 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -2,9 +2,363 @@ SHLIB_NAME?= fips.so +CFLAGS+= -DFIPS_MODULE + SRCS= fips_entry.c fipsprov.c self_test.c self_test_kats.c +# XXX from secure/lib/libcrypto/Makefile.inc +.include + +#.include +# +#.if ${TARGET_ENDIANNESS} == 1234 +#CFLAGS+= -DL_ENDIAN +#.elif ${TARGET_ENDIANNESS} == 4321 +#CFLAGS+= -DB_ENDIAN +#.endif + +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" +ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ + ${MACHINE_ARCH} == "powerpc64le" +ASM_${MACHINE_ARCH}= +.endif + +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) +CFLAGS+= -DOPENSSL_CPUID_OBJ +.if defined(ASM_aarch64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_amd64) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_arm) +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DBSAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_i386) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DRMD160_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DWHIRLPOOL_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.elif defined(ASM_powerpc64le) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.endif +.endif + +# crypto +SRCS+= provider_core.c provider_predefined.c \ + core_fetch.c core_algorithm.c core_namemap.c self_test_core.c + +# crypto/ec +SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ + ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ + ec2_smpl.c \ + ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ + ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ + curve448/f_generic.c curve448/scalar.c \ + curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ + ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ + curve448/arch_32/f_impl32.c +SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ + threads_pthread.c threads_none.c initthread.c \ + context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ + param_build_set.c der_writer.c threads_lib.c params_dup.c + +SRCS+= cpuid.c ctype.c +.if defined(ASM_aarch64) +SRCS+= arm64cpuid.S armcap.c +ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto +.elif defined(ASM_amd64) +SRCS+= x86_64cpuid.S +.elif defined(ASM_arm) +SRCS+= armv4cpuid.S armcap.c +.elif defined(ASM_i386) +SRCS+= x86cpuid.S +.elif defined(ASM_powerpc) +SRCS+= ppccpuid.S ppccap.c +.elif defined(ASM_powerpc64) +SRCS+= ppccpuid.S ppccap.c +.elif defined(ASM_powerpc64le) +SRCS+= ppccpuid.S ppccap.c +.else +SRCS+= mem_clr.c +.endif + +# crypto/bn +SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \ + bn_mod.c bn_conv.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ + bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_sqr.c \ + bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \ + bn_intern.c bn_dh.c bn_rsa_fips186_4.c bn_const.c +.if defined(ASM_aarch64) +SRCS+= armv8-mont.S bn_asm.c +.elif defined(ASM_amd64) +SRCS+= rsaz-avx2.S rsaz-avx512.S rsaz-x86_64.S rsaz_exp.c rsaz_exp_x2.c +SRCS+= x86_64-gcc.c x86_64-gf2m.S x86_64-mont.S x86_64-mont5.S +.elif defined(ASM_arm) +SRCS+= armv4-gf2m.S armv4-mont.S bn_asm.c +.elif defined(ASM_i386) +SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S +.elif defined(ASM_powerpc) +SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S +.elif defined(ASM_powerpc64) +SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S +.elif defined(ASM_powerpc64le) +SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S +.else +SRCS+= bn_asm.c +.endif + +# crypto/dh +SRCS+= dh_lib.c dh_key.c dh_group_params.c dh_check.c dh_backend.c dh_gen.c \ + dh_kdf.c + +# crypto/dsa +SRCS+= dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \ + dsa_key.c dsa_backend.c dsa_gen.c + +# crypto/ec +.if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} +SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c +.endif +.if defined(ASM_aarch64) +SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c +.elif defined(ASM_amd64) +SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S +.elif defined(ASM_arm) +SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c +.elif defined(ASM_i386) +SRCS+= ecp_nistz256-x86.S ecp_nistz256.c +.elif defined(ASM_powerpc64) +SRCS+= ecp_nistp521-ppc64.S ecp_nistz256-ppc64.S ecp_nistz256.c ecp_ppc.c x25519-ppc64.S +.elif defined(ASM_powerpc64le) +SRCS+= ecp_nistp521-ppc64.S ecp_nistz256-ppc64.S ecp_nistz256.c ecp_ppc.c x25519-ppc64.S +.endif + +# crypto/evp +SRCS+= digest.c evp_enc.c evp_lib.c evp_fetch.c evp_utils.c \ + mac_lib.c mac_meth.c keymgmt_meth.c keymgmt_lib.c kdf_lib.c kdf_meth.c \ + m_sigver.c pmeth_lib.c signature.c p_lib.c pmeth_gn.c exchange.c \ + evp_rand.c asymcipher.c kem.c dh_support.c ec_support.c pmeth_check.c + +# crypto/ffc +SRCS+= ffc_params.c ffc_params_generate.c ffc_key_generate.c \ + ffc_params_validate.c ffc_key_validate.c ffc_backend.c \ + ffc_dh.c + +# crypto/lhash +SRCS+= lhash.c + +# crypto/property +SRCS+= property_string.c property_parse.c property_query.c property.c defn_cache.c + +# crypto/rsa +SRCS+= rsa_ossl.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_pk1.c \ + rsa_none.c rsa_oaep.c rsa_chk.c rsa_pss.c rsa_x931.c rsa_crpt.c \ + rsa_sp800_56b_gen.c rsa_sp800_56b_check.c rsa_backend.c \ + rsa_mp_names.c rsa_schemes.c +SRCS+= rsa_acvp_test_params.c + +# crypto/sha +SRCS+= sha1dgst.c sha256.c sha512.c sha3.c +.if defined(ASM_aarch64) +SRCS+= keccak1600-armv8.S sha1-armv8.S sha256-armv8.S sha512-armv8.S +.elif defined(ASM_amd64) +SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S +SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S +.elif defined(ASM_arm) +SRCS+= keccak1600-armv4.S sha1-armv4-large.S sha256-armv4.S sha512-armv4.S +.elif defined(ASM_i386) +SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S +.elif defined(ASM_powerpc) +SRCS+= keccak1600.c sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S +.elif defined(ASM_powerpc64) +SRCS+= keccak1600-ppc64.S sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S +.elif defined(ASM_powerpc64le) +SRCS+= keccak1600-ppc64.S sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S +.else +SRCS+= keccak1600.c +.endif + +# common +SRCS+= provider_err.c provider_ctx.c +SRCS+= provider_util.c capabilities.c bio_prov.c digest_to_nid.c \ + securitycheck.c provider_seeding.c +SRCS+= securitycheck_fips.c + +# common/der +SRCS+= der_rsa_gen.c der_rsa_key.c +SRCS+= der_rsa_sig.c + +SRCS+= der_dsa_gen.c der_dsa_key.c +SRCS+= der_dsa_sig.c + +SRCS+= der_ec_gen.c der_ec_key.c +SRCS+= der_ec_sig.c + +SRCS+= der_ecx_gen.c der_ecx_key.c + +SRCS+= der_wrap_gen.c + +# asymciphers +SRCS+= rsa_enc.c + +# ciphers +SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ + ciphercommon_gcm.c ciphercommon_gcm_hw.c \ + ciphercommon_ccm.c ciphercommon_ccm_hw.c +SRCS+= cipher_aes.c cipher_aes_hw.c \ + cipher_aes_xts.c cipher_aes_xts_hw.c \ + cipher_aes_gcm.c cipher_aes_gcm_hw.c \ + cipher_aes_ccm.c cipher_aes_ccm_hw.c \ + cipher_aes_wrp.c \ + cipher_aes_cbc_hmac_sha.c \ + cipher_aes_cbc_hmac_sha256_hw.c cipher_aes_cbc_hmac_sha1_hw.c \ + cipher_cts.c +SRCS+= cipher_aes_xts_fips.c +SRCS+= cipher_tdes.c cipher_tdes_common.c cipher_tdes_hw.c + +# digests +SRCS+= digestcommon.c +SRCS+= sha2_prov.c +SRCS+= sha3_prov.c + +# exchange +SRCS+= dh_exch.c +SRCS+= ecx_exch.c +SRCS+= ecdh_exch.c +SRCS+= kdf_exch.c + +# kdfs +SRCS+= tls1_prf.c +SRCS+= hkdf.c +SRCS+= kbkdf.c +SRCS+= pbkdf2.c +SRCS+= pbkdf2_fips.c +SRCS+= sskdf.c +SRCS+= sshkdf.c +SRCS+= x942kdf.c + +# kem +SRCS+= rsa_kem.c + +# keymgmt +SRCS+= dh_kmgmt.c +SRCS+= dsa_kmgmt.c +SRCS+= ec_kmgmt.c +SRCS+= ecx_kmgmt.c +SRCS+= kdf_legacy_kmgmt.c +SRCS+= mac_legacy_kmgmt.c +SRCS+= rsa_kmgmt.c + +# macs +SRCS+= gmac_prov.c +SRCS+= hmac_prov.c +SRCS+= kmac_prov.c +SRCS+= cmac_prov.c + +# rands +SRCS+= drbg.c test_rng.c drbg_ctr.c drbg_hash.c drbg_hmac.c crngt.c + +# signature +SRCS+= dsa_sig.c +SRCS+= eddsa_sig.c ecdsa_sig.c +SRCS+= mac_legacy_sig.c +SRCS+= rsa_sig.c + +# ssl +SRCS+= record/tls_pad.c s3_cbc.c + .include +.if defined(ASM_${MACHINE_CPUARCH}) +.PATH: ${SRCTOP}/secure/lib/libcrypto/arch/${MACHINE_CPUARCH} +.if defined(ASM_amd64) +.PATH: ${LCRYPTO_SRC}/crypto/bn/asm +.endif +.elif defined(ASM_${MACHINE_ARCH}) +.PATH: ${SRCTOP}/secure/lib/libcrypto/arch/${MACHINE_ARCH} +.endif + .PATH: ${LCRYPTO_SRC}/crypto \ - ${LCRYPTO_SRC}/providers/fips + ${LCRYPTO_SRC}/crypto/bio \ + ${LCRYPTO_SRC}/crypto/bn \ + ${LCRYPTO_SRC}/crypto/dh \ + ${LCRYPTO_SRC}/crypto/dsa \ + ${LCRYPTO_SRC}/crypto/ec \ + ${LCRYPTO_SRC}/crypto/evp \ + ${LCRYPTO_SRC}/crypto/ffc \ + ${LCRYPTO_SRC}/crypto/lhash \ + ${LCRYPTO_SRC}/crypto/property \ + ${LCRYPTO_SRC}/crypto/rsa \ + ${LCRYPTO_SRC}/crypto/sha \ + ${LCRYPTO_SRC}/providers/fips \ + ${LCRYPTO_SRC}/providers/common/der \ + ${LCRYPTO_SRC}/providers/implementations/asymciphers \ + ${LCRYPTO_SRC}/providers/implementations/ciphers \ + ${LCRYPTO_SRC}/providers/implementations/digests \ + ${LCRYPTO_SRC}/providers/implementations/exchange \ + ${LCRYPTO_SRC}/providers/implementations/kdfs \ + ${LCRYPTO_SRC}/providers/implementations/kem \ + ${LCRYPTO_SRC}/providers/implementations/keymgmt \ + ${LCRYPTO_SRC}/providers/implementations/macs \ + ${LCRYPTO_SRC}/providers/implementations/rands \ + ${LCRYPTO_SRC}/providers/implementations/signature \ + ${LCRYPTO_SRC}/ssl From nobody Wed Jul 5 20:01:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx9XB6MYFz4lFWv; Wed, 5 Jul 2023 20:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qx9XB5s2Qz3QMr; Wed, 5 Jul 2023 20:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWPOa+cE5roT5D8GPvuIQ37tdKBtx/nQXPm13y32kSE=; b=RClFk8U2y9KxYIWS75U0h5iMM2fR2HzFhayPg660OT5JUyDJUYKPTel3iDSnKaQQL0OUgh TsRo2dx4MKiRln4JYKirQ5YZ19/vvsNCSWLe3jcJH1tt8kf5zrObYDsT6p8CFm0vH7caH0 GTO1sMWDLpX1qCvwweFGrQ8lcj5sRkhzuE00rJasXADswHJUIyX3g+MEpIUu2h9q47FjfP 8oxWn1Zd58b7KtE+k1OvyymiAFaMb22ZvtnFjtdOuABBPmSy2sDpZsXRVSV2yonQofBV66 olFR9pOpBiffeQ2YJHf7bxe4mKO/hQQvH9jXlSXt+BND1fH3k+RGO6A9EIM2KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWPOa+cE5roT5D8GPvuIQ37tdKBtx/nQXPm13y32kSE=; b=OILpJKemPQoSPSCm6tDWlVRMS4g3Mpn4q3UFDcQsn1iePbZfkT/70BNVg3Y+XFeOb/q6+n MqWmkpSkWrR1XB+ox0y6OBqzq6LTuCIq6AdQrXF6+7uqADKvR/NAYszbouuqF8lotyV5p5 BB/Mw7w5r9mHm5t9suDuXOsiDs1vvUSkLkg1OwwiQmbySSawOmeLJPBi3TxDmtVk/h4V9r APWHBy5OuPJRwMMTCfgCcd1rj3heI8/6KteCw8cSINY9eeQzfxmAWJEEeIk8G8vMUdcuB6 aKvEZ8i8RJveW5yv6AQ4JkkP84tM/1dTrzBnAj/KwrhYyiFlCLrCylDJHhhZWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688587274; a=rsa-sha256; cv=none; b=Z76kWSqsCUyBKkOJd2R8FVaKBLulomTSYKIOOw+BkdA7lDvfWZANO/VZksfc18ghBmL/RV ReJIfDi9YK4Wp34WXGQYvea6Qg8sRiFmvSdPDKsxHDd9h8i/5OtJmLHq+OCWkJhLUv6+uo VTZgZLerZ8+6uPUoel0zoHHdd1UBKmG2vG7x3BsBplVtQnuWqbUceK1LLhX9nEHKuTH64t x7tgujB9gVg3ntFQPNN8+MkztVelr3fGOaObXyWE7c6EOJ6RNQxs7nyTMigNLpf/nE9IgM HYyHDWIo0BeANbEiraoqCN+k+mffQ9diMt+8AQKnktvd3e4EJKjCYm13Tj9FQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx9XB4yGXzShf; Wed, 5 Jul 2023 20:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365K1Eqf058656; Wed, 5 Jul 2023 20:01:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365K1EWZ058655; Wed, 5 Jul 2023 20:01:14 GMT (envelope-from git) Date: Wed, 5 Jul 2023 20:01:14 GMT Message-Id: <202307052001.365K1EWZ058655@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: 4a3cc17e3172 - main - libcrypto: expand the common Makefile for providers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a3cc17e317212d46a70ff88fd67889f06468ed5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4a3cc17e317212d46a70ff88fd67889f06468ed5 commit 4a3cc17e317212d46a70ff88fd67889f06468ed5 Author: Pierre Pronchery AuthorDate: 2023-06-30 17:20:31 +0000 Commit: Mark Johnston CommitDate: 2023-07-05 20:00:54 +0000 libcrypto: expand the common Makefile for providers OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. This change adds mandatory source files to every provider. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- secure/lib/libcrypto/modules/Makefile.inc | 4 +++- secure/lib/libcrypto/modules/fips/Makefile | 3 +-- secure/lib/libcrypto/modules/legacy/Makefile | 6 +----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc index 9047c938ef1d..6e74ff36a9cf 100644 --- a/secure/lib/libcrypto/modules/Makefile.inc +++ b/secure/lib/libcrypto/modules/Makefile.inc @@ -9,7 +9,9 @@ CFLAGS+= -I${LCRYPTO_SRC}/include CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -.include +# common +SRCS+= provider_err.c provider_ctx.c +SRCS+= provider_util.c .PATH: ${LCRYPTO_SRC}/providers \ ${LCRYPTO_SRC}/providers/common diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 84123381bb1d..510d017d27ab 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -238,8 +238,7 @@ SRCS+= keccak1600.c .endif # common -SRCS+= provider_err.c provider_ctx.c -SRCS+= provider_util.c capabilities.c bio_prov.c digest_to_nid.c \ +SRCS+= capabilities.c bio_prov.c digest_to_nid.c \ securitycheck.c provider_seeding.c SRCS+= securitycheck_fips.c diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index 3eef2549d44f..c98ca9553e20 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -2,11 +2,7 @@ SHLIB_NAME?= legacy.so -SRCS= legacyprov.c prov_running.c - -# common -SRCS+= provider_err.c provider_ctx.c -SRCS+= provider_util.c +SRCS+= legacyprov.c prov_running.c # ciphers SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ From nobody Wed Jul 5 20:01:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx9XD1Gpbz4lFYv; Wed, 5 Jul 2023 20:01: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 4Qx9XC6lydz3QyC; Wed, 5 Jul 2023 20:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qGC+HrHI65zoqTT+HfFHaUqzCSurdiikNzFqjBpR3eo=; b=i5q0dG9y0JhLPCgkkvWW4MsQTsFzPVRJOvSZKKYJ/H6HSqTG76qYhYPKJ4bbj1nQjfcE07 VOTuDBunnOErKR/zogGzbry2RTqak3r0gpRNUEEIIntGMKXQLndTKRzfgRBiut8P0GiPsJ Jhql06papM+o1Mr3tufGbWTe0uN2ghE1SkVAEJgg0hPfQeZV6/RxITkEgkZuFQMqD88zK+ wChsjw9quBfjSPAHj8BdhBcfD/6c27NbHyxFV4bNuNMLObBOc+bCP3Xa7QmREd6zvpl/gb acJn1JC1veItAj/xNfoTRUKH7vbARpWe3/FM4cbHodPygBomYAsyiFn4QbvRhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qGC+HrHI65zoqTT+HfFHaUqzCSurdiikNzFqjBpR3eo=; b=XNPMQUK8eWWLd0PyodNaICuIF8A2DwuB9AfmZ2QaTAyYyBsd+SBmGVayI7xl4SF3/XbHDG CdPTUmueUBdszQ31PFWh680XX0Ww0sOHr8pswWIIJbQVXWKAJAZvz+4wK82JQy9lY1AjLx 3GjlVxZvgHkLQEKv1XLTVzvYnORY9syS8Co+Ny+Wu4PwARSkatFkSHLAUqVDGS7hYhNvpC 6DDpXK4cDAR1+mtkv/PAoAzSHtLI6ZoaCKtT9KeeNDszdujN4QA8AYFhjDXxJHKQPxSoNe qdVt2OpdpJ3G5/rFfZUYFX3WzUu0SGwdwoDW7+4+g7HpiLguhm0V/xRe0EWvjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688587276; a=rsa-sha256; cv=none; b=fXax2/qq5y199jlvPfEIMzAMz3B9XYw3ej7g2uRrqTipw7GZseov+rjubVzGc4fLk5rgdz iRddwXL1JkYgXmNnPkzqpqEmpGJl9geTHAZX8FARRT8um/Buakj1l8QiA7IYtHAuE+KYOp yYaLGmOBmSdn3jPfs6qg8u7CUpjXb/4wzxTGXC+PpAi8oY11qdmwc9XadYZ5CHSFo9Jx1z YRmiVNzWPkuJszmYfu1JRBPUFXEUUFT05l793GPj3XdnukgdwL/S1a2MS2tnOVjxsHpJgS v7jSJsF7rsqbxBf+t0OIi1rLUW8sfjkNvJ+gomXhu3cCvEEIEustjPXBW4qoCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx9XC5slSzStq; Wed, 5 Jul 2023 20:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365K1FZn058689; Wed, 5 Jul 2023 20:01:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365K1FEe058688; Wed, 5 Jul 2023 20:01:15 GMT (envelope-from git) Date: Wed, 5 Jul 2023 20:01:15 GMT Message-Id: <202307052001.365K1FEe058688@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: 544deacc90f4 - main - libcrypto: group definitions for libcrypto and fips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 544deacc90f4f6dc93017a6e18b2fdbf3bc4e059 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=544deacc90f4f6dc93017a6e18b2fdbf3bc4e059 commit 544deacc90f4f6dc93017a6e18b2fdbf3bc4e059 Author: Pierre Pronchery AuthorDate: 2023-06-30 17:23:57 +0000 Commit: Mark Johnston CommitDate: 2023-07-05 20:00:54 +0000 libcrypto: group definitions for libcrypto and fips OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. This change makes sure the FIPS module matches build instructions used for libcrypto. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- secure/lib/libcrypto/Makefile | 10 --- secure/lib/libcrypto/Makefile.common | 112 +++++++++++++++++++++++++ secure/lib/libcrypto/Makefile.inc | 103 +---------------------- secure/lib/libcrypto/modules/fips/Makefile | 130 ++++------------------------- 4 files changed, 131 insertions(+), 224 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 28258e796984..4421ea0b0855 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -581,16 +581,6 @@ INCSDIR= ${INCLUDEDIR}/openssl LIBADD= pthread -CFLAGS+= -I${LCRYPTO_SRC}/crypto -CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 -CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 -CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes -CFLAGS+= -I${.OBJDIR} - -.if !empty(SRCS:M*.S) -ACFLAGS+= -Wa,--noexecstack -.endif - SRCS+= buildinf.h CLEANDIRS= openssl diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/Makefile.common new file mode 100644 index 000000000000..7abb73e226fd --- /dev/null +++ b/secure/lib/libcrypto/Makefile.common @@ -0,0 +1,112 @@ +# $FreeBSD$ + +.include + +.if ${TARGET_ENDIANNESS} == 1234 +CFLAGS+= -DL_ENDIAN +.elif ${TARGET_ENDIANNESS} == 4321 +CFLAGS+= -DB_ENDIAN +.endif + +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" +ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ + ${MACHINE_ARCH} == "powerpc64le" +ASM_${MACHINE_ARCH}= +.endif + +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) +CFLAGS+= -DOPENSSL_CPUID_OBJ +.if defined(ASM_aarch64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_amd64) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_arm) +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DBSAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_i386) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DRMD160_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DWHIRLPOOL_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.elif defined(ASM_powerpc64le) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.endif +.endif + +MANDIR= ${SHAREDIR}/openssl/man/man + +CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" +CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines-3\"" +CFLAGS+= -DMODULESDIR="\"${LIBDIR}/ossl-modules\"" + +CFLAGS+= -DNDEBUG + +CFLAGS+= -I${LCRYPTO_SRC}/crypto +CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 +CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 +CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes +CFLAGS+= -I${.OBJDIR} + +.if !empty(SRCS:M*.S) +ACFLAGS+= -Wa,--noexecstack +.endif diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index d995fb2a0cb2..d462d9f82857 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -14,108 +14,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/include CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -.include - -.if ${TARGET_ENDIANNESS} == 1234 -CFLAGS+= -DL_ENDIAN -.elif ${TARGET_ENDIANNESS} == 4321 -CFLAGS+= -DB_ENDIAN -.endif - -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" -ASM_${MACHINE_CPUARCH}= -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "powerpc64le" -ASM_${MACHINE_ARCH}= -.endif - -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) -CFLAGS+= -DOPENSSL_CPUID_OBJ -.if defined(ASM_aarch64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_amd64) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_arm) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DBSAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_i386) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DRMD160_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DWHIRLPOOL_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.elif defined(ASM_powerpc64le) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.endif -.endif - -.if defined(LIB) -CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" -CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines-3\"" -CFLAGS+= -DMODULESDIR="\"${LIBDIR}/ossl-modules\"" -.endif - -CFLAGS+= -DNDEBUG - -MANDIR= ${SHAREDIR}/openssl/man/man +.include "Makefile.common" .for pcfile in ${PCFILES} ${pcfile}: ${pcfile}.in diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 510d017d27ab..c8b79e3badfd 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -4,123 +4,14 @@ SHLIB_NAME?= fips.so CFLAGS+= -DFIPS_MODULE -SRCS= fips_entry.c fipsprov.c self_test.c self_test_kats.c - -# XXX from secure/lib/libcrypto/Makefile.inc -.include - -#.include -# -#.if ${TARGET_ENDIANNESS} == 1234 -#CFLAGS+= -DL_ENDIAN -#.elif ${TARGET_ENDIANNESS} == 4321 -#CFLAGS+= -DB_ENDIAN -#.endif - -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" -ASM_${MACHINE_CPUARCH}= -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "powerpc64le" -ASM_${MACHINE_ARCH}= -.endif +SRCS+= fips_entry.c fipsprov.c self_test.c self_test_kats.c -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) -CFLAGS+= -DOPENSSL_CPUID_OBJ -.if defined(ASM_aarch64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_amd64) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_arm) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DBSAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_i386) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DRMD160_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DWHIRLPOOL_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.elif defined(ASM_powerpc64le) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.endif -.endif +.include "../../Makefile.common" # crypto SRCS+= provider_core.c provider_predefined.c \ core_fetch.c core_algorithm.c core_namemap.c self_test_core.c -# crypto/ec -SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ - ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ - ec2_smpl.c \ - ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ - ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ - curve448/f_generic.c curve448/scalar.c \ - curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ - ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ - curve448/arch_32/f_impl32.c -SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ - threads_pthread.c threads_none.c initthread.c \ - context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ - param_build_set.c der_writer.c threads_lib.c params_dup.c - SRCS+= cpuid.c ctype.c .if defined(ASM_aarch64) SRCS+= arm64cpuid.S armcap.c @@ -172,9 +63,24 @@ SRCS+= dh_lib.c dh_key.c dh_group_params.c dh_check.c dh_backend.c dh_gen.c \ # crypto/dsa SRCS+= dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \ - dsa_key.c dsa_backend.c dsa_gen.c + dsa_key.c dsa_backend.c dsa_gen.c # crypto/ec +SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ + ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ + ec2_smpl.c \ + ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ + ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ + curve448/f_generic.c curve448/scalar.c \ + curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ + ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ + curve448/arch_32/f_impl32.c +SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ + threads_pthread.c threads_none.c initthread.c \ + context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ + param_build_set.c der_writer.c threads_lib.c params_dup.c + +.include .if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c .endif From nobody Wed Jul 5 21:01:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxBsb4Kc2z4lWhn; Wed, 5 Jul 2023 21:01: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 4QxBsb3nwwz3pZs; Wed, 5 Jul 2023 21:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688590883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=au+44pWJJy4zQSrtWSKbzJ+XiIzhVKHEt6GMxmYfiIo=; b=IWsF6u6mOsvL07VuVpBTrvwU3ZmVIdETzKCv+Z5TRyH86xS1pO87Mf2e58kkhkOMgbaHhA pT5+OzCIx6QPxiX2Dq5PY//0ysWkak3trkr39n5F9N4qS/AOkKI08cP9R99zUguFd5IkCl opoZpOoTY+/GiFGAayPveCeMu8csVeUngPH7NV4uJrUAPso++zw2xUFo7aOk6OKUKQMvqG o1Qy91oqXH9VK43TvSybZpAwFvApuFpPDK4FQDgr5fq3UKh4i4qRkz2bRJeMD+DYhiSLuS hwyNu/2i900sOh1wPwbLwGHoCEgawECLZVBzOaUAgoqCz6Xu9QWJdGarkeCGDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688590883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=au+44pWJJy4zQSrtWSKbzJ+XiIzhVKHEt6GMxmYfiIo=; b=hK4KxYjNDOvMCtU7L05vMvHk+is7VaSG/1vdtyy04UpmRTHxe+EWD8cIB0mnXXufvYJXKC 7nxX62c2yBbolXsxoj03Dc2CQH+6pRNkRk18wECGsYI9TSww3PsXSpaGH+qBpMnBePHeHs Ef0JHwD+Vwua7goQa8szBFYgs6J5Yq8GcYCtAuesTgaSvqyrkQM3dr60neOmGtLR9+gi/3 BpXvOW5s7kiDIJ3AmxRJoF3Ih2vMipED3/vnKq3rwsjTKerLAgNWTJ+4PbxfULpUfsS/7l UUW//V5EALOqD+tpSItQpwJUckhB4ueRGLp4IPJESJD0whV1RY5VCUXpzY++Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688590883; a=rsa-sha256; cv=none; b=PQJuVh1P6rKjjtvdSNok92kR8BVPSpvVYn3PQPfLknQJEoqP1VJ3B9w051200OSBED9SBG Trt5Gcuj5BztcIMlvLnagzqo7PqFpxbpEGJzR5ywY4Tibrey8zZffpIvO3lGbETDbawS5I Dv23iUHBeAhtqLBzmUWi35UhPxBB2VJvtzcp13aKLVrqvPUzfI0wW1Ed19CCtOrjcykm+R 697MhDQBE/H845DXrm23b5hXf8FQy+0wgzjP2AUpNSw+eA2uDNK4pW0tO8HeVeF1pBdERh RwRDLH1fb55Snwu45kNdM7pDSvT8vyfwnNxXZp79YLmLJqYVh1UPEHRClmsx0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxBsb2tHXzVLQ; Wed, 5 Jul 2023 21:01: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 365L1Nfu060543; Wed, 5 Jul 2023 21:01:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365L1NBW060542; Wed, 5 Jul 2023 21:01:23 GMT (envelope-from git) Date: Wed, 5 Jul 2023 21:01:23 GMT Message-Id: <202307052101.365L1NBW060542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: d63909d243cb - stable/13 - release: allow VM_EXTRA_PACKAGES to be specified in the environment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d63909d243cb07904b8df2248ee27b99f1bf458a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=d63909d243cb07904b8df2248ee27b99f1bf458a commit d63909d243cb07904b8df2248ee27b99f1bf458a Author: Brad Davis AuthorDate: 2021-08-09 16:31:51 +0000 Commit: Glen Barber CommitDate: 2023-07-05 20:59:47 +0000 release: allow VM_EXTRA_PACKAGES to be specified in the environment This is useful for adding extra packages to the build of an AMI. For example: env VM_EXTRA_PACKAGES="zsh" make -C release ec2ami (cherry picked from commit 83952a5baa337cc257858feb4886d947ba1a60e3) --- release/tools/azure.conf | 2 +- release/tools/ec2.conf | 4 +++- release/tools/gce.conf | 7 ++++--- release/tools/vagrant.conf | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/release/tools/azure.conf b/release/tools/azure.conf index 60076984b1bd..c88651a07745 100644 --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -6,7 +6,7 @@ # Set to a list of packages to install. # Example: #export VM_EXTRA_PACKAGES="www/apache24" -export VM_EXTRA_PACKAGES="sysutils/azure-agent" +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} sysutils/azure-agent" # Set to a list of third-party software to enable in rc.conf(5). # Example: diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index d44fe9ff2f27..a07e6b65f519 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -6,7 +6,9 @@ # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap further # package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client ebsnvme-id" +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ + firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client \ + ebsnvme-id" # Include the amazon-ssm-agent package in amd64 images, since some users want # to be able to use it on systems which are not connected to the Internet. diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 0dd00f020110..1acd789a88e6 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -7,9 +7,10 @@ export VMSIZE=20g # Set to a list of packages to install. -export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ - google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \ - lang/python lang/python2 lang/python3" +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} firstboot-freebsd-update \ + firstboot-pkgs \ google-cloud-sdk panicmail sudo \ + sysutils/py-google-compute-engine lang/python lang/python2 \ + lang/python3" # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="ntpd sshd growfs \ diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index 05e7052d46c4..ebf69338b7d7 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -8,7 +8,8 @@ export VMSIZE=8g # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap. -export VM_EXTRA_PACKAGES="shells/bash firstboot-freebsd-update firstboot-pkgs" +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} shells/bash \ + firstboot-freebsd-update firstboot-pkgs" # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="firstboot_freebsd_update firstboot_pkgs growfs" From nobody Wed Jul 5 21:01:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxBsc5Yr4z4lX1T; Wed, 5 Jul 2023 21:01: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 4QxBsc4k4Rz3pvf; Wed, 5 Jul 2023 21:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688590884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IENqs0tWfz8iS3vLr5pZFNYdgERD6zyjvj4wOCDOYaw=; b=q2rJfZBxr/+hm5AA5Oi7vxuABMK6vhAqdVRyIOsjQSJ6cPQaMEp9VRvUjb+tZLCMesPYNw Dl5qk3x6n1yRLT7zOnr4CcBCLGnX+KvwAVyzXuMWVN2FAv1/arj3iXRwrnNHSxMIxNtnrK Ce2ms6KpmmHJMh/9ud1YWz5CoBdfoLJSxNv0F7S5Hl5b8Y85D8aHj+GGG+jgacMDnGphYi 2z2+iuo99u7IbuCO2QuV7QffZogVas16CRojpjYD7uZ2smnTe+FZcWQTFCMBl7aqYZIuZe rmi2lBKAjClIIAS3WwJWrKZEHqxyALs0iR/Z3kKuGj34HmFulPt9Q2wWV4/lLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688590884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IENqs0tWfz8iS3vLr5pZFNYdgERD6zyjvj4wOCDOYaw=; b=kUiH6VcyWiqXJl/XX1xttvvuxIbdQPWiPgQsRWsSnPmfx0lB7jp9jmwPwEToSuLxcbmY/o JjhmwSUSbCvFWg6tuIWMujcMD7KUNBVorOyZmlepX/u+lQqsxYZRaaJV/NTeftHzMGDAIv k5gdSuSRFWsOqxEhNUqY7UVnwDt5bm3DE06deM5eWTZ0uJfKbSd/Pa6iRaD0u5x2ta8Z1X 8VSLdYZRwmZtOWuJ21MRdr2S0+dsTw+kLiDn/tyUgzw2P5SoMYf/c6PphYlE1eG6Ea5sr0 9wL9wexFymKzDYhs/Cg+XQXjRccLyQbCLoNmalUaW5DA56i0pSOWoxoStZefTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688590884; a=rsa-sha256; cv=none; b=kaCwVnif6fMGKnso5co+t5nUOthHr/8yr99rqAfkDwMqv6cll6cNib0VqYjhliJMnaY6fk QIOMpu18r2O8KE+1Y8nN+I7jf+NwdGljRxNxOfaY5pEV+DX9CqXKbjaaAgYswEM3e/jtYu BxhkycmxGoPGT/ORXLHlhUyLpBUmTNPir+Oi/5UmSxl5XtndfMl2PfX0iJxeq0e2rOFNQv SGb+OLkdVIg2uu1dyS7cETn26mL/NY3vMFxv+lfsSR7M2mtIWhOM4SrZBns+aA7lmnb5C7 w9B49SfLHaHvxvxaxLU5bknaoxWh3KA/ozrxaz4A87RyEctxFHEDygiODyJ5vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxBsc3nVYzVFW; Wed, 5 Jul 2023 21:01: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 365L1OVE060562; Wed, 5 Jul 2023 21:01:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365L1OeF060561; Wed, 5 Jul 2023 21:01:24 GMT (envelope-from git) Date: Wed, 5 Jul 2023 21:01:24 GMT Message-Id: <202307052101.365L1OeF060561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 32beaf6d4dc5 - stable/13 - release: update GCE configuration for python3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 32beaf6d4dc5c380545cb05c8684f330bb4770d6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=32beaf6d4dc5c380545cb05c8684f330bb4770d6 commit 32beaf6d4dc5c380545cb05c8684f330bb4770d6 Author: Glen Barber AuthorDate: 2023-07-03 19:28:33 +0000 Commit: Glen Barber CommitDate: 2023-07-05 21:00:05 +0000 release: update GCE configuration for python3 Reported by: asomers PR: 272354 Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd (cherry picked from commit 3f21d3e0babacabb9a32e0e9a8ab290025d5577c) --- release/tools/gce.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 1acd789a88e6..725709e3f335 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -9,7 +9,7 @@ export VMSIZE=20g # Set to a list of packages to install. export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} firstboot-freebsd-update \ firstboot-pkgs \ google-cloud-sdk panicmail sudo \ - sysutils/py-google-compute-engine lang/python lang/python2 \ + sysutils/py-google-compute-engine lang/python \ lang/python3" # Set to a list of third-party software to enable in rc.conf(5). From nobody Wed Jul 5 21:01:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxBsm6THbz4lWsl; Wed, 5 Jul 2023 21:01: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 4QxBsm61cfz3qDc; Wed, 5 Jul 2023 21:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688590892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dT5B5j0Qc+Vpe4lGb5fo1my7E7jchBLrvYIg/vaS8v4=; b=Yjur36LURHpes/sSQe1vv+4vId45vrhnzvnY6HG22NXWp/VxYeZL+cI7VQs+3ermB6/Xup U+WMEDKQN3rokHvz/apyjDms23Md1pJZiE294Lvee7J0bofU/ckopxjUW4Prq2r1S9HuMi 5eO3PLtdXGw4NqCWj8b3sik5dcD4rVtFfrOcIpid9IUU/s3ovkWJqtwquM3LuRi6xHhnAQ H8aP//56Tuh1qMAoywTLGbaq7UOVx+T7a5yk+17BDQ0ntE5mN17UZv3Nb5sRdoDvcv2cnX xmN4EP5kYHjq1rA+i0NqSTZWiy/ZrQdNv0pek2pbnUDyY9CUm324Yg6OW4RM2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688590892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dT5B5j0Qc+Vpe4lGb5fo1my7E7jchBLrvYIg/vaS8v4=; b=PJKxxZ86+E4CewzyY+OH7qRnv2VQPXphVATGKaViSb6CFrmZbtAF3aEwgKbElPlbweOoeo PvRbzPsHP6onA7mkY5vXc6JVNT8/Kn/f0aXtDLlNd8cPZQa5ykP6WsA+fdChhF3oPQm4ps Eqq8AKDyqTjXiz7H3S8IDdujQyYHWL/5Yn8cN7znuCTlUZ3Eu6vOa4F/sE0yIAhA9Go77X 0CJlLXhQoC5sPwMTAW/N4N3xs7C/0DzdX0saFOmyngfQ3w0EnDmB1M06n601nXvyaUp2Ge F7gscfXJhZ6v2c7pquuE6AaHM4Z82fktc5uhvQVG5XWcDVOo6KXP6AE9PpqS9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688590892; a=rsa-sha256; cv=none; b=WJ6kEj3Mf5Zvl+8czHSwCC/ceE+Jjram4xFDcPceNchfGz5lXoD1agfeIMUaezLlFFqlVE G4E+O862oBh/mRhemkOlND8YAe3DKWLofxgQL6DvM3KsHiC/tbgM7+1ygZIoyS714KIvPP rZFUzDN5BnrxDmfwrFn1ph5QQDhDTLcDN0/PVoYdRlYY21hgguAXzmleZM2JEslzdh4Z4J P85VlU8MRbg6pAgHJK5L/71RgX9JZTin6sHn3YZeUe2wZcCyAQrmd5tCuNSWXK/i2rxLOF LpwkTq+0aiEh+9nC1YSzmp79SUcauUm8TIH44+xhvZRZb1JAeMr24+sEfceNRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxBsm57S1zVLf; Wed, 5 Jul 2023 21:01: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 365L1WAI060699; Wed, 5 Jul 2023 21:01:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365L1WYx060698; Wed, 5 Jul 2023 21:01:32 GMT (envelope-from git) Date: Wed, 5 Jul 2023 21:01:32 GMT Message-Id: <202307052101.365L1WYx060698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 6dd5f0231324 - stable/12 - release: allow VM_EXTRA_PACKAGES to be specified in the environment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6dd5f023132433801caf18db85f1b9f0f9bb9a7b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=6dd5f023132433801caf18db85f1b9f0f9bb9a7b commit 6dd5f023132433801caf18db85f1b9f0f9bb9a7b Author: Brad Davis AuthorDate: 2021-08-09 16:31:51 +0000 Commit: Glen Barber CommitDate: 2023-07-05 21:00:20 +0000 release: allow VM_EXTRA_PACKAGES to be specified in the environment This is useful for adding extra packages to the build of an AMI. For example: env VM_EXTRA_PACKAGES="zsh" make -C release ec2ami (cherry picked from commit 83952a5baa337cc257858feb4886d947ba1a60e3) --- release/tools/azure.conf | 2 +- release/tools/ec2.conf | 4 +++- release/tools/gce.conf | 7 ++++--- release/tools/vagrant.conf | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/release/tools/azure.conf b/release/tools/azure.conf index 60076984b1bd..c88651a07745 100644 --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -6,7 +6,7 @@ # Set to a list of packages to install. # Example: #export VM_EXTRA_PACKAGES="www/apache24" -export VM_EXTRA_PACKAGES="sysutils/azure-agent" +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} sysutils/azure-agent" # Set to a list of third-party software to enable in rc.conf(5). # Example: diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 1f3b581a4f27..f1513926e681 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -6,7 +6,9 @@ # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap further # package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client ebsnvme-id" +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ + firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client \ + ebsnvme-id" # Include the amazon-ssm-agent package in amd64 images, since some users want # to be able to use it on systems which are not connected to the Internet. diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 30561acb054c..593dc398b219 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -7,9 +7,10 @@ export VMSIZE=20G # Set to a list of packages to install. -export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ - google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \ - lang/python lang/python2 lang/python3" +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} firstboot-freebsd-update \ + firstboot-pkgs \ google-cloud-sdk panicmail sudo \ + sysutils/py-google-compute-engine lang/python lang/python2 \ + lang/python3" # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="ntpd sshd growfs \ diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index c683cf7a07d2..3a4bc1896408 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -8,7 +8,8 @@ export VMSIZE=8G # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap. -export VM_EXTRA_PACKAGES="shells/bash firstboot-freebsd-update firstboot-pkgs" +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} shells/bash \ + firstboot-freebsd-update firstboot-pkgs" # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="firstboot_freebsd_update firstboot_pkgs growfs" From nobody Wed Jul 5 21:01:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxBsp0SNHz4lWwl; Wed, 5 Jul 2023 21:01: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 4QxBsn6wlpz3qV5; Wed, 5 Jul 2023 21:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688590894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=voemWHmpkhA63fNrXqhiqGz/55GDZD5TADJV1olfbPQ=; b=Ii6CeY1Q7MF5hvHvUMcSPK/Nf3srugId06yYNNn19OBHUN35E7nfnAjprbUEro+xfNEnMF +xMaA4TkwqLICRb1olmx1RtW9NfRBTW4Ol5uVIS1sJeTNeBeOrcp0zTaCUhZH0hI5XGDBJ zDBIbbnhRaNZAh9vQfAar49KPNKwyDhx4ZmejmAkHQpofgNPBFeRmZ6CtOPvluM5T2y5U5 IHl5sig1mjGlmroC/L2R5rnScFVb2V15EF5b/CpL9k5piwp4ygcLpQWvHzfug+V0gRFW3W jEknA1phQDZGb+oYHnU4INC0rY0vOavkEzk9pLJ+eG/sjYNJWIw82E2ZioI8Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688590894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=voemWHmpkhA63fNrXqhiqGz/55GDZD5TADJV1olfbPQ=; b=aNyshPjfWoN9whtVV58PBAA2qySeDe8mucmjGY5ImImbVkk0FK01pmmaVWBDMvUIPwcdBo Pu/c7A7eZmHot8sk53/in/BjvAe0c/nX3Iz2wOYQqj0leyYOwHOXnta7dbnuMFxVk4ZyBQ MElVY1G/8B51noMiyZwFaNpHXbdurbZoMZrG67V4MggKHKID6pkkErbC05OlqrtW+ivrtQ qQlUiyQ22NcjtjEe8gLxutF9xzrIhjY6QZyRWSfp4UL+w2o/k+Cv9o8+RL0mS5JbXu8EnJ wSzQTjNX1M9pbs68C626IbGWAnIlcA0XN+r8MxdqjzCUz+kqhmYzjpt+pD+cyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688590894; a=rsa-sha256; cv=none; b=GAEXV2s5f2HB/u1ywDB3IEuedWOhmbXqf0JuZjUIbBM3/TT2N2Gqz4Z0DNLdrzj1uNdFot rz/PRoVd9KrbmubV24Nhzqzx1YJTiuGcRrBOpXNL/h0hJo+dMg17dO9KrSUcPTtibDJgXD ET5+t4QrQzDfhccCn+CQuoN1Cr7z7nG2V47v/aFsv3otdg06TtLCrplOYqP/3CxmZqlCNx 87Zr+kwJszSsYTKGYJneuDHcrNmUhlX17cE9UVLDYAoccTHZCpkYQMyBXe5SjwwCqg+3W5 ih7tHuvjFTt/Hs2ERmJ2E8naaoLDxF3XvltQGrUTFr8MJBSrF0QgZJ1eEYxPlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxBsn627hzVFg; Wed, 5 Jul 2023 21:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365L1Xq3060724; Wed, 5 Jul 2023 21:01:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365L1XHC060723; Wed, 5 Jul 2023 21:01:33 GMT (envelope-from git) Date: Wed, 5 Jul 2023 21:01:33 GMT Message-Id: <202307052101.365L1XHC060723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: afbcdd6e080f - stable/12 - release: update GCE configuration for python3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: afbcdd6e080f817ed51af42ac3e645584441abdc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=afbcdd6e080f817ed51af42ac3e645584441abdc commit afbcdd6e080f817ed51af42ac3e645584441abdc Author: Glen Barber AuthorDate: 2023-07-03 19:28:33 +0000 Commit: Glen Barber CommitDate: 2023-07-05 21:00:31 +0000 release: update GCE configuration for python3 Reported by: asomers PR: 272354 Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd (cherry picked from commit 3f21d3e0babacabb9a32e0e9a8ab290025d5577c) --- release/tools/gce.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 593dc398b219..cfadbaf9413b 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -9,7 +9,7 @@ export VMSIZE=20G # Set to a list of packages to install. export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} firstboot-freebsd-update \ firstboot-pkgs \ google-cloud-sdk panicmail sudo \ - sysutils/py-google-compute-engine lang/python lang/python2 \ + sysutils/py-google-compute-engine lang/python \ lang/python3" # Set to a list of third-party software to enable in rc.conf(5). From nobody Wed Jul 5 21:55:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxD4L4Gh0z4lmbx; Wed, 5 Jul 2023 21:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QxD4L3sNGz3xTR; Wed, 5 Jul 2023 21:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688594146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F39x2McGGDiE5Mu5ixGj/Dh/Iy/rCt0h0miHARX4Xn8=; b=hCA3Sl/rsTQiDYxIzvUNOVMlm0uip7fgdkxe/zY7Ez8+FBiIaY0hMRsTmMath637f2i0w2 cRcVrmkcLwkjDGcud6algqtpdXt24FU+ITlCmhhYet1NSHDvWE/DB8pua2jjqcSzZPUFBj CVxJgHPUVG4cyvJ+uz1Kt0ZOZYC0fnLsK/EYWWpXHgJvd9zx88VwFogayiqbaaeVfQWipO bqSr63f5QZ0f26SVy/RYNFhTGLSj/GP8F+DX9qvVjGO8Pc6uXZdlb/trxkcymCP5YKC2nj 85JyTslqUBd2uWDDaewVemHTzy3KItr8jM5LLkFuRoTe4hT3PhnisfMKRXiD7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688594146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F39x2McGGDiE5Mu5ixGj/Dh/Iy/rCt0h0miHARX4Xn8=; b=PF9wPMJ4g4jQpyDDS307bB6X8zKApnHlxA55ULbea/F76pC8EAsG8IusqVpYCey5ZQohly bBK1//x8HwCJjwILIzXVhnDyIlTwa8oLClRFkIH8/Ae6xTuqL3WUO6NzOhFLyPEeNw9dPS FP1L7O6dGnNjWLsEJJUHFqM+dIlO3niM2ie65tSJ/LSijptfSnuCCfIczuCpTj32H8LMow fICiPpGJ0WNEayHcYfTgPf39LdTZcH2S7xB+UGxMKxDnpvA2EXVXQDS7Xh1o/Ib26Jalzl cI/96letxwPcLX9awX2PPGi073N8JZHOJdy8krwUy5jTdXJ6Lgvm8XmVTgprcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688594146; a=rsa-sha256; cv=none; b=T69VBQ6HeO7fQQg1VGeTOe+pMwxyqAsmlyLz8tlJxhY3iSK5pn6422Ogzge2PAtBobICVc 9thhPDB0ZhUj8pEiRTKCHmwrnOM6YntDTsH7ncIyEj9cYsiw4l0CpDgDxB39G9KRCI9tBf w/0c9t1SM6a76oR6qS847Er/LSIkDewPYYAf2LCtl5GyoBlGwzYTvi2tZLpwADDS+K4BUs yHK9QcI3x0wouJZdLkwax50DN6RfQU6Z82ITsEXvro+vCFH30naXYfgD0bx22kq7W8dr8M hDKbKsUnTBGaSdUHfdx/MAPtrdDx9Izkg0WSBfLPn7KalmDW2zzN4gRGBiKywg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxD4L2pZbzWTV; Wed, 5 Jul 2023 21:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365LtkVt045323; Wed, 5 Jul 2023 21:55:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365LtkLX045322; Wed, 5 Jul 2023 21:55:46 GMT (envelope-from git) Date: Wed, 5 Jul 2023 21:55:46 GMT Message-Id: <202307052155.365LtkLX045322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 0724cf3862e6 - main - vfs: whack dpunlocked var in vfs_lookup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0724cf3862e6fa607efdb18df85d9ef58bfb7464 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0724cf3862e6fa607efdb18df85d9ef58bfb7464 commit 0724cf3862e6fa607efdb18df85d9ef58bfb7464 Author: Mateusz Guzik AuthorDate: 2023-07-05 21:52:07 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-05 21:55:24 +0000 vfs: whack dpunlocked var in vfs_lookup It is redundant given the bad_unlocked goto label. --- sys/kern/vfs_lookup.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 44fc91c1bd11..588ef88d24df 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -926,7 +926,6 @@ vfs_lookup(struct nameidata *ndp) int wantparent; /* 1 => wantparent or lockparent flag */ int rdonly; /* lookup read-only flag bit */ int error = 0; - int dpunlocked = 0; /* dp has already been unlocked */ int relookup = 0; /* do not consume the path component */ struct componentname *cnp = &ndp->ni_cnd; int lkflags_save; @@ -1342,10 +1341,8 @@ good: vput(dp); if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT)) panic("vp_crossmp exclusively locked or reclaimed"); - if (error != 0) { - dpunlocked = 1; - goto bad2; - } + if (error != 0) + goto bad_unlocked; ndp->ni_vp = dp = tdp; } while ((vn_irflag_read(dp) & VIRF_MOUNTPOINT) != 0); @@ -1457,8 +1454,7 @@ bad2: vrele(ndp->ni_dvp); } bad: - if (!dpunlocked) - vput(dp); + vput(dp); bad_unlocked: ndp->ni_vp = NULL; return (error); From nobody Wed Jul 5 21:56:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxD5V4kShz4lmRZ; Wed, 5 Jul 2023 21:56:46 +0000 (UTC) (envelope-from kp@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 4QxD5V48xPz3xpm; Wed, 5 Jul 2023 21:56:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688594206; 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=ngrBekppv8Wcy8i2TYS4er9ZfatBkV279p8Ge7J5Q5s=; b=ZQK3x9fIlrI5R3bxm3jiF8w+gvn/pV9x9jyGeYYnlHKAAC778JJ1GGrGeYpPnzV0Bt0qr6 iEJpg49CNs0CyfeY0CU8mN1JQobqHY6EUgESr5uO6Z6TVzvPWjlVzukafZTWB+rRS6uQcr oo4eg38kmZUykfL+O8SGsV1JhGAp5iLZ3HDQZe2Bbnd2oaY9FTVcYVL+D5vrTIitCDXeKI C794PLo2nkYuzCvVT8RlJk2LlcrnfzDWR5drC3P29If4MKPBAarlojsAnHgGuLJaL34QVu SW+AQ/6ls97nZb8bv6wvnbVt4sUsnEqDg4GemQp+CMcoTa1b6IbOByFCLy1HdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688594206; 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=ngrBekppv8Wcy8i2TYS4er9ZfatBkV279p8Ge7J5Q5s=; b=pWAqO3YTlMw3t47UuL+ayhs4WYURgM6vrMFi7NzJY89KLSehxz7DkGrzwZwCyDWOWxqW4Q 0NRdnc1Oh58H0rjhbMXXZM+pZCbLYnpXsgk5RWkpkDhhZgaaFjrbYZknVkQ9FO8hgIqxPm y74XAawcgEKtvTNOovJctS9uf2W9nw+Is1Smwc0ZTzodI1T6h9b6sWtMegEx6Kv412zMFE vFvbu/thc7MEjdO0vUZ562YYs4WQJL9DZZ7ixN4vKCoGWQVYLJB3vYvyD9ow6fYyiBeJvJ U2Mva/YH/KgVrD2A1DuEDqMNULWxuhpp425MzmYaR/OuRV0XK2Z/RriQMveqtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688594206; a=rsa-sha256; cv=none; b=L13vqMm4Znpa0eDVosuNK6TSFcmmMcp1RT0/cjBCDfdSFt6skzAIw5DoAngRQzKV0AGwrs p9bJYVCCA7CMwTP6xgeTPD7z8g/Nf0xLv3Ejqs7cRzuSRgfAGgwxFlozaNsDYZhcHaldzb AijEJgFDxKQGCLTWcyiJYp/RhUxv08qmsT6aRDZsufYyzDQQcQfxYJxih9fS0T1grV1gn1 vmNpm9nfcPNvq5GT++lz4ZhFE0OzxrS6wxv+7LZmFqdz8LOtgOUsfwnDEd6XchjPtMbUlZ iAHOFDDbt3Ct1P4c4XxeR7aq36rGlGeCFV5plHVmPm7H9bs/kZLbWVDtsr61hg== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher 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 "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QxD5V1tHrzwnm; Wed, 5 Jul 2023 21:56:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 5243B2CB62; Wed, 5 Jul 2023 23:56:43 +0200 (CEST) From: Kristof Provost To: Ed Maste Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Mark Johnston Subject: Re: git: b077aed33b7b - main - Merge OpenSSL 3.0.9 Date: Wed, 05 Jul 2023 23:56:42 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: <4FF6DBAE-F9FC-4D20-81C9-B0E0130DF06E@FreeBSD.org> In-Reply-To: <202306232319.35NNJsPv044302@gitrepo.freebsd.org> References: <202306232319.35NNJsPv044302@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_BF0CF653-7A42-42AD-AA16-BE462CEDC986_=" X-ThisMailContainsUnwantedMimeParts: N --=_MailMate_BF0CF653-7A42-42AD-AA16-BE462CEDC986_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 24 Jun 2023, at 1:19, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3Db077aed33b7b6aefca7b17ddb250c= f521f938613 > > commit b077aed33b7b6aefca7b17ddb250cf521f938613 > Merge: b08ee10c0646 b84c4564effd > Author: Pierre Pronchery > AuthorDate: 2023-06-23 22:53:35 +0000 > Commit: Ed Maste > CommitDate: 2023-06-23 22:53:36 +0000 > > Merge OpenSSL 3.0.9 > > Migrate to OpenSSL 3.0 in advance of FreeBSD 14.0. OpenSSL 1.1.1 = > (the > version we were previously using) will be EOL as of 2023-09-11. > > Most of the base system has already been updated for a seamless = > switch > to OpenSSL 3.0. For many components we've added > `-DOPENSSL_API_COMPAT=3D0x10100000L` to CFLAGS to specify the API = > version, > which avoids deprecation warnings from OpenSSL 3.0. Changes have = > also > been made to avoid OpenSSL APIs that were already deprecated in = > OpenSSL > 1.1.1. The process of updating to contemporary APIs can continue = > after > this merge. > > Additional changes are still required for libarchive and Kerberos- > related libraries or tools; workarounds will immediately follow = > this > commit. Fixes are in progress in the upstream projects and will = > be > incorporated when those are next updated. > > There are some performance regressions in benchmarks (certain = > tests in > `openssl speed`) and in some OpenSSL consumers in ports (e.g. = > haproxy). > Investigation will continue for these. > > Netflix's testing showed no functional regression and a rather = > small, > albeit statistically significant, increase in CPU consumption with > OpenSSL 3.0. > > Thanks to ngie@ and des@ for updating base system components, to > antoine@ and bofh@ for ports exp-runs and port fixes/workarounds, = > and to > Netflix and everyone who tested prior to commit or contributed to = > this > update in other ways. > > PR: 271615 > PR: 271656 [exp-run] > Relnotes: Yes > Sponsored by: The FreeBSD Foundation > It looks like we missed adding a file. Security/opensc doesn=E2=80=99t build any more: = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270076 It fails to find d2i_KeyParams when linking. The opensc code does this: #if OPENSSL_VERSION_NUMBER < 0x30000000L if (!d2i_ECParameters(&ec, &a, = (long)len)) util_fatal("cannot parse = EC_PARAMS"); EVP_PKEY_assign_EC_KEY(pkey, ec); #else if (!d2i_KeyParams(EVP_PKEY_EC, &pkey, = &a, len)) util_fatal("cannot parse = EC_PARAMS"); #endif d2i_KeyParams() appears to be new on openssl 3. It=E2=80=99s defined in = d2i_param.c, which we don=E2=80=99t build. I=E2=80=99ve tested with this = patch, and = that appears to fix things: diff --git a/secure/lib/libcrypto/Makefile = b/secure/lib/libcrypto/Makefile index 28258e796984..ef5652e8c27c 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -74,7 +74,7 @@ SRCS+=3D n_pkey.c nsseq.c p5_pbe.c p5_pbev2.c = p5_scrypt.c p8_pkey.c SRCS+=3D t_bitst.c t_pkey.c t_spki.c tasn_dec.c tasn_enc.c tasn_fre.c SRCS+=3D tasn_new.c tasn_prn.c tasn_scn.c tasn_typ.c tasn_utl.c = x_algor.c SRCS+=3D x_bignum.c x_info.c x_int64.c x_long.c x_pkey.c x_sig.c = x_spki.c -SRCS+=3D x_val.c +SRCS+=3D x_val.c d2i_param.c # async SRCS+=3D async.c async_err.c async_posix.c async_wait.c diff --git a/secure/lib/libcrypto/Version.map = b/secure/lib/libcrypto/Version.map index 421819324961..74d0b8b3cef1 100644 --- a/secure/lib/libcrypto/Version.map +++ b/secure/lib/libcrypto/Version.map @@ -3564,6 +3564,8 @@ OPENSSL_1_1_0 { d2i_IPAddressOrRange; d2i_IPAddressRange; d2i_ISSUING_DIST_POINT; + d2i_KeyParams; + d2i_KeyParams_bio; d2i_NETSCAPE_CERT_SEQUENCE; d2i_NETSCAPE_SPKAC; d2i_NETSCAPE_SPKI; Best regards, Kristof --=_MailMate_BF0CF653-7A42-42AD-AA16-BE462CEDC986_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 24 Jun 2023, at 1:19, Ed Maste wrote:

The branch main has been updated by= emaste:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3Db077aed33b7b6aefca7b17ddb250cf521f938613

commit b077aed33b7b6aefca7b17ddb250cf521f938613
Merge: b08ee10c0646 b84c4564effd
Author: Pierre Pronchery <pierre@freebsdfoundation.org>
AuthorDate: 2023-06-23 22:53:35 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-06-23 22:53:36 +0000

Merge OpenSSL 3.0.9

Migrate to OpenSSL 3.0 in advance of FreeBSD 14.0. O= penSSL 1.1.1 (the
version we were previously using) will be EOL as of 2023-09-11.

Most of the base system has already been updated for = a seamless switch
to OpenSSL 3.0. For many components we've added
`-DOPENSSL_API_COMPAT=3D0x10100000L` to CFLAGS to specify the API ver= sion,
which avoids deprecation warnings from OpenSSL 3.0. Changes have als= o
been made to avoid OpenSSL APIs that were already deprecated in OpenS= SL
1.1.1. The process of updating to contemporary APIs can continue aft= er
this merge.

Additional changes are still required for libarchive = and Kerberos-
related libraries or tools; workarounds will immediately follow this
commit. Fixes are in progress in the upstream projects and will be
incorporated when those are next updated.

There are some performance regressions in benchmarks = (certain tests in
`openssl speed`) and in some OpenSSL consumers in ports (e.g. haprox= y).
Investigation will continue for these.

Netflix's testing showed no functional regression and= a rather small,
albeit statistically significant, increase in CPU consumption with
OpenSSL 3.0.

Thanks to ngie@ and des@ for updating base system com= ponents, to
antoine@ and bofh@ for ports exp-runs and port fixes/workarounds, and= to
Netflix and everyone who tested prior to commit or contributed to thi= s
update in other ways.

PR: 271615
PR: 271656 [exp-run]
Relnotes: Yes
Sponsored by: The FreeBSD Foundation


It looks like we missed adding a file.
Security/opensc doesn=E2=80=99t build any more: https://bugs.freebsd.org/bu= gzilla/show_bug.cgi?id=3D270076

It fails to find d2i_KeyParams when linking. The opensc c= ode does this:

#i=
f OPENSSL_VERSION_NUMBER < 0x30000000L
                                if (!d2i_ECParameters(&ec, &a, (l=
ong)len))
                                        util_fatal("cannot parse EC_=
PARAMS");
                                EVP_PKEY_assign_EC_KEY(pkey, ec);
#else
                                if (!d2i_KeyParams(EVP_PKEY_EC, &pkey=
, &a, len))
                                        util_fatal("cannot parse EC_=
PARAMS");
#endif

d2i_KeyParams() appears to be new on openssl 3. It=E2=80=99= s defined in d2i_param.c, which we don=E2=80=99t build. I=E2=80=99ve test= ed with this patch, and that appears to fix things:

di=
ff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile
index 28258e796984..ef5652e8c27c 100644
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -74,7 +74,7 @@ SRCS+=3D        n_pkey.c nsseq.c p5_pbe.c p5_pbev2.c p5=
_scrypt.c p8_pkey.c
 SRCS+=3D t_bitst.c t_pkey.c t_spki.c tasn_dec.c tasn_enc.c tasn_fre.c
 SRCS+=3D tasn_new.c tasn_prn.c tasn_scn.c tasn_typ.c tasn_utl.c x_algor.=
c
 SRCS+=3D x_bignum.c x_info.c x_int64.c x_long.c x_pkey.c x_sig.c x_spki.=
c
-SRCS+=3D x_val.c
+SRCS+=3D x_val.c d2i_param.c

 # async
 SRCS+=3D async.c async_err.c async_posix.c async_wait.c
diff --git a/secure/lib/libcrypto/Version.map b/secure/lib/libcrypto/Vers=
ion.map
index 421819324961..74d0b8b3cef1 100644
--- a/secure/lib/libcrypto/Version.map
+++ b/secure/lib/libcrypto/Version.map
@@ -3564,6 +3564,8 @@ OPENSSL_1_1_0 {
         d2i_IPAddressOrRange;
         d2i_IPAddressRange;
         d2i_ISSUING_DIST_POINT;
+        d2i_KeyParams;
+        d2i_KeyParams_bio;
         d2i_NETSCAPE_CERT_SEQUENCE;
         d2i_NETSCAPE_SPKAC;
         d2i_NETSCAPE_SPKI;

Best regards,
Kristof

--=_MailMate_BF0CF653-7A42-42AD-AA16-BE462CEDC986_=-- From nobody Wed Jul 5 22:39:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxF2R34cCz4lyLh; Wed, 5 Jul 2023 22:39: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 4QxF2R2fMkz44YL; Wed, 5 Jul 2023 22:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688596751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2J8dHERqq6d3Rm1gbgKsTxIUHY4XAJ5aOg+9cQ8kUik=; b=siXKYrx2Qd1s7WS8qRp6gfINjiRUftCfse0om/5TO4Pe1V8VgwRRW/h70B9o7beDPgdHxC nzna0Ma+yEqy5Q5bQnqE1VMjf7RtgDf3h7fjduxzLk+gR1+HyVTMIgyF5EaKWTADHORbPw w0vxODIJwzpP2CqFXLgVZefl0g6gjVT4nNjP/T+HDbgbVRyizhoqYUX4iP5N6DfDEmIlw3 Uo1SS8+sP+uQYgePsaRj16eXGeij4kYswqVRm8I2psqkj3QXmYlY4hioHAxoVSn3PdydNv 9bUZc8B3wgeygAS3sOE5RYJ9Q7M7UyJvHHYOkxlaA5cH9HPoxLMDjXrzYPJsHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688596751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2J8dHERqq6d3Rm1gbgKsTxIUHY4XAJ5aOg+9cQ8kUik=; b=jfe9aqlgWM9B2IpJuxkaF+pxYEKRtdLrQcwlyMu50+SaesYUuUdTkJ5jBzXBB5KDqjXttZ RZPYwmBDhHsA1wsgmYJSJqZiVdXqskALJWbobynP0iYbvwiwI4iMngvfmNLCa4PQh0JIkD BZKuF7K/ydh9McaXn/ijLZUgqNA222SC0VMh0UnIyjR2QnGss7E2Qxar5v0D4Nsqt6vEqP Yc6laYtSYCeFFiT7L9j1l0iRiICru1ZbRBtEckSpIX01M+vNuBRCFBJJLhwU1HHI3VBWWy VhC0TlkZecUVCgwJZRpqmVcRHOjkCItmkgWm7Z+MvnnUwMMSnS86YHVuKR1Y8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688596751; a=rsa-sha256; cv=none; b=cDgFjC911Dgtq+o3LjHeHappLTVF/220kP3+ez8b/cLDt8gyl092U8hXETRkrcyPwyo9OL 6zbRC4bVV+O8Wv2LkHNBvPrSObuYUcVkChQ7F8fT8HrwXWV6sApvTEMZ4v7E4yuJja2CSf eBuD5tIABy73k1DDmPQkvRocowjFy93X0DbjYG2ymqyl0a3GKqQrox37ceXr2/vr3N6sxw EANrR5Pd2cmMuOjUlKR94F0k4dMVIgr718ioa0AVKi58wy9Mf176wjPkTMFzW6lDU+MVhM gr/gG4WPen+TxHCfIjimFfNRIvf/wjjr2gyP5GCngG0YMX8OK7To/ZWdhB80nA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxF2R1cdZzXgx; Wed, 5 Jul 2023 22:39: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 365MdBo1012197; Wed, 5 Jul 2023 22:39:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365MdB1M012196; Wed, 5 Jul 2023 22:39:11 GMT (envelope-from git) Date: Wed, 5 Jul 2023 22:39:11 GMT Message-Id: <202307052239.365MdB1M012196@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: be092bcde96b - main - Fix the zfsd_autoreplace_001_neg test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be092bcde96bdcfde9013d60e442cca023bfbd1b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=be092bcde96bdcfde9013d60e442cca023bfbd1b commit be092bcde96bdcfde9013d60e442cca023bfbd1b Author: Alan Somers AuthorDate: 2023-07-05 22:37:39 +0000 Commit: Alan Somers CommitDate: 2023-07-05 22:38:49 +0000 Fix the zfsd_autoreplace_001_neg test It only ever worked by accident. * Actually set autoreplace=off as stated in the description * Wait for the removed device to disappear from the pool before proceeding. * In the assertion, verify that the new disk does not get added, as described in the description. MFC after: 2 weeks Sponsored by: Axcient --- tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_001_neg.ksh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_001_neg.ksh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_001_neg.ksh index 9e811d06f94d..7fe855789f28 100644 --- a/tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_001_neg.ksh +++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_001_neg.ksh @@ -39,7 +39,7 @@ # ID: zfsd_autoreplace_001_neg # # DESCRIPTION: -# In a pool without the autoreplace property unset, a vdev will not be +# In a pool without the autoreplace property set, a vdev will not be # replaced by physical path # # STRATEGY: @@ -64,7 +64,7 @@ function verify_assertion { # 9. Verify that it does not get added to the pool for ((timeout=0; timeout<4; timeout=$timeout+1)); do - log_mustnot check_state $TESTPOOL $REMOVAL_DISK "ONLINE" + log_mustnot check_state $TESTPOOL $NEW_DISK "ONLINE" $SLEEP 5 done } @@ -83,9 +83,10 @@ log_must create_gnops $OTHER_DISKS for keyword in "${MY_KEYWORDS[@]}" ; do log_must create_gnop $REMOVAL_DISK $PHYSPATH log_must create_pool $TESTPOOL $keyword $ALLNOPS - log_must $ZPOOL set autoreplace=on $TESTPOOL + log_must $ZPOOL set autoreplace=off $TESTPOOL log_must destroy_gnop $REMOVAL_DISK + log_must wait_for_pool_removal 20 log_must create_gnop $NEW_DISK $PHYSPATH verify_assertion destroy_pool "$TESTPOOL" From nobody Wed Jul 5 23:02:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxFXy1l1Lz4l56f; Wed, 5 Jul 2023 23:02: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 4QxFXy1JVMz47Q1; Wed, 5 Jul 2023 23:02:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688598130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OlSv0lDJnrX1Ie8tCvJd7kwFYWoR2QXNRiTRXnt+rZE=; b=uzjXm3QBYim7j3pVmSB8ajc9LHwLITg5czVhRz6JWp3JJkOkQs03vcEaWcwb+8VZdbNeHM RisoMMjApS2xI5GOCkFtG/QI6QBKNVEVt1lrzflHD48rmhefmFqasuUmIXaF1rJF+Yzw6F Vpx/7lvTznAZvOcFP2IX9IQxoBrInCTy+Z+HEp3Qfijv4hAOJVELJoc2DwrWJ5s8kwKWZO d9oDIYDVomAWcpGLtxkn2rZT69Kz8Z2SYeijB6zmuUM+xjLo6XyvsZg+rCiYxIthxnc4TQ mxy0vZgKOU3Jrh/tIgQe4wqybxJVdwtXb9MbvdbfkV1E/PCXO4RjOdD2Wg6FYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688598130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OlSv0lDJnrX1Ie8tCvJd7kwFYWoR2QXNRiTRXnt+rZE=; b=DUhuK/8QWaMA9fEQMAgA1LSEyd6YPoTR9qON0WBcvcEGj+SunfhRgOF2dgh7oq91lY2qJ4 QK51Jp3GCR/kuMo82TSokDvN/MiGrhk2ifZpNncge+RrjJuJDigEZglbdnPhlVs2+uxFJn UGiAI97dZPGyzqLphs8+2Z8GqW+hSnMQLyXaaMjKbbNnD1xCpDWEakh0JobIo6G6Yk6K8v Jl2/piCVvFgfH9n8WmIyYdKw7KS7XzKLQn8NZFB/4YZ+u65BDTI4MUIGznrklc9iprI7ib EkfDrv04vAnBmZQlJblorMrHDtV0mf+mTdqoOb8OfpkirIPJL+8S7sPdPDMb9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688598130; a=rsa-sha256; cv=none; b=Q/qTnOX/9TBCGHnVMsi1v019G4a6V3cGsQY/xuAutZWOHVvouH8DcNe6STCTQNVgWkRtbX DEYyucUKqsFAK/vJ14iXqHuk5OTbzyITvu7K35+MORGOqU25+iJf/6ibxslH9d5M0oozKk 3vyt03Many3r7LWbgOrtgBcB9viNUt8n6/E6TY8C4ouGSxW1xNt0T/O1BPAbHy1eGBD/CW 72z2qgHcFb1Reqsq15/lWjPlyQCBVHcCxskSGms0taX2IYPHTYrnm5iCLp0X33IrLmeEyi wFM9cugVlWLbeWpFleRNzUi8OsWRidpn1EWu163ATP9zh92sH7V2bFSq10jx2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxFXy0MNCzXT6; Wed, 5 Jul 2023 23:02: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 365N29gd060298; Wed, 5 Jul 2023 23:02:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365N293l060297; Wed, 5 Jul 2023 23:02:09 GMT (envelope-from git) Date: Wed, 5 Jul 2023 23:02:09 GMT Message-Id: <202307052302.365N293l060297@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: 3a9e3ed6b003 - main - ddb: Always terminate DB_SHOW_ALIAS_FLAGS with a semi-colon. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a9e3ed6b003cdf60f11c109bdeaa337b3f3466d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3a9e3ed6b003cdf60f11c109bdeaa337b3f3466d commit 3a9e3ed6b003cdf60f11c109bdeaa337b3f3466d Author: John Baldwin AuthorDate: 2023-07-05 23:00:31 +0000 Commit: John Baldwin CommitDate: 2023-07-05 23:00:31 +0000 ddb: Always terminate DB_SHOW_ALIAS_FLAGS with a semi-colon. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D40818 --- sys/kern/subr_turnstile.c | 2 +- sys/kern/subr_witness.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index d976d0994668..76b9a4306226 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -1263,7 +1263,7 @@ DB_SHOW_ALL_COMMAND(chains, db_show_allchains) } } } -DB_SHOW_ALIAS_FLAGS(allchains, db_show_allchains, DB_CMD_MEMSAFE) +DB_SHOW_ALIAS_FLAGS(allchains, db_show_allchains, DB_CMD_MEMSAFE); static void print_waiters(struct turnstile *ts, int indent); diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 839e4a4ce54b..e4405ff2f84f 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -2648,7 +2648,7 @@ DB_SHOW_ALL_COMMAND(locks, db_witness_list_all) } } } -DB_SHOW_ALIAS_FLAGS(alllocks, db_witness_list_all, DB_CMD_MEMSAFE) +DB_SHOW_ALIAS_FLAGS(alllocks, db_witness_list_all, DB_CMD_MEMSAFE); DB_SHOW_COMMAND_FLAGS(witness, db_witness_display, DB_CMD_MEMSAFE) { From nobody Wed Jul 5 23:02:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxFXz327Rz4l5WQ; Wed, 5 Jul 2023 23:02: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 4QxFXz2K0bz47DX; Wed, 5 Jul 2023 23:02:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688598131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQKmJYBsnSs96CBpGGXVE3ki52SR0exe1u91YMciED4=; b=lZq31cnEkzAzAkaV2qatJpT5R+eBjTi3W5+56Org2ZUXkhkPjOTgnUV5cuu76co+AJOJ/c OFNsS2N1HMp3Ueq50HTgvEvRflfyUPzYoIyduH5ZCYOZqjFb5SnD6waQDdwOeByLeqxbFY ujAAEAYvEMEdV2bCXEDccQbHA74VIyu6Em6TmeX/2VXAd0MPWF0w1rUVk0w5uGZO+kGmrC YorhmNIOQElAdKdLB7tLUQlO7LsG0/xbspJ4HDXlFim+K18ZyAkUiCEhqf9OHSQ4IBEe2J PKV2MnBTcCo0uKy4iy0An2jZY8Ez46tPJ+lokmh/H1V3EDw68eVNtKZEY1ucxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688598131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQKmJYBsnSs96CBpGGXVE3ki52SR0exe1u91YMciED4=; b=HPanrJjnM0ZmnqHMGTE3FaSMp2tT0MjXrj75IMADXamy54Cf33b4QT2nltwxiAtBUsy+E5 34lCptG27stFB2uUq47l1gxyqMhuNc3Rg2AGm8hJ+NetZiPJX/xYxWI7FHOBWh39AH8x9O 5QLEkWcAkbQzRHebxRYJ9/eYrWuK0CkgwK00roqHKc5QEfnmfjK5/D525S24fc93qW49/r dAbyXmLOBhkKy+xYsn95W4AgirsNl4c0JHBUHcUSsy9HRF+vavqz+eRsGrBB8rGf4Vikgu VJZEONLS/3grXtYkuJHy277POZzCm95LmaBXT56IoQJ30q+tKkNyrADgMwQLzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688598131; a=rsa-sha256; cv=none; b=uWZpkNb3+dep67xctRxK5s2Ud6eKDC0zJ+D86UFkN3B5mIrHvsMhSUKMiPp/K4ccv/N/Wl zdAcgivwq/Y+byANr0v7cfUDfjpDrM/MUXodirbtXE2kTu0One4O+Vh3ohIjHjep9OEqNS Lt4SBWK5QL2if/a9ighxElj5MUrnN7n+0FYnXGzugW1heiZshZyOYWNdupFHTlzZ6A/OiK 9mIMcUhGIg+rVmqjE0HnKxIvYQpxntRV5s9qgSS3p9XrcZCRrjQBoCUf5hbyEMt/VtqzGs hHk/VAmzXy+nj+W/UZQ15OI9lL3Gw1prjOwGpLjciEBaB9kvtzYQvSLVKUmMMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxFXz1Ms2zYKy; Wed, 5 Jul 2023 23:02: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 365N2Bck060317; Wed, 5 Jul 2023 23:02:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365N2BKk060316; Wed, 5 Jul 2023 23:02:11 GMT (envelope-from git) Date: Wed, 5 Jul 2023 23:02:11 GMT Message-Id: <202307052302.365N2BKk060316@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: 884eaacd24bd - main - ddb: Rework macros to make it easier to add new command tables. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 884eaacd24bdb85c1571d31145278847bad6e55b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=884eaacd24bdb85c1571d31145278847bad6e55b commit 884eaacd24bdb85c1571d31145278847bad6e55b Author: John Baldwin AuthorDate: 2023-07-05 23:00:47 +0000 Commit: John Baldwin CommitDate: 2023-07-05 23:02:01 +0000 ddb: Rework macros to make it easier to add new command tables. - Add new DB_DEFINE_TABLE and DB_DECLARE_TABLE macros to define new command tables. DB_DECLARE_TABLE is intended for use in headers similar to MALLOC_DECLARE and SYSCTL_DECL. DB_DEFINE_TABLE takes three arguments, the name of the parent table, the command name, and the name of the table itself, e.g. DB_DEFINE_TABLE(show, foo, show_foo) defines a new "show foo" table. - DB_TABLE_COMMAND, DB_TABLE_COMMAND_FLAGS, DB_TABLE_ALIAS, and DB_ALIAS_FLAGS allow new commands and aliases to be defined. These are similar to the existing DB_COMMAND, etc. except that they take an initial argument giving the name of the parent table, e.g.: DB_TABLE_COMMAND(show_foo, bar, db_show_foo_bar) defines a new "show foo bar" command. This provides a cleaner interface than the ad-hoc use of internal macros like _DB_SET that was required previously (e.g. in cxgbe(4)). This retires DB_FUNC macro as well as the internal _DB_FUNC macro. Reviewed by: melifaro, kib, markj Differential Revision: https://reviews.freebsd.org/D40819 --- share/man/man9/DB_COMMAND.9 | 39 ++++++++++++++++-- share/man/man9/Makefile | 8 +++- sys/ddb/ddb.h | 96 ++++++++++++++++++++++++++++----------------- sys/dev/cxgbe/t4_main.c | 7 ++-- sys/net/route/route_ddb.c | 4 +- 5 files changed, 108 insertions(+), 46 deletions(-) diff --git a/share/man/man9/DB_COMMAND.9 b/share/man/man9/DB_COMMAND.9 index 15c2adce3580..ebf15f8b73f3 100644 --- a/share/man/man9/DB_COMMAND.9 +++ b/share/man/man9/DB_COMMAND.9 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2022 +.Dd July 5, 2023 .Dt DB_COMMAND 9 .Os .Sh NAME @@ -34,11 +34,17 @@ .Nm DB_SHOW_COMMAND , .Nm DB_SHOW_COMMAND_FLAGS , .Nm DB_SHOW_ALL_COMMAND , +.Nm DB_TABLE_COMMAND , +.Nm DB_TABLE_COMMAND_FLAGS , .Nm DB_ALIAS , .Nm DB_ALIAS_FLAGS , .Nm DB_SHOW_ALIAS , .Nm DB_SHOW_ALIAS_FLAGS , -.Nm DB_SHOW_ALL_ALIAS +.Nm DB_SHOW_ALL_ALIAS , +.Nm DB_TABLE_ALIAS , +.Nm DB_TABLE_ALIAS_FLAGS +.Nm DB_DECLARE_TABLE , +.Nm DB_DEFINE_TABLE , .Nd Extends the ddb command set .Sh SYNOPSIS .In ddb/ddb.h @@ -47,11 +53,17 @@ .Fn DB_SHOW_COMMAND "command_name" "command_function" .Fn DB_SHOW_COMMAND_FLAGS "command_name" "command_function" "flags" .Fn DB_SHOW_ALL_COMMAND "command_name" "command_function" +.Fn DB_TABLE_COMMAND "table" "command_name" "command_function" +.Fn DB_TABLE_COMMAND_FLAGS "table" "command_name" "command_function" "flags" .Fn DB_ALIAS "alias_name" "command_function" .Fn DB_ALIAS_FLAGS "alias_name" "command_function" "flags" .Fn DB_SHOW_ALIAS "alias_name" "command_function" .Fn DB_SHOW_ALIAS_FLAGS "alias_name" "command_function" "flags" .Fn DB_SHOW_ALL_ALIAS "alias_name" "command_function" +.Fn DB_TABLE_ALIAS "table" "alias_name" "command_function" +.Fn DB_TABLE_ALIAS_FLAGS "table" "alias_name" "command_function" "flags" +.Fn DB_DEFINE_TABLE "parent" "name" "table" +.Fn DB_DECLARE_TABLE "table" .Sh DESCRIPTION The .Fn DB_COMMAND @@ -78,10 +90,18 @@ command and command, respectively. .Pp The +.Fn DB_TABLE_COMMAND +macro is also similar to +.Fn DB_COMMAND +but adds the new command as a sub-command of the ddb command +.Fa table . +.Pp +The .Fn DB_ALIAS , .Fn DB_SHOW_ALIAS , +.Fn DB_SHOW_ALL_ALIAS , and -.Fn DB_SHOW_ALL_ALIAS +.Fn DB_TABLE_ALIAS macros register the existing .Fa command_function under the alternative command name @@ -117,6 +137,19 @@ For example, the .Sy examine command will display words in decimal form if it is passed the modifier "d". .El +.Pp +The +.Fn DB_DEFINE_TABLE +macro adds a new command +.Fa name +as a sub-command of the existing command table +.Fa parent . +The new command defines a table named +.Fa table +which contains sub-commands. +New commands and aliases can be added to this table by passing +.Fa table +as the first argument to one of the DB_TABLE_ macros. .Sh EXAMPLES In your module, the command is declared as: .Bd -literal diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 2a320cf0fcba..45f9ec9b0515 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -983,7 +983,13 @@ MLINKS+=DB_COMMAND.9 DB_ALIAS.9 \ DB_COMMAND.9 DB_SHOW_ALL_ALIAS.9 \ DB_COMMAND.9 DB_SHOW_ALL_COMMAND.9 \ DB_COMMAND.9 DB_SHOW_COMMAND.9 \ - DB_COMMAND.9 DB_SHOW_COMMAND_FLAGS.9 + DB_COMMAND.9 DB_SHOW_COMMAND_FLAGS.9 \ + DB_COMMAND.9 DB_DECLARE_TABLE.9 \ + DB_COMMAND.9 DB_DEFINE_TABLE.9 \ + DB_COMMAND.9 DB_TABLE_COMMAND.9 \ + DB_COMMAND.9 DB_TABLE_COMMAND_FLAGS.9 \ + DB_COMMAND.9 DB_TABLE_ALIAS.9 \ + DB_COMMAND.9 DB_TABLE_ALIAS_FLAGS.9 MLINKS+=DECLARE_MODULE.9 DECLARE_MODULE_TIED.9 MLINKS+=dev_clone.9 drain_dev_clone_events.9 MLINKS+=dev_refthread.9 devvn_refthread.9 \ diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index 2fa4bfeb495c..591371e8a5c7 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -85,21 +85,32 @@ int DB_CALL(db_expr_t, db_expr_t *, int, db_expr_t[]); */ extern vm_offset_t ksymtab, kstrtab, ksymtab_size, ksymtab_relbase; +/* Command tables contain a list of commands. */ +struct db_command; +LIST_HEAD(db_command_table, db_command); + +#define _DB_TABLE_NAME(table) db_##table##_table + +#define DB_DEFINE_TABLE(parent, name, table) \ + struct db_command_table _DB_TABLE_NAME(table) = \ + LIST_HEAD_INITIALIZER(_DB_TABLE_NAME(table)); \ + _DB_SET(parent, name, NULL, 0, &_DB_TABLE_NAME(table)) + +#define DB_DECLARE_TABLE(table) \ + extern struct db_command_table _DB_TABLE_NAME(table) + /* - * There are three "command tables": - * - One for simple commands; a list of these is displayed + * Builtin command tables: + * - cmd: Top-level command table; a list of these is displayed * by typing 'help' at the debugger prompt. - * - One for sub-commands of 'show'; to see this type 'show' - * without any arguments. - * - The last one for sub-commands of 'show all'; type 'show all' - * without any argument to get a list. + * - show: Sub-commands of 'show' + * - show_all: Sub-commands of 'show all' + * - show_active: Sub-commands of 'show active' */ -struct db_command; -LIST_HEAD(db_command_table, db_command); -extern struct db_command_table db_cmd_table; -extern struct db_command_table db_show_table; -extern struct db_command_table db_show_all_table; -extern struct db_command_table db_show_active_table; +DB_DECLARE_TABLE(cmd); +DB_DECLARE_TABLE(show); +DB_DECLARE_TABLE(show_all); +DB_DECLARE_TABLE(show_active); /* * Type signature for a function implementing a ddb command. @@ -133,26 +144,36 @@ struct db_command { * in modules in which case they will be available only when * the module is loaded. */ -#define _DB_SET(_suffix, _name, _func, list, _flag, _more) \ -static struct db_command __CONCAT(_name,_suffix) = { \ +#define _DB_SET(_table, _name, _func, _flag, _more) \ +static struct db_command db_##_table##_##_name##_cmd = { \ .name = __STRING(_name), \ .fcn = _func, \ .flag = _flag, \ .more = _more \ }; \ -static void __CONCAT(__CONCAT(_name,_suffix),_add)(void *arg __unused) \ - { db_command_register(&list, &__CONCAT(_name,_suffix)); } \ -SYSINIT(__CONCAT(_name,_suffix), SI_SUB_KLD, SI_ORDER_ANY, \ - __CONCAT(__CONCAT(_name,_suffix),_add), NULL); \ -static void __CONCAT(__CONCAT(_name,_suffix),_del)(void *arg __unused) \ - { db_command_unregister(&list, &__CONCAT(_name,_suffix)); } \ -SYSUNINIT(__CONCAT(_name,_suffix), SI_SUB_KLD, SI_ORDER_ANY, \ - __CONCAT(__CONCAT(_name,_suffix),_del), NULL); + \ +static void \ +db##_table##_##_name##_add(void *arg __unused) \ +{ \ + db_command_register(&_DB_TABLE_NAME(_table), \ + &db_##_table##_##_name##_cmd); \ +} \ +SYSINIT(db_##_table##_##_name, SI_SUB_KLD, SI_ORDER_ANY, \ + db##_table##_##_name##_add, NULL); \ + \ +static void \ +db##_table##_##_name##_del(void *arg __unused) \ +{ \ + db_command_unregister(&_DB_TABLE_NAME(_table), \ + &db_##_table##_##_name##_cmd); \ +} \ +SYSUNINIT(db_##_table##_##_name, SI_SUB_KLD, SI_ORDER_ANY, \ + db##_table##_##_name##_del, NULL) /* * Like _DB_SET but also create the function declaration which * must be followed immediately by the body; e.g. - * _DB_FUNC(_cmd, panic, db_panic, db_cmd_table, 0, NULL) + * DB_TABLE_COMMAND_FLAGS(_cmd, panic, db_panic, 0) * { * ...panic implementation... * } @@ -160,38 +181,41 @@ SYSUNINIT(__CONCAT(_name,_suffix), SI_SUB_KLD, SI_ORDER_ANY, \ * This macro is mostly used to define commands placed in one of * the ddb command tables; see DB_COMMAND, etc. below. */ -#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \ +#define DB_TABLE_COMMAND_FLAGS(_table, _name, _func, _flag) \ static db_cmdfcn_t _func; \ -_DB_SET(_suffix, _name, _func, list, _flag, _more); \ +_DB_SET(_table, _name, _func, _flag, NULL); \ static void \ _func(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) -/* common idom provided for backwards compatibility */ -#define DB_FUNC(_name, _func, list, _flag, _more) \ - _DB_FUNC(_cmd, _name, _func, list, _flag, _more) +#define DB_TABLE_COMMAND(_table, _name, _func) \ + DB_TABLE_COMMAND_FLAGS(_table, _name, _func, 0) + +/* Wrappers around _DB_SET used for aliases. */ +#define DB_TABLE_ALIAS_FLAGS(_table, _name, _func, _flag) \ + _DB_SET(_table, _name, _func, _flag, NULL) +#define DB_TABLE_ALIAS(_table, _name, _func) \ + DB_TABLE_ALIAS_FLAGS(_table, _name, _func, 0) #define DB_COMMAND_FLAGS(cmd_name, func_name, flags) \ - _DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, flags, NULL) + DB_TABLE_COMMAND_FLAGS(cmd, cmd_name, func_name, flags) #define DB_COMMAND(cmd_name, func_name) \ DB_COMMAND_FLAGS(cmd_name, func_name, 0) #define DB_ALIAS_FLAGS(alias_name, func_name, flags) \ - _DB_SET(_cmd, alias_name, func_name, db_cmd_table, flags, NULL) + DB_TABLE_ALIAS_FLAGS(cmd, alias_name, func_name, flags) #define DB_ALIAS(alias_name, func_name) \ DB_ALIAS_FLAGS(alias_name, func_name, 0) #define DB_SHOW_COMMAND_FLAGS(cmd_name, func_name, flags) \ - _DB_FUNC(_show, cmd_name, func_name, db_show_table, flags, NULL) + DB_TABLE_COMMAND_FLAGS(show, cmd_name, func_name, flags) #define DB_SHOW_COMMAND(cmd_name, func_name) \ DB_SHOW_COMMAND_FLAGS(cmd_name, func_name, 0) #define DB_SHOW_ALIAS_FLAGS(alias_name, func_name, flags) \ - _DB_SET(_show, alias_name, func_name, db_show_table, flags, NULL) + DB_TABLE_ALIAS_FLAGS(show, alias_name, func_name, flags) #define DB_SHOW_ALIAS(alias_name, func_name) \ DB_SHOW_ALIAS_FLAGS(alias_name, func_name, 0) #define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \ - _DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, \ - DB_CMD_MEMSAFE, NULL) + DB_TABLE_COMMAND_FLAGS(show_all, cmd_name, func_name, DB_CMD_MEMSAFE) #define DB_SHOW_ALL_ALIAS(alias_name, func_name) \ - _DB_SET(_show_all, alias_name, func_name, db_show_all_table, \ - DB_CMD_MEMSAFE, NULL) + DB_TABLE_ALIAS_FLAGS(show_all, alias_name, func_name, DB_CMD_MEMSAFE) extern db_expr_t db_maxoff; extern int db_indent; diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 2fa49ddee10b..7ddd3b416995 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -12921,10 +12921,9 @@ t4_dump_devlog(struct adapter *sc) } while (i != first && !db_pager_quit); } -static struct db_command_table db_t4_table = LIST_HEAD_INITIALIZER(db_t4_table); -_DB_SET(_show, t4, NULL, db_show_table, 0, &db_t4_table); +static DB_DEFINE_TABLE(show, t4, show_t4); -DB_FUNC(devlog, db_show_devlog, db_t4_table, CS_OWN, NULL) +DB_TABLE_COMMAND_FLAGS(show_t4, devlog, db_show_devlog, CS_OWN) { device_t dev; int t; @@ -12950,7 +12949,7 @@ DB_FUNC(devlog, db_show_devlog, db_t4_table, CS_OWN, NULL) t4_dump_devlog(device_get_softc(dev)); } -DB_FUNC(tcb, db_show_t4tcb, db_t4_table, CS_OWN, NULL) +DB_TABLE_COMMAND_FLAGS(show_t4, tcb, db_show_t4tcb, CS_OWN) { device_t dev; int radix, tid, t; diff --git a/sys/net/route/route_ddb.c b/sys/net/route/route_ddb.c index 92e7a6bef574..a8e70a1d65c3 100644 --- a/sys/net/route/route_ddb.c +++ b/sys/net/route/route_ddb.c @@ -166,7 +166,7 @@ rt_dumpentry_ddb(struct radix_node *rn, void *arg __unused) return (0); } -DB_SHOW_COMMAND(routetable, db_show_routetable_cmd) +DB_SHOW_COMMAND(routetable, db_show_routetable) { struct rib_head *rnh; int error, i, lim; @@ -204,7 +204,7 @@ DB_SHOW_COMMAND(routetable, db_show_routetable_cmd) } } -DB_SHOW_COMMAND_FLAGS(route, db_show_route_cmd, CS_OWN) +DB_SHOW_COMMAND_FLAGS(route, db_show_route, CS_OWN) { char abuf[INET6_ADDRSTRLEN], *buf, *end; struct rib_head *rh; From nobody Thu Jul 6 01:55:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxKNq2rZCz4lsX6; Thu, 6 Jul 2023 01:55: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 4QxKNq2LDHz3J9h; Thu, 6 Jul 2023 01:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688608523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ooguPCCGV0QqJPaYvu2RIFI6wXnH9pXZbYgIskkWsgI=; b=DKsx/tNktA5TjYEXKwt7yw0Pypn3VQ1DqVnWj8lhHJHJScAYq1jUU0RTYOEPCKO0Fj+LSV K0VJPbgP17KEkxn51ZXXjUFnzY0F2So2EC0Oo8gR42UCoLzZjMLU9jTMny7yg2AekQNB7b 1WhaJ5B7OvEY2QNakrCdCoEVcCjHMolvHgtDXFhqRQYYXFUOSQDTIe31kAeQ+HXOL7+xHN mqkF+fEu+XBeSHawOR7m3mnt0wlqcE9e1lHr9holj8JrIl8M/GE8eMOJcMV/tdRpCQlzYz n+7pVtB0id3rUuITy2NdrVEydNRKAKU80eQgKdfY+Zr5qSNDsLBYQTlcPLrpuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688608523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ooguPCCGV0QqJPaYvu2RIFI6wXnH9pXZbYgIskkWsgI=; b=mI2O4pFkuDUXU/dT/3n4TGw3BxcNsYJ3FR37huzlFlsR7+L8gAhDBPzD6IlDmUbllMH8X1 8J3ZTeBQC5C1fDIiFc81j+eqqpS643GI9UbHwBUbcChEBrxdRkGPP9hSQVQFhDUJeW6Qzh TbYPtVPpr3T1MJWDd767CuMP/aLQIj1jrAYsnxa3HIrQ5a5stsjDNMorzwHaUQ0RKWUP3N 019x4ISodPuCYR2begEzPpA3fHAzlF0M5eSItSx9Z1/ztfTFqWYL3Outt/Of22nTiWerrc T4xYqrYcUHJrmDUR0ubdauU9m0jpiYaoi7YWz/Jcg38i/H5PYVVL1a9IH9H1Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688608523; a=rsa-sha256; cv=none; b=iqloaage2jx6FE5OciKdWSMILYXUxWaJSqb5mZuFr5q7d/tanQJuFdgw9F3SP8ecLEr92i 4twGe8Uk78sXAkWkUle/j5NyFpYgipowMuVpyYJH8icqidBlsKhn6mJL1zY+IPMMzZ0rRj SDl5cpCJpV1DkLCiowJGdVWF9pJiGixJdH7AhYwZsFeKE6derY5CyzigRrL6vblCTj6KTz zGzpYGnX5b1J8OfsAI8xfa6KVTCydeA0kCw+kiLtZ+Wbdw9GAa6yyV4Ymen86/GhLflD8O MpxgpFHmQ6RkeI2xJf/Kl+xInLCli3OJpAwg0KgcLy4xcVkLs9rhEGylSFub3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxKNq1B7tzdfN; Thu, 6 Jul 2023 01:55: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 3661tN9W041605; Thu, 6 Jul 2023 01:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3661tN9G041604; Thu, 6 Jul 2023 01:55:23 GMT (envelope-from git) Date: Thu, 6 Jul 2023 01:55:23 GMT Message-Id: <202307060155.3661tN9G041604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: cb1b77808a1e - stable/13 - nfscl: Fix support for doing Null RPCs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: cb1b77808a1edf8ca803568439e8ef8a092192fb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cb1b77808a1edf8ca803568439e8ef8a092192fb commit cb1b77808a1edf8ca803568439e8ef8a092192fb Author: Rick Macklem AuthorDate: 2023-04-07 19:57:26 +0000 Commit: Rick Macklem CommitDate: 2023-07-06 01:53:47 +0000 nfscl: Fix support for doing Null RPCs Although the NFS client does not currently perform Null RPCs, this fix is needed if/when it might do so. Found during testing of experimental code that uses Null RPCs to maintain/monitor TCP connections for "nconnect" mounts. (cherry picked from commit 4adb28c0abfa3b8d076c7249f61a093c6eb9dac2) --- sys/fs/nfs/nfs_commonsubs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index af9f66f03488..a738f8cc6fb1 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -375,6 +375,10 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, nd->nd_mreq = nd->nd_mb = mb; nd->nd_bpos = mtod(mb, char *); + /* For NFSPROC_NULL, there are no arguments. */ + if (procnum == NFSPROC_NULL) + goto out; + /* * And fill the first file handle into the request. */ @@ -469,6 +473,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, } else { (void)nfsm_fhtom(NULL, nd, nfhp, fhlen, 0); } +out: if (procnum < NFSV42_NPROCS) NFSINCRGLOBAL(nfsstatsv1.rpccnt[procnum]); } From nobody Thu Jul 6 06:57:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxS5g3jLyz4lykF; Thu, 6 Jul 2023 06:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QxS5g30xxz4KFS; Thu, 6 Jul 2023 06:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688626663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PDKcPx19vIV/Dni+uoL7liBIdhqsSSs03c2Ip25Gjz4=; b=LHWWuLT/GX7AboDWUGPcU25a0LfqseQz1rfqWrTd1yAL552s+mZF73zjVMQT8K89aO9HTp WOI/5QYkhjDK553kZ0zQ2aZ8IfB+EX/KRzD40aWUyEuyEBnZpqKwt5OIcvhhqDBmKgAjuv H/E9MxeFESi5qUmthJ+p74tB4RlWgSl6BaVNIamcFBL7QSLvgjAWLEDRaldb1NRhCOSM7j nZl68i401aFNc6iAsGLnKHAsOx3i9IYuDJ5AwcMsZk9iC8FAUDBHUsO+m/FLckXSWaxTdp HSAcOd9mu3IDjhPHQ3VUqlHWGgYKZrdYlH0QGhsyTK69TfamqjOJ/0t4oH6K8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688626663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PDKcPx19vIV/Dni+uoL7liBIdhqsSSs03c2Ip25Gjz4=; b=pIlfV/ckXOtRc97ILslFpRnKf6/2T2Ms9mMllKuW2Z8rdqN6oK7K5OhWAAbQGv91oeWeNH u6uicd3tzx85TEaBSpRRzrgBZW9C1x94q00OIX7MRRHfNo3/FMwMdJNDwCJWD4RcDvju72 Ah01CvodI8W43fV4zIzFU5OYxyoVsWWDGRyX7graupbqrjl+8uE4vUs3oVcFRPHgIQwwdQ uYUmi+PgRu4fnWnqhSQKAVPoI/NjxNk3TiS4gjjIalzBICdjGJor4UV6l/nyg4Z6erk0vB Xx47Ljnlmxj1O6FIq+OIz+Ek0DLZ3BQD/qnuuOgKNeulAnCiprKqB422AaKIgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688626663; a=rsa-sha256; cv=none; b=bCVla1roxYw5ya16er3H27MTxsu7+lgxhEVjgUS08nTQAJUoV6TSBTCkBcGUKkmsy9GO93 e6iFXrfzFERE5JWjcwAkFz0p9lBRFUrA/Q9XC+B+/46QlOWCpxA6JKd8wP3pGHwL0/2T28 9j7VOEA9QyJSTGuq1m++nNCx+ug7YGVQEzgMY6pG5t9Pa89VBHv/IrLiRRwTv5voTTUVzM 5P7j67nOerufk/Q6hh0yqlRzSpa3xLC0O6btI4vjlMVy2PwS/6CRQ+6ix6LmLWHZ2g1uAz jHIUrG1avFpwCowN2tHKX7DXQXlqTuBwss+mGSQmwQspCOYBaN/UhuGJndHBog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxS5g23d8zmN3; Thu, 6 Jul 2023 06:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3666vhdZ039844; Thu, 6 Jul 2023 06:57:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3666vhaa039843; Thu, 6 Jul 2023 06:57:43 GMT (envelope-from git) Date: Thu, 6 Jul 2023 06:57:43 GMT Message-Id: <202307060657.3666vhaa039843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3b05949e4932 - stable/13 - killpg1(): update the herald comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3b05949e49326e6ddcb1f4d14f74a03e3ec14e96 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3b05949e49326e6ddcb1f4d14f74a03e3ec14e96 commit 3b05949e49326e6ddcb1f4d14f74a03e3ec14e96 Author: Konstantin Belousov AuthorDate: 2023-06-16 09:02:04 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-06 06:55:58 +0000 killpg1(): update the herald comment (cherry picked from commit 4b59d1724b765063891cb44c28079b4c503a02fd) --- sys/kern/kern_sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 539c020c183e..79440c2866df 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1744,7 +1744,7 @@ killpg1_sendsig(struct proc *p, bool notself, struct killpg1_ctx *arg) /* * Common code for kill process group/broadcast kill. - * cp is calling process. + * td is the calling thread, as usual. */ static int killpg1(struct thread *td, int sig, int pgid, int all, ksiginfo_t *ksi) From nobody Thu Jul 6 06:57:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxS5h4y4Hz4lyxB; Thu, 6 Jul 2023 06:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QxS5h43rpz4KP1; Thu, 6 Jul 2023 06:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688626664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yjis+H8s0nDe1MPS2eCjHW2rtOb2y5RWGYX+xH9tWlU=; b=Cw/cqbPY9YcE4BTc6rF9s9zpZzMsexq//g2t1A/hiV2NHhJ5t+KOPR/NmjprmCdf2FOXdH 15Ga+nnAClvy4MCooc/Awnyx9hm03lvKBl6Z1p7lEr/YqzTvM4sCZD9emF+rz55/3sHAdb VrjguO0veMnfNq96DuqiVlGgPQVC+Vy+BAO5ZSq+mp4c9MiNHxiocBdxWB/mqQQj0AoA7T GzGsM1SGcqgVVCec/0zBbdvy3cWvQLBveaBd4l0iD0kaWPvr2JEfF8xgseSngf/LKlMip2 KnQTEENDgrXSiKZL9K90yQS5kZC7vTCfKXduHO5HBubuWOhJNXgmswf7adE3QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688626664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yjis+H8s0nDe1MPS2eCjHW2rtOb2y5RWGYX+xH9tWlU=; b=WhBwKiw6Dn0/8GQxpwei5L4B5oIAnapyXkfokgmG98r8KQrtleMoGIZToY5AQ2g3N29y/W u7I3Kl2y9mDuLUm8cCL9WBxmVv+iRXBvgF0BPG8fnizKBh/0ULYKHdZRNyGUKSLzuSoVW0 sZQlmSDur1ALiAv8TYFUzCQerj8G1gEYVdEWL+n0B9RtNEUF+EEFZA8iqWs+OGCBQi09Qf dXcDgfT3H/ksQO0zGqecHYNWRU/VfJ6HEfGNK0TUjtg2a24qRAUTgYDEF+H/vOzXDk43B8 ujWNasZHMuG2rFqeJLlKugIwCkcrowUcOl68VOBBfk7utPOswy+0lYm3u14WGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688626664; a=rsa-sha256; cv=none; b=NEv2PMW8LdaNxSzG0FtVtsUcfRDo66woAAMIvx9Gy8/PQ3fII3Pe54sifO6ZX1FiU9rZvT kKCNOSkA2KmfrTW7/7pfYMszTLr9KcJ8OylM76JbTHkABaueuPlCymBvSkNTuUfTS13FMC bQDwNOtLHGzMT8kW3mMrTfZGfspXG3fll4kN7Tkb3Jwh1J9MjLVz35HBjwqz79vn48kAuq SqifE2W9xQ8qTeNAqi1ry8GAn5RHfHuLcEfW/oLQxIk3PXa6vVUGwl9WSLUtCvQAvm4u5c Q3Db6Wdk70VkDf8fDCZhvNUK1s880Zlvl2eIhiIT/DxHYjINK32OVVT4qcQ/XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxS5h2q6fzmcC; Thu, 6 Jul 2023 06:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3666viD2039864; Thu, 6 Jul 2023 06:57:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3666vixJ039863; Thu, 6 Jul 2023 06:57:44 GMT (envelope-from git) Date: Thu, 6 Jul 2023 06:57:44 GMT Message-Id: <202307060657.3666vixJ039863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ee42b38ca436 - stable/13 - kern_lockf.c: fix typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ee42b38ca4364fdc992d2f2d395a9d36e5222630 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ee42b38ca4364fdc992d2f2d395a9d36e5222630 commit ee42b38ca4364fdc992d2f2d395a9d36e5222630 Author: Konstantin Belousov AuthorDate: 2023-07-04 22:23:57 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-06 06:56:57 +0000 kern_lockf.c: fix typo (cherry picked from commit 658e7620672f8eb650695992b4a73e004c5f101b) --- sys/kern/kern_lockf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index 52c603949bdc..2bd5b24014a0 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -195,7 +195,7 @@ static void lf_print_owner(struct lock_owner *); struct lock_owner { LIST_ENTRY(lock_owner) lo_link; /* (l) hash chain */ int lo_refs; /* (l) Number of locks referring to this */ - int lo_flags; /* (c) Flags passwd to lf_advlock */ + int lo_flags; /* (c) Flags passed to lf_advlock */ caddr_t lo_id; /* (c) Id value passed to lf_advlock */ pid_t lo_pid; /* (c) Process Id of the lock owner */ int lo_sysid; /* (c) System Id of the lock owner */ From nobody Thu Jul 6 07:57:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxTQw2hNyz4mCP4; Thu, 6 Jul 2023 07:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QxTQw22wcz3DJ1; Thu, 6 Jul 2023 07:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688630264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ldOwpTqRvwJ4kssViTOUFm7rWO6GcsIxxF99GvwonY0=; b=UVFMXVxmZu0kvAvaPhHzYf6WMTJKrGIsiTymXzHA6P4TcXVDTEd8Yd8NecgB3Lbep5Fz63 UQJuEkAPoGN1VG9WkF95a02mtt+JUVhevMUh9OEicUzo0YivIik/Mxta3zh/2eapUVgNa9 sgcCW0wDbeW9CefX7QmZZCFJ1FUCCJhxXRNcPNKntXsmAhw+33RJIYB33H4696H794JoLv oLhO5/0JPlaEsXv05dRuMOCZATj0OwlhKYjeONE5zOvUhVeanGpCE7HIpNAnP3lIdEuoSF vCZ7GmJ78TF9Q+hq/XRN9Jo3dFUOlax8CeK2f0AwhbKibvwdV7j3IyRS+7OcJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688630264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ldOwpTqRvwJ4kssViTOUFm7rWO6GcsIxxF99GvwonY0=; b=k5FQGi0KBuS9u0MptZt6L23sQ4OblAwxKJfMSq1SF1qPx+iIsSF3JjDiW3E532kqvSY/Nk /KuyE7HZaAIvofVr+iRIZ2g691q23uFpzxuTi/FCJc0bTi/hn8sc54xR5uR3aPoADkkwMp keXR77jOXGDvQwMHm3E9lmS6gyC9oDG+RfJxPRJKdh76sJ7i/XvOcNQsaZb4Q+TT7kJlrg YCiRbmnVk3BUGjarmHKOzRputB3s5kf1JZykjnjsDyIhK1kc0BHSJ+f8cdkf8iZC2td9ZC QyYjo/pUmJcqW/JwUdqegMb5L8cDKjzxUXhEdERGlCSnYN2i8zXpf7S/EXYHBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688630264; a=rsa-sha256; cv=none; b=cY97aU3BYr2rdaHly240tL5PMlyP4vr7vKQtBYF8YC61GkbetUYTc3DlmlkZCa7Q5pJmlV 82PJe26wHRpvTxKlHdHs5TVnbxGH1AZCUBAYAqWqabdMAH6x4Kpald/i2TZ0cpGP4t+jEZ megyBKudBTaCtEiW6IL2Bm+4PfoVbB4ZIZhVv/ACB/wnEUidViKAP5GwowG75qu0pfcRGN IVRzUz2h1mfirGJle27Dk75x5lpVOT3W1787+Ttlmkcht0LkWrAtPdTC7BpNZTQ6LvmbOW TifwyX2inLolRhNiR522FcyU+k1pBqdTJl3fLmxblgZhyzWwgJzb6V5KutRTaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxTQw10NYznl3; Thu, 6 Jul 2023 07:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3667viRj038256; Thu, 6 Jul 2023 07:57:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3667viac038253; Thu, 6 Jul 2023 07:57:44 GMT (envelope-from git) Date: Thu, 6 Jul 2023 07:57:44 GMT Message-Id: <202307060757.3667viac038253@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Juraj Lutter Subject: git: 9000459d3bc2 - stable/13 - periodic: Honor kern.localbase List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9000459d3bc2816df3525cda8d3fa4eee6c92b26 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by otis: URL: https://cgit.FreeBSD.org/src/commit/?id=9000459d3bc2816df3525cda8d3fa4eee6c92b26 commit 9000459d3bc2816df3525cda8d3fa4eee6c92b26 Author: Juraj Lutter AuthorDate: 2023-06-06 11:40:49 +0000 Commit: Juraj Lutter CommitDate: 2023-07-06 07:56:35 +0000 periodic: Honor kern.localbase Take kern.localbase into account with fallback to /usr/local and also allow for LOCALBASE/etc/periodic.conf (similarly to what many other utilities do). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40435 (cherry picked from commit e5d7100c09e03e66535eee69d7e454c01e4a9d28) --- usr.sbin/periodic/periodic.8 | 9 +++++++-- usr.sbin/periodic/periodic.conf | 6 +++--- usr.sbin/periodic/periodic.sh | 8 ++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/usr.sbin/periodic/periodic.8 b/usr.sbin/periodic/periodic.8 index 2fda1db157f5..fd09fbf1b368 100644 --- a/usr.sbin/periodic/periodic.8 +++ b/usr.sbin/periodic/periodic.8 @@ -183,7 +183,7 @@ and the standard and .Pa security scripts -.It Pa /etc/periodic.conf +.It Pa /etc/periodic.conf , ${LOCALBASE}/etc/periodic.conf this file contains local overrides for the default .Nm configuration @@ -207,7 +207,12 @@ system registry will typically have a .Va local_periodic variable reading: .Pp -.Dl local_periodic="/usr/local/etc/periodic" +.Dl local_periodic="${_localbase}/etc/periodic" +.Pp +where +.Pa ${_localbase} +is being set from within +.Pa /usr/sbin/periodic . .Pp To log .Nm diff --git a/usr.sbin/periodic/periodic.conf b/usr.sbin/periodic/periodic.conf index 4429c8d48eea..c14f4dd001db 100644 --- a/usr.sbin/periodic/periodic.conf +++ b/usr.sbin/periodic/periodic.conf @@ -17,10 +17,10 @@ # # What files override these defaults ? -periodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local" +periodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local ${_localbase}/etc/periodic.conf" -# periodic script dirs -local_periodic="/usr/local/etc/periodic" +# periodic script dirs. _localbase is being set in /usr/sbin/periodic +local_periodic="${_localbase}/etc/periodic" # Max time to sleep to avoid causing congestion on download servers anticongestion_sleeptime=3600 diff --git a/usr.sbin/periodic/periodic.sh b/usr.sbin/periodic/periodic.sh index 84e14e9cfd80..97de8192dd28 100644 --- a/usr.sbin/periodic/periodic.sh +++ b/usr.sbin/periodic/periodic.sh @@ -30,6 +30,14 @@ if [ $# -lt 1 ] ; then usage fi +_localbase=`/sbin/sysctl -n user.localbase 2> /dev/null` +# Set default value of _localbase if not previously set +: ${_localbase:="/usr/local"} + +# Use a deterministic path to match the preset from /etc/crontab in case +# periodic is run interactively. +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:${_localbase}/sbin:${_localbase}/bin + # If possible, check the global system configuration file, # to see if there are additional dirs to check if [ -r /etc/defaults/periodic.conf ]; then From nobody Thu Jul 6 09:15:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxW8k1dnrz4l8VL; Thu, 6 Jul 2023 09:15: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 4QxW8j6Tslz3NKb; Thu, 6 Jul 2023 09:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688634933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ovi2zYjSwjAPsQQWso/AcfECrkjesQBxNvfX2dgyaZs=; b=sFn5l3TgrxvvFypB2LgXLWMmvJrdvwM12orjrdTDrfIueOEvSnKMmIZnG13igYdIrOfzIR F351ajctTxIeqDfQdjOxCY4C/XybpsNzqfj5aWKGSjwHWnRtHTKa0k8V35wOSaZSyqxtmk PYuShZok9VxyeY8GjgFhJFuT0F6Tn2OSltycqN2es8d0ijRXZIgyxOHNPaa/RWwyzJNK3T CLyZjJsxLIEmYhOjpvtKokR7qkpwBvNbUMYHjktcW6kL7ciGcksvAdmFx79bUpxzdK/cVB 7lahTcLAYg4PX1WA5fYMwIJKmxhdoXiRGgdXIxkHSeOJkLYCNxgyYX9wGgK6Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688634933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ovi2zYjSwjAPsQQWso/AcfECrkjesQBxNvfX2dgyaZs=; b=Hz7z1aQ44qS22H1nQ8YSJJ0FrbDJ4NsOW5YVVFAH2aKvB433Jb3x2rFogUlzEuNRgag9yq IY7/T4xZAPzHEJclHL6rzWw3UBt3ZoiefLAJ2pKBekCwji6VDwz6/JpIm3lqg2DXSUWNIJ /TmvN2DF5jgIg5+Z6zkbSAE7Hh/9vIOmaxss0PhWtyR4krH8Jl7xAy+hHUw3achLHz9hEE OsmqTjZ+ZnvvSw7r0/Vd9fApmJcUOOJ6MlCBtHPAU8dVXCF2FSwjg7GuCEQo4mq/B3eEFE A+RWimC9WslEVFNHzhRQl/H/GJyXPNV5S25Sq02FfOrLhVX0vCfqvX99/rZD3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688634933; a=rsa-sha256; cv=none; b=UifL37OS1ji3mck5x/mo/rJSlz7yCBUTteZ8SgX9XOgrZtmF885uV7SapsyNYfUgsBenuH 0dYOGwna4EDs0bX7G1jcRfxt+lbNv2KsnUUl5VAXAcjyERzrzTlXqwYbr1JAwFeXnsMC+I sgNYaw5tVPsawacvfuWr2TRP0TYknt9bnEYLO6BzDcOvcJ64KIGXg3zRe9mYcK/OHARk8t n5f8tFIf64pm2aAyILOE6/3+uMDPzwUjVyG2Yw1tJWqLfpIcXQ4gbjrB5T+hit7abIHgPY YL7mBWD4oLV0OKxVyh2tSDM0C2GCjbzj3an0VD8uzd8P7+1dw0th1Nwem74p0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxW8j5XwZzrKZ; Thu, 6 Jul 2023 09:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3669FXZT071715; Thu, 6 Jul 2023 09:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3669FXw4071714; Thu, 6 Jul 2023 09:15:33 GMT (envelope-from git) Date: Thu, 6 Jul 2023 09:15:33 GMT Message-Id: <202307060915.3669FXw4071714@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: 4631191c8a5f - main - stress2: Added a regression test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4631191c8a5f934f5d9ddcf555fa4e59f7d8911a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=4631191c8a5f934f5d9ddcf555fa4e59f7d8911a commit 4631191c8a5f934f5d9ddcf555fa4e59f7d8911a Author: Peter Holm AuthorDate: 2023-07-06 09:15:13 +0000 Commit: Peter Holm CommitDate: 2023-07-06 09:15:13 +0000 stress2: Added a regression test --- tools/test/stress2/misc/nullfs30.sh | 112 ++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/tools/test/stress2/misc/nullfs30.sh b/tools/test/stress2/misc/nullfs30.sh new file mode 100755 index 000000000000..8b8f35aed4c0 --- /dev/null +++ b/tools/test/stress2/misc/nullfs30.sh @@ -0,0 +1,112 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Peter Holm +# +# 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. +# + +# Parallel mount and umount test of file mounts, +# mounting over non-directories + +# panic: free: address 0xffffffff80b229b4 ... has not been allocated +# https://people.freebsd.org/~pho/stress/log/log0454.txt + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +. ../default.cfg + +cont=/tmp/nullfs30.continue +mounts=3 # Number of parallel scripts + +set -eu +md1=$mdstart +md2=$((md1 + 1)) +mp1=$mntpoint$md1 +mp2=$mntpoint$md2 +mkdir -p $mp1 $mp2 + +mdconfig -a -t swap -s 256m -u $md1 +newfs $newfs_flags -n md$md1 > /dev/null +mount /dev/md$md1 $mp1 +mdconfig -a -t swap -s 256m -u $md2 +newfs $newfs_flags -n md$md2 > /dev/null +mount /dev/md$md2 $mp2 + +for i in `jot $mounts`; do + cp /etc/group $mp1/f$i + touch $mp2/m$i +done +set +e + +mount -t nullfs $mp1/f1 $mp2/m1 || { + umount $mp2 + umount $mp1 + mdconfig -d -u $md2 + mdconfig -d -u $md1 + echo "File mount not implemented" + exit 0 +} + +(cd ../testcases/swap; ./swap -t 5m -i 20 > /dev/null) & + +# Start the parallel tests +touch $cont +while [ -f $cont ]; do + while mount | grep -q "on $mp2/m1 "; do umount $mp2/m1; done 2> /dev/null + mount -t nullfs $mp1/f1 $mp2/m1 +done & +while [ -f $cont ]; do + while mount | grep -q "on $mp2/m2 "; do umount $mp2/m2; done 2> /dev/null + mount -t nullfs $mp1/f2 $mp2/m2 +done & +while [ -f $cont ]; do + while mount | grep -q "on $mp2/m3 "; do umount $mp2/m3; done 2> /dev/null + mount -t nullfs $mp1/f3 $mp2/m3 +done & + +start=`date +%s` +while [ $((`date +%s` - start)) -lt 300 ]; do + cat $mp2/m1 $mp2/m2 $mp2/m3 > /dev/null +done +rm -f $cont +while pgrep -q swap; do pkill swap; done +wait + +for i in 1 2 3; do + while mount | grep -q "on $mp2/m$i "; do umount $mp2/m$i; done 2> /dev/null +done + +# Check error handling +mount -t nullfs $mp1/f1 $mp2/m1 +mount -t nullfs $mp1/f1 $mp2/m1 2>/dev/null && s=1 || s=0 +while mount | grep -q "on $mp2/m1 "; do umount $mp2/m1; done 2> /dev/null + +mkdir $mp2/dir +mount -t nullfs $mp1/f1 $mp2/dir 2>/dev/null && s=2 + +umount $mp2 +umount $mp1 +mdconfig -d -u $md2 +mdconfig -d -u $md1 +exit $s From nobody Thu Jul 6 14:26:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qxf3n1j5xz4lPZQ; Thu, 6 Jul 2023 14:26: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 4Qxf3n0qKmz4LlB; Thu, 6 Jul 2023 14:26:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688653605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LcS6hEvktW/iBPCxfervmjcvPTbjlWyMciY/HEd661I=; b=FXiMzLS37rdmnGgPrfqii8hRri3dSJoQB5Nrso4z+ct/+aEO5/d7GnucUWPQ5//MGMdC9S o3Eu3laP2Njls1uvzmFoOeF3tJe1VGj8QDXdoC4qzUgss3G2uKLEv7LmmiWrk1/y0casa+ cXAHVVZgqT94uQu+AFES4phBOM3zRdj2Z3Zu14hAEPrEMy6JbkYcjJcaQ0hVpZ4jTRF8Ld wU99MRiDwY0Rl+iGK/wLIw16Ht5K6qyiI15OvKs42d6EKcYF6j/6XMvggktj+lsqHXxB0x zgqg9UENEl7k9AHDlEtWURj8PcUNCu0JTQ1PKw6q9wubO+9aqNHE2QgM7aWvuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688653605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LcS6hEvktW/iBPCxfervmjcvPTbjlWyMciY/HEd661I=; b=h01cc1PUJv5dnSmSf3E2PftTlYicx7jb0UGu/rCxGuzBx1uK82p7F5KGun7ap8oD2sQX41 g17pB78aNUVxTiPiHhJnzQ4HEdIKj+FxoGKa8ZzwkjuTV2dzB6QGfyJTNgev5m3ZiWihUM PuBbDZTHpvUrG+CTd3gZQKpIC6KZGnJzBe0oqWhQD4WGbVFNFYwGN2VLK4cifdvqMf9yxP yyZS0B1vt/WXXXNhDa4jpxVz2N3N6976uNScy6pUl2vLf2tX6MxBk9Fc9gDJ1328s0/Anu TyHa8M0S6oI1BYMBgaivv0xxpzwhetvStJVVHTqG/pMfd/MW1hF2wPVg6wJ6sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688653605; a=rsa-sha256; cv=none; b=yi0cPdIXQEoy0NADjB/H17VmrnjgXxAGW8MD47T5cj5LF936hZylzxy4GnUqpskXJAIIT2 QAviHzWRNVYLkZtxQpZ/m1hpcahCQfkkiZD2+tLGZH64ICK/Hn3bTq9bjdo1WixF5K52Ja gTAsi6yKHfxM1T9YrsrYQE/tLj7Gko17GQba8ER/jrE+qJBzsmjiqvsLUGu4RVAcgqQemJ OO2Ld49Iq1TQcOUv9LC1Gw/FA3yuPlqAtbYqsAejWpX2AevQI/lcEwJ/NbWFpiGI3AgKjf ao7iqULyOb/VLgx3JPYBq9e5y/uMU6pafcJrTqFF56Npg4U49NglzUgGpmzkwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qxf3m71b5z10lt; Thu, 6 Jul 2023 14:26: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 366EQipc084654; Thu, 6 Jul 2023 14:26:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366EQiWC084653; Thu, 6 Jul 2023 14:26:44 GMT (envelope-from git) Date: Thu, 6 Jul 2023 14:26:44 GMT Message-Id: <202307061426.366EQiWC084653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 5e7308a7bcb6 - main - hier(7): remove entry for non-existent /usr/compat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e7308a7bcb6675de6049afd4a5dd9d6795057b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5e7308a7bcb6675de6049afd4a5dd9d6795057b2 commit 5e7308a7bcb6675de6049afd4a5dd9d6795057b2 Author: Mitchell Horne AuthorDate: 2023-07-06 14:11:21 +0000 Commit: Mitchell Horne CommitDate: 2023-07-06 14:26:21 +0000 hier(7): remove entry for non-existent /usr/compat This is historical (?), but today /compat is the default according to linux(4). The only remaining reference to /usr/compat in the src tree is under tools/test/stress2. Add a next-level entry for /compat/linux. PR: 261349 Reviewed by: grahamperrin, karels, dchagin MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40876 --- share/man/man7/hier.7 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index bf0bb5050de3..16233f5ab254 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 29, 2023 +.Dd July 6, 2023 .Dt HIER 7 .Os .Sh NAME @@ -79,11 +79,15 @@ third-party loadable kernel modules, such as those associated with pool cache files .El .It Pa /compat/ -normally a link to -.Pa /usr/compat . -If not, then the -.Pa /usr/compat -comments apply +files supporting binary compatibility with other operating systems +.Pp +.Bl -tag -width "nvmecontrol/" -compact +.It Pa linux/ +default location for +.Xr linux 4 +compatibility run-time +.El +.Pp .It Pa /dev/ the normal mount point for .Xr devfs 5 @@ -201,9 +205,6 @@ contains the majority of user utilities and applications .Bl -tag -width "freebsd-dist/" -compact .It Pa bin/ common utilities, programming tools, and applications -.It Pa compat/ -files needed to support binary compatibility with other operating systems; see -.Xr linux 4 .It Pa freebsd-dist/ distribution files .Pq like base.txz ; see From nobody Thu Jul 6 14:43:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxfRB6p9Cz4lQPp; Thu, 6 Jul 2023 14:43: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 4QxfRB6JD8z4NbK; Thu, 6 Jul 2023 14:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688654614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iN/3jUL04jRpC8BaygvHdS6W6X0XQ1Fb6DKFvWH9g8s=; b=N9aJ9wBnmXI08f2sN4e0yUoLP0TGXswKw2kBDmjBGeg+dFJnCGdjH6/Puvra8jHN3XXyf9 008awerx12d4bBD+Cely7QBHLMyY6rE8eqxN5kAxPktSURg8cXFR6ZVe4+6shIwHUbrLjB KuiVMc8EEjKFBEfjshagLH4P9FHAJ5MA01sm81C9v40YWSjsgz6TkLhki2gQMPb6o+qJy3 qiYnWBxPV4uqXP7gmgrVMSOdgyjg5B2iq6c7MIMetQG7Q4usu5oLYpfwVTV9QsMetPSwwK 2jhxBKo5MwgSk5LOpHAqQxDFC5P7t0JQLfZqiwbvaf3f95STaXPyJCaJ5v4mtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688654614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iN/3jUL04jRpC8BaygvHdS6W6X0XQ1Fb6DKFvWH9g8s=; b=CaKZx9DtG1HKCXlc8c0BQDy1Md2v1sXag7mM+zWQCTSRw4EA2OgxRdGvsB62XzR/VGnVwk pCiFguhLI140SfGnqBFcqyZZ80JxSHRWNSqG4XDN/SeyZmHxbcvG6RxEDxYd7ny/vke3fq qWmX4/9GzYgSx4YiZgGVNH6TXeMbPqIAZ5oigq1tXNB13PoWSUNzwLlUxNmylwnGP0HJYH I63gMUx39cadsJ1m6GdMRO+G38mjjXo2z9DyQR4ikjRbVwW/p18NzOtR82Yl1/XZAzu1dd br7ZX0jf2O41mCfkqan/JFdu3lTkI8Z5xY5bdC8ErKamAM03iY5LsD72OVUUvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688654614; a=rsa-sha256; cv=none; b=rTiumq8081fay9khZGWENqZtfDvxaa5cQU69Nrrbhwvs5dwVyY4az/utHhPxfYEaYHxF63 QcPy+kKT5nbtqMOE/0Gj7P5rgxuLEl0xuezBa3y/YyckEUhb0PvZSCIQdwpxviuiVy8ff7 L0Sg3k+Rvb2FwvyPi1opScFMXO124g0aQykJaBEtr4dRk/TPHOAeq9o5Q7K78lE6lEssQl 1JVR5DEkvW5EDWZ5Huuehp07BMymo3i9La/M1RAKZGydTA9FWbbaoxRCCeZvdgLLObOyRA Evyd+JhJYDCNcRETw7FWUuhx+wmaHUr7eC+mfrhWXxIQmIvfbZaqpRleQ16xCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxfRB5Mqsz11HZ; Thu, 6 Jul 2023 14: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 366EhYge017123; Thu, 6 Jul 2023 14: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 366EhYp2017122; Thu, 6 Jul 2023 14:43:34 GMT (envelope-from git) Date: Thu, 6 Jul 2023 14:43:34 GMT Message-Id: <202307061443.366EhYp2017122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: b8f51b8c5423 - main - ixl: port ice's atomic API to ixl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8f51b8c5423af0795429836a00f2a968e791f6e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=b8f51b8c5423af0795429836a00f2a968e791f6e commit b8f51b8c5423af0795429836a00f2a968e791f6e Author: Piotr Kubaj AuthorDate: 2023-06-06 15:30:18 +0000 Commit: Piotr Kubaj CommitDate: 2023-07-06 14:43:57 +0000 ixl: port ice's atomic API to ixl Differential Revision: https://reviews.freebsd.org/D40532 Approved by: erj --- sys/dev/ixl/if_ixl.c | 21 +++++----- sys/dev/ixl/ixl_pf.h | 34 +++++++++------- sys/dev/ixl/ixl_pf_iflib.c | 16 ++++---- sys/dev/ixl/ixl_pf_main.c | 98 ++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 118 insertions(+), 51 deletions(-) diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index ca71edd9bd9e..7ebbed1f81c8 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -597,14 +597,14 @@ ixl_if_attach_pre(if_ctx_t ctx) if (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 3)) || (pf->hw.aq.fw_maj_ver < 4)) { i40e_aq_stop_lldp(hw, true, false, NULL); - pf->state |= IXL_PF_STATE_FW_LLDP_DISABLED; + ixl_set_state(&pf->state, IXL_STATE_FW_LLDP_DISABLED); } /* Try enabling Energy Efficient Ethernet (EEE) mode */ if (i40e_enable_eee(hw, true) == I40E_SUCCESS) - atomic_set_32(&pf->state, IXL_PF_STATE_EEE_ENABLED); + ixl_set_state(&pf->state, IXL_STATE_EEE_ENABLED); else - atomic_clear_32(&pf->state, IXL_PF_STATE_EEE_ENABLED); + ixl_clear_state(&pf->state, IXL_STATE_EEE_ENABLED); /* Get MAC addresses from hardware */ i40e_get_mac_addr(hw, hw->mac.addr); @@ -629,11 +629,11 @@ ixl_if_attach_pre(if_ctx_t ctx) /* Query device FW LLDP status */ if (i40e_get_fw_lldp_status(hw, &lldp_status) == I40E_SUCCESS) { if (lldp_status == I40E_GET_FW_LLDP_STATUS_DISABLED) { - atomic_set_32(&pf->state, - IXL_PF_STATE_FW_LLDP_DISABLED); + ixl_set_state(&pf->state, + IXL_STATE_FW_LLDP_DISABLED); } else { - atomic_clear_32(&pf->state, - IXL_PF_STATE_FW_LLDP_DISABLED); + ixl_clear_state(&pf->state, + IXL_STATE_FW_LLDP_DISABLED); } } @@ -772,7 +772,7 @@ ixl_if_attach_post(if_ctx_t ctx) * Driver may have been reloaded. Ensure that the link state * is consistent with current settings. */ - ixl_set_link(pf, (pf->state & IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) != 0); + ixl_set_link(pf, ixl_test_state(&pf->state, IXL_STATE_LINK_ACTIVE_ON_DOWN)); hw->phy.get_link_info = true; i40e_get_link_status(hw, &pf->link_up); @@ -1032,8 +1032,7 @@ ixl_if_stop(if_ctx_t ctx) * e.g. on MTU change. */ if ((if_getflags(ifp) & IFF_UP) == 0 && - (atomic_load_acq_32(&pf->state) & - IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) == 0) + !ixl_test_state(&pf->state, IXL_STATE_LINK_ACTIVE_ON_DOWN)) ixl_set_link(pf, false); } @@ -1417,7 +1416,7 @@ ixl_if_update_admin_status(if_ctx_t ctx) if (!i40e_check_asq_alive(&pf->hw)) return; - if (pf->state & IXL_PF_STATE_MDD_PENDING) + if (ixl_test_state(&pf->state, IXL_STATE_MDD_PENDING)) ixl_handle_mdd_event(pf); ixl_process_adminq(pf, &pending); diff --git a/sys/dev/ixl/ixl_pf.h b/sys/dev/ixl/ixl_pf.h index 0b95cdd1bd4b..80b35fcb6696 100644 --- a/sys/dev/ixl/ixl_pf.h +++ b/sys/dev/ixl/ixl_pf.h @@ -76,26 +76,26 @@ enum ixl_i2c_access_method_t { }; /* Used in struct ixl_pf's state field */ -enum ixl_pf_state { - IXL_PF_STATE_RECOVERY_MODE = (1 << 0), - IXL_PF_STATE_RESETTING = (1 << 1), - IXL_PF_STATE_MDD_PENDING = (1 << 2), - IXL_PF_STATE_PF_RESET_REQ = (1 << 3), - IXL_PF_STATE_VF_RESET_REQ = (1 << 4), - IXL_PF_STATE_PF_CRIT_ERR = (1 << 5), - IXL_PF_STATE_CORE_RESET_REQ = (1 << 6), - IXL_PF_STATE_GLOB_RESET_REQ = (1 << 7), - IXL_PF_STATE_EMP_RESET_REQ = (1 << 8), - IXL_PF_STATE_FW_LLDP_DISABLED = (1 << 9), - IXL_PF_STATE_EEE_ENABLED = (1 << 10), - IXL_PF_STATE_LINK_ACTIVE_ON_DOWN = (1 << 11), +enum ixl_state { + IXL_STATE_RECOVERY_MODE = 0, + IXL_STATE_RESETTING = 1, + IXL_STATE_MDD_PENDING = 2, + IXL_STATE_PF_RESET_REQ = 3, + IXL_STATE_VF_RESET_REQ = 4, + IXL_STATE_PF_CRIT_ERR = 5, + IXL_STATE_CORE_RESET_REQ = 6, + IXL_STATE_GLOB_RESET_REQ = 7, + IXL_STATE_EMP_RESET_REQ = 8, + IXL_STATE_FW_LLDP_DISABLED = 9, + IXL_STATE_EEE_ENABLED = 10, + IXL_STATE_LINK_ACTIVE_ON_DOWN = 11, }; #define IXL_PF_IN_RECOVERY_MODE(pf) \ - ((atomic_load_acq_32(&pf->state) & IXL_PF_STATE_RECOVERY_MODE) != 0) + ixl_test_state(&pf->state, IXL_STATE_RECOVERY_MODE) #define IXL_PF_IS_RESETTING(pf) \ - ((atomic_load_acq_32(&pf->state) & IXL_PF_STATE_RESETTING) != 0) + ixl_test_state(&pf->state, IXL_STATE_RESETTING) struct ixl_vf { struct ixl_vsi vsi; @@ -284,6 +284,10 @@ struct ixl_pf { #define ixl_dbg_iov(pf, s, ...) ixl_debug_core((pf)->dev, (pf)->dbg_mask, IXL_DBG_IOV, s, ##__VA_ARGS__) /* PF-only function declarations */ +void ixl_set_state(volatile u32 *s, enum ixl_state bit); +void ixl_clear_state(volatile u32 *s, enum ixl_state bit); +bool ixl_test_state(volatile u32 *s, enum ixl_state bit); +u32 ixl_testandset_state(volatile u32 *s, enum ixl_state bit); int ixl_setup_interface(device_t, struct ixl_pf *); void ixl_print_nvm_cmd(device_t, struct i40e_nvm_access *); diff --git a/sys/dev/ixl/ixl_pf_iflib.c b/sys/dev/ixl/ixl_pf_iflib.c index eeb8f28393c2..e0452c7dc01e 100644 --- a/sys/dev/ixl/ixl_pf_iflib.c +++ b/sys/dev/ixl/ixl_pf_iflib.c @@ -158,7 +158,7 @@ ixl_msix_adminq(void *arg) if (reg & I40E_PFINT_ICR0_MAL_DETECT_MASK) { mask &= ~I40E_PFINT_ICR0_ENA_MAL_DETECT_MASK; - atomic_set_32(&pf->state, IXL_PF_STATE_MDD_PENDING); + ixl_set_state(&pf->state, IXL_STATE_MDD_PENDING); do_task = TRUE; } @@ -185,7 +185,7 @@ ixl_msix_adminq(void *arg) } device_printf(dev, "Reset Requested! (%s)\n", reset_type); /* overload admin queue task to check reset progress */ - atomic_set_int(&pf->state, IXL_PF_STATE_RESETTING); + ixl_set_state(&pf->state, IXL_STATE_RESETTING); do_task = TRUE; } @@ -202,8 +202,8 @@ ixl_msix_adminq(void *arg) /* Checks against the conditions above */ if (reg & IXL_ICR0_CRIT_ERR_MASK) { mask &= ~IXL_ICR0_CRIT_ERR_MASK; - atomic_set_32(&pf->state, - IXL_PF_STATE_PF_RESET_REQ | IXL_PF_STATE_PF_CRIT_ERR); + ixl_set_state(&pf->state, + IXL_STATE_PF_RESET_REQ | IXL_STATE_PF_CRIT_ERR); do_task = TRUE; } @@ -1037,11 +1037,11 @@ ixl_rebuild_hw_structs_after_reset(struct ixl_pf *pf, bool is_up) /* Query device FW LLDP status */ if (i40e_get_fw_lldp_status(hw, &lldp_status) == I40E_SUCCESS) { if (lldp_status == I40E_GET_FW_LLDP_STATUS_DISABLED) { - atomic_set_32(&pf->state, - IXL_PF_STATE_FW_LLDP_DISABLED); + ixl_set_state(&pf->state, + IXL_STATE_FW_LLDP_DISABLED); } else { - atomic_clear_32(&pf->state, - IXL_PF_STATE_FW_LLDP_DISABLED); + ixl_clear_state(&pf->state, + IXL_STATE_FW_LLDP_DISABLED); } } diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 25ced54e79e1..4a28afc185f0 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -116,6 +116,71 @@ static char *ixl_fec_string[3] = { "None" }; +/* Functions for setting and checking driver state. Note the functions take + * bit positions, not bitmasks. The atomic_set_32 and atomic_clear_32 + * operations require bitmasks. This can easily lead to programming error, so + * we provide wrapper functions to avoid this. + */ + +/** + * ixl_set_state - Set the specified state + * @s: the state bitmap + * @bit: the state to set + * + * Atomically update the state bitmap with the specified bit set. + */ +inline void +ixl_set_state(volatile u32 *s, enum ixl_state bit) +{ + /* atomic_set_32 expects a bitmask */ + atomic_set_32(s, BIT(bit)); +} + +/** + * ixl_clear_state - Clear the specified state + * @s: the state bitmap + * @bit: the state to clear + * + * Atomically update the state bitmap with the specified bit cleared. + */ +inline void +ixl_clear_state(volatile u32 *s, enum ixl_state bit) +{ + /* atomic_clear_32 expects a bitmask */ + atomic_clear_32(s, BIT(bit)); +} + +/** + * ixl_test_state - Test the specified state + * @s: the state bitmap + * @bit: the bit to test + * + * Return true if the state is set, false otherwise. Use this only if the flow + * does not need to update the state. If you must update the state as well, + * prefer ixl_testandset_state. + */ +inline bool +ixl_test_state(volatile u32 *s, enum ixl_state bit) +{ + return !!(*s & BIT(bit)); +} + +/** + * ixl_testandset_state - Test and set the specified state + * @s: the state bitmap + * @bit: the bit to test + * + * Atomically update the state bitmap, setting the specified bit. Returns the + * previous value of the bit. + */ +inline u32 +ixl_testandset_state(volatile u32 *s, enum ixl_state bit) +{ + /* atomic_testandset_32 expects a bit position, as opposed to bitmask + expected by other atomic functions */ + return atomic_testandset_32(s, bit); +} + MALLOC_DEFINE(M_IXL, "ixl", "ixl driver allocations"); /* @@ -210,7 +275,7 @@ ixl_pf_reset(struct ixl_pf *pf) fw_mode = ixl_get_fw_mode(pf); ixl_dbg_info(pf, "%s: before PF reset FW mode: 0x%08x\n", __func__, fw_mode); if (fw_mode == IXL_FW_MODE_RECOVERY) { - atomic_set_32(&pf->state, IXL_PF_STATE_RECOVERY_MODE); + ixl_set_state(&pf->state, IXL_STATE_RECOVERY_MODE); /* Don't try to reset device if it's in recovery mode */ return (0); } @@ -224,7 +289,7 @@ ixl_pf_reset(struct ixl_pf *pf) fw_mode = ixl_get_fw_mode(pf); ixl_dbg_info(pf, "%s: after PF reset FW mode: 0x%08x\n", __func__, fw_mode); if (fw_mode == IXL_FW_MODE_RECOVERY) { - atomic_set_32(&pf->state, IXL_PF_STATE_RECOVERY_MODE); + ixl_set_state(&pf->state, IXL_STATE_RECOVERY_MODE); return (0); } @@ -387,7 +452,7 @@ retry: } /* Keep link active by default */ - atomic_set_32(&pf->state, IXL_PF_STATE_LINK_ACTIVE_ON_DOWN); + ixl_set_state(&pf->state, IXL_STATE_LINK_ACTIVE_ON_DOWN); /* Print a subset of the capability information. */ device_printf(dev, @@ -1869,7 +1934,7 @@ ixl_handle_mdd_event(struct ixl_pf *pf) ixl_handle_tx_mdd_event(pf); ixl_handle_rx_mdd_event(pf); - atomic_clear_32(&pf->state, IXL_PF_STATE_MDD_PENDING); + ixl_clear_state(&pf->state, IXL_STATE_MDD_PENDING); /* re-enable mdd interrupt cause */ reg = rd32(hw, I40E_PFINT_ICR0_ENA); @@ -1937,7 +2002,7 @@ ixl_handle_empr_reset(struct ixl_pf *pf) if (!IXL_PF_IN_RECOVERY_MODE(pf) && ixl_get_fw_mode(pf) == IXL_FW_MODE_RECOVERY) { - atomic_set_32(&pf->state, IXL_PF_STATE_RECOVERY_MODE); + ixl_set_state(&pf->state, IXL_STATE_RECOVERY_MODE); device_printf(pf->dev, "Firmware recovery mode detected. Limiting functionality. Refer to Intel(R) Ethernet Adapters and Devices User Guide for details on firmware recovery mode.\n"); pf->link_up = FALSE; @@ -1946,7 +2011,7 @@ ixl_handle_empr_reset(struct ixl_pf *pf) ixl_rebuild_hw_structs_after_reset(pf, is_up); - atomic_clear_32(&pf->state, IXL_PF_STATE_RESETTING); + ixl_clear_state(&pf->state, IXL_STATE_RESETTING); } void @@ -4453,7 +4518,7 @@ ixl_start_fw_lldp(struct ixl_pf *pf) } } - atomic_clear_32(&pf->state, IXL_PF_STATE_FW_LLDP_DISABLED); + ixl_clear_state(&pf->state, IXL_STATE_FW_LLDP_DISABLED); return (0); } @@ -4490,7 +4555,7 @@ ixl_stop_fw_lldp(struct ixl_pf *pf) } i40e_aq_set_dcb_parameters(hw, true, NULL); - atomic_set_32(&pf->state, IXL_PF_STATE_FW_LLDP_DISABLED); + ixl_set_state(&pf->state, IXL_STATE_FW_LLDP_DISABLED); return (0); } @@ -4500,7 +4565,7 @@ ixl_sysctl_fw_lldp(SYSCTL_HANDLER_ARGS) struct ixl_pf *pf = (struct ixl_pf *)arg1; int state, new_state, error = 0; - state = new_state = ((pf->state & IXL_PF_STATE_FW_LLDP_DISABLED) == 0); + state = new_state = !ixl_test_state(&pf->state, IXL_STATE_FW_LLDP_DISABLED); /* Read in new mode */ error = sysctl_handle_int(oidp, &new_state, 0, req); @@ -4526,7 +4591,7 @@ ixl_sysctl_eee_enable(SYSCTL_HANDLER_ARGS) enum i40e_status_code cmd_status; /* Init states' values */ - state = new_state = (!!(pf->state & IXL_PF_STATE_EEE_ENABLED)); + state = new_state = ixl_test_state(&pf->state, IXL_STATE_EEE_ENABLED); /* Get requested mode */ sysctl_handle_status = sysctl_handle_int(oidp, &new_state, 0, req); @@ -4543,9 +4608,9 @@ ixl_sysctl_eee_enable(SYSCTL_HANDLER_ARGS) /* Save new state or report error */ if (!cmd_status) { if (new_state == 0) - atomic_clear_32(&pf->state, IXL_PF_STATE_EEE_ENABLED); + ixl_clear_state(&pf->state, IXL_STATE_EEE_ENABLED); else - atomic_set_32(&pf->state, IXL_PF_STATE_EEE_ENABLED); + ixl_set_state(&pf->state, IXL_STATE_EEE_ENABLED); } else if (cmd_status == I40E_ERR_CONFIG) return (EPERM); else @@ -4560,17 +4625,16 @@ ixl_sysctl_set_link_active(SYSCTL_HANDLER_ARGS) struct ixl_pf *pf = (struct ixl_pf *)arg1; int error, state; - state = !!(atomic_load_acq_32(&pf->state) & - IXL_PF_STATE_LINK_ACTIVE_ON_DOWN); + state = ixl_test_state(&pf->state, IXL_STATE_LINK_ACTIVE_ON_DOWN); error = sysctl_handle_int(oidp, &state, 0, req); if ((error) || (req->newptr == NULL)) return (error); if (state == 0) - atomic_clear_32(&pf->state, IXL_PF_STATE_LINK_ACTIVE_ON_DOWN); + ixl_clear_state(&pf->state, IXL_STATE_LINK_ACTIVE_ON_DOWN); else - atomic_set_32(&pf->state, IXL_PF_STATE_LINK_ACTIVE_ON_DOWN); + ixl_set_state(&pf->state, IXL_STATE_LINK_ACTIVE_ON_DOWN); return (0); } @@ -4617,7 +4681,7 @@ ixl_sysctl_do_pf_reset(SYSCTL_HANDLER_ARGS) return (error); /* Initiate the PF reset later in the admin task */ - atomic_set_32(&pf->state, IXL_PF_STATE_PF_RESET_REQ); + ixl_set_state(&pf->state, IXL_STATE_PF_RESET_REQ); return (error); } From nobody Thu Jul 6 15:39:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxghB14QRz4lXl7; Thu, 6 Jul 2023 15:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QxghB0Zmdz3DYt; Thu, 6 Jul 2023 15:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688657994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=877cKfzQwljcuRq4WWLQwEgzSRy9s0ze1ISdXt++I8Y=; b=SnYAGECrz6k65FB3y1+mQrXmZWohAyC2O/IPZ7/drChWXxIuy0wG7wqdd3v7hmZl/Oh3qB wBKBUfHjHuqaN5s6iXeph9yC56h7Cjqf8aJXI5g7CSuOT/0xOyKpiroeyuKVmvy5ZRurJQ wdzU7iBIrLWt7gsUx9RR2S5R8QXRCfO8+j+NSG69AA/W/s4g7S4VJr4hJzN3KfhW1vzMl/ iEYYRU46kA784I9kxwQe5MCQSlOsrqIh4wvGg+jflZ2bFunMSnc/ZazdyOfoVwzF9oI2vB kTlMickEc6hMDNeRpESVy3crgun+4voCoJsJYvHHZR8wXDW4YUg0buS2V+CEUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688657994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=877cKfzQwljcuRq4WWLQwEgzSRy9s0ze1ISdXt++I8Y=; b=tbvsOGQFbicHztzUjmejBLzTdUCSNlslTOpFJkZxl+L9H5sY+38mW/n4zQJrz9oWHR1D1r 0/1TASHSmTVIXN/moheg7EpfR/7wUvGm7Efsatg/62fm8v+dJFVwMKcEaUPk+gumRlZRdk ox0wSi6LEQKfvFvdQAPwb2ce7gk12K6D4rcPOGkx5iQVPrN6IcH3l2D8DsYYbX3cJzPwIj CdbGYTsEgqVHPZ3uJJonULqvrtGzzfd/tY96A7TeNVds160DL938t2x9gtDP8FdSc3TPRn XkoXM/MBDL/FHxqc0t4U2i2u/nuzjW7hdPz1UfscWBlZjWCYmqpYAH5KkWFymA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688657994; a=rsa-sha256; cv=none; b=tuExc0JGaarcoZ++A0ByMl8bWorw8U88Plte1iU3aDyVSs5tHIedo0QZEzi5vvhuEZPxmb nc1pSr0+VxVPqlTmpoETNOpCpjO0c8/C2th9XretlPrQU3v+EOHshH64CpRQOxr3OMlcwK d51bF9goXcrt5cbIkd7U339NI64PEJ1FKrF78PA+M3oZBTA814nFFlqVhYcCoZOOJN+Lm5 EnMqrjjFZ960JEedR3Z4xPdzpvoNk357SqntUoz5yjADEcNIVsK9NcsjXV9/QNfRSV0B9+ ClCNQA1GcCfIWJVmgpajHdiussgjos88smS/vBx5AXMc2f10w4Sj5uupB79nlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qxgh96kFXz12MJ; Thu, 6 Jul 2023 15:39: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 366FdrYT000994; Thu, 6 Jul 2023 15:39:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366FdrSe000993; Thu, 6 Jul 2023 15:39:53 GMT (envelope-from git) Date: Thu, 6 Jul 2023 15:39:53 GMT Message-Id: <202307061539.366FdrSe000993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 98358de5754c - stable/12 - Fix spurious error from sysrc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 98358de5754cc85b50309323ff72a66193502107 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=98358de5754cc85b50309323ff72a66193502107 commit 98358de5754cc85b50309323ff72a66193502107 Author: Devin Teske AuthorDate: 2019-12-02 05:24:16 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-07-06 15:39:23 +0000 Fix spurious error from sysrc When using sysrc to modify a file, the file should be created silently. However, with the introduction of SVN r335280, an error of "No such file or directory" would appear despite everything else working as-expected. The nature of this spurious error is that SVN r335280 did not check if the file exists first, before trying to fixup the line-endings in the file just prior to modification. PR: bin/240875 Reported by: Jose Luis Duran MFC after: 3 days (cherry picked from commit e19a2226fe3bbeeb6e922987475300868374d09a) --- usr.sbin/bsdconfig/share/sysrc.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdconfig/share/sysrc.subr b/usr.sbin/bsdconfig/share/sysrc.subr index 010d240f680a..11298f00f47a 100644 --- a/usr.sbin/bsdconfig/share/sysrc.subr +++ b/usr.sbin/bsdconfig/share/sysrc.subr @@ -560,7 +560,7 @@ f_sysrc_set() # if [ "$not_found" ]; then # Add a newline if missing before appending to the file - awk 'BEGIN { wc = 0 } NR == 1 { + [ ! -e "$file" ] || awk 'BEGIN { wc = 0 } NR == 1 { (cmd = "wc -l " FILENAME) | getline close(cmd) wc = $1 From nobody Thu Jul 6 16:26:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxhkS53H4z4lfWd; Thu, 6 Jul 2023 16:26: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 4QxhkS3VF1z3KlF; Thu, 6 Jul 2023 16:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688660816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zvk4p/hsWd8jdnS2MSYSfLjm09rljyr1my7yNLUeqFE=; b=yIOSwigJ5e/YUZrjgnRNlxtbV5r0kQSMkxWtpvzz2xkooAvhhV9P7A5492VZn3l6yjfslo dFtQ+w4Oy65VJbdwUvWEoMY2h4c9ARhLCpMjATvCyL0wF37tSaBqpcmT1TgcqSedEOpoIk qa10NPruW/brjCzvXs+7BsxD1jEULplD/oTLX+7/h7lmYJDUMTnptSOkbyMn9fQFeP0jFW LbCH74hAJxAJle+kdWbiOON9Z48QcZOyprcH+1e56mfyjA/ubu7lrxUAc2GCGKmEx1v3Il EseB2OYpSE/MTMTSgU08mc32e8Yk02UxMbVFQDgczKipiI78AI0IPugaA63yXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688660816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zvk4p/hsWd8jdnS2MSYSfLjm09rljyr1my7yNLUeqFE=; b=BS7mwaOP1UqiNDlQ98UuJQFa6fp77390B9oB5qu1gN5gN9UEOwaHMlfjNX+C7usipi55Ld O8hf27+LEC48XRoxmqIVJdxLWwnpM5fjchP0a5+0+gLZjqh9JtTxFrMxiYVVhKo2KU89Id zBw7d7bhJ+PqWM/tgbq7VKcLYSAXkkLPJ14WRpBeJeGgKVSsUr9Vgl8dG1/g/tPiZ+cfhg uw1d9jlubj/S51xN9TfjS9uOP7gQ7uSG0gBrjOxD3JakAN+ei1DSYXJDLB6caELiQW59ay 37YXC6uDNer3zLjjVrRiXyjRA+KZFTVx4DowvyX60fIAfJZ0wXRRehF6POMc3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688660816; a=rsa-sha256; cv=none; b=hxLq+sbNC4NK4Fefr3sNUzba3sDojl6pn8pfWIjkq7xRx17Zp9ZqiC+6fyKsu51iNAYdU9 Wh8jp5polEQMorSv/kJT3n/1R9WPoQfb3W4Hs/Xw6zIxsfqIpf7wfVWAbPPraA0bAkH4ut 42Mdr7Idy1t73pJwFQpUh/wEh+rY1gcBR/FZ5YC/PJTV0xBkufl5uCfRKJ5n5/yhJ9wdZD gl66FPnmxXcbL+uzh8JsjNLfkSwuB6kS0IP/MG2AhQf29p0ErRgiC8WHyLMGTCTqW8lr82 i2vbTr49/sXsUlOomniM2D/1WzVnH9AhysbU5IcQlxi0YLFPw3QtdwIIHRqZgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxhkS2Z45z13X8; Thu, 6 Jul 2023 16:26: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 366GQupQ083124; Thu, 6 Jul 2023 16:26:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366GQurM083123; Thu, 6 Jul 2023 16:26:56 GMT (envelope-from git) Date: Thu, 6 Jul 2023 16:26:56 GMT Message-Id: <202307061626.366GQurM083123@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: 6eabf4ce35ec - main - mac_veriexec ensure label fields are initialized List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6eabf4ce35ec1c79ab9a9dbe70ac934d62d2cd5d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6eabf4ce35ec1c79ab9a9dbe70ac934d62d2cd5d commit 6eabf4ce35ec1c79ab9a9dbe70ac934d62d2cd5d Author: Simon J. Gerraty AuthorDate: 2023-07-06 16:26:15 +0000 Commit: Simon J. Gerraty CommitDate: 2023-07-06 16:26:15 +0000 mac_veriexec ensure label fields are initialized Obtained from: bkumara@juniper.net --- sys/security/mac_veriexec/veriexec_metadata.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/security/mac_veriexec/veriexec_metadata.c b/sys/security/mac_veriexec/veriexec_metadata.c index 4e25b1672575..b0491bde7d16 100644 --- a/sys/security/mac_veriexec/veriexec_metadata.c +++ b/sys/security/mac_veriexec/veriexec_metadata.c @@ -732,14 +732,12 @@ search: ip->ops = fpops; ip->fileid = fileid; ip->gen = gen; + ip->label = NULL; + ip->labellen = 0; memcpy(ip->fingerprint, fingerprint, fpops->digest_len); if (flags & VERIEXEC_LABEL) ip->labellen = mac_veriexec_init_label(&ip->label, ip->labellen, label, labellen); - else { - ip->label = NULL; - ip->labellen = 0; - } VERIEXEC_DEBUG(3, ("add file %ju.%lu (files=%d)\n", (uintmax_t)ip->fileid, From nobody Thu Jul 6 17:22:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxjyH1lYVz4lmjx; Thu, 6 Jul 2023 17:22: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 4QxjyH1KfDz3QY3; Thu, 6 Jul 2023 17:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688664135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ueoaDruf3ix9/Zm8lrIuh6hGnpf5TxA7PTbkmYxDnQ=; b=UhzJEVy7DhV1tN+M20tOgs99JPpdW7BTjCkcr5igYRMd3tu/H6mlEuGqRzbau63JIT4kWa SihfFxkRvWFgXL/6o+0sO4Yb29Ypnm4gC0ch3Ke4X1enhW4vU+VlUVn4PsNXteWhEmguMX Dd2YGN7XI9XtQNNCSGKZcginZVofxoMxDzOtsIIYYmOCPTIJevovHIVKOccZqULyTFQcC2 M01Dd+2SZrZi5FTl9uJq83gdaPkI37wS/Bl5L7yCBSfNM9wDiNUu1qsHbwuV06P+WwAGs1 26Smgxu+sdVSMesDVReBAPoShYNF0REX5BKoRqpv0zCyxOrC9izOExCSxHrUnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688664135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ueoaDruf3ix9/Zm8lrIuh6hGnpf5TxA7PTbkmYxDnQ=; b=QbUkk+sdJ7zVS7/e7QxHq6Ds6EeRyqZWvz5uSieCh4SM5bTS7Isb2AV7NaSNwyIYhQTaf1 +AiEqoIDozulfI08NNdNUAM3GRr9FmLX1lrpbKg22jWPt7hJFJDgdNwqiRRu55/tRrtUoZ mxZRxRiP0384rV3djWJFIih3sij5Ah6kSUUEDqwWkklsMPNSyC/0s/z9JEFdgopGNczyl2 fOsBA10HnrjTqqTPnqVi9v2vbHpvzOLNnAulw4Mj9A30udOPbVQgGmwsVTmVxBD7+5ymop G89BMbDbaAz+jdZfJEVCeicrN9exrLC1Qqr9EGq7lzXj5Py094m5x+2LiMJ8Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688664135; a=rsa-sha256; cv=none; b=dk+5HFxvlQqXiRb49ViYP9QwKntQY09kGMXUaSycCg3LJeZqDJOM7j2x8Z0Nn3c8wygIZa S3NiI6KFowpaeGmTvZYya7+5H7s++vjmo2ufw2lVedzd+triG1DhSXOqymN4Sdsy54ywFY 80nhHWsdLEOIGqlkJ+VyNEIxppfQa1P70OI2B5MNqTmRTy01947Opl+eJEVMb8XV66c6AP iV8WB8l9wFjheK7agFVgtJQ383t3i/grIFPrwWcyl1kXKffcgvnCfWhZ5zkQLWP3RAjy+5 3QhCY698LOB8duodrn25pkqHbAOI3dY6fGYyiCY80JwvJkETDKj2riRtS+MEsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxjyH0QWqz15VW; Thu, 6 Jul 2023 17:22: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 366HMF4n079922; Thu, 6 Jul 2023 17:22:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366HMEiF079921; Thu, 6 Jul 2023 17:22:14 GMT (envelope-from git) Date: Thu, 6 Jul 2023 17:22:14 GMT Message-Id: <202307061722.366HMEiF079921@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: acfd26152424 - main - libc: Improve setjmp comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acfd26152424b39f99cc0224c970eb5cf8ce93f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=acfd26152424b39f99cc0224c970eb5cf8ce93f0 commit acfd26152424b39f99cc0224c970eb5cf8ce93f0 Author: Dmitry Chagin AuthorDate: 2023-07-06 17:21:54 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-06 17:21:54 +0000 libc: Improve setjmp comments Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D40879 --- lib/libc/amd64/gen/_setjmp.S | 6 +++--- lib/libc/amd64/gen/setjmp.S | 6 +++--- lib/libc/amd64/gen/sigsetjmp.S | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/libc/amd64/gen/_setjmp.S b/lib/libc/amd64/gen/_setjmp.S index 0e1e5f8f265d..034900305e9a 100644 --- a/lib/libc/amd64/gen/_setjmp.S +++ b/lib/libc/amd64/gen/_setjmp.S @@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$"); ENTRY(_setjmp) movq %rdi,%rax - movq 0(%rsp),%rdx /* retval */ - movq %rdx, 0(%rax) /* 0; retval */ + movq 0(%rsp),%rdx /* return address */ + movq %rdx, 0(%rax) /* 0; return address */ movq %rbx, 8(%rax) /* 1; rbx */ movq %rsp,16(%rax) /* 2; rsp */ movq %rbp,24(%rax) /* 3; rbp */ @@ -88,7 +88,7 @@ ENTRY(___longjmp) testq %rax,%rax jnz 1f incq %rax -1: movq %rcx,0(%rsp) +1: movq %rcx,0(%rsp) /* return address */ ret END(___longjmp) diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S index 90eff9e9ed6b..173a2d29953a 100644 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -58,8 +58,8 @@ ENTRY(setjmp) call __libc_sigprocmask popq %rdi movq %rdi,%rcx - movq 0(%rsp),%rdx /* retval */ - movq %rdx, 0(%rcx) /* 0; retval */ + movq 0(%rsp),%rdx /* return address */ + movq %rdx, 0(%rcx) /* 0; return address */ movq %rbx, 8(%rcx) /* 1; rbx */ movq %rsp,16(%rcx) /* 2; rsp */ movq %rbp,24(%rcx) /* 3; rbp */ @@ -109,7 +109,7 @@ ENTRY(__longjmp) testq %rax,%rax jnz 1f incq %rax -1: movq %rcx,0(%rsp) +1: movq %rcx,0(%rsp) /* return address */ ret END(__longjmp) diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S index 447134122019..743b8a631d3b 100644 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -66,8 +66,8 @@ ENTRY(sigsetjmp) call __libc_sigprocmask popq %rdi 2: movq %rdi,%rcx - movq 0(%rsp),%rdx /* retval */ - movq %rdx, 0(%rcx) /* 0; retval */ + movq 0(%rsp),%rdx /* return address */ + movq %rdx, 0(%rcx) /* 0; return address */ movq %rbx, 8(%rcx) /* 1; rbx */ movq %rsp,16(%rcx) /* 2; rsp */ movq %rbp,24(%rcx) /* 3; rbp */ @@ -109,7 +109,7 @@ ENTRY(__siglongjmp) testq %rax,%rax jnz 1f incq %rax -1: movq %rcx,0(%rsp) +1: movq %rcx,0(%rsp) /* return address */ ret END(__siglongjmp) From nobody Thu Jul 6 17:26:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qxk3V0Wrlz4lnnZ; Thu, 6 Jul 2023 17:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qxk3V055Pz3h29; Thu, 6 Jul 2023 17:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688664406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=74a1wifpejbX4meCU7bM1/RbaP4b9gIN+VSqQt74ZlA=; b=V2aH/6LDXN8tXC6aHteJf5upLaaADJLC9yA9CGh/PZLi1IcjMcTtJC/5ExkdLCh3U8RG02 l9N7yFP/wqzGq9A4/DcHiiiChl/pspCh6GkesdpNIBw7B9nTq9cgFv5zX6g/ZSSZLYVA1a v9RGrnR9QQSu3T6zydd150YZOtt+icjgu3xGYBwrCKMVzZ+c7PF3xYLWI5FgMARBI4omO8 Mz7X4h6b58uIFoH79/dvKAqg5iuW+Q9kRuD5+OBFJ8JAVf6b4FTrGrw/YXIXjFpbKoPzDb 0R7kPnYtjJe6tozBofQOmf75KQKOgDhG2PMOmSqrxyRCGK86hIZESfN6trhuVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688664406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=74a1wifpejbX4meCU7bM1/RbaP4b9gIN+VSqQt74ZlA=; b=ojZVtxeEVjldYCTeXCymFsRY5X48Bpja/2BaFG2pbCvhjEFgcQVbSM+cIHB28/hQKAB2UL pguAbH6A7yJ4qOydaOVBr0OW7ZEGEhjOF52ENfvPVTEgvEYerta15QA021QdYy/55qX1rx wWj2/Fymg0TLi+DCN0i6F8+ID0AYTeu1D7jURELUmqTwCJWMc55RIz+kHlPkJurQQhR0AA Nev52IgNYwrqRGooAyjiYgQTpTsX31X28asMy7nipio5Dfpi1A0wuRab5y4Cr8yJ2cF/+G IexWCkqR+QofuLpC1rQGD70gNbDIvI8vOs1CCsiH9OvBhX4e0t5nzxhnBWynNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688664406; a=rsa-sha256; cv=none; b=X1yE3ZZFTt1z1jeBsUtJ5nyliOTcddjHuEeyD3PNqvMkXOfgqIcy3Ll8IfwoPEUu00JTlt 0O1CUTWR+k8jXucVM8mVFDHBbfmTkBzXaR7YVHEsraky3H0rA7y9NDaB1+XkdlM74LTGaa vCvTS1H+M4k4RT6b+MehU75t5P5GqZayMAupJn8qmWCw9h5KA/Pm9Ia3uNSYYdcOXuUDck nCqSiT66S8UoEg+ADRJHyum9geY4M6SkXtf59I4DJOX+z3GRp8G1ENZDqKv1olkPb7p5bk c990eNPsEeuGr2ZOHGpr+/87fK4v4faAYKtFVo5BENhFQc8mYqlFj5dHWKkyHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qxk3T6Bxtz15M1; Thu, 6 Jul 2023 17:26:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 366HQjiS081857; Thu, 6 Jul 2023 17:26:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366HQj28081856; Thu, 6 Jul 2023 17:26:45 GMT (envelope-from git) Date: Thu, 6 Jul 2023 17:26:45 GMT Message-Id: <202307061726.366HQj28081856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: e8404a72c5df - main - vgapci: Don't create a drm helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8404a72c5df939cd9ad869b12cf038c6846440a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=e8404a72c5df939cd9ad869b12cf038c6846440a commit e8404a72c5df939cd9ad869b12cf038c6846440a Author: Dmitry Chagin AuthorDate: 2023-07-06 17:26:24 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-06 17:26:24 +0000 vgapci: Don't create a drm helper Simply speaking, being started the drm-kmod driver should create sysfs helpers, which is «drm» class devices, with the unit number 0, 128 and, perhaps 64. If a drm helper created by vgapci driver with the corresponding unit number exists then the drm-kmod driver initialize it by the device_initialize() lkpi method, otherwise drm-kmod driver create new «drm» device. For hw, where two or more different GPU installed, it's not guaranteed that the order of loading GPU drivers will be the same as the vgapci devices numbered. I.e., on hw where vgapci0 is Nvidia GPU and vgapci1 is Intel GPU, when drm-kmod loaded first it will use drm0 helper of vgapci0 device. There is no problem for drm-kmod driver unless we do not traverse device tree, as needed for https://reviews.freebsd.org/D38545. drm-kmod is ok for this change as it has fallback to create corresponding drm device. Reviewed by: Differential Revision: https://reviews.freebsd.org/D38546 --- sys/dev/pci/vga_pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 12a4057a474c..64847d37f0f6 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -373,8 +373,7 @@ vga_pci_attach(device_t dev) bus_generic_probe(dev); - /* Always create a drm child for now to make it easier on drm. */ - device_add_child(dev, "drm", -1); + /* Always create a drmn child for now to make it easier on drm. */ device_add_child(dev, "drmn", -1); bus_generic_attach(dev); From nobody Thu Jul 6 17:35:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxkF70MLwz4lqM1; Thu, 6 Jul 2023 17:35:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QxkF671wJz3jRb; Thu, 6 Jul 2023 17:35:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688664907; h=from:from:reply-to:subject: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=nPrUhf7yHBbGPNImsnZeDwJjefVppMAehOn8L2SbEyQ=; b=Fk0J7J+Is7IWzGRDNZPqUb5smJ3NueC/h4jOUKLicVknvNtMID7Fqc8w52qVKeCmWvFBvB Pvu6JiRgpLjXAgcevN/7VayBVEGVkvtFj7wRC4te1zkF49kysKFjpbQ7uY9fkGS0XhJqz6 EtIwO9spCdF9BiiHoJe56dx4FWkyP6QAk7Oa3Uvv3M7gaG2BEcv5dbEqcDjl7raqbS5hbT HfLCwqvvRX5N95YX03Kd1OcyWK4M7sXjIlM978A3HTaVaVruJd4Z1g1Ntg3t1IPzrFG9xC 6Cn/cv5nN38fN70v00FQMfEg2dGzbUah7nedr4tToG+TimXZrz1NMEo03Xng9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688664907; h=from:from:reply-to:subject: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=nPrUhf7yHBbGPNImsnZeDwJjefVppMAehOn8L2SbEyQ=; b=ZNUr1r92fqrQ5xEIU3mBvjUUXwuAFK8AnvvtaCwMhA8maycf624j/QKCuMQVDtEqG9fqpx js1+05KwSWVP64Q+OrhCsGStPHXs0Kc4lArmS9joUjNm9BWqVT2xXBIfOF6WJeC+icrbUj ARGSwCiO2vkUnEBqAGrdLJUPj6yWu+yxUZQuLTVzx2hY84YJVgCxiXC310UwQxFBZVo16m BGgH9YkMCLjtZEAaxi5y1182J8xY4IAQVi96eIfR3cFbFfjL0SQRPUcLElUVq7/Ni49/N1 Zwo0r1uakH1ogtKbi+o1dUavH4CEazM9weZSGnupvM3gV/sXe5E3WHYU+OzVTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688664907; a=rsa-sha256; cv=none; b=hQgYs1FeqAd9SGFosuTyh/8lr3/l38zpy+L/40721gCuI+HsKg9bE0hwk8Kj3hb7w0+CxY TTaYGnxLRg+umR4DNhWQDaIS5lB+ehorV+eiIr0YmL1qOjofSyO5hD/Y0p7t8bWWBZE2oA QZOMPr1JjCuacLcWfrvyR6SV1fRm2K2PuRuKhmMX3qvV3PT/354cWvZESdRjwlCmgxzzUV ypuyI9ts67B/oZSe2MTo8Yt+RcMwWtgdh3F0iT1aPwQ8X8vzMHYQ6EhVZkY2J4Cl6o3dYe qX5M8a5FB4WHtDRerkJxSVxDvlejTZVKTOovyxQ5xXKb/09UzS9KyeWff/IFPw== Received: from [IPV6:2601:648:8680:16b0:f13b:a6df:ec74:6853] (unknown [IPv6:2601:648:8680:16b0:f13b:a6df:ec74:6853]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QxkF631MhzKR1; Thu, 6 Jul 2023 17:35:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <40907bee-2ccd-d53f-9e38-4f21bed45620@FreeBSD.org> Date: Thu, 6 Jul 2023 10:35:05 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: git: e8404a72c5df - main - vgapci: Don't create a drm helper Content-Language: en-US To: Dmitry Chagin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202307061726.366HQj28081856@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202307061726.366HQj28081856@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 7/6/23 10:26 AM, Dmitry Chagin wrote: > The branch main has been updated by dchagin: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e8404a72c5df939cd9ad869b12cf038c6846440a > > commit e8404a72c5df939cd9ad869b12cf038c6846440a > Author: Dmitry Chagin > AuthorDate: 2023-07-06 17:26:24 +0000 > Commit: Dmitry Chagin > CommitDate: 2023-07-06 17:26:24 +0000 > > vgapci: Don't create a drm helper > > Simply speaking, being started the drm-kmod driver should create sysfs helpers, > which is «drm» class devices, with the unit number 0, 128 and, perhaps 64. > If a drm helper created by vgapci driver with the corresponding unit number > exists then the drm-kmod driver initialize it by the device_initialize() lkpi > method, otherwise drm-kmod driver create new «drm» device. > For hw, where two or more different GPU installed, it's not guaranteed that > the order of loading GPU drivers will be the same as the vgapci devices numbered. > I.e., on hw where vgapci0 is Nvidia GPU and vgapci1 is Intel GPU, when drm-kmod > loaded first it will use drm0 helper of vgapci0 device. > There is no problem for drm-kmod driver unless we do not traverse device > tree, as needed for https://reviews.freebsd.org/D38545. > > drm-kmod is ok for this change as it has fallback to create corresponding > drm device. > > Reviewed by: > Differential Revision: https://reviews.freebsd.org/D38546 > --- > sys/dev/pci/vga_pci.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c > index 12a4057a474c..64847d37f0f6 100644 > --- a/sys/dev/pci/vga_pci.c > +++ b/sys/dev/pci/vga_pci.c > @@ -373,8 +373,7 @@ vga_pci_attach(device_t dev) > > bus_generic_probe(dev); > > - /* Always create a drm child for now to make it easier on drm. */ > - device_add_child(dev, "drm", -1); > + /* Always create a drmn child for now to make it easier on drm. */ > device_add_child(dev, "drmn", -1); > bus_generic_attach(dev); Ideally drm and drmn drivers would use identify routines called by bus_generic_probe above to add devices instead of depending on these device_add_child calls, and the device_add_child calls should really just go away. That is to say, it would be nice to remove the drmnX device_add_child, too. -- John Baldwin From nobody Thu Jul 6 17:48:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxkXc1lfVz4ltfy; Thu, 6 Jul 2023 17:48: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 4QxkXc1D2hz3l9N; Thu, 6 Jul 2023 17:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688665712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sxxb3EcoK3YiiAyDBSqV6/G9dxTx2tLQbcNccptqKKg=; b=Hz5VoRvDoErvpy5fslZZ2lbrkmp/YfHruQxFIeBchczPym3+GiPsj1G8n7GgRx0Z1CIksq OM9ckc05fvxlNZekemT+WqmLbuQbA8PGpiXEjkTUClWLF1/LI8qUfIALd/Gxmqku2prqwT 83LEnaEL1r31Ct9i7fY6SDslMQIs3UMV+mYvAsmotOdghiDSAWuwM9s/6E21Q2cdwM3ZQJ VzyePP3fc8kahQ1hcslCeXKw6PBQguhvoLL4gCeTFeqgYojw0yxEQFbKEA10asOG3I11iV GUYCaISI/Ke3d9oW7ulVRYNdIJ8nGUIgMu4J4lxMDfB+T7T4eLbwJj0Nu3ctWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688665712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sxxb3EcoK3YiiAyDBSqV6/G9dxTx2tLQbcNccptqKKg=; b=iOxLHEOaNyPEAg+B+CxZZUqEzIDCzjRh6ZgPZoAYnE79uV0QqidYqdRhf9sz5uJ2rPKeeR RNAF1vYH7FzoOWuCXyc+P9qZjXL3L5BFsLmR6kkKflbqAFBpNwqgMoootIKmiRLjS3TAzJ gwxwRUMVwzIZXSD40dWhuVgg0D/IlM3z+CPus8yMR2XOi4Ki/GvIhuucggaKxiLCwCN/a4 3lgUQesAnBCKocszhrqeqBUIrWNKbYVk8admELijKUvuNVAA6vgRRvzXlKxt9zsH+p+KZX gAaCRaQ2C7K/KqK7hfdbRQOFZ0ii/qRS6BWRtYWn9M89coBlVnp3GHM6qeCNfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688665712; a=rsa-sha256; cv=none; b=bLTGNBO0BnPFpyO4vYeYRB6NSHQdW0l+60ubQyy9ppnwkTGzp6tLPuY9DC8q6il+Fit9uy AMS5GH4yDcKwHI8fUu0MZP3+ScZuJeuH5lvfuF/FeaWsYZnGl2+yLVekoSqqIIlq7pY+1q pBVoumaFTjxI5bNAglpOTRX45Mbftnb4NSRVcpgI03CHJDIiln16qssdgQcMw2PS02eWur S4ZsL4UVzimjcerDwf9pAy24qeFAamu4VUZTaJOeAjISu4xCXpoZEyjn44YNrKbI3Zt/Fy ql8jzHr2jVsgOg+m3HI8yJcmgXonKVJsTkCKHmaDePUngCnC7O9tIQ6uURwEZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxkXc0J9Vz15n1; Thu, 6 Jul 2023 17:48: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 366HmVqP015344; Thu, 6 Jul 2023 17:48:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366HmVsO015343; Thu, 6 Jul 2023 17:48:31 GMT (envelope-from git) Date: Thu, 6 Jul 2023 17:48:31 GMT Message-Id: <202307061748.366HmVsO015343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: a89262079edb - main - Consistently provide ffs/fls using builtins List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a89262079edba80ba6133e81af1e14ab7386f53a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a89262079edba80ba6133e81af1e14ab7386f53a commit a89262079edba80ba6133e81af1e14ab7386f53a Author: Mitchell Horne AuthorDate: 2023-07-06 17:45:39 +0000 Commit: Mitchell Horne CommitDate: 2023-07-06 17:46:41 +0000 Consistently provide ffs/fls using builtins Use of compiler builtin ffs/ctz functions will result in optimized instruction sequences when possible, and fall back to calling a function provided by the compiler run-time library. We have slowly shifted our platforms to take advantage of these builtins in 60645781d613 (arm64), 1c76d3a9fbef (arm), 9e319462a03a (powerpc, partial). Some platforms still rely on the libkern implementations of these functions provided by libkern, namely riscv, powerpc (ffs*, flsll), and i386 (ffsll and flsll). These routines are slow, as they perform a linear search for the bit in question. Even on platforms lacking dedicated bit-search instructions, such as riscv, the compiler library will provide better-optimized routines, e.g. by using binary search. Consolidate all definitions of these functions (whether currently using builtins or not) to libkern.h. This should result in equivalent or better performing routines in all cases. One wart in all of this is the existing HAVE_INLINE_F*** macros, which we use in a few places to conditionally avoid the slow libkern routines. These aren't easily removed in one commit. For now, provide these defines unconditionally, but marked for removal after subsequent cleanup. Removal of the now unused libkern routines will follow in the next commit. Reviewed by: dougm, imp (previous version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40698 --- sys/amd64/include/cpufunc.h | 37 --------------------- sys/arm/include/cpufunc.h | 57 -------------------------------- sys/arm64/include/cpufunc.h | 58 --------------------------------- sys/conf/files.i386 | 2 -- sys/conf/files.powerpc | 4 --- sys/conf/files.riscv | 6 ---- sys/i386/include/cpufunc.h | 42 ------------------------ sys/powerpc/include/cpufunc.h | 14 -------- sys/sys/libkern.h | 75 ++++++++++++++++++++++++++++++++----------- 9 files changed, 57 insertions(+), 238 deletions(-) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 09f63b865948..5f252336e7b8 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -127,43 +127,6 @@ enable_intr(void) __asm __volatile("sti"); } -#ifdef _KERNEL - -#define HAVE_INLINE_FFS -#define ffs(x) __builtin_ffs(x) - -#define HAVE_INLINE_FFSL -#define ffsl(x) __builtin_ffsl(x) - -#define HAVE_INLINE_FFSLL -#define ffsll(x) __builtin_ffsll(x) - -#define HAVE_INLINE_FLS - -static __inline __pure2 int -fls(int mask) -{ - return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1); -} - -#define HAVE_INLINE_FLSL - -static __inline __pure2 int -flsl(long mask) -{ - return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1); -} - -#define HAVE_INLINE_FLSLL - -static __inline __pure2 int -flsll(long long mask) -{ - return (flsl((long)mask)); -} - -#endif /* _KERNEL */ - static __inline void halt(void) { diff --git a/sys/arm/include/cpufunc.h b/sys/arm/include/cpufunc.h index a5db3486aff1..0df52a5e7cf3 100644 --- a/sys/arm/include/cpufunc.h +++ b/sys/arm/include/cpufunc.h @@ -183,63 +183,6 @@ void cpu_reset (void) __attribute__((__noreturn__)); extern int arm_dcache_align; extern int arm_dcache_align_mask; - -#define HAVE_INLINE_FFS - -static __inline __pure2 int -ffs(int mask) -{ - - return (__builtin_ffs(mask)); -} - -#define HAVE_INLINE_FFSL - -static __inline __pure2 int -ffsl(long mask) -{ - - return (__builtin_ffsl(mask)); -} - -#define HAVE_INLINE_FFSLL - -static __inline __pure2 int -ffsll(long long mask) -{ - - return (__builtin_ffsll(mask)); -} - -#define HAVE_INLINE_FLS - -static __inline __pure2 int -fls(int mask) -{ - - return (mask == 0 ? 0 : - 8 * sizeof(mask) - __builtin_clz((u_int)mask)); -} - -#define HAVE_INLINE_FLSL - -static __inline __pure2 int -flsl(long mask) -{ - - return (mask == 0 ? 0 : - 8 * sizeof(mask) - __builtin_clzl((u_long)mask)); -} - -#define HAVE_INLINE_FLSLL - -static __inline __pure2 int -flsll(long long mask) -{ - - return (mask == 0 ? 0 : - 8 * sizeof(mask) - __builtin_clzll((unsigned long long)mask)); -} #else /* !_KERNEL */ static __inline void diff --git a/sys/arm64/include/cpufunc.h b/sys/arm64/include/cpufunc.h index 691474bac90e..f2de8a0e560c 100644 --- a/sys/arm64/include/cpufunc.h +++ b/sys/arm64/include/cpufunc.h @@ -37,64 +37,6 @@ breakpoint(void) } #ifdef _KERNEL - -#define HAVE_INLINE_FFS - -static __inline __pure2 int -ffs(int mask) -{ - - return (__builtin_ffs(mask)); -} - -#define HAVE_INLINE_FFSL - -static __inline __pure2 int -ffsl(long mask) -{ - - return (__builtin_ffsl(mask)); -} - -#define HAVE_INLINE_FFSLL - -static __inline __pure2 int -ffsll(long long mask) -{ - - return (__builtin_ffsll(mask)); -} - -#define HAVE_INLINE_FLS - -static __inline __pure2 int -fls(int mask) -{ - - return (mask == 0 ? 0 : - 8 * sizeof(mask) - __builtin_clz((u_int)mask)); -} - -#define HAVE_INLINE_FLSL - -static __inline __pure2 int -flsl(long mask) -{ - - return (mask == 0 ? 0 : - 8 * sizeof(mask) - __builtin_clzl((u_long)mask)); -} - -#define HAVE_INLINE_FLSLL - -static __inline __pure2 int -flsll(long long mask) -{ - - return (mask == 0 ? 0 : - 8 * sizeof(mask) - __builtin_clzll((unsigned long long)mask)); -} - #include void pan_enable(void); diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index cd1aeb4850b7..1d4567824b1b 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -141,8 +141,6 @@ kern/imgact_aout.c optional compat_aout kern/subr_sfbuf.c standard libkern/divdi3.c standard libkern/divmoddi4.c standard -libkern/ffsll.c standard -libkern/flsll.c standard libkern/memcmp.c standard libkern/memset.c standard libkern/moddi3.c standard diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 4a88e66800ae..927c27416d88 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -189,10 +189,6 @@ libkern/ashrdi3.c optional powerpc | powerpcspe libkern/bcopy.c standard libkern/cmpdi2.c optional powerpc | powerpcspe libkern/divdi3.c optional powerpc | powerpcspe -libkern/ffs.c standard -libkern/ffsl.c standard -libkern/ffsll.c standard -libkern/flsll.c standard libkern/lshrdi3.c optional powerpc | powerpcspe libkern/memcmp.c standard libkern/memset.c standard diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index 192a309c989e..aadeb2b0917a 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -23,12 +23,6 @@ kern/subr_dummy_vdso_tc.c standard kern/subr_intr.c standard kern/subr_physmem.c standard libkern/bcopy.c standard -libkern/ffs.c standard -libkern/ffsl.c standard -libkern/ffsll.c standard -libkern/fls.c standard -libkern/flsl.c standard -libkern/flsll.c standard libkern/memcmp.c standard libkern/memset.c standard libkern/strcmp.c standard diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 2b517b12fba0..e107816afced 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -180,48 +180,6 @@ sfence(void) __asm __volatile("sfence" : : : "memory"); } -#ifdef _KERNEL - -#define HAVE_INLINE_FFS - -static __inline __pure2 int -ffs(int mask) -{ - /* - * Note that gcc-2's builtin ffs would be used if we didn't declare - * this inline or turn off the builtin. The builtin is faster but - * broken in gcc-2.4.5 and slower but working in gcc-2.5 and later - * versions. - */ - return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1); -} - -#define HAVE_INLINE_FFSL - -static __inline __pure2 int -ffsl(long mask) -{ - return (ffs((int)mask)); -} - -#define HAVE_INLINE_FLS - -static __inline __pure2 int -fls(int mask) -{ - return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1); -} - -#define HAVE_INLINE_FLSL - -static __inline __pure2 int -flsl(long mask) -{ - return (fls((int)mask)); -} - -#endif /* _KERNEL */ - static __inline void halt(void) { diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index d04efb63288b..c5148b009246 100644 --- a/sys/powerpc/include/cpufunc.h +++ b/sys/powerpc/include/cpufunc.h @@ -258,20 +258,6 @@ get_pcpu(void) return (ret); } -#define HAVE_INLINE_FLS -static __inline __pure2 int -fls(int mask) -{ - return (mask ? 32 - __builtin_clz(mask) : 0); -} - -#define HAVE_INLINE_FLSL -static __inline __pure2 int -flsl(long mask) -{ - return (mask ? (8 * sizeof(long) - __builtin_clzl(mask)) : 0); -} - /* "NOP" operations to signify priorities to the kernel. */ static __inline void nop_prio_vlow(void) diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 8adeeb499984..83522ce7ddbf 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -132,24 +132,63 @@ void arc4rand(void *, u_int, int); int timingsafe_bcmp(const void *, const void *, size_t); void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); -#ifndef HAVE_INLINE_FFS -int ffs(int); -#endif -#ifndef HAVE_INLINE_FFSL -int ffsl(long); -#endif -#ifndef HAVE_INLINE_FFSLL -int ffsll(long long); -#endif -#ifndef HAVE_INLINE_FLS -int fls(int); -#endif -#ifndef HAVE_INLINE_FLSL -int flsl(long); -#endif -#ifndef HAVE_INLINE_FLSLL -int flsll(long long); -#endif + +/* + * MHTODO: remove the 'HAVE_INLINE_FOO' defines once use of these flags has + * been purged everywhere. For now we provide them unconditionally. + */ +#define HAVE_INLINE_FFS +#define HAVE_INLINE_FFSL +#define HAVE_INLINE_FFSLL +#define HAVE_INLINE_FLS +#define HAVE_INLINE_FLSL +#define HAVE_INLINE_FLSLL + +static __inline __pure2 int +ffs(int mask) +{ + + return (__builtin_ffs((u_int)mask)); +} + +static __inline __pure2 int +ffsl(long mask) +{ + + return (__builtin_ffsl((u_long)mask)); +} + +static __inline __pure2 int +ffsll(long long mask) +{ + + return (__builtin_ffsll((unsigned long long)mask)); +} + +static __inline __pure2 int +fls(int mask) +{ + + return (mask == 0 ? 0 : + 8 * sizeof(mask) - __builtin_clz((u_int)mask)); +} + +static __inline __pure2 int +flsl(long mask) +{ + + return (mask == 0 ? 0 : + 8 * sizeof(mask) - __builtin_clzl((u_long)mask)); +} + +static __inline __pure2 int +flsll(long long mask) +{ + + return (mask == 0 ? 0 : + 8 * sizeof(mask) - __builtin_clzll((unsigned long long)mask)); +} + #define bitcount64(x) __bitcount64((uint64_t)(x)) #define bitcount32(x) __bitcount32((uint32_t)(x)) #define bitcount16(x) __bitcount16((uint16_t)(x)) From nobody Thu Jul 6 17:48:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxkXd3bVvz4lthy; Thu, 6 Jul 2023 17:48: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 4QxkXd2TDTz3lM7; Thu, 6 Jul 2023 17:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688665713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9gwdFFgOYs45RVQmQScsBkmRs6PJMXv14LXDJQArdE=; b=pDkhJfWGc3uhfOMPB9IeWu3zONOB7hDRdle/sDzwUww15w0KBG+mOP0v/IJhaQOgDpxV1e ML8CO8oVdQSeA8VCYVxZEKK11qMgoX4Il0NRlPJW5X7unXAR9CUzEAT4yhB8def89i36cE BZv6mGwjUdT9D5tzpCGubdOOmiKtNDWqaDRI2Ep58fnW1pZmmLMeS+InY1gaw8XAwh9uih Cs4Se4Af85T7R7vO2WR7nSbIiji8Vt0LsFeg0+rQP6rKrEsaGr4F0GUijUwUMmy3Gl9l89 wE3jXoaBTSxEchvdK0H5Q99SE1uNIVdRIL9rVplQluYBwANGZnj54Dtu7NQVVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688665713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9gwdFFgOYs45RVQmQScsBkmRs6PJMXv14LXDJQArdE=; b=lgyQpRcES5W6I7NhLsfSxiR83JSzSvSw0tZoq6H7lKSNELLXVX6GyuUEIgHIIOROohLW/F EYMdC6AeN+eB88WqKewpJirOQve8m8RW5ntH16Aa33t/IpqRHhVsmNdyOw7UIA0rFZM41y VGTjkHJVX0Y3x+E3HMXvwlUsGATYgc3TDb6dvXBQCZK3o6Vjodt8e/Tq/jeiF4INcY85WX 1AKjV+LqhxvkGHY46fz0pQjvQeRf2qPC3HfKKIueikW8hrCmcBTFEEGNVAWpgmeQCSN/bW lVI6I1JsmO8fldnOEsZS/YNtcbYBjrphN5AYnsOEq5KjIC6hEteDLsP5ndV5cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688665713; a=rsa-sha256; cv=none; b=TQkk4YtfpyoGIj5oc1Ji2sEPj07/JuBIWlLSgIbB2HjvtwOvpOpzFG2DqEvlzEWGS7RX44 76REaolGuIeGYGPM5xEjWYkRJ1V1/YI8xaAljB4Q6JJvSzaCD66POCQeT6/1ehcD/9b+4Q hHahiRlkngG9ByQJK6Te7iUXdacWew2FR8VxwxuvS26PQv0MI/UlfYip9BjYq72Mj4QOXJ lAvLw7A8CD6VZFLGs9eMmt1y/swx1ojfW1nX0A4a5eMAitDG6ma0BQkC9hyTs+V/Xge4nK yC98+Y0ba834qVr/yC2aZsGc+yYPOzdeyx+tPIMlGBjwDFRpkj/qGCrVtkKamg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxkXd1SVQz15Gj; Thu, 6 Jul 2023 17:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 366HmXG7015363; Thu, 6 Jul 2023 17:48:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366HmXVo015362; Thu, 6 Jul 2023 17:48:33 GMT (envelope-from git) Date: Thu, 6 Jul 2023 17:48:33 GMT Message-Id: <202307061748.366HmXVo015362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: f4db342d4419 - main - libkern: remove old ffs/fls routines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4db342d44198973c1c7b9005d0c5683a582707e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f4db342d44198973c1c7b9005d0c5683a582707e commit f4db342d44198973c1c7b9005d0c5683a582707e Author: Mitchell Horne AuthorDate: 2023-07-06 17:46:08 +0000 Commit: Mitchell Horne CommitDate: 2023-07-06 17:46:41 +0000 libkern: remove old ffs/fls routines These are poorly optimized (linear search), and we now prefer the compiler-provided routines on all platforms. These files can be removed. Reviewed by: emaste, dougm Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40699 --- sys/libkern/ffs.c | 50 -------------------------------------------------- sys/libkern/ffsl.c | 50 -------------------------------------------------- sys/libkern/ffsll.c | 48 ------------------------------------------------ sys/libkern/fls.c | 50 -------------------------------------------------- sys/libkern/flsl.c | 50 -------------------------------------------------- sys/libkern/flsll.c | 49 ------------------------------------------------- 6 files changed, 297 deletions(-) diff --git a/sys/libkern/ffs.c b/sys/libkern/ffs.c deleted file mode 100644 index 4dfc7fbab67b..000000000000 --- a/sys/libkern/ffs.c +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include - -/* - * Find First Set bit - */ -int -ffs(int mask) -{ - int bit; - - if (mask == 0) - return (0); - for (bit = 1; !(mask & 1); bit++) - mask = (unsigned int)mask >> 1; - return (bit); -} diff --git a/sys/libkern/ffsl.c b/sys/libkern/ffsl.c deleted file mode 100644 index 0ebf3207e663..000000000000 --- a/sys/libkern/ffsl.c +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include - -/* - * Find First Set bit - */ -int -ffsl(long mask) -{ - int bit; - - if (mask == 0) - return (0); - for (bit = 1; !(mask & 1); bit++) - mask = (unsigned long)mask >> 1; - return (bit); -} diff --git a/sys/libkern/ffsll.c b/sys/libkern/ffsll.c deleted file mode 100644 index 17d6e47380a7..000000000000 --- a/sys/libkern/ffsll.c +++ /dev/null @@ -1,48 +0,0 @@ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include - -/* - * Find First Set bit - */ -int -ffsll(long long mask) -{ - int bit; - - if (mask == 0) - return (0); - for (bit = 1; !(mask & 1); bit++) - mask = (unsigned long long)mask >> 1; - return (bit); -} diff --git a/sys/libkern/fls.c b/sys/libkern/fls.c deleted file mode 100644 index 57b7abe19f4e..000000000000 --- a/sys/libkern/fls.c +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include - -/* - * Find Last Set bit - */ -int -fls(int mask) -{ - int bit; - - if (mask == 0) - return (0); - for (bit = 1; mask != 1; bit++) - mask = (unsigned int)mask >> 1; - return (bit); -} diff --git a/sys/libkern/flsl.c b/sys/libkern/flsl.c deleted file mode 100644 index 08808455862b..000000000000 --- a/sys/libkern/flsl.c +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include - -/* - * Find Last Set bit - */ -int -flsl(long mask) -{ - int bit; - - if (mask == 0) - return (0); - for (bit = 1; mask != 1; bit++) - mask = (unsigned long)mask >> 1; - return (bit); -} diff --git a/sys/libkern/flsll.c b/sys/libkern/flsll.c deleted file mode 100644 index cb30d0bd5551..000000000000 --- a/sys/libkern/flsll.c +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1990, 1993 - * The Regents of the University of California. 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -__FBSDID("$FreeBSD$"); - -/* - * Find Last Set bit - */ -int -flsll(long long mask) -{ - int bit; - - if (mask == 0) - return (0); - for (bit = 1; mask != 1; bit++) - mask = (unsigned long long)mask >> 1; - return (bit); -} From nobody Thu Jul 6 18:32:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxlVx28SZz4m5Wp; Thu, 6 Jul 2023 18:32: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 4QxlVx1jC9z3sPw; Thu, 6 Jul 2023 18:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688668329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5+C+LcfkoSlPceESLnKfrPF7gocz9KrFeMSMsrznpWs=; b=wiLE7UTHnqqg4H/R0slN9VyyOeP3kbHshuNqwvAML0LVF6o+KZZnOWt27Pbf1Go/gQYSUI oTRc2/v0X4H13TDXRQoqtKeo/wJXmjtHNlECsFsTkGDe7GxNBENMpbqeoTelr4PxT8urZq 0MXfYwowtKQc9QHJX+3kDzlmu5PLM0OBTUO53XzbKIHiGj6ZU0xZzIuQtbgcNgNo6KlWlb nNyMXpyRfzUpsgUwUPl/Sxx4Pq7JNc6vd4FLnQuULY53rXEuNaHC6BVpAA67UF2Vd8s+aZ Vi5UzDW+Mwb5SM6YbuI7hz9q8TNDuIFBVblO6VI9PmAvPlsmgZcjcXUUViBGTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688668329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5+C+LcfkoSlPceESLnKfrPF7gocz9KrFeMSMsrznpWs=; b=dORLD6aauTAvGDrhony7thwUfsuRKAhRzn6cYoarqQ29fYKMC0SO6LLWEiQr0mnLZ5bWr3 0qDm/7rPDNo/jeip5v/iVmlpCo9dk3UaReGid5sRe48j9J3hA0A2u3QnIinbNU+3qCeKCc I1e0vUmhE86Up7omAMw7niSP37aVoJFx1WlnWsnWUsN7z++Gtj2perH4p8dye+4tlvSu25 8SKy9EbqB4fFbnOyz9rkfGOmPtOyE9nWPf3aasu9UJbr/h80XnyV16IXNnrnDn+8aqGq86 hnbm/oAGERFtN1cXJTQP10QaXwAlkGdHpSyLvbwZCCFnBzo3QHSsJJRfuH8ojw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688668329; a=rsa-sha256; cv=none; b=smfsY1Zq1A8ZNAYQcR++2zAdRfc8ipTZQ5euAovueF8lapJK9V/0OenjKHMPuUn5xNK0w1 PRjyzNwUfpkb7WrZ7bhagIriAudSnyjBiYUAmWloqB0UjU3dJ1UkTZFlPOvzpzWH2tFUc4 LkyyCuS0eQbnqwNjwFQosaJitTD3GkLI1Q+5stfkGYXzbISyHgKWZNRZU6N9DvXM6Dvppd 6PV5hBIg6ThBRxR4z9HZY25yr/LhQUOFvL3CiYaaM3mSICuc2XwX/ZfKGkvU4FpULL+n67 LfpYFLICBVhLgGjh549I81c2pPiKox2U8YREs/Va6Q5ynAL9HqZO+6R/dbgg5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxlVx0mFfz16n3; Thu, 6 Jul 2023 18:32: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 366IW9D9096068; Thu, 6 Jul 2023 18:32:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366IW9DG096067; Thu, 6 Jul 2023 18:32:09 GMT (envelope-from git) Date: Thu, 6 Jul 2023 18:32:09 GMT Message-Id: <202307061832.366IW9DG096067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: e08776813087 - main - inline_fls: remove redundant INLINE_FLS test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e08776813087f7926d6ec0a84dcfaba80c729c8b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=e08776813087f7926d6ec0a84dcfaba80c729c8b commit e08776813087f7926d6ec0a84dcfaba80c729c8b Author: Doug Moore AuthorDate: 2023-07-06 18:29:13 +0000 Commit: Doug Moore CommitDate: 2023-07-06 18:29:13 +0000 inline_fls: remove redundant INLINE_FLS test HAS_INLINE_FLS and similar macros are defined always. Removes the redundant tests for these always-true conditions. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D40707 --- sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h b/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h index 7b738c8b0d13..31e1657105cd 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h @@ -392,7 +392,7 @@ extern unsigned char bcd_to_byte[256]; static __inline int highbit(unsigned long i) { -#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL) +#if defined(__FreeBSD__) && defined(_KERNEL) return (flsl(i)); #else int h = 1; @@ -430,7 +430,7 @@ highbit(unsigned long i) static __inline int highbit64(uint64_t i) { -#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSLL) +#if defined(__FreeBSD__) && defined(_KERNEL) return (flsll(i)); #else int h = 1; From nobody Thu Jul 6 18:35:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxlZQ5F5sz4m6Fr; Thu, 6 Jul 2023 18:35: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 4QxlZQ4qcyz3skd; Thu, 6 Jul 2023 18:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688668510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gzO+RmtyOwedlxlxF1HDi/7a1mhYV0EZAtLnOZOVxw=; b=ltO+YHxmhPBID63xYDZL7tUEu7LVrXExbrldDfRxUalvuCe2MGb51O1qq1OZOQj3hLF9e5 MkUMxv27u65YRAEczXnt8WY2BEutcm/pMYipn4tZQeZPMqcSHZ9rHfH4MAtCWmnQxf5qgU 8LJa1Bu32aMksD0/RjVSLCnBx0ysCZ/OzVEdkOm4PtN4pdpyWd541LAFbG8l4m/CcBIQcn 2Bwdl2o6EvCLvY32XSRZrDGgqbttbTYWuADFpuOcHZ3ynUaWLRQs0b87LVB169cwqPVdbN QpV0c3eK+v7IJ/WR8W0ONXzOABGE9IEYA1ozjPvstRKD7m0876vleEE9BxRKwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688668510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gzO+RmtyOwedlxlxF1HDi/7a1mhYV0EZAtLnOZOVxw=; b=TNGDV2saNaRMgBJN7vF6UWLsO7cXUiiMU+Kf8o9m7KWGqopS3jedQNa+NhZCsMtLp7f6Xl 5TSVidMLC4uYPJcJpftWyQjSmkgGvb4/AQwhGfxhRSBJTC0IjrqOFM4QuqTFtYYy3N9IIA eK3rds8qT+JD0l5I+kAWOgsdY97OgPNPP5aRKAdZw6ha+8NFX1Za71yX0ZlXjK7/I61OL0 ikO7j9Qr1/3WyN4TJcs3Mg4FgJxAZ+dRy3/VjTaxbTPvQNCUzHopWN4LD4j9ajfjhm5+JG G+qjnx1Ohr0TZLeneGZVghwy/mgMK6l2dr38YPk8o6xMuhVDshE1KcGxBQ5M8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688668510; a=rsa-sha256; cv=none; b=dzz7LMBzpEu+/BBgDT2Mumqvt4dhg2rUhXOmmMBnxJYVog1gf7nLCGLLL2xRC5hNBvDT5t u0zuy0M3yrKxPTsAwxSnDLatYSgKxX5sN3HUsxJhDksEmDFd69ke3HjP0fbTL7LobMHwYW g9rlsA17hx/LzeXiaj3yS3vtZP7gnbGi79LrG9JAyv/B58Lnz8V0J4Jhc5JksxhrWLBnjK 435sYxwedp4CFuHZjSx79lVcilh6ndn/2maCBu55YIGCJphwhsXKnrVWFS1vI0qDIVpvka cIZBVXLddGhzC4zMX6t5FHvuB/Uiw1p8J+Bq77ik5079YwiJIiNnN8CnJFwqkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxlZQ3v6Xz16vd; Thu, 6 Jul 2023 18:35: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 366IZAMc097384; Thu, 6 Jul 2023 18:35:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366IZAg8097383; Thu, 6 Jul 2023 18:35:10 GMT (envelope-from git) Date: Thu, 6 Jul 2023 18:35:10 GMT Message-Id: <202307061835.366IZAg8097383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 6419ed7ee7d0 - main - inline_fls: drop compile-time check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6419ed7ee7d0580b061b5913b05695ccd47fe81e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=6419ed7ee7d0580b061b5913b05695ccd47fe81e commit 6419ed7ee7d0580b061b5913b05695ccd47fe81e Author: Doug Moore AuthorDate: 2023-07-06 18:32:59 +0000 Commit: Doug Moore CommitDate: 2023-07-06 18:32:59 +0000 inline_fls: drop compile-time check HAVE_INLINE_FLSLL is #defined always. This change assumes that where __HAVE_INLINE_FLSLL is tested, the two leading underscores are a mistake, and that the code will be better for using the efficient flsll implementation. Reviewed by: markj, mhorne Differential Revision: https://reviews.freebsd.org/D40705 --- sys/kern/kern_resource.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index b1ce9526d4cc..b030c0552cc9 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -885,11 +885,6 @@ rufetchtd(struct thread *td, struct rusage *ru) calcru1(p, &td->td_rux, &ru->ru_utime, &ru->ru_stime); } -/* XXX: the MI version is too slow to use: */ -#ifndef __HAVE_INLINE_FLSLL -#define flsll(x) (fls((x) >> 32) != 0 ? fls((x) >> 32) + 32 : fls(x)) -#endif - static uint64_t mul64_by_fraction(uint64_t a, uint64_t b, uint64_t c) { From nobody Thu Jul 6 18:37:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxldM0qjkz4m6QP; Thu, 6 Jul 2023 18:37: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 4QxldM09N6z3tSg; Thu, 6 Jul 2023 18:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688668663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wqFNhRo26aPx4B3mSpLOLKCKOE9pLrvOiaBxZisYr4U=; b=SQ8DDiCYXjtpukrkhvcYsdscrGvhefh+o92bc4DOoKaBG/MG7qsyZntUgDvxnt9iIhE18k GrcWC4JS1WaJTjrd6y7wyH229xxffkxjRrJCpjdBOSrjRep4rruUfuphsar8D92Vjk8JsO qASmjKDzMuMaYe7ZU343r0+ocihyUj8SZ2Yylwy/azxZGl+6NAfSzKlvcwOATAcrY8ns+j K9C625Ks5YYo9sANAF9+8Bod/6i7TqAufMUlL6UR6ltBi7bsQslWy2Y+JWuSn4pzrEpDLW AzbzjJzLS6ro3SpBs6MVOLkFAZdrQLie/usBK2ddk40H9cKjMbgFfE3w/yMNHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688668663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wqFNhRo26aPx4B3mSpLOLKCKOE9pLrvOiaBxZisYr4U=; b=VcAnmxakNSdBVZkupxWuqKTKTvfe7XFwvNsQpmvEkB6rQVJVI0NrVIhJUgIiamj27xlf8g MbgVYTH4KEeQxh8LaIMam7sj1EY5f+4KjGmmkuZz5fGuKNNTPc7rNeZ49/w68rldFckx+J 2ifZYvgJqwidcSHzaAH5wbk91rREFn512838wrS4I1xVDhFU8s00p1qSz8WBQOKMNnvVkU jY3Id9sN9zdywjg9Lr6GZ9m9w/ho1NU64/oC2YFRed/+JvTU/AAFQxeX7cl10wAGtu06Ml FN3SOH4Bau2R9DlZS7/5ZeLrqqncF2i9bjpiay72jPYeNiSdNSOIE7wTg2GgSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688668663; a=rsa-sha256; cv=none; b=VIzOYX4IOa3eVdLNlCc2pr2n2CE5jB8RYJukJ6bED2LP9bAim3Nk4UsLMUku4KsDSD/wND 7aCqcLdTANslO3GkgY4g1dkn90onkBSjG4TNNN9oW1+jZZAWH2jrhLZNGkzvhlpODNm3l+ oeusf2R2OGnGVXqEDMTJMJyTllcz3VOkPzo36epzaymhR/tFtjzYoIetSQRhn1uROtJz5p oQJCctaAhUbpiacRgtYMcSVeESuqUs4FZmu7vz1QFGGN++eNVuoGA7yn1qXwoSMaltyEEr MIp2DbK+cLqS5NQ6rHtFcpjioDSXJt3m4ZOshJSzrIrXiDrYgzHTF+zYDykJSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxldL6Hv6z16y6; Thu, 6 Jul 2023 18:37: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 366IbgbX097885; Thu, 6 Jul 2023 18:37:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366Ibg5V097884; Thu, 6 Jul 2023 18:37:42 GMT (envelope-from git) Date: Thu, 6 Jul 2023 18:37:42 GMT Message-Id: <202307061837.366Ibg5V097884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: d4e236c70b0d - main - inline_ffs: remove backup binary implementation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4e236c70b0db52cd7232a11ad0a2ed895e65f70 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=d4e236c70b0db52cd7232a11ad0a2ed895e65f70 commit d4e236c70b0db52cd7232a11ad0a2ed895e65f70 Author: Doug Moore AuthorDate: 2023-07-06 18:36:12 +0000 Commit: Doug Moore CommitDate: 2023-07-06 18:36:12 +0000 inline_ffs: remove backup binary implementation There is no longer be any point to maintaining a binary search routine for ffs; inlines will always do it as well or better. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D40703 --- sys/kern/subr_blist.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/sys/kern/subr_blist.c b/sys/kern/subr_blist.c index ba13fb4efd80..aa0ba6a88610 100644 --- a/sys/kern/subr_blist.c +++ b/sys/kern/subr_blist.c @@ -184,42 +184,13 @@ bitrange(int n, int count) ((u_daddr_t)-1 >> (BLIST_RADIX - (n + count)))); } -/* - * Find the first bit set in a u_daddr_t. - */ -static inline int -generic_bitpos(u_daddr_t mask) -{ - int hi, lo, mid; - - lo = 0; - hi = BLIST_RADIX; - while (lo + 1 < hi) { - mid = (lo + hi) >> 1; - if (mask & bitrange(0, mid)) - hi = mid; - else - lo = mid; - } - return (lo); -} - static inline int bitpos(u_daddr_t mask) { - switch (sizeof(mask)) { -#ifdef HAVE_INLINE_FFSLL - case sizeof(long long): - return (ffsll(mask) - 1); -#endif -#ifdef HAVE_INLINE_FFS - case sizeof(int): - return (ffs(mask) - 1); -#endif - default: - return (generic_bitpos(mask)); - } + _Static_assert(sizeof(long long) >= sizeof(mask), + "mask too big for ffsll()"); + return (ffsll(mask) - 1); } /* From nobody Thu Jul 6 20:30:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qxp7H6vF0z4kngq; Thu, 6 Jul 2023 20: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 4Qxp7H6JLhz49kw; Thu, 6 Jul 2023 20: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=1688675419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=44FObnbhheaCKJ9fHFR4I2Dgor2qE7AClc5Iw01LMyw=; b=eBh/K8TbdWJO+idVy6St62jSbpDJUdsvgeR0XabBG+y3nwlY4UjtymxaY03PcRQhMvh1g+ 5U3ZBQN7JyH/z15Sh3zHiqiKEPtcU8CXulU+8ng5afqar7cFfYeSKbWgeiKl7AGaxExZiD bfVxxPGPAxdopdkmqgyROTacKNMjYcCNjdm9WFa/aY9AbYuWYfriINDf4hm+BAhEYhqGf4 hRSFMQQksHY/2GELFt/Lk1b9PyErSYTg26kxTfJtKqsBAMwXCKBbOdh5V3dYOzeomQwlCq zcYj4lqUEAGuiAL94Dx56UPSoLjUkE1DG9/hmV/zmIRjMvTcOMpSriUn1IKNgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688675419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=44FObnbhheaCKJ9fHFR4I2Dgor2qE7AClc5Iw01LMyw=; b=rjhbU3vU2GaMObo2xDATR09B3lzA/HITp/wzkh9DGCdzm/R6+KOJyHEtnhs3kEQmAXDRXW 9n5HiwhCStslOKKsAxcbPk23KjzBrhJLdLKttybBoz1wyifTJxecKdm6wa9ybNTmhEs8X2 Tz/4b8cR6TjsjIX2bGz1JK5/xGaRboNlhOQfvLvc46NpeQniJKrjtTrhLWK2IUihk6sVUr JOv05QPOcht6pVTFJDyClNy4VSuBBPkdnEqqMI+BU4Qvnzo+6J5ijbPBh6PQczhT4sH7xh Dp/rI0+qsYPoiPl44YspjZxYVysFDRiekux+zEKDBWONGIyMNlQgUW/jdYG8RA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688675419; a=rsa-sha256; cv=none; b=rNPXvkVhmy0VuyS6dQucqJaxDhs8QU/mAJVfRWAmeyXuArCN1AwXxfLBXWrRLdg+chl9fX 0pQTby+Qm+ZCvDmjJuushvuAqWu3ditsPdzq/2EuiJHIYJFrDvCj+DjVdq+SgmkfKTWTH3 aPa6SHt0jsf2kLGfeNN76ubXXqXEQmf2HN1DaWFypYXR1ZtzbIHFB0O/ifLnF2dUGQoKTw wKI68zc7PzRIRpqJQn5Pb7LYKLDTlJloIVhXw0QNUr0bIUGmkCPh/5/lQsNi+Ifv0anLNT NLl++Gd3TG7E/1VzFgOZSow6LIibsQYhjh/ZkFqBStUbpt0WPeRE5/dmq7tRSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qxp7H5FfXz19RK; Thu, 6 Jul 2023 20: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 366KUJP1089171; Thu, 6 Jul 2023 20: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 366KUJ69089170; Thu, 6 Jul 2023 20:30:19 GMT (envelope-from git) Date: Thu, 6 Jul 2023 20:30:19 GMT Message-Id: <202307062030.366KUJ69089170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 8579bf27d7d3 - main - inline_fls - HAVE_INLINE_FLSLL is always true List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8579bf27d7d38bc1dc0e92b83b88e5a9f2dd4671 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=8579bf27d7d38bc1dc0e92b83b88e5a9f2dd4671 commit 8579bf27d7d38bc1dc0e92b83b88e5a9f2dd4671 Author: Doug Moore AuthorDate: 2023-07-06 20:27:31 +0000 Commit: Doug Moore CommitDate: 2023-07-06 20:27:31 +0000 inline_fls - HAVE_INLINE_FLSLL is always true flsll is inlined, or replaced by a smart binary search implementation, on all architectures, and HAVE_INLINE_FLSLL is #defined always. So remove code the the #undefined case. Reviewed by: mhorne, tuexen Differential Revision: https://reviews.freebsd.org/D40704 --- sys/netinet/tcp_lro.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 285207f02739..bea9f8f4d39e 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1472,21 +1472,7 @@ tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le) LIST_INSERT_HEAD(&lc->lro_free, le, next); } -#ifdef HAVE_INLINE_FLSLL #define tcp_lro_msb_64(x) (1ULL << (flsll(x) - 1)) -#else -static inline uint64_t -tcp_lro_msb_64(uint64_t x) -{ - x |= (x >> 1); - x |= (x >> 2); - x |= (x >> 4); - x |= (x >> 8); - x |= (x >> 16); - x |= (x >> 32); - return (x & ~(x >> 1)); -} -#endif /* * The tcp_lro_sort() routine is comparable to qsort(), except it has From nobody Thu Jul 6 23:45:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxtSP2zkkz4lXbH; Thu, 6 Jul 2023 23:45: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 4QxtSP2Rcrz4WVt; Thu, 6 Jul 2023 23:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688687125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJWPbLpET0hTq5u9nJObr9Zdt7RPjNTzAtWPIPrJ4Qg=; b=V2o4OOAYkBRZmXhJetcfJhyijnOp+f9iUIShfI7Hi6QZFS8AfZsGixqoJ8YLVsjTRqu7UT nWVcCY2oSMwfJFfKfluJKgWfHN0Nf28/IS1S5Lsb5mVzthmIIWgNQ/T1mgixHJHWANTpg6 z+5gncdRUeucsZ6AgtwsNNHul5QhlO4WYSoSvqiWoaPjSd4XGHkOXqcKm0vOLfUx/+W0gc bJp1e62a32KNEMSxi9vEIlsLWUBi0t9xkbU+qRskJ8ui5AjrC+1z9c7eD4WWIiptrZXY+j Fp3V5TvMyiKXaU6sAGH4xm39l0t222tI7rpO0rGhav1cH0ltsqKwzsr19uMV0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688687125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJWPbLpET0hTq5u9nJObr9Zdt7RPjNTzAtWPIPrJ4Qg=; b=iRQgQtApx6eH1/g26WfX/LwWpsPIGamY489q5f8CnCYQIJpPawWQpJrCmnrohWHsTcZ8cN G7Y2mVRVeemmMq3Xi4C4f0Wrdk5Stu74+EZlj+R9K5IkFUn3xvzVo9KBjovAwE1mYjeUOe VUfN9jJ3gd7kRQN/Vaut+3OgQ+wPC47Dav6KQdytKrTNNq1j+Jx5/yAYAY2RkiXtmRFDif rh0iUjCfYBNmRfBv3hEcNCxwTqkyTAg0BT8YpgutTr+onsoz49J61wjFzfExK6NtWbqOy/ sZOSJiehS+QnW9/xJSo6fZMD4Emf6siyiKa4T+JUFf51eywXiJq3u1bkvN4y0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688687125; a=rsa-sha256; cv=none; b=INQ0N+SChiF7WF3242qcPBYLEyNZKGVZ8McoQZZtEfs2F7p9V6I3oFfteclFM7kFICz72I aj8m0Bt+iPm0VCYbszjSIqVwSMcL7EzHDu40o3VliE18brH/pXbOjLRunZ8eaNXADvj9X+ FrFye6HNhCLoaz1/T3AjShGYCCqcYKGlnMA+SzYV9omuhMjgNPvlOaNkUg4NPp3EmWa/cG grdSU0BSRZcWmogXP9fXqRSt0UHGiks5AB/NVAU0dyHTB25WBV4BdA3Kh0DGocGmeeujpq a6w2vdCwf6ea6rZqqYkG/UP7umFR+qdGqAuhgJ03QXetwh0n04fFP+DixKIxWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxtSP1B8WzH60; Thu, 6 Jul 2023 23:45: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 366NjP0n011129; Thu, 6 Jul 2023 23:45:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366NjPoC011128; Thu, 6 Jul 2023 23:45:25 GMT (envelope-from git) Date: Thu, 6 Jul 2023 23:45:25 GMT Message-Id: <202307062345.366NjPoC011128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: a146207d66f3 - main - ixl: implement support for dumping NIC registers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a146207d66f320ed239c1059de9df854b66b55b7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=a146207d66f320ed239c1059de9df854b66b55b7 commit a146207d66f320ed239c1059de9df854b66b55b7 Author: Piotr Kubaj AuthorDate: 2023-07-06 23:45:44 +0000 Commit: Piotr Kubaj CommitDate: 2023-07-06 23:45:44 +0000 ixl: implement support for dumping NIC registers To enable faster debug of customer issues Intel wants an end user to gather information about PHY configuration and status to debug link and connection issues in the field. For this reason the end user should have possibility of obtaining PHYs registers values at runtime during debugging. Differential Revision: https://reviews.freebsd.org/D40354 Approved by: erj --- sys/dev/ixl/i40e_register.h | 12 +++++++++ sys/dev/ixl/ixl_pf_main.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/sys/dev/ixl/i40e_register.h b/sys/dev/ixl/i40e_register.h index ffc6a7e506a6..85bcb454b3e6 100644 --- a/sys/dev/ixl/i40e_register.h +++ b/sys/dev/ixl/i40e_register.h @@ -1443,6 +1443,18 @@ #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE1_MASK I40E_MASK(0x3, I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE1_SHIFT) #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_SHIFT 14 #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_MASK I40E_MASK(0x3, I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_SHIFT) +/* _i=0...3 */ /* Reset: GLOBR */ +#define I40E_PRTMAC_PCS_LINK_STATUS1(_i) (0x0008C200 + ((_i) * 4)) +#define I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_SHIFT 24 +#define I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_MASK \ + I40E_MASK(0x7, I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_SHIFT) +#define I40E_PRTMAC_PCS_LINK_STATUS2 0x0008C220 +#define I40E_PRTMAC_PCS_LINK_CTRL 0x0008C260 +#define I40E_PRTMAC_PCS_XGMII_FIFO_STATUS 0x0008C320 +#define I40E_PRTMAC_PCS_AN_LP_STATUS 0x0008C680 +#define I40E_PRTMAC_PCS_KR_STATUS 0x0008CA00 +#define I40E_PRTMAC_PCS_FEC_KR_STATUS1 0x0008CC20 +#define I40E_PRTMAC_PCS_FEC_KR_STATUS2 0x0008CC40 #define I40E_GL_FWRESETCNT 0x00083100 /* Reset: POR */ #define I40E_GL_FWRESETCNT_FWRESETCNT_SHIFT 0 #define I40E_GL_FWRESETCNT_FWRESETCNT_MASK I40E_MASK(0xFFFFFFFF, I40E_GL_FWRESETCNT_FWRESETCNT_SHIFT) diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 4a28afc185f0..1ba59c0592a7 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -67,6 +67,7 @@ static int ixl_sysctl_set_link_active(SYSCTL_HANDLER_ARGS); /* Debug Sysctls */ static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_phy_statistics(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_switch_config(SYSCTL_HANDLER_ARGS); @@ -2671,6 +2672,10 @@ ixl_add_device_sysctls(struct ixl_pf *pf) CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_queue_interrupt_table, "A", "View MSI-X indices for TX/RX queues"); + SYSCTL_ADD_PROC(ctx, debug_list, + OID_AUTO, "phy_statistics", CTLTYPE_STRING | CTLFLAG_RD, + pf, 0, ixl_sysctl_phy_statistics, "A", "PHY Statistics"); + if (pf->has_i2c) { SYSCTL_ADD_PROC(ctx, debug_list, OID_AUTO, "read_i2c_byte", @@ -3511,6 +3516,61 @@ ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS) return (error); } +static int +ixl_sysctl_phy_statistics(SYSCTL_HANDLER_ARGS) +{ + struct ixl_pf *pf = (struct ixl_pf *)arg1; + struct i40e_hw *hw = &pf->hw; + device_t dev = pf->dev; + struct sbuf *buf; + int error = 0; + + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); + if (buf == NULL) { + device_printf(dev, "Could not allocate sbuf for sysctl output.\n"); + return (ENOMEM); + } + + if (hw->mac.type == I40E_MAC_X722) { + sbuf_printf(buf, "\n" + "PCS Link Control Register: unavailable\n" + "PCS Link Status 1: unavailable\n" + "PCS Link Status 2: unavailable\n" + "XGMII FIFO Status: unavailable\n" + "Auto-Negotiation (AN) Status: unavailable\n" + "KR PCS Status: unavailable\n" + "KR FEC Status 1 – FEC Correctable Blocks Counter: unavailable\n" + "KR FEC Status 2 – FEC Uncorrectable Blocks Counter: unavailable" + ); + } else { + sbuf_printf(buf, "\n" + "PCS Link Control Register: %#010X\n" + "PCS Link Status 1: %#010X\n" + "PCS Link Status 2: %#010X\n" + "XGMII FIFO Status: %#010X\n" + "Auto-Negotiation (AN) Status: %#010X\n" + "KR PCS Status: %#010X\n" + "KR FEC Status 1 – FEC Correctable Blocks Counter: %#010X\n" + "KR FEC Status 2 – FEC Uncorrectable Blocks Counter: %#010X", + rd32(hw, I40E_PRTMAC_PCS_LINK_CTRL), + rd32(hw, I40E_PRTMAC_PCS_LINK_STATUS1(0)), + rd32(hw, I40E_PRTMAC_PCS_LINK_STATUS2), + rd32(hw, I40E_PRTMAC_PCS_XGMII_FIFO_STATUS), + rd32(hw, I40E_PRTMAC_PCS_AN_LP_STATUS), + rd32(hw, I40E_PRTMAC_PCS_KR_STATUS), + rd32(hw, I40E_PRTMAC_PCS_FEC_KR_STATUS1), + rd32(hw, I40E_PRTMAC_PCS_FEC_KR_STATUS2) + ); + } + + error = sbuf_finish(buf); + if (error) + device_printf(dev, "Error finishing sbuf: %d\n", error); + + sbuf_delete(buf); + return (error); +} + static int ixl_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS) { From nobody Fri Jul 7 00:41:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxvjL4x3jz4lnPQ; Fri, 7 Jul 2023 00:41: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 4QxvjL4QtKz3HTv; Fri, 7 Jul 2023 00:41:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688690502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6oT5Lb2BIfg8R0h+nPN50lcseqtvPfMEPQDsWxydOTw=; b=cGHPVUZunHJVwwdtdm/QwGs3fT5FgDVMRRvaW/t2XfaJe9XCdvwICE5Rz5SWav/THVVM3e 7wdPlYEtjOkmJmJ6ypHtPj7P0tqwYMUb6WWdHJlWZhFTGItVFNc5ePM+laJuF0genLpwuJ WpVG4SrYarrdCKthEbKX/llgdTg99I+7W0EDAqO9NT5/ggx0M7wYHafTwUvv1IydLF1cJW RJrw6omU9VdLt9MIW99hp1dokIKuT19nhhYHBcaN+ocjgsLjO2S8zfBxJ5M9gtY/9HhZCz sw9eONWRYjgCFX2hJW0H4hbfd0HL1ShBzHTkadAv+yXseEq5zrOMnj1GxMfIXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688690502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6oT5Lb2BIfg8R0h+nPN50lcseqtvPfMEPQDsWxydOTw=; b=hH/SlUkcxh/KA8e2+USfk4QVza1/TFMnItLBOkad+bTv7XzrzVdT72X77jyZVySacm2agg yY2BiY0RUwsGnaBHoOROZlJllNmin6ZNpmz0MgBO5CKuRlrOGNbXHm/xvsQ4gZiJPAvNGX g+KHzZfCEsdCBavbGDqEoaZvdriq1E1Ondlzh3nT9s/CDJM79EIZPSfhvSxNRWxTEt6QVN kNry3MEpPV+3Nn3RoGg7Mbfl3tX7Z7U8s3Os3tav52n71vsP9SjAWyMDDrKtz2GzsL0nza lMkp8uFMYbvtMEQ5BkZTd6AT/kmZ5BCtQ1sXSB1FNe6ljqkO+tn6fSru5LR4iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688690502; a=rsa-sha256; cv=none; b=Sez38G0b7hVjYJot73vwKQbWftaYdW85vVO2jODiACGEJDavE/TttXV4G4jEm5KBKyZjZA 6fWq/VcTO2XL1fuYkMAnUH6dHocuxEayq92kBhywh1PIwyL1Gf4GmqyLG2NTsKJrOI9kr2 SNygFc0+QhkV1LzDKefLGKk3I1EIhPbl5uNd0niCy5c0TcnED1qU6ewCoegDaG/TBj+zPh I1n2M1DDFnILwImuwmAgXjGFe7+YQPF0/8E74cS84edmFH82CqEdgeY26axSwbcABKh77N UwDr9/X1nrZAhDJWpnX7EIFlHTWz0t4DUttE5d0PMzi3sfmWwuPlqZjAJ4q1cQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxvjL3WsjzJZC; Fri, 7 Jul 2023 00:41: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 3670fg5o003297; Fri, 7 Jul 2023 00:41:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3670fg7S003296; Fri, 7 Jul 2023 00:41:42 GMT (envelope-from git) Date: Fri, 7 Jul 2023 00:41:42 GMT Message-Id: <202307070041.3670fg7S003296@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: 2f700ca965a0 - main - libbe: bail out early if the zfs kmod isn't loaded List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f700ca965a04c4a03b6f760da6a210b6ca4df4b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=2f700ca965a04c4a03b6f760da6a210b6ca4df4b commit 2f700ca965a04c4a03b6f760da6a210b6ca4df4b Author: Kyle Evans AuthorDate: 2023-07-07 00:41:14 +0000 Commit: Kyle Evans CommitDate: 2023-07-07 00:41:14 +0000 libbe: bail out early if the zfs kmod isn't loaded As noted in the comment, we already know the rest of libbe_init() will fail because there's no pool imported. Avoid the side effect by checking beforehand and bailing out early. With this, freebsd-update(8) should no longer trigger a load of the zfs kmod just because it runs `bectl check`. Reviewed by: jwmaag_gmail.com, rew Differential Revision: https://reviews.freebsd.org/D36188 --- lib/libbe/be.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/libbe/be.c b/lib/libbe/be.c index c4dec043fcb6..753fde746e31 100644 --- a/lib/libbe/be.c +++ b/lib/libbe/be.c @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -119,6 +120,16 @@ libbe_init(const char *root) lbh = NULL; poolname = pos = NULL; + /* + * If the zfs kmod's not loaded then the later libzfs_init() will load + * the module for us, but that's not desirable for a couple reasons. If + * the module's not loaded, there's no pool imported and we're going to + * fail anyways. We also don't really want libbe consumers to have that + * kind of side-effect (module loading) in the general case. + */ + if (modfind("zfs") < 0) + goto err; + if ((lbh = calloc(1, sizeof(libbe_handle_t))) == NULL) goto err; From nobody Fri Jul 7 01:15:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxwSf3hZCz4lCYC; Fri, 7 Jul 2023 01:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QxwSf3Dttz3PwC; Fri, 7 Jul 2023 01:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688692546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H4D31IHn/aLA0D31X3A77q0vn2FC584qoQtB0gDaRpo=; b=Z2yChLEYDzTkEaFCYWJ66tsuqNeLoh+I1CQS+UX/UBkmrRz0Hr31yS2rHLSLmpunIe31iC p1eS11gFPZzDuVlRGqiGbA9Kso8q40ARSZ01aVKSntnRVebRsXrwdfDSGcNrMj1mmZBc55 G9yz2v8L7DIIcDXa1wSO8tC3CXx6t4apJNa5kFWf75YMMFNy7tobD6TX7I9uVEg25MVMjX U1DtpvRMnmod5Afo4BGBMHJaE4ZxPQyR42ViGAipAqRaoEDobd0drN4jQSxzGLdpDBp49V ZWVFWCzCosQL+7kwmlug3Hn6bdSTeTgaRLUH53uJB3/M2Y6oYjtlQpR+vrdB4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688692546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H4D31IHn/aLA0D31X3A77q0vn2FC584qoQtB0gDaRpo=; b=kiCRdUWqH03dCrM2API3Ras/0Nhe5DtdeXdyvFQy0wjXmGmtPCJc+xpkrRdhN1oLGrY8hR oXcrMSQWLghWdHH2qgM8ez6js8YTalel04TuftrEy92GUSXQ4xANQjVpc/6GJhsbH8vGQp Sg9RkP9lRNIl3jA4wofvUgPBENwBipj+mY8ERI+XhPNGPn0nrpVX31QrZK/AgXWEhACsmS wmHyyLZOKoM3CiZ+jojMA+mW1nTazDesXc6mi8W5uMi9Xk+r2s7iraD66OA/t5OiNzWQnF lZVadiuLLy+q9kMubIFo8GNs2Yd1pAP7hvEC7liq8LnyMBNSTtjr6I1yZ8V8ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688692546; a=rsa-sha256; cv=none; b=n+6I45HFMlCkyTLp8eJ67Y/UiNdOghDUn6aLy4mdqdIo3KvD6yHVLjtZKhi7ngk3Kz2TRs Jb1v+r++sKc1zeX3Fb8VZ0ZTSd13rRrW9ls9+3mNCY6f5Rzdh43xJe6RQKDe+RwNapqXS0 DCDoohtBOEjbgbJID2nsW1YOyEL6vxKpgsw9SqZN/kV4XLX5xVeE5JOfFZdtG/+JI0kg20 F6dIvRj/PmxjXIYn3Z4fs33hdyKRLbtK7w4tZNcYgXt93ZD3+UldlxRI5sV9nUTgfX1aRW GE3d3vD8mplsx14SZFD5AwQtZTS5dOMlSTCc8r/5oZqw/8huzgJiBD28pWlk0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxwSf2HY7zKKP; Fri, 7 Jul 2023 01:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3671Fk0f059696; Fri, 7 Jul 2023 01:15:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3671FkKr059695; Fri, 7 Jul 2023 01:15:46 GMT (envelope-from git) Date: Fri, 7 Jul 2023 01:15:46 GMT Message-Id: <202307070115.3671FkKr059695@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ebf37c3fed04 - main - vfs: drop LK_RETRY when crossing mount points in vfs_lookup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebf37c3fed04f10d452b426cf83e741b6365a2ec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ebf37c3fed04f10d452b426cf83e741b6365a2ec commit ebf37c3fed04f10d452b426cf83e741b6365a2ec Author: Mateusz Guzik AuthorDate: 2023-07-05 22:56:04 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-07 01:14:55 +0000 vfs: drop LK_RETRY when crossing mount points in vfs_lookup vn_lock already returns the expected error. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40883 --- sys/kern/vfs_lookup.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 588ef88d24df..5a5560a4c26f 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1314,11 +1314,9 @@ good: crosslkflags &= ~LK_SHARED; crosslkflags |= LK_EXCLUSIVE | LK_CANRECURSE; } else if ((crosslkflags & LK_EXCLUSIVE) != 0) { - vn_lock(dp, LK_UPGRADE | LK_RETRY); - if (VN_IS_DOOMED(dp)) { - error = ENOENT; - goto bad2; - } + error = vn_lock(dp, LK_UPGRADE); + if (error != 0) + goto bad_unlocked; if (dp->v_mountedhere != mp) { continue; } From nobody Fri Jul 7 01:15:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QxwSg4Zhjz4lCmK; Fri, 7 Jul 2023 01:15: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 4QxwSg44dDz3QDQ; Fri, 7 Jul 2023 01:15:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688692547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFkQAgyawLbGXTAM90iCH7rNMh+FIMNs4v+im08zwTk=; b=uv30IsCliIEz4PJUzbw/G4DT4jsEj5U+u6gHQOUt5f5EbYvLiOZr8WDA6wvpeGaMBAs0l1 JZOb0rl4wC2/AzFMD9oltW4KpCQGrJnfLBON2uprlxLRtfSl8sWvb3DLtvyO+ZXG0d1AXE Ow+ISWakwUD/JawXMOvno4u8dktPzmqO18tWOr0n2TJCS9781n5VDYVQvLyzmR2jeIPS5T fxfJCcpg3vv58DkM/I5FPLAj5ZtYaY5cZyssZv5582aaKQKs1PZ89iZn8U/OzR6ozxI4zU UgF5gE102uz56SksdsFRjW1k/mG4muwnvqGw+5NMbAUQxpd3OtUZtt820znGOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688692547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFkQAgyawLbGXTAM90iCH7rNMh+FIMNs4v+im08zwTk=; b=DkfeqhhmKdJgbw7CrQex3pTjJ0Jv0aqb1OB2L3LeyKx+4A0Mix1XtnV8LTr99gk3aRIo7b HTZgqqSY7Miqw1GgmW0c43JUBTSQRMiCSiLDPDZwA2H06tRBjbFD2Kclv7t6zZg+o0HjMA KNWBjOX6mvC1IYVglhHvuutEV5yQyaktcLuZUdAATR5GeTNoSEO3GlICKSft2XfQQPoU35 6nRNnKawiGQUa+ah8/wInVRJEORgrAl6/aa6WDPL/MlgEATSbzhAWXr6nzjAlyYaPV3tig MNJldqoJ7eifezxS+8QZEG/SvxpTZsB3DIxUK3bCf2bKuo49Uxey02qcUajFXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688692547; a=rsa-sha256; cv=none; b=l2gXBqcspI+5K/nFjXl2O4KJFKnoyfwVqpGvv5cUZdcvbD3IM5NC2rVvmGb3SbNJ0MjM6c nJZXb3KmVUaUR+BEkXmKGcl0Kkgk24bE8nN95jfWzvI80o2GHqhL+bs/3tL6s9h3mBLY6p eqj+btOLXYsEWL3yLVd6yqi0gqjZMijShcUf2FYsxwZ4yCkZyQrFCccMCmQ7DpLu++n6Y9 kKgGgsHAbAtz0FcbaSBGq3ekY2/5ueA9bUM6EpvnDUiu60CEDg92CxB6oUFEjBCrZak7Tc WQzgw/scSp6DJW5H7Gs3lHiSYoDnz3Ml9NmmlPZBUt8UZ99bZJCw9t4iCcLZTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QxwSg37KXzKF4; Fri, 7 Jul 2023 01:15: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 3671FlYS059717; Fri, 7 Jul 2023 01:15:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3671FlQe059716; Fri, 7 Jul 2023 01:15:47 GMT (envelope-from git) Date: Fri, 7 Jul 2023 01:15:47 GMT Message-Id: <202307070115.3671FlQe059716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 80bd5ef07025 - main - vfs: factor out mount point traversal to a dedicated routine List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80bd5ef0702562c546fa1717e8fe221058974eac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=80bd5ef0702562c546fa1717e8fe221058974eac commit 80bd5ef0702562c546fa1717e8fe221058974eac Author: Mateusz Guzik AuthorDate: 2023-07-05 23:01:17 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-07 01:15:04 +0000 vfs: factor out mount point traversal to a dedicated routine While here tidy up asserts in the area. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40883 --- sys/kern/vfs_lookup.c | 142 +++++++++++++++++++++++++++++--------------------- 1 file changed, 82 insertions(+), 60 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 5a5560a4c26f..1f62cf3e6652 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -871,6 +871,79 @@ vfs_lookup_failifexists(struct nameidata *ndp) return (EEXIST); } +static int __noinline +vfs_lookup_cross_mount(struct nameidata *ndp) +{ + struct componentname *cnp; + struct mount *mp; + struct vnode *dp, *tdp; + int error, crosslkflags; + bool crosslock; + + cnp = &ndp->ni_cnd; + dp = ndp->ni_vp; + + /* + * The vnode has been mounted on, find the root of the mounted + * filesystem. + */ + for (;;) { + mp = dp->v_mountedhere; + ASSERT_VOP_LOCKED(dp, __func__); + VNPASS((vn_irflag_read(dp) & VIRF_MOUNTPOINT) != 0 && mp != NULL, dp); + + crosslock = (dp->v_vflag & VV_CROSSLOCK) != 0; + crosslkflags = enforce_lkflags(mp, cnp->cn_lkflags); + if (__predict_false(crosslock)) { + /* + * We are going to be holding the vnode lock, which + * in this case is shared by the root vnode of the + * filesystem mounted at mp, across the call to + * VFS_ROOT(). Make the situation clear to the + * filesystem by passing LK_CANRECURSE if the + * lock is held exclusive, or by clearinng + * LK_NODDLKTREAT to allow recursion on the shared + * lock in the presence of an exclusive waiter. + */ + if (VOP_ISLOCKED(dp) == LK_EXCLUSIVE) { + crosslkflags &= ~LK_SHARED; + crosslkflags |= LK_EXCLUSIVE | LK_CANRECURSE; + } else if ((crosslkflags & LK_EXCLUSIVE) != 0) { + error = vn_lock(dp, LK_UPGRADE); + if (error != 0) + break; + if (dp->v_mountedhere != mp) { + continue; + } + } else + crosslkflags &= ~LK_NODDLKTREAT; + } + if (vfs_busy(mp, 0) != 0) + continue; + if (__predict_true(!crosslock)) + vput(dp); + if (dp != ndp->ni_dvp) + vput(ndp->ni_dvp); + else + vrele(ndp->ni_dvp); + vrefact(vp_crossmp); + ndp->ni_dvp = vp_crossmp; + error = VFS_ROOT(mp, crosslkflags, &tdp); + vfs_unbusy(mp); + if (__predict_false(crosslock)) + vput(dp); + if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT)) + panic("vp_crossmp exclusively locked or reclaimed"); + if (error != 0) + break; + ndp->ni_vp = dp = tdp; + if ((vn_irflag_read(dp) & VIRF_MOUNTPOINT) == 0) + break; + } + + return (error); +} + /* * Search a pathname. * This is a very central and rather complicated routine. @@ -919,7 +992,6 @@ vfs_lookup(struct nameidata *ndp) char *lastchar; /* location of the last character */ struct vnode *dp = NULL; /* the directory we are searching */ struct vnode *tdp; /* saved dp */ - struct mount *mp; /* mount table entry */ struct prison *pr; size_t prev_ni_pathlen; /* saved ndp->ni_pathlen */ int docache; /* == 0 do not cache last component */ @@ -930,8 +1002,6 @@ vfs_lookup(struct nameidata *ndp) struct componentname *cnp = &ndp->ni_cnd; int lkflags_save; int ni_dvp_unlocked; - int crosslkflags; - bool crosslock; /* * Setup: break out flag bits into variables. @@ -1283,66 +1353,18 @@ good: ni_dvp_unlocked = 1; } goto success; - } else if ((vn_irflag_read(dp) & VIRF_MOUNTPOINT) != 0) { - if ((cnp->cn_flags & NOCROSSMOUNT) != 0) - goto nextname; - } else - goto nextname; + } - /* - * Check to see if the vnode has been mounted on; - * if so find the root of the mounted filesystem. - */ - do { - mp = dp->v_mountedhere; - KASSERT(mp != NULL, - ("%s: NULL mountpoint for VIRF_MOUNTPOINT vnode", __func__)); - crosslock = (dp->v_vflag & VV_CROSSLOCK) != 0; - crosslkflags = enforce_lkflags(mp, cnp->cn_lkflags); - if (__predict_false(crosslock)) { - /* - * We are going to be holding the vnode lock, which - * in this case is shared by the root vnode of the - * filesystem mounted at mp, across the call to - * VFS_ROOT(). Make the situation clear to the - * filesystem by passing LK_CANRECURSE if the - * lock is held exclusive, or by clearinng - * LK_NODDLKTREAT to allow recursion on the shared - * lock in the presence of an exclusive waiter. - */ - if (VOP_ISLOCKED(dp) == LK_EXCLUSIVE) { - crosslkflags &= ~LK_SHARED; - crosslkflags |= LK_EXCLUSIVE | LK_CANRECURSE; - } else if ((crosslkflags & LK_EXCLUSIVE) != 0) { - error = vn_lock(dp, LK_UPGRADE); - if (error != 0) - goto bad_unlocked; - if (dp->v_mountedhere != mp) { - continue; - } - } else - crosslkflags &= ~LK_NODDLKTREAT; - } - if (vfs_busy(mp, 0) != 0) - continue; - if (__predict_true(!crosslock)) - vput(dp); - if (dp != ndp->ni_dvp) - vput(ndp->ni_dvp); - else - vrele(ndp->ni_dvp); - vrefact(vp_crossmp); - ndp->ni_dvp = vp_crossmp; - error = VFS_ROOT(mp, crosslkflags, &tdp); - vfs_unbusy(mp); - if (__predict_false(crosslock)) - vput(dp); - if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT)) - panic("vp_crossmp exclusively locked or reclaimed"); + if ((vn_irflag_read(dp) & VIRF_MOUNTPOINT) != 0 && + (cnp->cn_flags & NOCROSSMOUNT) == 0) { + error = vfs_lookup_cross_mount(ndp); if (error != 0) goto bad_unlocked; - ndp->ni_vp = dp = tdp; - } while ((vn_irflag_read(dp) & VIRF_MOUNTPOINT) != 0); + /* + * FALLTHROUGH to nextname + */ + dp = ndp->ni_vp; + } nextname: /* From nobody Fri Jul 7 01:45:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qxx7T3V25z4lMLl; Fri, 7 Jul 2023 01:45: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 4Qxx7T2ySpz3lGs; Fri, 7 Jul 2023 01:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688694357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9BjGu8ZKp9yBYSERHoStFd+2PlDVB/2gebgAe3JwlhY=; b=H94Qq8KTPwvLcAjVwo5uv+gFc6Z14gVXXGItVMKrGetzS4XHVdzxcI9amwrHEDZFnGxOCE isKaIRoHdTiXfS/T9HMfqPecRNJhJCr80O1DNpZh3GDbxE5MVFGwT5EeOc1uefZqSupMLz BCKXqsCsEPDdL3roK7rPVsZ2ChUaUxZWRfofigk/OFfpJcJCKkgGf+zj6ANgMPVl4pUK52 EZecV+9cPUUtWN+YcG7Z3cYh/sAIzgMxxyXx4QvjsY4WWmt+XsNq9FeqAzW6H//ffKC3Sr nNapLg/rSpIE1VwCxk62d4y4ZyUd8Ye74p0b7icwmWkZsjNcIA1thnBScBbJ8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688694357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9BjGu8ZKp9yBYSERHoStFd+2PlDVB/2gebgAe3JwlhY=; b=kvhhfmxYX7cZE3cBWA0hSuBKdTIWSDyFFo4kBomLENL3Bg4834JoDEE/YwBgmnQsieV0OS KdYNnT2MpJstjG/lgSs7ABPncArXEPVwb5sVibdZBxMx3uFEWoQKu2iFm4uxzUDEGIsW23 0v0CoISNeqmAL5CZsfmkcyMnObgoj3teih1Aqe9gDcYS13Zb8n8KALWAc9aVTk4NqJClvW rNLFWY7fukz+rmmjC9gm458aFYv8UVUGXOb7a90HQhqABYRfNDmLmlcygC7ktg2AjAh7T+ Ygv1XCDdM2KUp4VD4XSqJcP6D5t2ORdVBGk/xzvR21oUZGKFWWg9+uiuGrE3Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688694357; a=rsa-sha256; cv=none; b=JibXc6cqtY7nx4It0sb8gPqvQWpb0wx/Qnc5XYg0mK29SYZahJWFJ81eZk57afMNm91khl eDG7P00HYpSRvvxzi4VgAmNw/TOMpcc+XNS2S+qGYYwu3RJSI3IrkSZZBeU8qpfv7SWxEb a1ha1TiSr1U+vOBSC/SlYLKUYpK/VUqt46YkXCY4B7I9cv2eJYTWgw/JDVGdICdirPm9LS 1KF6gL2I43SKpItmr3Le/IRvMtoEF8ktK5+mSxuSdp/e867f0pRjyhvSHoNGP6NW7PgUEu 78aIq2sjFt9PAkRD7sehlGkWayJWlT8oG8m/829kfQD1Wxwk0lc8IN2Mrhxg3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qxx7T1vwKzKwj; Fri, 7 Jul 2023 01:45: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 3671jvLr009344; Fri, 7 Jul 2023 01:45:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3671jvET009343; Fri, 7 Jul 2023 01:45:57 GMT (envelope-from git) Date: Fri, 7 Jul 2023 01:45:57 GMT Message-Id: <202307070145.3671jvET009343@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: 642cd511028b - main - libthr: Add src.conf variable WITHOUT_PTHREADS_ASSERTIONS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 642cd511028b8839db2c89a44cf7807d80664f38 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=642cd511028b8839db2c89a44cf7807d80664f38 commit 642cd511028b8839db2c89a44cf7807d80664f38 Author: Greg Becker AuthorDate: 2023-07-07 00:30:02 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-07 01:45:09 +0000 libthr: Add src.conf variable WITHOUT_PTHREADS_ASSERTIONS This patch fixes a bug which prevents building libthr without _PTHREADS_INVARIANTS defined. The default remains to build libthr with -D_PTHREADS_INVARIANTS. However, with this patch, if one builds libthr with WITHOUT_PTHREADS_ASSERTIONS=true then the latency to acquire+release a default pthread mutex is reduced by roughly 5%, and a robust mutex by roughly 18% (as measured by a simple synthetic test on a Xeon E5-2697a based machine). Reviewed by: jhb, kib, mjg MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40900 --- lib/libthr/Makefile | 2 ++ lib/libthr/thread/thr_mutex.c | 2 +- share/mk/src.opts.mk | 1 + tools/build/options/WITHOUT_PTHREADS_ASSERTIONS | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 062f5eec5d88..6337c87d5d6f 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -51,8 +51,10 @@ SYMBOL_MAPS=${.CURDIR}/pthread.map MAN= libthr.3 +.if ${MK_PTHREADS_ASSERTIONS} != "no" # enable extra internal consistency checks CFLAGS+=-D_PTHREADS_INVARIANTS +.endif PRECIOUSLIB= diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 8dccdf4dfa8c..2cbfd9a459d3 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -120,7 +120,7 @@ __weak_reference(_pthread_mutex_getyieldloops_np, pthread_mutex_getyieldloops_np __weak_reference(_pthread_mutex_isowned_np, pthread_mutex_isowned_np); static void -mutex_init_link(struct pthread_mutex *m) +mutex_init_link(struct pthread_mutex *m __unused) { #if defined(_PTHREADS_INVARIANTS) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 3c17f9319619..0e9b5a052ffc 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -159,6 +159,7 @@ __DEFAULT_YES_OPTIONS = \ PKGBOOTSTRAP \ PMC \ PPP \ + PTHREADS_ASSERTIONS \ QUOTAS \ RADIUS_SUPPORT \ RBOOTD \ diff --git a/tools/build/options/WITHOUT_PTHREADS_ASSERTIONS b/tools/build/options/WITHOUT_PTHREADS_ASSERTIONS new file mode 100644 index 000000000000..b0961fa43cb6 --- /dev/null +++ b/tools/build/options/WITHOUT_PTHREADS_ASSERTIONS @@ -0,0 +1 @@ +Disable debugging assertions in pthreads library. From nobody Fri Jul 7 01:45:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qxx7V3pTrz4lMBC; Fri, 7 Jul 2023 01:45: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 4Qxx7V3JzLz3lF6; Fri, 7 Jul 2023 01:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688694358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eoN1Ch27n8cxxR7INipyuMZgjNpPcQm2fJwzGfkSXzc=; b=MirIe6aBcVLgCbZIgmSXdLLZdXSLIwyDTO2rNceZNMTWh7hI2utIHYS41R+2k+C1+aA6XM clNuCggZOhO355qk5CTFHxWGsjYOjOVyHAfd2b8/iDbTSf/V8ZWCgHJMKk3sSd759Z1mVK TcOW7CxKGYA5X7my+OceUJ9KoD+mBT7tWCz+9kOuvwH/dwaB+zZbwnZE6iWIlRGNgBP6GI ERcxs2iVBuTMJHKwdjvl75uZQbB7hwV0Hsf//1EiyK/pn7FOHoNh+55eG9zwuD0pud+qJV GbyImISXeot255LYMbfHAON096amItCNeg4u4bLGbPW8rSpg4XvPEQg9nnffig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688694358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eoN1Ch27n8cxxR7INipyuMZgjNpPcQm2fJwzGfkSXzc=; b=MKlGEzcpdEGWRuC2tGavehgj9UM6844G2L0Cq07QI/jv77Jw5BEzKF+BUbRGngylxzhNpn 4uMUzYnCwBQg3/m7IxNAw49XJ1dloRiv30xaxut8GZKlm0JJTeAxtkEN5WMIheyth8Izjv p9/JREvyyn63tbAsAjlx1QSowtCyM1lNfYZ3zA/acIDJSOcJAGhsn+wLBjQqyFAqbLSLB7 v6kugEqj2g192KpQE6rkZkfvkq26Sg7JKUhuLEobNTjR5qn/ZxMgnDRfH6HRg8kSF354WL ByPckLJ112e8Cr2rai2yLj6Ds7+NmaFzIM8E1fTOekxP1x1WNIQYNDiYA7QgWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688694358; a=rsa-sha256; cv=none; b=cvPq3zDHScjvt0yGqltNkoY5ey8X9bkUgUqdDM9EHlHmogUjqUt79/izN6vhEwQ9wnTVMm z4yyhC3aVTToqrYJ4fdABTXv2DWmXmV4RVIR3AZw9udoDD9tRrU8PMLrjm6evOzJjDf3OM ReXangxOTHDfPlTnYQQSdFBjvDAzjC4wAKy//bSZ5uD3ueLWlujmRn8Cc17p9pL/9gd89u WLjrY3kztzxK779lO0Emtr1ZNYeqp57CcjGMhaGk8NUjKb8RA6F7FwXbKoOBtCxOKLJHHG r37APo+CEv8Je9cPSsr6V+mBT2hhhePERlUG9eqR9a5GBPZKJzbrK7anZJt5CA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qxx7V2LYJzL6M; Fri, 7 Jul 2023 01:45: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 3671jwhp009363; Fri, 7 Jul 2023 01:45:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3671jwOc009362; Fri, 7 Jul 2023 01:45:58 GMT (envelope-from git) Date: Fri, 7 Jul 2023 01:45:58 GMT Message-Id: <202307070145.3671jwOc009362@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: 97f14168f21f - main - src.conf.5: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97f14168f21f7d618c413946b83a2a6adfc6527a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=97f14168f21f7d618c413946b83a2a6adfc6527a commit 97f14168f21f7d618c413946b83a2a6adfc6527a Author: Konstantin Belousov AuthorDate: 2023-07-07 00:50:06 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-07 01:45:34 +0000 src.conf.5: regen --- share/man/man5/src.conf.5 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 869eccd03a49..856002bd1938 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd June 19, 2023 +.Dd July 7, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1463,6 +1463,8 @@ Build profiled libraries for use with .Xr gprof 8 . This option is deprecated and may not be present in a future version of .Fx . +.It Va WITHOUT_PTHREADS_ASSERTIONS +Disable debugging assertions in pthreads library. .It Va WITHOUT_QUOTAS Do not build .Xr quota 1 From nobody Fri Jul 7 04:24:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qy0f34nY6z4m3JT; Fri, 7 Jul 2023 04:24: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 4Qy0f34MtQz49Ls; Fri, 7 Jul 2023 04:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688703851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MreBR8FV/ZGLQwTt0Kc+YgyUlJMqpcGT4bTqOItxdwA=; b=eI5cv/QxpRzKdbdMyOzlH/U6lP2m3x0xnyr+44TpqVJNOiDahznDcOKdd6zywZ4vbCXt96 afi0/Qt4Ca0C/nFqP2vmhhyFfadzRZHMrqJHtN/rCjwkEYDbqtq7Q/unZhRTgp7awH/KS8 vlx1oYazHfvjZRbuh0RjuKG+F9LHZqMQips7hKqrwEB44drcrNNwOb2kE7jbhXGJfC9EQv JpDPXz4FJDWz6Z+A08Zjck81iYfN+yS/dzxlFDhgxypCv0k6as3bpluewfKEt2M3x+q1aC RG6jwzIoj1gHFpIoHuQuv/25fm4pxARHWQI9DBevTyVvVp5I/bN2e+9b34ve0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688703851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MreBR8FV/ZGLQwTt0Kc+YgyUlJMqpcGT4bTqOItxdwA=; b=XHT6bsk3kQiBnQ3srx1D3PeLxcOOcc3jwHizuK6NBzOsCnxM/6Z7R7t1rApREdui+RqyBv zDax1yxAgvgq65jmOC37p0oBDI0CF012H4ZGhKGPcRIdXRUOIPqqNW9cNT2XIlj//MQbvr FWP5Up2nBOKLC1SCsQY93rAvX/v0Ev9m1t6J8DuKzpKo/snznkDveHgHB6+9NRt+ig8ify tB64Jx0Hjsw/CqMPzULBUAbMCKnrNORPGYpLvTRqUFFB4UAR6B87jGxSbi+s+AZeos2zN7 iu6g2bTkkfSgh5PZeAU1fLuRxVwNEzNDtAxM7jjLDd8JFZu5YswaQxG46lfaJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688703851; a=rsa-sha256; cv=none; b=mWBVir5lPFWI94W3EYuXBvOFcpjw3cUZmZScylHzqRvBSqjAKUXsIpklCYMi4YQVgiEYGo VPAmwsKsUPFNO5Bc3VEUv56sf2pGBFvV5bvoaK41HK1CuEgba0sjrtDBd96MBHHkaynDE5 aS9YCWQdPz0BIODzLeP9iICak2hE3nilOEJFEfeu4ETct9I6AleONgYiuRoana6NwheHLE x/6YC218TznVTozAft2Rv8TeFP60hwMS0d+43hIl1PQL8wcelpw1VIHgDD1Lnoam161UqX CryxpHNwIvdrQmGWj89bAJx9MJuXefEQ3wo5IWjcY7gt31A5akZ5Fil5WjCjGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qy0f33R6KzQGw; Fri, 7 Jul 2023 04:24: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 3674OBOa074390; Fri, 7 Jul 2023 04:24:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3674OBaa074389; Fri, 7 Jul 2023 04:24:11 GMT (envelope-from git) Date: Fri, 7 Jul 2023 04:24:11 GMT Message-Id: <202307070424.3674OBaa074389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 034c0856018c - main - modules: fix freebsd32_modstat on big endian platforms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 034c0856018ccf73c0f2d6140825f3edf43f47b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=034c0856018ccf73c0f2d6140825f3edf43f47b2 commit 034c0856018ccf73c0f2d6140825f3edf43f47b2 Author: Ka Ho Ng AuthorDate: 2023-07-07 04:21:01 +0000 Commit: Ka Ho Ng CommitDate: 2023-07-07 04:22:59 +0000 modules: fix freebsd32_modstat on big endian platforms The layout of modspecific_t on both little endian and big endian are as follows: |0|1|2|3|4|5|6|7| +-------+-------+ |uintval| | +-------+-------+ |ulongval | +-------+-------+ For the following code snippet: CP(mod->data, data32, longval); CP(mod->data, data32, ulongval); It only takes care of little endian platforms that it truncates the highest 32bit automatically. However on big endian platforms it takes the highest 32bit instead. This eventually returns a garbage syscall number to the 32bit userland. Since modspecific_t's usage currently is for the use of syscall modules, we only initialize modspecific32_t with uintval. Now on both BE and LE 64-bit platforms it always pick up the first 4 bytes. Sponsored by: Juniper Networks, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40814 MFC after: 1 week --- sys/kern/kern_module.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index 40e47868481c..d4edc64a5ce4 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -520,10 +520,9 @@ freebsd32_modstat(struct thread *td, struct freebsd32_modstat_args *uap) id = mod->id; refs = mod->refs; name = mod->name; - CP(mod->data, data32, intval); + _Static_assert(sizeof(data32) == sizeof(data32.uintval), + "bad modspecific32_t size"); CP(mod->data, data32, uintval); - CP(mod->data, data32, longval); - CP(mod->data, data32, ulongval); MOD_SUNLOCK; stat32 = uap->stat; From nobody Fri Jul 7 05:10:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qy1gX6R2rz4mDvV; Fri, 7 Jul 2023 05:10: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 4Qy1gX6GsKz4Hc8; Fri, 7 Jul 2023 05:10:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688706632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DOmtHgkhtRodxOxF8+8OljT3RQ+2i0xNGKMcUH+VEg4=; b=UK3EDR5aU4xAlVOYg2HvbqRCWuNSPBPlHvNvWkzmAtyI9E8GoT+XvuoDZKkXyg4U0waDAN JUvxKzadm1aD7KQXmBhwxHZu2TaaDF+VE5dttyR0+QJiH00n6buU4H814QkgbleuZtRK8t Ze628KlKP+WwZdrxhxtV1Gml6TX/xQNzAhEhKtc1AiYJyO5YaAvp0W4GkYm/zcvHsWNCv2 NxJ0u4P94uit2egODaA/rWVmOluOQP2C7eRo4M5ectNATpqVILK1vF7UUSI0u1cSH0k9CK jC5VFwVpYo+XHp3b/x4+9I4EJctqiP8wMdNpZmzKFg9k9f+/dvgQFVTcHSATcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688706632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DOmtHgkhtRodxOxF8+8OljT3RQ+2i0xNGKMcUH+VEg4=; b=EzgkJ2uyZqp0dQ3OMXtUhcFTDhftt3ar3upez4yYRAOOUrzrravrm5Ujolp8q1pqssQjEG j5WxUPUNMQ0x6uw+hp7+Livi5fYQO3MWGCCTgky7y2zq8MthEdSm8k83sDet0XbafCuDM9 1GAIeHhfbZnCzI91IuY/Q8eGsjqZZP9u0U+yLtSb0RlAeD/GbN2WBQ3Rsh0IS/yKmUED30 ps1v8CeRNFT2q4KEflEOOw6XMy8lIjyZCQpKPfBzJpwjKIkeHu7db+NwLS6KbekLKfa0LD 9wJOECNTXiOG/80aYqvyjOZGTlkfOMlof5o73nCAluI36rrT0iEMkRmm99TWPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688706632; a=rsa-sha256; cv=none; b=K3H5d02oNO+9SPi3XdxG7zrM6aECNhP3frEeq2EFv/jgGuuXo78tdKO7HFj3myE1C9LoK3 hA9g5epalCGCGoQOW+IStIirngE8joc9PGm+FLRp0CkaIfQhJ95zqfeSppzBUONRsokl9Y qIhDn4ITUmIXuvx0vcM0QYvzSmqK60if8qKcnMnmwoonptCrEPAPIWq1hI5wQ3BYLPViSc YUv4KNPgJNqjhvF6P6TmcK0F3qXRWbo9zJUoVCXMLdN3yDbGDT1ADnO3j8yi89Hy0ltOCR fGVSJc4AGQRLsgjZXoL8TVbtG/8K0xzHAemPq5DiPRvUeO4NVA6IRJEp6H/rVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qy1gX53PBzRBB; Fri, 7 Jul 2023 05:10: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 3675AW6r051153; Fri, 7 Jul 2023 05:10:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3675AWZS051152; Fri, 7 Jul 2023 05:10:32 GMT (envelope-from git) Date: Fri, 7 Jul 2023 05:10:32 GMT Message-Id: <202307070510.3675AWZS051152@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: 971bac5ace7a - main - kbd: consolidate kb interfaces (phase one) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 971bac5ace7a3c2262349fa2808188a11a5ffeed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=971bac5ace7a3c2262349fa2808188a11a5ffeed commit 971bac5ace7a3c2262349fa2808188a11a5ffeed Author: Michael AuthorDate: 2023-07-07 02:32:45 +0000 Commit: Warner Losh CommitDate: 2023-07-07 05:10:18 +0000 kbd: consolidate kb interfaces (phase one) Refactor to eliminate duplicated rate and delay tables, with minor style tweaks for changed lines. Remove an obsolete comment about needing to convert from microseconds to ticks (that's done elsewhere). Remove traiing whitespace in kbdcontrol.c. Except for the new warning, no change in behavior Sponsored by: DSS GmbH Reviewed by: imp [minor style tweaks as well] Pull Request: https://github.com/freebsd/pull/683 Differential Revision: https://reviews.freebsd.org/D38818 --- sys/dev/adb/adb_kbd.c | 12 ++------- sys/dev/atkbdc/atkbd.c | 18 +++++--------- sys/dev/gpio/gpiokeys.c | 10 ++------ sys/dev/hid/hkbd.c | 10 ++------ sys/dev/kbdmux/kbdmux.c | 23 +++++------------ sys/dev/usb/input/ukbd.c | 10 ++------ sys/dev/vkbd/vkbd.c | 18 +++++--------- sys/sys/kbio.h | 7 ++++++ usr.sbin/kbdcontrol/kbdcontrol.c | 53 +++++++++++++++++++++------------------- 9 files changed, 61 insertions(+), 100 deletions(-) diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c index 62fb70cd51f7..2bc5a79a7e2b 100644 --- a/sys/dev/adb/adb_kbd.c +++ b/sys/dev/adb/adb_kbd.c @@ -688,18 +688,10 @@ akbd_check_char(keyboard_t *kbd) static int set_typematic(keyboard_t *kbd, int code) { - /* These numbers are in microseconds, so convert to ticks */ - - static int delays[] = { 250, 500, 750, 1000 }; - static int rates[] = { 34, 38, 42, 46, 50, 55, 59, 63, - 68, 76, 84, 92, 100, 110, 118, 126, - 136, 152, 168, 184, 200, 220, 236, 252, - 272, 304, 336, 368, 400, 440, 472, 504 }; - if (code & ~0x7f) return EINVAL; - kbd->kb_delay1 = delays[(code >> 5) & 3]; - kbd->kb_delay2 = rates[code & 0x1f]; + kbd->kb_delay1 = kbdelays[(code >> 5) & 3]; + kbd->kb_delay2 = kbrates[code & 0x1f]; return 0; } diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index 0c9f2592d6b8..dcb5805982ff 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -1571,22 +1571,16 @@ get_kbd_id(KBDC kbdc) return ((id2 << 8) | id1); } -static int delays[] = { 250, 500, 750, 1000 }; -static int rates[] = { 34, 38, 42, 46, 50, 55, 59, 63, - 68, 76, 84, 92, 100, 110, 118, 126, - 136, 152, 168, 184, 200, 220, 236, 252, - 272, 304, 336, 368, 400, 440, 472, 504 }; - static int typematic_delay(int i) { - return delays[(i >> 5) & 3]; + return (kbdelays[(i >> 5) & 3]); } static int typematic_rate(int i) { - return rates[i & 0x1f]; + return (kbrates[i & 0x1f]); } static int @@ -1595,13 +1589,13 @@ typematic(int delay, int rate) int value; int i; - for (i = nitems(delays) - 1; i > 0; --i) { - if (delay >= delays[i]) + for (i = nitems(kbdelays) - 1; i > 0; --i) { + if (delay >= kbdelays[i]) break; } value = i << 5; - for (i = nitems(rates) - 1; i > 0; --i) { - if (rate >= rates[i]) + for (i = nitems(kbrates) - 1; i > 0; --i) { + if (rate >= kbrates[i]) break; } value |= i; diff --git a/sys/dev/gpio/gpiokeys.c b/sys/dev/gpio/gpiokeys.c index 86f684535be9..e21b53db9a4c 100644 --- a/sys/dev/gpio/gpiokeys.c +++ b/sys/dev/gpio/gpiokeys.c @@ -975,17 +975,11 @@ gpiokeys_poll(keyboard_t *kbd, int on) static int gpiokeys_set_typematic(keyboard_t *kbd, int code) { - static const int delays[] = {250, 500, 750, 1000}; - static const int rates[] = {34, 38, 42, 46, 50, 55, 59, 63, - 68, 76, 84, 92, 100, 110, 118, 126, - 136, 152, 168, 184, 200, 220, 236, 252, - 272, 304, 336, 368, 400, 440, 472, 504}; - if (code & ~0x7f) { return (EINVAL); } - kbd->kb_delay1 = delays[(code >> 5) & 3]; - kbd->kb_delay2 = rates[code & 0x1f]; + kbd->kb_delay1 = kbdelays[(code >> 5) & 3]; + kbd->kb_delay2 = kbrates[code & 0x1f]; return (0); } diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index 6d9ad52469bb..922256a8f23b 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -1832,17 +1832,11 @@ hkbd_set_typematic(keyboard_t *kbd, int code) #ifdef EVDEV_SUPPORT struct hkbd_softc *sc = kbd->kb_data; #endif - static const int delays[] = {250, 500, 750, 1000}; - static const int rates[] = {34, 38, 42, 46, 50, 55, 59, 63, - 68, 76, 84, 92, 100, 110, 118, 126, - 136, 152, 168, 184, 200, 220, 236, 252, - 272, 304, 336, 368, 400, 440, 472, 504}; - if (code & ~0x7f) { return (EINVAL); } - kbd->kb_delay1 = delays[(code >> 5) & 3]; - kbd->kb_delay2 = rates[code & 0x1f]; + kbd->kb_delay1 = kbdelays[(code >> 5) & 3]; + kbd->kb_delay2 = kbrates[code & 0x1f]; #ifdef EVDEV_SUPPORT if (sc->sc_evdev != NULL) evdev_push_repeats(sc->sc_evdev, kbd); diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index 71f5dc7295e7..97ea7ba14a62 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -963,17 +963,6 @@ kbdmux_check_char(keyboard_t *kbd) static int kbdmux_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) { - static int delays[] = { - 250, 500, 750, 1000 - }; - - static int rates[] = { - 34, 38, 42, 46, 50, 55, 59, 63, - 68, 76, 84, 92, 100, 110, 118, 126, - 136, 152, 168, 184, 200, 220, 236, 252, - 272, 304, 336, 368, 400, 440, 472, 504 - }; - kbdmux_state_t *state = (kbdmux_state_t *) kbd->kb_data; kbdmux_kbd_t *k; keyboard_info_t *ki; @@ -1206,14 +1195,14 @@ kbdmux_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) int i; /* lookup delay */ - for (i = sizeof(delays)/sizeof(delays[0]) - 1; i > 0; i --) - if (((int *)arg)[0] >= delays[i]) + for (i = nitems(kbdelays) - 1; i > 0; i--) + if (((int *)arg)[0] >= kbdelays[i]) break; mode = i << 5; /* lookup rate */ - for (i = sizeof(rates)/sizeof(rates[0]) - 1; i > 0; i --) - if (((int *)arg)[1] >= rates[i]) + for (i = nitems(kbrates) - 1; i > 0; i--) + if (((int *)arg)[1] >= kbrates[i]) break; mode |= i; } else @@ -1225,8 +1214,8 @@ kbdmux_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) return (EINVAL); } - kbd->kb_delay1 = delays[(mode >> 5) & 3]; - kbd->kb_delay2 = rates[mode & 0x1f]; + kbd->kb_delay1 = kbdelays[(mode >> 5) & 3]; + kbd->kb_delay2 = kbrates[mode & 0x1f]; #ifdef EVDEV_SUPPORT if (state->ks_evdev != NULL && evdev_rcpt_mask & EVDEV_RCPT_KBDMUX) diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index 0e964da3ef19..0dd6d41f7a8d 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -2002,17 +2002,11 @@ ukbd_set_typematic(keyboard_t *kbd, int code) #ifdef EVDEV_SUPPORT struct ukbd_softc *sc = kbd->kb_data; #endif - static const int delays[] = {250, 500, 750, 1000}; - static const int rates[] = {34, 38, 42, 46, 50, 55, 59, 63, - 68, 76, 84, 92, 100, 110, 118, 126, - 136, 152, 168, 184, 200, 220, 236, 252, - 272, 304, 336, 368, 400, 440, 472, 504}; - if (code & ~0x7f) { return (EINVAL); } - kbd->kb_delay1 = delays[(code >> 5) & 3]; - kbd->kb_delay2 = rates[code & 0x1f]; + kbd->kb_delay1 = kbdelays[(code >> 5) & 3]; + kbd->kb_delay2 = kbrates[code & 0x1f]; #ifdef EVDEV_SUPPORT if (sc->sc_evdev != NULL) evdev_push_repeats(sc->sc_evdev, kbd); diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c index ebf9b09996c2..bb91c85b2718 100644 --- a/sys/dev/vkbd/vkbd.c +++ b/sys/dev/vkbd/vkbd.c @@ -1305,22 +1305,16 @@ vkbd_poll(keyboard_t *kbd, int on) * Local functions */ -static int delays[] = { 250, 500, 750, 1000 }; -static int rates[] = { 34, 38, 42, 46, 50, 55, 59, 63, - 68, 76, 84, 92, 100, 110, 118, 126, - 136, 152, 168, 184, 200, 220, 236, 252, - 272, 304, 336, 368, 400, 440, 472, 504 }; - static int typematic_delay(int i) { - return (delays[(i >> 5) & 3]); + return (kbdelays[(i >> 5) & 3]); } static int typematic_rate(int i) { - return (rates[i & 0x1f]); + return (kbrates[i & 0x1f]); } static int @@ -1329,13 +1323,13 @@ typematic(int delay, int rate) int value; int i; - for (i = nitems(delays) - 1; i > 0; i --) { - if (delay >= delays[i]) + for (i = nitems(kbdelays) - 1; i > 0; i--) { + if (delay >= kbdelays[i]) break; } value = i << 5; - for (i = nitems(rates) - 1; i > 0; i --) { - if (rate >= rates[i]) + for (i = nitems(kbrates) - 1; i > 0; i--) { + if (rate >= kbrates[i]) break; } value |= i; diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h index 80a58bf8e51e..3b632bf96361 100644 --- a/sys/sys/kbio.h +++ b/sys/sys/kbio.h @@ -70,6 +70,13 @@ struct keyboard_info { }; typedef struct keyboard_info keyboard_info_t; +/* keyboard repeat rate mapping table */ +static const int kbdelays[] = { 250, 500, 750, 1000 }; +static const int kbrates[] = { 34, 38, 42, 46, 50, + 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126, + 136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, + 368, 400, 440, 472, 504 }; + /* add/remove keyboard to/from mux */ #define KBADDKBD _IOW('K', 68, keyboard_info_t) /* add keyboard */ #define KBRELKBD _IOW('K', 69, keyboard_info_t) /* release keyboard */ diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c index 4f3be144132b..614734e6123a 100644 --- a/usr.sbin/kbdcontrol/kbdcontrol.c +++ b/usr.sbin/kbdcontrol/kbdcontrol.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "path.h" @@ -70,13 +71,13 @@ static const char ctrl_names[32][4] = { static const char acc_names[15][5] = { "dgra", "dacu", "dcir", "dtil", "dmac", "dbre", "ddot", - "duml", "dsla", "drin", "dced", "dapo", "ddac", "dogo", + "duml", "dsla", "drin", "dced", "dapo", "ddac", "dogo", "dcar", }; static const char acc_names_u[15][5] = { "DGRA", "DACU", "DCIR", "DTIL", "DMAC", "DBRE", "DDOT", - "DUML", "DSLA", "DRIN", "DCED", "DAPO", "DDAC", "DOGO", + "DUML", "DSLA", "DRIN", "DCED", "DAPO", "DDAC", "DOGO", "DCAR", }; @@ -107,13 +108,8 @@ static const char fkey_table[96][MAXFK] = { /* 93-96 */ "" , "" , "" , "" , }; -static const int delays[] = {250, 500, 750, 1000}; -static const int repeats[] = { 34, 38, 42, 46, 50, 55, 59, 63, - 68, 76, 84, 92, 100, 110, 118, 126, - 136, 152, 168, 184, 200, 220, 236, 252, - 272, 304, 336, 368, 400, 440, 472, 504}; -static const int ndelays = (sizeof(delays) / sizeof(int)); -static const int nrepeats = (sizeof(repeats) / sizeof(int)); +static const int ndelays = nitems(kbdelays); +static const int nrepeats = nitems(kbrates); static int hex = 0; static int paths_configured = 0; static int token; @@ -298,7 +294,7 @@ get_definition_line(FILE *file, keymap_t *keymap, accentmap_t *accentmap) if (token < 0) token = yylex(); - switch (token) { + switch (token) { case TNUM: c = get_key_definition_line(keymap); if (c < 0) @@ -751,7 +747,7 @@ dump_key_definition(char *name, keymap_t *keymap) dump_entry(keymap->key[i].map[j]); } printf("}, 0x%02X,0x%02X },\n", - (unsigned)keymap->key[i].spcl, + (unsigned)keymap->key[i].spcl, (unsigned)keymap->key[i].flgs); } printf("} };\n\n"); @@ -764,7 +760,7 @@ dump_accent_definition(char *name, accentmap_t *accentmap) int c; printf("static accentmap_t accentmap_%s = { %d", - name, accentmap->n_accs); + name, accentmap->n_accs); if (accentmap->n_accs <= 0) { printf(" };\n\n"); return; @@ -785,7 +781,7 @@ dump_accent_definition(char *name, accentmap_t *accentmap) } else printf(" 0x%02x, {", c); for (j = 0; j < NUM_ACCENTCHARS; j++) { - c = accentmap->acc[i].map[j][0]; + c = accentmap->acc[i].map[j][0]; if (c == 0) break; if ((j > 0) && ((j % 4) == 0)) @@ -793,7 +789,7 @@ dump_accent_definition(char *name, accentmap_t *accentmap) if (isascii(c) && isprint(c)) printf(" { '%c',", c); else - printf(" { 0x%02x,", c); + printf(" { 0x%02x,", c); printf("0x%02x },", accentmap->acc[i].map[j][1]); } printf(" }, },\n"); @@ -900,8 +896,8 @@ load_keymap(char *opt, int dumponly) fclose(file); return; } - if ((accentmap.n_accs > 0) - && (ioctl(0, PIO_DEADKEYMAP, &accentmap) < 0)) { + if ((accentmap.n_accs > 0) + && (ioctl(0, PIO_DEADKEYMAP, &accentmap) < 0)) { #ifdef OPIO_DEADKEYMAP to_old_accentmap(&accentmap, &oaccentmap); if (ioctl(0, OPIO_DEADKEYMAP, &oaccentmap) < 0) @@ -1058,14 +1054,20 @@ set_keyrates(char *opt) int r, d; if (!strcmp(opt, "slow")) { - delay = 1000, repeat = 500; - d = 3, r = 31; + delay = 1000; + repeat = 504; + d = 3; + r = 31; } else if (!strcmp(opt, "normal")) { - delay = 500, repeat = 125; - d = 1, r = 15; + delay = 500; + repeat = 126; + d = 1; + r = 15; } else if (!strcmp(opt, "fast")) { - delay = repeat = 0; - d = r = 0; + delay = 0; + repeat = 0; + d = 0; + r = 0; } else { int n; char *v1; @@ -1081,11 +1083,11 @@ badopt: return; } for (n = 0; n < ndelays - 1; n++) - if (delay <= delays[n]) + if (delay <= kbdelays[n]) break; d = n; for (n = 0; n < nrepeats - 1; n++) - if (repeat <= repeats[n]) + if (repeat <= kbrates[n]) break; r = n; } @@ -1093,6 +1095,7 @@ badopt: arg[0] = delay; arg[1] = repeat; if (ioctl(0, KDSETREPEAT, arg)) { + warn("fallback, setting keyboard rate via legacy interface (KDSETRAD), will be removed soon"); if (ioctl(0, KDSETRAD, (d << 5) | r)) warn("setting keyboard rate"); } @@ -1151,7 +1154,7 @@ set_keyboard(char *device) } /* * The keyboard device driver won't release the keyboard by - * the following ioctl, but it automatically will, when the device + * the following ioctl, but it automatically will, when the device * is closed. So, we don't check error here. */ ioctl(fd, CONS_RELKBD, 0); From nobody Fri Jul 7 05:10:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qy1gZ1b35z4mF2J; Fri, 7 Jul 2023 05:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qy1gZ0M0Jz4HlX; Fri, 7 Jul 2023 05:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688706634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cy5Fxb5ZCQj4p8s7Gj+Ka36PB/V0+xVzzqxconkA8pY=; b=PXaes9wlHVlwh8y0wVSfV0bBcwS73S+AuyaiT0lfz7oUn63HKXQD/XO95lkUkf5ZC8ureu RVjXtOceR64ChsRwtPG8ILS6LGif1bymJ9tE4GwUR+x6pznSucPcUwlzQsWnRXHQm2Xac7 vEegZuzKItafBriZloqhsi1ZsqJZLUthzfg59LcKXFWJ1jgALuSz3QPR32uyP1ib0DF0r/ NfM3nH3dG8LcCdsR3+ewP64B/XXt4ONj3b2X5n1QoxM0a0AkeCEq+kbFsL6AE0tiQk6AEz E1A+fQDu/YNEXBFnAwHqiKitAg0g306bPbpOVtPb7sVUJ+Is9JHtWiBu9sN5kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688706634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cy5Fxb5ZCQj4p8s7Gj+Ka36PB/V0+xVzzqxconkA8pY=; b=Acf43kZdVGHgrzR0wUpIYPI/8uCGMtS4HCNWfffr+VHvqX4DKLnNmn04XT9lh97GiXf7hO 5lRDLarGXr8JQUZM0AeqbyjdMGjHyY85lXWfLOuTUS8XbBKoHPV69CTAFYs0rlwAyluOr9 TEZCtiwOKg0Tf184fQv0CdYvh6qGd48cFyTY+J1dXI0Kmdz2uEegs+wRx51IM3tu4CH4se RQaSjJDGE5umvuBbMoYI084gUX59YoJRJz2ubV5CQA/zBzyLsFHc8flm1N/8/DYYAU4H5E sgWVlnIVKe95taSZHeE8f8Eix5VFsGZN8+B/HIU4A6VzA47JnLoqNSMAX9d1PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688706634; a=rsa-sha256; cv=none; b=wyoNr9eEctCkvIi6AnDPnwRC+cATiAtEqmJpEWfcDszRvgmNz7KlMkIxK8DqKaOp9Nh+EW Orxt2w+V8YDBCDQaWP9rE6eBPSi1vaKykIN5l77ahqgRitfJ/npKrRMEQwWZZnGhk4FJSY tYEApxwkbsnUf66klkXhEnxu0igwA1vSytkBCpBrBu/n9+3wvPH0VtervlMc6t8IRf5nEk xfR/2SIL/KujXv17eXNs+i0yh+HyCZquJGS7E//2Fg83BaGJKz7FgFXsMkLNkPiXZbwvJ1 ycqc8L/ncAYETZM44UcTNAryQubMOfcsUAjrxfzJ5VeWElGcLWfn8pvQtYYywQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qy1gY61XFzRBC; Fri, 7 Jul 2023 05:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3675AXSt051172; Fri, 7 Jul 2023 05:10:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3675AX05051171; Fri, 7 Jul 2023 05:10:33 GMT (envelope-from git) Date: Fri, 7 Jul 2023 05:10:33 GMT Message-Id: <202307070510.3675AX05051171@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: 761ab48d6af8 - main - kbdcontrol: Remove compat code for 4.x -> 5.x transition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 761ab48d6af8e949452a64e2baa279c85c848cbb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=761ab48d6af8e949452a64e2baa279c85c848cbb commit 761ab48d6af8e949452a64e2baa279c85c848cbb Author: Warner Losh AuthorDate: 2023-07-07 05:08:01 +0000 Commit: Warner Losh CommitDate: 2023-07-07 05:10:18 +0000 kbdcontrol: Remove compat code for 4.x -> 5.x transition I think we're safely past that now... Sponsored by: Netflix --- usr.sbin/kbdcontrol/kbdcontrol.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c index 614734e6123a..d7a0ff5ecfd0 100644 --- a/usr.sbin/kbdcontrol/kbdcontrol.c +++ b/usr.sbin/kbdcontrol/kbdcontrol.c @@ -46,20 +46,6 @@ __FBSDID("$FreeBSD$"); #include "path.h" #include "lex.h" -/* - * HALT, PDWN, and PASTE aren't defined in 4.x, but we need them to bridge - * to 5.0-current so define them here as a stop gap transition measure. - */ -#ifndef HALT -#define HALT 0xa1 /* halt machine */ -#endif -#ifndef PDWN -#define PDWN 0xa2 /* halt machine and power down */ -#endif -#ifndef PASTE -#define PASTE 0xa3 /* paste from cut-paste buffer */ -#endif - #define SPECIAL 0x80000000 static const char ctrl_names[32][4] = { From nobody Fri Jul 7 05:22:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qy1wp4Pc9z4mHbV; Fri, 7 Jul 2023 05:22: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 4Qy1wp3zbgz4KTF; Fri, 7 Jul 2023 05:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688707322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GINGcw7PrHsy0c+cT4q0KmtP2rvChNYHQtltwAWQNTo=; b=KESSF0diLNcdJOGtqQlVRkTc72kzM0rz4cCiG3bNTl65JMfqv7AGT2zom3oe9bFYkITS/t X4H6lgOJKlqeRL9jPUt+Rb5grOn2gNfuqif422J1B+DlrAHfijRjH4A9kXi7EYHqCujLja 7OWy1Sm5UAJDeFIS+vbBsB3cFsZRaqWgoXaJmEsigeuA2oKzDsDW2hQGiuLWRpcBbRJv5g c2gpv93U2LSJTTAo+3tgkxjeCunNideCmHshTHeanYnBukIAX5yddoj8GAJWdOuiCzeA2d HOiRrHeS+a2mle8/oFkDOVY7RZaKsbAXit0N/YQGgQo11Lap1YhDcKZjF/Ue1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688707322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GINGcw7PrHsy0c+cT4q0KmtP2rvChNYHQtltwAWQNTo=; b=c64VZNqrZ6LWOmUq8T7OWoxzVMnh/XEtrlKJO+s+0t6X2jZnpVUqKSh720ix4ngpHtPGR4 qHC1A4Ts+MoQnJgAFN2ytdgnS4UgqNuUGPgiku10jZ3sce2v98vI2U9QUN/wGdRSOnieEi vE6H66y0BYu0TWMQJvYbq+gGrFca05dJedpu9b47otUCWfB8xE/c+TLn5nAca1kqh2kvfE qx24CpMVONzCC7jRHxarZjBNJ7Q8xF2GwCziWDmf/Nms+ydjq1MXMEU+LtDwr6F60zD236 QiFeW4M0mYk7F8/dTOUnYsm3jncHdGJAeoIlSg0wLqHfiaJROnSGCFLXX0OUQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688707322; a=rsa-sha256; cv=none; b=WdfToeuXPya6SYbJlBsQ5zAkEnNHdr2D1zalkstYuDJeMVbbU8Zn1xLVm8glVL49X7LMbK 2XL6QTlA/AUWW94xuArdcebSpo99Q1NLtTSb+V3++sZAQKm28Ap4epbUm14qgOmq3jWJKT r/5vcpmHw5E/cpOUw/uUUsvM7ahRNLrpBQvIyFk7wl1mgmok96KVWeIvg/Ii4Rnvwb5iLS Bvsnt2+hoiFj+R4ZLzsn8DzWNdDIQswCgDK3NZVZKoVfdYyID79BsehDmiNCsMTYJWwuwD Emw5z6zMKwUVsBUSFYX6x2YykeNjbSLmgZHKooA5sZUjBMt55HPhG+1Af1Ol7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qy1wp32H9zRMj; Fri, 7 Jul 2023 05:22: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 3675M26L072715; Fri, 7 Jul 2023 05:22:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3675M2ul072714; Fri, 7 Jul 2023 05:22:02 GMT (envelope-from git) Date: Fri, 7 Jul 2023 05:22:02 GMT Message-Id: <202307070522.3675M2ul072714@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: a81b559dad5b - main - Fix saving STRUCTURED-DATA in RFC 5424 log format List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a81b559dad5b75548d1ea847db24147a4410ed92 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a81b559dad5b75548d1ea847db24147a4410ed92 commit a81b559dad5b75548d1ea847db24147a4410ed92 Author: Vadim Goncharov AuthorDate: 2023-07-07 05:15:06 +0000 Commit: Warner Losh CommitDate: 2023-07-07 05:15:10 +0000 Fix saving STRUCTURED-DATA in RFC 5424 log format When saving log files in RFC 5424 format presence of STRUCTURED-DATA in message caused line to not appear in log file at all, because a variable forgotten to initialize. This could be tested by (slightly modified) example from RFC: echo '<165>1 2003-10-11T22:14:15.003Z mymachine.example.com su 12345 ID47 [exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"][id@2 test="tast"] BOM"su root" failed for lonvick on /dev/pts/8" ' | nc -w1 -Uu /var/run/log While here, update stale information in comment to logmsg() that RFC 5424 log format was not supported. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/717 --- usr.sbin/syslogd/syslogd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 4600c807a7df..730575c24156 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1123,6 +1123,7 @@ parsemsg_rfc5424(const char *from, int pri, char *msg) FAIL_IF("STRUCTURED-NAME", start == msg); \ } while (0) IF_NOT_NILVALUE(structured_data) { + structured_data = msg; /* SD-ELEMENT. */ while (*msg == '[') { ++msg; @@ -1582,9 +1583,8 @@ evaluate_prop_filter(const struct prop_filter *filter, const char *value) /* * Logs a message to the appropriate log files, users, etc. based on the - * priority. Log messages are always formatted according to RFC 3164, - * even if they were in RFC 5424 format originally, The MSGID and - * STRUCTURED-DATA fields are thus discarded for the time being. + * priority. Log messages are formatted according to RFC 3164 or + * RFC 5424 in subsequent fprintlog_*() functions. */ static void logmsg(int pri, const struct logtime *timestamp, const char *hostname, From nobody Fri Jul 7 07:19:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qy4Xm5dM3z4lcSg; Fri, 7 Jul 2023 07:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qy4Xm5C7tz3QNS; Fri, 7 Jul 2023 07:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688714392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QwuZpHBy+7IOy6Cb/ogyS0ntu67CDyNSESFBfMo9t2M=; b=YwWybUuRfbfl42wLIm5uqyxAIhSYVfdGVeJ0oitbNVPGlpXs2BJWY0IyEI6Fn29L1oE4tk NLsTooREP17KeOp7S2uRgPY3O7iTHQJLj3EedoHAtNOhcwhAd6Rsb0NdI+fSFEhrTI1DLe ZNXeYzB95C4XBR14H2YRqZxEO3QZ+QUd85lFJLrx5cy4m8HYnFzu40DhguWXoEsa0m+tO8 QhanucaSP7Uqg9ZtcUhP0J44y0Jm0b6K1Pf8i/ADsgSEmnML5uiz+OXK61/R8kM9BQpnBc NNgWcZjURgvHWM3uRJ28P5RbC7Ek/b8JzzcPKtTTxRDuh4vwJbQf3cXgC/QCjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688714392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QwuZpHBy+7IOy6Cb/ogyS0ntu67CDyNSESFBfMo9t2M=; b=BvN2KyxrAvbkcuM0AH8v15ZASnCSgz3Afk72WAyJFGehQgEhKKjtHsfd4XYNAiVQLPhgBr 1cEcUNlqNbJ8O59PDCr40pxbrxfxpnBNG9xxWkrOubFmFD1QY9zLJpgR8+Oyp27pGxAzLY y5YAbP/g/ccOyyICwWTnbDfMQKZRe80dT0OEyxDJCkPmIW8fzwsP9uVHjJLi5LldAu4p2W EvCi1vHacVCN/+5uqmjFluOwPqMNLuCZD1pqUMrG5wypk9KfojTTWuvZ/JZ85upg1k/Iuf QAaAbYYgxZoYz8Ktk3KeF26z1O6Ddpnx2t13sGchWYoKgISGhbwZYfIzbY9VkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688714392; a=rsa-sha256; cv=none; b=M4zpEB5VaW/7IOoAerWQp0D+nQDYa0voXhMPU3CWJQXt9oWMqhAFlslbz5UD9TI6rsEbpj Q6ura8RcQBQuXmPdHCMEBGlC0qc2MD7QbN6x1cYcAqIQFBmVYFbEwDJOXQs21J2+SG6HzM VxoBUpWWVTCAutCEzCj3CFspFPycaMDy4XiAjM9l0647BvFcLl8L6t+UBxoAHs1Pn0RgHY bsazRd0+Fia9MU46pOrroO07TvI2P+Su1oZG75zffCdXSVLLDMpd3aPObjlFW3moYf2mzX RaDnbWKFNTrq7DuC4TSWDhvdS+7XbtJJ7+4DbtKg7Pb+Hqt0/rJ9pdj4mMNYvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qy4Xm4FQQzVBn; Fri, 7 Jul 2023 07:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3677JqJo058135; Fri, 7 Jul 2023 07:19:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3677JqSM058134; Fri, 7 Jul 2023 07:19:52 GMT (envelope-from git) Date: Fri, 7 Jul 2023 07:19:52 GMT Message-Id: <202307070719.3677JqSM058134@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: c81495a621c4 - main - fwget: Fix quoting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c81495a621c461b3d3395a7c5b0e73458201c443 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c81495a621c461b3d3395a7c5b0e73458201c443 commit c81495a621c461b3d3395a7c5b0e73458201c443 Author: Emmanuel Vadot AuthorDate: 2023-07-07 07:16:05 +0000 Commit: Emmanuel Vadot CommitDate: 2023-07-07 07:19:41 +0000 fwget: Fix quoting This kind of quoting doesn't work, no idea why shellcheck wanted this. If there is a "safer" way to "fix" this feel free to do it just test that it's working after. Reported by: Kenneth Raplee Sponsored by: Beckhoff Automation GmbH & Co. KG Fixes: 7ad4d94d5bf2 ("Fix some shell issues by adding quotes and replace backticks with $()") --- usr.sbin/fwget/fwget.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh index 61acaee86687..90bc23b07077 100644 --- a/usr.sbin/fwget/fwget.sh +++ b/usr.sbin/fwget/fwget.sh @@ -27,7 +27,7 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -: "${LIBEXEC_PATH:='/usr/libexec/fwget'}" +: ${LIBEXEC_PATH:="/usr/libexec/fwget"} usage() { From nobody Fri Jul 7 13:40:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyDzj4SNpz4l90J; Fri, 7 Jul 2023 13:40: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 4QyDzj41xhz3kcV; Fri, 7 Jul 2023 13:40:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688737217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vZ68Pep799RqUgqvNcZ2YiBEh3ZfONnB9JV/A0KRtuY=; b=F+jpAoHHePnQeBFmsjGITthHPJmQ82f1XEky9tYZVhc077wn3jvJlbDbHD9kXzIawrFTyW kiFSP7EfKaWnhl+qT/AZ918JIl69lhoOgur2VUj8VkJbmntmQNZt4P0iV8oowx9MefEM88 ilIcrWZwJMMb6oMKrQhTZFYc501+mKuMBsiDZNRgfAYZ5iMHrxqTN9vMwgvnOd3L5TCJUy y8/GMY18G9v8b7sKaDXYmXuaI/xL/EpftdBtyEP91q3+2Q2MFOyvS3fx0RqWLIDd/cH9r1 ft6svGBsNZDAjmQr8672/Rs8YaOfzD1SVd+FKKyWqvQBAFLq4cChx/UxF8xlBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688737217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vZ68Pep799RqUgqvNcZ2YiBEh3ZfONnB9JV/A0KRtuY=; b=pf1Z5KVo8eUZu1264gB0q/tV9Zr1TE1Giea611Sm3F4+XojR64HHXC9pnI8EzAYlnTZEdT dDabfC7QUBXH99SzpaFdaSMRw/Ma1uCQx1M8cJTB4H/nuUTH4uF5BYdC2dLPpnFsza+u0t Opf++1meOPU7Y+kM6kH/Y7FneJN4oekKIH4/xiGt613VqMlStq6blICvlo73JRIoCxOOwq QyuEZRrW09CZZ5fIe7KdxvgZUTwi/JyWp3aqY4+h1Aa+H6ipCIa8t+mdu6Y5iN6hGPBCmX pR8YXTvhMxFbvQhDWYTx+xrZ5XhL6L16mbrI5WVpQlWYpW4L73bzcSXfiN5EPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688737217; a=rsa-sha256; cv=none; b=YtUneMUI4ClrSQuAhAlgfTIMxXwYx5Ym3KVWUzl4CqJd0qXF0nipchGHaDEHo2SnKaGK06 dgJxNr0NuOBYs2mBot4L3alBbw8tjsVRV0Lzhxf6KI3JrU+TBsyZZ2/kAifme/5hyHQ0tJ YYX3+ghs9TjCleEXLfk8Iflri/LaF88PU+nLY0MP4btHRRKRt8wNXhm5ab1VPPoXsFtzPR L3FaVUnx+NAw9RYVkvu7MVyC1IeQikpObN3+URJzw7nff/cBrChTOYvCm4j/P06EhOuQBg EokMXlEgTdvJ9iYj8vs4Q9Ys7NAHNfOiGDT3fR9XNP2k0gEd+6t+HyRJPofp+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 4QyDzj37ZPzgZh; Fri, 7 Jul 2023 13:40: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 367DeHrr092599; Fri, 7 Jul 2023 13:40:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367DeHet092592; Fri, 7 Jul 2023 13:40:17 GMT (envelope-from git) Date: Fri, 7 Jul 2023 13:40:17 GMT Message-Id: <202307071340.367DeHet092592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: be30fd3ab2e8 - main - KERN_PROC_VM_LAYOUT sysctl: fix bug in 32-bit-compatible path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be30fd3ab2e8418a696e69f54a91a7e2db5962de Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=be30fd3ab2e8418a696e69f54a91a7e2db5962de commit be30fd3ab2e8418a696e69f54a91a7e2db5962de Author: Mike Karels AuthorDate: 2023-07-07 13:37:16 +0000 Commit: Mike Karels CommitDate: 2023-07-07 13:37:16 +0000 KERN_PROC_VM_LAYOUT sysctl: fix bug in 32-bit-compatible path vmspace_free() is called redundantly in the 32-bit-compatible path in sysctl_kern_proc_vm_layout(), causing a premature free (possibly for the current address space). Remove the extra call. PR: 272401 Reported by: marklmi at yahoo.com Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40908 --- sys/kern/kern_proc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 19b3b41aa6f3..6d804d93eccc 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -3286,7 +3286,6 @@ sysctl_kern_proc_vm_layout(SYSCTL_HANDLER_ARGS) kvm32.kvm_shp_addr = (uint32_t)kvm.kvm_shp_addr; kvm32.kvm_shp_size = (uint32_t)kvm.kvm_shp_size; kvm32.kvm_map_flags = kvm.kvm_map_flags; - vmspace_free(vmspace); error = SYSCTL_OUT(req, &kvm32, sizeof(kvm32)); goto out; } From nobody Fri Jul 7 16:11:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyJKf3qLCz4lsBd; Fri, 7 Jul 2023 16:11: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 4QyJKf3g7kz4CkT; Fri, 7 Jul 2023 16:11:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688746262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVcA3tgccN6gS9qPlzbBlhos5BDR4J4m3nLzP4T/29w=; b=B1VXeRgyDpaB6Nb/TWJm0miyO0dcSeYWXXlzEkK2EQNgdw58oTkXY03a2A3wCh0tZscM6V +hpfRR90YFbS26POzvnbiQtT0f8qLX2CFc0COVjt4RwYWU37g/ZFdDNgJ09O+XA5VpZixo BZu3y0AX//tVxCJqPG0YRjmC8UJLe3icaN/ug3A3PGJ4aGeeYYHV4gcsTcX0H8BNIiBb7q Z+1dZOpT09xeYD2cPdiXpVQdlPjK9zZYgxhU2JRlpvqev/ZjcMAe+zoiwIS5ztAKD1qs2X U2LxXzHcAxD1aa/CL6jJhiewCJ0JyRruUi/pOJAdj300Pw4r5KAn2qpG2fNCxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688746262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVcA3tgccN6gS9qPlzbBlhos5BDR4J4m3nLzP4T/29w=; b=sIeYqqN/FqOLYcea/PjIjZA2XyPff7ism/HIASHOhDZSHIeGRUgXeUM5rHLnHJ7G4smfC4 xyEjlYBLWyMRIjE7OmNl0oK/H5VqmTuVgJcbove7u+TS3rwPT/9H++SoUmXDszBUNBQjPE 3+IVeZkS95WnlK4uVxW5a1FUAp2//To2CojYgmBHd0+7wiqlztarBR//YuGMnFgFLzzRFL TN3sJLBot9RvL8cI8ybp0O8avA7Q/B7pMXCN86wxvqgWI2p/24gZoy7ISR1cAFMlxLdC5v Q+vmGbr2+umLRpYNabe9UQ+7YhVdx0pDVp+BxPuNHvdOgdtdzzkijxLyUsXTNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688746262; a=rsa-sha256; cv=none; b=Ahj27Tskr/Zemmbj7OSEiFKYfnehbVmtkU8RZd5My6JYSNKKfPii+q8oT8iEIV9xlwomYQ kJy1BwLRb6SR4R1UzkVgW7ekYyRArnUfSO4/Q0WfI0kYcmUX0mj0B2GRWqz3Z9n6wW7Y/p 65cMrX3FHlS3M/Y44XvWFsM2uhNMlergg4xvcswZO03lGsip197ZgcaM5LiOHmpMNWPDWI X2PsH5C9yDiI8T9C4BzWDc8X/AmdGfH7cm3miYJt4TSOPBfraAuS/DVojrvNSzJwMK/xvC yjHoHlzeBb5yEtOToJIqgRwdhVz+iHe+DoP6IYfMU7bhhZFb4LKKrnv6Ks9kIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyJKf2khpzlDN; Fri, 7 Jul 2023 16:11: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 367GB2pq040821; Fri, 7 Jul 2023 16:11:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GB2EM040820; Fri, 7 Jul 2023 16:11:02 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:11:02 GMT Message-Id: <202307071611.367GB2EM040820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 8df38859d0f9 - main - radix_trie: replace node count with popmap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8df38859d0f92025540bcbe99c9a291a584327f2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=8df38859d0f92025540bcbe99c9a291a584327f2 commit 8df38859d0f92025540bcbe99c9a291a584327f2 Author: Doug Moore AuthorDate: 2023-07-07 16:09:36 +0000 Commit: Doug Moore CommitDate: 2023-07-07 16:09:36 +0000 radix_trie: replace node count with popmap Replace the 'count' field in a trie node with a bitmap that identifies non-NULL children. Drop the 'last' field, and use the last bit set in the bitmap instead. In lookup_le, lookup_ge, remove, and reclaim_all, use the bitmap to find the previous/next/only/every non-null child in constant time by examining the bitmask instead of looping across array elements and null-checking them one-by-one. A buildworld test suggests that this reduces the cycle count on those functions that eliminate some null-checks by 4.9%, 1.5%, 0.0% and 13.3%. Reviewed by: alc Tested by: pho Differential Revision: https://reviews.freebsd.org/D40775 --- sys/kern/subr_pctrie.c | 192 +++++++++++++++++++++++-------------------------- sys/vm/vm_radix.c | 191 +++++++++++++++++++++++------------------------- 2 files changed, 179 insertions(+), 204 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index 0f28e5ebb2f1..cf09903556ec 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -67,6 +67,18 @@ __FBSDID("$FreeBSD$"); #define PCTRIE_MASK (PCTRIE_COUNT - 1) #define PCTRIE_LIMIT (howmany(sizeof(uint64_t) * NBBY, PCTRIE_WIDTH) - 1) +#if PCTRIE_WIDTH == 3 +typedef uint8_t pn_popmap_t; +#elif PCTRIE_WIDTH == 4 +typedef uint16_t pn_popmap_t; +#elif PCTRIE_WIDTH == 5 +typedef uint32_t pn_popmap_t; +#else +#error Unsupported width +#endif +_Static_assert(sizeof(pn_popmap_t) <= sizeof(int), + "pn_popmap_t too wide"); + /* Flag bits stored in node pointers. */ #define PCTRIE_ISLEAF 0x1 #define PCTRIE_FLAGS 0x1 @@ -81,9 +93,8 @@ typedef SMR_POINTER(struct pctrie_node *) smr_pctnode_t; struct pctrie_node { uint64_t pn_owner; /* Owner of record. */ - uint16_t pn_count; /* Valid children. */ + pn_popmap_t pn_popmap; /* Valid children. */ uint8_t pn_clev; /* Current level. */ - int8_t pn_last; /* Zero last ptr. */ smr_pctnode_t pn_child[PCTRIE_COUNT]; /* Child nodes. */ }; @@ -127,13 +138,12 @@ pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t index, * has exited so lookup can not return false negatives. It is done * here because it will be cache-cold in the dtor callback. */ - if (node->pn_last != 0) { - pctrie_node_store(&node->pn_child[node->pn_last - 1], NULL, - PCTRIE_UNSERIALIZED); - node->pn_last = 0; + if (node->pn_popmap != 0) { + pctrie_node_store(&node->pn_child[ffs(node->pn_popmap) - 1], + NULL, PCTRIE_UNSERIALIZED); + node->pn_popmap = 0; } node->pn_owner = pctrie_trimkey(index, clevel + 1); - node->pn_count = 2; node->pn_clev = clevel; return (node); } @@ -143,22 +153,21 @@ pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t index, */ static __inline void pctrie_node_put(struct pctrie *ptree, struct pctrie_node *node, - pctrie_free_t freefn, int8_t last) + pctrie_free_t freefn) { #ifdef INVARIANTS int slot; - KASSERT(node->pn_count == 0, - ("pctrie_node_put: node %p has %d children", node, - node->pn_count)); + KASSERT(powerof2(node->pn_popmap), + ("pctrie_node_put: node %p has too many children %04x", node, + node->pn_popmap)); for (slot = 0; slot < PCTRIE_COUNT; slot++) { - if (slot == last) + if ((node->pn_popmap & (1 << slot)) != 0) continue; KASSERT(smr_unserialized_load(&node->pn_child[slot], true) == NULL, ("pctrie_node_put: node %p has a child", node)); } #endif - node->pn_last = last + 1; freefn(ptree, node); } @@ -258,6 +267,9 @@ pctrie_addval(struct pctrie_node *node, uint64_t index, uint16_t clev, slot = pctrie_slot(index, clev); pctrie_node_store(&node->pn_child[slot], pctrie_toleaf(val), access); + node->pn_popmap ^= 1 << slot; + KASSERT((node->pn_popmap & (1 << slot)) != 0, + ("%s: bad popmap slot %d in node %p", __func__, slot, node)); } /* @@ -305,20 +317,19 @@ pctrie_reclaim_allnodes_int(struct pctrie *ptree, struct pctrie_node *node, struct pctrie_node *child; int slot; - KASSERT(node->pn_count <= PCTRIE_COUNT, - ("pctrie_reclaim_allnodes_int: bad count in node %p", node)); - for (slot = 0; node->pn_count != 0; slot++) { + while (node->pn_popmap != 0) { + slot = ffs(node->pn_popmap) - 1; child = pctrie_node_load(&node->pn_child[slot], NULL, PCTRIE_UNSERIALIZED); - if (child == NULL) - continue; + KASSERT(child != NULL, ("%s: bad popmap slot %d in node %p", + __func__, slot, node)); if (!pctrie_isleaf(child)) pctrie_reclaim_allnodes_int(ptree, child, freefn); + node->pn_popmap ^= 1 << slot; pctrie_node_store(&node->pn_child[slot], NULL, PCTRIE_UNSERIALIZED); - node->pn_count--; } - pctrie_node_put(ptree, node, freefn, -1); + pctrie_node_put(ptree, node, freefn); } /* @@ -330,7 +341,7 @@ pctrie_zone_init(void *mem, int size __unused, int flags __unused) struct pctrie_node *node; node = mem; - node->pn_last = 0; + node->pn_popmap = 0; memset(node->pn_child, 0, sizeof(node->pn_child)); return (0); } @@ -391,7 +402,6 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) parentp = &node->pn_child[slot]; tmp = pctrie_node_load(parentp, NULL, PCTRIE_LOCKED); if (tmp == NULL) { - node->pn_count++; pctrie_addval(node, index, node->pn_clev, val, PCTRIE_LOCKED); return (0); @@ -413,6 +423,7 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) /* These writes are not yet visible due to ordering. */ pctrie_addval(tmp, index, clev, val, PCTRIE_UNSERIALIZED); pctrie_node_store(&tmp->pn_child[slot], node, PCTRIE_UNSERIALIZED); + tmp->pn_popmap ^= 1 << slot; /* Synchronize to make the above visible. */ pctrie_node_store(parentp, tmp, PCTRIE_LOCKED); @@ -483,7 +494,6 @@ uint64_t * pctrie_lookup_ge(struct pctrie *ptree, uint64_t index) { struct pctrie_node *stack[PCTRIE_LIMIT]; - uint64_t inc; uint64_t *m; struct pctrie_node *child, *node; #ifdef INVARIANTS @@ -552,35 +562,24 @@ ascend: } else if (child != NULL) goto descend; - /* - * Look for an available edge or val within the current - * bisection node. - */ - if (slot < (PCTRIE_COUNT - 1)) { - inc = PCTRIE_UNITLEVEL(node->pn_clev); - index = pctrie_trimkey(index, node->pn_clev); - do { - index += inc; - slot++; - child = pctrie_node_load(&node->pn_child[slot], - NULL, PCTRIE_LOCKED); - if (pctrie_isleaf(child)) { - m = pctrie_toval(child); - KASSERT(*m >= index, - ("pctrie_lookup_ge: leaf < index")); - return (m); - } else if (child != NULL) - goto descend; - } while (slot < (PCTRIE_COUNT - 1)); + /* Find the first set bit beyond the first slot+1 bits. */ + slot = ffs(node->pn_popmap & (-2 << slot)) - 1; + if (slot < 0) { + /* + * A value or edge greater than the search slot is not + * found in the current node; ascend to the next + * higher-level node. + */ + goto ascend; } - KASSERT(child == NULL || pctrie_isleaf(child), - ("pctrie_lookup_ge: child is radix node")); - - /* - * If a value or edge greater than the search slot is not found - * in the current node, ascend to the next higher-level node. - */ - goto ascend; + child = pctrie_node_load(&node->pn_child[slot], + NULL, PCTRIE_LOCKED); + KASSERT(child != NULL, ("%s: bad popmap slot %d in node %p", + __func__, slot, node)); + if (pctrie_isleaf(child)) + return (pctrie_toval(child)); + index = pctrie_trimkey(index, node->pn_clev + 1) + + slot * PCTRIE_UNITLEVEL(node->pn_clev); descend: KASSERT(node->pn_clev > 0, ("pctrie_lookup_ge: pushing leaf's parent")); @@ -599,7 +598,6 @@ uint64_t * pctrie_lookup_le(struct pctrie *ptree, uint64_t index) { struct pctrie_node *stack[PCTRIE_LIMIT]; - uint64_t inc; uint64_t *m; struct pctrie_node *child, *node; #ifdef INVARIANTS @@ -670,35 +668,22 @@ ascend: } else if (child != NULL) goto descend; - /* - * Look for an available edge or value within the current - * bisection node. - */ - if (slot > 0) { - inc = PCTRIE_UNITLEVEL(node->pn_clev); - index |= inc - 1; - do { - index -= inc; - slot--; - child = pctrie_node_load(&node->pn_child[slot], - NULL, PCTRIE_LOCKED); - if (pctrie_isleaf(child)) { - m = pctrie_toval(child); - KASSERT(*m <= index, - ("pctrie_lookup_le: leaf > index")); - return (m); - } else if (child != NULL) - goto descend; - } while (slot > 0); + /* Find the last set bit among the first slot bits. */ + slot = fls(node->pn_popmap & ((1 << slot) - 1)) - 1; + if (slot < 0) { + /* + * A value or edge smaller than the search slot is not + * found in the current node; ascend to the next + * higher-level node. + */ + goto ascend; } - KASSERT(child == NULL || pctrie_isleaf(child), - ("pctrie_lookup_le: child is radix node")); - - /* - * If a value or edge smaller than the search slot is not found - * in the current node, ascend to the next higher-level node. - */ - goto ascend; + child = pctrie_node_load(&node->pn_child[slot], + NULL, PCTRIE_LOCKED); + if (pctrie_isleaf(child)) + return (pctrie_toval(child)); + index = pctrie_trimkey(index, node->pn_clev + 1) + + (slot + 1) * PCTRIE_UNITLEVEL(node->pn_clev) - 1; descend: KASSERT(node->pn_clev > 0, ("pctrie_lookup_le: pushing leaf's parent")); @@ -718,7 +703,7 @@ pctrie_remove(struct pctrie *ptree, uint64_t index, pctrie_free_t freefn) { struct pctrie_node *node, *parent, *tmp; uint64_t *m; - int i, slot; + int slot; node = pctrie_root_load(ptree, NULL, PCTRIE_LOCKED); if (pctrie_isleaf(node)) { @@ -739,19 +724,22 @@ pctrie_remove(struct pctrie *ptree, uint64_t index, pctrie_free_t freefn) m = pctrie_toval(tmp); if (*m != index) panic("%s: invalid key found", __func__); + KASSERT((node->pn_popmap & (1 << slot)) != 0, + ("%s: bad popmap slot %d in node %p", + __func__, slot, node)); + node->pn_popmap ^= 1 << slot; pctrie_node_store(&node->pn_child[slot], NULL, PCTRIE_LOCKED); - node->pn_count--; - if (node->pn_count > 1) + if (!powerof2(node->pn_popmap)) break; - for (i = 0; i < PCTRIE_COUNT; i++) { - tmp = pctrie_node_load(&node->pn_child[i], - NULL, PCTRIE_LOCKED); - if (tmp != NULL) - break; - } + KASSERT(node->pn_popmap != 0, + ("%s: bad popmap all zeroes", __func__)); + slot = ffs(node->pn_popmap) - 1; + tmp = pctrie_node_load(&node->pn_child[slot], + NULL, PCTRIE_LOCKED); KASSERT(tmp != NULL, - ("%s: invalid node configuration", __func__)); + ("%s: bad popmap slot %d in node %p", + __func__, slot, node)); if (parent == NULL) pctrie_root_store(ptree, tmp, PCTRIE_LOCKED); else { @@ -767,8 +755,7 @@ pctrie_remove(struct pctrie *ptree, uint64_t index, pctrie_free_t freefn) * The child is still valid and we can not zero the * pointer until all SMR references are gone. */ - node->pn_count--; - pctrie_node_put(ptree, node, freefn, i); + pctrie_node_put(ptree, node, freefn); break; } parent = node; @@ -801,22 +788,23 @@ pctrie_reclaim_allnodes(struct pctrie *ptree, pctrie_free_t freefn) DB_SHOW_COMMAND(pctrienode, db_show_pctrienode) { struct pctrie_node *node, *tmp; - int i; + int slot; + pn_popmap_t popmap; if (!have_addr) return; node = (struct pctrie_node *)addr; - db_printf("node %p, owner %jx, children count %u, level %u:\n", - (void *)node, (uintmax_t)node->pn_owner, node->pn_count, + db_printf("node %p, owner %jx, children popmap %04x, level %u:\n", + (void *)node, (uintmax_t)node->pn_owner, node->pn_popmap, node->pn_clev); - for (i = 0; i < PCTRIE_COUNT; i++) { - tmp = pctrie_node_load(&node->pn_child[i], NULL, + for (popmap = node->pn_popmap; popmap != 0; popmap ^= 1 << slot) { + slot = ffs(popmap) - 1; + tmp = pctrie_node_load(&node->pn_child[slot], NULL, PCTRIE_UNSERIALIZED); - if (tmp != NULL) - db_printf("slot: %d, val: %p, value: %p, clev: %d\n", - i, (void *)tmp, - pctrie_isleaf(tmp) ? pctrie_toval(tmp) : NULL, - node->pn_clev); + db_printf("slot: %d, val: %p, value: %p, clev: %d\n", + slot, (void *)tmp, + pctrie_isleaf(tmp) ? pctrie_toval(tmp) : NULL, + node->pn_clev); } } #endif /* DDB */ diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index b3d0d92f9969..d2cd2c2536fd 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -91,6 +91,18 @@ __FBSDID("$FreeBSD$"); #define VM_RADIX_LIMIT \ (howmany(sizeof(vm_pindex_t) * NBBY, VM_RADIX_WIDTH) - 1) +#if VM_RADIX_WIDTH == 3 +typedef uint8_t rn_popmap_t; +#elif VM_RADIX_WIDTH == 4 +typedef uint16_t rn_popmap_t; +#elif VM_RADIX_WIDTH == 5 +typedef uint32_t rn_popmap_t; +#else +#error Unsupported width +#endif +_Static_assert(sizeof(rn_popmap_t) <= sizeof(int), + "rn_popmap_t too wide"); + /* Flag bits stored in node pointers. */ #define VM_RADIX_ISLEAF 0x1 #define VM_RADIX_FLAGS 0x1 @@ -107,9 +119,8 @@ typedef SMR_POINTER(struct vm_radix_node *) smrnode_t; struct vm_radix_node { vm_pindex_t rn_owner; /* Owner of record. */ - uint16_t rn_count; /* Valid children. */ + rn_popmap_t rn_popmap; /* Valid children. */ uint8_t rn_clev; /* Current level. */ - int8_t rn_last; /* zero last ptr. */ smrnode_t rn_child[VM_RADIX_COUNT]; /* Child nodes. */ }; @@ -152,13 +163,12 @@ vm_radix_node_get(vm_pindex_t index, uint16_t clevel) * has exited so lookup can not return false negatives. It is done * here because it will be cache-cold in the dtor callback. */ - if (rnode->rn_last != 0) { - vm_radix_node_store(&rnode->rn_child[rnode->rn_last - 1], + if (rnode->rn_popmap != 0) { + vm_radix_node_store(&rnode->rn_child[ffs(rnode->rn_popmap) - 1], NULL, UNSERIALIZED); - rnode->rn_last = 0; + rnode->rn_popmap = 0; } rnode->rn_owner = vm_radix_trimkey(index, clevel + 1); - rnode->rn_count = 2; rnode->rn_clev = clevel; return (rnode); } @@ -167,23 +177,21 @@ vm_radix_node_get(vm_pindex_t index, uint16_t clevel) * Free radix node. */ static __inline void -vm_radix_node_put(struct vm_radix_node *rnode, int8_t last) +vm_radix_node_put(struct vm_radix_node *rnode) { #ifdef INVARIANTS int slot; - KASSERT(rnode->rn_count == 0, - ("vm_radix_node_put: rnode %p has %d children", rnode, - rnode->rn_count)); + KASSERT(powerof2(rnode->rn_popmap), + ("vm_radix_node_put: rnode %p has too many children %04x", rnode, + rnode->rn_popmap)); for (slot = 0; slot < VM_RADIX_COUNT; slot++) { - if (slot == last) + if ((rnode->rn_popmap & (1 << slot)) != 0) continue; KASSERT(smr_unserialized_load(&rnode->rn_child[slot], true) == NULL, ("vm_radix_node_put: rnode %p has a child", rnode)); } #endif - /* Off by one so a freshly zero'd node is not assigned to. */ - rnode->rn_last = last + 1; uma_zfree_smr(vm_radix_node_zone, rnode); } @@ -284,6 +292,9 @@ vm_radix_addpage(struct vm_radix_node *rnode, vm_pindex_t index, uint16_t clev, slot = vm_radix_slot(index, clev); vm_radix_node_store(&rnode->rn_child[slot], vm_radix_toleaf(page), access); + rnode->rn_popmap ^= 1 << slot; + KASSERT((rnode->rn_popmap & (1 << slot)) != 0, + ("%s: bad popmap slot %d in rnode %p", __func__, slot, rnode)); } /* @@ -330,19 +341,19 @@ vm_radix_reclaim_allnodes_int(struct vm_radix_node *rnode) struct vm_radix_node *child; int slot; - KASSERT(rnode->rn_count <= VM_RADIX_COUNT, - ("vm_radix_reclaim_allnodes_int: bad count in rnode %p", rnode)); - for (slot = 0; rnode->rn_count != 0; slot++) { + while (rnode->rn_popmap != 0) { + slot = ffs(rnode->rn_popmap) - 1; child = vm_radix_node_load(&rnode->rn_child[slot], UNSERIALIZED); - if (child == NULL) - continue; + KASSERT(child != NULL, ("%s: bad popmap slot %d in rnode %p", + __func__, slot, rnode)); if (!vm_radix_isleaf(child)) vm_radix_reclaim_allnodes_int(child); - vm_radix_node_store(&rnode->rn_child[slot], NULL, UNSERIALIZED); - rnode->rn_count--; + rnode->rn_popmap ^= 1 << slot; + vm_radix_node_store(&rnode->rn_child[slot], NULL, + UNSERIALIZED); } - vm_radix_node_put(rnode, -1); + vm_radix_node_put(rnode); } #ifndef UMA_MD_SMALL_ALLOC @@ -430,7 +441,6 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) parentp = &rnode->rn_child[slot]; tmp = vm_radix_node_load(parentp, LOCKED); if (tmp == NULL) { - rnode->rn_count++; vm_radix_addpage(rnode, index, rnode->rn_clev, page, LOCKED); return (0); @@ -452,6 +462,7 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) /* These writes are not yet visible due to ordering. */ vm_radix_addpage(tmp, index, clev, page, UNSERIALIZED); vm_radix_node_store(&tmp->rn_child[slot], rnode, UNSERIALIZED); + tmp->rn_popmap ^= 1 << slot; /* Serializing write to make the above visible. */ vm_radix_node_store(parentp, tmp, LOCKED); @@ -522,7 +533,6 @@ vm_page_t vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index) { struct vm_radix_node *stack[VM_RADIX_LIMIT]; - vm_pindex_t inc; vm_page_t m; struct vm_radix_node *child, *rnode; #ifdef INVARIANTS @@ -589,35 +599,23 @@ ascend: } else if (child != NULL) goto descend; - /* - * Look for an available edge or page within the current - * bisection node. - */ - if (slot < (VM_RADIX_COUNT - 1)) { - inc = VM_RADIX_UNITLEVEL(rnode->rn_clev); - index = vm_radix_trimkey(index, rnode->rn_clev); - do { - index += inc; - slot++; - child = vm_radix_node_load(&rnode->rn_child[slot], - LOCKED); - if (vm_radix_isleaf(child)) { - m = vm_radix_topage(child); - KASSERT(m->pindex >= index, - ("vm_radix_lookup_ge: leafrn_popmap & (-2 << slot)) - 1; + if (slot < 0) { + /* + * A page or edge greater than the search slot is not + * found in the current node; ascend to the next + * higher-level node. + */ + goto ascend; } - KASSERT(child == NULL || vm_radix_isleaf(child), - ("vm_radix_lookup_ge: child is radix node")); - - /* - * If a page or edge greater than the search slot is not found - * in the current node, ascend to the next higher-level node. - */ - goto ascend; + child = vm_radix_node_load(&rnode->rn_child[slot], LOCKED); + KASSERT(child != NULL, ("%s: bad popmap slot %d in rnode %p", + __func__, slot, rnode)); + if (vm_radix_isleaf(child)) + return (vm_radix_topage(child)); + index = vm_radix_trimkey(index, rnode->rn_clev + 1) + + slot * VM_RADIX_UNITLEVEL(rnode->rn_clev); descend: KASSERT(rnode->rn_clev > 0, ("vm_radix_lookup_ge: pushing leaf's parent")); @@ -635,7 +633,6 @@ vm_page_t vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index) { struct vm_radix_node *stack[VM_RADIX_LIMIT]; - vm_pindex_t inc; vm_page_t m; struct vm_radix_node *child, *rnode; #ifdef INVARIANTS @@ -704,35 +701,23 @@ ascend: } else if (child != NULL) goto descend; - /* - * Look for an available edge or page within the current - * bisection node. - */ - if (slot > 0) { - inc = VM_RADIX_UNITLEVEL(rnode->rn_clev); - index |= inc - 1; - do { - index -= inc; - slot--; - child = vm_radix_node_load(&rnode->rn_child[slot], - LOCKED); - if (vm_radix_isleaf(child)) { - m = vm_radix_topage(child); - KASSERT(m->pindex <= index, - ("vm_radix_lookup_le: leaf>index")); - return (m); - } else if (child != NULL) - goto descend; - } while (slot > 0); + /* Find the last set bit among the first slot bits. */ + slot = fls(rnode->rn_popmap & ((1 << slot) - 1)) - 1; + if (slot < 0) { + /* + * A page or edge smaller than the search slot is not + * found in the current node; ascend to the next + * higher-level node. + */ + goto ascend; } - KASSERT(child == NULL || vm_radix_isleaf(child), - ("vm_radix_lookup_le: child is radix node")); - - /* - * If a page or edge smaller than the search slot is not found - * in the current node, ascend to the next higher-level node. - */ - goto ascend; + child = vm_radix_node_load(&rnode->rn_child[slot], LOCKED); + KASSERT(child != NULL, ("%s: bad popmap slot %d in rnode %p", + __func__, slot, rnode)); + if (vm_radix_isleaf(child)) + return (vm_radix_topage(child)); + index = vm_radix_trimkey(index, rnode->rn_clev + 1) + + (slot + 1) * VM_RADIX_UNITLEVEL(rnode->rn_clev) - 1; descend: KASSERT(rnode->rn_clev > 0, ("vm_radix_lookup_le: pushing leaf's parent")); @@ -752,7 +737,7 @@ vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index) { struct vm_radix_node *rnode, *parent, *tmp; vm_page_t m; - int i, slot; + int slot; rnode = vm_radix_root_load(rtree, LOCKED); if (vm_radix_isleaf(rnode)) { @@ -772,19 +757,21 @@ vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index) m = vm_radix_topage(tmp); if (m->pindex != index) return (NULL); + KASSERT((rnode->rn_popmap & (1 << slot)) != 0, + ("%s: bad popmap slot %d in rnode %p", + __func__, slot, rnode)); + rnode->rn_popmap ^= 1 << slot; vm_radix_node_store( &rnode->rn_child[slot], NULL, LOCKED); - rnode->rn_count--; - if (rnode->rn_count > 1) + if (!powerof2(rnode->rn_popmap)) return (m); - for (i = 0; i < VM_RADIX_COUNT; i++) { - tmp = vm_radix_node_load(&rnode->rn_child[i], - LOCKED); - if (tmp != NULL) - break; - } + KASSERT(rnode->rn_popmap != 0, + ("%s: bad popmap all zeroes", __func__)); + slot = ffs(rnode->rn_popmap) - 1; + tmp = vm_radix_node_load(&rnode->rn_child[slot], LOCKED); KASSERT(tmp != NULL, - ("%s: invalid node configuration", __func__)); + ("%s: bad popmap slot %d in rnode %p", + __func__, slot, rnode)); if (parent == NULL) vm_radix_root_store(rtree, tmp, LOCKED); else { @@ -799,8 +786,7 @@ vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index) * The child is still valid and we can not zero the * pointer until all smr references are gone. */ - rnode->rn_count--; - vm_radix_node_put(rnode, i); + vm_radix_node_put(rnode); return (m); } parent = rnode; @@ -880,21 +866,22 @@ vm_radix_wait(void) DB_SHOW_COMMAND(radixnode, db_show_radixnode) { struct vm_radix_node *rnode, *tmp; - int i; + int slot; + rn_popmap_t popmap; if (!have_addr) return; rnode = (struct vm_radix_node *)addr; - db_printf("radixnode %p, owner %jx, children count %u, level %u:\n", - (void *)rnode, (uintmax_t)rnode->rn_owner, rnode->rn_count, + db_printf("radixnode %p, owner %jx, children popmap %04x, level %u:\n", + (void *)rnode, (uintmax_t)rnode->rn_owner, rnode->rn_popmap, rnode->rn_clev); - for (i = 0; i < VM_RADIX_COUNT; i++) { - tmp = vm_radix_node_load(&rnode->rn_child[i], UNSERIALIZED); - if (tmp != NULL) - db_printf("slot: %d, val: %p, page: %p, clev: %d\n", - i, (void *)tmp, - vm_radix_isleaf(tmp) ? vm_radix_topage(tmp) : NULL, - rnode->rn_clev); + for (popmap = rnode->rn_popmap; popmap != 0; popmap ^= 1 << slot) { + slot = ffs(popmap) - 1; + tmp = vm_radix_node_load(&rnode->rn_child[slot], UNSERIALIZED); + db_printf("slot: %d, val: %p, page: %p, clev: %d\n", + slot, (void *)tmp, + vm_radix_isleaf(tmp) ? vm_radix_topage(tmp) : NULL, + rnode->rn_clev); } } #endif /* DDB */ From nobody Fri Jul 7 16:35:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyJtB5QmMz4lypX; Fri, 7 Jul 2023 16:35:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (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 4QyJtB0cxdz4HP4; Fri, 7 Jul 2023 16:35:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=PYR8cg9Q; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f34 as permitted sender) smtp.mailfrom=markjdb@gmail.com; dmarc=none Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-635de022557so13634516d6.0; Fri, 07 Jul 2023 09:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688747745; x=1691339745; 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=oN7hVXbUGWpJwdJTsJug4V9p97AeaFUU9ggHJT7GIS4=; b=PYR8cg9Q6AUZIynNZpzMUpM6L95W8FpTYoy8oeRCa5xCVMgS4GMzEYOJ/AFMn/uZjq XmpK81+raz7h++bGTAW591MKWNChtKRpJQmpTrzNuIFyeYIGMDGClC3p+k2Pl1qkUAHP IWmEmeZqIWQ2XavVfKPyB93kDz1k8c8QNw2hbj5crw+ySTQH8WgLKkpFEwp3Hv8uWDwI G9dAtr5nrNlJZkbKWUogsITx0+Evl0eVaNf2LTWF38EvfNu9tKBq4ICqaXC6YPcLL0bt c7huBonzogIpwU9CGvgXRmFmbw70Yzk94zZvx3+QBbSO7eIoNsNHh/LVDok/TFm9HCnQ u0TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688747745; x=1691339745; 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=oN7hVXbUGWpJwdJTsJug4V9p97AeaFUU9ggHJT7GIS4=; b=KFPvA2MYgvxGrKmNCb9mkl9h/2NwvsF6nyoOS7wg57MuMtto5BE3cqC3066wKKXyon 5kwX20ReYnfcG7WrjFkatsMBnvUqC+WLh4CP+Ha5g2iVwR8Zwy7K8uvQpRyMRcOMb4DK CBbOb9glyDKE4nAFEftj4JlvX6rqEDgXJVuEA6uXZ47z4K+sCPS8seeZL2UcDLpkD9sP 0x+IsJC1v3kxMXQqGHZfLG5YFaTqXCMlCNoohmL3ss+Ql8ORB3aif0BGsywPeMpTtrET ZCNq5NtRAtMNa2kRsYi6mIyFI5aULp4EJTtzMaSmozpTUWpltyKBz/jCy/HfY39sVh5c maHw== X-Gm-Message-State: ABy/qLZ397n6NdSNGGdk/VYjBnrdvtqgX78SE5bhDfza6pomzwP9pzHW dJ1pKeHXskbKYH7J3gCTi0aeIWnflWo= X-Google-Smtp-Source: APBJJlFXaivRn61sLKT7R7nVjvBS4kqW+GSnDeMH3EbmP45i2DuOzi3lrH/a4NzdXPbefO+B+5sxBA== X-Received: by 2002:a0c:b34b:0:b0:635:ec47:bfa0 with SMTP id a11-20020a0cb34b000000b00635ec47bfa0mr5231257qvf.49.1688747744710; Fri, 07 Jul 2023 09:35:44 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id f23-20020a0caa97000000b006300722883fsm2258705qvb.33.2023.07.07.09.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 09:35:43 -0700 (PDT) Date: Fri, 7 Jul 2023 12:35:41 -0400 From: Mark Johnston To: Kristof Provost Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Pierre Pronchery Subject: Re: git: b077aed33b7b - main - Merge OpenSSL 3.0.9 Message-ID: References: <202306232319.35NNJsPv044302@gitrepo.freebsd.org> <4FF6DBAE-F9FC-4D20-81C9-B0E0130DF06E@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4FF6DBAE-F9FC-4D20-81C9-B0E0130DF06E@FreeBSD.org> X-Spamd-Result: default: False [-1.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.995]; MID_RHS_NOT_FQDN(0.50)[]; NEURAL_SPAM_MEDIUM(0.40)[0.397]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f34:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4QyJtB0cxdz4HP4 X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Wed, Jul 05, 2023 at 11:56:42PM +0200, Kristof Provost wrote: > On 24 Jun 2023, at 1:19, Ed Maste wrote: > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=b077aed33b7b6aefca7b17ddb250cf521f938613 > > > > commit b077aed33b7b6aefca7b17ddb250cf521f938613 > > Merge: b08ee10c0646 b84c4564effd > > Author: Pierre Pronchery > > AuthorDate: 2023-06-23 22:53:35 +0000 > > Commit: Ed Maste > > CommitDate: 2023-06-23 22:53:36 +0000 > > > > Merge OpenSSL 3.0.9 > > > > It looks like we missed adding a file. > Security/opensc doesn’t build any more: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270076 > > It fails to find d2i_KeyParams when linking. The opensc code does this: > > #if OPENSSL_VERSION_NUMBER < 0x30000000L > if (!d2i_ECParameters(&ec, &a, (long)len)) > util_fatal("cannot parse > EC_PARAMS"); > EVP_PKEY_assign_EC_KEY(pkey, ec); > #else > if (!d2i_KeyParams(EVP_PKEY_EC, &pkey, &a, > len)) > util_fatal("cannot parse > EC_PARAMS"); > #endif > > d2i_KeyParams() appears to be new on openssl 3. It’s defined in d2i_param.c, > which we don’t build. I’ve tested with this patch, and that appears to fix > things: Hi Kristof, Would you mind posting the patch on phabricator? I can take a closer look in the next day, and Pierre might be available to look as well. > diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile > index 28258e796984..ef5652e8c27c 100644 > --- a/secure/lib/libcrypto/Makefile > +++ b/secure/lib/libcrypto/Makefile > @@ -74,7 +74,7 @@ SRCS+= n_pkey.c nsseq.c p5_pbe.c p5_pbev2.c > p5_scrypt.c p8_pkey.c > SRCS+= t_bitst.c t_pkey.c t_spki.c tasn_dec.c tasn_enc.c tasn_fre.c > SRCS+= tasn_new.c tasn_prn.c tasn_scn.c tasn_typ.c tasn_utl.c x_algor.c > SRCS+= x_bignum.c x_info.c x_int64.c x_long.c x_pkey.c x_sig.c x_spki.c > -SRCS+= x_val.c > +SRCS+= x_val.c d2i_param.c > > # async > SRCS+= async.c async_err.c async_posix.c async_wait.c > diff --git a/secure/lib/libcrypto/Version.map > b/secure/lib/libcrypto/Version.map > index 421819324961..74d0b8b3cef1 100644 > --- a/secure/lib/libcrypto/Version.map > +++ b/secure/lib/libcrypto/Version.map > @@ -3564,6 +3564,8 @@ OPENSSL_1_1_0 { > d2i_IPAddressOrRange; > d2i_IPAddressRange; > d2i_ISSUING_DIST_POINT; > + d2i_KeyParams; > + d2i_KeyParams_bio; Based on your analysis I think this should go into the OPENSSL_3_0_9 namespace? > d2i_NETSCAPE_CERT_SEQUENCE; > d2i_NETSCAPE_SPKAC; > d2i_NETSCAPE_SPKI; > > Best regards, > Kristof From nobody Fri Jul 7 16:48:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyK920r3bz4m2lL; Fri, 7 Jul 2023 16:48:38 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (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 4QyK916Ktnz4LRy; Fri, 7 Jul 2023 16:48:37 +0000 (UTC) (envelope-from mpp302@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-76724c50ee5so38365985a.0; Fri, 07 Jul 2023 09:48:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688748516; x=1691340516; 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=ryr5tFJfkPA93WDdrViQkSKk/1yHsgwJXK2pgf8UI9E=; b=VMO5rnvfpAXmDBiPKKDfbDjI54C9P9QY6Zpyf6UX3UTsH7bEaEgiGFZUfHEzwetG23 xySWLcqq7O2YvW8dSuh+ByvxvALsl97ZBP2OrA5dviJ5FPMutmyBo0EsVOFs1ttmJCoI W6vfMFTQVOlzTvQLcfji4iuSHc+xaO5ZBBppNABufmjACwa6XnqC4vbC6K/z973jntbf PLXqkTGeUyxqMWbdB+nRGJ/WGItV5y0CZkgUU2MlKBq44/bj2kK/5qtEKxSWvtYmqyYP Pxj9UCF4hUJFltDOBo2Lz70/3YRBgOTn2RPEQ7fZynynL0R1Sc6gFVysvPep8iy7irF9 u9WA== X-Gm-Message-State: ABy/qLZHizjHhOMqVYHd7S41a4+aSPG2GYmOV7kwVJ3bRr06pwNkDed3 SVCZeWWeEUKmVTqQOGlAaqxcCv5TcSGVVBMb X-Google-Smtp-Source: APBJJlFlNpqi7czjzejyoLbDIzcsx9s0QV4OSmaOl9+6j4qlV8/g1BUigHLDdaFurfiHg3NJJrL+xw== X-Received: by 2002:a05:6214:411c:b0:62b:5410:322d with SMTP id kc28-20020a056214411c00b0062b5410322dmr6166256qvb.6.1688748516603; Fri, 07 Jul 2023 09:48:36 -0700 (PDT) Received: from smtpclient.apple ([95.90.240.90]) by smtp.gmail.com with ESMTPSA id f5-20020a05620a068500b00767bac7d537sm104562qkh.24.2023.07.07.09.48.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jul 2023 09:48:36 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: c81495a621c4 - main - fwget: Fix quoting From: Mateusz Piotrowski <0mp@FreeBSD.org> In-Reply-To: <202307070719.3677JqSM058134@gitrepo.freebsd.org> Date: Fri, 7 Jul 2023 18:48:23 +0200 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <98DC3116-140D-47C8-8B33-E5C666A76D75@FreeBSD.org> References: <202307070719.3677JqSM058134@gitrepo.freebsd.org> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4QyK916Ktnz4LRy X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Hey Manu, > On 7. Jul 2023, at 09:19, Emmanuel Vadot wrote: >=20 > The branch main has been updated by manu: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc81495a621c461b3d3395a7c5b0e7345= 8201c443 >=20 > commit c81495a621c461b3d3395a7c5b0e73458201c443 > Author: Emmanuel Vadot > AuthorDate: 2023-07-07 07:16:05 +0000 > Commit: Emmanuel Vadot > CommitDate: 2023-07-07 07:19:41 +0000 >=20 > fwget: Fix quoting >=20 > This kind of quoting doesn't work, no idea why shellcheck wanted = this. > If there is a "safer" way to "fix" this feel free to do it just = test > that it's working after. >=20 > Reported by: Kenneth Raplee > Sponsored by: Beckhoff Automation GmbH & Co. KG > Fixes: 7ad4d94d5bf2 ("Fix some shell issues by adding quotes and = replace backticks with $()") > --- > usr.sbin/fwget/fwget.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh > index 61acaee86687..90bc23b07077 100644 > --- a/usr.sbin/fwget/fwget.sh > +++ b/usr.sbin/fwget/fwget.sh > @@ -27,7 +27,7 @@ > # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > # POSSIBILITY OF SUCH DAMAGE. >=20 > -: "${LIBEXEC_PATH:=3D'/usr/libexec/fwget'}" > +: ${LIBEXEC_PATH:=3D"/usr/libexec/fwget"} What was the reported bug here? Quoting here looks alright. >=20 > usage() > { >=20 Best, Mateusz From nobody Fri Jul 7 16:51:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCn4nnJz4m3G3; Fri, 7 Jul 2023 16:51: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 4QyKCn4Nlrz4Lx9; Fri, 7 Jul 2023 16:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HP86PQLZDF96NmohtFPKcv/M8GWRnW695dFRW2+BJy4=; b=O0HYAem7FbrHv4eVcKNlmJXyuMYGNI0wdjQ3kAa39alE4fGgZ4wTb9gE/qLOPtLxFSWQ8h sj1R115+vTfbkf1ev3KU1kQS8ah9l57GVQjwPFbwkPbedFDIlwzWe7BF+g59zcrpQeOcjv ysA58BMytUelckfIdWRIxa35zDrLaFtecNclFKOtRuVP1bQa4Sym0IigiE8n6bacKHKBmf jTwi+h4KYWzobAW+AEqydR93DU5y3FCq0a2P1vRI5HCJM/I6s4CoSpoc0Ssex9Y/tMp+7B cHWyqPX/P/TaYFRrV8ruw/pU9M415sWEdRWzoeCs6oM/pNFaOYfcTRfTXndckQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HP86PQLZDF96NmohtFPKcv/M8GWRnW695dFRW2+BJy4=; b=I2N7JV/ZVWBFrw/3qwbbuBvUu/Pmg4E3DxeOEUrq9HAkrhJDylmyclyezaHRNDrwM+teQ2 ug5QlB6Ayifh86u6nHHYjRVGh5zJWsE2IvCynFGIpdL+75INhbFzUiLdwKnj1zVGK6WN25 Oxj97UwQTMOg+S6yJgk9v/oqmCTggKwBu4ed/OWulZNPteLBcpqa+xQv9LdcTa6Zwc+p9L vsf3Q5QyA1c7IR8N50RpVcXr9KyUh5B7nTIbFk7tw3YfaiFDus+0GvoIIqlo5kDs7hIRv8 e2ymJ5O1ai2nHzhZyg70R3KkyvK3AyX12GYnCGLwV03lPzFSW2YgS+2Bf9JaZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748661; a=rsa-sha256; cv=none; b=Fn4dbvEhZq36aeDpwkQ0y/8RQcnrin0bbTog2d/59yJgnSr1bN4X07qGv+CsZeqlkt0Z0D 7mOu3M6iK9lp0LGDweIjD0r/CAUM6luVLMNsdEYR3LcG5I92K4j1XoSKaKEp4FPDLOq45N iwP2dVOLmOTWuP76c9exio40w5yn5sm7d66N8y4TzL7pWuM64vG0UmAQUA92K+T+qknfrf CboSuYoEQz5hnrXAzty9HEe1eW2EwOhjvsdQyHN1cRH4rdUui4+3RrICKFjcnQfioaL5Gb YHImI/YDzXWB9son8brxKR+DgoZ0LkHqSmwSj9qjPqLNV1j7e2Zk4Vr7o4tUxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCn38LlzmFw; Fri, 7 Jul 2023 16:51: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 367Gp1Dp010502; Fri, 7 Jul 2023 16:51:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Gp1bA010501; Fri, 7 Jul 2023 16:51:01 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:01 GMT Message-Id: <202307071651.367Gp1bA010501@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: e97468063d6f - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e97468063d6f9274b885739a9bcb5be7fffc9598 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e97468063d6f9274b885739a9bcb5be7fffc9598 commit e97468063d6f9274b885739a9bcb5be7fffc9598 Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:17 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- bin/chflags/chflags.c | 2 +- bin/chio/chio.c | 2 +- bin/chmod/chmod.c | 2 +- bin/cp/extern.h | 2 +- bin/date/date.c | 4 ++-- bin/domainname/domainname.c | 2 +- bin/kill/kill.c | 2 +- bin/rmdir/rmdir.c | 2 +- bin/sleep/sleep.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/chflags/chflags.c b/bin/chflags/chflags.c index 55dedfce53f1..5c45085624a1 100644 --- a/bin/chflags/chflags.c +++ b/bin/chflags/chflags.c @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); static volatile sig_atomic_t siginfo; -static void usage(void); +static void usage(void) __dead2; static void siginfo_handler(int sig __unused) diff --git a/bin/chio/chio.c b/bin/chio/chio.c index da9e4696588b..2a7ce706afd7 100644 --- a/bin/chio/chio.c +++ b/bin/chio/chio.c @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include "defs.h" #include "pathnames.h" -static void usage(void); +static void usage(void) __dead2; static void cleanup(void); static u_int16_t parse_element_type(char *); static u_int16_t parse_element_unit(char *); diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index e8657af0d97b..cd02c4fa810d 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); static volatile sig_atomic_t siginfo; -static void usage(void); +static void usage(void) __dead2; static int may_have_nfs4acl(const FTSENT *ent, int hflag); static void diff --git a/bin/cp/extern.h b/bin/cp/extern.h index 65360ccaf6c1..f42315f07390 100644 --- a/bin/cp/extern.h +++ b/bin/cp/extern.h @@ -50,5 +50,5 @@ int copy_special(struct stat *, int); int setfile(struct stat *, int); int preserve_dir_acls(struct stat *, char *, char *); int preserve_fd_acls(int, int); -void usage(void); +void usage(void) __dead2; __END_DECLS diff --git a/bin/date/date.c b/bin/date/date.c index c1fb496ce7ee..b7841030864c 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -68,12 +68,12 @@ __FBSDID("$FreeBSD$"); static time_t tval; static void badformat(void); -static void iso8601_usage(const char *); +static void iso8601_usage(const char *) __dead2; static void multipleformats(void); static void printdate(const char *); static void printisodate(struct tm *); static void setthetime(const char *, const char *, int); -static void usage(void); +static void usage(void) __dead2; static const struct iso8601_fmt { const char *refname; diff --git a/bin/domainname/domainname.c b/bin/domainname/domainname.c index cd14778221c3..cb42990315b6 100644 --- a/bin/domainname/domainname.c +++ b/bin/domainname/domainname.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/bin/kill/kill.c b/bin/kill/kill.c index 201ab9aaf3e9..4ff7a8b19f9f 100644 --- a/bin/kill/kill.c +++ b/bin/kill/kill.c @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); static void nosig(const char *); static void printsignals(FILE *); static int signame_to_signum(const char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/bin/rmdir/rmdir.c b/bin/rmdir/rmdir.c index 22f1141e14ec..6f1545e40217 100644 --- a/bin/rmdir/rmdir.c +++ b/bin/rmdir/rmdir.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include static int rm_path(char *); -static void usage(void); +static void usage(void) __dead2; static int pflag; static int vflag; diff --git a/bin/sleep/sleep.c b/bin/sleep/sleep.c index 55e0aba9871a..5c9e7b17b9d9 100644 --- a/bin/sleep/sleep.c +++ b/bin/sleep/sleep.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; static volatile sig_atomic_t report_requested; static void From nobody Fri Jul 7 16:51:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCp60Kyz4m3Hs; Fri, 7 Jul 2023 16:51: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 4QyKCp5D5gz4MMP; Fri, 7 Jul 2023 16:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LcyupHa92BMsZz7Eed+Y/vQ+KL/vlCKNUnOyDzIXA1Y=; b=QpoLNC74WW0NemyvOV/lGSWFl35847+OikYvInIih2ZQR8LFXOMv3UKKXYhi1zU3qNcHeJ H/IdM2Zywfi1Rx8tcIyCHVbW64ZqoeSwjPFfixPLEuxMgB5RrKgRLjMJzRixC++sgk2Szi awy8k6GbfKkzoINlWN10oTBQXGjgtsXXGIEkLRQKSisfD6OqecoDMrIs9oev8yiDxloWVt dyBAmg4qA2pgItdzdxA/FDRwBaRCzVRXxdwSVd0jTNr3UiqmEPDJY5uZkA69uqyCrdNQ0g Q6i5UXWp8hC6ghYFxceT/rvlB6LqXdfbdnqrtmj/9eGGs7kI11ikwCMlPfeemQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LcyupHa92BMsZz7Eed+Y/vQ+KL/vlCKNUnOyDzIXA1Y=; b=TRF2xMue4EpC3Ulg4dLZxJFhDPhgISJdOicxFFwLNwEduT+JDuJvTAch4uP+U/eJvgEVCb 19h1pSkqUc1kzcGfm6Q3FkxyuTk7l9N6fOReirebwsLa/dt4Bt+A2tonvf1gEDLtc24aFy aZoTGY4E5byaT9b8sOhUKxwVjgQ+7tM4aNlhfc2hwsNLbjaCdM3JEHM/xne7EQ9MxvxaJ4 XqSv8v7oIkf5fetAuPI0fa0SNtNDRpIPcsHO1+cXwuC+yIRJCo2mhxFVrK2NnVDjoAer/+ ruU9XjPCR9X7qYAhUFhXlkLrehkQUsUaV7TvZx4K6k3M3MfE963m5FZtMD4tyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748662; a=rsa-sha256; cv=none; b=GSddQ4pJ8VIUMTetHKjoJ1UBeLJzOD5PJPvV4Ho2YGu63PJMD+dkVohXIMJ/uJPNnjmaKs YoCB/96MmkYLwaZ5HI7HAunVrOotE+AJnGmMw/08SxUIiWyHBVTKu0tdE5zBUURXFMd9ob hlr1ydaWRdIyIhlNkJvCchrQJiQR52xbJ783ENnqBR1ZmnIe0Fq2wz1f0jLmrdwgjxiuol /ckxJex7Af4r7OamOrmlir/ibLx2As62OEbgtjOlpgGUt5IHGCtUxdI89bctLaU2zjT7iW 9rtYo+4K7YDvK5dqKDnWa2kt471YS/3fCUXJDVSQcA6KiepRrDK4Fbc/bFL2rQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCp43FBzmFy; Fri, 7 Jul 2023 16:51: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 367Gp21T010521; Fri, 7 Jul 2023 16:51:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Gp2c8010520; Fri, 7 Jul 2023 16:51:02 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:02 GMT Message-Id: <202307071651.367Gp2c8010520@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: 69c0fb2a7a6f - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69c0fb2a7a6f8145102f3ef370410fc380735e1c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=69c0fb2a7a6f8145102f3ef370410fc380735e1c commit 69c0fb2a7a6f8145102f3ef370410fc380735e1c Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:17 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- libexec/atrun/atrun.c | 2 +- libexec/bootpd/bootpgw/bootpgw.c | 2 +- libexec/bootpd/tools/bootpef/bootpef.c | 2 +- libexec/rbootd/rbootd.c | 2 +- libexec/rpc.rwalld/rwalld.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c index 78d4ab32157b..e9e49146ba7a 100644 --- a/libexec/atrun/atrun.c +++ b/libexec/atrun/atrun.c @@ -96,7 +96,7 @@ static int debug = 0; void perr(const char *fmt, ...); void perrx(const char *fmt, ...); -static void usage(void); +static void usage(void) __dead2; /* Local functions */ static int diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c index c0042ccb1de3..1aab5e7f6f50 100644 --- a/libexec/bootpd/bootpgw/bootpgw.c +++ b/libexec/bootpd/bootpgw/bootpgw.c @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); * Externals, forward declarations, and global variables */ -static void usage(void); +static void usage(void) __dead2; static void handle_reply(void); static void handle_request(void); diff --git a/libexec/bootpd/tools/bootpef/bootpef.c b/libexec/bootpd/tools/bootpef/bootpef.c index 2fb928f3065d..51e5e581f7d7 100644 --- a/libexec/bootpd/tools/bootpef/bootpef.c +++ b/libexec/bootpd/tools/bootpef/bootpef.c @@ -78,7 +78,7 @@ SOFTWARE. */ static void mktagfile(struct host *); -static void usage(void); +static void usage(void) __dead2; /* * General diff --git a/libexec/rbootd/rbootd.c b/libexec/rbootd/rbootd.c index 9e1c8e0bda76..6afceae050ab 100644 --- a/libexec/rbootd/rbootd.c +++ b/libexec/rbootd/rbootd.c @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include "defs.h" -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/libexec/rpc.rwalld/rwalld.c b/libexec/rpc.rwalld/rwalld.c index adde226cfba8..d1167219bd26 100644 --- a/libexec/rpc.rwalld/rwalld.c +++ b/libexec/rpc.rwalld/rwalld.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); void wallprog_1(struct svc_req *rqstp, SVCXPRT *transp); void possess(void); void killkids(int sig); -static void usage(void); +static void usage(void) __dead2; int nodaemon = 0; int from_inetd = 1; From nobody Fri Jul 7 16:51:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCq6Nmxz4m3Cj; Fri, 7 Jul 2023 16:51: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 4QyKCq5d2Cz4MLl; Fri, 7 Jul 2023 16:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPSdR5T0v/zUW5P+uQMKok7nd2GD/A22fdr07yjtFWY=; b=PX9A++fg965cwUjptdroNgc3M1Aegq0uOImQthNqgbF+Fe98iAXZZBsEeceAB0HNTvf92i RznWjtrjWJI86EGkg8CL1m/D64Cbrwtqw4wDDvzagBYg8wZC3816qG/FuooY44uQ7Ajto8 7YQSbyq+oXPpBhYdfCl8DXK2YbDoa5gigEFxZwUsaLV5u4myvAwr/YazgRREBCUVTk7t97 U+GzAKG/gNOZmIGO+fh9MQOgde5n1Qq54AT1GkIIBFu0mUtNiPAvKoA3pOp8cTl061KocC uBtz3bIXy+Gr8y/HyXe94gvBV9g3WPX48nWNVqd0vp2VQjeWRbydEB24Wysx9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPSdR5T0v/zUW5P+uQMKok7nd2GD/A22fdr07yjtFWY=; b=mXCL6hHNUJmUDX6hZ7S92Enoi2/WZg9yNlVZV2G/bRF3kKn5foacdltSQ5Q2s4VGR/Jjqm 2rMNzojDeheve4oepiuQGe6zDN2cB61ZgGdCgZGc0z9F1Y+dtEiAh+8HNkw99BafZENeHZ F4BudxxkFLc9KnIf0n6Tv3dc8rKQ4cueJLGPx2ZiGxa5d3afAiBm0KquWGSebRZXhdc4vf Vhvj0RJx4LdXQj+6yhZXHCAujNRrrhoCWwhgxHyubXfn628+eRlG2nzz/dKF7TGfXUIlYb FkgGpxqPoFCMeTg+Zjt80HnV7Viq7G0N2ZCs46l19Tw0+WBx1IfA2C6leP3Iaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748663; a=rsa-sha256; cv=none; b=TlcYzNAJcuXYovrGRUUhLyzrupggqK6CHKYYXHcbSh4uZfrHQU3CazflucAEPKtI0tdSRM vTbPyBKtJhWnhCSbfok/5B95nAu+b6edSkC0WXekIP7AAmRG2YEaJl2XajeoNFOpvZuaIr 3N4GaYtX/qWnejuUyar2AQ0uYBbp80gC2ZPpy39QAh+lJt4uk2p56sOfooFM/V7Rfo+Jk8 dcD4U1M8mMfHSJMVF/aOYfLQ0ghNE/nn2Qmiuu+01aqszzRuVl8I66pOOguKOf3C83j+zg /CuDEiQs9reXsAmtLtaJeMWYXUMLfzwhLh7jzTVqAZWp9DJKarEwPELUTy2MBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCq4kdQzmf3; Fri, 7 Jul 2023 16:51: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 367Gp3Ya010542; Fri, 7 Jul 2023 16:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Gp395010540; Fri, 7 Jul 2023 16:51:03 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:03 GMT Message-Id: <202307071651.367Gp395010540@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: 65f3be91104c - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65f3be91104cb27bbdd1997240edd6024bd95136 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=65f3be91104cb27bbdd1997240edd6024bd95136 commit 65f3be91104cb27bbdd1997240edd6024bd95136 Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:17 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- sbin/adjkerntz/adjkerntz.c | 2 +- sbin/comcontrol/comcontrol.c | 2 +- sbin/fdisk/fdisk.c | 2 +- sbin/ldconfig/ldconfig.c | 2 +- sbin/mdconfig/mdconfig.c | 2 +- sbin/newfs/newfs.c | 2 +- sbin/newfs_msdos/newfs_msdos.c | 2 +- sbin/nos-tun/nos-tun.c | 2 +- sbin/reboot/reboot.c | 2 +- sbin/routed/rtquery/rtquery.c | 2 +- sbin/swapon/swapon.c | 2 +- sbin/tunefs/tunefs.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sbin/adjkerntz/adjkerntz.c b/sbin/adjkerntz/adjkerntz.c index cbe3d9b08250..1bbae1837c71 100644 --- a/sbin/adjkerntz/adjkerntz.c +++ b/sbin/adjkerntz/adjkerntz.c @@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$"); #define REPORT_PERIOD (30*60) static void fake(int); -static void usage(void); +static void usage(void) __dead2; static void fake(int unused __unused) diff --git a/sbin/comcontrol/comcontrol.c b/sbin/comcontrol/comcontrol.c index 98670e1c7ab4..fc7e619c6239 100644 --- a/sbin/comcontrol/comcontrol.c +++ b/sbin/comcontrol/comcontrol.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; static void usage(void) diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 451ee21830d2..30382a56d135 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -258,7 +258,7 @@ static int decimal(const char *str, int *num, int deflt, uint32_t maxval); static int read_config(char *config_file); static void reset_boot(void); static int sanitize_partition(struct dos_partition *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index b30404fba7db..47e26ad8367c 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -50,7 +50,7 @@ #include "ldconfig.h" #include "rtld_paths.h" -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index 0571ab60443d..4cef75aa3df1 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -60,7 +60,7 @@ static struct md_ioctl mdio; static enum {UNSET, ATTACH, DETACH, RESIZE, LIST} action = UNSET; static int nflag; -static void usage(void); +static void usage(void) __dead2; static void md_set_file(const char *); static int md_find(const char *, const char *); static int md_query(const char *, const int, const char *); diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 2dbd27ce2a0f..2e46b50e7d43 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -124,7 +124,7 @@ static char *disktype; static void getfssize(intmax_t *, const char *p, intmax_t, intmax_t); static struct disklabel *getdisklabel(void); -static void usage(void); +static void usage(void) __dead2; static int expand_number_int(const char *buf, int *num); ufs2_daddr_t part_ofs; /* partition offset in blocks, used with files */ diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c index 635e9250a727..1ba399fe447e 100644 --- a/sbin/newfs_msdos/newfs_msdos.c +++ b/sbin/newfs_msdos/newfs_msdos.c @@ -51,7 +51,7 @@ static const char rcsid[] = static u_int argtou(const char *, u_int, u_int, const char *); static off_t argtooff(const char *, const char *); -static void usage(void); +static void usage(void) __dead2; static time_t get_tstamp(const char *b) diff --git a/sbin/nos-tun/nos-tun.c b/sbin/nos-tun/nos-tun.c index b31fef273d39..509f928a2bb8 100644 --- a/sbin/nos-tun/nos-tun.c +++ b/sbin/nos-tun/nos-tun.c @@ -89,7 +89,7 @@ static struct ifreq ifrq; int net; /* socket descriptor */ int tun; /* tunnel descriptor */ -static void usage(void); +static void usage(void) __dead2; static int Set_address(char *addr, struct sockaddr_in *sin) diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 118ac304024c..8cae59002b2d 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; static u_int get_pageins(void); static int dohalt; diff --git a/sbin/routed/rtquery/rtquery.c b/sbin/routed/rtquery/rtquery.c index 883c51fabc68..a03fc21f68e2 100644 --- a/sbin/routed/rtquery/rtquery.c +++ b/sbin/routed/rtquery/rtquery.c @@ -131,7 +131,7 @@ static void query_loop(char *argv[], int) __attribute((__noreturn__)); static int getnet(char *, struct netinfo *); static u_int std_mask(u_int); static int parse_quote(char **, const char *, char *, char *, int); -static void usage(void); +static void usage(void) __dead2; int diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 4daa6e8b17ee..d98f63b153d0 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; static const char *swap_on_off(const char *, int, char *); static const char *swap_on_off_gbde(const char *, int); static const char *swap_on_off_geli(const char *, char *, int); diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 2355a2a3e33b..4445603dbc90 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -80,7 +80,7 @@ static char clrbuf[MAXBSIZE]; static struct uufsd disk; #define sblock disk.d_fs -static void usage(void); +static void usage(void) __dead2; static void printfs(void); static int journal_alloc(int64_t size); static void journal_clear(void); From nobody Fri Jul 7 16:51:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCs0cR2z4m3Cm; Fri, 7 Jul 2023 16:51: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 4QyKCr6mlHz4Mc0; Fri, 7 Jul 2023 16:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gU5Uwcy5l7/vxvW0qm9YJfQxG+c9dS/97wFqwXxwyOk=; b=RpVlRmJn+z/6zgXcHF0Ik5pv++BUL2A6OeilvL1teOAjUY+zW/Z0p9i+1F5Vz4BlljE2Q0 RrSx74Tj720xDCtVNrp3oS/fKvvAvpUJSwh66EXfu/jq/FFd5T7T0+FQmRVwp3EZW0FBxg uG7cpICl50+WuPqBIVhIjwGtWO2f6vIfdfYMs0GIFefBFS6c3/WWolAhrKcVa7nJdpQyK0 u6ZaUdgcyNYope5dJxA4cUd9/QJZ4c0iV4EzGJtTHFuli2KNf3EJuwWpDC8nixgpt65vxj htDNNsVpfNgBDutesDL4OWH6PuoRqMZkhrIzIiljGYdgkUAoHg0lp7/l0hxEsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gU5Uwcy5l7/vxvW0qm9YJfQxG+c9dS/97wFqwXxwyOk=; b=T1nf2iwLqXGYjpx/Ak/O1LieJy1m5bnpdazej/wiKSxjGpQbBvs1QlImqyqSyI3atRum+H tdtIJs/dYaj7Dw8UcffO9FjJVh/E3eeDtsrOZu4VHVqxVq4npq0r9n+noPuNDCCHXtueIK FEtLdpQL+RcG7xbR6cEuk3WrURzIgjG6YdMOoMJvD9O/eQVPz6NMjaiWVocScaqXUFZ+N1 ONBEi5OQlWRV+9sCawb2paj5bE64TfDsek7negl6Y4epYwIqBj2bE/RR5iHMTBOlz9rZcW 7niogbl7r66zzDstOuQkRadLo7PcrWaQJRTozrcGedDpAtazEi1ZUDYA/MBzlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748665; a=rsa-sha256; cv=none; b=uOo3P3B8NGaH0au3IS1l7861idrx6OKBogZiktIOzOI4tLPggsv/G99Hkkzfoezuswdbnn qgdAn+9miybX2mhNbDeZsB95uID8OBMjG1r7lPn66/dbAVpxNHoih1jHhWE9/bzsAYjKiG 4NERCIs+emBNB5400auUoTuqeZ2KFoD65vP/NdFT+QvGEIh6JTsdfD4itwitgGYZx3LnBb PGZ4J3flqBmUsVhrGDXu4lOEtrAUwOCgn557OK1JgqpbsoaEElbF6KifZmHs4WLKQH2cHV DXolMzmeh8X8FS8NuhGxrOzUiRYc/phRh8luVrONUDqYLS3niw4hAzE/heaUnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCr5tCBzm2G; Fri, 7 Jul 2023 16:51: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 367Gp43b010566; Fri, 7 Jul 2023 16:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Gp4wQ010565; Fri, 7 Jul 2023 16:51:04 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:04 GMT Message-Id: <202307071651.367Gp4wQ010565@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: 5762de724318 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5762de7243180668137208ec377eefe164283206 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5762de7243180668137208ec377eefe164283206 commit 5762de7243180668137208ec377eefe164283206 Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:17 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- stand/powerpc/boot1.chrp/boot1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/powerpc/boot1.chrp/boot1.c b/stand/powerpc/boot1.chrp/boot1.c index ed7c55d11d6f..2423b5680551 100644 --- a/stand/powerpc/boot1.chrp/boot1.c +++ b/stand/powerpc/boot1.chrp/boot1.c @@ -58,7 +58,7 @@ static void exit(int) __dead2; static void load(const char *); static int dskread(void *, uint64_t, int); -static void usage(void); +static void usage(void) __dead2; static void bcopy(const void *src, void *dst, size_t len); static void bzero(void *b, size_t len); From nobody Fri Jul 7 16:51:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCt1WLTz4m37F; Fri, 7 Jul 2023 16:51: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 4QyKCt0bTQz4MfY; Fri, 7 Jul 2023 16:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X5gr+BD9hE1hGlsUynU+6WLQUNVzcSH0pmSKJwBjNjk=; b=X40Kyv3xjnw7EZDOPLQpOSpTttPHwOecEFyD8ikyISr4zX5fnD9htGOQVOsncZ8fVzvsjS VbuBS3Y1SgcDiVkF4zD9brboPz+xK1/K2iCWqvZzAFa1YMA4ZiX167MoNJFmC694zuX8wM Qsp6I42nYMDfG3jGKYXZA4V/mMsz4Dn8hINKTg6kxrLSUSrWSQ1CfLcAKX0ISf15mhG5Fs /6zMQgUjSrYfX+n9DUe/KzkPhXy21E7KrzAFjbRdW/5OvGRUZbDXv5DIGGWAbeCZ3URvqY YanfxAtrSopfIgpxzt5xy30YIQDAk0UIYOrMemKXoMjug0cvFcpQD8UH4D9LyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X5gr+BD9hE1hGlsUynU+6WLQUNVzcSH0pmSKJwBjNjk=; b=xQtZdhtEJ4ayfq8XmLsWeBPNpr4SuX5u5xi81Ed9A7yjg86H7maxvvzJNrAvM3irVkmX6z vLBZ6ZsXOpTj2FOFowX8nKvCJ3+r6z3tb0QELa14+qQ7/YCVQ5vBCloXWUj8v9T/bonn6j jrrnnKl3RZjHnt22ynfvh+U7TiSYFrXkIUssJIqOBvCKeVnFYD4gmUs9Tra7Os3/WjNAdR VZxH16G0tN6xuFfwvtMKQuD3UUPHYEQ0vY5J4aV4fgIlRtqK7tU0NQlsAVftFCNZaMs0Gm W+ElYjaVqbuRaXV+VuVs4p1ibgR/ZUUqNJYBk4OIwQZfnc454hD07iBmtu1Nlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748666; a=rsa-sha256; cv=none; b=rHlJDWr8LVbpOveJi6ds1QQC+EGXZcj956E2TSCyRCp4FhQj5SasjiD5hVYeCwgWMpS8Hf YNcR2kEfO+oBoKm70Uh1MKMw73HhztDJdGzOmMOOk23MVpMuMHfVOnDxSoyoytm65zR8BY sMK3VU8rBY1jZrvtUUd04l5Dk7NPijznh03H1Yi+h8AIK+qUtHCqN4wKjeO4HtQM2HnspY cJYAjhlHLKOC9VSnpNUHcy3Cm4G0tbw148LI5bzWc4Eq94eURDmjFZJCaA4HrKRFbQHEIB 2F4W3cgOSCiJ4o+qDg1WeZ5vyfHyAMkovTj4++X7AR38K2FmKMbFYQQi956dGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCs6q35zmf5; Fri, 7 Jul 2023 16:51: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 367Gp5Ku010585; Fri, 7 Jul 2023 16:51:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Gp5xg010584; Fri, 7 Jul 2023 16:51:05 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:05 GMT Message-Id: <202307071651.367Gp5xg010584@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: 6d099821455d - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d099821455df24fcf5b88ba0d83cccf822d970b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d099821455df24fcf5b88ba0d83cccf822d970b commit 6d099821455df24fcf5b88ba0d83cccf822d970b Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:17 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- sys/dev/aic7xxx/aicasm/aicasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/aic7xxx/aicasm/aicasm.c b/sys/dev/aic7xxx/aicasm/aicasm.c index 5f2fbaa8b645..886c29a290a3 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm.c +++ b/sys/dev/aic7xxx/aicasm/aicasm.c @@ -75,7 +75,7 @@ typedef struct patch { STAILQ_HEAD(patch_list, patch) patches; -static void usage(void); +static void usage(void) __dead2; static void back_patch(void); static void output_code(void); static void output_listing(char *ifilename); From nobody Fri Jul 7 16:51:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCv5n2pz4m37J; Fri, 7 Jul 2023 16:51: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 4QyKCv1SMXz4MZ3; Fri, 7 Jul 2023 16:51:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xDp+3h9iXMsIMKN9yxNcYVahO4XvlwOU2FbDlPiuhwY=; b=Sld7EArCEx2Op+Srlr/qunB6sC0h8nKZHQlzWMHUs0O3xTC1TyRwlwaBl+E6l12+DrT1+i hDx1Y+wGoxyrLDKfehG06gXmhyvdPHmjlpHjSzCWVM8LOg7me1w+o8UuTpJnd/TroOvCdd EKRR/akPHqIKcOjdrv2EjdftmDlc1+TU2v7hNRe+SOTCW8JcNPZhOhMg39XDvihjLxXO7a 30aRSin4bapX6OXmcZ62aiUuDRT6ZMbAV3AXQmQCQ9hmivLbFyaMKh25RcYRVRX5vYrQn8 HMb1KvcQkRLqFhEn8KNmJVZ2pKPSP89GCPhAA4jAPrjRb/Ybf1DnA8NZpOPTMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xDp+3h9iXMsIMKN9yxNcYVahO4XvlwOU2FbDlPiuhwY=; b=F4lrQAZCJToKMHNwSKdmIOhBAPLB2CDF5Xu/TREWumx4Kyn8UBxy2Ir6eN3bKlRgCYul5r ikjBQlC1vWoJdWxEvIFGQNM6qjYOSXTuAijOHiMn30yIVQCMG99eYZ9ECyhNO74PUZSwpy yiZOFZZU+eONcENhDtnwuLBv4KIvrNvUpkJlM9hAvs+6noAowoZ1AxdxQA90aJO8MVYfrX xUmtXHD3NSaY+fSA5zDqZmY5TIg5PDCSALusM+gqTCIBgrtCou0/QLEFpDYZ0M+nO/CR73 CFBzdF8+0HXTE7N3HuqwzS8VCmrYuJ4tw0P7zeO6aGpo3k+P50SCd/HXmSSlYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748667; a=rsa-sha256; cv=none; b=dnYcYwx5Fq0DheCrotsnJ31IPZDoMNIfwtkjyXX9YZcE87sAx2Qhuh1QquB7QFgQnLDMlV idwZquZ7M851o6DKG9uzTxdjOaoZefoyMVH8/LpJ4P2/eqlRjW3v21t19P4LINnmg69Gn3 QUv0PV+AHa6D4Yt4klq+pAeztZMreqH5xsd3LfXtYKheKAGmvpZfaCqb8m2C5GgF9d27XU Q0VJbLkpEjP0R/JgPocwQgRk74LSBd4K3qodATIppqeKIJDYs2tk5fsHMhXhBqmc8I4W4n Bvrk6kWWfS/1WmEs7tURXqwxw11LMq7vtw3UCif4TwjbWpgKHrxuSrpTlY1HtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCv0FkDzmJN; Fri, 7 Jul 2023 16:51: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 367Gp65V010608; Fri, 7 Jul 2023 16:51:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Gp6gX010605; Fri, 7 Jul 2023 16:51:06 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:06 GMT Message-Id: <202307071651.367Gp6gX010605@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: 6fde066264e5 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fde066264e5cb784470e05c0ab6acbb16057bbc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6fde066264e5cb784470e05c0ab6acbb16057bbc commit 6fde066264e5cb784470e05c0ab6acbb16057bbc Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:17 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- tests/sys/cddl/zfs/bin/file_write.c | 2 +- tests/sys/netinet/libalias/perf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/cddl/zfs/bin/file_write.c b/tests/sys/cddl/zfs/bin/file_write.c index b1ef836879e6..07ba6503dff8 100644 --- a/tests/sys/cddl/zfs/bin/file_write.c +++ b/tests/sys/cddl/zfs/bin/file_write.c @@ -38,7 +38,7 @@ static unsigned char bigbuffer[BIGBUFFERSIZE]; * See header file for defaults. */ -static void usage(void); +static void usage(void) __dead2; static char *execname; int diff --git a/tests/sys/netinet/libalias/perf.c b/tests/sys/netinet/libalias/perf.c index f238846bdb16..07e73612a6dd 100644 --- a/tests/sys/netinet/libalias/perf.c +++ b/tests/sys/netinet/libalias/perf.c @@ -38,7 +38,7 @@ #include "util.h" #include -static void usage(void); +static void usage(void) __dead2; #define timevalcmp(tv, uv, cmp) \ (((tv).tv_sec == (uv).tv_sec) \ From nobody Fri Jul 7 16:51:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCw2wWhz4m37L; Fri, 7 Jul 2023 16:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyKCw2PBgz4MgZ; Fri, 7 Jul 2023 16:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xm+POTC1od20DWi/y01l32178udLXY1BWkfV+eD6ngE=; b=gZuz2rjmR67ORuBq9aHoJ0nCyBQKPz5TO58rOr6wX8dOx4pkbiTIucmZIhhpomO5yVFqYF xdPI9/OaKpgGap/B3BtE3AyRTCHLKr0uj8diLr9sTLmkiaCRUNN8OE2Zifikd6u2JutPNC lz6D2ry7B6Ce7PaiHoes9VV6W3WjPA41E3BivLabNqRp2Ks4sDb0a5iIgX8avfntv/9E4r hqTdMTys2wJ9ajmJ4CNd1Fe0uidr6IsQNlYZNLxgz7O8zsftiIM3NQoOU8nZc6Lsewz0mw ixUvSTD7vXGo998AxqyqmiHFXOpBZoDiL6HM11A7NdkvIiKEy9RI2NcdsLeXpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xm+POTC1od20DWi/y01l32178udLXY1BWkfV+eD6ngE=; b=qMVqVZqLe5xJsdF9w3pDeafxd6RTTDR8DxesB+1et8X4bowQCxvKHAz7lxtyaGq6kfkqrX TKWRrgZ2ZHdAjr4b8Go8ChJn4U2OueBqJMELnthTceeizRSZKihuCcnNPhVB7Vym7rVI1f dGeqlwv2XgrLE/2KTFi8v9tQc6cr2b+9QFSyq0GMyHvIiq2X/waXCy7TbbAsFZi9hF1oT7 oL++W2brntGXYLnuzkdN/vnuBb/Ih8as37BUbxwJkdH7XaMwRE5LC6lhpesqW6m911g4Xt WPjKAkk5mP+OAMLdvQ3vSCVzTWDDqRwPP2soJ+O3HTm+C0MWvCgc1ZO7Dx9vGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748668; a=rsa-sha256; cv=none; b=PAVFOf40W1fHGso8S/yL+Fa7hdZzE4heF4KvMydn808jfK+wJ4OjqRAJhh6piqisga0H1G f6zHtaTm6auDAtGsEF7Osoh2rG93MDSpn0aoXpBOxFJiPplV0mLuF1I21XrRBEe/k3pYNG pnFuZt1ICpbv557OlgF2saJubywruaxe/b28MTTjMBRvfp4BR0iaZ1z5gYKODAdunNjK91 D8n1uC0T6Cq1FHOHA+n0U2CiJRnL3D4peW+uuEOAwaIHfCYBPmUjA8TFzjU5y9SmhVENfN o2kPbBqrkZ+e9eX1z8GYQEa7X8bo2Cfe+MhGM+y/brSH5xqQ0UGqfkzrwD2YwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCw1RvczmLj; Fri, 7 Jul 2023 16:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367Gp8Gf010627; Fri, 7 Jul 2023 16:51:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Gp8kI010626; Fri, 7 Jul 2023 16:51:08 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:08 GMT Message-Id: <202307071651.367Gp8kI010626@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: 90597773cdd2 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90597773cdd25fc28a9149900be50d000bb311b5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=90597773cdd25fc28a9149900be50d000bb311b5 commit 90597773cdd25fc28a9149900be50d000bb311b5 Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:17 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- tools/regression/sysvshm/shmtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/regression/sysvshm/shmtest.c b/tools/regression/sysvshm/shmtest.c index c3e5962d9fa1..c84ddfd7657d 100644 --- a/tools/regression/sysvshm/shmtest.c +++ b/tools/regression/sysvshm/shmtest.c @@ -54,7 +54,7 @@ static void sigsys_handler(int); static void sigchld_handler(int); static void cleanup(void); static void receiver(void); -static void usage(void); +static void usage(void) __dead2; static const char *m_str = "The quick brown fox jumped over the lazy dog."; From nobody Fri Jul 7 16:51:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCx3s5Wz4m3D4; Fri, 7 Jul 2023 16:51: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 4QyKCx3QTcz4MdZ; Fri, 7 Jul 2023 16:51:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8MUGdh0sCeuGCHEL3m6l7G2S0Zw+7iS2UyJ/kC/OWEE=; b=PSPQV/ZfNSagjXrt6hDy6amvhZOwP1dgtcJyAa/fXKksbT0dqhNKitace96Uj/4YIYbVEG Z1ruopSd18xqmBteBO/tt3OihAYUTbc1AuJtzgr1vqUKVxUZ5Muk5excruExZLNy0M75Va E9IP6e/M1VbWcePOUEqbHGLImJHANs49afndojM9HAzLhetiUFt1spiBIeuQ0XdKR1kKf9 t9+4+GhfkpMSc+8qotpMFvPTM0Uw9uuz0e6xzoUe+gs7NR2Z94tX5o659u0yeizi3CoYIi 8Aj9964WkyNme66qI8Ja4XDMEiB1FVzFx7iU332W8PC+s6xLj2smwOsThrp07w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8MUGdh0sCeuGCHEL3m6l7G2S0Zw+7iS2UyJ/kC/OWEE=; b=TUWV0J3o2E4jRaba81R4qFbhP67CckHmw8DezEj97MT6R8qXXeIUBRb08wVifLmkGBW4xb aTrGLOljIQ7H1QcQgqBWJHN4CLsV2DcM+DWVz+lt2RKtQY4BMkkRFVJ073el3B34S0Hm5J lDI23Sd+LMyF0ZbVuztm2E3zmjR5vazhX53BL0WL8MCNXS+9UCuwfxrLO2x0vK5kyg9gjZ 5GeG7J5EoHO6gnN1/nHc4ihH7f33bBHNwyIRZuOv/9dfrLNX5q1yVY76ceHiXbHwedYEri G2FJ6TmHDy4FPwWfT77zc5eheHdjX2/cPkQpdsK0RT5OQcQOA3pTu0G4M6q3vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748669; a=rsa-sha256; cv=none; b=NLlKrhQatPuOPoNtFgY+BRFjNta8mht/1d5bkNknkATVjBfwXJaKEZdpWoRU6+rF8VbW6Q Bd0r5XzQdIL91NycCwOOiddTbvy5tA7eHHa0EOurz0E4R0DJ5A4/GdTToiYZwZso/PY/1Z z7FaGId6L3L8rPwzjrijL4osbbvFHtNcK4RUzNhM6f7lgzYp0LUNQNt/XPPkHGxMrBd3Na 027L6uPoJvPe3lED5867ZJVhCqDK9Wx7CxNt4NsuibjuVJbBKh1OZr06E+DC4U+CUYzFHW /PgAKJXk+aYGVNDRZFtIdAvaEZr8xyjauCK4BIaCYb0cEHllCDOQ4x9rBuzrgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCx2Qp8zmWR; Fri, 7 Jul 2023 16:51: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 367Gp9jK010648; Fri, 7 Jul 2023 16:51:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Gp9nh010647; Fri, 7 Jul 2023 16:51:09 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:09 GMT Message-Id: <202307071651.367Gp9nh010647@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: 5c3b5af6a2f6 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c3b5af6a2f6ebcccb73d1472f0aac63cacdee7f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5c3b5af6a2f6ebcccb73d1472f0aac63cacdee7f commit 5c3b5af6a2f6ebcccb73d1472f0aac63cacdee7f Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:18 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- tools/tools/switch_tls/switch_tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/switch_tls/switch_tls.c b/tools/tools/switch_tls/switch_tls.c index 788926bfb92a..fecf58f429cb 100644 --- a/tools/tools/switch_tls/switch_tls.c +++ b/tools/tools/switch_tls/switch_tls.c @@ -61,7 +61,7 @@ static bool tcpswitchall(const char *, int); static bool tcpswitchbyname(const char *, const char *, const char *, const char *, int); static bool tcpswitchconn(const struct in_conninfo *, int); -static void usage(void); +static void usage(void) __dead2; /* * Switch a tcp connection. From nobody Fri Jul 7 16:51:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCy56gBz4m3D5; Fri, 7 Jul 2023 16:51: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 4QyKCy4K3Rz4Mdx; Fri, 7 Jul 2023 16:51:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOIGQX7AeTxUL/nic20l5CFivye0SWRg/jIP44WN3cg=; b=yasqXRlEJoK8Pxrk3yIi/Npp1pKapK6Trmxf3iXks2aONhrBB15SRktX+TLluhQozKnuKa JNhUXand84EMIF07JkVzi/lEREwtvYdvRVRw4U/cMzyJEAo8F74TPaeJ9F3WBCzVkmKRs0 rHNuTpzodTQprnANVrGQNykZR0wIjJJyyDDQMWCV7t/QWkc0CY47GIu+RVpoPqGuiH8DN+ wLBOidPqKmgMunQ72yvEaKaiFLu+di1BQflGszilkIWC4Iv5gXtKeX3ltJcPegQJwuR260 JSebOz3Rq+2O5lfPqAs8FjA3aligpQK0J7bt6hFl9W9xBA7oLcJ7ACX+le8UIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOIGQX7AeTxUL/nic20l5CFivye0SWRg/jIP44WN3cg=; b=VGRIQL1aTyvr6R2kW5RljY0Q6/gvQXcZ5o+A0NTeW4qHP7MOVLLGfuXkKw3WBDb6LZ0oBZ bSAPL4J0OR5CUhDzQ+m88ra2LjQ5oEa96NrMvnQo+D1lj1MDNVWrsb2Tec6UsAX2cSC/ik 0DdrkXywPtTYEl7qOta6EYK5P9fOWOvDmLkXdq5WNYBpPiQZuLezKtGFRwxnI+U3fBdNRO KwQ0VAGid3RjOQQFomWg0W2jENs9AR+0M8zl60rVNiNJGrqwmyirFUUAJLpgR266Nfd2Tv pkOgIRoLbB51NRGqNQqZdQ/CTOsDBpbx4jXTaVCJ9D/XKuSow5khG5vLoDInMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748670; a=rsa-sha256; cv=none; b=w2Iuobh9b3ROug+JKwNoTSHtAwieFTRQBmCck0UPoJUz171xd0X8AakccNNgearO1Qal8x Cfxef3wRUIzZW8XFjTQzWBBF8kKyxXEmsv2sWX3mudD4iw+jeOo/K5q1AIyfaCGm7/ijsx T3EsIJYWBIBMilNvT0uRTF5HdGnJnyzARGMcHDcKLej62CDKpVjcuu+8U4xOlm2uzRzCtp ZlshdMK476oYQOwKRgxrn4rqGYEy/e6a3ATU06ed898vBjFV2SNduUYKRJOvLabQparu4T QR16zp0HEKqqTyaPzlwW9C+1UBzY9IZb6CczxOJatVfnV5MS/eeBD6b0YLiIug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCy3R2vzlyt; Fri, 7 Jul 2023 16:51: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 367GpAEQ010673; Fri, 7 Jul 2023 16:51:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GpAen010672; Fri, 7 Jul 2023 16:51:10 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:10 GMT Message-Id: <202307071651.367GpAen010672@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: 498a0a9c61c3 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 498a0a9c61c3048b492937ff76d58bbd0b78031a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=498a0a9c61c3048b492937ff76d58bbd0b78031a commit 498a0a9c61c3048b492937ff76d58bbd0b78031a Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:18 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- usr.bin/asa/asa.c | 2 +- usr.bin/banner/banner.c | 2 +- usr.bin/biff/biff.c | 2 +- usr.bin/bintrans/uuencode.c | 2 +- usr.bin/brandelf/brandelf.c | 2 +- usr.bin/c99/c99.c | 2 +- usr.bin/chat/chat.c | 2 +- usr.bin/chkey/chkey.c | 2 +- usr.bin/cksum/cksum.c | 2 +- usr.bin/cmp/cmp.c | 2 +- usr.bin/colrm/colrm.c | 2 +- usr.bin/cpuset/cpuset.c | 2 +- usr.bin/ctags/ctags.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/usr.bin/asa/asa.c b/usr.bin/asa/asa.c index a6c3d7d7c1e5..4491beeead04 100644 --- a/usr.bin/asa/asa.c +++ b/usr.bin/asa/asa.c @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include static void asa(FILE *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/banner/banner.c b/usr.bin/banner/banner.c index 3d887ae6d4f1..b28c5e440281 100644 --- a/usr.bin/banner/banner.c +++ b/usr.bin/banner/banner.c @@ -1026,7 +1026,7 @@ static char print[DWIDTH]; static int debug, i, j, linen, max, nchars, pc, term, trace, x, y; static int width = DWIDTH; /* -w option: scrunch letters to 80 columns */ -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c index 70372d57a041..ad238b951366 100644 --- a/usr.bin/biff/biff.c +++ b/usr.bin/biff/biff.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/bintrans/uuencode.c b/usr.bin/bintrans/uuencode.c index cb3669dd55d0..a0e1406c3648 100644 --- a/usr.bin/bintrans/uuencode.c +++ b/usr.bin/bintrans/uuencode.c @@ -70,7 +70,7 @@ extern int main_base64_encode(const char *, const char *); static void encode(void); static void base64_encode(void); static int arg_to_col(const char *); -static void usage(void); +static void usage(void) __dead2; static FILE *output; static int mode; diff --git a/usr.bin/brandelf/brandelf.c b/usr.bin/brandelf/brandelf.c index 505bd09f39d7..c95f2aef806e 100644 --- a/usr.bin/brandelf/brandelf.c +++ b/usr.bin/brandelf/brandelf.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); static int elftype(const char *); static const char *iselftype(int); static void printelftypes(void); -static void usage(void); +static void usage(void) __dead2; struct ELFtypes { const char *str; diff --git a/usr.bin/c99/c99.c b/usr.bin/c99/c99.c index deabdf49f02c..a1752e6f4540 100644 --- a/usr.bin/c99/c99.c +++ b/usr.bin/c99/c99.c @@ -50,7 +50,7 @@ static u_int cargs, nargs; static void addarg(const char *); static void addlib(const char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/chat/chat.c b/usr.bin/chat/chat.c index 059aa2483292..ec558a615901 100644 --- a/usr.bin/chat/chat.c +++ b/usr.bin/chat/chat.c @@ -145,7 +145,7 @@ static int say_next, hup_next; void *dup_mem(void *b, size_t c); void *copy_of(char *s); -static void usage(void); +static void usage(void) __dead2; void chat_logf(const char *fmt, ...); void fatal(int code, const char *fmt, ...); SIGTYPE sigalrm(int signo); diff --git a/usr.bin/chkey/chkey.c b/usr.bin/chkey/chkey.c index 4751a284b384..55d34bcc0fc3 100644 --- a/usr.bin/chkey/chkey.c +++ b/usr.bin/chkey/chkey.c @@ -74,7 +74,7 @@ static char PKFILE[] = "/etc/publickey"; #endif /* YP */ static char ROOTKEY[] = "/etc/.rootkey"; -static void usage(void); +static void usage(void) __dead2; extern int yp_update(char *, char *, int, char *, size_t, char *, size_t); int diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c index 5da560582366..6634bd1903d0 100644 --- a/usr.bin/cksum/cksum.c +++ b/usr.bin/cksum/cksum.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index 82f34803fc22..a71565760a83 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -86,7 +86,7 @@ siginfo(int signo) } #endif -static void usage(void); +static void usage(void) __dead2; static bool parse_iskipspec(char *spec, off_t *skip1, off_t *skip2) diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c index a0969281dd14..739b184b6e6c 100644 --- a/usr.bin/colrm/colrm.c +++ b/usr.bin/colrm/colrm.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #define TAB 8 void check(FILE *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/cpuset/cpuset.c b/usr.bin/cpuset/cpuset.c index 1dee12b06ec3..43aadb33f1e0 100644 --- a/usr.bin/cpuset/cpuset.c +++ b/usr.bin/cpuset/cpuset.c @@ -69,7 +69,7 @@ static id_t id; static cpulevel_t level; static cpuwhich_t which; -static void usage(void); +static void usage(void) __dead2; struct numa_policy { const char *name; diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c index d94b6e87ae1b..9b5139f08be1 100644 --- a/usr.bin/ctags/ctags.c +++ b/usr.bin/ctags/ctags.c @@ -87,7 +87,7 @@ char lbuf[LINE_MAX]; void init(void); void find_entries(char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) From nobody Fri Jul 7 16:51:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKCz6w6pz4m3NS; Fri, 7 Jul 2023 16:51: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 4QyKCz50Ypz4MsS; Fri, 7 Jul 2023 16:51:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eraiL1+pcM2ybaSDhMYC7yaZ0FJAyXoNlppAz4SbU0M=; b=WcEw7SDViEQybYgIMf6BXihjnD9oSc9KQSn0A7IlfdNJ9Y7HabQdNPdft1TFR6y7e0g+Ra glR7+j3ZO0b+Xppx49CQ2BGGov422upeBShupfBjk5j2WLNQncFHVz3N4LLJnXrG5jleGP M03ayYgn1TRmcCMVcngWynsUDTOSLOXCYKDY4Bi8xHB3aObOAm0jtuy7SGiXxZJH9yybaN LovBgA3rgBMqUgfNNYOsTbFoT0JGzxt5qyYOiN/0HyU8HyQczp10I85/sTWPEkC4W3nLtH u5HQlHaKxgtRFZJSVGQQaGdX3zRKYR6P3Y4fn2dFDYtbAkJLpdsGf8lbjxLDtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eraiL1+pcM2ybaSDhMYC7yaZ0FJAyXoNlppAz4SbU0M=; b=sU2stpYCr5+Y2r1B5okkoC5XBxdQNxv+ysySxrKsXYuiu3iuRNEm7yNItOFDE7s8mvVEKF QJi1hEXoEYMlO/Q7uJKOXrx61spxKpqYVEPxUQxqZ1MXiA2Fq1Z7fMIMzk2TNn1CSINGaJ Ic8cD3KLwujlCBZ9PgEVsltkMy3o17TYW6YPX3g7U+AmKkkz82trHOTXGzKJQhsAq7U76b sSM9svai02sKeQqbrlayqmCmfXa3EpK+ZJr6EgWc79fmzDMi47OkUjWxAMHyza0U7AdXO8 cZpDe0TGux75oTPE6O1inASiDMOqN55Rxxs53W9MDdrIEZChb182w5aKc1zA/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748671; a=rsa-sha256; cv=none; b=hc50vgg6Oc5F6b3VtbOU//VsElfb/K0mlrfYnzvmyeNSFQMNq2yWjXAEBXd1DyjnRBj1P8 Y90mE39sbJo6YE0ys/MuaIR7DYbrUKnIV0O4Dq8Cij4p2NqVnb6wOdDhJxrm4M0chLIvaD Z6TljGZwFseRhbhXULKe7qAxvx1GApniHej05SDNA/sjen0f6wvGQ5kE9QFEqWYWOYWP+p UOnUTLgMpbdn7CfdYceCxzSFgUI/fsP/RxdEq//ICcLQgbCSOlXvNkivm1tw1u19DV9KAl qod/Hp5R0ZQKvcMcqqiUm0WcD17vCwrhBV7FMFczEJItBpKoOUGMoVvqAF0n2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKCz45HLzm2H; Fri, 7 Jul 2023 16:51: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 367GpBbf010692; Fri, 7 Jul 2023 16:51:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GpB0K010691; Fri, 7 Jul 2023 16:51:11 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:11 GMT Message-Id: <202307071651.367GpB0K010691@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: a1b6427a9787 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1b6427a97879ee0034797b2c75ecd107312456a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a1b6427a97879ee0034797b2c75ecd107312456a commit a1b6427a97879ee0034797b2c75ecd107312456a Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:18 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- usr.bin/elfctl/elfctl.c | 2 +- usr.bin/elfdump/elfdump.c | 2 +- usr.bin/env/env.c | 2 +- usr.bin/find/main.c | 2 +- usr.bin/finger/finger.c | 2 +- usr.bin/fold/fold.c | 2 +- usr.bin/fortune/strfile/strfile.c | 2 +- usr.bin/from/from.c | 2 +- usr.bin/grdc/grdc.c | 2 +- usr.bin/head/head.c | 2 +- usr.bin/join/join.c | 2 +- usr.bin/ktrace/ktrace.c | 2 +- usr.bin/ktrdump/ktrdump.c | 2 +- usr.bin/leave/leave.c | 2 +- usr.bin/limits/limits.c | 2 +- usr.bin/lock/lock.c | 2 +- usr.bin/lockf/lockf.c | 2 +- usr.bin/look/look.c | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c index 41b45aee80b8..5c15ddd43528 100644 --- a/usr.bin/elfctl/elfctl.c +++ b/usr.bin/elfctl/elfctl.c @@ -56,7 +56,7 @@ static bool edit_file_features(Elf *, int, int, char *, bool); static bool get_file_features(Elf *, int, int, uint32_t *, uint64_t *, bool); static void print_features(void); static bool print_file_features(Elf *, int, int, char *, bool); -static void usage(void); +static void usage(void) __dead2; struct ControlFeatures { const char *alias; diff --git a/usr.bin/elfdump/elfdump.c b/usr.bin/elfdump/elfdump.c index b7f60d0eb27b..0ab64534ac50 100644 --- a/usr.bin/elfdump/elfdump.c +++ b/usr.bin/elfdump/elfdump.c @@ -473,7 +473,7 @@ static void elf_print_got(Elf32_Ehdr *e, void *sh); static void elf_print_hash(Elf32_Ehdr *e, void *sh); static void elf_print_note(Elf32_Ehdr *e, void *sh); -static void usage(void); +static void usage(void) __dead2; /* * Helpers for ELF files with shnum or shstrndx values that don't fit in the diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index a0f55d665a9a..4c4e36d12075 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -62,7 +62,7 @@ extern char **environ; int env_verbosity; -static void usage(void); +static void usage(void) __dead2; /* * Exit codes. diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 45a95a454d94..6090f71d6e7c 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -71,7 +71,7 @@ int mindepth = -1, maxdepth = -1; /* minimum and maximum depth */ int regexp_flags = REG_BASIC; /* use the "basic" regexp by default*/ int exitstatus; -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c index 1211c54eb950..6f357f9d994b 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -98,7 +98,7 @@ int invoker_root = 0; static void loginlist(void); static int option(int, char **); -static void usage(void); +static void usage(void) __dead2; static void userlist(int, char **); static int diff --git a/usr.bin/fold/fold.c b/usr.bin/fold/fold.c index 06473b40e787..e2995ee049cd 100644 --- a/usr.bin/fold/fold.c +++ b/usr.bin/fold/fold.c @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); void fold(int); static int newpos(int, wint_t); -static void usage(void); +static void usage(void) __dead2; static int bflag; /* Count bytes, not columns */ static int sflag; /* Split on word boundaries */ diff --git a/usr.bin/fortune/strfile/strfile.c b/usr.bin/fortune/strfile/strfile.c index f6cda6cd3900..abc35946e77e 100644 --- a/usr.bin/fortune/strfile/strfile.c +++ b/usr.bin/fortune/strfile/strfile.c @@ -126,7 +126,7 @@ static int stable_collate_range_cmp(int, int); static void do_order(void); static void getargs(int, char **); static void randomize(void); -static void usage(void); +static void usage(void) __dead2; /* * main: diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index 0b2ad7091e04..5569ec1c2757 100644 --- a/usr.bin/from/from.c +++ b/usr.bin/from/from.c @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #include static int match(const char *, const char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.bin/grdc/grdc.c b/usr.bin/grdc/grdc.c index 04cc00b37d6f..72329c07f70e 100644 --- a/usr.bin/grdc/grdc.c +++ b/usr.bin/grdc/grdc.c @@ -43,7 +43,7 @@ static void set(int, int); static void standt(int); static void movto(int, int); static void sighndl(int); -static void usage(void); +static void usage(void) __dead2; static void sighndl(int signo) diff --git a/usr.bin/head/head.c b/usr.bin/head/head.c index 1c6368823e7c..e323099754ab 100644 --- a/usr.bin/head/head.c +++ b/usr.bin/head/head.c @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); static void head(FILE *, intmax_t); static void head_bytes(FILE *, off_t); static void obsolete(char *[]); -static void usage(void); +static void usage(void) __dead2; static const struct option long_opts[] = { diff --git a/usr.bin/join/join.c b/usr.bin/join/join.c index 40107802a1f8..0ad4b467793e 100644 --- a/usr.bin/join/join.c +++ b/usr.bin/join/join.c @@ -114,7 +114,7 @@ static void outoneline(INPUT *, LINE *); static void outtwoline(INPUT *, LINE *, INPUT *, LINE *); static void slurp(INPUT *); static wchar_t *towcs(const char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/ktrace/ktrace.c b/usr.bin/ktrace/ktrace.c index cd53ca03ad44..1b477fca2fc1 100644 --- a/usr.bin/ktrace/ktrace.c +++ b/usr.bin/ktrace/ktrace.c @@ -67,7 +67,7 @@ static int pid; static void no_ktrace(int); static void set_pid_clear(const char *, enum clear); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/ktrdump/ktrdump.c b/usr.bin/ktrdump/ktrdump.c index 0ffd4cdd9352..4718a577f52d 100644 --- a/usr.bin/ktrdump/ktrdump.c +++ b/usr.bin/ktrdump/ktrdump.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #define USAGE \ "usage: ktrdump [-cflqrtH] [-i ktrfile] [-M core] [-N system] [-o outfile]\n" -static void usage(void); +static void usage(void) __dead2; static struct nlist nl[] = { { .n_name = "_ktr_version" }, diff --git a/usr.bin/leave/leave.c b/usr.bin/leave/leave.c index 1e3d4ed78ae1..bc2d524b7f94 100644 --- a/usr.bin/leave/leave.c +++ b/usr.bin/leave/leave.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include static void doalarm(u_int); -static void usage(void); +static void usage(void) __dead2; /* * leave [[+]hhmm] diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index c0c652d065ac..558d8adf1f0a 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -257,7 +257,7 @@ static struct { #define RCS_STRING "tfdscmlunbvpwko" static rlim_t resource_num(int which, int ch, const char *str); -static void usage(void); +static void usage(void) __dead2; static int getshelltype(void); static void print_limit(rlim_t limit, unsigned divisor, const char *inf, const char *pfx, const char *sfx, const char *which); diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c index d8644f7010a9..30b7e7ac9df6 100644 --- a/usr.bin/lock/lock.c +++ b/usr.bin/lock/lock.c @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); static void quit(int); static void bye(int); static void hi(int); -static void usage(void); +static void usage(void) __dead2; static struct timeval timeout; static struct timeval zerotime; diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index b330f3e6700d..3f582d014314 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -44,7 +44,7 @@ static int acquire_lock(const char *name, int flags); static void cleanup(void); static void killed(int sig); static void timeout(int sig); -static void usage(void); +static void usage(void) __dead2; static void wait_for_lock(const char *name); static const char *lockname; diff --git a/usr.bin/look/look.c b/usr.bin/look/look.c index 6335548c07fd..cded8d398401 100644 --- a/usr.bin/look/look.c +++ b/usr.bin/look/look.c @@ -89,7 +89,7 @@ static int look(wchar_t *, unsigned char *, unsigned char *); static wchar_t *prepkey(const char *, wchar_t); static void print_from(wchar_t *, unsigned char *, unsigned char *); -static void usage(void); +static void usage(void) __dead2; static struct option longopts[] = { { "alternative",no_argument, NULL, 'a' }, From nobody Fri Jul 7 16:51:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKD06j08z4m3DG; Fri, 7 Jul 2023 16:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyKD069DWz4MnN; Fri, 7 Jul 2023 16:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHjZOjB/Cv3lnHuqvdew0kK4bGCiJHQulm8RivBHnuo=; b=GgMUyb9rGOby7/kSCS257zrdmyylUkvYYuLSRWJmJu2xFJ3vOUkwSl5/3bYOiF0tCINter dADhcqT0sCQoN/xFOiFBY4E5PEUJ3ZiDPFh3lDcDuUQKLuTfJ1ewe8itPKxLXABLZRdQbZ J7HbiH7r/1xpUDMyW5pMyiIvrGBinOPoxKpAh910QSrDfWf3EK4NNQDpLaSosvNP3V21iE yind3ShdRLYevD8orWfV4DgKY66mbX/ARqEmASXPcB0M9Y1MY7JAxtV+rpDGEkjuhkE5jB 1uQkgVyVV/I+oEaEjv+Qu40bBvJ7ktut/E+9uBhbD++Lx63CsNV0xqMJwbqagg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHjZOjB/Cv3lnHuqvdew0kK4bGCiJHQulm8RivBHnuo=; b=J7CkmiJzWTdNesOwmUVfOONzUr0v1kjcl8tmcltDZT9K3kib5Rrg/0PfT/sERBSVsJ9fKk MjMWd/R6la4+kWkEMH+euPrGWU7c+clkYCmDvQcLhJ1r2IWZ9GS0LihrPzIrRf7MjPjHzQ MMTyqUlhJy7ZOcwLNuj+gdKKzXSHYb5ylSKChoV+9jMqdSZJ2rS+GJWiFMLG2FYgpaSSbm ikHAaCbZHSxQzRa85XYYia0AmlHK+fOmEzMP/ah9S2JsW65Wlz+J+x9rYynXGPc0p1NBnK d6S4vAigX8YGOiFgQ22BhIns8zx10oHusyI3r/RC1pkRg2uNwsPSOA3/K9huKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748672; a=rsa-sha256; cv=none; b=F2BHJ6HA1WQLyW7+szKEg8i/yqcd1JYaL9GUYAYoOR2ObREYNKUB4wshdPusYWjGGvdb9W hEL4TQbs/P30VdAyQSCXd/g8oWm20H1zBN87YKnPrE2ZtRTNoVfR/4N+U69UpsBL7krlUF tzenA8NHB15R6WZd/Wb3ULhyS4dtqydnjUECT8zremc5L8T3wfOkh/SFQnyITxZZfrHnki zd7f1CPZjN4GevH7ixKehNa6sszJbdWVfBuYRpkMX/lkrhEIUbpI7/LBv9VHZV3tr/SJK0 pP8YdaJOHN5w31w0rMJahjQyuomeK2IbQSpfRgH/83V7FO5BoQ7tv6B3XIoADg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKD05BVCzmWT; Fri, 7 Jul 2023 16:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367GpCeV010716; Fri, 7 Jul 2023 16:51:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GpCpI010715; Fri, 7 Jul 2023 16:51:12 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:12 GMT Message-Id: <202307071651.367GpCpI010715@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: 1a7ac2bd24c1 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a7ac2bd24c1763b0d32e23d9c70308fbc24b07a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1a7ac2bd24c1763b0d32e23d9c70308fbc24b07a commit 1a7ac2bd24c1763b0d32e23d9c70308fbc24b07a Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:18 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- usr.bin/mesg/mesg.c | 2 +- usr.bin/mkfifo/mkfifo.c | 2 +- usr.bin/mktemp/mktemp.c | 2 +- usr.bin/mkuzip/mkuzip.c | 2 +- usr.bin/mt/mt.c | 2 +- usr.bin/netstat/main.c | 2 +- usr.bin/newkey/newkey.c | 2 +- usr.bin/nfsstat/nfsstat.c | 2 +- usr.bin/nohup/nohup.c | 2 +- usr.bin/paste/paste.c | 2 +- usr.bin/perror/perror.c | 2 +- usr.bin/quota/quota.c | 2 +- usr.bin/random/random.c | 2 +- usr.bin/rev/rev.c | 2 +- usr.bin/rpcgen/rpc_main.c | 2 +- usr.bin/rwall/rwall.c | 2 +- usr.bin/rwho/rwho.c | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/usr.bin/mesg/mesg.c b/usr.bin/mesg/mesg.c index 056e6e8f7ccc..f998e4cde7ac 100644 --- a/usr.bin/mesg/mesg.c +++ b/usr.bin/mesg/mesg.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/mkfifo/mkfifo.c b/usr.bin/mkfifo/mkfifo.c index bbcb90173003..91355c142fce 100644 --- a/usr.bin/mkfifo/mkfifo.c +++ b/usr.bin/mkfifo/mkfifo.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #define BASEMODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | \ S_IROTH | S_IWOTH -static void usage(void); +static void usage(void) __dead2; static int f_mode; diff --git a/usr.bin/mktemp/mktemp.c b/usr.bin/mktemp/mktemp.c index afc0c66b295f..e16c2a001a01 100644 --- a/usr.bin/mktemp/mktemp.c +++ b/usr.bin/mktemp/mktemp.c @@ -50,7 +50,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -static void usage(void); +static void usage(void) __dead2; static const struct option long_opts[] = { {"directory", no_argument, NULL, 'd'}, diff --git a/usr.bin/mkuzip/mkuzip.c b/usr.bin/mkuzip/mkuzip.c index 7150a86f52b9..c834432a8347 100644 --- a/usr.bin/mkuzip/mkuzip.c +++ b/usr.bin/mkuzip/mkuzip.c @@ -99,7 +99,7 @@ static const struct mkuz_format uzip_fmts[] = { }; static struct mkuz_blk *readblock(int, u_int32_t); -static void usage(void); +static void usage(void) __dead2; static void cleanup(void); static char *cleanfile = NULL; diff --git a/usr.bin/mt/mt.c b/usr.bin/mt/mt.c index 89b86a6c1d3b..cfada982eaf8 100644 --- a/usr.bin/mt/mt.c +++ b/usr.bin/mt/mt.c @@ -180,7 +180,7 @@ static const struct commands { static const char *getblksiz(int); static void printreg(const char *, u_int, const char *); static void status(struct mtget *); -static void usage(void); +static void usage(void) __dead2; const char *get_driver_state_str(int dsreg); static void st_status (struct mtget *); static int mt_locate(int argc, char **argv, int mtfd, const char *tape); diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index f0db6409f1eb..61b4536a5788 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -192,7 +192,7 @@ static struct protox *protoprotox[] = { NULL }; static void printproto(struct protox *, const char *, bool *); -static void usage(void); +static void usage(void) __dead2; static struct protox *name2protox(const char *); static struct protox *knownname(const char *); diff --git a/usr.bin/newkey/newkey.c b/usr.bin/newkey/newkey.c index be3b2bb3927a..cc4a73f18081 100644 --- a/usr.bin/newkey/newkey.c +++ b/usr.bin/newkey/newkey.c @@ -90,7 +90,7 @@ static char PKFILE[] = "/etc/publickey"; static const char *err_string(int); #endif /* YP */ -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index 37bec0daa9ac..9ea242cef890 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -109,7 +109,7 @@ static int extra_output = 0; static void intpr(int, int); static void printhdr(int, int, int); -static void usage(void); +static void usage(void) __dead2; static char *sperc1(int, int); static char *sperc2(int, int); static void exp_intpr(int, int, int); diff --git a/usr.bin/nohup/nohup.c b/usr.bin/nohup/nohup.c index 4e72f12c1a1d..358cca73fbf2 100644 --- a/usr.bin/nohup/nohup.c +++ b/usr.bin/nohup/nohup.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #include static void dofile(void); -static void usage(void); +static void usage(void) __dead2; #define FILENAME "nohup.out" /* diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index 9d34c203e3b0..9296b94118b8 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -65,7 +65,7 @@ static int delimcnt; static int parallel(char **); static int sequential(char **); static int tr(wchar_t *); -static void usage(void); +static void usage(void) __dead2; static wchar_t tab[] = L"\t"; diff --git a/usr.bin/perror/perror.c b/usr.bin/perror/perror.c index bbf53e5e77c4..f6ffc9a5587c 100644 --- a/usr.bin/perror/perror.c +++ b/usr.bin/perror/perror.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c index 7dceb67b23e8..2b8411c0f3b8 100644 --- a/usr.bin/quota/quota.c +++ b/usr.bin/quota/quota.c @@ -86,7 +86,7 @@ struct quotause { static char *timeprt(int64_t seconds); static struct quotause *getprivs(long id, int quotatype); -static void usage(void); +static void usage(void) __dead2; static int showuid(u_long uid); static int showgid(u_long gid); static int showusrname(char *name); diff --git a/usr.bin/random/random.c b/usr.bin/random/random.c index b3b349cbb75a..4325469608a8 100644 --- a/usr.bin/random/random.c +++ b/usr.bin/random/random.c @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #include "randomize_fd.h" -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/rev/rev.c b/usr.bin/rev/rev.c index f04259639258..ab357fc275e1 100644 --- a/usr.bin/rev/rev.c +++ b/usr.bin/rev/rev.c @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index 1a2cae928472..644c090f82ab 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -64,7 +64,7 @@ static void clnt_output(const char *, const char *, int, const char * ); static char *generate_guard(const char *); static void c_initialize(void); -static void usage(void); +static void usage(void) __dead2; static void options_usage(void); static int do_registers(int, const char **); static int parseargs(int, const char **, struct commandline *); diff --git a/usr.bin/rwall/rwall.c b/usr.bin/rwall/rwall.c index 2daa6a8b6ea7..2ed658a14400 100644 --- a/usr.bin/rwall/rwall.c +++ b/usr.bin/rwall/rwall.c @@ -71,7 +71,7 @@ static char *mbuf; static char notty[] = "no tty"; static void makemsg(const char *); -static void usage(void); +static void usage(void) __dead2; /* ARGSUSED */ int diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index 8e6384161f28..adc697989a18 100644 --- a/usr.bin/rwho/rwho.c +++ b/usr.bin/rwho/rwho.c @@ -83,7 +83,7 @@ static struct myutmp { static time_t now; static int aflg; -static void usage(void); +static void usage(void) __dead2; static int utmpcmp(const void *, const void *); int From nobody Fri Jul 7 16:51:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKD20vJZz4m3Gb; Fri, 7 Jul 2023 16:51: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 4QyKD20J8Kz4N4H; Fri, 7 Jul 2023 16:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i97a8cocksl3Bx9s9LScNO5xg+p3uu58aZoIuf7DF0M=; b=CnSNyhaoBYakuAYfce1FkEPrA3k5BE9rn69SkN2OufAshQVva4k4dltwYTnAAo4hTvkWYc LgLJD/sJi3TNmLLb4wMiS2kbPRV1h4jmdOGzw0IzZ857v6+qAJYKSIa3gv1cT6zO2BN+/a uRjG7FWcAjQMElDqWPFmvTVHOXE35NBZSAjzo3ukJpY2EC3k/Za+hts771Uu/q9wfkX2Ll xHqGR7bLugI/UnLKrHAmLH6mQ6049kpyKZuF0yp1Lu3oVdtlaxeLpcswefheNtCXPYhBy1 CVAd33CK2mhq517mgDK5eQo/szvmK7KCw/0XusZQfiEIkUPH5/oTWfvAPf4FNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i97a8cocksl3Bx9s9LScNO5xg+p3uu58aZoIuf7DF0M=; b=J9CXExIZpSHDdqil2tqU+c67YvabxViPPdmbgw5xBizZCEoXQmYCso7fl91acqtgff9Pig rJd35F6sjpuKARaGyl7iwmMfSvIyu9WrvG7yB/XZfD3bPd3d1jBGGBJUxkiOBZDTBYulmz 8d/7hlvcG3BgiQOrJGSxpnuY523vo0hzlQY+FmST/j0VbjjeOZ/n6ych5NxhQ8emzypL4A TZVOC0IXnJqIUiVOBPRphlg21gxrDgFLeK09Xjpr3jqXZ7SvglF4aYbt4enMQbRco/PHG6 ZAthMhSBvE5S3cg611ktV6/vq37sagQ8OaMhdFoILoaLFp1mB/iwS9yuDU16Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748674; a=rsa-sha256; cv=none; b=FYInXYNzPM6Lp27bOt3p6py0+ckq4uVTt+YGYBgu+D2odBw9vVZ9VABo3U3c+QpNi8wTp1 lyw93HQqCrsPiWOfRnhNXE1hyzaXuwfZqgvr2UEP2CO4mHqwxPtRrx3PcncSwWVZRK9Q6H fXFzXpfBA5b0hQph8G3l/Jo8Z4doBwtkcvc5U0amSrS9bcEqB9J5593v5OPi41O/g4qXFz 4isFGoSTPujuA5PPGSn+FJRwLV6BjGRm3CP1mu5IgUs1uO1NZODlt2/6mpufencebGMDvu dKlxzESg0WgHSHJRcAbt1ml4bxvQlIbi8wlaPymK3aXO/+kBQSPcZqNaNSBrxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKD163G0zmG1; Fri, 7 Jul 2023 16:51: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 367GpDdx010739; Fri, 7 Jul 2023 16:51:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GpDFP010738; Fri, 7 Jul 2023 16:51:13 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:13 GMT Message-Id: <202307071651.367GpDFP010738@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: cccdaf507eee - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cccdaf507eee8fb34494b4624eb85bb951e323c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cccdaf507eee8fb34494b4624eb85bb951e323c8 commit cccdaf507eee8fb34494b4624eb85bb951e323c8 Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:18 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- usr.bin/script/script.c | 2 +- usr.bin/sed/main.c | 2 +- usr.bin/showmount/showmount.c | 2 +- usr.bin/split/split.c | 2 +- usr.bin/tail/tail.c | 2 +- usr.bin/tee/tee.c | 2 +- usr.bin/time/time.c | 2 +- usr.bin/tr/tr.c | 2 +- usr.bin/tty/tty.c | 2 +- usr.bin/ul/ul.c | 2 +- usr.bin/uname/uname.c | 2 +- usr.bin/unexpand/unexpand.c | 2 +- usr.bin/usbhidctl/usbhid.c | 2 +- usr.bin/wall/wall.c | 2 +- usr.bin/what/what.c | 2 +- usr.bin/whois/whois.c | 2 +- usr.bin/write/write.c | 2 +- usr.bin/xstr/xstr.c | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 1d3588c26d8b..72e639e413dd 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -102,7 +102,7 @@ static void finish(void); static void record(FILE *, char *, size_t, int); static void consume(FILE *, off_t, char *, int); static void playback(FILE *) __dead2; -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 44a274eb90e6..4139b69da2f8 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -121,7 +121,7 @@ u_long linenum; static void add_compunit(enum e_cut, char *); static void add_file(char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index fbd1c9bbbe3c..d2b9f46792ba 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -97,7 +97,7 @@ static struct exportslist *exportslist; static int type = 0; void print_dump(struct mountlist *); -static void usage(void); +static void usage(void) __dead2; int xdr_mntdump(XDR *, struct mountlist **); int xdr_exportslist(XDR *, struct exportslist **); int tcp_callrpc(const char *host, int prognum, int versnum, int procnum, diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 91710899a9e9..cee3980ea291 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -82,7 +82,7 @@ static void newfile(void); static void split1(void); static void split2(void); static void split3(void); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index e0266515d749..a9841f2d4a8a 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -70,7 +70,7 @@ int Fflag, fflag, qflag, rflag, rval, no_files, vflag; fileargs_t *fa; static void obsolete(char **); -static void usage(void); +static void usage(void) __dead2; static const struct option long_opts[] = { diff --git a/usr.bin/tee/tee.c b/usr.bin/tee/tee.c index bc338e14bd66..5646930a1c98 100644 --- a/usr.bin/tee/tee.c +++ b/usr.bin/tee/tee.c @@ -66,7 +66,7 @@ struct entry { static STAILQ_HEAD(, entry) head = STAILQ_HEAD_INITIALIZER(head); static void add(int, const char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 9121b1f14408..64063212170d 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -66,7 +66,7 @@ static void humantime(FILE *, long, long); static void showtime(FILE *, struct timespec *, struct timespec *, struct rusage *); static void siginfo(int); -static void usage(void); +static void usage(void) __dead2; static sig_atomic_t siginfo_recvd; static char decimal_point; diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c index 2d1baad2ac09..32f1858049ac 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@ -67,7 +67,7 @@ static STR s1 = { STRING1, NORMAL, 0, OOBCH, 0, { 0, OOBCH }, NULL, NULL }; static STR s2 = { STRING2, NORMAL, 0, OOBCH, 0, { 0, OOBCH }, NULL, NULL }; static struct cset *setup(char *, STR *, int, int); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.bin/tty/tty.c b/usr.bin/tty/tty.c index 02fc2fec1e28..4f9549eb67c5 100644 --- a/usr.bin/tty/tty.c +++ b/usr.bin/tty/tty.c @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.bin/ul/ul.c b/usr.bin/ul/ul.c index 14b1d87905d2..07a796ffd55b 100644 --- a/usr.bin/ul/ul.c +++ b/usr.bin/ul/ul.c @@ -89,7 +89,7 @@ static int halfpos; static int upln; static int iflag; -static void usage(void); +static void usage(void) __dead2; static void setnewmode(int); static void initcap(void); static void reverse(void); diff --git a/usr.bin/uname/uname.c b/usr.bin/uname/uname.c index 109505e4b9da..980705e984f4 100644 --- a/usr.bin/uname/uname.c +++ b/usr.bin/uname/uname.c @@ -85,7 +85,7 @@ static void native_uservers(void); static void native_buildid(void); static void print_uname(u_int); static void setup_get(void); -static void usage(void); +static void usage(void) __dead2; static char *buildid, *ident, *platform, *hostname, *arch, *release, *sysname, *version, *kernvers, *uservers; diff --git a/usr.bin/unexpand/unexpand.c b/usr.bin/unexpand/unexpand.c index 08ba8ffe1dc4..47a3b1f611ca 100644 --- a/usr.bin/unexpand/unexpand.c +++ b/usr.bin/unexpand/unexpand.c @@ -62,7 +62,7 @@ static int nstops; static int tabstops[100]; static void getstops(const char *); -static void usage(void); +static void usage(void) __dead2; static int tabify(const char *); int diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c index 984cdebc3289..b814aa3924d1 100644 --- a/usr.bin/usbhidctl/usbhid.c +++ b/usr.bin/usbhidctl/usbhid.c @@ -58,7 +58,7 @@ static int hexdump = 0; static int wflag = 0; static int zflag = 0; -static void usage(void); +static void usage(void) __dead2; static void dumpitem(const char *label, struct hid_item *h); static void dumpitems(report_desc_t r); static void prdata(u_char *buf, struct hid_item *h); diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c index a02f103cb80f..b1db354e6ec3 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -70,7 +70,7 @@ static const char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93"; #include "ttymsg.h" static void makemsg(char *); -static void usage(void); +static void usage(void) __dead2; static struct wallgroup { struct wallgroup *next; diff --git a/usr.bin/what/what.c b/usr.bin/what/what.c index 6d59f70cb589..5430a1fa0f35 100644 --- a/usr.bin/what/what.c +++ b/usr.bin/what/what.c @@ -49,7 +49,7 @@ static const char sccsid[] = "@(#)what.c 8.1 (Berkeley) 6/6/93"; #include #include -static void usage(void); +static void usage(void) __dead2; static bool search(bool, bool, FILE *); int diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index d98120052b76..5dccb3c4a485 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -159,7 +159,7 @@ static const char *port = DEFAULT_PORT; static const char *choose_server(char *); static struct addrinfo *gethostinfo(const char *, const char *, int); static void s_asprintf(char **ret, const char *format, ...) __printflike(2, 3); -static void usage(void); +static void usage(void) __dead2; static void whois(const char *, const char *, const char *, int); int diff --git a/usr.bin/write/write.c b/usr.bin/write/write.c index 06cae97d9fc9..399373c5bc57 100644 --- a/usr.bin/write/write.c +++ b/usr.bin/write/write.c @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); void done(int); void do_write(int, char *, char *, const char *); -static void usage(void); +static void usage(void) __dead2; int term_chk(int, char *, int *, time_t *, int); void wr_fputs(wchar_t *s); void search_utmp(int, char *, char *, char *, uid_t); diff --git a/usr.bin/xstr/xstr.c b/usr.bin/xstr/xstr.c index da96581c3f2b..af9f0d2893bb 100644 --- a/usr.bin/xstr/xstr.c +++ b/usr.bin/xstr/xstr.c @@ -84,7 +84,7 @@ static int xgetc(FILE *); static off_t hashit(char *, int); static off_t yankstr(char **); -static void usage(void); +static void usage(void) __dead2; static void flushsh(void); static void found(int, off_t, char *); From nobody Fri Jul 7 16:51:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKD31ncDz4m3DM; Fri, 7 Jul 2023 16:51: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 4QyKD31H7yz4N6h; Fri, 7 Jul 2023 16:51:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aw7a7NeMLNaJ/QvCddfK6yTgogff2aloifc4dOyLzis=; b=KWpmML8ky/Rsva7mKiPUO9b3gaGn4FN5sp3rwc1ZbETdVT/9LCWKzP6nSTwFksnDAdsLFr DNRzLxcrSH4fkr0zS1XUyXV7HpvtnLnPuAZLldglSZVg/KEiqCHZ+bo5U4MeTaVIAtY937 oNDOeK/IcbwHtMGd//btJXwSwgr700tTlRr00jXlQhR3RqNEOIatmxxKVDsMaEWrZh5I2k S5H0WGKlGr8vIp86AVLos1jT12BUorVRHDxGCLSWd9YhBWLIcgFt2ALtzJW6ByupNHNFXJ t8ChisE0IaSR4LAMzQT01BysSUez3kIrydMqiUOmWjzO8EHHVgEzM1Bd85CxYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aw7a7NeMLNaJ/QvCddfK6yTgogff2aloifc4dOyLzis=; b=MPTOTKXWuR1kCzNO+glEzZ/gcp8oCJMxLJXM1crdIfox8QQemKm1d/w6jFZprmWE2syem4 E68Vb73hnWsOQStcS+1CczBf05iIhRbRAoCMQlVhbW9DsscV+FvVD5/n2mzk+Nignj9RFs vBhzSu2Ea2ke/Rai4F5qyNueimXN4Xq9aeIc4cFam79bX45Xb7xpI1vWEKJXbNy0cuTBW/ ireqxyl8DzMpuszCxhtIrQANC3oK2wDp4ZvIdiyZWbGLfLiUE/nSYSL8qJHSr6huyK6EhT P8NdELUUR6B0SxJAnOBS+9nFG7VnHG27WlGrbFU9LLhillyRULYN5SzLxuejmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748675; a=rsa-sha256; cv=none; b=R7ASRPic1iq6AWR+S6Om4u93mGe6UzJJ0eUeCYo8ZPlbzN1Q0r9nnhZbuBQSDwSzB+PMEx pUYWfYmrNBXYpxAfA8Csb4SQcYJzEDQ6+5zXkkjQIJjVEsWki8dkKZw1E99dmI+0012Vr0 F3AaCuYJA0Vl1kytrKdx76pElPWL0gsErq88RL/sueGx3HvvaSm3CcH6RvHYz7G3uPJO/Q V5r85kaWPg/CattGR85K1427SNfEbRb39Ze4IXkPCETa+wVp/Kieyo31v8Rsh4G/ykO9IK HyS2jm6eJHgMkG9f3fh65zzyCe8HhiUqP1vxb+NZ57yo778pGMurKK2d/yoiZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKD30BWDzmWV; Fri, 7 Jul 2023 16:51: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 367GpE4l010758; Fri, 7 Jul 2023 16:51:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GpEeD010757; Fri, 7 Jul 2023 16:51:14 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:14 GMT Message-Id: <202307071651.367GpEeD010757@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: 72e1ea2f1361 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72e1ea2f13619f3bd299348f281815a6669f3775 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=72e1ea2f13619f3bd299348f281815a6669f3775 commit 72e1ea2f13619f3bd299348f281815a6669f3775 Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:18 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- usr.sbin/accton/accton.c | 2 +- usr.sbin/arp/arp.c | 2 +- usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c | 2 +- usr.sbin/bluetooth/btpand/btpand.c | 4 ++-- usr.sbin/boot0cfg/boot0cfg.c | 2 +- usr.sbin/bootparamd/bootparamd/main.c | 2 +- usr.sbin/bootparamd/callbootd/callbootd.c | 2 +- usr.sbin/btxld/btxld.c | 2 +- usr.sbin/chroot/chroot.c | 2 +- usr.sbin/ckdist/ckdist.c | 2 +- usr.sbin/crunch/crunchide/crunchide.c | 2 +- usr.sbin/edquota/edquota.c | 2 +- usr.sbin/efitable/efitable.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/usr.sbin/accton/accton.c b/usr.sbin/accton/accton.c index 80823ecabbc5..91b775928389 100644 --- a/usr.sbin/accton/accton.c +++ b/usr.sbin/accton/accton.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 5a6c58e99e78..8b82d73aab08 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -90,7 +90,7 @@ static void nuke_entries(uint32_t ifindex, struct in_addr addr); static int print_entries(uint32_t ifindex, struct in_addr addr); static int delete(char *host); -static void usage(void); +static void usage(void) __dead2; static int set(int argc, char **argv); static int get(char *host); static int file(char *name); diff --git a/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c b/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c index deb890c573b0..c7d4369e5f6d 100644 --- a/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c +++ b/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c @@ -48,7 +48,7 @@ static int do_bthid_command(bdaddr_p bdaddr, int argc, char **argv); static struct bthid_command * find_bthid_command(char const *command, struct bthid_command *category); static void print_bthid_command(struct bthid_command *category); -static void usage(void); +static void usage(void) __dead2; int32_t hid_sdp_query(bdaddr_t const *local, bdaddr_t const *remote, int32_t *error); diff --git a/usr.sbin/bluetooth/btpand/btpand.c b/usr.sbin/bluetooth/btpand/btpand.c index 6e215fe32269..f226338edd15 100644 --- a/usr.sbin/bluetooth/btpand/btpand.c +++ b/usr.sbin/bluetooth/btpand/btpand.c @@ -72,9 +72,9 @@ static const struct { { "GN", SDP_SERVICE_CLASS_GN, "Group Network" }, }; -static void main_exit(int); +static void main_exit(int) __dead2; static void main_detach(void); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c index bccab173e2fb..1b742dd6ef9c 100644 --- a/usr.sbin/boot0cfg/boot0cfg.c +++ b/usr.sbin/boot0cfg/boot0cfg.c @@ -107,7 +107,7 @@ static int boot0bs(const u_int8_t *); static void stropt(const char *, int *, int *); static int argtoi(const char *, int, int, int); static int set_bell(u_int8_t *, int, int); -static void usage(void); +static void usage(void) __dead2; static unsigned vol_id[5]; /* 4 plus 1 for flag */ diff --git a/usr.sbin/bootparamd/bootparamd/main.c b/usr.sbin/bootparamd/bootparamd/main.c index 95b49f8f39a0..578bb2605be6 100644 --- a/usr.sbin/bootparamd/bootparamd/main.c +++ b/usr.sbin/bootparamd/bootparamd/main.c @@ -39,7 +39,7 @@ const char *bootpfile = "/etc/bootparams"; static struct sockaddr_in my_addr; -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.sbin/bootparamd/callbootd/callbootd.c b/usr.sbin/bootparamd/callbootd/callbootd.c index ea1432c3140a..0a0980bd4aa0 100644 --- a/usr.sbin/bootparamd/callbootd/callbootd.c +++ b/usr.sbin/bootparamd/callbootd/callbootd.c @@ -30,7 +30,7 @@ static char cln[MAX_MACHINE_NAME+1]; static char dmn[MAX_MACHINE_NAME+1]; static char path[MAX_PATH_LEN+1]; -static void usage(void); +static void usage(void) __dead2; int printgetfile(bp_getfile_res *); int printwhoami(bp_whoami_res *); diff --git a/usr.sbin/btxld/btxld.c b/usr.sbin/btxld/btxld.c index 5ce24a42b216..e7211ad48fa4 100644 --- a/usr.sbin/btxld/btxld.c +++ b/usr.sbin/btxld/btxld.c @@ -127,7 +127,7 @@ static unsigned int optfmt(const char *); static uint32_t optaddr(const char *); static int optpage(const char *, int); static void Warn(const char *, const char *, ...); -static void usage(void); +static void usage(void) __dead2; /* * A link editor for BTX clients. diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index b14e1cbf4597..59bf8f0791a2 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.sbin/ckdist/ckdist.c b/usr.sbin/ckdist/ckdist.c index b64392dfb771..caee507f246b 100644 --- a/usr.sbin/ckdist/ckdist.c +++ b/usr.sbin/ckdist/ckdist.c @@ -86,7 +86,7 @@ static const char *stripath(const char *path); static int distfile(const char *path); static int disttype(const char *name); static int fail(const char *path, const char *msg); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.sbin/crunch/crunchide/crunchide.c b/usr.sbin/crunch/crunchide/crunchide.c index bd663e1d57bd..94778e8c9d3e 100644 --- a/usr.sbin/crunch/crunchide/crunchide.c +++ b/usr.sbin/crunch/crunchide/crunchide.c @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); static const char *pname = "crunchide"; -static void usage(void); +static void usage(void) __dead2; static void add_to_keep_list(char *symbol); static void add_file_to_keep_list(char *filename); diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c index de2083506864..036b3f699eae 100644 --- a/usr.sbin/edquota/edquota.c +++ b/usr.sbin/edquota/edquota.c @@ -110,7 +110,7 @@ struct quotause *getprivs(long, int, char *); void putprivs(long, struct quotause *); int readprivs(struct quotause *, char *); int readtimes(struct quotause *, char *); -static void usage(void); +static void usage(void) __dead2; int writetimes(struct quotause *, int, int); int writeprivs(struct quotause *, int, char *, int); diff --git a/usr.sbin/efitable/efitable.c b/usr.sbin/efitable/efitable.c index 6bd4d96ffd2a..329c784611ae 100644 --- a/usr.sbin/efitable/efitable.c +++ b/usr.sbin/efitable/efitable.c @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); static void efi_table_print_esrt(const void *data); static void efi_table_print_prop(const void *data); -static void usage(void); +static void usage(void) __dead2; struct efi_table_op { char name[TABLE_MAX_LEN]; From nobody Fri Jul 7 16:51:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKD43Y9Gz4m3TR; Fri, 7 Jul 2023 16: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 4QyKD428vsz4NFN; Fri, 7 Jul 2023 16: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=1688748676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rhl9guMXmoiADVqv+O2qpuREfMfAjBhDU5e06mPhvWk=; b=pt5bZ95DPtvLO9jHR2Sl1FbBHNSJY23FPnNQ5TnqQJ0RDoa8otP5trxbY6Gz6S0kfs55jn WNPjA5fGK1/YDdrb4mxWiRewKo8w/RGUmwjJKM9FbhDGoJqdPFhU5RTwkn/0J82NjWN6PV UqUHzfGGJpRJfGO7VKxKfiaIx1BWvCGCssmoEjek2ZuIz4s8/YP+5a6HPDvzKxSncRNdLD dxe65lCUredd1mj8cSwxHLUoYUGZawWERM0DlTe5kzSkT1pGnzcOusJm8Ba6neN4sJKlQx 25pBVVV6LN1DYsG4bglKlN4RxeTZ2akKak++EFIp+I6fMekVxQpreU00AqvhMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rhl9guMXmoiADVqv+O2qpuREfMfAjBhDU5e06mPhvWk=; b=Y+KAgWG5Rwig+Cg1mRzx84Uc6nqXet1D9RZghqXJBjJz9dcQvKm0YSL8OzUeFfGGiXozQZ pyrpo3RbtI6Ldu/l5A0f3656fIrFRGKlewH3REL5ofLcroAAELdIDBdUtVUhTJ/Oj0qVpt fQqylJbizQTZsDDlLnbzn9SpwrYERD7xVOAgx5o39IofutVwjc/lR+hu9VFioHPe8ytfdw mcrktMZY8MeDYRCiuk7lZFochZsA3II0Y0elC1gdbqq3QL1FPev6Gl7D+8cr1oDy+NIm2R TP6bjJtUl4LKHCiUfq/MZJULm8ljVUJnCnxoNAn4XiBFiAUX1hkfsPIal70lAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748676; a=rsa-sha256; cv=none; b=gk9j/Q6aIZJhMzdp0y93sJTkrMLQkcgxkiRREWeiz68LrvOGmuTnmEwqG9cij/5DvZoJg1 UxPSaqM07r6AkZQud2mnjO8IpHQgYhhzRyz3N0FnqZgKHFeTTEspdNLy1V2O0Kb6QgTeS/ 5TojHXXODnOZ+j2v2cy4cHHKOZdTIceZzISGv2s0EkKdRvFbW6DVT4oM315pNqzNpS1Fw+ hxPcu4AQi5NiAMd+U7jl4CQwkpP1ykKgHoWiGfAboJtb3nVQXvhfHx5yPR/hIAMoDTZAp/ NAbVsDYcxs7UVeczrq1mD07RXQgLTzb8cRe7SCt0rbPSS2zg5F/IGG5vjWI/jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKD41DS0zmgy; Fri, 7 Jul 2023 16: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 367GpG8K010783; Fri, 7 Jul 2023 16: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 367GpGKS010782; Fri, 7 Jul 2023 16:51:16 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:16 GMT Message-Id: <202307071651.367GpGKS010782@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: a9cce232a6b9 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9cce232a6b930d2d1932f1f20a86a84d9cc77cd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a9cce232a6b930d2d1932f1f20a86a84d9cc77cd commit a9cce232a6b930d2d1932f1f20a86a84d9cc77cd Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:18 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- usr.sbin/fdcontrol/fdcontrol.c | 2 +- usr.sbin/gstat/gstat.c | 2 +- usr.sbin/iostat/iostat.c | 5 ++--- usr.sbin/ip6addrctl/ip6addrctl.c | 2 +- usr.sbin/jail/jail.c | 2 +- usr.sbin/ndp/ndp.c | 2 +- usr.sbin/newsyslog/newsyslog.c | 2 +- usr.sbin/nfsdumpstate/nfsdumpstate.c | 2 +- usr.sbin/nfsrevoke/nfsrevoke.c | 2 +- usr.sbin/nscd/nscd.c | 2 +- usr.sbin/nvram/nvram.c | 2 +- 11 files changed, 12 insertions(+), 13 deletions(-) diff --git a/usr.sbin/fdcontrol/fdcontrol.c b/usr.sbin/fdcontrol/fdcontrol.c index 953076b5af93..d0ea0c705ae5 100644 --- a/usr.sbin/fdcontrol/fdcontrol.c +++ b/usr.sbin/fdcontrol/fdcontrol.c @@ -47,7 +47,7 @@ static int format, verbose, show = 1, showfmt; static char *fmtstring; static void showdev(enum fd_drivetype, const char *); -static void usage(void); +static void usage(void) __dead2; static void usage(void) diff --git a/usr.sbin/gstat/gstat.c b/usr.sbin/gstat/gstat.c index cd44c740a3b4..b9f5d5eff449 100644 --- a/usr.sbin/gstat/gstat.c +++ b/usr.sbin/gstat/gstat.c @@ -66,7 +66,7 @@ static int flag_I = 1000000; printw(__VA_ARGS__); \ } while(0) -static void usage(void); +static void usage(void) __dead2; static const char* el_prompt(void) diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index 7c4dcf16e0a5..076f2acfe4e0 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -149,7 +149,7 @@ static int dflag = 0, Iflag = 0, Cflag = 0, Tflag = 0, oflag = 0, Kflag = 0; static int xflag = 0, zflag = 0; /* local function declarations */ -static void usage(void); +static void usage(void) __dead2; static void needhdr(int signo); static void needresize(int signo); static void needreturn(int signo); @@ -173,6 +173,7 @@ usage(void) fprintf(stderr, "usage: iostat [-CdhIKoTxz?] [-c count] [-M core]" " [-n devs] [-N system]\n" "\t [-t type,if,pass] [-w wait] [drives]\n"); + exit(1); } int @@ -261,8 +262,6 @@ main(int argc, char **argv) break; default: usage(); - exit(1); - break; } } diff --git a/usr.sbin/ip6addrctl/ip6addrctl.c b/usr.sbin/ip6addrctl/ip6addrctl.c index 06d527dac2ce..12903ab25f66 100644 --- a/usr.sbin/ip6addrctl/ip6addrctl.c +++ b/usr.sbin/ip6addrctl/ip6addrctl.c @@ -62,7 +62,7 @@ struct policyqueue { TAILQ_HEAD(policyhead, policyqueue); static struct policyhead policyhead; -static void usage(void); +static void usage(void) __dead2; static void get_policy(void); static void dump_policy(void); static int mask2plen(struct sockaddr_in6 *); diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c index a2c725d51b70..b8cccbbd625e 100644 --- a/usr.sbin/jail/jail.c +++ b/usr.sbin/jail/jail.c @@ -73,7 +73,7 @@ static void print_jail(FILE *fp, struct cfjail *j, int oldcl, int running); static void print_param(FILE *fp, const struct cfparam *p, int sep, int doname); static void show_jails(void); static void quoted_print(FILE *fp, char *str); -static void usage(void); +static void usage(void) __dead2; static struct permspec perm_sysctl[] = { { "security.jail.set_hostname_allowed", KP_ALLOW_SET_HOSTNAME, 0 }, diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 112fd099e3e0..becc04ec5f10 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -138,7 +138,7 @@ static int delete(char *); static int dump(struct sockaddr_in6 *, int); static struct in6_nbrinfo *getnbrinfo(struct in6_addr *, int, int); static int ndp_ether_aton(char *, u_char *); -static void usage(void); +static void usage(void) __dead2; static void ifinfo(char *, int, char **); static void rtrlist(void); static void plist(void); diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 8f8bb54e9b46..5cd0f8b7a5d1 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -281,7 +281,7 @@ static struct conf_entry *init_entry(const char *fname, struct conf_entry *src_entry); static void parse_args(int argc, char **argv); static int parse_doption(const char *doption); -static void usage(void); +static void usage(void) __dead2; static int log_trim(const char *logname, const struct conf_entry *log_ent); static int age_old_log(const char *file); static void savelog(char *from, char *to); diff --git a/usr.sbin/nfsdumpstate/nfsdumpstate.c b/usr.sbin/nfsdumpstate/nfsdumpstate.c index c7e086655f79..16f6efab3033 100644 --- a/usr.sbin/nfsdumpstate/nfsdumpstate.c +++ b/usr.sbin/nfsdumpstate/nfsdumpstate.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); static void dump_lockstate(char *); static void dump_openstate(void); -static void usage(void); +static void usage(void) __dead2; static char *open_flags(uint32_t); static char *deleg_flags(uint32_t); static char *lock_flags(uint32_t); diff --git a/usr.sbin/nfsrevoke/nfsrevoke.c b/usr.sbin/nfsrevoke/nfsrevoke.c index 85eb48bfa8fb..e9750afac722 100644 --- a/usr.sbin/nfsrevoke/nfsrevoke.c +++ b/usr.sbin/nfsrevoke/nfsrevoke.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.sbin/nscd/nscd.c b/usr.sbin/nscd/nscd.c index 8a569a2dc9ab..14d0a6780bf4 100644 --- a/usr.sbin/nscd/nscd.c +++ b/usr.sbin/nscd/nscd.c @@ -85,7 +85,7 @@ static void process_socket_event(struct kevent *, struct runtime_env *, static void process_timer_event(struct kevent *, struct runtime_env *, struct configuration *); static void *processing_thread(void *); -static void usage(void); +static void usage(void) __dead2; void get_time_func(struct timeval *); diff --git a/usr.sbin/nvram/nvram.c b/usr.sbin/nvram/nvram.c index 52c1e809ae71..4a6a09ecd8f6 100644 --- a/usr.sbin/nvram/nvram.c +++ b/usr.sbin/nvram/nvram.c @@ -41,7 +41,7 @@ #define DEVICE_NAME (_PATH_DEV "powermac_nvram") -static void usage(void); +static void usage(void) __dead2; static int remove_var(uint8_t *, int, const char *); static int append_var(uint8_t *, int, const char *, const char *); From nobody Fri Jul 7 16:51:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKD53n4kz4m3TX; Fri, 7 Jul 2023 16:51: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 4QyKD53GNFz4N7G; Fri, 7 Jul 2023 16:51:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QIPnijE6N6VvPZIFXdaD7cA5kFZsGhnQmO5oFJ3T+ss=; b=dJoRUoqol4bfVN8V7wv8WsVrV372BjAk7XYxL79cDgpEcr/pargl+26D+0T8vwFrsJkZIY Wv7pS6zlmMhdzKW1xGqnoH65n/Z2Wx6mtq9dGNdJTeIifYKdGlaOf14zLz7IfijAQh0TG5 0HCKh19APqUme5Tk9zsaHbIq1wCFUJE3T20fhD5KiYogjA6M13Uho41k9lbYlsYAAkxNlF b3PonlZG8U6gSM1ekJ0n83fxyFCJDSIRxXkOCIeyTTI93WyKMZxrPTZ7sYhD4Y7vSuskl6 cJTWm8tRnKVU01avSVSPWqC8CxveC4E7CUHaDYp2PeOgfl9OjdxVY9p6fT7vzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QIPnijE6N6VvPZIFXdaD7cA5kFZsGhnQmO5oFJ3T+ss=; b=B+qFDL9uBMGY7oS4qQaoI4eDCdLMLKW6el8/6KNP2sZdO5drmWRZJp5QR+svVaIVe8NGCn jM2o2Ma8X7H00qbdEyqTqD7LEpT2YIAksoje+BtUmPEMHBrqUUjeXuXKewfqT4UQTSrQ0N GkykXQghiYkIMjlLTcrdjLJ+n41S2jCzsNXYgrqayPizWW1Td34bFQyIZBe61vC4ALlhiy V63qXuO8DcJ0iFNv4p5Kxx3/gQep2VLdzT/+VYyb10qVmHcwlqsflDfpkgzMJyiJScyoqU 4D/symg1cu1FAbfNSqxyzlRjiWJkvZtZyd4gCEZoHIbkI5U8uX76YLrTZjG3dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748677; a=rsa-sha256; cv=none; b=baDBH1lseJNcSAgeAIX5dP6jhCfPBnkCLp5AZpWlDPtyI6n76tHZot+QxosrixEHcvMrn7 zplAOXcEEfb8XeNgOl4pnJhLY2pIRvFEOv4YJYd0KOs1kQCCw1D53r34/OlB8faxQRlpJR O3+bEYWNhEnM0wK2zJBREj5Wg+iwRbXLCbYP7/GhwkgVFEfDJr8JiGxa3TgpDYcbWWFkxc Jv/av8rBv2DtX2iGnZl48EnListIbQB+EjxGWulMbayl6/nxs88+IfEZHw8NjXwHh0jUz+ aXUyI4oyl5goazNIbiROeTmZ1uiitZyZ80pnkxMdydf3Rk21rwVzIQB0l//kwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKD52FNxzmLk; Fri, 7 Jul 2023 16:51: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 367GpHdR010804; Fri, 7 Jul 2023 16:51:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GpH6P010803; Fri, 7 Jul 2023 16:51:17 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:51:17 GMT Message-Id: <202307071651.367GpH6P010803@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: a2cc93ec7fa1 - main - Mark usage function as __dead2 in programs where it does not return List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2cc93ec7fa15eed4d3a39998adff641c15dca4f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a2cc93ec7fa15eed4d3a39998adff641c15dca4f commit a2cc93ec7fa15eed4d3a39998adff641c15dca4f Author: Alfonso Gregory AuthorDate: 2023-07-07 16:39:23 +0000 Commit: Warner Losh CommitDate: 2023-07-07 16:45:18 +0000 Mark usage function as __dead2 in programs where it does not return In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735 --- usr.sbin/pnfsdscopymr/pnfsdscopymr.c | 2 +- usr.sbin/pnfsdsfile/pnfsdsfile.c | 2 +- usr.sbin/pnfsdskill/pnfsdskill.c | 2 +- usr.sbin/quotaon/quotaon.c | 2 +- usr.sbin/repquota/repquota.c | 2 +- usr.sbin/rip6query/rip6query.c | 7 +++---- usr.sbin/rtprio/rtprio.c | 2 +- usr.sbin/rwhod/rwhod.c | 2 +- usr.sbin/setfib/setfib.c | 2 +- usr.sbin/spray/spray.c | 2 +- usr.sbin/tcpdrop/tcpdrop.c | 2 +- 11 files changed, 13 insertions(+), 14 deletions(-) diff --git a/usr.sbin/pnfsdscopymr/pnfsdscopymr.c b/usr.sbin/pnfsdscopymr/pnfsdscopymr.c index 33dcd302ef73..7a6eb298fa8d 100644 --- a/usr.sbin/pnfsdscopymr/pnfsdscopymr.c +++ b/usr.sbin/pnfsdscopymr/pnfsdscopymr.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; static struct option longopts[] = { { "migrate", required_argument, NULL, 'm' }, diff --git a/usr.sbin/pnfsdsfile/pnfsdsfile.c b/usr.sbin/pnfsdsfile/pnfsdsfile.c index ca17586dd3bd..7669f1f29b93 100644 --- a/usr.sbin/pnfsdsfile/pnfsdsfile.c +++ b/usr.sbin/pnfsdsfile/pnfsdsfile.c @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; static struct option longopts[] = { { "changeds", required_argument, NULL, 'c' }, diff --git a/usr.sbin/pnfsdskill/pnfsdskill.c b/usr.sbin/pnfsdskill/pnfsdskill.c index dcca4a17b626..878ca584d142 100644 --- a/usr.sbin/pnfsdskill/pnfsdskill.c +++ b/usr.sbin/pnfsdskill/pnfsdskill.c @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; static struct option longopts[] = { { "force", no_argument, NULL, 'f' }, diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c index f5340c6b44c5..224da3b2032c 100644 --- a/usr.sbin/quotaon/quotaon.c +++ b/usr.sbin/quotaon/quotaon.c @@ -70,7 +70,7 @@ static int vflag; /* verbose */ static int oneof(char *, char *[], int); static int quotaonoff(struct fstab *fs, int, int); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char **argv) diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c index 23abcca93752..9fc8829ad1b6 100644 --- a/usr.sbin/repquota/repquota.c +++ b/usr.sbin/repquota/repquota.c @@ -104,7 +104,7 @@ int oneof(char *, char *[], int); int repquota(struct fstab *, int); char *timeprt(time_t); static void prthumanval(int64_t bytes); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.sbin/rip6query/rip6query.c b/usr.sbin/rip6query/rip6query.c index b3d745965965..549e05c4bae6 100644 --- a/usr.sbin/rip6query/rip6query.c +++ b/usr.sbin/rip6query/rip6query.c @@ -62,7 +62,7 @@ static struct rip6 *ripbuf; #define RIPSIZE(n) (sizeof(struct rip6) + (n-1) * sizeof(struct netinfo6)) int main(int, char **); -static void usage(void); +static void usage(void) __dead2; static const char *sa_n2a(struct sockaddr *); static const char *inet6_n2a(struct in6_addr *); @@ -90,7 +90,6 @@ main(int argc, char *argv[]) break; default: usage(); - exit(1); /*NOTREACHED*/ } } @@ -99,7 +98,6 @@ main(int argc, char *argv[]) if (argc != 1) { usage(); - exit(1); } if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { @@ -168,13 +166,14 @@ main(int argc, char *argv[]) } } while (len == RIPSIZE(24)); - exit(0); + return 0; } static void usage(void) { fprintf(stderr, "usage: rip6query [-I iface] address\n"); + exit(1); } /* getnameinfo() is preferred as we may be able to show ifindex as ifname */ diff --git a/usr.sbin/rtprio/rtprio.c b/usr.sbin/rtprio/rtprio.c index 9ce74b5547ad..f8da2cc96290 100644 --- a/usr.sbin/rtprio/rtprio.c +++ b/usr.sbin/rtprio/rtprio.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include static int parseint(const char *, const char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index 23c307e33829..1b2b2b153a0f 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -137,7 +137,7 @@ void run_as(uid_t *uid, gid_t *gid); void quit(const char *msg); void sender_process(void); int verify(char *name, int maxlen); -static void usage(void); +static void usage(void) __dead2; #ifdef DEBUG char *interval(int time, char *updown); diff --git a/usr.sbin/setfib/setfib.c b/usr.sbin/setfib/setfib.c index 0783a07f4597..1c8adbc988da 100644 --- a/usr.sbin/setfib/setfib.c +++ b/usr.sbin/setfib/setfib.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) diff --git a/usr.sbin/spray/spray.c b/usr.sbin/spray/spray.c index d8d25ef8a33c..18caf3ff3bd9 100644 --- a/usr.sbin/spray/spray.c +++ b/usr.sbin/spray/spray.c @@ -47,7 +47,7 @@ static const char rcsid[] = #define SPRAYOVERHEAD 86 #endif -static void usage(void); +static void usage(void) __dead2; static void print_xferstats(unsigned int, int, double); /* spray buffer */ diff --git a/usr.sbin/tcpdrop/tcpdrop.c b/usr.sbin/tcpdrop/tcpdrop.c index 135f1b52c403..018ef8456e6a 100644 --- a/usr.sbin/tcpdrop/tcpdrop.c +++ b/usr.sbin/tcpdrop/tcpdrop.c @@ -58,7 +58,7 @@ static bool tcpdropall(const char *, const char *, int); static bool tcpdropbyname(const char *, const char *, const char *, const char *); static bool tcpdropconn(const struct in_conninfo *); -static void usage(void); +static void usage(void) __dead2; /* * Drop a tcp connection. From nobody Fri Jul 7 16:56:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKKv399tz4m4Kt; Fri, 7 Jul 2023 16:56: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 4QyKKv164Nz4SVh; Fri, 7 Jul 2023 16:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DS/pxMeixJ6vpCo1AG7Dzu+Fl9adO9ab5FBAg5etT6M=; b=kAoeCo9g6RfXxqUYOslBjzGofFhP805TOf4H1n3aZgrFhgTE89XL1JnigaaYDAnjDvUQhj Rvduk3Eg16sUzMB1L1fT6x5Y9in/Qv13RaetPGnrISjmA7Wj/yyfrzFAt68VUby9/VvxGt ETmLhMVPgBW62Ua/lfCYXJwQQRj14sHQRKnvwkyMT7ZdyA/d49hMhb8aB98cm8CuSaBRGf MeJN6lATxoSFal0+Uc99nNb3Ai5f4p+2QMEI3oE1plHtqLErc9IOB8oVtLQiCFJZyUh4IH DniA52zb5azF2VhBlgInOZBYDjbQtnJQtSqtX2wz2B1ns44I+JIHNi7DUY0j+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DS/pxMeixJ6vpCo1AG7Dzu+Fl9adO9ab5FBAg5etT6M=; b=k4rJubrxufXen4eh02Nq+CWZpVr5UlzZTQgl0785cPnHT9wU5VPLAA/+nvYyqyKoixxA7U MTjuVeZuUqV7dklPRO55GuvNXkwCDYTMkqb7Jm9ndAqYCC+c7/+lbA7QWrWURPRks+bDFH F/nTjRWessuuArCmqFZLt7HQWqQ0z9umLFv9TZz2tQUlI/MKsKuP2Wp1qeaWHu9v8XYLN1 XxdNWrwJUW9a8sSZcDhNUUAVEOXKAP33S8h270i/P9ncIHoicCg8XhPKs2cufcVeqfvoeU 5sz9d8fSs2ZwB27jK8Ozb0cp7icK/h26uqAd373upSTR1O1bRNdpHBfiEge5iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748979; a=rsa-sha256; cv=none; b=tK+M7vin5cVwu7zazMgZChjv7kYQ0FoRV8RH6VQ/BlkvaPRHvqTySydSsvXrtjeEc6vwRz ST5EV3xkrKgJdZPh+SF0Ewo1F8IyA0E1SJeYOT14Q0h7VduSPJrFyNRKcXFmceH7C8LrmC Y2ieZL9tjUl4qTjElibpIRRpq3IFMPYp3ly9JbeHFOUC8Gc0Lb9kEdAHGx9rUmca+f1AR/ U+/+KGryc9FVkLUaF2S4la3zwWeDznAeSp9uRFLVu4Jl72WmO1hnpDuwUl9wJBC+aFntdo HDUDLV4yjjX1b9inO1+fwygeEksqJ70V61Kho5TOaVeuG9ZZzThIMl+BgY0Dkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKKv09H8zmfX; Fri, 7 Jul 2023 16:56: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 367GuIZi013817; Fri, 7 Jul 2023 16:56:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GuI1i013816; Fri, 7 Jul 2023 16:56:18 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:56:18 GMT Message-Id: <202307071656.367GuI1i013816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 43e29d03f416 - main - csu: Add the prologue and epilogue to the _init and _fini on aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43e29d03f416d7dda52112a29600a7c82ee1a91e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=43e29d03f416d7dda52112a29600a7c82ee1a91e commit 43e29d03f416d7dda52112a29600a7c82ee1a91e Author: Dmitry Chagin AuthorDate: 2023-07-07 16:54:53 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-07 16:54:53 +0000 csu: Add the prologue and epilogue to the _init and _fini on aarch64 Normally, modern unwinders uses Dwarf information to unwind stack, however in case when the code is not annotated by Dwarf instructions, unwinders fallbacks to a frame-pointer based algorithm. That is allows libunwind to unwind stack from global constructors and destructors. Also it makes gdb happy as it printed nonexistent frame before. Reviewed by: Differential Revision: https://reviews.freebsd.org/D40842 --- lib/csu/aarch64/crti.S | 8 ++++---- lib/csu/aarch64/crtn.S | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/csu/aarch64/crti.S b/lib/csu/aarch64/crti.S index 13e3b74642d8..af10c0f00d7d 100644 --- a/lib/csu/aarch64/crti.S +++ b/lib/csu/aarch64/crti.S @@ -35,14 +35,14 @@ __FBSDID("$FreeBSD$"); .globl _init .type _init,@function _init: - sub sp, sp, #16 - str lr, [sp] + stp x29, x30, [sp, #-16]! + mov x29, sp .section .fini,"ax",@progbits .align 4 .globl _fini .type _fini,@function _fini: - sub sp, sp, #16 - str lr, [sp] + stp x29, x30, [sp, #-16]! + mov x29, sp diff --git a/lib/csu/aarch64/crtn.S b/lib/csu/aarch64/crtn.S index ebb59b710412..c62433537f36 100644 --- a/lib/csu/aarch64/crtn.S +++ b/lib/csu/aarch64/crtn.S @@ -31,14 +31,12 @@ __FBSDID("$FreeBSD$"); .section .init,"ax",@progbits - ldr lr, [sp] - add sp, sp, #16 + ldp x29, x30, [sp], #16 ret .section .fini,"ax",@progbits - ldr lr, [sp] - add sp, sp, #16 + ldp x29, x30, [sp], #16 ret .section .note.GNU-stack,"",%progbits From nobody Fri Jul 7 16:56:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKKw2sFtz4m4Dx; Fri, 7 Jul 2023 16:56: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 4QyKKw2FTHz4SSb; Fri, 7 Jul 2023 16:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4UdtKMexkebzplj/nhp7Ac0du4ZlSYHPuQpQMYF9xM=; b=hooR7dxinvi+Fo/GlIMbiAnvq44IC/u7pR8CpMT3/Woz84Dm1445IV/iJXoQwcNdHYUui1 XtQLiQI/Ce5iaFaEv7mCYaxJvOzn/gXtU9GOdrm4oZwvaqKJXDtk2jmVImk9mb4rqUihf7 7ByaP55BVfp7prG1uvJwkOFsP7jlFOyPPYhMUCo/mftjONS9VD92IGojLYKdD6+m3XclRA 2Fzp77/Wuehtc3nlKrGdIakXiq2YpUQEu6cUVxjb3JRJKTpDLK9D7fibRBxGxoIr/gAVpx x4wSQtOx94CrMryFGFol4c/yr3TsP0TuN9Xmf0G38e+gEIDiWdXWjllhz0d+uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4UdtKMexkebzplj/nhp7Ac0du4ZlSYHPuQpQMYF9xM=; b=jTHeT60pSEN2oeexHzB6eASLudY3Ch8MRWBCTzounFl5I8UpLEOKe8uoFiKkzy7Qq8xBnG bdg9WYShAy3DwLOkv2exb7MPGzPuJQdEkda9bq2gjTL5/7+zLo6yX+u4W1MmhWsd7n1B7H AgHjtiQtDrR65+ljZaN+1h6Cdpbrrlc3nGVG+K9hz0W9Pmu74g1jKXHxVEkciHYJxmY2NZ +CtA993WLWnXkDKiTab03nZAEWVzzxl5qN3PLQB2iSIdcZ53XDei63I5HmJlMUynT9fTt1 mWggSXASue+b29UXPzYugEq+OfPnrU7cAGvSHAPQis23BGRIrB5X/UNSC6QM3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748980; a=rsa-sha256; cv=none; b=N9BBg/XfEQWjEHC0UqBmAC3h3pux5I3+yiILuZVxiVGg31S3YXs9boqXvcOyhRvj0BjNoT bwR9usD9UsThtR8mbHwcIGKZ20S4yJoH8QYpZFFkI+0KTqb/KjICoWKqALb68FE/vOl+Ps nRmIzbiGmZLExkBz41DWUalXQME8SfNUNiJUOe0qNB1aeFEfcltScjnvK+xryGCzr65iW+ vLIscUVwfX5h2Y6zLzDxGLj8QIaQypAI04zoP14SDGvnbfzYeiwrB7jNT5PXAcdptEjYix LgtTNqlD6zP0h1Ns/vp6bNTWioLzGBw4MzGU53hnDFhUAefjN6YCJgmK+3wIvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKKw1JwyzmhW; Fri, 7 Jul 2023 16:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367GuKTk013836; Fri, 7 Jul 2023 16:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GuKfr013835; Fri, 7 Jul 2023 16:56:20 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:56:20 GMT Message-Id: <202307071656.367GuKfr013835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 5645dfb41ae0 - main - rtld: Sligtly optimizing .rtld_start on aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5645dfb41ae0d5ca0acdee8a2a6646787b33e03f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5645dfb41ae0d5ca0acdee8a2a6646787b33e03f commit 5645dfb41ae0d5ca0acdee8a2a6646787b33e03f Author: Dmitry Chagin AuthorDate: 2023-07-07 16:55:08 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-07 16:55:08 +0000 rtld: Sligtly optimizing .rtld_start on aarch64 Use the LDP (load pair registers) instruction to load entry point arguments from the stack. Reviewed by: Differential Revision: https://reviews.freebsd.org/D40843 --- libexec/rtld-elf/aarch64/rtld_start.S | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libexec/rtld-elf/aarch64/rtld_start.S b/libexec/rtld-elf/aarch64/rtld_start.S index 196559d9d2bc..4f0bef0233b0 100644 --- a/libexec/rtld-elf/aarch64/rtld_start.S +++ b/libexec/rtld-elf/aarch64/rtld_start.S @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); ENTRY(.rtld_start) mov x19, x0 /* Put ps_strings in a callee-saved register */ - mov x20, sp /* And the stack pointer */ sub sp, sp, #16 /* Make room for obj_main & exit proc */ @@ -40,11 +39,9 @@ ENTRY(.rtld_start) add x2, x1, #8 /* obj_main */ bl _rtld /* Call the loader */ mov x8, x0 /* Backup the entry point */ + ldp x2, x1, [sp], #16 /* Load cleanup, obj_main */ - ldr x2, [sp] /* Load cleanup */ - ldr x1, [sp, #8] /* Load obj_main */ mov x0, x19 /* Restore ps_strings */ - mov sp, x20 /* Restore the stack pointer */ br x8 /* Jump to the entry point */ END(.rtld_start) From nobody Fri Jul 7 16:56:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKKx3l8Pz4m4C5; Fri, 7 Jul 2023 16:56: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 4QyKKx2ngRz4Spx; Fri, 7 Jul 2023 16:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e6CyAPGGlQK8awn17s+vYTFuuVY6qBNw59NwfCubr8k=; b=KWzJSTUrYYCj5p7NOQ/Dkzw1RM1ohqEolCzZC4eBy0ZdzPbeWfKz93nlqPb3hDINw0C0Jq zl2Pcq3hSZaBtlpN8BKg0pdv+fb5rxqYAVQda0gg/EKrvkA7ddLdn5GxkliS1cuzKnVQaC neFFu0rgfE+sEtMzRFUaQqTHTtAGH9pY9yHRmpIYZU8185iDnjUzLnkR6xT6PhXZhb4GvQ 00s+9a7RWiU+bkD152AFm6dQsFzQtOnKmuWmQBEvfDNZJbys8pmkGPE2NB5znDHjYMMPS2 HVvGXgfdSSmUAvZhTHqMExRj/un0gTVkZ8Ofy6pAmitNAXk2TfDmge2BjjxzyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e6CyAPGGlQK8awn17s+vYTFuuVY6qBNw59NwfCubr8k=; b=W6xZ8emdOO3UCuVdoSIzEsEy4GyIb1Ob6TU41s4PU063ZC7RBBOx2VKuAdXge6cO0pLWZU 33MeFBBzw3J+K0U3rKXA/XgGIp6B5IdznBuR9nqRy3XJvWpkAxgkJwq4jLGp/3NKCYJ28R uo0kpjTa+ASXt6KcvfOluqqTmRGF012b2BydrFAvWkmVqb3WPTS6fMwkGbAIGuwHscMOBd e+CLRDvRvjlm0KxYB1xCjeYieMxVlWdce367PS8hqYhK1b+j4aIomT/ChMJqAQ5LkLS/Rr ovz5MjoOZt3hdJXQSxv0AS5/WRLlpC8dz4gDmI/K9v5NcvaUM0j6/7t0s7FWhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748981; a=rsa-sha256; cv=none; b=G55M7sIRMxa8y91D04psm8NMX/v8VjVqP9b5UwnFzYEeMdQph+ILycE+frvnsG5Hvs6QX1 EQy9a7pvcfz1dYWTpdwBSBMTp6jFkWstRBOFbjUc2EAcqeR1lZLipVcFlLhhg1NrILUjuC BI6fUfjANLA2a0qfH7jZLFii4Jwqpkl8xlNIo+GCQIM/NxXW7h/cnrl75kOtZUVeK/dVjj x48Tgs4NVdF5Tg3mXFigt+Dc/9qm9oHke67wcTooLOfExCwDeBHx17CUGDzNs/aG0mCePw K4mWfCSrN6J7/u6ntDbS61/3P+dNlLKWOKBvFgR1B4bTD78s6hvH9Elit9QMDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKKx1svHzm08; Fri, 7 Jul 2023 16:56: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 367GuLOD013862; Fri, 7 Jul 2023 16:56:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GuLEI013861; Fri, 7 Jul 2023 16:56:21 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:56:21 GMT Message-Id: <202307071656.367GuLEI013861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: ac7759f54574 - main - rtld: Annotate .rtld_start on aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac7759f54574ceb9da48829fd09ea6545404bdc0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=ac7759f54574ceb9da48829fd09ea6545404bdc0 commit ac7759f54574ceb9da48829fd09ea6545404bdc0 Author: Dmitry Chagin AuthorDate: 2023-07-07 16:55:28 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-07 16:55:28 +0000 rtld: Annotate .rtld_start on aarch64 1. Add a stop indicator to rtld_start to satisfy unwinders on aarch64: The right unwinding stop indicator should be CFI-undefined PC. https://dwarfstd.org/doc/Dwarf3.pdf - page 118: If a Return Address register is defined in the virtual unwind table, and its rule is undefined (for example, by DW_CFA_undefined), then there is no return address and no call address, and the virtual unwind of stack activations is complete. 2. Add a proper annotations for CFA. That is allows gdb and libunwind successfully stop when unwinding stack from global constructors and destructors. Reviewed by: Differential Revision: https://reviews.freebsd.org/D40844 --- libexec/rtld-elf/aarch64/rtld_start.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libexec/rtld-elf/aarch64/rtld_start.S b/libexec/rtld-elf/aarch64/rtld_start.S index 4f0bef0233b0..107920548432 100644 --- a/libexec/rtld-elf/aarch64/rtld_start.S +++ b/libexec/rtld-elf/aarch64/rtld_start.S @@ -31,15 +31,18 @@ __FBSDID("$FreeBSD$"); ENTRY(.rtld_start) + .cfi_undefined x30 mov x19, x0 /* Put ps_strings in a callee-saved register */ sub sp, sp, #16 /* Make room for obj_main & exit proc */ + .cfi_adjust_cfa_offset 16 mov x1, sp /* exit_proc */ add x2, x1, #8 /* obj_main */ bl _rtld /* Call the loader */ mov x8, x0 /* Backup the entry point */ ldp x2, x1, [sp], #16 /* Load cleanup, obj_main */ + .cfi_adjust_cfa_offset 0 mov x0, x19 /* Restore ps_strings */ br x8 /* Jump to the entry point */ From nobody Fri Jul 7 16:56:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKKy4DNJz4m44B; Fri, 7 Jul 2023 16:56: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 4QyKKy3Lw4z4Sqf; Fri, 7 Jul 2023 16:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BPcNy+m3/fzgl9jTmDQBiqkqjVNFvL/G4S+XHT/6I9c=; b=KNSsitdn0YhVCFkftvbuI9PezXJXAADXZVXnF+UtQOA/A6Ws/GxYWhZV33WmYPgaY7yC2T nisblOZmUthvEyczxpcwuNcJGL9iURjFpSj28hIHuQ88AnCa044eVUoQjjVlLAEfu1C/nl KVGbc2P+2E75lR5k+k7HVeLpGKl35iZYa5pdepqHLLJfmTrwmd7BsUhUMeFi5m/HJ8+8Za i3QItnsKgKM4O/LGUFU+49CZhcAFBTLi7mdrx/FC0yBf+SIND5kj6o04c7QvU2bznxD4b1 XZ5m9pRfVaB3WpBNmqeBRznT329JUFM/laqNamIQKn22NKuNWqtlHJIeaSQHbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BPcNy+m3/fzgl9jTmDQBiqkqjVNFvL/G4S+XHT/6I9c=; b=X8C5BvH1eHJkWI377d74M8N78U3oYLp/ZcAGb0LZLGePe7HgLu1xPezS1KDcX+W92M0NVD Enla0Ogxnf5zLTixblhZqjG7xTIyyAJKx6Fmb+kYbOPIogtHScVFBzbsnh9sv7/uT/a53D J+rrU+NBQfd6rr1LaPB2hDlLf31oD/WJ5P281VjQJ5Q/epJ+E6CyPuhO/VUXxRazM4QxXY VQGOliUeshjZ3dnaKjqpE5vEsAjSE8oyjQuO1HzcsTpOmx6mMw5afG/OH4oHsq9eA1nZE+ 5Yiwci+xCFoBiQ7DK6wWVgY9K5xl9o87Cb+vPrVm9EeeIfXYPVe3NkMP4qVVDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748982; a=rsa-sha256; cv=none; b=ir8m92ZPi9Oo/l7gQaMS3OgMSHhyTALJLbbM3NAMWR39fQNwoiTRPNHV6NICkp5YBPxC4R 31/SCkreLsyph5Ei9KwiBSU49lqsM/KRjgOnGO4JBzT7Fua1t2+6tx+emtaRdZ/y4Le7IE lKg/XV3jxg4Ex4AUVxeVjtKRXOKa5vyhJE3Jgi2KyJJ4mbnboXLzE1BfEgzqV5pGvFv1Eb TIIXUhZx3SKWjAeSCBUjgx+m0oyXPAFyQAJKKOumTYSz6eT36ONFFkouYDebwYE0FZ5VTj cmo4R1nrfN8xfmMDCFRBp0UTmSR+7c2BINAcaakwotz39UoHZteSFNKmpD0Z0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKKy2S3Dzm09; Fri, 7 Jul 2023 16:56: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 367GuMW8013881; Fri, 7 Jul 2023 16:56:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GuM3H013880; Fri, 7 Jul 2023 16:56:22 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:56:22 GMT Message-Id: <202307071656.367GuM3H013880@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 1a2aa2ffb502 - main - rtld: Clear x29 and lr for thread_start to conform Aarch64 ABI pcs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a2aa2ffb502403dc1f087722d1482c3c6e8d12b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1a2aa2ffb502403dc1f087722d1482c3c6e8d12b commit 1a2aa2ffb502403dc1f087722d1482c3c6e8d12b Author: Dmitry Chagin AuthorDate: 2023-07-07 16:55:43 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-07 16:55:43 +0000 rtld: Clear x29 and lr for thread_start to conform Aarch64 ABI pcs Strictly speaking, SYS V Aarch64 ABI does not states that lr should be cleared, however gdb relies on lr and tryes to unwind stack further. Reviewed by: Differential Revision: https://reviews.freebsd.org/D40841 --- sys/arm64/arm64/vm_machdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index e111995f09b0..7d6e83eb078d 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -223,6 +223,8 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->tf_sp = STACKALIGN((uintptr_t)stack->ss_sp + stack->ss_size); tf->tf_elr = (register_t)entry; tf->tf_x[0] = (register_t)arg; + tf->tf_x[29] = 0; + tf->tf_lr = 0; } int From nobody Fri Jul 7 16:56:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKKz59nLz4m4L4; Fri, 7 Jul 2023 16:56: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 4QyKKz41bdz4SpY; Fri, 7 Jul 2023 16:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G40TimGsZZCLCjQB60gMp4qpThRxM7Rui8XzA/Oh7CY=; b=Qh4rYoXz4xCUdTphouiasoLStd7rFJPS92y9zUMGrO7YlhHCCHUJzXgK96tczsMEx7Wrw3 gaAvntp/XUcHNj+5FQIeXRyWGhfQQ0IWsdaC97lPVWg9b1iUogIsW/reC5zucuygqlCt2Q 6MtRO+qDZvaaPmvhNIgvSDRGMe5TsgKfCnP4dBexDJOVCkEGsO3sactmA9Hl2sN2A4yjaF Sn72xs0H/EdnYk1+GP7VTADTJLSXg8CICGgcka+ak4xzOrp7vg1zBLBeZn/2U3xB5ASZnx CyNfE6tW9+4qLotsYX7aM0AXV9lHyY5kpW27mKE5p3RkZxlhXMMy0ZATwjhvjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G40TimGsZZCLCjQB60gMp4qpThRxM7Rui8XzA/Oh7CY=; b=HMOvXYVdOUYKZTgNbkbfQUd3WNig7o4yE65cU+QOIWuKi37mrNP3YTjHJ4K3ffxuEUr2b3 pBrlLiqQhp5UkpweZ1UNrWbaEn6+hOUS37hmtdmBup72FnmWz6AXxKTxJwyUjcVl9IAckz jHf80Dl0IfIhdVJkb9vcbdcBdofNUKGg3OE/qP2PS/eUcz2FaA71Nm60BikiTvb2VIJyya chAJsgyAoxL7GACCBXm4TIHS/l1bJF51hFfnEG1dqTIsy7ukdyisJpVNX1x43q50QAxHmu YjlOo61Ze6/I6mtSe+EFnxavHH5YzH6KxA4HyMNQWJnKNkOqhvdU77yPyzHOeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748983; a=rsa-sha256; cv=none; b=PIp/Gc7Qu1EtezHds1oyiD4vXKqPjrh71S+Rb4ykLN6SNvndfcZ2Z2FRdFbR9aUMdmlBjs H37tie71v6UiESAWo/vfoIKMjHSf+QtGKMoRL2FdYZdlsk6dK3nb+p1uycGNO6tm113FQb HetAY5E/dTON3kWioXEneVs/tDQ8pWyKCvHbnSiEfpR8qHkajsRBBHDMsaLO1utSQNYtM2 +dyjeN2EHnf8da31SeKgkYhY8Q8CT1dZkb/qc6KEBIdhB3B+ZrAi1jASP2MEiW7PwO44oA 4wy7lNTGDEKP2BpKOoLPUFZNhV/1LgK29pdiC+HwBMFcqfIjTudukhl0/bWTuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyKKz30N2zmLv; Fri, 7 Jul 2023 16:56: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 367GuNXZ013900; Fri, 7 Jul 2023 16:56:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GuNr7013899; Fri, 7 Jul 2023 16:56:23 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:56:23 GMT Message-Id: <202307071656.367GuNr7013899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: bae6bb0698ee - main - csu: Implement _start using as to satisfy unwinders on aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bae6bb0698ee727df601e4418153787b5b4b0c9d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=bae6bb0698ee727df601e4418153787b5b4b0c9d commit bae6bb0698ee727df601e4418153787b5b4b0c9d Author: Dmitry Chagin AuthorDate: 2023-07-07 16:56:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-07 16:56:02 +0000 csu: Implement _start using as to satisfy unwinders on aarch64 The right unwinding stop indicator should be CFI-undefined PC. https://dwarfstd.org/doc/Dwarf3.pdf - page 118: If a Return Address register is defined in the virtual unwind table, and its rule is undefined (for example, by DW_CFA_undefined), then there is no return address and no call address, and the virtual unwind of stack activations is complete. Reviewed by: Differential Revision: https://reviews.freebsd.org/D40623 --- lib/csu/aarch64/Makefile | 3 ++- lib/csu/aarch64/crt1_c.c | 15 --------------- lib/csu/aarch64/crt1_s.S | 24 +++++++++++++++++++++++- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/lib/csu/aarch64/Makefile b/lib/csu/aarch64/Makefile index d8d0d3fd8f99..72be8b70ef19 100644 --- a/lib/csu/aarch64/Makefile +++ b/lib/csu/aarch64/Makefile @@ -4,6 +4,7 @@ CFLAGS+= -I${.CURDIR} -CRT1OBJS+= crt1_s.o +CRT1SRC= crt1_s.S +CRT1OBJ= crt1_c.o .include diff --git a/lib/csu/aarch64/crt1_c.c b/lib/csu/aarch64/crt1_c.c index 7f4fea37ba1a..095c798046b4 100644 --- a/lib/csu/aarch64/crt1_c.c +++ b/lib/csu/aarch64/crt1_c.c @@ -32,19 +32,4 @@ #include __FBSDID("$FreeBSD$"); -#include "libc_private.h" #include "csu_common.h" - -void __start(int, char **, char **, void (*)(void)) __dead2; - -/* The entry function. */ -void -__start(int argc, char *argv[], char *env[], void (*cleanup)(void)) -{ -#ifdef GCRT - __libc_start1_gcrt(argc, argv, env, cleanup, main, &eprol, &etext); -__asm__("eprol:"); -#else - __libc_start1(argc, argv, env, cleanup, main); -#endif -} diff --git a/lib/csu/aarch64/crt1_s.S b/lib/csu/aarch64/crt1_s.S index 65803c8246ae..17ed74531675 100644 --- a/lib/csu/aarch64/crt1_s.S +++ b/lib/csu/aarch64/crt1_s.S @@ -32,13 +32,35 @@ #include __FBSDID("$FreeBSD$"); + /* + * The program entry point + * void _start(char **ap, void (*cleanup)(void)) __dead2 + */ ENTRY(_start) + .cfi_undefined x30 mov x3, x2 /* cleanup */ add x1, x0, #8 /* load argv */ ldr x0, [x0] /* load argc */ add x2, x1, x0, lsl #3 /* env is after argv */ add x2, x2, #8 /* argv is null terminated */ - b __start +#ifdef PIC + adrp x4, main + add x4, x4, :lo12:main +#else + ldr x4, =main +#endif +#ifdef GCRT + ldr x5, =eprol + ldr x6, =etext + /* + * __libc_start1_gcrt(argc, argv, env, cleanup, main, &eprol, &etext) + */ + bl __libc_start1_gcrt +eprol: +#else + /* __libc_start1(argc, argv, env, cleanup, main) */ + bl __libc_start1 +#endif END(_start) .section .note.GNU-stack,"",@progbits From nobody Fri Jul 7 17:04:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyKWM1vKJz4m5wt; Fri, 7 Jul 2023 17:04:31 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyKWL2vpDz4Vg6; Fri, 7 Jul 2023 17:04:30 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 367H4MVu031730; Fri, 7 Jul 2023 20:04:22 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 367H4MPe031729; Fri, 7 Jul 2023 20:04:22 +0300 (MSK) (envelope-from dchagin) Date: Fri, 7 Jul 2023 20:04:22 +0300 From: Dmitry Chagin To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e8404a72c5df - main - vgapci: Don't create a drm helper Message-ID: References: <202307061726.366HQj28081856@gitrepo.freebsd.org> <40907bee-2ccd-d53f-9e38-4f21bed45620@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <40907bee-2ccd-d53f-9e38-4f21bed45620@FreeBSD.org> X-Rspamd-Queue-Id: 4QyKWL2vpDz4Vg6 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, Jul 06, 2023 at 10:35:05AM -0700, John Baldwin wrote: > On 7/6/23 10:26 AM, Dmitry Chagin wrote: > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e8404a72c5df939cd9ad869b12cf038c6846440a > > > > commit e8404a72c5df939cd9ad869b12cf038c6846440a > > Author: Dmitry Chagin > > AuthorDate: 2023-07-06 17:26:24 +0000 > > Commit: Dmitry Chagin > > CommitDate: 2023-07-06 17:26:24 +0000 > > > > vgapci: Don't create a drm helper > > Simply speaking, being started the drm-kmod driver should create sysfs helpers, > > which is «drm» class devices, with the unit number 0, 128 and, perhaps 64. > > If a drm helper created by vgapci driver with the corresponding unit number > > exists then the drm-kmod driver initialize it by the device_initialize() lkpi > > method, otherwise drm-kmod driver create new «drm» device. > > For hw, where two or more different GPU installed, it's not guaranteed that > > the order of loading GPU drivers will be the same as the vgapci devices numbered. > > I.e., on hw where vgapci0 is Nvidia GPU and vgapci1 is Intel GPU, when drm-kmod > > loaded first it will use drm0 helper of vgapci0 device. > > There is no problem for drm-kmod driver unless we do not traverse device > > tree, as needed for https://reviews.freebsd.org/D38545. > > drm-kmod is ok for this change as it has fallback to create corresponding > > drm device. > > Reviewed by: > > Differential Revision: https://reviews.freebsd.org/D38546 > > --- > > sys/dev/pci/vga_pci.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c > > index 12a4057a474c..64847d37f0f6 100644 > > --- a/sys/dev/pci/vga_pci.c > > +++ b/sys/dev/pci/vga_pci.c > > @@ -373,8 +373,7 @@ vga_pci_attach(device_t dev) > > bus_generic_probe(dev); > > - /* Always create a drm child for now to make it easier on drm. */ > > - device_add_child(dev, "drm", -1); > > + /* Always create a drmn child for now to make it easier on drm. */ > > device_add_child(dev, "drmn", -1); > > bus_generic_attach(dev); > > Ideally drm and drmn drivers would use identify routines called by bus_generic_probe > above to add devices instead of depending on these device_add_child calls, and > the device_add_child calls should really just go away. > > That is to say, it would be nice to remove the drmnX device_add_child, too. Agreed, I'll check Nvidia and drm-kmod > > -- > John Baldwin From nobody Fri Jul 7 17:52:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyLbL5nd3z4l4CW; Fri, 7 Jul 2023 17:53:02 +0000 (UTC) (envelope-from kp@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 4QyLbL5NXXz3BmY; Fri, 7 Jul 2023 17:53:02 +0000 (UTC) (envelope-from kp@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688752382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2waaWwZcI6o9hr8rw1zusH9+HGYIR2bmqbo4a0oPs+g=; b=KRIb2+uOFv2J/AnNOiOMnF/z7C2ORbxpvEWoAF/0R24cqehaDRH+YI1/pCuisKWEyeHNOU k85yj7oBz3sLFwqIPXZygQVrdlMY7RBlNF5ET14LcRAb7RwpAtFjndhy9ipoPwty20hCPO C/2SsmArTTlyjzyF++A73LLYrkR76Jc8J90z0c5yBAUSU6hyrQuPkUzcjFSV8aTsGlc8iQ xZpJUlIhhHrGWf2UeQzsxGVmZu3//8PIIEvxLsJtUgDp/7pYJcC28onq67/hWEMOxq0HJN hsFHvpJ4QWEwqg+0tvuVjzWQ3OcQ4qgf4bn9zRwCrMP8LyNeyQZJkJqKIJTObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688752382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2waaWwZcI6o9hr8rw1zusH9+HGYIR2bmqbo4a0oPs+g=; b=NQWnBSpy+sd0v6poFLagyKrsfedUshGv/JEbxzPvjEyhoVpTCtDX/b9h51g6H3TjGUuGg+ PElGLmAKXBZ/geRrgoRJU9ShkVptMAMJ3ccXqy60vvOxgv0a/XeOKS25jO8CgG4p34vGhq FRqqor3IPlx8y0Vt0b2oLVwzCZEU1lbqCwyol1M33PcoCiDUQkQvQAFm8AKrdNxYaw2E3i YCupqD/MQh3B2ke2FAfv+nB8rwrpwjZYboNAB5TP4e8M1xbEo7g8BdiPQwlfdooGK+84vL ltb+akCjFOHQhn43aFp46dXoDmh47bVSRMbNsknqhmdoYRsD80NjK8ThTDPw/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688752382; a=rsa-sha256; cv=none; b=j9q5LRxHvdga0KXK/Zof8NTMWVJua29ImYHJc3NKIeBnYguYECkPoNoiLcq4t1BD4XsEbH qVSVbkHnhMiMySGGFgB2H/IOvDltovjuGqSogmtEAoF6PdLM1GdMM6FhZt8xl9C233epsq 0DUrSKuAWpPXs1V7ZcKAiWg3E61V7OC1hgNx99CRTj42OXXBGhwkOO2Rwoukv1vJlF4RLG uTGinrc5tTy08Z01u7x2kpfo2LTuGqP5NNfALrKGoyBDSPNTp8vJTHv9NJ4uEqol8HA7CL Mcu2KQbi372w6AEPnmxcL2QXbAhRdBifRGIzwyJ4TwGRRU8dO7qsqyIluOgwgA== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher 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 "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QyLbL3rh8znL7; Fri, 7 Jul 2023 17:53:02 +0000 (UTC) (envelope-from kp@freebsd.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 2A280316B4; Fri, 7 Jul 2023 19:53:00 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Kristof Provost List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (1.0) Subject: Re: git: b077aed33b7b - main - Merge OpenSSL 3.0.9 Date: Fri, 7 Jul 2023 19:52:48 +0200 Message-Id: <6EF29DA8-B987-4C98-826C-0128C43764C6@freebsd.org> References: Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Pierre Pronchery In-Reply-To: To: Mark Johnston X-Mailer: iPhone Mail (21A5277h) X-ThisMailContainsUnwantedMimeParts: N > On 7 Jul 2023, at 18:35, Mark Johnston wrote: >=20 > =EF=BB=BFOn Wed, Jul 05, 2023 at 11:56:42PM +0200, Kristof Provost wrote: >>> On 24 Jun 2023, at 1:19, Ed Maste wrote: >>> The branch main has been updated by emaste: >>>=20 >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Db077aed33b7b6aefca7b17ddb= 250cf521f938613 >>>=20 >>> commit b077aed33b7b6aefca7b17ddb250cf521f938613 >>> Merge: b08ee10c0646 b84c4564effd >>> Author: Pierre Pronchery >>> AuthorDate: 2023-06-23 22:53:35 +0000 >>> Commit: Ed Maste >>> CommitDate: 2023-06-23 22:53:36 +0000 >>>=20 >>> Merge OpenSSL 3.0.9 >>>=20 >>=20 >> It looks like we missed adding a file. >> Security/opensc doesn=E2=80=99t build any more: >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270076 >>=20 >> It fails to find d2i_KeyParams when linking. The opensc code does this: >>=20 >> #if OPENSSL_VERSION_NUMBER < 0x30000000L >> if (!d2i_ECParameters(&ec, &a, (long)l= en)) >> util_fatal("cannot parse >> EC_PARAMS"); >> EVP_PKEY_assign_EC_KEY(pkey, ec); >> #else >> if (!d2i_KeyParams(EVP_PKEY_EC, &pkey,= &a, >> len)) >> util_fatal("cannot parse >> EC_PARAMS"); >> #endif >>=20 >> d2i_KeyParams() appears to be new on openssl 3. It=E2=80=99s defined in d= 2i_param.c, >> which we don=E2=80=99t build. I=E2=80=99ve tested with this patch, and th= at appears to fix >> things: >=20 > Hi Kristof, >=20 > Would you mind posting the patch on phabricator? I can take a closer > look in the next day, and Pierre might be available to look as well. Sure, but I might not be able to do that until Sunday afternoon.=20 >=20 >> diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Make= file >> index 28258e796984..ef5652e8c27c 100644 >> --- a/secure/lib/libcrypto/Makefile >> +++ b/secure/lib/libcrypto/Makefile >> @@ -74,7 +74,7 @@ SRCS+=3D n_pkey.c nsseq.c p5_pbe.c p5_pbev2.c= >> p5_scrypt.c p8_pkey.c >> SRCS+=3D t_bitst.c t_pkey.c t_spki.c tasn_dec.c tasn_enc.c tasn_fre.c= >> SRCS+=3D tasn_new.c tasn_prn.c tasn_scn.c tasn_typ.c tasn_utl.c x_alg= or.c >> SRCS+=3D x_bignum.c x_info.c x_int64.c x_long.c x_pkey.c x_sig.c x_sp= ki.c >> -SRCS+=3D x_val.c >> +SRCS+=3D x_val.c d2i_param.c >>=20 >> # async >> SRCS+=3D async.c async_err.c async_posix.c async_wait.c >> diff --git a/secure/lib/libcrypto/Version.map >> b/secure/lib/libcrypto/Version.map >> index 421819324961..74d0b8b3cef1 100644 >> --- a/secure/lib/libcrypto/Version.map >> +++ b/secure/lib/libcrypto/Version.map >> @@ -3564,6 +3564,8 @@ OPENSSL_1_1_0 { >> d2i_IPAddressOrRange; >> d2i_IPAddressRange; >> d2i_ISSUING_DIST_POINT; >> + d2i_KeyParams; >> + d2i_KeyParams_bio; >=20 > Based on your analysis I think this should go into the OPENSSL_3_0_9 > namespace? >=20 I have no idea. I=E2=80=99ll try to dig a bit, but we=E2=80=99re pretty far o= utside my comfort zone here.=20 Best regards, Kristof >=20 >=20 From nobody Fri Jul 7 17:59:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyLlG0YHHz4l5hJ for ; Fri, 7 Jul 2023 17:59:54 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyLlF5x0Yz3F4b for ; Fri, 7 Jul 2023 17:59:53 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-3fbc656873eso27459975e9.1 for ; Fri, 07 Jul 2023 10:59:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688752792; x=1691344792; 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=7ndXPBcia3gI1RNYT3jPzR6yIteT0dopvDBiYQ6dv3A=; b=jqOLgZz4C47OeAzYAsWUYZtasOcHZh7LRr/p0Y9d4MyzGV2yCN5YgVly/ZC5ctfE/v PtiN1X7Y7l2Kss6edrmsAFJ8lmWViFrqBptuZAVE203cE+rGEIFKCvxHlQKyI2QllO1u EXSbs5mZLa519HzZK+szY4VH0/Y06X8Sk5qU8R+0j1P4UzSHcD11O4iZouZTNrRP3gQJ S9uls8RS9TAZeLrySLNzO1CO9z3eyi2RDU7ZjnIlDwzrLMmw/1MVxjKvqmEygqIyco9y pHiTbAeKMVQfsY4gOIdmWls9YvIlRwtq1Y6x9XB2lTlr/ZbPPl1CLOexQKbVko7BMD2Y LfsQ== X-Gm-Message-State: ABy/qLY6e3NfpbTN4w1rvt2MwEHFj3XH3zy8Zd1V7+mnrdEVoXrUD7dS L2azcEEXxCNsSUonwUTHGfkCRQ== X-Google-Smtp-Source: APBJJlFzmu5R1T9NBK74lzuPugNAhb0c0iV21DQKbdmdcupneG8dJJVYFR2ZSTnCu862Hb+bqsMO1A== X-Received: by 2002:adf:ea10:0:b0:314:77a:c2b9 with SMTP id q16-20020adfea10000000b00314077ac2b9mr6244348wrm.39.1688752792107; Fri, 07 Jul 2023 10:59:52 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id p5-20020adff205000000b003062b2c5255sm5005982wro.40.2023.07.07.10.59.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jul 2023 10:59:51 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 034c0856018c - main - modules: fix freebsd32_modstat on big endian platforms From: Jessica Clarke In-Reply-To: <202307070424.3674OBaa074389@gitrepo.freebsd.org> Date: Fri, 7 Jul 2023 18:59:41 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202307070424.3674OBaa074389@gitrepo.freebsd.org> To: Ka Ho Ng X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4QyLlF5x0Yz3F4b X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 7 Jul 2023, at 05:24, Ka Ho Ng wrote: >=20 > The branch main has been updated by khng: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D034c0856018ccf73c0f2d6140825f3ed= f43f47b2 >=20 > commit 034c0856018ccf73c0f2d6140825f3edf43f47b2 > Author: Ka Ho Ng > AuthorDate: 2023-07-07 04:21:01 +0000 > Commit: Ka Ho Ng > CommitDate: 2023-07-07 04:22:59 +0000 >=20 > modules: fix freebsd32_modstat on big endian platforms >=20 > The layout of modspecific_t on both little endian and big endian = are as > follows: > |0|1|2|3|4|5|6|7| > +-------+-------+ > |uintval| | > +-------+-------+ > |ulongval | > +-------+-------+ >=20 > For the following code snippet: > CP(mod->data, data32, longval); > CP(mod->data, data32, ulongval); > It only takes care of little endian platforms that it truncates the > highest 32bit automatically. However on big endian platforms it = takes > the highest 32bit instead. This eventually returns a garbage = syscall > number to the 32bit userland. This fixes the case where uintval is the active member, but breaks the case where ulongval is the active member, since it=E2=80=99ll take bytes = 0, 1, 2 and 3 which are the high bytes for BE, not the low bytes. This is an intrinsic issue with BE; LE is very permissive when you access the wrong union member for different-width integer types, but BE is not and you have to access the right one. How does userspace know which member to access, anyway? The kernel needs to repeat that and copy the right member based on that information, otherwise it is inherently impossible to have both cases work on BE. > Since modspecific_t's usage currently is for the use of syscall = modules, > we only initialize modspecific32_t with uintval. Is this saying that uintval is always the active member, never ulongval? If so, there need to be comments, both in freebsd32_modstat to justify this and on the type to say =E2=80=9CDO NOT USE = (u)longval=E2=80=9D, otherwise there is a significant risk someone will start using (u)longval and we=E2=80=99ll be stuck. Perhaps (u)longval should even be renamed to be ABI-compatibility padding (and aligning). Jess > Now on both BE and LE > 64-bit platforms it always pick up the first 4 bytes. >=20 > Sponsored by: Juniper Networks, Inc. > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D40814 > MFC after: 1 week > --- > sys/kern/kern_module.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c > index 40e47868481c..d4edc64a5ce4 100644 > --- a/sys/kern/kern_module.c > +++ b/sys/kern/kern_module.c > @@ -520,10 +520,9 @@ freebsd32_modstat(struct thread *td, struct = freebsd32_modstat_args *uap) > id =3D mod->id; > refs =3D mod->refs; > name =3D mod->name; > - CP(mod->data, data32, intval); > + _Static_assert(sizeof(data32) =3D=3D sizeof(data32.uintval), > + "bad modspecific32_t size"); > CP(mod->data, data32, uintval); > - CP(mod->data, data32, longval); > - CP(mod->data, data32, ulongval); > MOD_SUNLOCK; > stat32 =3D uap->stat; >=20 From nobody Fri Jul 7 18:52:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyMvm5d2Pz4lMC6; Fri, 7 Jul 2023 18:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyMvm5BSJz3P5D; Fri, 7 Jul 2023 18:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688755940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k2nmsUgTiLXQiaofeGPTYo37MlhYo0DuLDUr5GmPdsY=; b=htnxhY88HTs6BsRz+8xrLwPsLAm8N6zQ2qHyqGg/vT/wHahL2kGPTmkXNutDcraoel+E9x 7i1inPE9bgY4ZkVyQHKu9u2zg8hTGJenYiPE5AkrUke2VXQ+qeLTJARjLDtFiVwmcowg4o bJCiZdaRcvKhpzAHaePNxS426CgH9IhWYvlZUuqAkR6zRNcy+lXypSZU2IsDco/4AtQGzg fNgjmkdrv/V3RXRr5efJLpQq3eA+Mv2K5qa5yJbkPiNflGuMMBHmf15e32yn/qVm241ccw kO4ug9ji0hJsJ/SGW7O0maUYrvzdKlxO8uIAnWnuGzjrst3hTKktJMnjEDcZyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688755940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k2nmsUgTiLXQiaofeGPTYo37MlhYo0DuLDUr5GmPdsY=; b=b7c+QvW1Ty+wPFyySG8nS0UKN4W+RWwrdGTjtHeuen7gNzI+uHtreLjWBw0tXUEr5Gu/ij RbKN+kVsu49XTCDfst6MVT6iXcwT9jMlPcxeTdyPJo0a+HxECY0xlIV/uHp26nP9NI+n+/ 5hDx3Mnz+bRj6dVbEBfyjvfvArPmQiqrXmCtvrsMg3aaPxRp7vruJkZtr6T+M+r+22fKtI lh0KLlJgKOgZ9ppZbGG5pzHalhBuyI2uQF0zIr/O6pzl+t6w4YS7VwBHkHRyzmPImzo0sR Whvj2C+JiQMxvtbWDt9uAT4DCtgrKjG0pk3uDiSPSHiK1EtVfj16I+qdv8JddQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688755940; a=rsa-sha256; cv=none; b=g3GtGknlO6pM3yAaBWq3qVztWm788TNHDDWaKgzxS3NVDHoqZFFZhjoBMbFri2eDnxgWpv ReGDiWJ9IDnIqHDSmKWHkOg6+r106jH5/x/O8hoZSj1Ld7zhh6o+XttHxaisuUnxZ2566w vZmc4bIVPzxDQ0gmaRoKVKDnqSmKj9zYez5GmdMbaProKGyJHr6ZyDToX8WDDzKX4SXvNh X78MoLIxOcJ+F+DSIG8UWMQoHy8WQEDOGxnY5l/6eoeea5f1yY9tu35ov394u/VoZ7HejH i7zU2YPpz/WMWR3tajoSt6ke57R4ZX5VEDSyjSJnGItCRq9BPF5FIEgi+4ksZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyMvm4GrBzqRf; Fri, 7 Jul 2023 18:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367IqKQ4009059; Fri, 7 Jul 2023 18:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367IqKMn009058; Fri, 7 Jul 2023 18:52:20 GMT (envelope-from git) Date: Fri, 7 Jul 2023 18:52:20 GMT Message-Id: <202307071852.367IqKMn009058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e27e9b3ac329 - stable/13 - pseudofs: Fix a potential out-of-bounds access in pfs_lookup() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e27e9b3ac329b8d01c0800de32c735b2363c8862 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e27e9b3ac329b8d01c0800de32c735b2363c8862 commit e27e9b3ac329b8d01c0800de32c735b2363c8862 Author: Mark Johnston AuthorDate: 2023-06-23 13:54:39 +0000 Commit: Mark Johnston CommitDate: 2023-07-07 18:46:08 +0000 pseudofs: Fix a potential out-of-bounds access in pfs_lookup() pseudofs nodes store their name in a flexible array member, so the node allocation is sized using the length of the name, including a nul terminator. pfs_lookup() scans a directory of nodes, comparing names to find a match. The comparison was incorrect and assumed that all node names were at least as long as the name being looked up, which of course isn't true. I believe the bug is mostly harmless since it cannot result in false positive or negative matches from the lookup, but it triggers a KASAN check. Reported by: pho Reviewed by: kib, Olivier Certner MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40692 (cherry picked from commit fc915f1be145a52c53f6f1c37525043216e32bb8) --- sys/fs/pseudofs/pseudofs_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index e0c795ed2a25..5eccc7ac4b43 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -537,8 +537,8 @@ pfs_lookup(struct vop_cachedlookup_args *va) for (pn = pd->pn_nodes; pn != NULL; pn = pn->pn_next) if (pn->pn_type == pfstype_procdir) pdn = pn; - else if (pn->pn_name[namelen] == '\0' && - bcmp(pname, pn->pn_name, namelen) == 0) { + else if (strncmp(pname, pn->pn_name, namelen) == 0 && + pn->pn_name[namelen] == '\0') { pfs_unlock(pd); goto got_pnode; } From nobody Fri Jul 7 18:52:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyMvn6YMBz4lM25; Fri, 7 Jul 2023 18:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyMvn60kmz3P7H; Fri, 7 Jul 2023 18:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688755941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c88FeeHWh3esI8OcVYHR1X9VqZRjvYmNMiHhe0uCXyo=; b=J9ttqgeRAB5e9NMnpzAZAEgvcBOICcFjJGXvM9M63yaHWmKy19n+K2Z64p/IcfQlIqLvFx yXM/d5xPhxPT965LLv4NLYfO4bYkh6MZ1cZtuB++YoJZ1KoVqVWUDzFIqflsLZykQtsRpZ iq0Y/XmWfpXZTUjZAf4yEjC9A0K4o57aR/CLBkfgBgvFfVQOOq/Z4Ruo3yJVmjFhrnOPhW Y0FDeAnHWhGD0U2Ry8YZm4KgjLSs61egl3g1lxzDH+13fyM9oHE7ok5ddsEAS9vmtIvVwF kAhSOdKemFip70ooYEptVjynkSItL2rN/jChqJMwavDXbufftY1LDl5sxSETIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688755941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c88FeeHWh3esI8OcVYHR1X9VqZRjvYmNMiHhe0uCXyo=; b=KYDCfGCosD+r3VHlxOCcXbXRYA6EPbrJM8l41QOrtQNW2b/9roGBagifk7Bns0t0vVxnCp JSMHOyE8eE42wv61PLjPPWRTmpE2PoY8SJ+qjeSr221t/cpVTesgnZWrhr64TMicHWUsj/ MI7BF0/If3aEUt3Zw5o6XJ4Toa+j+7UqnSLeIVZGSMPY19zUMjeMmFFg0IKpJldVfjeVBK tG0ibjyrThsC5LOBMj9OA+/Tbm0K6ID9tX3WvldSFqxp1F2AuT+MaGEXPh9J8z+hNEPfBP v8t8390oRxJC9ROF++ysUdkYXRw3wVty+EOj2q3w07fiE/tDiGYoMgEienwEsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688755941; a=rsa-sha256; cv=none; b=ShYYcyFSrOCRBLhRGmDKpcstBg6IBtPpzM7TYaSWPi6B4MOUiTQhvP9+6G1ym/vqpwtG2Q /Fsgt7BG7LI0DPfbRsIk4FYDHDbaAuqhct2ukDWm70kx/Db0d1W+B+S/HJnoshOGsK3JkQ l6FY1pIyBLu9VnwVhiaSvdHZCnxFuzY7XHXa08ye8Ky7dJI/PODYKPzc3sHnrwX5GMc3wt fk0aLp0GvM2c8b5Wd8R66xQh+ngz1GrSxjZO/2RiDqyIZApJYsEgwf/1S1KjagY7B+GQKm 3GhbrroGqLcQaTVPZXFUlvcAUqCNoxPYDTXxn8F5eobjEh0oGp+ujobip/ODkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyMvn4qXFzq07; Fri, 7 Jul 2023 18:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367IqLDk009080; Fri, 7 Jul 2023 18:52:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367IqLfY009079; Fri, 7 Jul 2023 18:52:21 GMT (envelope-from git) Date: Fri, 7 Jul 2023 18:52:21 GMT Message-Id: <202307071852.367IqLfY009079@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d2681db6434d - stable/13 - netinet tests: Add a test which connects a disconnected socket List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d2681db6434d1d0eb5e6d1e3af07c7b1ff9cb723 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d2681db6434d1d0eb5e6d1e3af07c7b1ff9cb723 commit d2681db6434d1d0eb5e6d1e3af07c7b1ff9cb723 Author: Mark Johnston AuthorDate: 2023-06-23 14:06:13 +0000 Commit: Mark Johnston CommitDate: 2023-07-07 18:46:23 +0000 netinet tests: Add a test which connects a disconnected socket MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit b1c66bc44af099174afb9840c7db011a5bd0225d) --- tests/sys/netinet/socket_afinet.c | 47 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/tests/sys/netinet/socket_afinet.c b/tests/sys/netinet/socket_afinet.c index 985d67d83c99..07fe90704206 100644 --- a/tests/sys/netinet/socket_afinet.c +++ b/tests/sys/netinet/socket_afinet.c @@ -28,9 +28,9 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include +#include #include #include @@ -228,14 +228,57 @@ ATF_TC_BODY(socket_afinet_poll_rdhup, tc) close(ss); } -ATF_TP_ADD_TCS(tp) +ATF_TC_WITHOUT_HEAD(socket_afinet_stream_reconnect); +ATF_TC_BODY(socket_afinet_stream_reconnect, tc) { + struct sockaddr_in sin; + int ss, cs, rc; + + /* + * Make sure that an attempt to connect(2) a connected or disconnected + * stream socket fails with EISCONN. + */ + /* Server setup. */ + ss = socket(PF_INET, SOCK_STREAM, 0); + ATF_CHECK(ss >= 0); + bzero(&sin, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_len = sizeof(sin); + sin.sin_port = htons(6666); + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + rc = bind(ss, (struct sockaddr *)&sin, sizeof(sin)); + ATF_CHECK_EQ(0, rc); + rc = listen(ss, 1); + ATF_CHECK_EQ(0, rc); + + /* Client connects, shuts down. */ + cs = socket(PF_INET, SOCK_STREAM, 0); + ATF_CHECK(cs >= 0); + rc = connect(cs, (struct sockaddr *)&sin, sizeof(sin)); + ATF_CHECK_EQ(0, rc); + rc = shutdown(cs, SHUT_RDWR); + ATF_CHECK_EQ(0, rc); + + /* A subsequent connect(2) fails with EISCONN. */ + rc = connect(cs, (struct sockaddr *)&sin, sizeof(sin)); + ATF_CHECK_EQ(-1, rc); + ATF_CHECK_EQ(errno, EISCONN); + + rc = close(cs); + ATF_CHECK_EQ(0, rc); + rc = close(ss); + ATF_CHECK_EQ(0, rc); +} + +ATF_TP_ADD_TCS(tp) +{ ATF_TP_ADD_TC(tp, socket_afinet); ATF_TP_ADD_TC(tp, socket_afinet_bind_zero); ATF_TP_ADD_TC(tp, socket_afinet_bind_ok); ATF_TP_ADD_TC(tp, socket_afinet_poll_no_rdhup); ATF_TP_ADD_TC(tp, socket_afinet_poll_rdhup); + ATF_TP_ADD_TC(tp, socket_afinet_stream_reconnect); return atf_no_error(); } From nobody Fri Jul 7 18:52:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyMvq0T0Gz4lLyw; Fri, 7 Jul 2023 18:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyMvp6nFNz3PRn; Fri, 7 Jul 2023 18:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688755943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5j7JYIP9skJd3hbLys3oGJQ9SOdrK1R/nkHQuPQyKnQ=; b=vkZHAP5AZi5y9rL4vPLIzIoR0IVo+nbgYnMtAtaFgcAgHMRdPFLZaL9TracfX3YF8Aledv YPImNToJjFDICIjDUpq63zWBQZvt29GATJ2PwLrHKIgYxfBZ4p6OFETLGTAbjgVCc8Tk9h hrliyyuSXdcWchsAjARozmhYpENqVIjUpKizsMVh2bNbqRvuGuOmhYZMZwgnMJeWflKXhl y92Otvdx+9tkscBgq+/AqRFiq0+KS1fVVGiX3p0enZfhf28CyyBEwhzuz4FGHUUaBfyS/U oRUqmbpnLGQqfA35yscwaB1qJ+AWNsQgD6mHgO3OKmZhOCW679NN+PYfN4EdLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688755943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5j7JYIP9skJd3hbLys3oGJQ9SOdrK1R/nkHQuPQyKnQ=; b=egirnvqJNM1dNwjbh3XOTUyZIM1Lxg36VFzNIp2YQlLJmc/Y20uh52ojADz86MCKJHwn+K jbupfqpN3mx0v+5AsGrTQTezMS8kZL5BUpeFjVTlVujMQTKRskrhAAf0/2y6egBQUWWJ0X k6dUBYz98zUtO7jMh3KA2C+b3LaVhIdDrAv3Quni0lje7j61GivKfK3U8NnN7EW6xVKzKW 99I1yecTxnp3x327iLYT0I7p+iKta7bqDpaUPTCkakoANf08Xo6KE8j2XlUu12cN7OZ7My +m25MEnU1GI6Jp7egMNx0X5zmzHexJ6yQiK6di6Q7muX6CWoRKOQEuyOs7OoNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688755943; a=rsa-sha256; cv=none; b=W/p/kiU+SyVKDmLek1juI+A94uz71eHCJqaSO0YlQu7j+KP/LsIgeJD4gbyzAAqFKQhcEK MpIyexB+rL1BL0N9WmEXuf8GlgbyLsN4YSMs2DkqE/EnIqwtJVonw/tKZQlvCCwWz0NxAn 7hyy8GVdhSPRgG5kikEUQWeakemy6izebM6ACwYq+dVKcoRbQ09BbTt/cHkidGW5hn613X yDVj38GVJAhr4V7REy72wK/Cpscip9SfvNetDLBYpf3N3KWJhBZx0KBMuTHywGp1nDViPo VMNILuLqZs369g+f1bwKJbE6uuOzWB9UaZ9D7a0zdZ+7SE/KDulwG4QknGr8Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyMvp5m1Lzph2; Fri, 7 Jul 2023 18:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367IqMjR009099; Fri, 7 Jul 2023 18:52:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367IqMOS009098; Fri, 7 Jul 2023 18:52:22 GMT (envelope-from git) Date: Fri, 7 Jul 2023 18:52:22 GMT Message-Id: <202307071852.367IqMOS009098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: db6978e02401 - stable/13 - netinet6: Implement in6_cksum_partial() using m_apply() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: db6978e02401cc3c1ea6e965fffd2482b1dd6461 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=db6978e02401cc3c1ea6e965fffd2482b1dd6461 commit db6978e02401cc3c1ea6e965fffd2482b1dd6461 Author: Mark Johnston AuthorDate: 2023-06-23 13:55:43 +0000 Commit: Mark Johnston CommitDate: 2023-07-07 18:46:41 +0000 netinet6: Implement in6_cksum_partial() using m_apply() This ensures that in6_cksum_partial() can be applied to unmapped mbufs, which can happen at least when icmp6_reflect() quotes a packet. The basic idea is to restructure in6_cksum_partial() to operate on one mbuf at a time. If the buffer length is odd or unaligned, an extra residual byte may be returned, to be incorporated into the checksum when processing the next buffer. PR: 268400 Reviewed by: cy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40598 (cherry picked from commit 6775ef4188b4d4c023e76ebd2b71fa8c2c7e7cd2) --- sys/netinet6/in6.h | 6 +- sys/netinet6/in6_cksum.c | 300 +++++++++++++++++++++-------------------------- 2 files changed, 139 insertions(+), 167 deletions(-) diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 82f876506f0f..5dd7c13e3272 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -660,10 +660,10 @@ struct ip6_mtuinfo { struct cmsghdr; struct ip6_hdr; +int in6_cksum(struct mbuf *, uint8_t, uint32_t, uint32_t); +int in6_cksum_partial(struct mbuf *, uint8_t, uint32_t, uint32_t, uint32_t); int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); -int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); -int in6_cksum_partial(struct mbuf *, u_int8_t, u_int32_t, u_int32_t, - u_int32_t); + int in6_localaddr(struct in6_addr *); int in6_localip(struct in6_addr *); int in6_ifhasaddr(struct ifnet *, struct in6_addr *); diff --git a/sys/netinet6/in6_cksum.c b/sys/netinet6/in6_cksum.c index c4624b90b6a1..a93db45eb968 100644 --- a/sys/netinet6/in6_cksum.c +++ b/sys/netinet6/in6_cksum.c @@ -82,6 +82,16 @@ __FBSDID("$FreeBSD$"); #define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) #define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; (void)ADDCARRY(sum);} +union l_util { + uint16_t s[2]; + uint32_t l; +}; + +union s_util { + uint8_t c[2]; + uint16_t s; +}; + static int _in6_cksum_pseudo(struct ip6_hdr *ip6, uint32_t len, uint8_t nxt, uint16_t csum) { @@ -131,17 +141,115 @@ _in6_cksum_pseudo(struct ip6_hdr *ip6, uint32_t len, uint8_t nxt, uint16_t csum) int in6_cksum_pseudo(struct ip6_hdr *ip6, uint32_t len, uint8_t nxt, uint16_t csum) { + union l_util l_util; int sum; - union { - u_int16_t s[2]; - u_int32_t l; - } l_util; sum = _in6_cksum_pseudo(ip6, len, nxt, csum); REDUCE; return (sum); } +static int +in6_cksumdata(void *data, int *lenp, uint8_t *residp, int rlen) +{ + union l_util l_util; + union s_util s_util; + uint16_t *w; + int len, sum; + bool byte_swapped; + + KASSERT(*lenp >= 0, ("%s: negative len %d", __func__, *lenp)); + KASSERT(rlen == 0 || rlen == 1, ("%s: rlen %d", __func__, rlen)); + + len = *lenp; + sum = 0; + + if (len == 0) { + len = rlen; + goto out; + } + + byte_swapped = false; + w = data; + + /* + * Do we have a residual byte left over from the previous buffer? + */ + if (rlen == 1) { + s_util.c[0] = *residp; + s_util.c[1] = *(uint8_t *)w; + sum += s_util.s; + w = (uint16_t *)((uint8_t *)w + 1); + len--; + rlen = 0; + } + + /* + * Force to even boundary. + */ + if ((1 & (uintptr_t)w) && len > 0) { + REDUCE; + sum <<= 8; + s_util.c[0] = *(uint8_t *)w; + w = (uint16_t *)((uint8_t *)w + 1); + len--; + byte_swapped = true; + } + + /* + * Unroll the loop to make overhead from branches &c small. + */ + while ((len -= 32) >= 0) { + sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; + sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; + sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11]; + sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15]; + w += 16; + } + len += 32; + while ((len -= 8) >= 0) { + sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; + w += 4; + } + len += 8; + if (len == 0 && !byte_swapped) + goto out; + REDUCE; + while ((len -= 2) >= 0) { + sum += *w++; + } + if (byte_swapped) { + REDUCE; + sum <<= 8; + if (len == -1) { + s_util.c[1] = *(uint8_t *)w; + sum += s_util.s; + } else /* len == -2 */ + *residp = s_util.c[0]; + len++; + } else if (len == -1) + *residp = *(uint8_t *)w; +out: + *lenp = len & 1; + return (sum); +} + +struct in6_cksum_partial_arg { + int sum; + int rlen; + uint8_t resid; +}; + +static int +in6_cksum_partial_one(void *_arg, void *data, u_int len) +{ + struct in6_cksum_partial_arg *arg = _arg; + + arg->sum += in6_cksumdata(data, &len, &arg->resid, arg->rlen); + arg->rlen = len; + return (0); +} + /* * m MUST contain a contiguous IP6 header. * off is an offset where TCP/UDP/ICMP6 header starts. @@ -150,33 +258,29 @@ in6_cksum_pseudo(struct ip6_hdr *ip6, uint32_t len, uint8_t nxt, uint16_t csum) * cov is the number of bytes to be taken into account for the checksum */ int -in6_cksum_partial(struct mbuf *m, u_int8_t nxt, u_int32_t off, - u_int32_t len, u_int32_t cov) +in6_cksum_partial(struct mbuf *m, uint8_t nxt, uint32_t off, uint32_t len, + uint32_t cov) { + struct in6_cksum_partial_arg arg; + union l_util l_util; + union s_util s_util; struct ip6_hdr *ip6; - u_int16_t *w, scope; - int byte_swapped, mlen; + uint16_t *w, scope; int sum; union { - u_int16_t phs[4]; + uint16_t phs[4]; struct { - u_int32_t ph_len; - u_int8_t ph_zero[3]; - u_int8_t ph_nxt; + uint32_t ph_len; + uint8_t ph_zero[3]; + uint8_t ph_nxt; } __packed ph; } uph; - union { - u_int8_t c[2]; - u_int16_t s; - } s_util; - union { - u_int16_t s[2]; - u_int32_t l; - } l_util; /* Sanity check. */ KASSERT(m->m_pkthdr.len >= off + len, ("%s: mbuf len (%d) < off(%d)+" "len(%d)", __func__, m->m_pkthdr.len, off, len)); + KASSERT(m->m_len >= sizeof(*ip6), + ("%s: mbuf len %d < sizeof(ip6)", __func__, m->m_len)); /* * First create IP6 pseudo header and calculate a summary. @@ -193,7 +297,7 @@ in6_cksum_partial(struct mbuf *m, u_int8_t nxt, u_int32_t off, /* IPv6 source address. */ scope = in6_getscope(&ip6->ip6_src); - w = (u_int16_t *)&ip6->ip6_src; + w = (uint16_t *)&ip6->ip6_src; sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; if (scope != 0) @@ -201,158 +305,26 @@ in6_cksum_partial(struct mbuf *m, u_int8_t nxt, u_int32_t off, /* IPv6 destination address. */ scope = in6_getscope(&ip6->ip6_dst); - w = (u_int16_t *)&ip6->ip6_dst; + w = (uint16_t *)&ip6->ip6_dst; sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; if (scope != 0) sum -= scope; /* - * Secondly calculate a summary of the first mbuf excluding offset. + * Loop over the rest of the mbuf chain and compute the rest of the + * checksum. m_apply() handles unmapped mbufs. */ - while (off > 0) { - if (m->m_len <= off) - off -= m->m_len; - else - break; - m = m->m_next; - } - w = (u_int16_t *)(mtod(m, u_char *) + off); - mlen = m->m_len - off; - if (cov < mlen) - mlen = cov; - cov -= mlen; - /* - * Force to even boundary. - */ - if ((1 & (long)w) && (mlen > 0)) { - REDUCE; - sum <<= 8; - s_util.c[0] = *(u_char *)w; - w = (u_int16_t *)((char *)w + 1); - mlen--; - byte_swapped = 1; - } else - byte_swapped = 0; + arg.sum = sum; + arg.rlen = 0; + (void)m_apply(m, off, cov, in6_cksum_partial_one, &arg); + sum = arg.sum; /* - * Unroll the loop to make overhead from - * branches &c small. + * Handle a residual byte. */ - while ((mlen -= 32) >= 0) { - sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; - sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; - sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11]; - sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15]; - w += 16; - } - mlen += 32; - while ((mlen -= 8) >= 0) { - sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; - w += 4; - } - mlen += 8; - if (mlen == 0 && byte_swapped == 0) - goto next; - REDUCE; - while ((mlen -= 2) >= 0) { - sum += *w++; - } - if (byte_swapped) { - REDUCE; - sum <<= 8; - byte_swapped = 0; - if (mlen == -1) { - s_util.c[1] = *(char *)w; - sum += s_util.s; - mlen = 0; - } else - mlen = -1; - } else if (mlen == -1) - s_util.c[0] = *(char *)w; - next: - m = m->m_next; - - /* - * Lastly calculate a summary of the rest of mbufs. - */ - - for (;m && cov; m = m->m_next) { - if (m->m_len == 0) - continue; - w = mtod(m, u_int16_t *); - if (mlen == -1) { - /* - * The first byte of this mbuf is the continuation - * of a word spanning between this mbuf and the - * last mbuf. - * - * s_util.c[0] is already saved when scanning previous - * mbuf. - */ - s_util.c[1] = *(char *)w; - sum += s_util.s; - w = (u_int16_t *)((char *)w + 1); - mlen = m->m_len - 1; - cov--; - } else - mlen = m->m_len; - if (cov < mlen) - mlen = cov; - cov -= mlen; - /* - * Force to even boundary. - */ - if ((1 & (long) w) && (mlen > 0)) { - REDUCE; - sum <<= 8; - s_util.c[0] = *(u_char *)w; - w = (u_int16_t *)((char *)w + 1); - mlen--; - byte_swapped = 1; - } - /* - * Unroll the loop to make overhead from - * branches &c small. - */ - while ((mlen -= 32) >= 0) { - sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; - sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; - sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11]; - sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15]; - w += 16; - } - mlen += 32; - while ((mlen -= 8) >= 0) { - sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; - w += 4; - } - mlen += 8; - if (mlen == 0 && byte_swapped == 0) - continue; - REDUCE; - while ((mlen -= 2) >= 0) { - sum += *w++; - } - if (byte_swapped) { - REDUCE; - sum <<= 8; - byte_swapped = 0; - if (mlen == -1) { - s_util.c[1] = *(char *)w; - sum += s_util.s; - mlen = 0; - } else - mlen = -1; - } else if (mlen == -1) - s_util.c[0] = *(char *)w; - } - if (cov) - panic("in6_cksum: out of data"); - if (mlen == -1) { - /* The last mbuf has odd # of bytes. Follow the - standard (the odd byte may be shifted left by 8 bits - or not as determined by endian-ness of the machine) */ + if (arg.rlen == 1) { + s_util.c[0] = arg.resid; s_util.c[1] = 0; sum += s_util.s; } @@ -361,7 +333,7 @@ in6_cksum_partial(struct mbuf *m, u_int8_t nxt, u_int32_t off, } int -in6_cksum(struct mbuf *m, u_int8_t nxt, u_int32_t off, u_int32_t len) +in6_cksum(struct mbuf *m, uint8_t nxt, uint32_t off, uint32_t len) { return (in6_cksum_partial(m, nxt, off, len, len)); } From nobody Fri Jul 7 19:13:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN02mhZz4lSMg; Fri, 7 Jul 2023 19:13: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 4QyNN02KSHz3jjL; Fri, 7 Jul 2023 19:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OJB0gmSUgdEtHhv6KkWVjBZrKUpQP81K7mTl097ezsU=; b=lQMKKmT07vJstrc2ZMh74QDjjdjlpKs61sx5t5BrQO9KQ+dJ8uXM2dphGJjR8dCHNEE2kS OAELOUJAe7GfNHPR7cwsDuQqeoOQrV58B2a3dtHDkIuA3wA3OH+uyYu+0C+Z5p316TfAek tKLdD/mbeEy1CPC1VCVLTvTPxUDyOtwK2MsvzyMsPnwDmc/Fj8E2RF6szdU3K0OTpAzd/7 toDgtqWD/ke+CRXbaTpLV2T71uhcrAYHVywave8seiefaNISiqiOlEh06lQvuh2OMJnWq7 IVAKQSSW8zCzszjLcgQDdQHuySawASEHTojSjPoCwKTDOEkBbnHW1cF9Z4pNKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OJB0gmSUgdEtHhv6KkWVjBZrKUpQP81K7mTl097ezsU=; b=XLm/Egfhuei4u8fsoWBCGOsTL9ICCHJ3b8yx3+8aO6fd1bVbk3MnomxbJhaobaZlLrU/PG qGkzDtqtsD7rYklmy8HAN6vHqPtQzQHXEzJJvqlc76umVoeVNxXM1sKJa6n7Vkx2CAO8vT QgucNpKMqu+rBR8IZgtgQ9UKYDBnnevxXGKA+CcytKpiV98d6O49zeGLBMm4mFV6/QJGJE VAZ5svFBikuyeP8gmiYIepBT2Mm+6hjG0Hk1D7BJyKnmvwUs2hhMr6AHniwHqtjiv321VF HhTCdgLLnXkJa0e6a46IRlqAPbwXe2tHWEXwSgPnvJh+ng45p3vZmGjZteX6Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757200; a=rsa-sha256; cv=none; b=gKt4kL4iVcsz7sWoYmDLjN5K18eno2nw1vLZjs5ekPHl2Rsmr0qYidWQZgX2R+6Y/S3Ai4 7oOXYhjjyJ+9Qmlz6Y4kCIjrcqldEMpZubjAH5tIGiAlMTcILRylEyjEbPaQu+LISKN1tj 7ltXraoCwfYFG+eiJAwDODs3ReoFEfEXmTuWpQ1OejGQxbUxLU3kiMFgmSFYHL2UDjSO1U lGqJMIISbnS2yr6sP7xax/HseU1eZiwcErnLHojqRjPUt4Ex7Af8u8p4iBDdV5DyBzY8/B l1nd+7XTGFx+0qYhzONcDzlp0RHWRpdVKZG9IcH7YnIqJyh0aIVupMHres+bdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN01PBkzqB7; Fri, 7 Jul 2023 19:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367JDKg7045860; Fri, 7 Jul 2023 19:13:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDKsJ045859; Fri, 7 Jul 2023 19:13:20 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:20 GMT Message-Id: <202307071913.367JDKsJ045859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 397222b9ffc2 - stable/13 - hier.7: Add some missing Xr's List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 397222b9ffc234bfc8df62a3ef2440f037816bb4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=397222b9ffc234bfc8df62a3ef2440f037816bb4 commit 397222b9ffc234bfc8df62a3ef2440f037816bb4 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-06-28 13:15:53 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 hier.7: Add some missing Xr's MFC after: 3 days (cherry picked from commit c618ee727712900105212af29b3ebf16b1076875) --- share/man/man7/hier.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 498dae503133..a6610419fcbf 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -554,7 +554,9 @@ system since it was booted .Pp .Bl -tag -width Fl -compact .It Pa bhyve/ -bhyve vm unix domain sockets +.Xr bhyve 8 +virtual machine +.Xr unix 4 Ns -domain sockets .It Pa ppp/ writable by the .Dq network From nobody Fri Jul 7 19:13:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN13zLTz4lSB3; Fri, 7 Jul 2023 19:13: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 4QyNN13CFwz3kDZ; Fri, 7 Jul 2023 19:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JWGuw69vG8oloaCDJtVgW0zw2gPEuwfiVYlV6uPVrZk=; b=iSr3zegGehFOXnfdQYIrThXpA13uFqqx1rq8D0dg5USPzz9aVWLsPpG34JIEPufmgV+e+s /rVTLzRvli9n5zYr+8nGIwmTRNlmfIUcY6U5Qt3jv27tF8LnTrfRxDDnv1XmvZaP47GS0t 4hwZzBUZbN3eP7Kii5hsr1XV0jqK8jGIAb1PlDIm3wQojlfZ+PE5tt1YjNVvEE9bq/OF3l bamVUXwTaRz8WXxiw2wxobIT+nVnFNoAkKbhfDLtDGBa/dkJm1FnjOfwNNo/4rSijeX8qt 50vq4mcm+yGe8pKgW9rY5DT4N+ylOfDbt6V5WwMLn/tK5Vmamq3EW8fAxe08QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JWGuw69vG8oloaCDJtVgW0zw2gPEuwfiVYlV6uPVrZk=; b=JMmDpENZAmLYH8284e2/qrH4+hpct2S3JNlCNNLcpE9tEqO6hLwUpCh6J6dzjr4zQ25h0G +4sSMTVkZh+w8hF0MYtHxUAAsdS1cxvOFHfOGoC8aNLxoervoV/a/11YodRgT81iCl6g6i Wf+dJEPcZPdnUWh+TJGVZ8zjXioM4f1w/cY240o4CYqTkeg5iWO8MfTrnfm0Q6hzQWMZGM El9W+qYYVyPGWTBKp1nwlMQcqLiK8j26+N2dBA/xXV/HGQQyqTb/DVy4AQ+9jOwckzxnXX BxkOI/b3DjairPGrYRWEJci6JF8kTsm/t6ZE4o+T2H7LN+U3tIrNG/A5FBkCpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757201; a=rsa-sha256; cv=none; b=vUAFBFxDXmMgCU6+AlCq6+udOFiBgPICVNW4ZUj1Yu1ouh0uNZ5qqdqw1hYs4SvvC3XyYy 1rygAa46/PfoIe4PBLD1+r4gB7e7O4ucN8ao6c6dNHo1MAazSt96eNFhcgGBFDQv2gYZr8 mCa4C5pxl492uEHT708uv1YNOF9X6V9Xbtiq0I+lmkOQSUrLwpmMkdxKgca7peVgzXUYLX ubqXbuPO/4wFuiPne8RaRGHZl8ijfUv6g9XGAua5UgmYi/zi4oCDKcr2MhjUI3fn1BIUI1 8nZiSloC9xaNVYbLWYYR4d162S/OOYNv0qF51JwYshGieDJzWQinisxkMH/cRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN12GcqzqQn; Fri, 7 Jul 2023 19:13: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 367JDL62045879; Fri, 7 Jul 2023 19:13:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDL5g045878; Fri, 7 Jul 2023 19:13:21 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:21 GMT Message-Id: <202307071913.367JDL5g045878@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 29f2daef761c - stable/13 - hier.7: Document /var/db/freebsd-update List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 29f2daef761cc9c5c60769d4a9d6714d3dcd6167 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=29f2daef761cc9c5c60769d4a9d6714d3dcd6167 commit 29f2daef761cc9c5c60769d4a9d6714d3dcd6167 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-08-04 13:57:18 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 hier.7: Document /var/db/freebsd-update MFC after: 3 days Sponsored by: Klara, Inc. (cherry picked from commit 3c4f8adc794d769bdc332a92f0920af928002441) --- share/man/man7/hier.7 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index a6610419fcbf..6c428bbba670 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -511,6 +511,11 @@ see .Pp .It Pa db/ miscellaneous automatically generated system-specific database files +.Bl -tag -width Fl -compact +.It Pa freebsd-update/ +.Xr freebsd-update 8 +work directory for temporary files and downloaded updates +.El .It Pa empty/ empty directory for use by programs that need a specifically empty directory. Used for instance by From nobody Fri Jul 7 19:13:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN24szfz4lSD9; Fri, 7 Jul 2023 19:13: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 4QyNN246flz3kH8; Fri, 7 Jul 2023 19:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Km7N7Z0UbYmpS9L9hZSzfR15l+AHDqTnq4FijnRkkGg=; b=IbeyyoSlZJWQ9p4EadTHnkfmCWfhK3oV2Zhg7vTpfipv8G92viJNK7XWEg7aj4c+545jgb 6c8XesQMnjWv4gXztCdTp1aTKJHoJ9xWBGNhkk1pXtUMi7mZMVcAzjU3Dlbtv9iAbU/mQk whsG6Hhdul3zSGgBZ/ER22Olu2e1e6MNixdVYOJ+yONVCb3s7IPDAwGeQzEuHy4Au9InIp jt7Sp/bhDTHHjxFvQ4lS5iLtOZ0xaugzAVlGimKm6MIR06LQfsTWaJK/GCnFu1zknZ6gdx X3cvs0WQp5obtLghiOc2KFZWgOSqEwX1Nc9giNOGUHZXf4VWyQyWm5jhE7J2zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Km7N7Z0UbYmpS9L9hZSzfR15l+AHDqTnq4FijnRkkGg=; b=OAllkN3DMbIDsqFxLI6fHWS61RtbKEOrmp53i7Zpn5KL/PP6zNBQF2XBw/eP0jM9Qk55Z8 WZTkO9RPEXfowrvkF8+ltjOMySoCV1zbLadVXbXU7Mb0aUTRmnZV0w43knC0j39BjM7Rqw YGoscMOYt2xCxr00mZELfgFt0FE8EdFhBjAJv3GoK/upHpQu5O1wkgBKBbH7zVJOKdjoyF e99lDzHx/+k+MzC0FezJfH+Bh61dS02n0939h5afQqI4tQOXedTDZUezHVFybmJRYtVP0i S/HsPViCOwgpQjJ+tUARnMfVRhc2wbW5D3zBaKVgweM72lSgQwEihO755z3I4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757202; a=rsa-sha256; cv=none; b=uaMpqRuLj1906g1B1tkwJDT+QnioNJG61u9FUFlUz9FWKsTRliMUSS59czreKBB7V2/pbd 7VicwSsEaT+Qpi1TkIU7NwIq69zSx8qFGXT/eJkwOplfsA/CQpXr6VwRBsSTrukfL1IVZR LessTShbdVmqLDLc/21p2yqaybhbuR0m63od0q+bXRIfQxNpm+5kzhoy+RUbW1CYSRH1kK +RuoocLJu77dI3WjUX7RiUG4ip86DtRGp8jXk2BJ1QWTjwxVI25WqXsRSio01HT3U+72Qn QuIMrSI+eH8KhGTBpwqfwG8CIUDcBuDiR+Vlz9nm2Z4qTdM+dWbzwv+OTK3gig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN239rdzr4s; Fri, 7 Jul 2023 19:13: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 367JDMVe045898; Fri, 7 Jul 2023 19:13:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDM2L045897; Fri, 7 Jul 2023 19:13:22 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:22 GMT Message-Id: <202307071913.367JDM2L045897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: bdb80cfbb073 - stable/13 - hier(7): document libdata/pkgconfig List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bdb80cfbb07325c49343f3a4af9922e590652129 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=bdb80cfbb07325c49343f3a4af9922e590652129 commit bdb80cfbb07325c49343f3a4af9922e590652129 Author: Baptiste Daroussin AuthorDate: 2022-07-25 09:14:50 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 hier(7): document libdata/pkgconfig (cherry picked from commit 94778fc7382d2d9dd474eca1f88a86364f768f15) --- share/man/man7/hier.7 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 6c428bbba670..6f058c0d7cd5 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -251,6 +251,8 @@ GCC configuration data linker scripts; see .Xr ld 1 +.It Pa pkgconfig/ +pc files .El .Pp .It Pa libexec/ From nobody Fri Jul 7 19:13:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN35dY7z4lS88; Fri, 7 Jul 2023 19:13: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 4QyNN357Nbz3kNb; Fri, 7 Jul 2023 19:13:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6V5iv7RZP8s65ycvmfaklibYM6Ub8zxMiHtQ9HdXL60=; b=imNTBbEmpLbcp510vLyJyCqRxJTGarBn5N17w7CCB6oiMnDzm8OCFoaZ6lkodKVCndD5G+ ZtIReO6QnGbxr3jp109pZq5Ml6R8JZI2I23eL1q74jVwIie6OylBQ56iMt7out5Xw6lUH2 TNUnPgoRWNgAi4uED9Ged1W+40GtZlxAEszAW+z+4laGIJ5ftcZ5/KSQ7MDDKtikPcSP4C 3V1xrzqscIKRuxD/b45H9ct/N6uPtcv8YvmqDCrQO2dtoQCvauEAL0g8iVtzapefrxkbX1 TWlrNXCi/C4KWomI4SBMDudlIdAJdKSGs6kFOD5YL/iJ3Ps3wtNK8JGzaGtYUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6V5iv7RZP8s65ycvmfaklibYM6Ub8zxMiHtQ9HdXL60=; b=kC4uvFr/T2XTQWLuIfVGWTCJw7/F98t9uklVklOEEJIkXgb22eKiMCSeLAo40R2f+S7B5r ysR6AveLik7s0p85TTVZPCPxuKaxYiw5tm9dKYBIWepvwn71NMsT8CFltdE4C5AMBviqNc uO3vZsuwEWu+rhiZr+86MMSklzlF614IUeOpbjIGdmPsLOtLXzVcOn+6ZB2fSHy96kx4nE /Ta6BGbeW4VgEeVxWQ9gRUgbliTVk1jtY1NAHrUHtHirS7pDklpebxZ+l9CuqRimC9Cxot pvO9xVnsfACtw53vDcROcxMZmen/JFtv3kMKA/2vNze9X+zlXefkpOOaoojANA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757203; a=rsa-sha256; cv=none; b=SSbAwMD0bbD3zG0mgsQUavH+UQlEQYohnQznDCIgfwAHZuVW5bmHqE+mjwN+Vp8evipuV2 biVaKxTcQ5g81T3Vr5zXeHW4lI4FWPdV2ddFALeNiWRbvGm2mkLF25unYnRH8LXDdt/uBu PS06y5PY4x9KCrDH+8YFLz1Qi+ULiach8idCq5I+D7pybgqjZ7rXMXo5GVbaFERtPhdK4S Vd5dh1LVbCH+2kJ1GRN5c3HDTMIRFQtezC+y1cZXR+nPllksu5uwoyWpeF5BfCwCSwvxoN 0l6hNK/P/lUsVIo89ecx51WseALiC/EL54NQQpnA8fL/i1MocOt3z0fYLhnR1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN347gnzqcj; Fri, 7 Jul 2023 19:13: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 367JDN3h045924; Fri, 7 Jul 2023 19:13:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDNJs045923; Fri, 7 Jul 2023 19:13:23 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:23 GMT Message-Id: <202307071913.367JDNJs045923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 317af3e132c4 - stable/13 - mac(4): update the references to MAC modules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 317af3e132c4528f67096f8f0d2f3ad65fdcb712 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=317af3e132c4528f67096f8f0d2f3ad65fdcb712 commit 317af3e132c4528f67096f8f0d2f3ad65fdcb712 Author: Mitchell Horne AuthorDate: 2023-06-12 18:56:34 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 mac(4): update the references to MAC modules Add entries for mac_ntpd(4) and mac_priority(4) to the table of MAC modules. Drop the entry for mac_none(4) from the list, but retain the cross-reference in SEE ALSO. This module has no functional impact and is of minimal interest to users. Add a new cross-reference to the similar mac_stub(4), limited to SEE ALSO for the same reasoning. Reviewed by: Pau Amma MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40483 (cherry picked from commit e2cb7201015dbd2d4cea5c9b4e0385d11614263c) --- share/man/man4/mac.4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/share/man/man4/mac.4 b/share/man/man4/mac.4 index 135301962f3b..2ba03434c878 100644 --- a/share/man/man4/mac.4 +++ b/share/man/man4/mac.4 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2015 +.Dd June 10, 2023 .Dt MAC 4 .Os .Sh NAME @@ -58,9 +58,10 @@ Currently, the following MAC policy modules are shipped with .It Xr mac_ifoff 4 Ta "Interface silencing" Ta no Ta any time .It Xr mac_lomac 4 Ta "Low-Watermark MAC policy" Ta yes Ta boot only .It Xr mac_mls 4 Ta "Confidentiality policy" Ta yes Ta boot only -.It Xr mac_none 4 Ta "Sample no-op policy" Ta no Ta any time +.It Xr mac_ntpd 4 Ta "Non-root NTP Daemon policy" Ta no Ta any time .It Xr mac_partition 4 Ta "Process partition policy" Ta yes Ta any time .It Xr mac_portacl 4 Ta "Port bind(2) access control" Ta no Ta any time +.It Xr mac_priority 4 Ta "Scheduling priority policy" Ta no Ta any time .It Xr mac_seeotheruids 4 Ta "See-other-UIDs policy" Ta no Ta any time .It Xr mac_test 4 Ta "MAC testing policy" Ta no Ta any time .El @@ -205,9 +206,12 @@ man page. .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , +.Xr mac_ntpd 4 , .Xr mac_partition 4 , .Xr mac_portacl 4 , +.Xr mac_priority 4 , .Xr mac_seeotheruids 4 , +.Xr mac_stub 4 , .Xr mac_test 4 , .Xr login.conf 5 , .Xr maclabel 7 , From nobody Fri Jul 7 19:13:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN51GjJz4lS8G; Fri, 7 Jul 2023 19:13: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 4QyNN45g50z3kW9; Fri, 7 Jul 2023 19:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7aHbF/mLFTOGEJp2YmhFK93XYQQZj64q8KPZ7XwZMUo=; b=PkrftivsQuZP+YDpU1IyoRpdzm1GVmZL3RDSjbTzgSv8kJbdabqWPky30mBXFDqdM82pFp 0l0d0JYmJBc28v6drxRVZwgfPajj3MaCyGNS/odfmZte5qg+UBeCi8K6hmeSrurheWGjT0 APrLHpc+6/EGj4OCi2zhXoAx1sTAsmcni1+gwgFVjyB+uVJKWeVYKLgS9ueikMKMa/KYGm KGOIZdzT87ZYR6V6e7c2a+yq8kSAdXT8kcKb9btb5+O12Iwf3pUCm4Pu6ya1iPTX480Fm6 O8e1LL9NvHY0e2aNoGO6mKnt+dAihyfaSL7SBPE/VW/rYulAnnZ6BJL5rrEHlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7aHbF/mLFTOGEJp2YmhFK93XYQQZj64q8KPZ7XwZMUo=; b=QxdWeMLK6fL9nJJE61K59nmtQKg1Kqmna2OARo19IkOpMHU6bPmQYf3oFb2hScMNdfS3Xa ik0yEVcV/vLdtcjQ9Crktq4L3208ezxHHOB51q++uKShjLEU63wpyTiv/75OLGmhrKT8gA 58ztlPbm73aUf0q/m/hfzQCTd6NmIGn6Pf2KPF764ceh9aYGDtT0LCW3lXUF0I+kQkc4Bm jI8ZVE2O/C+aucz5KhrQAtenPqlb0yJdkhnnLXMZHdkxvwuUH6DNMF0rPQtEFJ6Bov8X9t nlm4EWxYEpMoBe54Y7LLXdQYfXSW9Ay6bI7t5bFmHACAJx8KtPvmok/iDiK9IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757204; a=rsa-sha256; cv=none; b=nkJWnrB4rtmCHm4OI7o/Lo1mcQ2xUr5aLy8sfd/jrl8gBi04JyHLrF/ZbxNy8F5k0M4Qhf p9Wjk7eMroLQYd6AlswibcfxwsgEVOb7YzbhrOPEasoRmdGGzwPg3Z39Edh8ZNkzaEf+QX g5qw35s6Pp+NOISK36K0XPIwIE/6jeLAvQvvVEJC27Wo5KqlIvMd00whmCLtEoQLOPC6xf oYXleuL6YGllmSjTZFWYjMTdcctDEZwbxZdcjWqKI2nmuCD8D7Y7CYzx+zRngnQeldQ3Rk iJXwxAaKup8jkSvWljXCFQE6xYgfoPRPcz286kZ2yPc/x8pU4My8Z1Xbn1Jtfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN44nBKzqck; Fri, 7 Jul 2023 19:13: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 367JDOZm045943; Fri, 7 Jul 2023 19:13:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDO9p045942; Fri, 7 Jul 2023 19:13:24 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:24 GMT Message-Id: <202307071913.367JDO9p045942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 29df36d507ec - stable/13 - mac(9): update SEE ALSO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 29df36d507ec7664eef3bb7928dc456b6ec762bc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=29df36d507ec7664eef3bb7928dc456b6ec762bc commit 29df36d507ec7664eef3bb7928dc456b6ec762bc Author: Mitchell Horne AuthorDate: 2023-06-12 18:59:00 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 mac(9): update SEE ALSO Rather than maintaining an incomplete list of MAC modules references, just reference mac(4), where such a list can be found. Reviewed by: Mina Galić Reviewed by: Pau Amma MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40485 (cherry picked from commit 0449bc249b78a8c85afe375e581432351f90427d) --- share/man/man9/mac.9 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/share/man/man9/mac.9 b/share/man/man9/mac.9 index 58c2f7a2484e..b7a930499f44 100644 --- a/share/man/man9/mac.9 +++ b/share/man/man9/mac.9 @@ -150,15 +150,7 @@ for information on the MAC Framework APIs. .Xr acl 3 , .Xr mac 3 , .Xr posix1e 3 , -.Xr mac_biba 4 , -.Xr mac_bsdextended 4 , -.Xr mac_ifoff 4 , -.Xr mac_lomac 4 , -.Xr mac_mls 4 , -.Xr mac_none 4 , -.Xr mac_partition 4 , -.Xr mac_seeotheruids 4 , -.Xr mac_test 4 , +.Xr mac 4 , .Xr ucred 9 , .Xr vaccess 9 , .Xr vaccess_acl_posix1e 9 , From nobody Fri Jul 7 19:13:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN60LBWz4lSH3; Fri, 7 Jul 2023 19:13: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 4QyNN56qmYz3kPB; Fri, 7 Jul 2023 19:13:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tt8B791OGUohdb7Xj1psSeRxO4H4A/9B31CU4M8P5sc=; b=gApk/ORTEoukLp/2YH2Uk7LkN9ztM4U80ks24snQ5P+9kOuRIB9/ej5UhXkoTqDSJsaxgJ fcbBvswfz/N5lsaGwo9YUpn72ljM9hvLfKFn02cAwawuEKYjxnWn/0Mv3iQ4QqqK0ksI7k FMejLqb/QRdvOQ9yMop+Tuq32iphOE5tmI/lPZ/2Birb4pSxv7TKO91AXWmv5AgsklU1hW UcBBTPATr8xy1S+kSW7dcCSRRlzIdBHfYiHKiN4lZpZgAcrWBjEJKsHsHM7YmpXvBcCkv2 jR9wqLG/yk3+d9vHfT6/BT7QEtm05Cvx2nb0L7cIejl0Dwh0T+QtrfRX4w38xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tt8B791OGUohdb7Xj1psSeRxO4H4A/9B31CU4M8P5sc=; b=yFrp0p4s27/tMjwtnLuaHMcPTHAPVrW+5+TmZMeQyo/IhVAhxwB5Hm1gh+82ocd8nJX1ug MRBeCvRmLaeDchp0vTdeaAL5KFKAMUS0/Mb8H95y2NFJ7tQofOmArCyBShMdQFR9rOOooW 640aMOjf/K01e8JV3nUV3k6enx2HBcN01yMhjRLxvtkx9z3w9iEVPYIwfEES4rWj4pJ64X AbW61hxC3GxtkTxIWdlnUNeQ8UzH8QFoZZcIbO7A6Tt0xwjzMt5bmzU2w1FIJof0LB4xr8 T8Xtyd2F6vRSrPv52qtyjwDyXex4YwXfL/qVJSHYJLUfUZJ3xSAubkV/1IVn+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757206; a=rsa-sha256; cv=none; b=UPBGvYJEF0jJZ0Q6MX++dngyLxhrGlUMfyjYHi0UOZM57bUrr2e0WpxHNjwRwXELP6HctL n6HspXtSEuuHjubY11XDn5NgJfz0ymS+NCcgiPy0eiZFPh2P2/4ReAiJBgt9O/B5EvI9TQ /zgnwr+ckq05SPx3N17dhCSHWosNqYDqszdc5qdvskN+Ep9BYPevZ8GuC1xJ5d6PVZ1The mcWKyPPllaQW/JxPcYyQEGqu6aHmhdiSXtfXkWrBWMsNyaTyVacXGBIA1b2ZPcGAuaJ8zj 4GTSxgGo97y8KPa58GIRW58CFCz1X/05uA/vA3J6WedS8sobBEqwUfbDhzx2qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN55jzFzqB8; Fri, 7 Jul 2023 19:13: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 367JDPfk045967; Fri, 7 Jul 2023 19:13:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDPbL045966; Fri, 7 Jul 2023 19:13:25 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:25 GMT Message-Id: <202307071913.367JDPbL045966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 4950d4533e40 - stable/13 - hier(7): alphabetical order List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4950d4533e409976e514fa7d0c5297c4520d48fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4950d4533e409976e514fa7d0c5297c4520d48fd commit 4950d4533e409976e514fa7d0c5297c4520d48fd Author: Graham Perrin AuthorDate: 2023-05-30 19:30:20 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 hier(7): alphabetical order Approved by: mhorne Pull request: https://github.com/freebsd/freebsd-src/pull/756 (cherry picked from commit 2071e54c226a120a62baa710bef225c4f6ad5ee3) --- share/man/man7/hier.7 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 6f058c0d7cd5..5b8f19423c16 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 23, 2022 +.Dd May 30, 2023 .Dt HIER 7 .Os .Sh NAME @@ -98,12 +98,12 @@ This is a symlink to system configuration files and scripts .Pp .Bl -tag -width "defaults/" -compact +.It Pa bluetooth/ +bluetooth configuration files .It Pa defaults/ default system configuration files; see .Xr rc 8 -.It Pa bluetooth/ -bluetooth configuration files .It Pa localtime local timezone information; see @@ -122,6 +122,10 @@ scripts that are run daily, weekly, and monthly, via .Xr cron 8 ; see .Xr periodic 8 +.It Pa ppp/ +ppp configuration files; +see +.Xr ppp 8 .It Pa rc.d/ system and daemon startup/control scripts; see @@ -130,10 +134,6 @@ see OpenBSM audit configuration files; see .Xr audit 8 -.It Pa ppp/ -ppp configuration files; -see -.Xr ppp 8 .It Pa ssh/ OpenSSH configuration files; see From nobody Fri Jul 7 19:13:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN70t5mz4lSDJ; Fri, 7 Jul 2023 19:13: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 4QyNN70Nryz3kXD; Fri, 7 Jul 2023 19:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GhGgzM20HnABKa4m2Zn/rrIdlpu0/41N0rdUUWfxwE=; b=kwEPhBk3HSnJmOtrokMAvXiNPFt95I9hMK+r0ZibKuFFC8eCoCimrFqqy+34DZa5zLNDDi cCpyTzWTXOWdw/ZnSjP30Ew752IIsuyDGL8BBwkB9ygJZXAzXKVfEPsx3YS6J8Tde0hcuU D6XmontRhu+SPSNh+gKgFGR74+7WS2QpO3kTmTkbVI7hp3kcb+GlF1LjMFmInUcRpavh/y oU+ugZIeRp3Erq/R8QkygzZDm5lDqoLluj4VIikKCjsfw5ypZBT4ubUz9YUXel6UjvO6Ck ZpOAp+04iphjaUJ2XyF0SmvR/zzYm8akQpBqEhqk0aCipbNSzaEW8JHrwJPU/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GhGgzM20HnABKa4m2Zn/rrIdlpu0/41N0rdUUWfxwE=; b=QErCWdyXNU2Xx5mS/kHyoQ2oxAi5u1cbLAUGoje9m0O2zTL4u5C1jxd7Zc/SmR3Voj93tL 52QLOLhxbm5oiQBuESEjrbUfXBnt5HNFrQmwI09bKTB2uXcd8hsnlxlUYtqXeUPoFRppSj 3dOm4mzJqzf1opmQwqUgaEks8qm/spkljztOtYNcZwUtmuTXITBfJ2OkAsBIjBw9h2yphY nma1BYijay/KUANO8vbKJs/Q7czgvw4O0vixtFQOSeEOe/+6/G12x/MCrBJTjauJyW1giS rw8LdJbIPBhAblRhegQLV1McBnkgtLj9jtkxFr8vLG8F/1f/9TZXJt80nxvkdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757207; a=rsa-sha256; cv=none; b=Go9rr/UqZ+oioG2KNX73bcPe1GV+G/T2ysyh1ELu8HFqWroqsEpiBPYYHsRnl64hgwvQ5c dTrJQwJetDl4eLdvYtTCmPjFD7GSKaqfydEudZXdscoqq1F4hygnKybh7+uh0ceLG9NwgS bBj2ZUtwahO5m7c9DVvGL18hiGjDb+d6XCIQCmRt4ac6/OVSSoLt4QMDB2SptEVR5G6lry 0mxVIwOlYIs4uPBRXqA3AlYpSdivZ64IG97iOLcqu9/rdnd8P/w1xY9EQ+eIGEFs3JzD0A ZtuX1Fh32cpBzLjXFW+zCV8UlBDpKU6aktojKRAkvujk20YG3Xl3UttyYYaRaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN66ZlSzqcl; Fri, 7 Jul 2023 19:13: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 367JDQZp045986; Fri, 7 Jul 2023 19:13:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDQ3b045985; Fri, 7 Jul 2023 19:13:26 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:26 GMT Message-Id: <202307071913.367JDQ3b045985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 7ff4d8452720 - stable/13 - hier(7): improvement, modernisation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7ff4d84527204590ea169bf41ee9628990d78cee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7ff4d84527204590ea169bf41ee9628990d78cee commit 7ff4d84527204590ea169bf41ee9628990d78cee Author: Graham Perrin AuthorDate: 2023-06-10 08:41:35 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 hier(7): improvement, modernisation Consistent use of lowercase, spacing between sections, etc. Cease mentioning floppy disks. De-list /usr/share/misc/fonts/, which has been ??? (without a description) for twenty-seven years. Change zpool to pool. (zpool is a command.) Uppercase PPP for Point-to-Point Protocol. A few other changes to wording, including avoidance of the phrase pre-fab. Update the descriptions of: * /tmp/ * /usr/share/misc/ * /var/preserve/ * /var/tmp/ * /var/tmp/vi.recover/. Refer to vi(1) instead of ex(1). https://bugs.freebsd.org/261349 PR: 261349 Reviewed by: mhorne Approved by: mhorne Pull request: https://github.com/freebsd/freebsd-src/pull/763 (cherry picked from commit 6469f9c595c609dd552ec198a16c471c87df7c57) (cherry picked from commit 5ca7f02946940ff698741d4da4a30b554cb0f592) (cherry picked from commit b374a3921d97bdb20b103aaeb91988c3d355ea71) --- share/man/man7/hier.7 | 288 ++++++++++++++++++++++---------------------------- 1 file changed, 128 insertions(+), 160 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 5b8f19423c16..0ccc3679b91e 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,51 +28,51 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 30, 2023 +.Dd June 27, 2023 .Dt HIER 7 .Os .Sh NAME .Nm hier .Nd layout of file systems .Sh SYNOPSIS -A sketch of the file system hierarchy. +An overview of the file system hierarchy. .Sh DESCRIPTION .Bl -tag -width "/libexec/" .It Pa / -root directory of the file system +root directory .It Pa /bin/ -user utilities fundamental to both single-user and multi-user environments +user utilities that are fundamental to single-user and multi-user modes .It Pa /boot/ -programs and configuration files used during operating system bootstrap +programs and configuration files used during bootstrap of the operating system .Pp -.Bl -tag -width "defaults/" -compact +.Bl -tag -width "nvmecontrol/" -compact .It Pa defaults/ -default bootstrapping configuration files; see +default bootstrap configuration files; see .Xr loader.conf 5 .It Pa dtb/ -Compiled flattened device tree (FDT) files; see +compiled flattened device tree (FDT) files; see .Xr fdt 4 and .Xr dtc 1 .It Pa efi/ -Mount point for EFI System Partition (ESP) on UEFI systems +mount point for the EFI System Partition (ESP) on UEFI systems .It Pa firmware/ -loadable kernel modules containing binary firmware for hardware that needs -firmware downloaded to it to function +loadable kernel modules containing binary firmware, for hardware to which +firmware must be downloaded .It Pa kernel/ -pure kernel executable (the operating system loaded into memory -at boot time) and kernel modules +pure kernel executable (the operating system loaded into memory at boot time) +and kernel modules .It Pa modules/ -third-party loadable kernel modules, such as the ones installed from +third-party loadable kernel modules, such as those associated with .Xr ports 7 .It Pa overlays/ -Compiled flattened device tree (FDT) overlays; see +compiled flattened device tree (FDT) overlays; see .Xr fdt 4 and .Xr dtc 1 .It Pa zfs/ .Xr zfs 8 -zpool cache files +pool cache files .El .It Pa /compat/ normally a link to @@ -81,13 +81,12 @@ If not, then the .Pa /usr/compat comments apply .It Pa /dev/ -device special files managed by +the normal mount point for .Xr devfs 5 .Pp -.Bl -tag -width "defaults/" -compact +.Bl -tag -width "nvmecontrol/" -compact .It Pa fd/ -file descriptor files; -see +file descriptor files; see .Xr fd 4 .El .It Pa /home/ @@ -97,57 +96,51 @@ This is a symlink to .It Pa /etc/ system configuration files and scripts .Pp -.Bl -tag -width "defaults/" -compact +.Bl -tag -width "nvmecontrol/" -compact .It Pa bluetooth/ bluetooth configuration files .It Pa defaults/ -default system configuration files; -see +default system configuration files; see .Xr rc 8 .It Pa localtime -local timezone information; -see +local timezone information; see .Xr ctime 3 .It Pa mail/ -Sendmail control files +.Xr sendmail 8 +control files .It Pa mtree/ -mtree configuration files; -see .Xr mtree 8 +configuration files .It Pa pam.d/ -configuration files for the Pluggable Authentication Modules (PAM) -library +configuration files for the Pluggable Authentication Modules (PAM) library; see +.Xr pam 3 .It Pa periodic/ -scripts that are run daily, weekly, and monthly, via +scripts that are run daily, weekly, or monthly by .Xr cron 8 ; see .Xr periodic 8 .It Pa ppp/ -ppp configuration files; -see +PPP configuration files; see .Xr ppp 8 .It Pa rc.d/ -system and daemon startup/control scripts; -see +system and daemon startup/control scripts; see .Xr rc 8 .It Pa security/ -OpenBSM audit configuration files; -see +OpenBSM audit configuration files; see .Xr audit 8 .It Pa ssh/ -OpenSSH configuration files; -see +OpenSSH configuration files; see .Xr ssh 1 .It Pa ssl/ OpenSSL configuration files .El .It Pa /lib/ -critical system libraries needed for binaries in +system libraries that are critical to binaries in .Pa /bin and .Pa /sbin .Pp -.Bl -tag -width "defaults/" -compact +.Bl -tag -width "nvmecontrol/" -compact .It Pa casper/ service-specific .Xr libcasper 3 @@ -162,43 +155,41 @@ vendor-specific libraries to extend the utility .El .It Pa /libexec/ -critical system utilities needed for binaries in +system utilities that are critical to binaries in .Pa /bin and .Pa /sbin .It Pa /media/ -contains subdirectories to be used as mount points -for removable media such as CDs, USB drives, and -floppy disks +contains subdirectories that are mount points for removable media such as +USB drives, CDs and DVDs .It Pa /mnt/ -empty directory commonly used by -system administrators as a temporary mount point +empty directory commonly used by system administrators as a temporary mount +point .It Pa /net/ -automounted NFS shares; -see +automounted NFS shares; see .Xr auto_master 5 .It Pa /nonexistent/ -a non-existent directory; -by convention, it serves as a home directory -for special user accounts -that need no home directory; -see also +a non-existent directory; conventionally, a home directory for special user +accounts that do not require a home directory. See also .Pa /var/empty/ .It Pa /proc/ -process file system; -see +process file system; see .Xr procfs 5 .It Pa /rescue/ -statically linked programs for emergency recovery; -see +statically-linked programs for emergency recovery; see .Xr rescue 8 .It Pa /root/ -root's HOME directory +home directory of the root user .It Pa /sbin/ -system programs and administration utilities -fundamental to both single-user and multi-user environments +system programs and administration utilities that are fundamental to +single-user and multi-user modes .It Pa /tmp/ -temporary files that are not guaranteed to persist across system reboots +temporary files that may be removed by +.Xr rc 8 ; +see the +.Va clear_tmp_enable +variable of +.Xr rc.conf 5 .It Pa /usr/ contains the majority of user utilities and applications .Pp @@ -206,13 +197,11 @@ contains the majority of user utilities and applications .It Pa bin/ common utilities, programming tools, and applications .It Pa compat/ -files needed to support binary compatibility with other operating systems; -see +files needed to support binary compatibility with other operating systems; see .Xr linux 4 .It Pa freebsd-dist/ distribution files -.Pq like base.txz ; -see +.Pq like base.txz ; see .Xr release 7 and .Xr bsdinstall 8 @@ -224,7 +213,6 @@ the layout is not standardized, but a typical interactive user .Dv beastie might receive their own directory under .Pa /usr/home/beastie -.Pp .It Pa lib/ shared and archive .Xr ar 1 Ns -type @@ -248,15 +236,16 @@ miscellaneous utility data files .It Pa gcc/ GCC configuration data .It Pa ldscripts/ -linker scripts; -see +linker scripts; see .Xr ld 1 .It Pa pkgconfig/ -pc files +.Xr pc 5 Pq Pa ports/devel/pkgconf +files; collections of compiler flags, linker flags, and other information +relevant to library use .El .Pp .It Pa libexec/ -system daemons & system utilities (executed by other programs) +system daemons and system utilities that are executed by other programs .Pp .Bl -tag -width Fl -compact .It Pa aout/ @@ -264,14 +253,12 @@ utilities to manipulate a.out executables .It Pa elf/ utilities to manipulate ELF executables .It Pa lpr/ -utilities and filters for LP print system; -see +utilities and filters for LP print system; see .Xr lpr 1 .It Pa sendmail/ the .Xr sendmail 8 -binary; -see +binary; see .Xr mailwrapper 8 .It Pa sm.bin/ restricted shell for @@ -292,8 +279,7 @@ the general layout sketched out by for .Pa /usr should be used. -Exceptions are the -ports documentation +Exceptions are the ports documentation .Po in .Pa share/doc// Ns Pc , and @@ -303,27 +289,25 @@ and .It Pa obj/ architecture-specific target tree produced by building .Fx -from source; -see +from source; see .Xr build 7 .It Pa ports/ .Fx ports collection; see .Xr ports 7 .It Pa sbin/ -system daemons & system utilities (executed by users) +system daemons and system utilities that are executed by users .It Pa share/ architecture-independent files .Pp .Bl -tag -width Fl -compact .It Pa calendar/ -a variety of pre-fab calendar files; -see +system-wide calendar files; see .Xr calendar 1 .It Pa dict/ -word lists; -see +word lists; see .Xr look 1 +.Pp .Bl -tag -width Fl -compact .It Pa freebsd .Fx Ns -specific @@ -331,6 +315,7 @@ terms, proper names, and jargon .It Pa web2 words from Webster's Second International .El +.Pp .It Pa doc/ miscellaneous documentation .It Pa examples/ @@ -338,9 +323,10 @@ various examples for users and programmers .It Pa firmware/ firmware images loaded by userland programs .It Pa games/ -ASCII text files used by various games +used by various games .It Pa keys/ known trusted and revoked keys +.Pp .Bl -tag -width Fl -compact .It Pa pkg/ fingerprints for @@ -348,25 +334,23 @@ fingerprints for and .Xr pkg 8 .El +.Pp .It Pa locale/ -localization files; -see +localization files; see .Xr setlocale 3 .It Pa man/ manual pages .It Pa misc/ -miscellaneous system-wide ASCII text files +miscellaneous system-wide files +.Pp .Bl -tag -width Fl -compact -.It Pa fonts/ -??? .It Pa termcap -terminal characteristics database; -see +terminal characteristics database; see .Xr termcap 5 .El +.Pp .It Pa mk/ -templates for make; -see +templates for make; see .Xr make 1 .It Pa nls/ national language support files @@ -382,6 +366,7 @@ example (dot) files for new accounts .It Pa snmp/ MIBs, example files and tree definitions for the SNMP daemon +.Pp .Bl -tag -width Fl -compact .It Pa defs/ tree definition files for use with @@ -389,20 +374,19 @@ tree definition files for use with .It Pa mibs/ MIB files .El +.Pp .It Pa syscons/ -files used by syscons; -see .Xr syscons 4 +files +.Pp .Bl -tag -width Fl -compact .It Pa fonts/ -console fonts; -see +console fonts; see .Xr vidcontrol 1 and .Xr vidfont 1 .It Pa keymaps/ -console keyboard maps; -see +console keyboard maps; see .Xr kbdcontrol 1 and .Xr kbdmap 1 @@ -410,36 +394,33 @@ and console screen maps .El .It Pa tabset/ -tab description files for a variety of terminals; used in -the termcap file; +tab description files for a variety of terminals; used in the termcap file; see .Xr termcap 5 .It Pa vi/ localization support and utilities for .Xr vi 1 .It Pa vt/ -files used by vt; -see .Xr vt 4 +files +.Pp .Bl -tag -width Fl -compact .It Pa fonts/ -console fonts; -see +console fonts; see .Xr vidcontrol 1 and .Xr vidfont 1 .It Pa keymaps/ -console keyboard maps; -see +console keyboard maps; see .Xr kbdcontrol 1 and .Xr kbdmap 1 .\" .It Pa scrnmaps/ .\" console screen maps .El +.Pp .It Pa zoneinfo/ -timezone configuration information; -see +timezone configuration information; see .Xr tzfile 5 .El .Pp @@ -452,41 +433,39 @@ The layout of the source tree is described by the top-level file. .Pp .It Pa tests/ -The +the .Fx test suite; see .Xr tests 7 .El .It Pa /var/ -multi-purpose log, temporary, transient, and spool files +log, temporary, transient, and spool files .Pp -.Bl -tag -width "defaults/" -compact +.Bl -tag -width "preserve/" -compact .It Pa account/ system accounting files .Pp .Bl -tag -width Fl -compact .It Pa acct -execution accounting file; -see +execution accounting file; see .Xr acct 5 .El .Pp .It Pa at/ -timed command scheduling files; -see +timed command scheduling files; see .Xr at 1 .Pp .Bl -tag -width Fl -compact .It Pa jobs/ -directory containing job files +job files .It Pa spool/ -directory containing output spool files +output spool files .El .Pp .It Pa backups/ miscellaneous backup files .It Pa cache/ -miscellaneous cached files +miscellaneous cache files .Pp .Bl -tag -width Fl -compact .It Pa pkg/ @@ -495,34 +474,33 @@ cached packages for .El .Pp .It Pa crash/ -default directory to store kernel crash dumps; see +default directory for kernel crash dumps; see .Xr crash 8 and .Xr savecore 8 .It Pa cron/ -files used by cron; -see .Xr cron 8 +files .Pp .Bl -tag -width Fl -compact .It Pa tabs/ -crontab files; -see .Xr crontab 5 +files .El .Pp .It Pa db/ -miscellaneous automatically generated system-specific database files -.Bl -tag -width Fl -compact +miscellaneous automatically-generated system-specific database files +.Pp +.Bl -tag -width "freebsd-update/" -compact .It Pa freebsd-update/ +temporary files and downloads for .Xr freebsd-update 8 -work directory for temporary files and downloaded updates .El +.Pp .It Pa empty/ -empty directory for use by programs that need a specifically empty directory. -Used for instance by +for use by programs that require an empty directory. +Uses include privilege separation by .Xr sshd 8 -for privilege separation .It Pa games/ miscellaneous game status and score files .It Pa heimdal/ @@ -531,33 +509,26 @@ Kerberos server databases; see .It Pa log/ miscellaneous system log files .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width "utx.lastlogin" -compact .It Pa utx.lastlogin -last login log; -see +last login log; see .Xr getutxent 3 .It Pa utx.log -login/logout log; -see +login/logout log; see .Xr getutxent 3 .El .Pp .It Pa mail/ user mailbox files .It Pa msgs/ -system messages database; -see +system messages database; see .Xr msgs 1 .It Pa preserve/ -temporary home of files preserved after an accidental death -of an editor; -see -.Xr ex 1 +unused, present for historical reasons .It Pa quotas/ file system quota information files .It Pa run/ -system information files describing various info about -system since it was booted +files containing information about the operating system since it was booted .Pp .Bl -tag -width Fl -compact .It Pa bhyve/ @@ -570,14 +541,12 @@ writable by the group for command connection sockets; see .Xr ppp 8 .It Pa utx.active -database of current users; -see +database of current users; see .Xr getutxent 3 .El .Pp .It Pa rwho/ -rwho data files; -see +rwho data files; see .Xr rwhod 8 , .Xr rwho 1 , and @@ -585,29 +554,28 @@ and .It Pa spool/ miscellaneous printer and mail system spooling directories .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width "clientmqueue/" -compact .It Pa clientmqueue/ -undelivered submission mail queue; -see +undelivered submission mail queue; see .Xr sendmail 8 .It Pa ftp/ -ftp root directory; -see +ftp root directory; see .Xr ftpd 8 .It Pa mqueue/ -undelivered mail queue; -see +undelivered mail queue; see .Xr sendmail 8 .It Pa output/ line printer spooling directories .El .Pp .It Pa tmp/ -temporary files that are kept between system reboots +temporary files that are not removed by +.Xr rc 8 .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width "vi.recover/" -compact .It Pa vi.recover/ -the directory where recovery files are stored +.Xr vi 1 +recovery files .El .Pp .It Pa yp/ @@ -618,8 +586,8 @@ the NIS maps; see .Sh NOTES This manual page documents the default .Fx -file system layout, but -the actual hierarchy on a given system is defined at the system +file system layout. +The actual hierarchy on a given system is defined at the system administrator's discretion. A well-maintained installation will include a customized version of this document. From nobody Fri Jul 7 19:13:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN81ttkz4lSKD; Fri, 7 Jul 2023 19:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyNN811qGz3kS8; Fri, 7 Jul 2023 19:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MsX3PABwK2INPNWpIk18dDohJ0n76GdTyqwsGtGuBDY=; b=I9dyu2BYiL/ieQ/rz2cGWA4LSwmhR3UwZrWVy3K+0IuZU4FBLOo7qB35qn4b/B941PQCU7 PcaOkF3GLeOwRhJs+NmORi1ctN7j9yaeel5aB3MiVYWEXpQgOoQp5V7ZyTcrxm+jDN9Q7+ K9MZB9Qp4XnG+hcuyc7KK0pU5BKtPbs9BuIsGmtnJ/IWe2ARO8ROdtClFU/cIxd7uqlPBZ euFO0ngnVss7cwK1OVatpAjDrxC6DHz9e475UShoe6XQDUzG/33z/MeWCGmo5E1bcKr6+j J03ewKVfMC19UIKPpcXNYcrzXTk31VHVDkO+lt2laIUf31a+1NXPdSUtXRsDuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MsX3PABwK2INPNWpIk18dDohJ0n76GdTyqwsGtGuBDY=; b=fUSnVtNGelCzuJtdXB7hRvkJFJA8h4mxShTs1zrsyNGHilcw38jc30va86DPdd1eVXrIj2 vgEprmrnFqNYuKBFQAkrlPcGcMEz2O9FVgacq3hqp5csczCreX5v4Rnbp3WJ4gm04X7xcD HA4PWVtPcb1LuBkp07Vwkgos2t70t0t/eF6G2QiEniypnHAOrrfS5rMcfnUBA2WfOK1PWv ZgD88Ii665eOknLFUnq2Ys0VQk7RKyVO/3ydlskRXCaYG00s04cQ4mLnDHpF6Ik+/Xjtj3 5Zdc+1dA7TEpj7jZr25wDJmHil7cul3rfJm6M/L86di+qSwteH1JucWJbGIuIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757208; a=rsa-sha256; cv=none; b=TMQRmgenPBunh+5f2wSNhUNxtwAPh1FeYGoRjHkMad3UzZ2kfZmnwfT5SwPleqeHxImZkS s+egKD3kuRgAsdx2krAFO0OEWeXxa48EBjlPTgHgRNDz61jzK4BtQNHQ1uWV9lmxvJhHix 8+5fSu6HWFSFF3tFfWdElFbEhbwLTWGPOaIIlx3eWGdhdVMCUs4RTrGED7ArceeAebiHXb 41r5ToN3bm2XY8TIv8M24C+pmXTA4arebi4eSkmX6cPQop2QMFAx6BBvp1NTkoGdC03AoP TMhdH87sTY6CkBUOBMDYvg7gklFdDv0f/VVpjOzz1SNx9ma1WEqRUkf6h1Jfnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN803L4zqfr; Fri, 7 Jul 2023 19:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367JDRtG046005; Fri, 7 Jul 2023 19:13:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDRoe046004; Fri, 7 Jul 2023 19:13:27 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:27 GMT Message-Id: <202307071913.367JDRoe046004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: ac2e58110f63 - stable/13 - hier(7): tweak /media description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ac2e58110f63bd28cac516685fbb38086071b47b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ac2e58110f63bd28cac516685fbb38086071b47b commit ac2e58110f63bd28cac516685fbb38086071b47b Author: Mitchell Horne AuthorDate: 2023-06-28 16:21:28 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 hier(7): tweak /media description It comes as an empty directory by default. While here, use a serial (Oxford) comma, per the FDP Primer. PR: 261349 Reported by: karels Reviewed by: grahamperrin, karels Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40774 (cherry picked from commit acdf666147eea8bf8626d3733087861493d90e23) --- share/man/man7/hier.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 0ccc3679b91e..38da58fec3bd 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -160,8 +160,8 @@ system utilities that are critical to binaries in and .Pa /sbin .It Pa /media/ -contains subdirectories that are mount points for removable media such as -USB drives, CDs and DVDs +empty directory commonly containing mount points for removable media such as +USB drives, CDs, and DVDs .It Pa /mnt/ empty directory commonly used by system administrators as a temporary mount point From nobody Fri Jul 7 19:13:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNN940Pgz4lSKF; Fri, 7 Jul 2023 19:13: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 4QyNN91r6Fz3kSV; Fri, 7 Jul 2023 19:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4oopW95f3mhblclQm3bvmwWSz/aOfE83seu3mDFXru0=; b=aLsmtRlwSZulMMPhl8N+Mf4axCP3lE8pl2Qon6vT+Yq2dWsze3fUz+q73rFgXTNMH0dzyx JZXJaay9rmaCa+n/S58cZeiPF3axP3Btuwe9pNzbBitinqS6j6sR7h+7ByjXEC/ueVWl/f w98WOD/XXMbNUx5bsGr22ZpmYrktb02YbllB+TipQjHmxtMiw2MFIqkmqWuI8ZA+IT9drq pI2QE6CSU9j+edG4qshza4XliBxnyggGEA6hGjllyZNQ03f5eUBwfDH9wMO050eKrWQuy+ OigxM+uU6lFpDyCkrSyduCnPmr/BQ+PgTVh9HVBf301aquOvqYJCxm0m1L97Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4oopW95f3mhblclQm3bvmwWSz/aOfE83seu3mDFXru0=; b=Ur39LNS4imBREC31FY85598NetlKjmMe79GkVOcdOrtpNsqCc8EuWDOIEhvBxktI1JGi0e 2R6qD56tAdhPJVMUHIQoPcbB8807Rg6A7UhYyK6vvHvXvTsN0zpLEBrevfCyV55AYrkDM0 ZM+F7LB05wbB3iJlyKnUg4rl+Qzgqz+VbpzTCojNIKAl0jUieDsYIHb/WDYwnrvayFds8p vJR+/19wWuVOYp/PLNX3Qohkcz8nV/4iKxo9f4hbDuEH283MAQNp1AtthkpnAGkCgyCnaY ZA6D5rK2v6RFMoS078JlpTT71cUcEpb36gkz0Oroe55BR3HOs4W6jONm4JkkCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757209; a=rsa-sha256; cv=none; b=Rxa9uQbZqejuO7ejYrVgQSTM/2Z4j05xomdHIKTnZxVkyEA/jHkbNSoo43E4nwU5JUOmfd v6wd3xvqWZUiCp+BARo9TZJCEOnJg6LhW3kB23i5NdKTJm23bbRRUAeLFJxmF95IXwX3sK 4LpJL0ZVF8BKJAiUhIdaYLFZy6s55khsEn8ujzAHVLs+bMIqhcSAr1IrMRQUonGnbgur/3 2ZaGge8iQLtwfQhB/59uY9oniuu3D8pWUpHF9++IzIowPtkG5StW2oqxZXNdJooDoIOTvY hhTTnO4LMzeoHpef0h7t3q2Prive/8ccMJ4vtCd8tkaima2D9re2ijsxrgBU6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNN90y8Gzqfs; Fri, 7 Jul 2023 19:13: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 367JDTiV046030; Fri, 7 Jul 2023 19:13:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JDTYY046029; Fri, 7 Jul 2023 19:13:29 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:13:29 GMT Message-Id: <202307071913.367JDTYY046029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: e3a1fe9acad9 - stable/13 - hier(7): adjust overlays/ subdirectory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e3a1fe9acad96afbcecae1cd7f677ae64a93f89d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e3a1fe9acad96afbcecae1cd7f677ae64a93f89d commit e3a1fe9acad96afbcecae1cd7f677ae64a93f89d Author: Mitchell Horne AuthorDate: 2023-06-29 16:53:52 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:13:02 +0000 hier(7): adjust overlays/ subdirectory Device tree overlays are installed in /boot/dtb/overlays by default. Adjust the comment to mention fdt_overlays and loader.conf, but do not repeat what is said in the parent directory's description. PR: 261349 Reviewed by: grahamperrin, kevans MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40785 (cherry picked from commit 651d1efd96a692a141a4c61d54d6a41ee2c0d851) --- share/man/man7/hier.7 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 38da58fec3bd..c4097795cf5c 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 27, 2023 +.Dd June 29, 2023 .Dt HIER 7 .Os .Sh NAME @@ -54,6 +54,15 @@ compiled flattened device tree (FDT) files; see .Xr fdt 4 and .Xr dtc 1 +.Pp +.Bl -tag -width "overlays/" -compact +.It Pa overlays/ +compiled flattened device tree (FDT) overlays; these can be applied using the +.Va fdt_overlays +setting in +.Xr loader.conf 5 +.El +.Pp .It Pa efi/ mount point for the EFI System Partition (ESP) on UEFI systems .It Pa firmware/ @@ -65,11 +74,6 @@ and kernel modules .It Pa modules/ third-party loadable kernel modules, such as those associated with .Xr ports 7 -.It Pa overlays/ -compiled flattened device tree (FDT) overlays; see -.Xr fdt 4 -and -.Xr dtc 1 .It Pa zfs/ .Xr zfs 8 pool cache files From nobody Fri Jul 7 19:20:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNXq2WMYz4lV0K; Fri, 7 Jul 2023 19:20: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 4QyNXq23h1z3nxr; Fri, 7 Jul 2023 19:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SIi4RhA7CrYJA9fchcF2GJ6EiXSAAhXPq6NqwM9c2fE=; b=QFJkQofRQYG8xMJyOTkqNUxHLrI3Hkp/fJ2OgSlH9LWGvrjP8ycTxBTrWOE0AbePotfAIM djpL14V83FaEmOX8YVLqpLrkiph8qTtIC52j+WwYW+IhgmquH3/48aH7TMLpy+UQ3V5y2C HTpeAg2qooemku5NAQiduaLMUguFwB5lhi6lRA5TT4a/H7qCFv6MSV9pW+LCL1/whJml0c aqJfxDpfvss7uFAgiQo9NoG00TES/ugiq2K6XIh7ELGxHKieJMOgD5sT+golQPpdSV1xWF eAZ8CM6oH1CHaN9jjMY83CwKkHtlQZdT76aQch02IglTHY/VOZDLQifbvXilsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SIi4RhA7CrYJA9fchcF2GJ6EiXSAAhXPq6NqwM9c2fE=; b=C9A4LymCcdmQCPjq86M6hPvIcmQ4HOtlClEC8l4dV4KRTQaPi9SbRahe/J00TcRLAowvy9 lBVXYWjpcH+YeHir7GLa8htMavBImjLGaDRNXC/Ai0f03fPkFBGpgy3UEe/zvo6U8pI+s4 XoSs9RfWK/u1+YrwfxMwb6aG9eLbZQ/dYQj4fg0LF2xstbYfTn1fyw4+JkJVGpZqGTC/Hz 5zoLucS5/QR3KxiR+X7cyIVXyBNxhWmMH+9GDhLKXTU/+Bd5XNc5JI/Ve7wlY0x7E/pqyx fdK+aHcCQgo7eaDda4qXqgjGaRognRx0A86JPdcqM9w+kRDwmpfaZlM8oj9+kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757659; a=rsa-sha256; cv=none; b=OFyiRgIBGcOlvojhfmC76VrziTGaMDQX5zlquWFFyAwq1Nzwb6ClH7lNRB3mNyXqDF3GQj Py7UD0i/nEEUBP6boumF/bkBI3ZMbfmQgUsyzxo9tsmKGV9RK9D0MSSLQLY1f9hb4Y/yBp EM1yDuCEJp4d0KZ8/h1hTuJn0Fw07aEArdaiXBGLsYQ6wad6M5UTDgKdk+dcIzvnBygplW wZ44slDZp8QMzQu8BcU1gQWLPUnVz5QgOi+Mcc0b1LzlXKVnb/Cvo/uc2zgctylOWoUqQ3 aR9Fu+NG1LBn7aQA5zRgsfh200vhNnZrbw2Evmi4DZzOCcf3vbnh/0SB+DL79A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNXq15bmzqtl; Fri, 7 Jul 2023 19: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 367JKxlT058040; Fri, 7 Jul 2023 19: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 367JKxoJ058039; Fri, 7 Jul 2023 19:20:59 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:20:59 GMT Message-Id: <202307071920.367JKxoJ058039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: aa8567656e7c - main - bsd.compat.mk: Fix indentation for alignment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa8567656e7c2acf5a9e436195ba5dc47f279ac6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=aa8567656e7c2acf5a9e436195ba5dc47f279ac6 commit aa8567656e7c2acf5a9e436195ba5dc47f279ac6 Author: Jessica Clarke AuthorDate: 2023-07-07 19:17:19 +0000 Commit: Jessica Clarke CommitDate: 2023-07-07 19:17:19 +0000 bsd.compat.mk: Fix indentation for alignment Fixes: 91d7edd549f5 ("Generalise libcompat to be a list rather than a single option") --- share/mk/bsd.compat.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk index 388a687e695b..444a25101357 100644 --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -115,8 +115,8 @@ WORLDTMP?= ${SYSROOT} LIB${_LIBCOMPAT}_OBJTOP?= ${OBJTOP}/obj-lib${_libcompat} LIB${_LIBCOMPAT}CFLAGS+= ${LIB${_LIBCOMPAT}CPUFLAGS} \ - --sysroot=${WORLDTMP} \ - ${BFLAGS} + --sysroot=${WORLDTMP} \ + ${BFLAGS} LIB${_LIBCOMPAT}LDFLAGS+= -L${WORLDTMP}/usr/lib${_libcompat} From nobody Fri Jul 7 19:25:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNdX2W6hz4lW4h; Fri, 7 Jul 2023 19:25: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 4QyNdW6lRzz3qJ2; Fri, 7 Jul 2023 19:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lonBKT7EGTUazlAOFE/g79knPONEyLHUu/Q2tBj4GMk=; b=OuvqQWdQH61F07tKPwYE0ffmXglgpVlFKhixu2FMqauGZLQCD6mLJH0xHgkC//jTj7W7Cx T8VvQ8yP65Zpbgd7orsP8J33f9NMO6fVAv0CSedC5UVFVxIQXthJCjlzzLas9qdALwyYd0 lZOKX3xnBbdc7KN5wo92RBz/A3ArqfqTvwtQuoMqwddHYFndk0mv493EtCsUb/bg3BbztW S7/PnBDqlvIAvSmuGUsOFy5wigdrzMj82FHN93PZGiTelIhI8GP4DhVLJlMT64y4vmXggI 7K2OpjBa4PJmQu8danQSAWyYx0oauX3r2xoQNNkrITz0898w00CY7uYm+gcBaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lonBKT7EGTUazlAOFE/g79knPONEyLHUu/Q2tBj4GMk=; b=WFjkO1PKI4y2zVPAtuiCRJAyaiRw/mRqQJJbxRtpVGxYSZ2gX2XkYBxS2C5II8K/ElD4xt p94KjmK4NqUgRB/GVsE4xjH6KrcGzYl8UWN6CSB0G0r38d2UWbNAmu8D4OE4BxOSj+3qXj DOcYOsu1yCJmEtJ+44zRg4kMdLU3O4bUCSM2XFi2hKKU14/B1wcilN5jdxutd0q6AsF7AB jNZG8S29yLSbbDvyCpVBN/fePZTCqFIEM4AhYu8HeRIAIQlvyuFYitPmRZKwHH7D1KHi1S GUxFGK2GzzlHbOwQa5GdtagatEFpkXn2fR0QMkBpCI3lLvyy3mmsTaqPBe38mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757903; a=rsa-sha256; cv=none; b=tbeHLIm+Jsk58E5c83JKG4RgIMUZNTB4EAvzzqBcMMnv6mqMQILA44Pa9oOsqbWVNvEMb1 +PpzH5ziZqk2pLeAuMookPsUQ2wOYWQ9TnnotWw+fsbJB/s4qPtticAUUv+aEmyR097X+g l314ucoOI+j2oI9QCPOyNSrE840qQKaj7sToEfzScZpLf0Qsex/u2jIacByjKJtIxkXYNp cK1xDimV70BIi/TrHPwmwL65AWDENLSTmj5wi2t3u6LwQkuJLCXvx3pPYno2/AXyC47Fb2 Lcw8ANnCm+rZFtzsBhzWU/r05zbYTNYZNy5urNRlVgWl1gOwqH/z/X+lhZLpoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNdW5pGVzrBB; Fri, 7 Jul 2023 19:25: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 367JP3j7062285; Fri, 7 Jul 2023 19:25:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JP3GT062284; Fri, 7 Jul 2023 19:25:03 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:25:03 GMT Message-Id: <202307071925.367JP3GT062284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 7b1b44551ff9 - stable/13 - arm64/disassem.c: Add shifted register definitions with ror List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b1b44551ff9bc71031a8faebf7c560427f67880 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7b1b44551ff9bc71031a8faebf7c560427f67880 commit 7b1b44551ff9bc71031a8faebf7c560427f67880 Author: Mykola Hohsadze AuthorDate: 2023-06-17 15:31:25 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:20:50 +0000 arm64/disassem.c: Add shifted register definitions with ror Add disassembly support for the following shifted register instructions: * mvn * orn * orr * and * ands * bic * bics * eon * eor * tst According to Arm64 documenation, operational pseuducode of shifted register instruction must return `UNDEFINED` if shift type is `RESERVED` ('11'). Hence, removed "rsv" from `shift_2` array and add "ror". In case of shift type is 3 and this type is `RESERVED`, we will return `undefined`. Reviewed by: mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D40386 (cherry picked from commit 9aef25d2686b9e7fb9cb700d63291338e8e30bb6) --- sys/arm64/arm64/disassem.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/disassem.c b/sys/arm64/arm64/disassem.c index f1a4f9206c1b..5dc0bf5100ef 100644 --- a/sys/arm64/arm64/disassem.c +++ b/sys/arm64/arm64/disassem.c @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #define OP_RT_SP (1UL << 8) /* Use sp for RT otherwise xzr */ #define OP_RN_SP (1UL << 9) /* Use sp for RN otherwise xzr */ #define OP_RM_SP (1UL << 10) /* Use sp for RM otherwise xzr */ +#define OP_SHIFT_ROR (1UL << 11) /* Use ror shift type */ static const char *w_reg[] = { "w0", "w1", "w2", "w3", "w4", "w5", "w6", "w7", @@ -69,7 +70,7 @@ static const char *x_reg[] = { }; static const char *shift_2[] = { - "lsl", "lsr", "asr", "rsv" + "lsl", "lsr", "asr", "ror" }; /* @@ -232,6 +233,28 @@ static struct arm64_insn arm64_i[] = { TYPE_01, 0 }, /* negs shifted register */ { "subs", "SF(1)|1101011|SHIFT(2)|0|RM(5)|IMM(6)|RN(5)|RD(5)", TYPE_01, 0 }, /* subs shifted register */ + { "mvn", "SF(1)|0101010|SHIFT(2)|1|RM(5)|IMM(6)|11111|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* mvn shifted register */ + { "orn", "SF(1)|0101010|SHIFT(2)|1|RM(5)|IMM(6)|RN(5)|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* orn shifted register */ + { "mov", "SF(1)|0101010000|RM(5)|000000|11111|RD(5)", + TYPE_01, 0 }, /* mov register */ + { "orr", "SF(1)|0101010|SHIFT(2)|0|RM(5)|IMM(6)|RN(5)|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* orr shifted register */ + { "and", "SF(1)|0001010|SHIFT(2)|0|RM(5)|IMM(6)|RN(5)|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* and shifted register */ + { "tst", "SF(1)|1101010|SHIFT(2)|0|RM(5)|IMM(6)|RN(5)|11111", + TYPE_01, OP_SHIFT_ROR }, /* tst shifted register */ + { "ands", "SF(1)|1101010|SHIFT(2)|0|RM(5)|IMM(6)|RN(5)|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* ands shifted register */ + { "bic", "SF(1)|0001010|SHIFT(2)|1|RM(5)|IMM(6)|RN(5)|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* bic shifted register */ + { "bics", "SF(1)|1101010|SHIFT(2)|1|RM(5)|IMM(6)|RN(5)|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* bics shifted register */ + { "eon", "SF(1)|1001010|SHIFT(2)|1|RM(5)|IMM(6)|RN(5)|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* eon shifted register */ + { "eor", "SF(1)|1001010|SHIFT(2)|0|RM(5)|IMM(6)|RN(5)|RD(5)", + TYPE_01, OP_SHIFT_ROR }, /* eor shifted register */ { NULL, NULL } }; @@ -420,6 +443,8 @@ disasm(const struct disasm_interface *di, vm_offset_t loc, int altfmt) int pre; /* Indicate if x31 register should be printed as sp or xzr */ int rm_sp, rt_sp, rd_sp, rn_sp; + /* Indicate if shift type ror is supported */ + bool has_shift_ror; /* Initialize defaults, all are 0 except SF indicating 64bit access */ shift = rd = rm = rn = imm = idx = option = amount = scale = 0; @@ -464,6 +489,8 @@ disasm(const struct disasm_interface *di, vm_offset_t loc, int altfmt) rd_sp = i_ptr->special_ops & OP_RD_SP; rn_sp = i_ptr->special_ops & OP_RN_SP; + has_shift_ror = i_ptr->special_ops & OP_SHIFT_ROR; + /* Print opcode by type */ switch (i_ptr->type) { case TYPE_01: @@ -479,6 +506,13 @@ disasm(const struct disasm_interface *di, vm_offset_t loc, int altfmt) rm_absent = arm64_disasm_read_token(i_ptr, insn, "RM", &rm); arm64_disasm_read_token(i_ptr, insn, "SHIFT", &shift); + /* + * if shift type is RESERVED for shifted register instruction, + * print undefined + */ + if (shift == 3 && !has_shift_ror) + goto undefined; + di->di_printf("%s\t", i_ptr->name); /* From nobody Fri Jul 7 19:25:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNdZ54Hwz4lW4m; Fri, 7 Jul 2023 19:25: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 4QyNdY0YhCz3qJ4; Fri, 7 Jul 2023 19:25:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V9jWKoLs0DE6gXLcMDb7DbnU0H9rDwloxRAtVEORcoQ=; b=XQb/6wUHyRK8iuSusdm5JhJHl7UMY63Z6z3Gd0IDVomdFA/+4PLCk+WTcAYbuP6ShPvRf2 RODGcaaBcqRFAP8d9pRcPzv57vWaDL/d1rnbBPThQggg25G4qj5ZS5kuRiBTdvagPPKJ9M U8hak+cuI6ZApKsUyqau8r5jdAl+EKxFZA8K3E/NB3ms13F1P3B95u181qh+LCqnIpytsV V7NkAjjHlLmsqmMUa0yKjw8XRyLwZTLg2oQSKdw4Qa4BpKkljsJX9tQiPzhPVbXh9bvkGN BrfWlT5Ps76PUqLGLuJB6JuJrEF6m5190mxYGfWuocj5YJhlDBYJFTvJFQ+Zvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V9jWKoLs0DE6gXLcMDb7DbnU0H9rDwloxRAtVEORcoQ=; b=wbJ7clD6eTP+VnmBv/bddt/jKwJByHyBGVjaR0PjWmE6V34NfF8aFYKdmaQdNVrS55/fQ2 UjkHFgMYPFDpuEq1KpV2I7T0pcmtVtnKc6CjdCqe9orE2RdVwubOf5MBoyrKvwxDAdSTrX Mp8k1JDIPiIWizycp3J0A4f63cSwgPNF4WJzLSowOnLYDmftV6Nsw/ocR+tfFAIVvKXbwj 0oBP8YjwnlT2nixmdFC46eJuYeFycuKHW/Ct5AIqcOeQv3ylEWDZUyX8VmtBzH/+i+DQG8 IWitLpq4lAbVNau98ktCutR6CB9kz3FCR2BksiEiXfFduS7yNHNShYBnWW/wxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757905; a=rsa-sha256; cv=none; b=PRA/33M76dCRoe8F5xUGQRwJS38/KPIniW6i1t10p5XLXW/2tJSplYpgn927wJAGvFd7TQ mW0qhTZqorBCQjv0bit637YHj52yL7+9D42XnoU8nkk7o1/zkFszWetIuKiEUfYrPmERv/ k1Oepwe61HVi/d/eORwzSiQ6gsrA+Fp8WyQ7mqQLTk2zriq7TniY3IbXD5bPbLqDoU1hMF Ws2/nXSDDE8lvfV9r/thTWS949xw3eOcTrK672/WIdbRMeVtiG7aljA9mW9DvSL0uRHpK0 XEs0ZOWxcsYdj3SJj48ZmT3QYoU8vlDm9YGzfKwxZTVT9rWWrdV0CQPVI6ehsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNdX6k07zrDZ; Fri, 7 Jul 2023 19:25: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 367JP4Il062306; Fri, 7 Jul 2023 19:25:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JP4bQ062305; Fri, 7 Jul 2023 19:25:04 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:25:04 GMT Message-Id: <202307071925.367JP4bQ062305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: eb08efb821fd - stable/13 - amdtemp: Fix missing 49 degree offset on current EPYC CPUs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eb08efb821fd7d3ee599d65c704fb88c28c57842 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=eb08efb821fd7d3ee599d65c704fb88c28c57842 commit eb08efb821fd7d3ee599d65c704fb88c28c57842 Author: Val Packett AuthorDate: 2023-06-17 16:29:53 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:20:50 +0000 amdtemp: Fix missing 49 degree offset on current EPYC CPUs On an EPYC 7313P, the temperature reported by amdtemp was off, because the offset was not applied. Turns out it needs to be applied with one more condition: https://lkml.org/lkml/2023/4/13/1095 Reviewed by: mhorne Tested by: mike.jakubik@gmail.com MFC after: 1 week Sponsored by: https://www.patreon.com/valpackett Pull Request: https://github.com/freebsd/freebsd-src/pull/754 (cherry picked from commit c1cbabe8ae5702a1e54d62401fe3b58a84fcb3e4) --- sys/dev/amdtemp/amdtemp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c index 493f619c0427..238ae572d096 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -165,6 +165,12 @@ static const struct amdtemp_product { */ #define AMDTEMP_17H_CUR_TMP 0x59800 #define AMDTEMP_17H_CUR_TMP_RANGE_SEL (1u << 19) +/* + * Bits 16-17, when set, mean that CUR_TMP is read-write. When it is, the + * 49 degree offset should apply as well. This was revealed in a Linux + * patch from an AMD employee. + */ +#define AMDTEMP_17H_CUR_TMP_TJ_SEL ((1u << 17) | (1u << 16)) /* * The following register set was discovered experimentally by Ondrej Čerman * and collaborators, but is not (yet) documented in a PPR/OSRR (other than @@ -732,7 +738,8 @@ amdtemp_decode_fam17h_tctl(int32_t sc_offset, uint32_t val) { bool minus49; - minus49 = ((val & AMDTEMP_17H_CUR_TMP_RANGE_SEL) != 0); + minus49 = ((val & AMDTEMP_17H_CUR_TMP_RANGE_SEL) != 0) + || ((val & AMDTEMP_17H_CUR_TMP_TJ_SEL) == AMDTEMP_17H_CUR_TMP_TJ_SEL); return (amdtemp_decode_fam10h_to_17h(sc_offset, val >> AMDTEMP_REPTMP10H_CURTMP_SHIFT, minus49)); } From nobody Fri Jul 7 19:25:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyNdZ60C0z4lVy9; Fri, 7 Jul 2023 19:25: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 4QyNdZ1mFDz3q4v; Fri, 7 Jul 2023 19:25:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ArK7XRQ/RgzVxOGVnhyJJ3NkJuQknzkyen3lNniamuc=; b=mkNfItwBcvfm9pn2D8DDqLuH0Ou6MXwlWMd/cOy3FN1Zha7mmGuqJ1N017Fgf30owxPyjl R4dwBCmChU08zEm7Ffw7HWOK7cQccTVOBx4pn/DGQYM46V+/W+UPlEbSKwykQC3Lr3WYNh I6BYbAbQ8tsshASHYB0xZkap669c28S3HupEyQYie/uFskedGC1ks8gnYDKmdrImnK1eZ5 pyaVaqHxrozlWe/2gp3CYyTjPHCfcAegn+smB28DaBb+N2vZvfzRDKZuzzQxrgx6IgE1eF IIZpOatbkLJ84FauHX7ylstoIqtiVFciknucg0BWR3aDVk8rtMwDN1xikagDHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688757906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ArK7XRQ/RgzVxOGVnhyJJ3NkJuQknzkyen3lNniamuc=; b=WzqXNt7QKA/61w0+Qf6JEEORU23TrJN6RBSpRw+6o6zNqRrA68M1xizJAC/0W5cqFqP4xC 0hTWfy6FCAXY893zGdxAwS9LFLQbgGIY4IDAU29GtwcWEQOfegXlrK4Rwlp/0sS5Vz6Kk9 CzvZz+mMjB9A0GQon0EDAWTQuBAbeuCJjbdv2YnKYsm/J0mBzjdGVDOI36tcbb2PGzhpHg PuxszpHoERKLolJopmn/btKIdtYpsReLYN2CJ3MqpEx4LsHKxBsfcSz6ujnJiMpr7kOGdY p0oAvJQUiQ6xKkV+tNx2KTgB5bJLqxXg16DqY/NpSl2+GcXdTDdLE8nxGeEwRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688757906; a=rsa-sha256; cv=none; b=UqVG25J9t53Nmv8yAKM4KhD9rC89UPmdIJFsp+QbsBaFU9CxY5mdwnVfvvRxoqMBP0TjA3 Jyy3ai/mNDvPze0i5u6ajpFqo+XPzOoSUstAynVwVFc8GnttZ5HYduBcpSqNaK35zNvMQ+ CazEun+N1bBJMdIqfnpiRflefWXBYYeJ4Uo2dp2HgL0i5dZRNROQLew6ofMUNdAzMf4BRW OWBL21BDqc82riSP/YuaAaRRY/oIacBUlaJUTu64PAsspfjUGHb4KAREHQBTENhaexJiX/ 0LUwXBZSok75i02UCoqoSeJfT9a1Mj+9Y1zORe3qqET72KIqeT44fDPjO7kg3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyNdZ0XgWzqvC; Fri, 7 Jul 2023 19:25: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 367JP5fE062330; Fri, 7 Jul 2023 19:25:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367JP5p7062329; Fri, 7 Jul 2023 19:25:05 GMT (envelope-from git) Date: Fri, 7 Jul 2023 19:25:05 GMT Message-Id: <202307071925.367JP5p7062329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: dfea72b70f3f - stable/13 - riscv: improve KTR_TRAP trace entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dfea72b70f3fd83426d71252fa33f8f04b3d90c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=dfea72b70f3fd83426d71252fa33f8f04b3d90c9 commit dfea72b70f3fd83426d71252fa33f8f04b3d90c9 Author: Mitchell Horne AuthorDate: 2023-06-20 14:52:26 +0000 Commit: Mitchell Horne CommitDate: 2023-07-07 19:20:51 +0000 riscv: improve KTR_TRAP trace entries For more informative records of exceptions, include key details such as the exception code and stval register contents. Remove the curthread argument as it is redundant (saved with every ktr entry), and the trapframe as it is somewhat meaningless. Add a new KTR_TRAP trace record for interrupts. Reviewed by: markj, jhb MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40584 (cherry picked from commit 7756232199adf60343ae0b940e2b27fe363905bc) --- sys/riscv/riscv/intr_machdep.c | 3 +++ sys/riscv/riscv/trap.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/riscv/riscv/intr_machdep.c b/sys/riscv/riscv/intr_machdep.c index d84f4ea1cb91..1ee2c0984205 100644 --- a/sys/riscv/riscv/intr_machdep.c +++ b/sys/riscv/riscv/intr_machdep.c @@ -163,6 +163,9 @@ riscv_cpu_intr(struct trapframe *frame) active_irq = frame->tf_scause & SCAUSE_CODE; + CTR3(KTR_TRAP, "%s: irq=%d, umode=%d", __func__, active_irq, + TRAPF_USERMODE(frame)); + switch (active_irq) { case IRQ_SOFTWARE_USER: case IRQ_SOFTWARE_SUPERVISOR: diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index 4da6c9d21502..9e75f0e0530d 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -292,8 +292,8 @@ do_trap_supervisor(struct trapframe *frame) return; #endif - CTR3(KTR_TRAP, "do_trap_supervisor: curthread: %p, sepc: %lx, frame: %p", - curthread, frame->tf_sepc, frame); + CTR4(KTR_TRAP, "%s: exception=%lu, sepc=%lx, stval=%lx", __func__, + exception, frame->tf_sepc, frame->tf_stval); switch (exception) { case SCAUSE_LOAD_ACCESS_FAULT: @@ -366,8 +366,8 @@ do_trap_user(struct trapframe *frame) } intr_enable(); - CTR3(KTR_TRAP, "do_trap_user: curthread: %p, sepc: %lx, frame: %p", - curthread, frame->tf_sepc, frame); + CTR4(KTR_TRAP, "%s: exception=%lu, sepc=%lx, stval=%lx", __func__, + exception, frame->tf_sepc, frame->tf_stval); switch (exception) { case SCAUSE_LOAD_ACCESS_FAULT: From nobody Fri Jul 7 19:43:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyP3L4kzkz4lbBJ; Fri, 7 Jul 2023 19:43:58 +0000 (UTC) (envelope-from kp@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 4QyP3L40Ysz3tjY; Fri, 7 Jul 2023 19:43:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688759038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JhBtYtZZIm/CLH8/vfgEHQmSxC3+2EnzS31yraVbOzI=; b=jDfTRVIEV5GCCBkuBmGCYQyz0NZxrVvFoGv1OzFZXIXGoP9JUl2IDWQtHZdO6gcy6PnB2/ 4+4nJ1ktrLBR4o0zVxKX3NwBdOAjg85xZP5zFQOWKsDltqfklJrTDrg+PPTWOX9/L176Wl S5ENx5Kq3NEQa/sKud7Ido/ds4YITSRb/1o4qHToyMCEtVkFtF+L5cWCoymOChnVzH3XaS ggukfvj/JKpYm6FW9XNeg4tns9+r4pj1jXWvYKzOWYql3bSYyYHnQ1vJcuDyTlVjr4JJTS 9axdT6c885MvtqzkgXzIigOsqmOqUg0VFIhlKGjO7jqIgcYjGlzue99KsmeGyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688759038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JhBtYtZZIm/CLH8/vfgEHQmSxC3+2EnzS31yraVbOzI=; b=C4e3Y0eLdW9suu51j9+V/XD2v0eBCF934E0e0mvNgeLaNCoRJ9PW4wJy+qCguNBAeSr5Ru LT1xu2Yl4RIwM1x1IHNLgLv216FNxFHcNjZLhs+D6VRfYWgk46Fni34VXeqAvDv/xe35uh 73de9FTWIqKY+/fYb9nPHus6QTlnF5psEQJFXcToLqCeKYR4AaE7tOzFRrBJNUI04m1Ml1 Bx8Ha8g4KDBFyWzGkMtjve41mzPnPGkhqJMv784v+baDJQlechIO+uKBG4EbyC17h+1zac pyDfAYMps5JUAheijnfC0weuMbzCT51wnFzLBILnHLpRajegnt9UX2cct9XksA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688759038; a=rsa-sha256; cv=none; b=cZ0r8u8WKbfqhsSQVHgu78e3vU3Kj86lLv9friWKa0xvXa65kkcP6HCUO9DrM9tGBficWB /ar4uxJW+N9q84udOAxmAr42eTcOjEJrh1HqC1ZWtZXe1ji1UDd/+EowTPoAJbYM+f1lbk YnIXf8hjZK1s2aY0nn/6qZrMmX04kNJsLmYYNfWJZy0RqynB2SDBYkRggDs7Kpme6wumlE 8jkjFGaMUsYtIV3V+QhDCMTRc+NL1sX37szF/yN/Kcn0IHnMWnFVLuiT7QtncFE/HxBhGY jUzbxVcJQlQ0sMWUAaO2dblg/zEejtsftD+I3j4Wa81GMMLJNSJ6r8ieYYWu1A== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher 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 "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QyP3L2LSszmw4; Fri, 7 Jul 2023 19:43:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id AAB8131A85; Fri, 7 Jul 2023 21:43:56 +0200 (CEST) From: Kristof Provost To: Mark Johnston Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Pierre Pronchery Subject: Re: git: b077aed33b7b - main - Merge OpenSSL 3.0.9 Date: Fri, 07 Jul 2023 21:43:55 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <6EF29DA8-B987-4C98-826C-0128C43764C6@freebsd.org> References: <6EF29DA8-B987-4C98-826C-0128C43764C6@freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On 7 Jul 2023, at 19:52, Kristof Provost wrote: >> On 7 Jul 2023, at 18:35, Mark Johnston wrote: >> >> =EF=BB=BFOn Wed, Jul 05, 2023 at 11:56:42PM +0200, Kristof Provost wro= te: >>>> On 24 Jun 2023, at 1:19, Ed Maste wrote: >>>> The branch main has been updated by emaste: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Db077aed33b7b6aefca7b1= 7ddb250cf521f938613 >>>> >>>> commit b077aed33b7b6aefca7b17ddb250cf521f938613 >>>> Merge: b08ee10c0646 b84c4564effd >>>> Author: Pierre Pronchery >>>> AuthorDate: 2023-06-23 22:53:35 +0000 >>>> Commit: Ed Maste >>>> CommitDate: 2023-06-23 22:53:36 +0000 >>>> >>>> Merge OpenSSL 3.0.9 >>>> >>> >>> It looks like we missed adding a file. >>> Security/opensc doesn=E2=80=99t build any more: >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270076 >>> >>> It fails to find d2i_KeyParams when linking. The opensc code does thi= s: >>> >>> #if OPENSSL_VERSION_NUMBER < 0x30000000L >>> if (!d2i_ECParameters(&ec, &a, (lo= ng)len)) >>> util_fatal("cannot parse >>> EC_PARAMS"); >>> EVP_PKEY_assign_EC_KEY(pkey, ec); >>> #else >>> if (!d2i_KeyParams(EVP_PKEY_EC, &p= key, &a, >>> len)) >>> util_fatal("cannot parse >>> EC_PARAMS"); >>> #endif >>> >>> d2i_KeyParams() appears to be new on openssl 3. It=E2=80=99s defined = in d2i_param.c, >>> which we don=E2=80=99t build. I=E2=80=99ve tested with this patch, an= d that appears to fix >>> things: >> >> Hi Kristof, >> >> Would you mind posting the patch on phabricator? I can take a closer >> look in the next day, and Pierre might be available to look as well. > > Sure, but I might not be able to do that until Sunday afternoon. > https://reviews.freebsd.org/D40914 >>> Based on your analysis I think this should go into the OPENSSL_3_0_9 >> namespace? >> > I have no idea. I=E2=80=99ll try to dig a bit, but we=E2=80=99re pretty= far outside my comfort zone here. > Ah, I see what you meant. That should be fixed in the version in the revi= ew. Best regards, Kristof From nobody Fri Jul 7 20:01:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyPRf24LYz4lgXr; Fri, 7 Jul 2023 20:01: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 4QyPRf1ZVFz3x8H; Fri, 7 Jul 2023 20:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5abm/g988Tv+8zkvlzv3r2G/cd8Yh1Naaq/dm/BQ7/8=; b=VdXJ83j0G+C8EegqAy1GlqOg9B0rh9C1umIfECnsC9IH8kZv3zVB9btJzvd55E1bew9RME 97zZdxLD7VBVkpso1lYeXcXwHYVTqSa6gXpXOUZynzKFeRLGS+kalAcUIAghBuDdpaKwsK wuRU3T8nvdjM0WZhMRoDpUaERyZ+HJvIZwMWT4dXNnXQaIR0X0hWwk20SvIkCrT6Nc3/pA BcQ247EDbXXygDPo0m8n1o+8m5n3MES/2qxbaaH4jGkCN2GgCjF/FCaieCten6O5l3fIq8 T8gKi6UNit8hR9lah9+vr3Khtj0yn2caTrY8E1z7LSjaPqDmYDGOp2jTul67ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5abm/g988Tv+8zkvlzv3r2G/cd8Yh1Naaq/dm/BQ7/8=; b=d2Ly4N2DVYK4LxtewMv4XsII8eyeS2jWRYsu5/3ZteU7gx23ECf2DrxiW7GSePYJss1fCx ITQBgJ8W/MTyN6SvxLNjk1oBYFculb79fS9M8loyx5XNt9eD5R+5len/rGti/7FwnqnLq/ +S3m2Fg8R2aqx2M/cr6q+jpqTntdp8koLW9TKuZ4+R0NykhB7V5PU9jJ0AvCq6o5gpvztN UpaEpixPijF3Hs/+9r3bJbikfCrX0qmCbA1AkwM7WatHg1LjxPJwF1mzZA/eoRiqsxZuWK RlWnZKpbVrrcOgGw9+tvsjRlaR7Ym7QLr+dc/Xqc3vk4VFwV7j1syi5kFOMe+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688760094; a=rsa-sha256; cv=none; b=JSslNvG3jmCTmmzG7EFDCpqaFSiZ/a7bNVpJFOqGABnRhkInDGHbmXmcMsLmVPyI3Xqy3p 6TDB34tBufx29UnJHn0tYvDDRgtCiEBc7xI5tkCdj8hBkQmUCquQtxcdXB04vxFWq/HQQF c0PVvmRwoW8i5lZ6FBlDZ/O+eh4DmOVZAviii3OnI92uNQSH7MNzXh9uAUS1L+3afWQLP/ Aj9lqDPz5skrUOkPyprimOWdHaJ5RBwoqFyPKFKf9+A+SKxTMEWIN6wTDM1cJ1OzE9BQpT e7OyLXZiMLRAtSM/O3Gg7eLgOhRPD0YZGNegqVSNWwdxQDvSXmHuNJHuhMiFeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyPRf0Lglzs02; Fri, 7 Jul 2023 20:01: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 367K1XG7024141; Fri, 7 Jul 2023 20:01:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367K1XoU024140; Fri, 7 Jul 2023 20:01:33 GMT (envelope-from git) Date: Fri, 7 Jul 2023 20:01:33 GMT Message-Id: <202307072001.367K1XoU024140@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: 9ac841e922da - main - divmoddi*: Use separate statements instead of the comma operator. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ac841e922da86d4259add8bf64467f693b4f8aa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9ac841e922da86d4259add8bf64467f693b4f8aa commit 9ac841e922da86d4259add8bf64467f693b4f8aa Author: John Baldwin AuthorDate: 2023-07-07 20:01:19 +0000 Commit: John Baldwin CommitDate: 2023-07-07 20:01:19 +0000 divmoddi*: Use separate statements instead of the comma operator. Differential Revision: https://reviews.freebsd.org/D40835 --- sys/libkern/divdi3.c | 18 +++++++++++------- sys/libkern/divmoddi4.c | 20 +++++++++++++------- sys/libkern/moddi3.c | 11 +++++++---- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/sys/libkern/divdi3.c b/sys/libkern/divdi3.c index 8e04a81abdba..5800388a8704 100644 --- a/sys/libkern/divdi3.c +++ b/sys/libkern/divdi3.c @@ -47,13 +47,17 @@ __divdi3(quad_t a, quad_t b) u_quad_t ua, ub, uq; int neg; - if (a < 0) - ua = -(u_quad_t)a, neg = 1; - else - ua = a, neg = 0; - if (b < 0) - ub = -(u_quad_t)b, neg ^= 1; - else + if (a < 0) { + ua = -(u_quad_t)a; + neg = 1; + } else { + ua = a; + neg = 0; + } + if (b < 0) { + ub = -(u_quad_t)b; + neg ^= 1; + } else ub = b; uq = __qdivrem(ua, ub, (u_quad_t *)0); return (neg ? -uq : uq); diff --git a/sys/libkern/divmoddi4.c b/sys/libkern/divmoddi4.c index af0013532882..67a95b82d24b 100644 --- a/sys/libkern/divmoddi4.c +++ b/sys/libkern/divmoddi4.c @@ -44,13 +44,19 @@ __divmoddi4(quad_t a, quad_t b, quad_t *rem) u_quad_t ua, ub, uq, urem; int negq, negr; - if (a < 0) - ua = -(u_quad_t)a, negq = 1, negr = 1; - else - ua = a, negq = 0, negr = 0; - if (b < 0) - ub = -(u_quad_t)b, negq ^= 1; - else + if (a < 0) { + ua = -(u_quad_t)a; + negq = 1; + negr = 1; + } else { + ua = a; + negq = 0; + negr = 0; + } + if (b < 0) { + ub = -(u_quad_t)b; + negq ^= 1; + } else ub = b; uq = __qdivrem(ua, ub, &urem); if (rem != 0) diff --git a/sys/libkern/moddi3.c b/sys/libkern/moddi3.c index 0dbff4bdce89..60c3a85bb6e7 100644 --- a/sys/libkern/moddi3.c +++ b/sys/libkern/moddi3.c @@ -47,10 +47,13 @@ __moddi3(quad_t a, quad_t b) u_quad_t ua, ub, ur; int neg; - if (a < 0) - ua = -(u_quad_t)a, neg = 1; - else - ua = a, neg = 0; + if (a < 0) { + ua = -(u_quad_t)a; + neg = 1; + } else { + ua = a; + neg = 0; + } if (b < 0) ub = -(u_quad_t)b; else From nobody Fri Jul 7 20:04:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyPW41z8vz4lh5x; Fri, 7 Jul 2023 20: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 4QyPW41YnWz3xYr; Fri, 7 Jul 2023 20: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=1688760272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yWh5qaC8KjIk2xzwULK89DbC5gwTrPRwDeKAvvLKShU=; b=NSkjCC1rjpcVJ3l0JrmpNYzg+AppbduZ3tTQ0T2Qtwh32lIVApVYv7/liCoeOnZn84m47y RMvrMMlYqMZWocxblqb3HkDSfiLV8GJyimPZ9FZzPLXT/Ed/DY4OI4HZUVH+f+WJFdaO3o WQgqOp1WZWH5ejefR58v0dD57bUz+kMgCIy5XRgbzxRMgUKQ8NZCxfQGZPMSwYJZOqZj/k jd7JjJRrMn8Wr3uSp1DLmCt+prvGTY/unBPAKsckyqTR3AKhZbKMtUMlQ2uP5GQ5NLuVcR PuwPG23UhcVI5aif8fhKMjn5s74+2oDCrF6ynKcQrd+m7FT1aGf0HDvjbaSC5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yWh5qaC8KjIk2xzwULK89DbC5gwTrPRwDeKAvvLKShU=; b=lsS3N+sM9stAsuYYaKxQkFyo1aTqYOr16D0+h79BU1+c8ZWq6OZkWKh0U6s0yXTfHLH6Wc OiOL2eP9FHymvb+tlDr3p/VE6sNKI7SzykEp9EvOkvvBfBY0G5Nf7STKHo0+y5BB/G3xSv Xdm8lMZ05Mdeb3XwU/8Xst9X0GFLWJmtJH1IqF1TIpG/21jc4SBsWPXXl1kp9spzX29YtA QMeatHc8T8A9B3xqrOcRs3iqq7zYZYbUDC2MXMJWQu4Qb/Zo18AQSrKdM3Iqn+49IT3iDQ sU02p5adCICIXgmEv7VvBuz5RgKaBIb5h3dodoa4GWK8jzrBHOsvI+mLSZs8tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688760272; a=rsa-sha256; cv=none; b=FZ5eKRCNfHvjbO0T2DXHNZya+WzHyeW/9V6pTDd5Z/68jp0mBODwgvTtdFxU5c4Pk/xjFD XbVhDvho9qLGCTKsOXRc15nNzxvckOckciN4v59PBG7HU7rEk+iZvZWBfjic6sZByg1z+E o5ymsg4z7Oz3kequtpTnGxUAdisT8QBGfU8TwYVFIqCAvxmDCli5w1uv4xdpmRm/TdX1Rc MTUcmq14rZ1X0w514V/h95t8x5hNXIQjB/ScwAD1jOnLsbr7ghjQ+h1XUyxRzfIXO/qKX7 opQO9omHvlXBAZKzYxBz0mlgjcrfecTx9e3O4QFFzFuI3L4z/ktOuXE5id5uTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyPW40fJRzs77; Fri, 7 Jul 2023 20: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 367K4Vjt029564; Fri, 7 Jul 2023 20:04:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367K4VOG029563; Fri, 7 Jul 2023 20:04:31 GMT (envelope-from git) Date: Fri, 7 Jul 2023 20:04:31 GMT Message-Id: <202307072004.367K4VOG029563@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: d8bfccb22093 - main - fwctl_fetch: A small test utility for the fwctl bhyve device. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8bfccb220939e121b6323700c634a5dff95b4ac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d8bfccb220939e121b6323700c634a5dff95b4ac commit d8bfccb220939e121b6323700c634a5dff95b4ac Author: John Baldwin AuthorDate: 2023-07-07 20:02:13 +0000 Commit: John Baldwin CommitDate: 2023-07-07 20:02:13 +0000 fwctl_fetch: A small test utility for the fwctl bhyve device. This can be run inside a bhyve guest to query the value of fwctl nodes. Note that fwctl in bhyve only supports a single hw.ncpu node. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40803 --- tools/tools/bhyve/Makefile | 8 +++ tools/tools/bhyve/fwctl_fetch.c | 137 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) diff --git a/tools/tools/bhyve/Makefile b/tools/tools/bhyve/Makefile new file mode 100644 index 000000000000..3d9ea4167bab --- /dev/null +++ b/tools/tools/bhyve/Makefile @@ -0,0 +1,8 @@ +PROGS= fwctl_fetch +MAN= +BINDIR?= /usr/local/bin + +# fwctl_fetch: fetch the value of fwctl nodes from a guest +LIBADD.fwctl_fetch+= util + +.include diff --git a/tools/tools/bhyve/fwctl_fetch.c b/tools/tools/bhyve/fwctl_fetch.c new file mode 100644 index 000000000000..f3139cf4f010 --- /dev/null +++ b/tools/tools/bhyve/fwctl_fetch.c @@ -0,0 +1,137 @@ +/*- + * Copyright (c) 2023 John Baldwin + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define OP_GET 3 +#define OP_GET_LEN 4 + +/* I/O ports */ +#define FWCTL_OUT 0x510 +#define FWCTL_IN 0x511 + +static void +reset_fwctl(void) +{ + char buf[4]; + + outw(FWCTL_OUT, 0); + for (u_int i = 0; i < 4; i++) + buf[i] = inb(FWCTL_IN); + if (memcmp(buf, "BHYV", 4) != 0) + errx(1, "Signature mismatch: %.4s", buf); +} + +static void +send_node_name(const char *name) +{ + uint32_t value; + size_t len; + + len = strlen(name) + 1; + while (len > 4) { + memcpy(&value, name, 4); + outl(FWCTL_OUT, value); + name += 4; + len -= 4; + } + + if (len > 0) { + value = 0; + memcpy(&value, name, len); + outl(FWCTL_OUT, value); + } +} + +static void +fwctl_op(uint32_t op, uint32_t id, const char *name, void *buf, size_t len) +{ + char *cp; + uint32_t value, rsplen; + + /* Length */ + outl(FWCTL_OUT, 12 + strlen(name) + 1); + + /* Operation */ + outl(FWCTL_OUT, op); + + /* Transaction ID */ + outl(FWCTL_OUT, id); + + send_node_name(name); + + /* Length */ + rsplen = inl(FWCTL_IN); + + /* If there is an error, the response will have no payload. */ + if (rsplen < 4 * sizeof(value)) + errx(1, "Invalid response length (%u): %u", id, rsplen); + + /* Operation */ + value = inl(FWCTL_IN); + if (value != op) + errx(1, "Invalid response type (%u): %u", id, value); + + /* Transaction ID */ + value = inl(FWCTL_IN); + if (value != id) + errx(1, "Invalid response ID (%u): %u", id, value); + + /* Error */ + value = inl(FWCTL_IN); + if (value != 0) + errx(1, "Error from op %u (%u): %u", op, id, value); + + /* If there wasn't an error, require payload length to match */ + if (rsplen != 4 * sizeof(value) + len) + errx(1, "Response payload length mismatch (%u): %zu vs %zu", id, + rsplen - 4 * sizeof(value), len); + + cp = buf; + while (len > 0) { + value = inl(FWCTL_IN); + memcpy(cp, &value, 4); + cp += 4; + len -= 4; + } +} + +int +main(int ac, char **av) +{ + char *p; + size_t len, buflen, len2; + + if (ac != 2) + errx(1, "Need node name"); + + if (open("/dev/io", O_RDWR) == -1) + err(1, "Failed to open /dev/io"); + + reset_fwctl(); + + fwctl_op(OP_GET_LEN, 1, av[1], &len, sizeof(len)); + if (len == 0) + errx(1, "Node has length of 0"); + + /* Buffer includes embedded length followed by value. */ + buflen = sizeof(size_t) + roundup2(len, 4); + p = malloc(buflen); + fwctl_op(OP_GET, 2, av[1], p, buflen); + memcpy(&len2, p, sizeof(len2)); + if (len2 != len) + errx(1, "Length mismatch: %zu vs %zu", len, len2); + hexdump(p + sizeof(len2), len, NULL, 0); + + return (0); +} From nobody Fri Jul 7 20:05:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyPXP6t2Pz4lhCg; Fri, 7 Jul 2023 20:05: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 4QyPXP64C7z3xsh; Fri, 7 Jul 2023 20:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ElRv1A/SyTObJlfY0R5S1Z9e9OkecuJtaIcK9pCkOk=; b=jOMLI24lweTqu0zlCdc8KjksjjEfLNhWK8CBehGhMq9c+Leg6AWa6EznQE1dGkIXua0egO k5129uF/EiQOYFf3dlMl3qrIbWs2BnF8N/+x/+wXhQdpUNirEBdE28d9qwguSABaTWXvhp ZcSAt2wZdwItFOXbWfRfByeRdoVGdMBt8IBidOKasvVqUEz2BVhZuS9I1P++UxAwpuSa/u 0cRIDU6KK2HtWTt2CXT433A9gaRDNdGyzoFRPn9UTxkYGTt1o8jcAvz/QoBK0S9lciJIxL 5CnbuK/J+ahwBgIuYqJxkcAcHF0O/dR9/A/N46V4cFZLSpfE7W/ABxSR5+IeeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ElRv1A/SyTObJlfY0R5S1Z9e9OkecuJtaIcK9pCkOk=; b=ThmCiFCJY5UAXn93+USW5CKQoFlwnnnSnZYuIkgdmMOGLCCsCTCqhPPt8GV4ulgZNgKPSp 4rK6ev45NCir/e4Vf44ovX/Velm8NIqpxSraE2STQrbSk3hTl3ERXL1wfg6gAgItfhqXP9 ERKer4eJJ0rXpNiLa9qy6w19XfjsY58PVJMPpvwsjAfBiHsioSnXv/3LNsCvuostWq7FJS +xOnC72skKNmnm0kE6FCwQbYjcSL6vFZ+2Qpv8SaWvVP5MPjxVb0SiCWaDkWdMQyEVe5mD kvssJUB0liDZz2R1rFoLAb4kKYzKf5V7TQFnvKx9u8NS6bQrtDiiP12AqBEUSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688760341; a=rsa-sha256; cv=none; b=eGRFwdkYR5vJKicAPQPjflBUYHJel6TtSsc+oVWznXWgrqPPuVrjCPRF5MEsomdStamFQv hghj8GhsKhe82GD50Dr1NgzWzmoEFOZ12ycCma1WY95RBaedJMYI4UAlb7AGOEnC4Q3vMN 15bv772WG465z2wMCxwhlxdN4TwKoekIMEkfVBrF6neGEa4ixcgpQi7MijJ3f4O6kynucP G7PRxaH60cd47DYxIJ27Yz3VfNts82+zZjrnHZbeCBpugFnFGKaIvAwVQ0WvbOJJbAXzKA kmfY2izc5OQzxtoBf0Qt1WsxzlAQAMiUt1jEamnpeY0xwH7a04awiv7G65QmMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyPXP57ppzs7B; Fri, 7 Jul 2023 20:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367K5fGD029822; Fri, 7 Jul 2023 20:05:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367K5feo029821; Fri, 7 Jul 2023 20:05:41 GMT (envelope-from git) Date: Fri, 7 Jul 2023 20:05:41 GMT Message-Id: <202307072005.367K5feo029821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 2597c45a4f5c - main - Complete moving kinst of dtrace tests to common List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2597c45a4f5c9b734e840676cfa07337de460257 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=2597c45a4f5c9b734e840676cfa07337de460257 commit 2597c45a4f5c9b734e840676cfa07337de460257 Author: Li-Wen Hsu AuthorDate: 2023-07-07 20:05:30 +0000 Commit: Li-Wen Hsu CommitDate: 2023-07-07 20:05:30 +0000 Complete moving kinst of dtrace tests to common Update its mtree entry. Reviewed by: christos, markj Fixes: 911f0260390e dtrace: move kinst tests to common Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40901 --- etc/mtree/BSD.tests.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index d23ea1ac5b03..c8e88ad5705c 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -135,6 +135,8 @@ .. json .. + kinst + .. lexer .. llquantize @@ -255,8 +257,6 @@ amd64 arrays .. - kinst - .. .. .. zfsd From nobody Fri Jul 7 20:06:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyPYj3j9yz4lhYZ; Fri, 7 Jul 2023 20:06: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 4QyPYj3Hn0z400G; Fri, 7 Jul 2023 20:06:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760409; h=from:from:reply-to:subject:subject: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/VGteiVi4JvBQeJ7ulh28nAaUMKQ3yJoEwYBDFWZmM=; b=U7G5v60a1th+jBLMD8yJUh9qgUqOaBTZ9Vr7O0q2BJaMTFLCJwEQvonMVnzEXRSaNs9UMW WTDc4eJqoAVjImD2SerprMDaBz3L8WcNFeKw+U8T6Ol3VNI9/mkKWBKTOqctGvW0646UrW g5gxtiQg1xAcuOxBZlrG3al3msTFsV5T2oXWI1M2xRlct6NuQiHXtlQIj/mUp/pcH6r2xx hBlW5zMGSt1pD0U9pqpWlYVZ5AveeOF0loJa3AfAFW23GILfK3oWAYbMFPm5Rl2uWv3xEW OuWmk14tBIcLIyyOAlL4DmxmpewshKbZefyCQXgBU6o00eCxnphAVoiRI8MeVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760409; h=from:from:reply-to:subject:subject: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/VGteiVi4JvBQeJ7ulh28nAaUMKQ3yJoEwYBDFWZmM=; b=KIQjseFzR/XXcIbXWzEHAs34+jGBAWEa3Z4dlATIs7DRkJHRPP4PQVAncTVouKvtlXHRBL 62WkML7XXtqo52wyIAf7eswGbhB53caTzQIrfHNJypmGnGMS0011k7I7c4TO8fFYxTF9vl OE5wLjW7qEYKQLiNJlWBOOFR8yCUUs3jD26EPEpBXrzIis7tB1xSMqrmRbbKOb/zz1ug5f oPNdW1Xyaz/jYVfpITSH8LYIZqEc65R51+ifmgLcf2nL8aF6aHkpbmI5Zw0Pk9EzTTa/0l CZ2EBrYLVfw/4NtSOUAW5lc/wdI37Cz0kQ36Yu4he71NRg0/w12bcLO1leCBWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688760409; a=rsa-sha256; cv=none; b=DdodwuHIc/fhvITNWZAuVgitsoYb3qJaayzc6WRNyrHOPcet0toFVQ1BaLGA+KTaDAht+d 8op9lorPK7Nw423O7yL7tUbQJuuo8SVURi0ItXCpVoklHc16qFeEqeF2m08a4qVBqy99iM UDTgWQf4gSDvO4v7IYgNU5oqW+bE5IhkJhHAjm7GLBRWYaT1Yv6lkNZukt/32NtFJnu3CB nODZkkdxzCRry8xqTNURJFXQnMltpkiPpFn1g7YuLe6q0fG7EDm3IcFEqi9GRXl4IeOMxi y9X2cuoE+ircXnm7I7Gpgauj70q6CXDTF58guloUs119RX4WEU+D+Y7CNhAw2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyPYj2PG4zsHy; Fri, 7 Jul 2023 20:06: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 367K6npK030123; Fri, 7 Jul 2023 20:06:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367K6nfh030122; Fri, 7 Jul 2023 20:06:49 GMT (envelope-from git) Date: Fri, 7 Jul 2023 20:06:49 GMT Message-Id: <202307072006.367K6nfh030122@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: 1f7e3572644e - main - fwctl_fetch: Add a comment describing the tool. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f7e3572644ef46c27439c89ab1bb09d140dc30e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1f7e3572644ef46c27439c89ab1bb09d140dc30e commit 1f7e3572644ef46c27439c89ab1bb09d140dc30e Author: John Baldwin AuthorDate: 2023-07-07 20:06:12 +0000 Commit: John Baldwin CommitDate: 2023-07-07 20:06:26 +0000 fwctl_fetch: Add a comment describing the tool. I meant to include this in the earlier commit adding fwctl_fetch but forgot to amend the commit before pushing it. --- tools/tools/bhyve/fwctl_fetch.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/tools/bhyve/fwctl_fetch.c b/tools/tools/bhyve/fwctl_fetch.c index f3139cf4f010..1f504dc499cf 100644 --- a/tools/tools/bhyve/fwctl_fetch.c +++ b/tools/tools/bhyve/fwctl_fetch.c @@ -4,6 +4,12 @@ * SPDX-License-Identifier: BSD-2-Clause */ +/* + * Fetch the value of fwctl nodes from a guest. + * + * Usage: fwctl_fetch + */ + #include #include #include From nobody Fri Jul 7 20:07:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyPZW58wjz4lhpD; Fri, 7 Jul 2023 20:07: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 4QyPZW4dW2z40PG; Fri, 7 Jul 2023 20:07:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0wq7v3O3WK3wq6+TcAqe/E7p07QyrOIlqE3zNBmu+MU=; b=bfuNAFgorAc0rI6l+tek6JmGse6KCY7G9gLtNpedY5g/VLYE13/Poij1cIvSF+tytGVxQp eFM/D8aQSs80hf8l1MU/s0as1/A8xPaR5y9Vx2z7fm6nio1+6rkKuYDe0+tN4yyGxH0L4f nQ518iNuXDm5vXXz4XsNfrn9Mtof8YR3UpMJlzWbdPLmBMTWLwchufhvgF/5/7yYv9yaHd ELOGjgiidCqfW+33vfK/rcbqqA2pbs9bW7xtWxudLfAWiuzF5UA3c26t2drYw7wAFxES+R MFESACxmshCtkEVw5FQRGPzK8V8Yr4Yp+nAQ+ww+nkoJ8wjI1YHJUDSHEmLdew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0wq7v3O3WK3wq6+TcAqe/E7p07QyrOIlqE3zNBmu+MU=; b=inNB0IfLf18Z41jiaWRweqTZiN2HcRePbHabk9zF/fB7RliXsMyUtUcLX+VlLNOLyn+HPp Vj3HnJgtMIqRw8lX3uPR+ZMBuXYbWKJ0SzqGkT8/PAc2meK6dvtUxjKwTwm70Yr42cUnYt NVC/4kuzYyCN005EohBqFyDgUXjCyNctcqG6yLkEKSUf72uIYHRSiKKjfYg8IS1mY/x6M5 Va5adDEqsRk+q4rw+2R13KznNTLiwHl5uH/jiuY2xoWQkyCMy02Fhq6EFW6f/i7lpFQQtC plPBtiyEjoXTEcy4j/LmKczPtqfiIgKGEA38BbZXSBz4QEMaRuHatRpcyGcQ3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688760451; a=rsa-sha256; cv=none; b=rqYm6OnbQ2CRqV+JM5B4h8334H8YaC+7LO+pHFQeyR0jLSrKR0FLBfb2gYFrkTLpjO98ul jbTvuHlvrOxF1pPomtzMO9dwYZMjgUvT+0924/4EZtwwmlCaSLWGD6jRS34vYUfMuV4qAI TbUEi7RjfPeLvVLpIEsDiclYkN6fs7l7e7KR+aArVFdv0Ff/z1IQ5v7EssY5nzjikzLiuA ORwHFDYsIiZKQlycdUiieaECIiYPftIEeeiSI489s18bTtcr2RrodWHJQcKkBBQf5snq1w 3HgD4O9Bccg+Wbfv3dcmgzYmCMBMKD5EtqhRihEoLckSO7D8RVBZ6/5fYkyLKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyPZW3hpZzrfG; Fri, 7 Jul 2023 20:07: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 367K7Vxg030356; Fri, 7 Jul 2023 20:07:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367K7VR0030355; Fri, 7 Jul 2023 20:07:31 GMT (envelope-from git) Date: Fri, 7 Jul 2023 20:07:31 GMT Message-Id: <202307072007.367K7VR0030355@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: 2329393c615c - main - amd64: Use __seg_gs to implement per-CPU data accesses. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2329393c615cf61c19b0d7bd1ca18663e02789ce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2329393c615cf61c19b0d7bd1ca18663e02789ce commit 2329393c615cf61c19b0d7bd1ca18663e02789ce Author: John Baldwin AuthorDate: 2023-07-07 20:06:55 +0000 Commit: John Baldwin CommitDate: 2023-07-07 20:06:55 +0000 amd64: Use __seg_gs to implement per-CPU data accesses. This makes use of the alternate address space support in both GCC and clang to access per-CPU data as accesses relative to GS:. The original motivation for this is that it quiets verbose warnings from GCC 12. However, this version is also much easier to read and allows the compiler to generate better code (e.g. the compiler can use a GS: memory operand directly in other instructions such as IMUL and CMP rather than always MOVing to a temporary register). The one caveat is that the current approach is very inefficient at -O0 since the compiler expects to load the 0 base offset from a global variable instead of assuming it is 0 (even with the const). Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40647 --- sys/amd64/include/pcpu.h | 69 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index 523cf105e1c7..dc78a07b83e9 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -113,18 +113,74 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); #define MONITOR_STOPSTATE_RUNNING 0 #define MONITOR_STOPSTATE_STOPPED 1 -/* - * Evaluates to the byte offset of the per-cpu variable name. - */ -#define __pcpu_offset(name) \ - __offsetof(struct pcpu, name) - /* * Evaluates to the type of the per-cpu variable name. */ #define __pcpu_type(name) \ __typeof(((struct pcpu *)0)->name) +#ifdef __SEG_GS +#define get_pcpu() __extension__ ({ \ + static struct pcpu __seg_gs *__pc = 0; \ + \ + __pc->pc_prvspace; \ +}) + +/* + * Evaluates to the address of the per-cpu variable name. + */ +#define __PCPU_PTR(name) __extension__ ({ \ + struct pcpu *__pc = get_pcpu(); \ + \ + &__pc->name; \ +}) + +/* + * Evaluates to the value of the per-cpu variable name. + */ +#define __PCPU_GET(name) __extension__ ({ \ + static struct pcpu __seg_gs *__pc = 0; \ + \ + __pc->name; \ +}) + +/* + * Adds the value to the per-cpu counter name. The implementation + * must be atomic with respect to interrupts. + */ +#define __PCPU_ADD(name, val) do { \ + static struct pcpu __seg_gs *__pc = 0; \ + __pcpu_type(name) __val; \ + \ + __val = (val); \ + if (sizeof(__val) == 1 || sizeof(__val) == 2 || \ + sizeof(__val) == 4 || sizeof(__val) == 8) { \ + __pc->name += __val; \ + } else \ + *__PCPU_PTR(name) += __val; \ +} while (0) + +/* + * Sets the value of the per-cpu variable name to value val. + */ +#define __PCPU_SET(name, val) { \ + static struct pcpu __seg_gs *__pc = 0; \ + __pcpu_type(name) __val; \ + \ + __val = (val); \ + if (sizeof(__val) == 1 || sizeof(__val) == 2 || \ + sizeof(__val) == 4 || sizeof(__val) == 8) { \ + __pc->name = __val; \ + } else \ + *__PCPU_PTR(name) = __val; \ +} while (0) +#else /* !__SEG_GS */ +/* + * Evaluates to the byte offset of the per-cpu variable name. + */ +#define __pcpu_offset(name) \ + __offsetof(struct pcpu, name) + /* * Evaluates to the address of the per-cpu variable name. */ @@ -210,6 +266,7 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace)))); \ __pc; \ }) +#endif /* !__SEG_GS */ #define PCPU_GET(member) __PCPU_GET(pc_ ## member) #define PCPU_ADD(member, val) __PCPU_ADD(pc_ ## member, val) From nobody Fri Jul 7 20:11:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyPfh5Drlz4ljpX; Fri, 7 Jul 2023 20:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyPfh4qsqz41Vf; Fri, 7 Jul 2023 20:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgiV7KQMPRSpFwAiWGhCLbEwF4lBIElVTpei3qtIz0g=; b=WDLqA4cZiH2188nNqQPeJ23632smm/JxckINIxruLDnQG4wVVBiVZx+Wuy8Pq12KJYkrvi C99pHmWzrfO/HxAryxj08XtWnLN1JinU+kJCorZnizlW31xRyngzs3ifIL4UOKVfUMFtAC SS/FgT+xI+okFR7rQ7FEudOFUPN4sPoJCAPACAwnVfDSAEExaeQquT6SInVs9phJqxEc7H 4z+G0WbsXevM80uxFnoKH80dTsIVauVI/Yqzli1Cd2Xfz2Kyk+mxnM+xb7Co49XumQepi7 ZNlAPIVac3FAZgMGUzvzDpsFwF/Ixn5yyce0/qXLn6ZW2KT5eVkBpn97LwnZJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgiV7KQMPRSpFwAiWGhCLbEwF4lBIElVTpei3qtIz0g=; b=nAbOgQPMnANGtAyOm44sX3z/FPmR1G6tNWcFGMdaYM+n6pWcWxvKTA0dKv5OhkqQqrkiBj 9AMsxtKz1oMGhsxJeTyXfcynlT8jx579D7NvXKJqDLSA7e5/p6ODtTrpN0ThtJpv/XV1GF rV3VvQ9T5iAxp5Zhz+PwBRsZxnVoIJx0JptgBgLVqjxfCrmX7qfKeLvKRWgVjbCVGDvZZ9 7/USyIonCIh5b4Ch5l35Al7Yr0p9QWOEJF62OKNIorHf+snOG87EGbRMP9aEV+b9T9aXf1 mTwaVXlq0XeL2nEJe4BJCZO96bQXxvYWI64snhZthGlmEJYRO0gXZDRDyKAFUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688760668; a=rsa-sha256; cv=none; b=xhmABFg5OpZtgQcgcZm8DQdHGG5f3FuzdeVLw3ohhjciB8EWJejIQF9lgwN6iHANn7dfBp XMBRWBeSQvsk1klheApUzpoMH0Ea1aHL1JGO9twNoxtatW3Rqy/SjckiFrf5wgIdbXqXXF gOdhFNdn/oYO2unIn4E5miX8vzf92SIWJ0JteWMvSclHPEB4C9R5MjaNcjTUxgM7acwtYt PCQ1TsP6luHMVgOmT94dn9kzfEVutn67mLIX+AUMnuWz6ATrda2EUJSAQ1GbOEYU0zWwis SIvQubiHOhjxKI1TNVBkgR76TevavY/XYL4PDKQr5MV9QZyIoqRNTwKebavikQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyPfh3vyhzsK0; Fri, 7 Jul 2023 20:11: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 367KB81e039407; Fri, 7 Jul 2023 20:11:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367KB8Ep039406; Fri, 7 Jul 2023 20:11:08 GMT (envelope-from git) Date: Fri, 7 Jul 2023 20:11:08 GMT Message-Id: <202307072011.367KB8Ep039406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: a81d4240b346 - stable/13 - release/DVD_PACKAGES: Update the names of drm-kmod ports List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a81d4240b346f1bda706e8e21d16ea649a85c8a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=a81d4240b346f1bda706e8e21d16ea649a85c8a6 commit a81d4240b346f1bda706e8e21d16ea649a85c8a6 Author: Li-Wen Hsu AuthorDate: 2023-07-04 20:24:52 +0000 Commit: Li-Wen Hsu CommitDate: 2023-07-07 20:10:19 +0000 release/DVD_PACKAGES: Update the names of drm-kmod ports When MFC, graphics/drm-515-kmod is not merged as it only suports 14+. Reviewed by: x11 (manu), re (gjb) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40770 (cherry picked from commit fea4a44c1965d4b709362a74abb0ab4b28ec29ac) --- release/scripts/pkg-stage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index e2a51e4ef2f0..3cb8afd43679 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -15,8 +15,8 @@ export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/git emulators/linux_base-c7 -graphics/drm-legacy-kmod -graphics/drm-stable-kmod +graphics/drm-kmod +graphics/drm-510-kmod misc/freebsd-doc-all net/mpd5 net/rsync From nobody Fri Jul 7 21:23:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRGH3ck4z4m3VJ; Fri, 7 Jul 2023 21:23: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 4QyRGH3BJLz4F2K; Fri, 7 Jul 2023 21:23:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688765015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vhC2P04NxoWE6I4CeVZc3r+QHLpf5rHPM2XZrqCEkWs=; b=w4KeVkQT/3lqDVd7SrPA/PWqmM3yyZpEdZSOaDa9AerA9RvBqZ+UKiJ4hyspUjKrQqtEJA QeOAS2Z1BLrTeHu1dloUqsd8avpccmLNA8SzWpWXGcWAwo1kv0C/rd+wEITc4Ibp88sevs zv+9dI2OvzbhOU4+mf4Y5BCxmTa7KIglJMEsG2KB7Xq7n/KblpYQU6Qm7FLXwlQB9nw/il 2IEqkyCY0pGTOwfUC7q8i7qn9unCk7KAATv0JubYrXiRGQhJ7ypdAQN90iIFk7XTKxADtA /QPPBgnSc0eKxgSyo4EGgV7ywD9EpHu8gGTS8Pdcxch2vxbo1SpkCFloUANaeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688765015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vhC2P04NxoWE6I4CeVZc3r+QHLpf5rHPM2XZrqCEkWs=; b=Ur3nnXWtkFK/OwsxUTt2SCrlYfVV6wBfZkVmKjwDRAPpyIkxFZ46NmVttg4efLSO4wa/aP Bapfy/NRn4ahBIxrRhLf9sbkYK7kDhVM8+2jUmb/ECQNzviT/s0FB8YJz7n58Re/JP9afv IoE+4cly5zjCJrLTxewJJzOJaOu+mYFGu6pFGyWgvOAhyn2/cpHhAqEgUj1YHu1xULTNsR zueP79Svu4Z+KmZKLU54m0Tla+3/lyVsbawsISOr6tcc9VGuIHthZl05dHkZDAoFuMK1t0 ANgRz7OkuBSXfXfy9CTsXXQvODk+WzPqlAW3TY4CyhRxKknMQ1bB1b2Hp//cow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688765015; a=rsa-sha256; cv=none; b=M4rOvR0p9UbjnnK3wgBVcRWtmc7Ul7rvGnXlfefE+Bhl4FSUeFmdpOwrvX+UFf5+N+4N6Y r1RISdOKMaMpPc25iCQZz1BKY2YJUNuEpS943oZlkS7Mkk05VTEmQQpxIXJol4rr8E2+A+ 5SFSICWQaiD4A74njoPyzNghpJ44Lmdm10Cg64k9AhAgQz1OGIozYYxQicjWZ3BrM/oujb PJXa98RD3/6TzJ2HwNqbboEv0OOty4GMng2GihajbvKlABGrhTFPldb+yqEG/bzKeyVOQj 74Ia+PmHo5btnLUw4bqbIsWi7qW+fWPenE7SW/xdJaKolQuAKCNIoXYrGvR9YA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRGH2Gs7zv5j; Fri, 7 Jul 2023 21:23: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 367LNZfD060994; Fri, 7 Jul 2023 21:23:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367LNZ4J060993; Fri, 7 Jul 2023 21:23:35 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:23:35 GMT Message-Id: <202307072123.367LNZ4J060993@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: 29cbe944e928 - main - CONTRIBUTING.md: minor changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29cbe944e9287c2e61928c456512d3990aaffdaa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=29cbe944e9287c2e61928c456512d3990aaffdaa commit 29cbe944e9287c2e61928c456512d3990aaffdaa Author: WuerfelDev AuthorDate: 2023-07-07 14:59:42 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:23:24 +0000 CONTRIBUTING.md: minor changes - Misspelled GitHub - angle bracket not escaped correctly - Double white spaces - White spaces at EOL Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/788 --- CONTRIBUTING.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fab8262070ce..72da80389bd6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,14 +15,14 @@ FreeBSD accepts source code contributions using one of several methods: - Direct access to the [Git repository](https://cgit.freebsd.org/src/) The preferred method depends on a few factors including the size or scope of -the change. GitHub pull requests are preferred for relatively straightforward +the change. GitHub pull requests are preferred for relatively straightforward changes where the contributor already has a GitHub account. ## GitHub Pull Requests Presently, GitHub 'freebsd-src' repository is one of the publish-only services for the FreeBSD 'src' repository the project uses to promote collaboration and -contribution. Pull requests that need little developer time, are generally +contribution. Pull requests that need little developer time, are generally small, and have limited scope should be submitted. Do not submit pull requests that are security-related, problem reports, works in progress, changes that are controversial and need discussion, or changes that require specialized review. @@ -41,7 +41,7 @@ A pull request will be considered if: * The commits follow FreeBSD's style guide. See [Style](#Style). * Run tools/build/checkstyle9.pl on your Git branch and eliminate all errors * The commits do not introduce trailing white space. -* If the commmit fixes a bug, please add 'PR: \\' to the commit message. +* If the commmit fixes a bug, please add 'PR: \' to the commit message. * If there's a code review in Phabricator, please include a link as a 'Differential Revision: ' line. When updating your pull request, please rebase with a forced push rather than a @@ -49,9 +49,9 @@ merge commit. More complex changes may be submitted as pull requests, but they may be closed if they are too large, too unwieldy, become inactive, need further discussion in -the community, or need extensive revision. Please avoid creating large, +the community, or need extensive revision. Please avoid creating large, wide-ranging cleanup patches: they are too large and lack the focus needed for a -good review. Misdirected patches may be redirected to a more appropriate forum +good review. Misdirected patches may be redirected to a more appropriate forum for the patch to be resolved. Please make sure that your submissions compile and work before submitting. If @@ -72,7 +72,7 @@ project. The guidelines are streamlined for quick decisions about each pull request. Unless explicitly stated, rejection here as "not ready" or "too large" does not mean the project is uninterested in the work, it just means the submission does not meet the limited scope for pull requests accepted -here. Sometimes it is easier to review a GihHub pull request than to do the +here. Sometimes it is easier to review a GitHub pull request than to do the review in Phabricator, so that's also allowed. ## Style @@ -91,13 +91,13 @@ comments on your pull requests. For Makefiles changes, see [style.Makefile(5)](https://man.freebsd.org/cgi/man.cgi?query=style.Makefile&sektion=5) -for details. FreeBSD's base system uses the in-tree make, not GNU Make, so +for details. FreeBSD's base system uses the in-tree make, not GNU Make, so [make(1)](https://man.freebsd.org/cgi/man.cgi?query=make&sektion=1) is another useful resource. The project uses mdoc for all its man pages. Changes should pass `mandoc -Tlint` and igor (install the latter with `pkg install igor`). Please be sure to observe the one-sentence-per-line rule so manual pages properly render. Any semantic changes to the manual pages should bump the date. -[style.mdoc(5)](https://man.freebsd.org/cgi/man.cgi?query=style.mdoc&sektion=5) has the all details. +[style.mdoc(5)](https://man.freebsd.org/cgi/man.cgi?query=style.mdoc&sektion=5) has the all details. For [Lua](https://www.lua.org), please see [style.lua(9)](https://man.freebsd.org/cgi/man.cgi?query=style.lua&sektion=9) From nobody Fri Jul 7 21:47:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpH6B36z4m8fy; Fri, 7 Jul 2023 21:47: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 4QyRpH5lWhz4Mw3; Fri, 7 Jul 2023 21:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKFcIMK4/cpdA+pABH47Z/KXkDM1R4qkGRmWUyZdlWE=; b=nt92TyO3v42nR6guZQqy7us0JeTI06bpgyFXmw2+lXskcqkawtOb0VcwHa3IqKoY8xLsbi NWrIeac3whlVUeDLFz3UmuI1QzbrzqQ2mJissHTRX1q+MvoARznhUyP+74LNAcR5IP5iin +8BnoCcEAXNSE0EB5voDtmC1SJIM72Qe2ljRHOCvFdN6+Nxry5MsTipSsp0PKviAikzxqy khaQbySfSwr49s0WbSM+ea3kJSuEC8R2b00C3FwfwSh4wxAlRpnwdsjJXgtCfqvzxnYnEo RxLUvsP6yAQiECvNeslOOIZrIHjqGyyFUCFUQm/rJ2UnMMuMPGolQXZyEYXJEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKFcIMK4/cpdA+pABH47Z/KXkDM1R4qkGRmWUyZdlWE=; b=OooywxKVr0V/nq2PlJEGTD+HBorsbj3NidDXpbQgroGF6QqYVTZ7bGth4+ytX64t4RVnQN kKvh1/fubjf+R+Is8OS6WNkC3/O44mrrOSwL3quwsI+0wCdCthlUYzk72ohagDcUOGpufh e8TqU2uIabEgKYx6A9dqmuz+pmCsnAvJJMyTmIbPdcJ5NyTBXFs/Bi19O1fOEIcwkN2MYU BZB1fIbmiPVtJbXfEnF7WKW3Lg4fRNTSuN5lUfxypPK7TFXurfShcTZop9/tzUb2fX7o7x UtZSj7qOmSrAjF9hd97fs2OpXMx7NEP6nNReVa+3Dh6PAmKmonwKWFFfqn+G3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766471; a=rsa-sha256; cv=none; b=X9jFDklAIvOm4C9m0DwGGdvzQ+kH81/53priE0+89dNDL1Q3JIag+N4WIRFGPGDLfpq4M+ duM8sFBH6qzga6Ss+TdbG3KLjzP+S0kYM/aBR7FTyh6vfRrox/sKu8CELtTMwxdTBJX8rk kprYjU5bluBxsVsmI9N3iEYIKFgJCyhPc1Wmg7W3N7CuBbVMjYdq9p6MiXEx3RaIMvTcAu ioW4lGcGXer2BQbRMJsoPsF/+3VvARtOfO5HiXj4oJZKpLxpzPwNmsj+BEYJ9aTm5xUsFG hLiyslhwgYGIR7Y3DMJoMjAhnqcb+sa9mwkFuYRp2gjSD3+pxgxDArDJWJD3kA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpH4pG8zvmD; Fri, 7 Jul 2023 21:47: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 367LlpDw094503; Fri, 7 Jul 2023 21:47:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367LlpZZ094502; Fri, 7 Jul 2023 21:47:51 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:47:51 GMT Message-Id: <202307072147.367LlpZZ094502@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: 407abff6a445 - main - isp(4): Add support for QLogic 28xx devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 407abff6a445c8db335093868e9e7e70438c5901 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=407abff6a445c8db335093868e9e7e70438c5901 commit 407abff6a445c8db335093868e9e7e70438c5901 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:34 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:29 +0000 isp(4): Add support for QLogic 28xx devices This covers the following HBAs: ISP2812-based 64/32G Fibre Channel to PCIe Controller: QLE2770 Single Port 32GFC PCIe Gen4 x8 Adapter QLE2772 Dual Port 32GFC PCIe Gen4 x8 Adapter QLE2870 Single Port 64GFC PCIe Gen4 x8 Adapter QLE2872 Dual Port 64GFC PCIe Gen4 x8 Adapter ISP2814-based 64/32G Fibre Channel to PCIe Controller: QLE2774 Quad Port 32GFC PCIe Gen4 x16 Adapter QLE2874 Quad Port 64GFC PCIe Gen4 x16 Adapter While here, add required bits to support 64GB FC. Default framesize is set to 2048 for ISP28xx based HBAs for now. PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- sys/dev/isp/isp.c | 14 +++++++++++++- sys/dev/isp/isp_pci.c | 28 ++++++++++++++++++++++++++++ sys/dev/isp/ispmbox.h | 3 +++ sys/dev/isp/ispvar.h | 3 +++ 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index a2c6e12d37cc..17163c3c4cbd 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -179,6 +179,9 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) case ISP_HA_FC_2700: btype = "2700"; break; + case ISP_HA_FC_2800: + btype = "2800"; + break; default: break; } @@ -710,8 +713,11 @@ isp_init(ispsoftc_t *isp) icbp->icb_version = ICB_VERSION1; icbp->icb_maxfrmlen = DEFAULT_FRAMESIZE(isp); if (icbp->icb_maxfrmlen < ICB_MIN_FRMLEN || icbp->icb_maxfrmlen > ICB_MAX_FRMLEN) { - isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM- using %d", DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN); icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN; + if (IS_28XX(isp)) + icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN_28XX; + + isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM - using %d", DEFAULT_FRAMESIZE(isp), icbp->icb_maxfrmlen); } if (!IS_26XX(isp)) @@ -822,12 +828,16 @@ isp_init(ispsoftc_t *isp) } else if (isp->isp_confopts & ISP_CFG_32GB) { icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_MASK; icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_32GB; + } else if (isp->isp_confopts & ISP_CFG_64GB) { + icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_MASK; + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_64GB; } else { switch (icbp->icb_fwoptions3 & ICB2400_OPT3_RATE_MASK) { case ICB2400_OPT3_RATE_4GB: case ICB2400_OPT3_RATE_8GB: case ICB2400_OPT3_RATE_16GB: case ICB2400_OPT3_RATE_32GB: + case ICB2400_OPT3_RATE_64GB: case ICB2400_OPT3_RATE_AUTO: break; case ICB2400_OPT3_RATE_2GB: @@ -1537,6 +1547,8 @@ not_on_fabric: if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { if (mbs.param[1] == MBGSD_10GB) fcp->isp_gbspeed = 10; + else if (mbs.param[1] == MBGSD_64GB) + fcp->isp_gbspeed = 64; else if (mbs.param[1] == MBGSD_32GB) fcp->isp_gbspeed = 32; else if (mbs.param[1] == MBGSD_16GB) diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 7bed6ad16cc4..236fcfb9774f 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -99,6 +99,16 @@ static struct ispmdvec mdvec_2700 = { NULL }; +static struct ispmdvec mdvec_2800 = { + isp_pci_run_isr_2400, + isp_pci_rd_reg_2600, + isp_pci_wr_reg_2600, + isp_pci_mbxdma, + isp_send_cmd, + isp_pci_irqsetup, + NULL +}; + #ifndef PCIM_CMD_INVEN #define PCIM_CMD_INVEN 0x10 #endif @@ -143,6 +153,8 @@ static struct ispmdvec mdvec_2700 = { #define PCI_PRODUCT_QLOGIC_ISP2692 0x2b61 #define PCI_PRODUCT_QLOGIC_ISP2714 0x2071 #define PCI_PRODUCT_QLOGIC_ISP2722 0x2261 +#define PCI_PRODUCT_QLOGIC_ISP2812 0x2281 +#define PCI_PRODUCT_QLOGIC_ISP2814 0x2081 #define PCI_QLOGIC_ISP2422 \ ((PCI_PRODUCT_QLOGIC_ISP2422 << 16) | PCI_VENDOR_QLOGIC) @@ -164,6 +176,10 @@ static struct ispmdvec mdvec_2700 = { ((PCI_PRODUCT_QLOGIC_ISP2714 << 16) | PCI_VENDOR_QLOGIC) #define PCI_QLOGIC_ISP2722 \ ((PCI_PRODUCT_QLOGIC_ISP2722 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2812 \ + ((PCI_PRODUCT_QLOGIC_ISP2812 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2814 \ + ((PCI_PRODUCT_QLOGIC_ISP2814 << 16) | PCI_VENDOR_QLOGIC) #define PCI_DFLT_LTNCY 0x40 #define PCI_DFLT_LNSZ 0x10 @@ -245,6 +261,12 @@ isp_pci_probe(device_t dev) case PCI_QLOGIC_ISP2722: device_set_desc(dev, "Qlogic ISP 2722 PCI FC Adapter"); break; + case PCI_QLOGIC_ISP2812: + device_set_desc(dev, "Qlogic ISP 2812 PCI FC Adapter"); + break; + case PCI_QLOGIC_ISP2814: + device_set_desc(dev, "Qlogic ISP 2814 PCI FC Adapter"); + break; default: return (ENXIO); } @@ -493,6 +515,12 @@ isp_pci_attach(device_t dev) isp->isp_mdvec = &mdvec_2700; isp->isp_type = ISP_HA_FC_2700; break; + case PCI_QLOGIC_ISP2812: + case PCI_QLOGIC_ISP2814: + did = 0x2800; + isp->isp_mdvec = &mdvec_2800; + isp->isp_type = ISP_HA_FC_2800; + break; default: device_printf(dev, "unknown device type\n"); goto bad; diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h index 3d0cbcffaa6b..1e229f5c4653 100644 --- a/sys/dev/isp/ispmbox.h +++ b/sys/dev/isp/ispmbox.h @@ -179,6 +179,7 @@ #define MBGSD_8GB 0x04 /* 25XX only */ #define MBGSD_16GB 0x05 /* 26XX only */ #define MBGSD_32GB 0x06 /* 27XX only */ +#define MBGSD_64GB 0x07 /* 28XX only */ #define MBGSD_10GB 0x13 /* 26XX only */ #define MBOX_SEND_RNFT 0x005e #define MBOX_INIT_FIRMWARE 0x0060 @@ -647,6 +648,7 @@ typedef struct { #define ICB2400_OPT3_RATE_8GB 0x00008000 #define ICB2400_OPT3_RATE_16GB 0x0000A000 #define ICB2400_OPT3_RATE_32GB 0x0000C000 +#define ICB2400_OPT3_RATE_64GB 0x0000E000 #define ICB2400_OPT3_ENA_OOF_XFRDY 0x00000200 #define ICB2400_OPT3_NO_N2N_LOGI 0x00000100 #define ICB2400_OPT3_NO_LOCAL_PLOGI 0x00000080 @@ -661,6 +663,7 @@ typedef struct { #define ICB_MIN_FRMLEN 256 #define ICB_MAX_FRMLEN 2112 #define ICB_DFLT_FRMLEN 1024 +#define ICB_DFLT_FRMLEN_28XX 2048 #define ICB_DFLT_RDELAY 5 #define ICB_DFLT_RCOUNT 3 diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index 66faf939a1dd..c597e715fa14 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -539,6 +539,7 @@ struct ispsoftc { #define ISP_CFG_8GB 0x4000 /* force 8Gb connection (25XX only) */ #define ISP_CFG_16GB 0x8000 /* force 16Gb connection (26XX only) */ #define ISP_CFG_32GB 0x10000 /* force 32Gb connection (27XX only) */ +#define ISP_CFG_64GB 0x20000 /* force 64Gb connection (28XX only) */ /* * For each channel, the outer layers should know what role that channel @@ -607,10 +608,12 @@ struct ispsoftc { #define ISP_HA_FC_2500 0x05 #define ISP_HA_FC_2600 0x06 #define ISP_HA_FC_2700 0x07 +#define ISP_HA_FC_2800 0x08 #define IS_25XX(isp) ((isp)->isp_type >= ISP_HA_FC_2500) #define IS_26XX(isp) ((isp)->isp_type >= ISP_HA_FC_2600) #define IS_27XX(isp) ((isp)->isp_type >= ISP_HA_FC_2700) +#define IS_28XX(isp) ((isp)->isp_type >= ISP_HA_FC_2800) /* * DMA related macros From nobody Fri Jul 7 21:47:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpJ6qC5z4m8g4; Fri, 7 Jul 2023 21:47: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 4QyRpJ6MWxz4Mt2; Fri, 7 Jul 2023 21:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UU9+iXPVAAD6gE+dzOqQpk9WGjplv6xz0PYyVXKVdkE=; b=PIEQ6pRRKD+wHDJgQLzSS+NTTQYK1A6WpxzwfR5BrGaazT2xSP+9zbXdDi4EZgp201kofw IArP0cmjSssFQs8TE3SxsD+qBGM3XrZF2PPkDQU2nlEZMNqqUbgzklf2bKQ8g/cE2VryvN EdsDgAxRmLdTdxgkuEv3IxAJ2DWtTarxmb+8+djHi5Z39jTIEHQ9Gu+waRS00uG2kb4bNb DvCx9vWg/Txgp+ERXNQWcnz0WOubtbch9D+BUxVMRx/NlTDr4cbVYRNe2nLp+EcPuW3rei z8KuiHSFdd7c3XvfmvTYF0Mmo6+N84ksXgtdKB0uj5Y7jwhPWOm+Hg8uLieEeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UU9+iXPVAAD6gE+dzOqQpk9WGjplv6xz0PYyVXKVdkE=; b=bysYo5044CXDJlELLp1/sQWhLFOiGcg4Y7GQtcAtdFtqL1Ac8NJyjtnomsBJXQW79HVb9x +FQaK63+wDijEHP3Og2aAG4n6ju2DnF5ycczcSDS8+bOaQQOsS970Kf7u4bdgcJsYBhLK3 PRpUjmlzB7PiZ/Gvh6ZZJHSv6HRVktLCoi/il8HWdsJoWWFE0wu7yW1ii4XWVGZIBoVT70 1dnJs6ZnGE3lRyFmMG4LM/IBj6lHgB7AzEk5bftNG1ET8PdeCKgvypBgP89w8+qamgSNWI 0d3CmRUSyqbK2QoZ6N51cmrFjXudQc8qJrq2MzuqZP4hu1vBRyr8eIVfmlkvPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766472; a=rsa-sha256; cv=none; b=wDVwrWssza9/HrXy/GIAJyq66utvkNLzI7+kIjqSKEU1AaEGpkc/l4zo/f00JWT9Ogilmv A9do3crhD4VTIAh2kI8GCFeqpD7ePtoMtyzxO5MzwdpvepOEPA2gsoYuJbz+lkXvSPUyL0 ZEur9NlcYelG5yxHYZV7IRqgMoj9pfIPYRBnzAZ96Qk80jzXs9tcPTkXzcALs8zyJXQBQN epgI0mFxOukx2HnKFxXIjsKVYRRHCPf2P3PDRqH8UaWAeTf057skZ3xXBs0dlRwd7siKhn t7sS/J5gJ41tqN/08pTqI9LkbqYl1v/gIZgVkQg0pbbJgt1hXddmwsYXyCRvlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpJ5RGFztsN; Fri, 7 Jul 2023 21:47: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 367Llq9H094529; Fri, 7 Jul 2023 21:47:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367LlqIn094528; Fri, 7 Jul 2023 21:47:52 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:47:52 GMT Message-Id: <202307072147.367LlqIn094528@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: 2b4ccfbbc65b - main - isp(4): Document support for new devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b4ccfbbc65b2f140fab6db998e9654c5c2bb972 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2b4ccfbbc65b2f140fab6db998e9654c5c2bb972 commit 2b4ccfbbc65b2f140fab6db998e9654c5c2bb972 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:34 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:29 +0000 isp(4): Document support for new devices Add 28xx based HBAs to manpage. PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- share/man/man4/isp.4 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4 index 78d20723f015..36fdf3b7083f 100644 --- a/share/man/man4/isp.4 +++ b/share/man/man4/isp.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2020 +.Dd April 25, 2023 .Dt ISP 4 .Os .Sh NAME @@ -105,6 +105,14 @@ Optical 16Gb FC/FCoE PCIe cards. Optical 16Gb Fibre Channel PCIe cards. .It Qlogic 2740/2742/2764 (aka 2722/2714) Optical 32Gb Fibre Channel PCIe cards. +.It Qlogic QLE2770/QLE2772 (aka 2812) +Optical 32Gb Fibre Channel PCIe cards. +.It Qlogic QLE2774 (aka 2814) +Optical 32Gb Fibre Channel PCIe cards. +.It Qlogic QLE2870/QLE2872 (aka 2812) +Optical 64Gb Fibre Channel PCIe cards. +.It Qlogic QLE2874 (aka 2814) +Optical 64Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS Target mode support for Fibre Channel adapters may be enabled with the From nobody Fri Jul 7 21:47:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpL1Dscz4m8XJ; Fri, 7 Jul 2023 21:47: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 4QyRpL0778z4N60; Fri, 7 Jul 2023 21:47:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zuzo06UwGWCjm3LtymNVkOydln8rsQEdFfEhwpsL7VE=; b=xVyEqaxQGkmyo/xZUS40eOxDJkOHVTAMkLytQGb5G+iJaVJzLud6xcJggJUA5wt2pZOgfU +FdGJhTJw5qit7dlwagC2BIvNDiQ1vli5Jh3INv/3asekBU9G54Bf3o0mbp+Hs8rh5kTt4 6Mi5IR7sZHh97wr1H+DzoSsapIVmOFXeYACr0mEaF16C9ky3dUrZOtdbH6TvFa+MM+Fi9N NecySBamhNdDqTNsgnZPtvzZSYoaLcNBXbJZ3L0xU7BpD0LYiajYvZ8U2COzM3EfHXgh4P /UF9r7M3d4AEGalWNgaJG1GIU+pVGN7S72IgwMbUFcFZRwd6gpe4uWhe+2/QEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zuzo06UwGWCjm3LtymNVkOydln8rsQEdFfEhwpsL7VE=; b=ATBxANTs+R8e/7PnvxymTT9f4X9vzUFzsoZoiQjEhLBUddbd2aC8IG801oI+NbDPTQzKRU K2CVWaTc9okgl3aA4mhWPkZEIeKav6WPif5UqCk4MGW7B9yea9dl1zxs9POewFxMt7dUYz 4sMq6kUJll6OkvA3peIeh06/0NbOY1U1y2P7VopwSIzN51FVxpGluI96jtr2RPZM4yv5hK iYvqXre5/4wqNew+B91FEt9q9GCgHDa3DTsbgUoIO/dlBhBYh3De+mo+13IdBoIUXSz9Gm dLB33uw0xYHDpsmUKVhYH9U+es32yyGiYQxJyiOenM+NNkrJoqGGDGdWE1bWVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766474; a=rsa-sha256; cv=none; b=oMayGNkwVJXeWjyj92BzeP5nTWZ4/H7bliEeseeteFYNs+nzJpOtoa8UAfKMt1RE6SYxi9 6MPcYcuqGhuzYIS+XuuXoOCO+xBqGqyzzxNE9AAqjjVf9cos4P9sHSrITk6z+Ks6Y4JOa/ Qnztvelb6xKJLXnhd2oGRc8qRhA7cfSYdGPv1nsIFSxLuzFy5E5HIiWiajbUUVF7rJ2qtx iqUNbHD3xtshkALj503IFC8SZWWNAvZgaRblbWqjjCeWBqLHhLm6XCDb5dCUURXKQoW4p9 gdg3hvsbj+L8KeKtNe/zaDh7iUqGq1qIsC7VH2I0lx4fwGFVo0p/LC8rwpJuHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpK6KSvzvk5; Fri, 7 Jul 2023 21:47: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 367LlrHe094548; Fri, 7 Jul 2023 21:47:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367LlrnH094547; Fri, 7 Jul 2023 21:47:53 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:47:53 GMT Message-Id: <202307072147.367LlrnH094547@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: 0c5f23d2f702 - main - ispfw(4): Add BUGS section with note about bundled firmware List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c5f23d2f7029608b0f9977f81fcb5746608fc21 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c5f23d2f7029608b0f9977f81fcb5746608fc21 commit 0c5f23d2f7029608b0f9977f81fcb5746608fc21 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:34 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:29 +0000 ispfw(4): Add BUGS section with note about bundled firmware Note that only firmware for 24xx and 25xx based HBAs is bundled with ispfw(4). Those get the bundled firmware loaded into the HBAs memory and executed. All other HBAs will use the firmware from flash. PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- share/man/man4/ispfw.4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ispfw.4 b/share/man/man4/ispfw.4 index 8353413fe280..8cff500b9506 100644 --- a/share/man/man4/ispfw.4 +++ b/share/man/man4/ispfw.4 @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2020 +.Dd April 25, 2023 .Dt ISPFW 4 .Os .Sh NAME @@ -60,3 +60,5 @@ This driver was written by .An Matthew Jacob . Later improvement was done by .An Alexander Motin Aq Mt mav@FreeBSD.org . +.Sh BUGS +Only firmware for the 24xx and 25xx based cards is included. From nobody Fri Jul 7 21:47:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpM4NfYz4m8XK; Fri, 7 Jul 2023 21:47: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 4QyRpM19NSz4NC3; Fri, 7 Jul 2023 21:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nocKlERDJgouxSJJq6/4QWXtmv/3m/NzcACGMPabaxw=; b=psOpn4iYWAalHtyMlCm9OxTTPlJj+IFCBOE/MaeZQMvQmx/haePt0Yr2MNTBbqskMDVZ4O q+rxA1y25dpEjkgjy7Jpo/1Tzk1GKlj7ZeC3PVajJWJwqSD84MdTvGOxnMOTW21ozfGrQS j8gWPlL1J2xT718otZwYtYdZLd0DeMVC431ldTnXFxW7m96a2LNULMpdvVKVECHxaVkX/1 P9ZolyFPOjE7MFMN8U2x3VGjtWCMVhB2gGJDIcrzgPJDw4htcRODagL7EzkfBELbWdfWF6 aNmNyUx3hNRFDXaw62LjC/q+E2Pm2facuB8QINXdBi7+V4I4nkiRSfy+UTqo8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nocKlERDJgouxSJJq6/4QWXtmv/3m/NzcACGMPabaxw=; b=bL62mihRCJIp7mgvV5Mrc/huvuolPyY6Q+IiR7gdu/S9QCphYldt/nz1/bE4DjaCS/8s9U SqSgpM5QIiVZqWEHrAfbVxzbp0u2zYglW+W7OlnPda1ROkH3uzevlPwf32WHekmmUn4MZw nVGadBD83VWAtFe3fkjuUAjP0LznMRZXnnRmAyZhJEx/+Oxcc7Lr9owryrowzlMWiegWt/ qi55miu55Q9V3Har3DRSM7h3mxxoXsTlIZ/WAMtdsgoV0dYMk2JZogW9DYCIF8oJ1u0bcX ODKNhfYDrvKbE8ohgbq3OIKVkJqTN3RN4HQST0oWUQGGw/seGVd/xckbqhWoPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766475; a=rsa-sha256; cv=none; b=n736e1+f94I0ZkhnwWk0qZ7MhjXT6Mf2F9nMq8MlrpMQrAXQFPFzsn05YdPthO9XuyAZF6 X89h6U095OASSdjrYlF8M97yRfV3fDA5JwerykjTrRuuu4du7y2nsJyNIAVCHD+47mwWPP PFgK9S+dnjMJ+HrEGTdqzvxGX3rsfNvkYi+MrItIq6qBFb4Z6K6LSea6GW8YFzqGiZpcOj wNL8BQjHaSDGbf3BS95X+cBanLCXQ4FsLmiRXR987sV79j3rxXsMCQsDP+oChZHHwQKJl3 xlrhYsX1pLuN3MXSWFjV0J5QO8hnqqF/UZ83EpaCsCpra4ykNaAFsFuC98CFmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpM06sXztsP; Fri, 7 Jul 2023 21:47: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 367Llsjk094569; Fri, 7 Jul 2023 21:47:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367LlskM094568; Fri, 7 Jul 2023 21:47:54 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:47:54 GMT Message-Id: <202307072147.367LlskM094568@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: f76f7fefa1bb - main - isp(4): Fix reading NVRAM contents for 28xx based devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f76f7fefa1bb5dc2ec0c9e44740faac0b46dac25 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f76f7fefa1bb5dc2ec0c9e44740faac0b46dac25 commit f76f7fefa1bb5dc2ec0c9e44740faac0b46dac25 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:34 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:30 +0000 isp(4): Fix reading NVRAM contents for 28xx based devices Use correct NVRAM address for ISP28xx based HBAs to read NVRAM contents. WWPN/WWNN and framesize are correctly read from NVRAM now. PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- sys/dev/isp/isp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 17163c3c4cbd..46bb40c0fe07 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -4380,7 +4380,9 @@ isp_rd_2400_nvram(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) uint32_t base = 0x7ffe0000; uint32_t tmp = 0; - if (IS_26XX(isp)) { + if (IS_28XX(isp)) { + base = 0x7fad0000; /* 0x7f7d0000 + 0x300000 */ + } else if (IS_26XX(isp)) { base = 0x7fe7c000; /* XXX: Observation, may be wrong. */ } else if (IS_25XX(isp)) { base = 0x7ff00000 | 0x48000; From nobody Fri Jul 7 21:47:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpN4Jprz4m8lC; Fri, 7 Jul 2023 21:47: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 4QyRpN1xstz4NCD; Fri, 7 Jul 2023 21:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HLFfojaKT+bYG0F0wO5UKyJq++M6n/OVJlj9cjZ/Xqg=; b=gcuAZsyVRBtHhPYvW/ettBeCLlPGpI5pVdrCEsbR3Aqja/RAhxIzkgdRjc96t8r1w6/CK/ ACBhtt+ROTJbaXT8QmRiEy6nnqdahPDutvRxn/38g0WXosECz4/KEajbTLQUOUOk/w2kBW LL+E+G9y1kewkZWLiHZxuvgDScyOU3dTpsuwFN+Ot1TQovGsQeaXLk0ddM+MV/qFqmSD1K PSwPiK084w2kvr6mjFFmIa53SCcHwK2B7lSa5jcKxh96Sw0DHheXRtZHhYD6hQ/1jHInUR UYVO3iBbfmHwVkY+NLQl/XGA2ztGy1USdNjKSSx2GphD3LUqr6H0qcT07OWDxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HLFfojaKT+bYG0F0wO5UKyJq++M6n/OVJlj9cjZ/Xqg=; b=bqwN8CDMQBfLX9w8r9qmXz3fva7/Kdol7hYIWAXhkBSfWclfNZqL5vyXgZ2xWIEvMgy6TS l2p3ZzyQ4e6eGyMUBK6o10N1++Gl7MWGUN7PCpAAmCS19YV5Pyl2jg2c3kYbmIF/v/Ytmm a25GB+/ajyixM2O84jtJDOamIxM/1OMBLtI6bmST0KY0GIkmR2g/TXQ3OUflwtBT5fDbf8 THn/lE9YjEtDpb2NmBz0ZWRfRq504Sl0QjwRFTFgT5BKz9wrfEwUsdsK0pIpOALKw/Gfk0 rke9+0d5gIWDX7pvtqZq7fqMg71m0yUeX1t9X4PWI1t+OT75JcfCen99hctseg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766476; a=rsa-sha256; cv=none; b=bQa7+GVOLeFP4+ERRm2V3Qy1bpjXll4hEj3lwHoP1fFdO3dVxrhspFfvOeY/Y+b3BkbWLB DWy1J03iqjG5lCTDLTeLGZYmnRn5/jMnjjdFxxdaNyZ0hLH4+gA5MceqnzPsGvhZfubipX n/HcX5p9tuoaHm1fHew1+gHutINQixfbEqg2bOJILO6+hnmslxcEYhs/cMk5YrSxvkeMLW mwPHXTE5YPaWKSeEvks09MwUNuP0JlHDzVNRZlYqhozOdxJjy0y/oM6BENSL4Ya9I8OJ8W EI3Mh4JrdbkEtknB6WXS3Z47RrDa1WQOEeW3yhT3THuSk0PdUD51PXwr8FAijQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpN137pzvSd; Fri, 7 Jul 2023 21:47: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 367LluBM094588; Fri, 7 Jul 2023 21:47:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367LluFY094587; Fri, 7 Jul 2023 21:47:56 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:47:56 GMT Message-Id: <202307072147.367LluFY094587@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: 233ab94cfd78 - main - ispfw(4): Reword to be more specific List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 233ab94cfd78db16ca431b09f36cebb8ee4674e9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=233ab94cfd78db16ca431b09f36cebb8ee4674e9 commit 233ab94cfd78db16ca431b09f36cebb8ee4674e9 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:34 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:30 +0000 ispfw(4): Reword to be more specific Make clear what "included" means, as suggested by imp@ PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- share/man/man4/ispfw.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ispfw.4 b/share/man/man4/ispfw.4 index 8cff500b9506..d035c21cfb01 100644 --- a/share/man/man4/ispfw.4 +++ b/share/man/man4/ispfw.4 @@ -61,4 +61,5 @@ This driver was written by Later improvement was done by .An Alexander Motin Aq Mt mav@FreeBSD.org . .Sh BUGS -Only firmware for the 24xx and 25xx based cards is included. +Only firmware for the 24xx and 25xx based cards is included in +.Nm . From nobody Fri Jul 7 21:47:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpP3gZcz4m8Zp; Fri, 7 Jul 2023 21:47: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 4QyRpP2csLz4NG6; Fri, 7 Jul 2023 21:47:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xoqhbuUxAfHvXSiGQDp4Q0k+LS1r+7rfrdia+XeUSHU=; b=Pg/5o539ar8UHorTBorU4/+Z/x77ZSVfOslHENnZJwSmwKoIteK1dvftW0j5pNhuYSA8tw riOVsGxe1jdnIbHd+LuWvtJC6twQFAAXXrW4Ukht19yVte0BwzCxQOM7TpS315kx8T8tuF bhLV4uV3sCG540PCkT2AW/7jQ+cxOUY/P/Ko6svrc4/cl5GV8beI4LhBYfsgS8CLUWTeqo U/3rVgh4euecO6AHUPWQ2YqZ9gkKUb56mkyqplmmtEMc+el7noMhtRb0oJrUCvTRiVoclj rOIn/xUgur8UEXtmPZsxfGetK/LpuhPVAV00K18KKsFclZ22eQmgx1Q/lYJvEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xoqhbuUxAfHvXSiGQDp4Q0k+LS1r+7rfrdia+XeUSHU=; b=aI8q7at5sZ9OVS/1oH1d8m6IrDYNh8e5R4iXKc77i0iwdx2WRnvyrUvRGoPe22swsitCMl GL0ibJ1qB+89fGITyNk/jleqCmmrvbA8AJy5tj5fNn8bMNlOff9tWJa0/Utoiq2c1d4F+x rnFRpyzqAVjA2ZaVTH8vktq6lHbNvKKwcXWvsdjmVGQCHoSYStw1+nRV6x72XCXxJ9tBse VM5l8xW85i9eWQq6xO+LCnGIEHoBO4G70sEnwkOTaoTT0HI7onUe+XjWSZDXP2pISrjj6c f6ZgbtKbVdOaCo1iwakxBwzNTpA6Fooo2dNhByvc9OWtxTashoLoZavcBUNzfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766477; a=rsa-sha256; cv=none; b=a3ho33jgClTx3n1rl6ll64HGoO9jiQToyqJlygKvS/8sclVakeopeNkapjGypreW+/JTHV WHk2q5QPbidGthWgfFMNlkUjQwf4Iy9xxeI2cRN+Tac7on8mSYng6/XehMrzgDP2CW6nkO qUuxKqmoI4AEy2yp6sCQ8a0FPiSXRMBaa109Smu0Lj/w5g5gUoymeM5S7GT3CTCRIy2+1v OJ9wF/v4OHJpHPi1+yU62In6a7PocgAz674M1OLnWzP07FREWt0l+mpg8qh8F8V1MtAriQ 8Qf9aCEExhpnS0Jpb6M4uRZpSefHlcSnrtMj9d++6Gy9il7zTgBB5gGZFh7fhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpP1gL7zv4h; Fri, 7 Jul 2023 21:47: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 367Llvsq094607; Fri, 7 Jul 2023 21:47:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Llvg4094606; Fri, 7 Jul 2023 21:47:57 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:47:57 GMT Message-Id: <202307072147.367Llvg4094606@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: 27b4a1b7e5b8 - main - isp(4): Add support to read contents of the FLT (flash layout table) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27b4a1b7e5b871c248dc501aa359c93f7263b074 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=27b4a1b7e5b871c248dc501aa359c93f7263b074 commit 27b4a1b7e5b871c248dc501aa359c93f7263b074 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:34 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:30 +0000 isp(4): Add support to read contents of the FLT (flash layout table) The FLT is like a TOC for the flash area and contains entries for every flash region with start/end address, size and flags. Start using NVRAM addresses from FLT instead of hardcoded ones for ISP28xx based HBAs. The FLT should be available on earlier HBAs too, probably since ISP24xx based. This needs further investigation and testing. PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- sys/dev/isp/isp.c | 296 ++++++++++++++++++++++++++++++++++++++++++++++++++- sys/dev/isp/ispreg.h | 81 ++++++++++++++ sys/dev/isp/ispvar.h | 22 ++++ 3 files changed, 397 insertions(+), 2 deletions(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 46bb40c0fe07..14795198a850 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -123,6 +123,14 @@ static int isp_read_nvram_2400(ispsoftc_t *); static void isp_rd_2400_nvram(ispsoftc_t *, uint32_t, uint32_t *); static void isp_parse_nvram_2400(ispsoftc_t *, uint8_t *); +static int isp_read_flthdr_28xx(ispsoftc_t *); +static void isp_rd_28xx_flthdr(ispsoftc_t *, uint32_t, uint32_t *); +static void isp_parse_flthdr_28xx(ispsoftc_t *, uint8_t *); + +static int isp_read_flt_28xx(ispsoftc_t *); +static void isp_rd_28xx_flt(ispsoftc_t *, uint32_t, uint32_t *); +static int isp_parse_flt_28xx(ispsoftc_t *, uint8_t *); + static void isp_change_fw_state(ispsoftc_t *isp, int chan, int state) { @@ -4334,18 +4342,36 @@ cleanup: static int isp_read_nvram(ispsoftc_t *isp, int bus) { + if (IS_28XX(isp)) { + fcparam *fcp = FCPARAM(isp, 0); + int r = 0; + fcp->flash_data_addr = ISP28XX_BASE_ADDR; + fcp->flt_length = 0; + r = isp_read_flthdr_28xx(isp); + if (r == 0) { + isp_read_flt_28xx(isp); + } else { + fcp->flt_region_nvram = + (0x300000 + ISP2400_NVRAM_PORT_ADDR(isp->isp_port)); + } + } return (isp_read_nvram_2400(isp)); } static int isp_read_nvram_2400(ispsoftc_t *isp) { + fcparam *fcp = FCPARAM(isp, 0); int retval = 0; uint32_t addr, csum, lwrds, *dptr; uint8_t nvram_data[ISP2400_NVRAM_SIZE]; - addr = ISP2400_NVRAM_PORT_ADDR(isp->isp_port); + if (IS_28XX(isp)) { + addr = fcp->flt_region_nvram; + } else { + addr = ISP2400_NVRAM_PORT_ADDR(isp->isp_port); + } dptr = (uint32_t *) nvram_data; for (lwrds = 0; lwrds < ISP2400_NVRAM_SIZE >> 2; lwrds++) { isp_rd_2400_nvram(isp, addr++, dptr++); @@ -4381,7 +4407,9 @@ isp_rd_2400_nvram(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) uint32_t tmp = 0; if (IS_28XX(isp)) { - base = 0x7fad0000; /* 0x7f7d0000 + 0x300000 */ + fcparam *fcp = FCPARAM(isp, 0); + base = fcp->flash_data_addr + addr; + addr = 0; } else if (IS_26XX(isp)) { base = 0x7fe7c000; /* XXX: Observation, may be wrong. */ } else if (IS_25XX(isp)) { @@ -4449,3 +4477,267 @@ isp_parse_nvram_2400(ispsoftc_t *isp, uint8_t *nvram_data) fcp->isp_xfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data); fcp->isp_zfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS3(nvram_data); } + +static int +isp_read_flthdr_28xx(ispsoftc_t *isp) +{ + int retval = 0; + uint32_t addr, lwrds, *dptr; + uint16_t csum; + uint8_t flthdr_data[FLT_HEADER_SIZE]; + + addr = ISP28XX_FLT_ADDR; + dptr = (uint32_t *) flthdr_data; + + isp_prt(isp, ISP_LOGDEBUG0, + "FLTL[DEF]: 0x%x", ISP28XX_FLT_ADDR); + for (lwrds = 0; lwrds < FLT_HEADER_SIZE >> 2; lwrds++) { + isp_rd_28xx_flthdr(isp, addr++, dptr++); + } + dptr = (uint32_t *) flthdr_data; + for (csum = 0, lwrds = 0; lwrds < FLT_HEADER_SIZE >> 4; lwrds++) { + uint16_t tmp; + ISP_IOXGET_16(isp, &dptr[lwrds], tmp); + csum += tmp; + } + if (csum != 0) { + retval = -1; + goto out; + } + isp_parse_flthdr_28xx(isp, flthdr_data); +out: + return (retval); +} + +static void +isp_rd_28xx_flthdr(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) +{ + fcparam *fcp = FCPARAM(isp, 0); + int loops = 0; + uint32_t base = fcp->flash_data_addr; + uint32_t tmp = 0; + + ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr); + for (loops = 0; loops < 5000; loops++) { + ISP_DELAY(10); + tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); + if ((tmp & (1U << 31)) != 0) { + break; + } + } + if (tmp & (1U << 31)) { + *rp = ISP_READ(isp, BIU2400_FLASH_DATA); + ISP_SWIZZLE_NVRAM_LONG(isp, rp); + } else { + *rp = 0xffffffff; + } +} + +static void +isp_parse_flthdr_28xx(ispsoftc_t *isp, uint8_t *flthdr_data) +{ + fcparam *fcp = FCPARAM(isp, 0); + uint16_t ver, csum; + + ver = le16toh((uint16_t) (ISP28XX_FLT_VERSION(flthdr_data))); + fcp->flt_length = le16toh((uint16_t) (ISP28XX_FLT_LENGTH(flthdr_data))); + csum = le16toh((uint16_t) (ISP28XX_FLT_CSUM(flthdr_data))); + + if ((fcp->flt_length == 0 ) || + (fcp->flt_length > (FLT_HEADER_SIZE + FLT_REGIONS_SIZE))) { + isp_prt(isp, ISP_LOGWARN, + "FLT[DEF]: Invalid length=0x%x(%d)", + fcp->flt_length, fcp->flt_length); + } + isp_prt(isp, ISP_LOGDEBUG0, + "FLT[DEF]: version=0x%x length=0x%x(%d) checksum=0x%x", + ver, fcp->flt_length, fcp->flt_length, csum); +} + +static int +isp_read_flt_28xx(ispsoftc_t *isp) +{ + fcparam *fcp = FCPARAM(isp, 0); + int retval = 0; + int len = fcp->flt_length - FLT_HEADER_SIZE; + uint32_t addr, lwrds, *dptr; + uint8_t flt_data[len]; + fcp->flt_region_entries = len / FLT_REGION_SIZE; + + addr = ISP28XX_FLT_ADDR + (FLT_HEADER_SIZE >> 2); + dptr = (uint32_t *) flt_data; + isp_prt(isp, ISP_LOGDEBUG0, "FLT[DEF]: regions=%d", + fcp->flt_region_entries); + for (lwrds = 0; lwrds < len >> 2; lwrds++) { + isp_rd_28xx_flt(isp, addr++, dptr++); + } + retval = isp_parse_flt_28xx(isp, flt_data); + return (retval); +} + +static void +isp_rd_28xx_flt(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) +{ + fcparam *fcp = FCPARAM(isp, 0); + int loops = 0; + uint32_t base = fcp->flash_data_addr; + uint32_t tmp = 0; + + ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr); + for (loops = 0; loops < 5000; loops++) { + ISP_DELAY(10); + tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); + if ((tmp & (1U << 31)) != 0) { + break; + } + } + if (tmp & (1U << 31)) { + *rp = ISP_READ(isp, BIU2400_FLASH_DATA); + ISP_SWIZZLE_NVRAM_LONG(isp, rp); + } else { + *rp = 0xffffffff; + } +} + +static int +isp_parse_flt_28xx(ispsoftc_t *isp, uint8_t *flt_data) +{ + fcparam *fcp = FCPARAM(isp, 0); + int count; + struct flt_region region[fcp->flt_region_entries]; + + for (count = 0; count < fcp->flt_region_entries; count++) { + region[count].code = + le16toh((uint16_t) (ISP28XX_FLT_REG_CODE(flt_data, count))); + region[count].attribute = + (uint8_t) (ISP28XX_FLT_REG_ATTR(flt_data, count)); + region[count].reserved = + (uint8_t) (ISP28XX_FLT_REG_RES(flt_data, count)); + region[count].size = + le32toh((uint32_t) (ISP28XX_FLT_REG_SIZE(flt_data, count)) >> 2); + region[count].start = + le32toh((uint32_t) (ISP28XX_FLT_REG_START(flt_data, count)) >> 2); + region[count].end = + le32toh((uint32_t) (ISP28XX_FLT_REG_END(flt_data, count)) >> 2); + + isp_prt(isp, ISP_LOGDEBUG0, + "FLT[0x%x]: start=0x%x end=0x%x size=0x%x attribute=0x%x", + region[count].code, region[count].start, region[count].end, + region[count].size, region[count].attribute); + + switch(region[count].code) { + case FLT_REG_FW: + fcp->flt_region_fw = region[count].start; + break; + case FLT_REG_BOOT_CODE: + fcp->flt_region_boot = region[count].start; + break; + case FLT_REG_VPD_0: + fcp->flt_region_vpd_nvram = region[count].start; + if (isp->isp_port == 0) + fcp->flt_region_vpd = region[count].start; + break; + case FLT_REG_VPD_1: + if (isp->isp_port == 1) + fcp->flt_region_vpd = region[count].start; + break; + case FLT_REG_VPD_2: + if (isp->isp_port == 2) + fcp->flt_region_vpd = region[count].start; + break; + case FLT_REG_VPD_3: + if (isp->isp_port == 3) + fcp->flt_region_vpd = region[count].start; + break; + case FLT_REG_NVRAM_0: + if (isp->isp_port == 0) + fcp->flt_region_nvram = region[count].start; + break; + case FLT_REG_NVRAM_1: + if (isp->isp_port == 1) + fcp->flt_region_nvram = region[count].start; + break; + case FLT_REG_NVRAM_2: + if (isp->isp_port == 2) + fcp->flt_region_nvram = region[count].start; + break; + case FLT_REG_NVRAM_3: + if (isp->isp_port == 3) + fcp->flt_region_nvram = region[count].start; + break; + case FLT_REG_FDT: + fcp->flt_region_fdt = region[count].start; + break; + case FLT_REG_FLT: + fcp->flt_region_flt = region[count].start; + break; + case FLT_REG_NPIV_CONF_0: + if (isp->isp_port == 0) + fcp->flt_region_npiv_conf = region[count].start; + break; + case FLT_REG_NPIV_CONF_1: + if (isp->isp_port == 1) + fcp->flt_region_npiv_conf = region[count].start; + break; + case FLT_REG_GOLD_FW: + fcp->flt_region_gold_fw = region[count].start; + break; + case FLT_REG_FCP_PRIO_0: + if (isp->isp_port == 0) + fcp->flt_region_fcp_prio = region[count].start; + break; + case FLT_REG_FCP_PRIO_1: + if (isp->isp_port == 1) + fcp->flt_region_fcp_prio = region[count].start; + break; + case FLT_REG_AUX_IMG_PRI_28XX: + fcp->flt_region_aux_img_status_pri = region[count].start; + break; + case FLT_REG_AUX_IMG_SEC_28XX: + fcp->flt_region_aux_img_status_sec = region[count].start; + break; + case FLT_REG_NVRAM_SEC_28XX_0: + if (isp->isp_port == 0) + fcp->flt_region_nvram_sec = region[count].start; + break; + case FLT_REG_NVRAM_SEC_28XX_1: + if (isp->isp_port == 1) + fcp->flt_region_nvram_sec = region[count].start; + break; + case FLT_REG_NVRAM_SEC_28XX_2: + if (isp->isp_port == 2) + fcp->flt_region_nvram_sec = region[count].start; + break; + case FLT_REG_NVRAM_SEC_28XX_3: + if (isp->isp_port == 3) + fcp->flt_region_nvram_sec = region[count].start; + break; + case FLT_REG_VPD_SEC_28XX_0: + fcp->flt_region_vpd_nvram_sec = region[count].start; + if (isp->isp_port == 0) + fcp->flt_region_vpd_sec = region[count].start; + break; + case FLT_REG_VPD_SEC_28XX_1: + if (isp->isp_port == 1) + fcp->flt_region_vpd_sec = region[count].start; + break; + case FLT_REG_VPD_SEC_28XX_2: + if (isp->isp_port == 2) + fcp->flt_region_vpd_sec = region[count].start; + break; + case FLT_REG_VPD_SEC_28XX_3: + if (isp->isp_port == 3) + fcp->flt_region_vpd_sec = region[count].start; + break; + } + } + isp_prt(isp, ISP_LOGDEBUG0, + "FLT[FLT]: boot=0x%x fw=0x%x vpd_nvram=0x%x vpd=0x%x nvram 0x%x " + "fdt=0x%x flt=0x%x npiv=0x%x fcp_prif_cfg=0x%x", + fcp->flt_region_boot, fcp->flt_region_fw, fcp->flt_region_vpd_nvram, + fcp->flt_region_vpd, fcp->flt_region_nvram, fcp->flt_region_fdt, + fcp->flt_region_flt, fcp->flt_region_npiv_conf, + fcp->flt_region_fcp_prio); + + return (0); +} diff --git a/sys/dev/isp/ispreg.h b/sys/dev/isp/ispreg.h index 4f7bc9cb37ce..9d2594a97a99 100644 --- a/sys/dev/isp/ispreg.h +++ b/sys/dev/isp/ispreg.h @@ -252,4 +252,85 @@ typedef struct { #define ISP2400_NVRAM_FIRMWARE_OPTIONS3(c) \ ((c)[52] | ((c)[53] << 8) | ((c)[54] << 16) | ((c)[55] << 24)) +/* + * Qlogic FLT + */ +#define ISP24XX_BASE_ADDR 0x7ff00000 +#define ISP24XX_FLT_ADDR 0x11400 + +#define ISP25XX_BASE_ADDR ISP24XX_BASE_ADDR +#define ISP25XX_FLT_ADDR 0x50400 + +#define ISP27XX_BASE_ADDR 0x7f800000 +#define ISP27XX_FLT_ADDR (0x3F1000/4) + +#define ISP28XX_BASE_ADDR 0x7f7d0000 +#define ISP28XX_FLT_ADDR (0x11000/4) + +#define FLT_HEADER_SIZE 8 +#define FLT_REGION_SIZE 16 +#define FLT_MAX_REGIONS 0xFF +#define FLT_REGIONS_SIZE (FLT_REGION_SIZE * FLT_MAX_REGIONS) + +#define ISP28XX_FLT_VERSION(c) ((c)[0] | ((c)[1] << 8)) +#define ISP28XX_FLT_LENGTH(c) ((c)[2] | ((c)[3] << 8)) +#define ISP28XX_FLT_CSUM(c) ((c)[4] | ((c)[5] << 8)) +#define ISP28XX_FLT_REG_CODE(c, o) \ + ((c)[0 + FLT_REGION_SIZE * o] | ((c)[1 + FLT_REGION_SIZE * o] << 8)) +#define ISP28XX_FLT_REG_ATTR(c, o) ((c)[2 + FLT_REGION_SIZE * o]) +#define ISP28XX_FLT_REG_RES(c, o) ((c)[3 + FLT_REGION_SIZE * o]) +#define ISP28XX_FLT_REG_SIZE(c, o) (\ + ((uint32_t)(c)[4 + FLT_REGION_SIZE * o] << 0) | \ + ((uint32_t)(c)[5 + FLT_REGION_SIZE * o] << 8) | \ + ((uint32_t)(c)[6 + FLT_REGION_SIZE * o] << 16) | \ + ((uint32_t)(c)[7 + FLT_REGION_SIZE * o] << 24)) +#define ISP28XX_FLT_REG_START(c, o) (\ + ((uint32_t)(c)[8 + FLT_REGION_SIZE * o] << 0) | \ + ((uint32_t)(c)[9 + FLT_REGION_SIZE * o] << 8) | \ + ((uint32_t)(c)[10 + FLT_REGION_SIZE * o] << 16) | \ + ((uint32_t)(c)[11 + FLT_REGION_SIZE * o] << 24)) +#define ISP28XX_FLT_REG_END(c, o) (\ + ((uint32_t)(c)[12 + FLT_REGION_SIZE * o] << 0) | \ + ((uint32_t)(c)[13 + FLT_REGION_SIZE * o] << 8) | \ + ((uint32_t)(c)[14 + FLT_REGION_SIZE * o] << 16) | \ + ((uint32_t)(c)[15 + FLT_REGION_SIZE * o] << 24)) + +struct flt_region { + uint16_t code; + uint8_t attribute; + uint8_t reserved; + uint32_t size; + uint32_t start; + uint32_t end; +}; + +#define FLT_REG_FW 0x01 +#define FLT_REG_BOOT_CODE 0x07 +#define FLT_REG_VPD_0 0x14 +#define FLT_REG_NVRAM_0 0x15 +#define FLT_REG_VPD_1 0x16 +#define FLT_REG_NVRAM_1 0x17 +#define FLT_REG_VPD_2 0xd4 +#define FLT_REG_NVRAM_2 0xd5 +#define FLT_REG_VPD_3 0xd6 +#define FLT_REG_NVRAM_3 0xd7 +#define FLT_REG_FDT 0x1a +#define FLT_REG_FLT 0x1c +#define FLT_REG_NPIV_CONF_0 0x29 +#define FLT_REG_NPIV_CONF_1 0x2a +#define FLT_REG_GOLD_FW 0x2f +#define FLT_REG_FCP_PRIO_0 0x87 +#define FLT_REG_FCP_PRIO_1 0x88 + +#define FLT_REG_AUX_IMG_PRI_28XX 0x125 +#define FLT_REG_AUX_IMG_SEC_28XX 0x126 +#define FLT_REG_NVRAM_SEC_28XX_0 0x10d +#define FLT_REG_NVRAM_SEC_28XX_1 0x10f +#define FLT_REG_NVRAM_SEC_28XX_2 0x111 +#define FLT_REG_NVRAM_SEC_28XX_3 0x113 +#define FLT_REG_VPD_SEC_28XX_0 0x10c +#define FLT_REG_VPD_SEC_28XX_1 0x10e +#define FLT_REG_VPD_SEC_28XX_2 0x110 +#define FLT_REG_VPD_SEC_28XX_3 0x112 + #endif /* _ISPREG_H */ diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index c597e715fa14..ae693c5c15e8 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -369,6 +369,28 @@ typedef struct { int isp_use_gft_id; /* Use GFT_ID */ int isp_use_gff_id; /* Use GFF_ID */ + uint32_t flash_data_addr; + /* + * FLT + */ + uint16_t flt_length; + uint32_t flt_region_entries; + uint32_t flt_region_aux_img_status_pri; + uint32_t flt_region_aux_img_status_sec; + uint32_t flt_region_boot; + uint32_t flt_region_fcp_prio; + uint32_t flt_region_fdt; + uint32_t flt_region_flt; + uint32_t flt_region_fw; + uint32_t flt_region_gold_fw; + uint32_t flt_region_npiv_conf; + uint32_t flt_region_nvram; + uint32_t flt_region_nvram_sec; + uint32_t flt_region_vpd; + uint32_t flt_region_vpd_nvram; + uint32_t flt_region_vpd_nvram_sec; + uint32_t flt_region_vpd_sec; + /* * Current active WWNN/WWPN */ From nobody Fri Jul 7 21:47:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpQ3dkZz4m8gG; Fri, 7 Jul 2023 21:47: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 4QyRpQ3MP5z4N2Y; Fri, 7 Jul 2023 21:47:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKQuc06vM3vThbxMxFzFt9tSrMtKtMTfQFFD3FgDvOY=; b=GQgJFdVNLXRei8wACy0DmxAfEXWIUu3ueit5XUhybykfzC4U/sV1cWnKvnOA22Rt5Ffx1m d6dqhLJE/uuRibcH1WR5CbXMm6+TlXfZIr53cuVXERqncDzQP9S+3V2qQssGCLwlXGIpxo 6xz+a6FrIA764xQenrezy3veqNDPJ4BAjQyYa05tvkK0s6kr4w4sKlfNhxbf4lp5xre99I SzpBxSYUvlFk0K8RBmRfw1vRNQWVZDfBWzGYYdilj+XyyM9NPKsrou9Jamz+LWXA/mBTph KYkYnk4IFZwmRZzRaLQXTYTymM3PcMiEzJIBejYW0MFnqsaqZNJk3nTk3T41Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKQuc06vM3vThbxMxFzFt9tSrMtKtMTfQFFD3FgDvOY=; b=muUpSNznoZiBfG6VH3t7wXSSsEF8MdLJyQVTKQ7ZMxapGswKNxqrapSVo1rndTefUOCFFh YnUsgZGxxvKonBMNWgTpjm+LFE9xU0SCMAXcDmELKWUwkfvq7oRATBm5QDovsfT21Plw71 ToBPv3AWRZXJnhg7xY1NTAZFWh/XdWyEeaM3WjWrAItWVmTciWyiWjzmjVy5HZNlHI4VWd ey+3/dFfcWAGM8UR7Xg9M0o43TLCbr7AGFy8RSg8oQObX705fil4OCtDbKmpaq8+7xHvHG 3zs+GFt5OYDgumftywtpDl7Y2Dj2Ma/8Gg+FgoHd5TWDcisGurLXg/Q1/L1JPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766478; a=rsa-sha256; cv=none; b=bbolwdOJKaUoDGHnKX68cH6JDl2WUcL17nQkgIfJTGzcnd1grO8m1fw0Oz96yGfnpx6iNf r6uTuPDUF7IgzBIJ1mCx7BMUuJ7aTrHmDYUPtqxtt7JpyvZlWaArKxpyTC39MJEyglDlex YHk5QRvxYgRuSw54dUxvE57Zi/gGyX0yF5UNwIhtLx4kWja/+bvzPgp3hgaWvcgKIgnPnh J5Il5KqKBSU6UV1YkuK0YkZaLtxRS2X6BSJz0a1I2Pg/pca2g4kfS5/OpsU3R/a0I6HYDq xjjxYxY1QR7gQAmjMm0Kjq49KOdbH/88Xrwb+jxXbXkDBX/ko1sR6CRjgjeC9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpQ2PWzzvk6; Fri, 7 Jul 2023 21:47: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 367LlwjS094632; Fri, 7 Jul 2023 21:47:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367LlwJK094631; Fri, 7 Jul 2023 21:47:58 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:47:58 GMT Message-Id: <202307072147.367LlwJK094631@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: 707e4d1b20aa - main - isp(4): Use the FLT on all supported controllers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 707e4d1b20aa3983f7cd2f444d6ce41eebc02698 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=707e4d1b20aa3983f7cd2f444d6ce41eebc02698 commit 707e4d1b20aa3983f7cd2f444d6ce41eebc02698 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:34 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:30 +0000 isp(4): Use the FLT on all supported controllers The ISP26xx based HBAs are left as is for now with static NVRAM addressing. Those HBAs are known as 83xx (2031 and 8031 for real) and need special handling. This is left for further investigation for now. Cosmetics: - rename functions and defines as they are no longer specific to 28xx - set reasonable log levels - sort FLT and NVRAM functions (in the order they are used) Tested and approved to work on real hardware with: - Qlogic ISP 2532 (QLogic QLE2562 8Gb 2Port FC Adapter) - Qlogic ISP 2722 (QLogic QLE2690 16Gb FC Adapter) - Qlogic ISP 2812 (QLogic QLE2772 32Gbit 2Port FC Adapter) PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- sys/dev/isp/isp.c | 417 +++++++++++++++++++++++++++++---------------------- sys/dev/isp/ispreg.h | 29 ++-- sys/dev/isp/ispvar.h | 4 + 3 files changed, 260 insertions(+), 190 deletions(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 14795198a850..87f2b04becdb 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -119,18 +119,16 @@ static void isp_mboxcmd(ispsoftc_t *, mbreg_t *); static void isp_setdfltfcparm(ispsoftc_t *, int); static int isp_read_nvram(ispsoftc_t *, int); +static int isp_read_flthdr_2xxx(ispsoftc_t *); +static void isp_rd_2xxx_flthdr(ispsoftc_t *, uint32_t, uint32_t *); +static void isp_parse_flthdr_2xxx(ispsoftc_t *, uint8_t *); +static int isp_read_flt_2xxx(ispsoftc_t *); +static void isp_rd_2xxx_flt(ispsoftc_t *, uint32_t, uint32_t *); +static int isp_parse_flt_2xxx(ispsoftc_t *, uint8_t *); static int isp_read_nvram_2400(ispsoftc_t *); static void isp_rd_2400_nvram(ispsoftc_t *, uint32_t, uint32_t *); static void isp_parse_nvram_2400(ispsoftc_t *, uint8_t *); -static int isp_read_flthdr_28xx(ispsoftc_t *); -static void isp_rd_28xx_flthdr(ispsoftc_t *, uint32_t, uint32_t *); -static void isp_parse_flthdr_28xx(ispsoftc_t *, uint8_t *); - -static int isp_read_flt_28xx(ispsoftc_t *); -static void isp_rd_28xx_flt(ispsoftc_t *, uint32_t, uint32_t *); -static int isp_parse_flt_28xx(ispsoftc_t *, uint8_t *); - static void isp_change_fw_state(ispsoftc_t *isp, int chan, int state) { @@ -4342,157 +4340,65 @@ cleanup: static int isp_read_nvram(ispsoftc_t *isp, int bus) { - if (IS_28XX(isp)) { - fcparam *fcp = FCPARAM(isp, 0); - int r = 0; - - fcp->flash_data_addr = ISP28XX_BASE_ADDR; + fcparam *fcp = FCPARAM(isp, 0); + int r = 0; + + if (isp->isp_type != ISP_HA_FC_2600) { + if (IS_28XX(isp)) { + fcp->flash_data_addr = ISP28XX_BASE_ADDR; + fcp->flt_region_flt = ISP28XX_FLT_ADDR; + } else if (IS_27XX(isp)) { + fcp->flash_data_addr = ISP27XX_BASE_ADDR; + fcp->flt_region_flt = ISP27XX_FLT_ADDR; + } else if (IS_25XX(isp)) { + fcp->flash_data_addr = ISP25XX_BASE_ADDR; + fcp->flt_region_flt = ISP25XX_FLT_ADDR; + } else { + fcp->flash_data_addr = ISP24XX_BASE_ADDR; + fcp->flt_region_flt = ISP24XX_FLT_ADDR; + } fcp->flt_length = 0; - r = isp_read_flthdr_28xx(isp); + r = isp_read_flthdr_2xxx(isp); if (r == 0) { - isp_read_flt_28xx(isp); - } else { - fcp->flt_region_nvram = - (0x300000 + ISP2400_NVRAM_PORT_ADDR(isp->isp_port)); + isp_read_flt_2xxx(isp); + } else { /* fallback to hardcoded NVRAM address */ + if (IS_28XX(isp)) { + fcp->flt_region_nvram = 0x300000; + } else if (IS_27XX(isp)) { + fcp->flash_data_addr = 0x7fe7c000; + fcp->flt_region_nvram = 0; + } else if (IS_25XX(isp)) { + fcp->flt_region_nvram = 0x48000; + } else { + fcp->flash_data_addr = 0x7ffe0000; + fcp->flt_region_nvram = 0; + } + fcp->flt_region_nvram += ISP2400_NVRAM_PORT_ADDR(isp->isp_port); } + } else { + fcp->flash_data_addr = 0x7fe7c000; + fcp->flt_region_nvram = 0; + fcp->flt_region_nvram += ISP2400_NVRAM_PORT_ADDR(isp->isp_port); } return (isp_read_nvram_2400(isp)); } static int -isp_read_nvram_2400(ispsoftc_t *isp) -{ - fcparam *fcp = FCPARAM(isp, 0); - int retval = 0; - uint32_t addr, csum, lwrds, *dptr; - uint8_t nvram_data[ISP2400_NVRAM_SIZE]; - - if (IS_28XX(isp)) { - addr = fcp->flt_region_nvram; - } else { - addr = ISP2400_NVRAM_PORT_ADDR(isp->isp_port); - } - dptr = (uint32_t *) nvram_data; - for (lwrds = 0; lwrds < ISP2400_NVRAM_SIZE >> 2; lwrds++) { - isp_rd_2400_nvram(isp, addr++, dptr++); - } - if (nvram_data[0] != 'I' || nvram_data[1] != 'S' || - nvram_data[2] != 'P') { - isp_prt(isp, ISP_LOGWARN, "invalid NVRAM header (%x %x %x)", - nvram_data[0], nvram_data[1], nvram_data[2]); - retval = -1; - goto out; - } - dptr = (uint32_t *) nvram_data; - for (csum = 0, lwrds = 0; lwrds < ISP2400_NVRAM_SIZE >> 2; lwrds++) { - uint32_t tmp; - ISP_IOXGET_32(isp, &dptr[lwrds], tmp); - csum += tmp; - } - if (csum != 0) { - isp_prt(isp, ISP_LOGWARN, "invalid NVRAM checksum"); - retval = -1; - goto out; - } - isp_parse_nvram_2400(isp, nvram_data); -out: - return (retval); -} - -static void -isp_rd_2400_nvram(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) -{ - int loops = 0; - uint32_t base = 0x7ffe0000; - uint32_t tmp = 0; - - if (IS_28XX(isp)) { - fcparam *fcp = FCPARAM(isp, 0); - base = fcp->flash_data_addr + addr; - addr = 0; - } else if (IS_26XX(isp)) { - base = 0x7fe7c000; /* XXX: Observation, may be wrong. */ - } else if (IS_25XX(isp)) { - base = 0x7ff00000 | 0x48000; - } - ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr); - for (loops = 0; loops < 5000; loops++) { - ISP_DELAY(10); - tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); - if ((tmp & (1U << 31)) != 0) { - break; - } - } - if (tmp & (1U << 31)) { - *rp = ISP_READ(isp, BIU2400_FLASH_DATA); - ISP_SWIZZLE_NVRAM_LONG(isp, rp); - } else { - *rp = 0xffffffff; - } -} - -static void -isp_parse_nvram_2400(ispsoftc_t *isp, uint8_t *nvram_data) +isp_read_flthdr_2xxx(ispsoftc_t *isp) { fcparam *fcp = FCPARAM(isp, 0); - uint64_t wwn; - - isp_prt(isp, ISP_LOGDEBUG0, - "NVRAM 0x%08x%08x 0x%08x%08x maxframelen %d", - (uint32_t) (ISP2400_NVRAM_NODE_NAME(nvram_data) >> 32), - (uint32_t) (ISP2400_NVRAM_NODE_NAME(nvram_data)), - (uint32_t) (ISP2400_NVRAM_PORT_NAME(nvram_data) >> 32), - (uint32_t) (ISP2400_NVRAM_PORT_NAME(nvram_data)), - ISP2400_NVRAM_MAXFRAMELENGTH(nvram_data)); - isp_prt(isp, ISP_LOGDEBUG0, - "NVRAM loopid %d fwopt1 0x%x fwopt2 0x%x fwopt3 0x%x", - ISP2400_NVRAM_HARDLOOPID(nvram_data), - ISP2400_NVRAM_FIRMWARE_OPTIONS1(nvram_data), - ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data), - ISP2400_NVRAM_FIRMWARE_OPTIONS3(nvram_data)); - - wwn = ISP2400_NVRAM_PORT_NAME(nvram_data); - fcp->isp_wwpn_nvram = wwn; - - wwn = ISP2400_NVRAM_NODE_NAME(nvram_data); - if (wwn) { - if ((wwn >> 60) != 2 && (wwn >> 60) != 5) { - wwn = 0; - } - } - if (wwn == 0 && (fcp->isp_wwpn_nvram >> 60) == 2) { - wwn = fcp->isp_wwpn_nvram; - wwn &= ~((uint64_t) 0xfff << 48); - } - fcp->isp_wwnn_nvram = wwn; - - if ((isp->isp_confopts & ISP_CFG_OWNFSZ) == 0) { - DEFAULT_FRAMESIZE(isp) = - ISP2400_NVRAM_MAXFRAMELENGTH(nvram_data); - } - if ((isp->isp_confopts & ISP_CFG_OWNLOOPID) == 0) { - fcp->isp_loopid = ISP2400_NVRAM_HARDLOOPID(nvram_data); - } - fcp->isp_fwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS1(nvram_data); - fcp->isp_xfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data); - fcp->isp_zfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS3(nvram_data); -} - -static int -isp_read_flthdr_28xx(ispsoftc_t *isp) -{ int retval = 0; uint32_t addr, lwrds, *dptr; uint16_t csum; uint8_t flthdr_data[FLT_HEADER_SIZE]; - addr = ISP28XX_FLT_ADDR; + addr = fcp->flt_region_flt; dptr = (uint32_t *) flthdr_data; isp_prt(isp, ISP_LOGDEBUG0, - "FLTL[DEF]: 0x%x", ISP28XX_FLT_ADDR); + "FLTL[DEF]: 0x%x", addr); for (lwrds = 0; lwrds < FLT_HEADER_SIZE >> 2; lwrds++) { - isp_rd_28xx_flthdr(isp, addr++, dptr++); + isp_rd_2xxx_flthdr(isp, addr++, dptr++); } dptr = (uint32_t *) flthdr_data; for (csum = 0, lwrds = 0; lwrds < FLT_HEADER_SIZE >> 4; lwrds++) { @@ -4504,13 +4410,13 @@ isp_read_flthdr_28xx(ispsoftc_t *isp) retval = -1; goto out; } - isp_parse_flthdr_28xx(isp, flthdr_data); + isp_parse_flthdr_2xxx(isp, flthdr_data); out: return (retval); } static void -isp_rd_28xx_flthdr(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) +isp_rd_2xxx_flthdr(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) { fcparam *fcp = FCPARAM(isp, 0); int loops = 0; @@ -4534,28 +4440,28 @@ isp_rd_28xx_flthdr(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) } static void -isp_parse_flthdr_28xx(ispsoftc_t *isp, uint8_t *flthdr_data) +isp_parse_flthdr_2xxx(ispsoftc_t *isp, uint8_t *flthdr_data) { fcparam *fcp = FCPARAM(isp, 0); uint16_t ver, csum; - ver = le16toh((uint16_t) (ISP28XX_FLT_VERSION(flthdr_data))); - fcp->flt_length = le16toh((uint16_t) (ISP28XX_FLT_LENGTH(flthdr_data))); - csum = le16toh((uint16_t) (ISP28XX_FLT_CSUM(flthdr_data))); + ver = le16toh((uint16_t) (ISP2XXX_FLT_VERSION(flthdr_data))); + fcp->flt_length = le16toh((uint16_t) (ISP2XXX_FLT_LENGTH(flthdr_data))); + csum = le16toh((uint16_t) (ISP2XXX_FLT_CSUM(flthdr_data))); if ((fcp->flt_length == 0 ) || (fcp->flt_length > (FLT_HEADER_SIZE + FLT_REGIONS_SIZE))) { - isp_prt(isp, ISP_LOGWARN, + isp_prt(isp, ISP_LOGERR, "FLT[DEF]: Invalid length=0x%x(%d)", fcp->flt_length, fcp->flt_length); } - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGCONFIG, "FLT[DEF]: version=0x%x length=0x%x(%d) checksum=0x%x", ver, fcp->flt_length, fcp->flt_length, csum); } static int -isp_read_flt_28xx(ispsoftc_t *isp) +isp_read_flt_2xxx(ispsoftc_t *isp) { fcparam *fcp = FCPARAM(isp, 0); int retval = 0; @@ -4564,19 +4470,19 @@ isp_read_flt_28xx(ispsoftc_t *isp) uint8_t flt_data[len]; fcp->flt_region_entries = len / FLT_REGION_SIZE; - addr = ISP28XX_FLT_ADDR + (FLT_HEADER_SIZE >> 2); + addr = fcp->flt_region_flt + (FLT_HEADER_SIZE >> 2); dptr = (uint32_t *) flt_data; - isp_prt(isp, ISP_LOGDEBUG0, "FLT[DEF]: regions=%d", + isp_prt(isp, ISP_LOGCONFIG, "FLT[DEF]: regions=%d", fcp->flt_region_entries); for (lwrds = 0; lwrds < len >> 2; lwrds++) { - isp_rd_28xx_flt(isp, addr++, dptr++); + isp_rd_2xxx_flt(isp, addr++, dptr++); } - retval = isp_parse_flt_28xx(isp, flt_data); + retval = isp_parse_flt_2xxx(isp, flt_data); return (retval); } static void -isp_rd_28xx_flt(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) +isp_rd_2xxx_flt(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) { fcparam *fcp = FCPARAM(isp, 0); int loops = 0; @@ -4600,7 +4506,7 @@ isp_rd_28xx_flt(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) } static int -isp_parse_flt_28xx(ispsoftc_t *isp, uint8_t *flt_data) +isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) { fcparam *fcp = FCPARAM(isp, 0); int count; @@ -4608,17 +4514,17 @@ isp_parse_flt_28xx(ispsoftc_t *isp, uint8_t *flt_data) for (count = 0; count < fcp->flt_region_entries; count++) { region[count].code = - le16toh((uint16_t) (ISP28XX_FLT_REG_CODE(flt_data, count))); + le16toh((uint16_t) (ISP2XXX_FLT_REG_CODE(flt_data, count))); region[count].attribute = - (uint8_t) (ISP28XX_FLT_REG_ATTR(flt_data, count)); + (uint8_t) (ISP2XXX_FLT_REG_ATTR(flt_data, count)); region[count].reserved = - (uint8_t) (ISP28XX_FLT_REG_RES(flt_data, count)); + (uint8_t) (ISP2XXX_FLT_REG_RES(flt_data, count)); region[count].size = - le32toh((uint32_t) (ISP28XX_FLT_REG_SIZE(flt_data, count)) >> 2); + le32toh((uint32_t) (ISP2XXX_FLT_REG_SIZE(flt_data, count)) >> 2); region[count].start = - le32toh((uint32_t) (ISP28XX_FLT_REG_START(flt_data, count)) >> 2); + le32toh((uint32_t) (ISP2XXX_FLT_REG_START(flt_data, count)) >> 2); region[count].end = - le32toh((uint32_t) (ISP28XX_FLT_REG_END(flt_data, count)) >> 2); + le32toh((uint32_t) (ISP2XXX_FLT_REG_END(flt_data, count)) >> 2); isp_prt(isp, ISP_LOGDEBUG0, "FLT[0x%x]: start=0x%x end=0x%x size=0x%x attribute=0x%x", @@ -4642,10 +4548,14 @@ isp_parse_flt_28xx(ispsoftc_t *isp, uint8_t *flt_data) fcp->flt_region_vpd = region[count].start; break; case FLT_REG_VPD_2: + if (!IS_27XX(isp)) + break; if (isp->isp_port == 2) fcp->flt_region_vpd = region[count].start; break; case FLT_REG_VPD_3: + if (!IS_27XX(isp)) + break; if (isp->isp_port == 3) fcp->flt_region_vpd = region[count].start; break; @@ -4658,10 +4568,14 @@ isp_parse_flt_28xx(ispsoftc_t *isp, uint8_t *flt_data) fcp->flt_region_nvram = region[count].start; break; case FLT_REG_NVRAM_2: + if (!IS_27XX(isp)) + break; if (isp->isp_port == 2) fcp->flt_region_nvram = region[count].start; break; case FLT_REG_NVRAM_3: + if (!IS_27XX(isp)) + break; if (isp->isp_port == 3) fcp->flt_region_nvram = region[count].start; break; @@ -4690,48 +4604,79 @@ isp_parse_flt_28xx(ispsoftc_t *isp, uint8_t *flt_data) if (isp->isp_port == 1) fcp->flt_region_fcp_prio = region[count].start; break; + case FLT_REG_IMG_PRI_27XX: + if (IS_27XX(isp)) + fcp->flt_region_img_status_pri = region[count].start; + break; + case FLT_REG_IMG_SEC_27XX: + if (IS_27XX(isp)) + fcp->flt_region_img_status_sec = region[count].start; + break; + case FLT_REG_FW_SEC_27XX: + if (IS_27XX(isp)) + fcp->flt_region_fw_sec = region[count].start; + break; + case FLT_REG_BOOTLOAD_SEC_27XX: + if (IS_27XX(isp)) + fcp->flt_region_boot_sec = region[count].start; + break; case FLT_REG_AUX_IMG_PRI_28XX: - fcp->flt_region_aux_img_status_pri = region[count].start; + if (IS_27XX(isp)) + fcp->flt_region_aux_img_status_pri = region[count].start; break; case FLT_REG_AUX_IMG_SEC_28XX: - fcp->flt_region_aux_img_status_sec = region[count].start; + if (IS_27XX(isp)) + fcp->flt_region_aux_img_status_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_0: - if (isp->isp_port == 0) - fcp->flt_region_nvram_sec = region[count].start; + if (IS_27XX(isp)) + if (isp->isp_port == 0) + fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_1: - if (isp->isp_port == 1) - fcp->flt_region_nvram_sec = region[count].start; + if (IS_27XX(isp)) + if (isp->isp_port == 1) + fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_2: - if (isp->isp_port == 2) - fcp->flt_region_nvram_sec = region[count].start; + if (IS_27XX(isp)) + if (isp->isp_port == 2) + fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_3: - if (isp->isp_port == 3) - fcp->flt_region_nvram_sec = region[count].start; + if (IS_27XX(isp)) + if (isp->isp_port == 3) + fcp->flt_region_nvram_sec = region[count].start; break; + case FLT_REG_VPD_SEC_27XX_0: case FLT_REG_VPD_SEC_28XX_0: - fcp->flt_region_vpd_nvram_sec = region[count].start; - if (isp->isp_port == 0) - fcp->flt_region_vpd_sec = region[count].start; + if (IS_27XX(isp)) { + fcp->flt_region_vpd_nvram_sec = region[count].start; + if (isp->isp_port == 0) + fcp->flt_region_vpd_sec = region[count].start; + } break; + case FLT_REG_VPD_SEC_27XX_1: case FLT_REG_VPD_SEC_28XX_1: - if (isp->isp_port == 1) - fcp->flt_region_vpd_sec = region[count].start; + if (IS_27XX(isp)) + if (isp->isp_port == 1) + fcp->flt_region_vpd_sec = region[count].start; break; + case FLT_REG_VPD_SEC_27XX_2: case FLT_REG_VPD_SEC_28XX_2: - if (isp->isp_port == 2) - fcp->flt_region_vpd_sec = region[count].start; + if (IS_27XX(isp)) + if (isp->isp_port == 2) + fcp->flt_region_vpd_sec = region[count].start; break; + case FLT_REG_VPD_SEC_27XX_3: case FLT_REG_VPD_SEC_28XX_3: - if (isp->isp_port == 3) - fcp->flt_region_vpd_sec = region[count].start; + if (IS_27XX(isp)) + if (isp->isp_port == 3) + fcp->flt_region_vpd_sec = region[count].start; break; } } - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGCONFIG, "FLT[FLT]: boot=0x%x fw=0x%x vpd_nvram=0x%x vpd=0x%x nvram 0x%x " "fdt=0x%x flt=0x%x npiv=0x%x fcp_prif_cfg=0x%x", fcp->flt_region_boot, fcp->flt_region_fw, fcp->flt_region_vpd_nvram, @@ -4741,3 +4686,113 @@ isp_parse_flt_28xx(ispsoftc_t *isp, uint8_t *flt_data) return (0); } + +static int +isp_read_nvram_2400(ispsoftc_t *isp) +{ + fcparam *fcp = FCPARAM(isp, 0); + int retval = 0; + uint32_t addr, csum, lwrds, *dptr; + uint8_t nvram_data[ISP2400_NVRAM_SIZE]; + + addr = fcp->flt_region_nvram; + dptr = (uint32_t *) nvram_data; + for (lwrds = 0; lwrds < ISP2400_NVRAM_SIZE >> 2; lwrds++) { + isp_rd_2400_nvram(isp, addr++, dptr++); + } + if (nvram_data[0] != 'I' || nvram_data[1] != 'S' || + nvram_data[2] != 'P') { + isp_prt(isp, ISP_LOGWARN, "invalid NVRAM header (%x %x %x)", + nvram_data[0], nvram_data[1], nvram_data[2]); + retval = -1; + goto out; + } + dptr = (uint32_t *) nvram_data; + for (csum = 0, lwrds = 0; lwrds < ISP2400_NVRAM_SIZE >> 2; lwrds++) { + uint32_t tmp; + ISP_IOXGET_32(isp, &dptr[lwrds], tmp); + csum += tmp; + } + if (csum != 0) { + isp_prt(isp, ISP_LOGWARN, "invalid NVRAM checksum"); + retval = -1; + goto out; + } + isp_parse_nvram_2400(isp, nvram_data); +out: + return (retval); +} + +static void +isp_rd_2400_nvram(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) +{ + fcparam *fcp = FCPARAM(isp, 0); + int loops = 0; + uint32_t base; // = 0x7ffe0000; + uint32_t tmp = 0; + + base = fcp->flash_data_addr + addr; + addr = 0; + + ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr); + for (loops = 0; loops < 5000; loops++) { + ISP_DELAY(10); + tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); + if ((tmp & (1U << 31)) != 0) { + break; + } + } + if (tmp & (1U << 31)) { + *rp = ISP_READ(isp, BIU2400_FLASH_DATA); + ISP_SWIZZLE_NVRAM_LONG(isp, rp); + } else { + *rp = 0xffffffff; + } +} + +static void +isp_parse_nvram_2400(ispsoftc_t *isp, uint8_t *nvram_data) +{ + fcparam *fcp = FCPARAM(isp, 0); + uint64_t wwn; + + isp_prt(isp, ISP_LOGDEBUG0, + "NVRAM 0x%08x%08x 0x%08x%08x maxframelen %d", + (uint32_t) (ISP2400_NVRAM_NODE_NAME(nvram_data) >> 32), + (uint32_t) (ISP2400_NVRAM_NODE_NAME(nvram_data)), + (uint32_t) (ISP2400_NVRAM_PORT_NAME(nvram_data) >> 32), + (uint32_t) (ISP2400_NVRAM_PORT_NAME(nvram_data)), + ISP2400_NVRAM_MAXFRAMELENGTH(nvram_data)); + isp_prt(isp, ISP_LOGDEBUG0, + "NVRAM loopid %d fwopt1 0x%x fwopt2 0x%x fwopt3 0x%x", + ISP2400_NVRAM_HARDLOOPID(nvram_data), + ISP2400_NVRAM_FIRMWARE_OPTIONS1(nvram_data), + ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data), + ISP2400_NVRAM_FIRMWARE_OPTIONS3(nvram_data)); + + wwn = ISP2400_NVRAM_PORT_NAME(nvram_data); + fcp->isp_wwpn_nvram = wwn; + + wwn = ISP2400_NVRAM_NODE_NAME(nvram_data); + if (wwn) { + if ((wwn >> 60) != 2 && (wwn >> 60) != 5) { + wwn = 0; + } + } + if (wwn == 0 && (fcp->isp_wwpn_nvram >> 60) == 2) { + wwn = fcp->isp_wwpn_nvram; + wwn &= ~((uint64_t) 0xfff << 48); + } + fcp->isp_wwnn_nvram = wwn; + + if ((isp->isp_confopts & ISP_CFG_OWNFSZ) == 0) { + DEFAULT_FRAMESIZE(isp) = + ISP2400_NVRAM_MAXFRAMELENGTH(nvram_data); + } + if ((isp->isp_confopts & ISP_CFG_OWNLOOPID) == 0) { + fcp->isp_loopid = ISP2400_NVRAM_HARDLOOPID(nvram_data); + } + fcp->isp_fwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS1(nvram_data); + fcp->isp_xfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data); + fcp->isp_zfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS3(nvram_data); +} diff --git a/sys/dev/isp/ispreg.h b/sys/dev/isp/ispreg.h index 9d2594a97a99..eae841ce2b35 100644 --- a/sys/dev/isp/ispreg.h +++ b/sys/dev/isp/ispreg.h @@ -272,24 +272,24 @@ typedef struct { #define FLT_MAX_REGIONS 0xFF #define FLT_REGIONS_SIZE (FLT_REGION_SIZE * FLT_MAX_REGIONS) -#define ISP28XX_FLT_VERSION(c) ((c)[0] | ((c)[1] << 8)) -#define ISP28XX_FLT_LENGTH(c) ((c)[2] | ((c)[3] << 8)) -#define ISP28XX_FLT_CSUM(c) ((c)[4] | ((c)[5] << 8)) -#define ISP28XX_FLT_REG_CODE(c, o) \ +#define ISP2XXX_FLT_VERSION(c) ((c)[0] | ((c)[1] << 8)) +#define ISP2XXX_FLT_LENGTH(c) ((c)[2] | ((c)[3] << 8)) +#define ISP2XXX_FLT_CSUM(c) ((c)[4] | ((c)[5] << 8)) +#define ISP2XXX_FLT_REG_CODE(c, o) \ ((c)[0 + FLT_REGION_SIZE * o] | ((c)[1 + FLT_REGION_SIZE * o] << 8)) -#define ISP28XX_FLT_REG_ATTR(c, o) ((c)[2 + FLT_REGION_SIZE * o]) -#define ISP28XX_FLT_REG_RES(c, o) ((c)[3 + FLT_REGION_SIZE * o]) -#define ISP28XX_FLT_REG_SIZE(c, o) (\ +#define ISP2XXX_FLT_REG_ATTR(c, o) ((c)[2 + FLT_REGION_SIZE * o]) +#define ISP2XXX_FLT_REG_RES(c, o) ((c)[3 + FLT_REGION_SIZE * o]) +#define ISP2XXX_FLT_REG_SIZE(c, o) (\ ((uint32_t)(c)[4 + FLT_REGION_SIZE * o] << 0) | \ ((uint32_t)(c)[5 + FLT_REGION_SIZE * o] << 8) | \ ((uint32_t)(c)[6 + FLT_REGION_SIZE * o] << 16) | \ ((uint32_t)(c)[7 + FLT_REGION_SIZE * o] << 24)) -#define ISP28XX_FLT_REG_START(c, o) (\ +#define ISP2XXX_FLT_REG_START(c, o) (\ ((uint32_t)(c)[8 + FLT_REGION_SIZE * o] << 0) | \ ((uint32_t)(c)[9 + FLT_REGION_SIZE * o] << 8) | \ ((uint32_t)(c)[10 + FLT_REGION_SIZE * o] << 16) | \ ((uint32_t)(c)[11 + FLT_REGION_SIZE * o] << 24)) -#define ISP28XX_FLT_REG_END(c, o) (\ +#define ISP2XXX_FLT_REG_END(c, o) (\ ((uint32_t)(c)[12 + FLT_REGION_SIZE * o] << 0) | \ ((uint32_t)(c)[13 + FLT_REGION_SIZE * o] << 8) | \ ((uint32_t)(c)[14 + FLT_REGION_SIZE * o] << 16) | \ @@ -322,6 +322,17 @@ struct flt_region { #define FLT_REG_FCP_PRIO_0 0x87 #define FLT_REG_FCP_PRIO_1 0x88 +/* 27xx */ +#define FLT_REG_IMG_PRI_27XX 0x95 +#define FLT_REG_IMG_SEC_27XX 0x96 +#define FLT_REG_FW_SEC_27XX 0x02 +#define FLT_REG_BOOTLOAD_SEC_27XX 0x9 +#define FLT_REG_VPD_SEC_27XX_0 0x50 +#define FLT_REG_VPD_SEC_27XX_1 0x52 +#define FLT_REG_VPD_SEC_27XX_2 0xd8 +#define FLT_REG_VPD_SEC_27XX_3 0xda + +/* 28xx */ #define FLT_REG_AUX_IMG_PRI_28XX 0x125 #define FLT_REG_AUX_IMG_SEC_28XX 0x126 #define FLT_REG_NVRAM_SEC_28XX_0 0x10d diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index ae693c5c15e8..d1aba2ffa915 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -383,6 +383,10 @@ typedef struct { uint32_t flt_region_flt; uint32_t flt_region_fw; uint32_t flt_region_gold_fw; + uint32_t flt_region_img_status_pri; + uint32_t flt_region_img_status_sec; + uint32_t flt_region_fw_sec; + uint32_t flt_region_boot_sec; uint32_t flt_region_npiv_conf; uint32_t flt_region_nvram; uint32_t flt_region_nvram_sec; From nobody Fri Jul 7 21:47:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpR4tcrz4m8hj; Fri, 7 Jul 2023 21:47: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 4QyRpR4BLRz4N86; Fri, 7 Jul 2023 21:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cizOmUM2Tvw1NjGiim6FNW7fJk9oLUhDOPyRUIAORkE=; b=We+6FZ5z7+dARJKpwYpuHnbsjyUiWaXOvyq25L/1B00uerSzcXw8ZnfVJqqDfd9NAP31DS SIHAzlJZ92XDOFFx6pqo7pkDTb46KOhlIqflKfeUB/iYYjIbq+OPWcvV7I+tnV8H8nbF9/ x7XGGFFRlzb40wa6y8ep6/RZNJsrwG2+RDdvFI6Q9yWi3vq3RoLgb3vmfkfRxxXlqPhgVF gfv01w+cCjx0m+9aw6oA4vyvuAwHHYqcBrdcjpRcQDiAuKiIUxcwdDis2QAxIXrvIgwfo7 yIWM4kgNn5S8hpY68gh68TTZHjASmY2VioF80LlXBs1mTHLDrRV3sfhJWkJbHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cizOmUM2Tvw1NjGiim6FNW7fJk9oLUhDOPyRUIAORkE=; b=oLgskhfJ8qmrZpvnZNVOfag7/8+lUo+1Csx2w7Ht0/hjOqLGn6INtiyyhVs5PD3oIosH0I xlBsSqLiQQxkwN/VYxwfC5hOs8eolWc9/qqbywg59mpbES0vO+JQWWWnCtnJagQj+xgaZU e5qhteKFxaOtWcNwFWXmJ02IVFzF3sorEVe5EaUYJkX0P8P3z17yxVKmV4Q6JX1jxDvPbm 5+9cqUmi+7FRmcJCNK3Ft1/V6+5Mh4gfgjSQSfhIlRsD+qGPQUI+KWpCwGQnxrgR5B1KEI L7Jf19nQ3AiMS6soBui8kszihLXlkAiplnCyydJr/mmuJpDD4oIy6yOYJlLkSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766479; a=rsa-sha256; cv=none; b=TIh1VtWZ1dzLeItq2MsCTbY9Y4KlafJlCmdw8DVLVQtVJOaqEsV/EbiTnQX2PTFSZBG6SL Qqz1dfjdqKrzcBvJ1KhSznyv5OfpC2Dbmn2sCt+y02rNvJSZPKTCqgcldSgnQA5/k7Mq8L LgFipKWND1xCUldtZwAOvJjIw1+lbYuyKWvZWX0yZCSIB35f1qurI6Bmaqu0sypGgZzvCt AyDf8s1KrCqMmbD3H5yOu4Ey1PyaF0ZTGsOQ5WhxtLEbz6zyvJe4LmWFQH398mLnjkzyiU 4H2Fnrc/7A7m6QQvEfM9a/i3JLhOJX6imochE0lji6p0MRu9Xm6ViifUFeCKoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpR2vl8zvmF; Fri, 7 Jul 2023 21:47: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 367LlxD3094652; Fri, 7 Jul 2023 21:47:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367LlxNA094651; Fri, 7 Jul 2023 21:47:59 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:47:59 GMT Message-Id: <202307072147.367LlxNA094651@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: 295fd9c1caeb - main - isp(4): Remove redundant functions for reading data from FLT and flash List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 295fd9c1caeb42a4c93005080320d011bf01e4c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=295fd9c1caeb42a4c93005080320d011bf01e4c0 commit 295fd9c1caeb42a4c93005080320d011bf01e4c0 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:34 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:30 +0000 isp(4): Remove redundant functions for reading data from FLT and flash Rename isp_rd_2400_nvram to isp_rd_2xxx_flash. Cleanup some leftovers. Hide all output regarding FLT parsing behind ISP_LOGDEBUG0. Thanks to imp@ and mav@ for reviewing and commenting. PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- sys/dev/isp/isp.c | 115 +++++++++++++++--------------------------------------- 1 file changed, 31 insertions(+), 84 deletions(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 87f2b04becdb..7645da635b7a 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -119,14 +119,12 @@ static void isp_mboxcmd(ispsoftc_t *, mbreg_t *); static void isp_setdfltfcparm(ispsoftc_t *, int); static int isp_read_nvram(ispsoftc_t *, int); +static void isp_rd_2xxx_flash(ispsoftc_t *, uint32_t, uint32_t *); static int isp_read_flthdr_2xxx(ispsoftc_t *); -static void isp_rd_2xxx_flthdr(ispsoftc_t *, uint32_t, uint32_t *); static void isp_parse_flthdr_2xxx(ispsoftc_t *, uint8_t *); static int isp_read_flt_2xxx(ispsoftc_t *); -static void isp_rd_2xxx_flt(ispsoftc_t *, uint32_t, uint32_t *); static int isp_parse_flt_2xxx(ispsoftc_t *, uint8_t *); static int isp_read_nvram_2400(ispsoftc_t *); -static void isp_rd_2400_nvram(ispsoftc_t *, uint32_t, uint32_t *); static void isp_parse_nvram_2400(ispsoftc_t *, uint8_t *); static void @@ -4383,6 +4381,30 @@ isp_read_nvram(ispsoftc_t *isp, int bus) return (isp_read_nvram_2400(isp)); } +static void +isp_rd_2xxx_flash(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) +{ + fcparam *fcp = FCPARAM(isp, 0); + int loops = 0; + uint32_t base = fcp->flash_data_addr; + uint32_t tmp = 0; + + ISP_WRITE(isp, BIU2400_FLASH_ADDR, base + addr); + for (loops = 0; loops < 5000; loops++) { + ISP_DELAY(10); + tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); + if ((tmp & (1U << 31)) != 0) { + break; + } + } + if (tmp & (1U << 31)) { + *rp = ISP_READ(isp, BIU2400_FLASH_DATA); + ISP_SWIZZLE_NVRAM_LONG(isp, rp); + } else { + *rp = 0xffffffff; + } +} + static int isp_read_flthdr_2xxx(ispsoftc_t *isp) { @@ -4398,7 +4420,7 @@ isp_read_flthdr_2xxx(ispsoftc_t *isp) isp_prt(isp, ISP_LOGDEBUG0, "FLTL[DEF]: 0x%x", addr); for (lwrds = 0; lwrds < FLT_HEADER_SIZE >> 2; lwrds++) { - isp_rd_2xxx_flthdr(isp, addr++, dptr++); + isp_rd_2xxx_flash(isp, addr++, dptr++); } dptr = (uint32_t *) flthdr_data; for (csum = 0, lwrds = 0; lwrds < FLT_HEADER_SIZE >> 4; lwrds++) { @@ -4415,30 +4437,6 @@ out: return (retval); } -static void -isp_rd_2xxx_flthdr(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) -{ - fcparam *fcp = FCPARAM(isp, 0); - int loops = 0; - uint32_t base = fcp->flash_data_addr; - uint32_t tmp = 0; - - ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr); - for (loops = 0; loops < 5000; loops++) { - ISP_DELAY(10); - tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); - if ((tmp & (1U << 31)) != 0) { - break; - } - } - if (tmp & (1U << 31)) { - *rp = ISP_READ(isp, BIU2400_FLASH_DATA); - ISP_SWIZZLE_NVRAM_LONG(isp, rp); - } else { - *rp = 0xffffffff; - } -} - static void isp_parse_flthdr_2xxx(ispsoftc_t *isp, uint8_t *flthdr_data) { @@ -4455,7 +4453,7 @@ isp_parse_flthdr_2xxx(ispsoftc_t *isp, uint8_t *flthdr_data) "FLT[DEF]: Invalid length=0x%x(%d)", fcp->flt_length, fcp->flt_length); } - isp_prt(isp, ISP_LOGCONFIG, + isp_prt(isp, ISP_LOGDEBUG0, "FLT[DEF]: version=0x%x length=0x%x(%d) checksum=0x%x", ver, fcp->flt_length, fcp->flt_length, csum); } @@ -4472,39 +4470,15 @@ isp_read_flt_2xxx(ispsoftc_t *isp) addr = fcp->flt_region_flt + (FLT_HEADER_SIZE >> 2); dptr = (uint32_t *) flt_data; - isp_prt(isp, ISP_LOGCONFIG, "FLT[DEF]: regions=%d", + isp_prt(isp, ISP_LOGDEBUG0, "FLT[DEF]: regions=%d", fcp->flt_region_entries); for (lwrds = 0; lwrds < len >> 2; lwrds++) { - isp_rd_2xxx_flt(isp, addr++, dptr++); + isp_rd_2xxx_flash(isp, addr++, dptr++); } retval = isp_parse_flt_2xxx(isp, flt_data); return (retval); } -static void -isp_rd_2xxx_flt(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) -{ - fcparam *fcp = FCPARAM(isp, 0); - int loops = 0; - uint32_t base = fcp->flash_data_addr; - uint32_t tmp = 0; - - ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr); - for (loops = 0; loops < 5000; loops++) { - ISP_DELAY(10); - tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); - if ((tmp & (1U << 31)) != 0) { - break; - } - } - if (tmp & (1U << 31)) { - *rp = ISP_READ(isp, BIU2400_FLASH_DATA); - ISP_SWIZZLE_NVRAM_LONG(isp, rp); - } else { - *rp = 0xffffffff; - } -} - static int isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) { @@ -4676,7 +4650,7 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) break; } } - isp_prt(isp, ISP_LOGCONFIG, + isp_prt(isp, ISP_LOGDEBUG0, "FLT[FLT]: boot=0x%x fw=0x%x vpd_nvram=0x%x vpd=0x%x nvram 0x%x " "fdt=0x%x flt=0x%x npiv=0x%x fcp_prif_cfg=0x%x", fcp->flt_region_boot, fcp->flt_region_fw, fcp->flt_region_vpd_nvram, @@ -4698,7 +4672,7 @@ isp_read_nvram_2400(ispsoftc_t *isp) addr = fcp->flt_region_nvram; dptr = (uint32_t *) nvram_data; for (lwrds = 0; lwrds < ISP2400_NVRAM_SIZE >> 2; lwrds++) { - isp_rd_2400_nvram(isp, addr++, dptr++); + isp_rd_2xxx_flash(isp, addr++, dptr++); } if (nvram_data[0] != 'I' || nvram_data[1] != 'S' || nvram_data[2] != 'P') { @@ -4723,33 +4697,6 @@ out: return (retval); } -static void -isp_rd_2400_nvram(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) -{ - fcparam *fcp = FCPARAM(isp, 0); - int loops = 0; - uint32_t base; // = 0x7ffe0000; - uint32_t tmp = 0; - - base = fcp->flash_data_addr + addr; - addr = 0; - - ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr); - for (loops = 0; loops < 5000; loops++) { - ISP_DELAY(10); - tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); - if ((tmp & (1U << 31)) != 0) { - break; - } - } - if (tmp & (1U << 31)) { - *rp = ISP_READ(isp, BIU2400_FLASH_DATA); - ISP_SWIZZLE_NVRAM_LONG(isp, rp); - } else { - *rp = 0xffffffff; - } -} - static void isp_parse_nvram_2400(ispsoftc_t *isp, uint8_t *nvram_data) { From nobody Fri Jul 7 21:48:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyRpT13Vgz4m8ct; Fri, 7 Jul 2023 21:48: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 4QyRpS53gyz4NL9; Fri, 7 Jul 2023 21:48:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H0kJbfPA26UCWn5KVwiQrXHwQnVY2ythAcGwPfFF1gw=; b=FBHHO2ETao5ruf4VX4TVgT72eN/I82OerrMGorti8FDEUXTLW/0m8A3NUiKgsJvoFmLR1W IMHOMOEzzkaNYrDF6LdT3rcuj8IF1fc64fdm+EmPY/mxVwRAMErRCGfbsemllLPmIpB8Jq qWizv6OCN7mf6jyYNJzTsj3lK/RFFE5OSw5qw8Jbfc9V/3nKl2GXYjXyzJAsWM/jA50Jtd 0YQAVZLVuosJ9yXT+QTA7ZNZLLJ+zhEoAtsQUc2uT4x7OalsuR+zTpyFYB/SvnMeBhS+6e bt2pEzMceLxJSX0jUnBMQ33y9eTc71ISdQHg1X3KC4vR6gytXXDuiCx0I2rSEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688766480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H0kJbfPA26UCWn5KVwiQrXHwQnVY2ythAcGwPfFF1gw=; b=Pl7mV9Zya5alwjpb5cSS+Xv4ZUl+jyLek5j9fo46HOsN2kWIdlBQfDj5p5ueSfxEEiwAey pPhNMU0UzH+OPTj9Nb5+KpCUsIDHaFUqeUDL2Tvr7O6z5PxL7gDfW1GJyDLq4jVoxD4k1T 5kVsRTh3v5tTXlxR6PJXC0XNTtJm7I4X4X6HlNnDmK9LCU2ZzMWWq5rTYG29g3fi8VeZAL HXxHSEg1Q74cetn9AXQsQkPNEWLcVvaynQgOf2yyJ0SaZOoVg445ah/6xWtUKU703IRQsQ cXtUuSlSosGMBC7kumuJHPXfO5CVziU+NdlwGFV+rvbGDO8J1cRhwXnvCWLdjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688766480; a=rsa-sha256; cv=none; b=ZI9CSbf0NYtWRM+Jn6aKBj7YPHrR/GTsqRsyjSD1vExkLiKLLiFRZH/zHwMOB9dKM1LymX aEyvy7rAHmMFQLRHbtoSFJSKZE2zI26nJaytHbzZF3clge7WKCHQcaF1E+4PfuoXbDCt+D oKA+vggybuF3Sk0DGC1cZC5UldUHxXtFkSESLPADpP+SiqMFIsnTcnkqaFEyFcnCcGprt3 h49G6LmEL2f881y2S1hY62WFYjW7irXBbW9q6R2BuZbtyQPcoG838bF6++mCoDKm0lCU45 0dUjURH51+E93R7i5zBQpygBSdURS/StJZiLlrgKVMF6qBOC+UR6dD1LyTEOcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyRpS3nsdzvmG; Fri, 7 Jul 2023 21:48: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 367Lm0CY094677; Fri, 7 Jul 2023 21:48:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Lm0UC094676; Fri, 7 Jul 2023 21:48:00 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:48:00 GMT Message-Id: <202307072148.367Lm0UC094676@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: 348ec8dc036b - main - isp(4): Style changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 348ec8dc036bf4ba1f607bb8acb25a0358436cc7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=348ec8dc036bf4ba1f607bb8acb25a0358436cc7 commit 348ec8dc036bf4ba1f607bb8acb25a0358436cc7 Author: Joerg Pulz AuthorDate: 2023-07-07 21:43:35 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:45:30 +0000 isp(4): Style changes Please tools/build/checkstyle9.pl as mentioned by imp@ PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- sys/dev/isp/isp.c | 42 ++++++++++++++++++++++-------------------- sys/dev/isp/ispreg.h | 4 ++-- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 7645da635b7a..a199c4242291 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -721,7 +721,9 @@ isp_init(ispsoftc_t *isp) if (IS_28XX(isp)) icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN_28XX; - isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM - using %d", DEFAULT_FRAMESIZE(isp), icbp->icb_maxfrmlen); + isp_prt(isp, ISP_LOGERR, + "bad frame length (%d) from NVRAM - using %d", + DEFAULT_FRAMESIZE(isp), icbp->icb_maxfrmlen); } if (!IS_26XX(isp)) @@ -4447,7 +4449,7 @@ isp_parse_flthdr_2xxx(ispsoftc_t *isp, uint8_t *flthdr_data) fcp->flt_length = le16toh((uint16_t) (ISP2XXX_FLT_LENGTH(flthdr_data))); csum = le16toh((uint16_t) (ISP2XXX_FLT_CSUM(flthdr_data))); - if ((fcp->flt_length == 0 ) || + if ((fcp->flt_length == 0) || (fcp->flt_length > (FLT_HEADER_SIZE + FLT_REGIONS_SIZE))) { isp_prt(isp, ISP_LOGERR, "FLT[DEF]: Invalid length=0x%x(%d)", @@ -4505,7 +4507,7 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) region[count].code, region[count].start, region[count].end, region[count].size, region[count].attribute); - switch(region[count].code) { + switch (region[count].code) { case FLT_REG_FW: fcp->flt_region_fw = region[count].start; break; @@ -4522,13 +4524,13 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) fcp->flt_region_vpd = region[count].start; break; case FLT_REG_VPD_2: - if (!IS_27XX(isp)) + if (!IS_27XX(isp)) break; if (isp->isp_port == 2) fcp->flt_region_vpd = region[count].start; break; case FLT_REG_VPD_3: - if (!IS_27XX(isp)) + if (!IS_27XX(isp)) break; if (isp->isp_port == 3) fcp->flt_region_vpd = region[count].start; @@ -4542,13 +4544,13 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) fcp->flt_region_nvram = region[count].start; break; case FLT_REG_NVRAM_2: - if (!IS_27XX(isp)) + if (!IS_27XX(isp)) break; if (isp->isp_port == 2) fcp->flt_region_nvram = region[count].start; break; case FLT_REG_NVRAM_3: - if (!IS_27XX(isp)) + if (!IS_27XX(isp)) break; if (isp->isp_port == 3) fcp->flt_region_nvram = region[count].start; @@ -4579,46 +4581,46 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) fcp->flt_region_fcp_prio = region[count].start; break; case FLT_REG_IMG_PRI_27XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_img_status_pri = region[count].start; break; case FLT_REG_IMG_SEC_27XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_img_status_sec = region[count].start; break; case FLT_REG_FW_SEC_27XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_fw_sec = region[count].start; break; case FLT_REG_BOOTLOAD_SEC_27XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_boot_sec = region[count].start; break; case FLT_REG_AUX_IMG_PRI_28XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_aux_img_status_pri = region[count].start; break; case FLT_REG_AUX_IMG_SEC_28XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_aux_img_status_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_0: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 0) fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_1: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 1) fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_2: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 2) fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_3: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 3) fcp->flt_region_nvram_sec = region[count].start; break; @@ -4632,19 +4634,19 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) break; case FLT_REG_VPD_SEC_27XX_1: case FLT_REG_VPD_SEC_28XX_1: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 1) fcp->flt_region_vpd_sec = region[count].start; break; case FLT_REG_VPD_SEC_27XX_2: case FLT_REG_VPD_SEC_28XX_2: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 2) fcp->flt_region_vpd_sec = region[count].start; break; case FLT_REG_VPD_SEC_27XX_3: case FLT_REG_VPD_SEC_28XX_3: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 3) fcp->flt_region_vpd_sec = region[count].start; break; diff --git a/sys/dev/isp/ispreg.h b/sys/dev/isp/ispreg.h index eae841ce2b35..78af1a4476cb 100644 --- a/sys/dev/isp/ispreg.h +++ b/sys/dev/isp/ispreg.h @@ -262,10 +262,10 @@ typedef struct { #define ISP25XX_FLT_ADDR 0x50400 #define ISP27XX_BASE_ADDR 0x7f800000 -#define ISP27XX_FLT_ADDR (0x3F1000/4) +#define ISP27XX_FLT_ADDR (0x3F1000 / 4) #define ISP28XX_BASE_ADDR 0x7f7d0000 -#define ISP28XX_FLT_ADDR (0x11000/4) +#define ISP28XX_FLT_ADDR (0x11000 / 4) #define FLT_HEADER_SIZE 8 #define FLT_REGION_SIZE 16 From nobody Fri Jul 7 21:56:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyS0n2Dzqz4mBgh; Fri, 7 Jul 2023 21:56: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 4QyS0n1n4Gz3H4F; Fri, 7 Jul 2023 21:56:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688767017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWrlD4d1zeenR/3HEplyH4dJnZR+FHD3IzpL2pfFaJU=; b=CaNQhjGjo5Wl24Uiv+suWpV0UaKSEwakcYSybTqykYHT4VbFerWT+hEXSJYS54p55Rci5l ehCMxlerdo+EgP444k1K11+oGl5T62o4Td7YETFd7nmiDs54zJ2Sc+RvXSjEeFwWb+UXBv 076mupciBJ+oUNOV2HJIveZUcMMXC1a1TFM4Q5EHOPannbHxo0TFm9fLbCILKYUtRoMb5q J44N2LmC0YqBHz95rns4EMUsYx4BXoJ7x+q5P3829eywb3C7UIBYrUxeFYl5pvqQDzQZyo ueifwfw5p3MpNp9xTQ2uahJAuAyw2jsBa9A2BvuIXJPFG796jGcixL3GH2lWbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688767017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWrlD4d1zeenR/3HEplyH4dJnZR+FHD3IzpL2pfFaJU=; b=VED8DUWW2bR/KqQRPZgUQoKG2dxtGonSdx++VeV8/zsYdYWcxN8rvHTgdUDURhvKplgpKq 44B/8A3jmI3yixSos+zQbL3tb4W0CAlxUgAibKy5jWE5dBuBhU/5l/i5+9Ejo2et6KP9Ds IZl1ZmM2oVWJEeaGNGWaKAaQ0Qcner/t5kcFcNrpysfdtyeBuM5uy3xGqEppQklOcVOvB4 Z15OCbL22+oo7MsnqJPebtSpAukiWHIWVubsoPHYeVg3inn0gxW8qfR8onXPnMBif23iao MMrwkA24lxV+GMsFQBU9ahzlPXDXR63T/KAWA5mK4vp3VI5KlGzBoWl/3U4GRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688767017; a=rsa-sha256; cv=none; b=LU3pZI9VEp/L3Zpms1FmDFMERsvumDDeGZlERfvMBFg52oH44ts2JQEdlMUX7OWVLhWmp+ g8b4lljFdZ2vvkW8CGifOrT6c1WNFUH8g4ldLBri2uD3oOXzH5cyPsuIa2aHsnqtYz9GGA SVHn0HFThAAMZ52wuLFQthdUQterN/0glTguLwbhuyfBoE040EBg7ghwvQcZUxL01ttBlr gNdwSiogK/IUjN9UrEpev3ai/xSLyL9560nxAKMqM5mnyB/vFHqckdLcpCJv8wDPspYilb tQ4E6YF25QGlTrTAknA5pmMUo9XFx6knlvw2mPv9t4wchq0ptTO/r6wpyxaegw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyS0n0WmqzvW7; Fri, 7 Jul 2023 21:56: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 367LuuZW010956; Fri, 7 Jul 2023 21:56:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367Luuh0010955; Fri, 7 Jul 2023 21:56:56 GMT (envelope-from git) Date: Fri, 7 Jul 2023 21:56:56 GMT Message-Id: <202307072156.367Luuh0010955@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: 38f57faa06cf - main - cat: ensure serrno is always set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38f57faa06cf1b96568eac6cb270c1748f3fde43 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=38f57faa06cf1b96568eac6cb270c1748f3fde43 commit 38f57faa06cf1b96568eac6cb270c1748f3fde43 Author: Alfonso Gregory AuthorDate: 2023-07-07 21:54:26 +0000 Commit: Warner Losh CommitDate: 2023-07-07 21:56:35 +0000 cat: ensure serrno is always set Set serrno to errno before the loop begins for the edge case that res0 is immediately NULL. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/724 --- bin/cat/cat.c | 54 +++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 5a1fab0c26a0..a58bbe93835e 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -436,7 +436,6 @@ udom_open(const char *path, int flags) */ bzero(&hints, sizeof(hints)); hints.ai_family = AF_LOCAL; - fd = -1; if (fileargs_realpath(fa, path, rpath) == NULL) return (-1); @@ -449,6 +448,10 @@ udom_open(const char *path, int flags) } cap_rights_init(&rights, CAP_CONNECT, CAP_READ, CAP_WRITE, CAP_SHUTDOWN, CAP_FSTAT, CAP_FCNTL); + + /* Default error if something goes wrong. */ + serrno = EINVAL; + for (res = res0; res != NULL; res = res->ai_next) { fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); @@ -471,39 +474,40 @@ udom_open(const char *path, int flags) else { serrno = errno; close(fd); - fd = -1; } } freeaddrinfo(res0); + if (res == NULL) { + errno = serrno; + return (-1); + } + /* * handle the open flags by shutting down appropriate directions */ - if (fd >= 0) { - switch(flags & O_ACCMODE) { - case O_RDONLY: - cap_rights_clear(&rights, CAP_WRITE); - if (shutdown(fd, SHUT_WR) == -1) - warn(NULL); - break; - case O_WRONLY: - cap_rights_clear(&rights, CAP_READ); - if (shutdown(fd, SHUT_RD) == -1) - warn(NULL); - break; - default: - break; - } - cap_rights_clear(&rights, CAP_CONNECT, CAP_SHUTDOWN); - if (caph_rights_limit(fd, &rights) < 0) { - serrno = errno; - close(fd); - errno = serrno; - return (-1); - } - } else { + switch (flags & O_ACCMODE) { + case O_RDONLY: + cap_rights_clear(&rights, CAP_WRITE); + if (shutdown(fd, SHUT_WR) == -1) + warn(NULL); + break; + case O_WRONLY: + cap_rights_clear(&rights, CAP_READ); + if (shutdown(fd, SHUT_RD) == -1) + warn(NULL); + break; + default: + break; + } + + cap_rights_clear(&rights, CAP_CONNECT, CAP_SHUTDOWN); + if (caph_rights_limit(fd, &rights) < 0) { + serrno = errno; + close(fd); errno = serrno; + return (-1); } return (fd); } From nobody Fri Jul 7 22:07:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QySFM4PlYz4mDmN; Fri, 7 Jul 2023 22:07: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 4QySFM400yz3JmN; Fri, 7 Jul 2023 22:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688767671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EvbL0+oO3sgWNRoSvfNibdX1o01Rflxis4OzAJkXdtM=; b=fWuAThGUkdXQKkZE2V2rFpx8QK9G6scFeAAIVvt/6hfUeTRGo1Srv4srsxXL7XLTm/SK8O Iv/im8kFbPAhtqLl5QuRGE/y9EjDYTEetZm6iDtEZvfQgB/s1+ikZp1aEXQNkUahB4bZIm b3+qQNdRF+474UUoQ/JGNBegMPMJ3qee2F4KjsdsUYoMlr4G7TMj6pDD8IBead71AjInu5 zC+DHiGYgd3ynd6wrrqhZum6+k41ijuKlVk6f2ZCuSyAplo8c9ql6v6NmgwOB3HziGlURH Sc9AalI+G7Zj75nF9BBBudR8ctzWdcmhsx2529IvNRzxmfYOnvBFmVV5JSXs0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688767671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EvbL0+oO3sgWNRoSvfNibdX1o01Rflxis4OzAJkXdtM=; b=a+EKKVwVOHJwJGLg8R8kCtGTjrfKOE14eR/nDN0BGv2LyuYEMUXU1VuX+05or3nhHkCwyu tPK8xBLDPitF3FSoJ+SCDmn6BqXjnSwPi1LU7E7hzQr+g5yOEzSx3Yo5UgmBYwKXMaMbip YayJuzHwfoUWxMXisiavxw+IFqXOeSpbCUD7cFpOJ/BZsFf6GaMhf24DU4mZvNFxvmvJtj 0U8wlmHU1DpU2zrM73ufFLslu9wRX+PlR8PMNFLo6Gy59lO2CGwW3+14dvjplsbgiMjh7D MPCTUAqO088CEV6fXARJQCRJNdKnaD1gclezRD/QtnBOi9rIHvrMV7MdvC3gMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688767671; a=rsa-sha256; cv=none; b=dx8DFrfFeQ81Bvq4MSrdZJOb4yjbRt3mPcaP20cjwwVB8JSDfOk6wRhhGMR+YEUjlAx++Y 1wtpqP4/EYwPFjmhxZjWVZMXBiLWm2owfEEQVOdhIifUT/B5edkEdcGl5DzEeT6zJbxGhe LpNFEBaBmiIeB6kryu9zLYKCl3EL/OIMlzQvFnNVhMjgiIJSqhhZOKrYkaPaoFqesJBScm qbbbeOymbZ5GwV7sLtwmUCbpSQDWnEJeHlbZmYjkuahgeSS2YXPOr+LkHw/nOLAP93GC3m tMtcCozOz/vqi3L2fEnsFYRmpDQjJhyoisS1Nr2+6oSD8k7jN0vcWUqOMt4PhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QySFM33nCzvt1; Fri, 7 Jul 2023 22:07: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 367M7pQI029416; Fri, 7 Jul 2023 22:07:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367M7pKG029415; Fri, 7 Jul 2023 22:07:51 GMT (envelope-from git) Date: Fri, 7 Jul 2023 22:07:51 GMT Message-Id: <202307072207.367M7pKG029415@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 3541d90836c0 - main - gpart(8): slices are out of context for GPT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3541d90836c0dde9734ea776f2b2b6c4ed8fd7f4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=3541d90836c0dde9734ea776f2b2b6c4ed8fd7f4 commit 3541d90836c0dde9734ea776f2b2b6c4ed8fd7f4 Author: Graham Perrin AuthorDate: 2023-07-07 22:05:46 +0000 Commit: Graham Perrin CommitDate: 2023-07-07 22:05:46 +0000 gpart(8): slices are out of context for GPT Correct the GPT example. Creation of a partition leaves free the rest of the device (not the slice). Approved-by: imp Fixes: ae1b731b5df0 Rewrite the GPT and MBR examples. For GPT, ensure that the boot partition is large enough for gptzfsboot, which has doubled in size since 10. MFC after: 1 week Pull-request: https://github.com/freebsd/freebsd-src/pull/795 --- lib/geom/part/gpart.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8 index 1b14870f0d5c..2bc1daba2ad6 100644 --- a/lib/geom/part/gpart.8 +++ b/lib/geom/part/gpart.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 1, 2023 +.Dd July 7, 2023 .Dt GPART 8 .Os .Sh NAME @@ -1429,7 +1429,7 @@ sizes of up to 256 kB. .Pp Finally, we create and format an 8 GB .Cm freebsd-ufs -partition for the root filesystem, leaving the rest of the slice free +partition for the root filesystem, leaving the rest of the device free for additional filesystems: .Bd -literal -offset indent /sbin/gpart add -s 8G -t freebsd-ufs ada0 From nobody Fri Jul 7 22:26:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QySfL5lgnz4l5HV; Fri, 7 Jul 2023 22:26: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 4QySfL5L2Hz3MBg; Fri, 7 Jul 2023 22:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688768762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAUbhgd7y7rSam9M/qC1hVGa4yprq4TYvOBJs3+AFzs=; b=aVF1GzwjtXdhczcbQurkWOxyvWs0icNkNAbMrbBCIUzTWD8j0kXaU7xoPeFMA98KhsQSWv S/Dsxvc/QPChMJmjAS7SH4qXBr2h8DKPs7Q4fdzu6FOb1aYCwGy0XuI82W9EgWLVmdTO9B 4SolDEVQ6Ft2fwDvRVVMIyO9hgmX6CaJ8OQ7cyVVKuctsWvuMG4mGUjwjHHQZlYe1YiKn0 UYuX1TcSwy7bnem5UD4KiYzW569N9ViTMofu4+Hif5o+fuK2bS07D83f8rVk5kQLS6rfLj C2jVvkMFpx8bN2vZJTl+4u4a9eAFkko6UnODIy1+eSuy9RmPDlWB0AMv3y5S9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688768762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAUbhgd7y7rSam9M/qC1hVGa4yprq4TYvOBJs3+AFzs=; b=fMBg29ney5M//alP95AlD4zEw8wf9lNzZUt0lZXBdgydGvGZcAGxtXcHg191/lOiulTVmi fNJGiCIzm3OfaHwtOfo6/7mBIqPZwZ4eg+FVd0a3mciSB4txHydQh33VWsLYY1yyN5dceH nXfvS4a4v+Ex2bWUk1hcgNxP68lV/D+bHCxlti5G/AbBfMPckqnZJX9sIYG/iTuz+WnFYD oYg4mVSmVczkhhu2HYWRx1qkhhs7s1vmKeRqayAOkzieVQ06PLGCjZirdu/BU+Npqw9mHz Fs8lUPkucXgJI5u+O4v7djA77GS21oi/evop0FRP+UmCeg+mJApLz6f2FYUOkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688768762; a=rsa-sha256; cv=none; b=vrsr4SusWuchzd7yf1EM8r/Gcs6WoVc26our/Szqb41NwOO8XJ9vEWOMOrYMtB1v8KOnjP /vf4/pZDOdRv59/blBwRQi2pF5T+56QPcqFH0qP8ar1O+vvrPoR/QaMMl0DjiUp+TKhHZK eBZrLf5v0mHHLHM3lCfGKbW1SXrVRKwQZJ03cqp8BREBV5PEzTalS76b7UF7U/XRSyDr+G E5SJ3bFZwUgePEf18ohUE7H7M4axKjNBavnuAPeV3pAMwpgES+Wux8suc9LBU3PVb2/M4e Qofh1eRaokNtALnclbE68R4tgybtSHS8kod7J9sR+J1ddoyPXpCcKl4I19RHYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QySfL4PCGzwNs; Fri, 7 Jul 2023 22:26: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 367MQ2f3061860; Fri, 7 Jul 2023 22:26:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367MQ2hK061859; Fri, 7 Jul 2023 22:26:02 GMT (envelope-from git) Date: Fri, 7 Jul 2023 22:26:02 GMT Message-Id: <202307072226.367MQ2hK061859@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: f55ef85748e4 - main - etc/rc.d/routing: use find_system_scripts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f55ef85748e48f5d70c3dbff7af1567076c79a1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f55ef85748e48f5d70c3dbff7af1567076c79a1e commit f55ef85748e48f5d70c3dbff7af1567076c79a1e Author: Brooks Davis AuthorDate: 2023-07-07 22:25:11 +0000 Commit: Brooks Davis CommitDate: 2023-07-07 22:25:11 +0000 etc/rc.d/routing: use find_system_scripts In 3693d9140e05aba9942232df13468f51a6cde136 /etc/rc switched to using find_system_scripts rather than directly including /etc/rc.d/* in the list of scripts to run in order to skip .pkgsave files. Follow suit in etc/rc.d/routing. Sponsored by: DARPA --- libexec/rc/rc.d/routing | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/routing b/libexec/rc/rc.d/routing index 2f6500938e6a..6faddd553ddd 100755 --- a/libexec/rc/rc.d/routing +++ b/libexec/rc/rc.d/routing @@ -336,8 +336,9 @@ _check_dynamicrouting() skip="$skip -s nojail" fi [ -n "$local_startup" ] && find_local_scripts_new + [ -n "$system_rc" ] && find_system_scripts - for file in $( rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null | + for file in $( rcorder ${skip} ${system_rc} ${local_rc} 2>/dev/null | xargs grep -lE '^# PROVIDE:.*\' ); do (set -- enabled; . $file) && return 0; done From nobody Fri Jul 7 22:38:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QySwV2dsgz4l89G; Fri, 7 Jul 2023 22: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 4QySwV2BNRz3Nck; Fri, 7 Jul 2023 22: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=1688769498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AybcXju2gd6NKzlq3PAizz7AL2F1vz8z1Y65Yj+4XVI=; b=o3ONGqa/yjzAonWl9X3EHQPlyvI3KIUNT0SJTkK3vpq9q+Dl3Agldpd1KUOtwyWl5IcKmx UoRFT7qK8tCqGYqdZPrPZIBNvatEaVYGgNJ1AY/1TtxycmxfqgorrU8Fg1EPmU/1zNIinM FOqnacrT2g4qARPx6zbH9exD7X21oBCu7uJ/qwAFArO/NplCEMC/ULjvOXuii9yhbRzLad 4XkPd2cwKnrRLsV/HMbx9lant/TzkJusrYd5B7NLkRBuv1GqS3rZOLjgkPfWNAUjhfadBy Btzy07mVheYcHPgcajnmD/5vSOnYYWdYx9ub4fUxmmIgXcwbqMzNeMMxdKxXiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688769498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AybcXju2gd6NKzlq3PAizz7AL2F1vz8z1Y65Yj+4XVI=; b=Yv73TOffkpqkrNAHoFgreZa9KxZ8KnmBQad9AslAeFIP+/bNqrT2RvQxRBsBuCCl9StwQ0 9JmiY2XK4XrdRNlBt/q66iivMQZJVGNld6XC2FJ0gsv29gmB9Jp9J9ZZSW92lXq7A5qUlm y9VIqOyPL+vCQjGhBR3Zk3OqZaTPtdraW5Z/UPnITlSt2nXJvwhm/y7DQ//iAIJDSlr2nH NSLBKjOgGsztvm2e7ETPspisGpdfJ9u7kquCgsK4NeA6hVfNLE1USTlFSBFZKCYokmizDE RVYXbgKf0xBvWkcvYqWgw2YRBdqpFNVb+M9tNJXNEC0Hkvwlnf/RPwoa4qUh9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688769498; a=rsa-sha256; cv=none; b=WYiAn9E1sjedcP/jKQnJtTFQwOMPPYAqoS31KspfICXm0JUUonOY0Qjo9An8pEbzeY+62B fcKpryEOI2mP3HX8P+XthtIFSaP1K/IoLg49BdnYP+KZ41DIrZXpViM0ZDT5FgR/w+CYxT VrNAPZUyncoQJV+mKyoESk4JTWQHdMV7RzOQbKaOPqsdu8+Z6Pe1kTuviSwY0XDx+/NqyH 9ZgQaYqSKyg/WJSIZIu/YSzIVAfRn5a19tIkr5hZsi0tm9YMH+vuqRLrZg8LRCzg6+mqh8 3fz8hmKgQx3cxIgsh5s4Bqm8Y8UbtLfHTNW682pzAeDMqe25Wz/RG9JDcWzhQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QySwV18clzwmM; Fri, 7 Jul 2023 22: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 367McIeF078716; Fri, 7 Jul 2023 22: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 367McILK078715; Fri, 7 Jul 2023 22:38:18 GMT (envelope-from git) Date: Fri, 7 Jul 2023 22:38:18 GMT Message-Id: <202307072238.367McILK078715@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: 0b53a9971ec3 - main - Remove duplicate #include List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b53a9971ec39de4ce63fcf53361966ccddab852 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0b53a9971ec39de4ce63fcf53361966ccddab852 commit 0b53a9971ec39de4ce63fcf53361966ccddab852 Author: Mark O'Donovan AuthorDate: 2023-07-07 22:31:47 +0000 Commit: Warner Losh CommitDate: 2023-07-07 22:36:28 +0000 Remove duplicate #include Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/778 --- sys/dev/qlnx/qlnxe/qlnx_os.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 3c788f5c0fb7..fa95e31543a1 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include "mcp_public.h" #include "ecore_iro.h" #include "nvm_cfg.h" -#include "ecore_dev_api.h" #include "ecore_dbg_fw_funcs.h" #include "ecore_iov_api.h" #include "ecore_vf_api.h" From nobody Fri Jul 7 22:38:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QySwX0pg5z4l8Km; Fri, 7 Jul 2023 22:38: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 4QySwW2VZgz3Npc; Fri, 7 Jul 2023 22:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688769499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VuzTyD3yk+/AY8E53+AMDT9P0JVEmdQhKUVqOg1KJF4=; b=Xq2AqPQ1z6aRGPJM/JWMY7bN1IaNmRZ55/UtI6ngFRF7TNjTkBPh+dBx2e6G8phlC5CWgS jLsizWWZktSRdHhnh7hgsR6QJfKc1J6aTXzaB1EqDytOwCgIipGG47sP8VfmiTE81WPK+I cYm6++keEjCZmcWoT2NEhEJZb8y9T9CIhMK3s6OrlKYYU5myJF1J0rwyiP29yknpEal3We C3/V8GdkbHy06VvnvSFbfE7mspkdTKIgZUV9zc/EXx/1IyIB3W99oOrhOw595nH1kPAxUv 3GTQzIOFIkg3ID7RwB9Obsmq9rzDTbFXij/f3cBsCaKxVhYp09cM3+mHfwkjaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688769499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VuzTyD3yk+/AY8E53+AMDT9P0JVEmdQhKUVqOg1KJF4=; b=VXH18fVt95DTdZXLrotS5zfR3BIixAixc9230mKiaXyqcJ2o4y37ueB5R8n/ad5RG67X1G eVsqf9v+d6vRfgeZ6i6JTmD8lSr7SEm92Mv6Wfl+ixG5jVpvLzChuulk1xLZmqKm2Jl25s 2owffBKjN3YIMCeVLKCZPk85k4ZW4THsowOfyvL0t9QaSPeYOoPzdav6dfnOrDaOJlUh2T /DU6D1mbuNmOYXKS58Mxm/Jswms1jFskJwpTeFJHOIKabZuBcC5EoZB97nfl3hklHBv/7V 9LKIzUvsxUvBqvKfr3xtWVfwrL9nXGLdS5RdiwEU28FRLTQEhTog0+vnGUSXDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688769499; a=rsa-sha256; cv=none; b=gXwj8ryVOzTC1NOv0sw90IFZLFuWc+QqBGO5XoV3SaBtemaxJGmmEs6OtFubSbPCFdWS6g Le+OVNOUzE/PdimtXpfhu2OPZTgJUSDVbbOzpGXT1CulAj+4Kx4kIbxp27ov4bWz37XN2z 7rsdM7Wedy1eLQw9Lw/W9ESM7FtwqUC1hV9S2osf37q5yUeA5LNH1u/8S749tsGUjSlNaX 5gdT86tto0eHO9e/iFpBQ4xi2+4saURZCfck+hiV87oX4tkn7cIjlibPlAWUoH3ag27eUT Kfwr2Cg+9MGANhCbzzy372bJpSMnlUw91Rt1qB0sNAtiCqqi1b+FxGktMzl7IA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QySwW1btxzwmN; Fri, 7 Jul 2023 22:38: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 367McJEa078751; Fri, 7 Jul 2023 22:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367McJZB078750; Fri, 7 Jul 2023 22:38:19 GMT (envelope-from git) Date: Fri, 7 Jul 2023 22:38:19 GMT Message-Id: <202307072238.367McJZB078750@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: 406ff3d57e46 - main - Simplify buffer count calculation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 406ff3d57e464073c5bb2db2a744b9bf6b714a1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=406ff3d57e464073c5bb2db2a744b9bf6b714a1e commit 406ff3d57e464073c5bb2db2a744b9bf6b714a1e Author: Mark O'Donovan AuthorDate: 2023-07-07 22:31:47 +0000 Commit: Warner Losh CommitDate: 2023-07-07 22:36:28 +0000 Simplify buffer count calculation Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/778 --- sys/dev/qlnx/qlnxe/qlnx_os.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index fa95e31543a1..135aea62c05b 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -451,17 +451,12 @@ qlnx_num_tx_compl(qlnx_host_t *ha, struct qlnx_fastpath *fp, { u16 hw_bd_cons; u16 ecore_cons_idx; - uint16_t diff; hw_bd_cons = le16toh(*txq->hw_cons_ptr); ecore_cons_idx = ecore_chain_get_cons_idx(&txq->tx_pbl); - if (hw_bd_cons < ecore_cons_idx) { - diff = (1 << 16) - (ecore_cons_idx - hw_bd_cons); - } else { - diff = hw_bd_cons - ecore_cons_idx; - } - return diff; + + return (hw_bd_cons - ecore_cons_idx); } static void @@ -2952,11 +2947,7 @@ qlnx_tx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, while (hw_bd_cons != (ecore_cons_idx = ecore_chain_get_cons_idx(&txq->tx_pbl))) { - if (hw_bd_cons < ecore_cons_idx) { - diff = (1 << 16) - (ecore_cons_idx - hw_bd_cons); - } else { - diff = hw_bd_cons - ecore_cons_idx; - } + diff = hw_bd_cons - ecore_cons_idx; if ((diff > TX_RING_SIZE) || QL_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_DIFF)){ QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_DIFF); From nobody Fri Jul 7 23:54:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyVcZ0d6mz4lWMy; Fri, 7 Jul 2023 23:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyVcZ0CSPz3qVw; Fri, 7 Jul 2023 23:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688774078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTfWE9bVQEJY0HZkb91yA+uOdu07HFEBPwR3qMCptcQ=; b=SpF5QcLtbYkyxXWpKwlw+yyz0ieDm/sz9tFad1V3O5bYpiGFspg3hGyNRgmBXR3EjDL/hw EpAf0PczRSBVMNc4wIVRqimArTK8wsO7iHgrnw61rlRuhzmyTTdQSj7/Qhaahodm6ZfufY UB7ir3upqbEts+rbTWzkd9nuMIxwqp0AVwEc7rsHJmaMqptqJv11tgQ4o5fekR/dDrn2lM 6rxZ0yeQhpZrBkLtprrSFvWc9+3nsM1+BZTEUBkRGzWQtN3ZmuKWp1xqtpyR7XPB3pU6dI YYjRaj1av1xgUedw3v8nPQZF9VMMurHI9D8dmPL0wZfU3FH0+7ZFQGagxoN3+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688774078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTfWE9bVQEJY0HZkb91yA+uOdu07HFEBPwR3qMCptcQ=; b=m9QCEDnaWyBI35ZxCk1MFtDitX1or+P4VFLL76ER8jiZLU2GWw/XLmEQOUs0uQoDDTnB9P nZFILEHGY+GgU7rjxxRlrnEGstkBdYDBR7SgdChUaXSo3lmXJi+gXlW+6uTM0XhIY8fPJO +5JmQKTdMn5VDKESJaqclCL0/W55YAF+5+G6l+luf8gfua5TbIhszww+GiggYb7LOD16t4 8J4bezBbLwF/77t6gIwLjHiLLnh0BPNLhb021y9xc+l0B80EXRNgUViXExusGAoI+8kwuF 9oaLSCC7vNVX9QLAKpSl8OnlQAz++EAU5yEymr102h3J6/WJVtu2vXl6fBucKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688774078; a=rsa-sha256; cv=none; b=Hwgb4ROWclRvkIhUmH3UFn7nDeqpmcAFsvazlToYUmOYYI/ePqFLVIxiYFhM7kp/bLgszN V8RtZruRI4oCPtNOMn26vd5RsPupHTRhh8RpcD8SYMVFduTkw6rY+5Ge4CH5gs8sNStUIT 64W97bQ+ivnQ1JiVdqT9ovagrtxsswCMfgfmkvLhTr3iHjFof9sOsicfHCF6aIwjzHZsDz r32lZ6+q+uqFgw1FhWChp6r+0Gd/4vqQnMrceNJ+9C9QV10+aLJt5wbnkG5+ZHgaOQzOpY pHaJsBzues5cfTvc5d67TqVasPe/lYhe8w2ssWLZXZJw0bxdqdBL4fWkseQIlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyVcY6GsxzyyH; Fri, 7 Jul 2023 23:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367Nsbw6010152; Fri, 7 Jul 2023 23:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367NsbXj010151; Fri, 7 Jul 2023 23:54:37 GMT (envelope-from git) Date: Fri, 7 Jul 2023 23:54:37 GMT Message-Id: <202307072354.367NsbXj010151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 5684c8783b64 - main - qlnxe: Add missing #ifdef INET to fix amd64 LINT-NOINET/NOIP builds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5684c8783b64e33f0dab058126b36776adcc8e82 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=5684c8783b64e33f0dab058126b36776adcc8e82 commit 5684c8783b64e33f0dab058126b36776adcc8e82 Author: Jessica Clarke AuthorDate: 2023-07-07 23:54:07 +0000 Commit: Jessica Clarke CommitDate: 2023-07-07 23:54:07 +0000 qlnxe: Add missing #ifdef INET to fix amd64 LINT-NOINET/NOIP builds The approach here is copied directly from qlxgb. Fixes: b0d3d44dfe63 ("qlnxe: add driver to amd64 NOTES") --- sys/dev/qlnx/qlnxe/qlnx_os.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 135aea62c05b..e8bb373fbab4 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2634,7 +2634,9 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) { int ret = 0, mask; struct ifreq *ifr = (struct ifreq *)data; +#ifdef INET struct ifaddr *ifa = (struct ifaddr *)data; +#endif qlnx_host_t *ha; ha = (qlnx_host_t *)if_getsoftc(ifp); @@ -2643,6 +2645,7 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) case SIOCSIFADDR: QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); +#ifdef INET if (ifa->ifa_addr->sa_family == AF_INET) { if_setflagbits(ifp, IFF_UP, 0); if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) { @@ -2654,9 +2657,10 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); arp_ifinit(ifp, ifa); - } else { - ether_ioctl(ifp, cmd, data); + break; } +#endif + ether_ioctl(ifp, cmd, data); break; case SIOCSIFMTU: From nobody Sat Jul 8 03:15:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qyb4H6j8Yz4lCbQ; Sat, 8 Jul 2023 03:15: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 4Qyb4H6D7Kz4GNL; Sat, 8 Jul 2023 03:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688786127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4tOqctM7MhDBt1w37EL0B+IDpKIaBbn1y5rl/CR9OA=; b=KP0V1vB/Cf4JzLIeYlV5AhYVSD/i6UMGOkTJnXfdVJupt+QbJ5xKWbvIQMTsHOKDINmW7P ZVH05UlY19IGw83jBNg0vqPpFkGlCU1li44eV0BM9bBl8VGolTBybDDKczCy7Ze0gLZu4a ncGVn0Km5gak0jS5BnVmAYABpD15ArgV1LRSgpTpPPjecQej8IJB8q+XZG6RubMPr6e2wF GAJJmPpnlDScvxPkvhRnz6tQiBG++Rogft9TiTrByf+G1tBAdU9ywSlW90Bxgi2CBzo4hO qCXahQeDP887UNp38hVvn1ga1TIfAnwkRf/n4NupKQU9uXxz7sVHlZNCMha5Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688786127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4tOqctM7MhDBt1w37EL0B+IDpKIaBbn1y5rl/CR9OA=; b=dQ8bWmFeQxM9v15bBHrj1qxYc3yGoqEIBHwRacj7vKatdnhBB9H497T9IK2kyuipL5Tb0F iH71DCOX9Ux9K7f5jpQEs5yMu1k0Jmqhb8+ErkIRksGnDTSOtWShCPaICVH8kap/QJNHWX eEf3V8yyaHuwh4yap1KsgsmKhA2nyUhJ6xoBPc+7CvQ/c/jNK0YPfuCF2WAthUzNIWyJpw /7mX/27tbhxIV0wchohfRbxMaccnEAKesfnrRLXcPsBdD8VHscLYLn6LdQJJgKlw+jFJHg v9iRQKVjEOKad531AhYHlv3BUKZbGfcr9k8tmRmO27KQZltmIAZ+1lc/OIcxKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688786127; a=rsa-sha256; cv=none; b=nUa4n0t3ZnpYy4Z3uo+5sBnCJb9wB9WjQ/bqSaH+qAuebn78Q7Uak1woC6FFAvo4mp/j1/ IEPi194jDi6ZzrErN6sgh3v3iaN8jhZoFLnqgz1UXaiEn13eWwRotbEOd/yFcQ7s008ydJ InOVaCsNzsaEaQSxAVXa/Of2YyJrmg+2GxwQhBW5ZChGLM6b3SBgEZvvYFT16NoIo7yhnh fpF2t4y38qRGxijjCGD+K0IlHKi6Pddevw6ixTRFYu8ZEh8KcKJQGn+Vy3+TRSR9jNJwOw 9t4PTXlHdIXHwUWmTmNxgfFzJWYime3dHzolzKsi0bA/FIMlBAT7eqnrffYw7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qyb4H5GPCz14cP; Sat, 8 Jul 2023 03:15: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 3683FRN9042309; Sat, 8 Jul 2023 03:15:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3683FRHd042308; Sat, 8 Jul 2023 03:15:27 GMT (envelope-from git) Date: Sat, 8 Jul 2023 03:15:27 GMT Message-Id: <202307080315.3683FRHd042308@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: bfa51318dee8 - main - pam_krb5: Add missing patch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bfa51318dee8afd9307f15e49a6a521938dccd06 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=bfa51318dee8afd9307f15e49a6a521938dccd06 commit bfa51318dee8afd9307f15e49a6a521938dccd06 Author: Cy Schubert AuthorDate: 2023-07-08 03:09:18 +0000 Commit: Cy Schubert CommitDate: 2023-07-08 03:09:18 +0000 pam_krb5: Add missing patch Include a portion of the patch that was missed in 813847e49e35. Reported by: markj Fixes: 813847e49e35 MFC after: 1 day --- lib/libpam/modules/pam_krb5/pam_krb5.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c index 3972479a581f..3c7976297ed2 100644 --- a/lib/libpam/modules/pam_krb5/pam_krb5.c +++ b/lib/libpam/modules/pam_krb5/pam_krb5.c @@ -938,18 +938,6 @@ verify_krb_v5_tgt_begin(krb5_context context, char *pam_service, int debug, continue; break; } - if (retval != 0) { /* failed to find key */ - /* Keytab or service key does not exist */ - if (debug) { - const char *msg = krb5_get_error_message(context, - retval); - syslog(LOG_DEBUG, - "pam_krb5: verify_krb_v5_tgt(): %s: %s", - "krb5_kt_read_service_key()", msg); - krb5_free_error_message(context, msg); - } - retval = 0; - } if (keyblock) krb5_free_keyblock(context, keyblock); From nobody Sat Jul 8 06:09:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyfxB06z2z4ltDG; Sat, 8 Jul 2023 06:09: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 4Qyfx95sMhz3Qsq; Sat, 8 Jul 2023 06:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688796573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AxGsh4ywucaQT69n8gLP23WC++T0ZG5HBfxBEt2OYAU=; b=oqZFqHZqUIbnh2PdPJl0fhF1vN8vUAVRQKSckVy7S/kjzdqfBNK/Jm9Pl2hXJzV4fUHVZ2 xK7trYQkgANSYRLgZd6GmEl9mRVYl/xOxIg74/mAcGZGgNg3ZF1BJbocP/QBioG/BQrHYN dOR3YeGeK80+Fq9aDDjF8H+SXf2br5lbll/0s5a4e7IRnOiphCofCxGigYjI2UojCvnKKY poIlwgBOHSyecDAWroOzIC3e5LUBjs6Tpwc/yH5DzFkUzAb4uF1ThZ8thieAzo7b67Ccg8 hg0Nk4NyNbikKCm5fFnEkfSIR0Rr9BDlEIWbZYAYmFy9b/Goz5xAIdYfm7J2Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688796573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AxGsh4ywucaQT69n8gLP23WC++T0ZG5HBfxBEt2OYAU=; b=fXR+qQcYdbYYcg6RPp370K6URpu1tJhvqEWxEMJ1vhxCs4/Nee1brft1pIIeulJfOaJE9X azGUeHKYWch3zBz6K6GYX7VX7t+ZBK2bwGVlX8vpd/30a7sZJGMftFOoizfSKCuTVDhq53 dU6wuG33pDyYFhPNe3O9CBQlql1z15hX5Xx59BZiQoVGB728O3Vwjzqos4LCwM6nfJ9mBc j3AaipE1u1ZW9KCM6S8yIpP4ChafSOxlKHdAjzrBVkCwEhe1C2MDEWu0vefv++2impASQh ED2KQ3WHQa6kPoeocFlO7uVBLlJBxAbgqhCrcbR0FkxumJbUrkqnehVMX5qoFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688796573; a=rsa-sha256; cv=none; b=O84YiRa+f+ejh3jhtIE0aALIpTMQRlU0KrPLgb39Wj4+EZH1r+TPkZynVXRxUh74XD2muz W7opLbzX+KmP6uH5SANzjs6giSLa81/DMjahVCgET6EkazY0i6I1UrSWfvoto+9bGd9s4a GSf/GdcUjby6ScCt9bFK9+juoTu7PXkMjYyNyh2m37OHn3tIDEc4esfR8dLaMkLVhwZ1lH sXnaltsZCBSSiSB994of0yllJSSCZlK1dsuAEkluVGpUtCRNGgIp1z5kW/ZGHD1vCQ4iVc i5ZCBfSIEpK+7m6U53WtNK0dIh6wDGXsJr3IkUcCXJFheG421WD5qD4ZGyF98g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qyfx94n94z18xY; Sat, 8 Jul 2023 06:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36869XY9025126; Sat, 8 Jul 2023 06:09:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36869XkT025125; Sat, 8 Jul 2023 06:09:33 GMT (envelope-from git) Date: Sat, 8 Jul 2023 06:09:33 GMT Message-Id: <202307080609.36869XkT025125@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: b370ef156ab9 - main - libthr: Patch to reduce latency to acquire+release a pthread mutex. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b370ef156ab9d88450e9bc0440df522aec88cc44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b370ef156ab9d88450e9bc0440df522aec88cc44 commit b370ef156ab9d88450e9bc0440df522aec88cc44 Author: Greg Becker AuthorDate: 2023-07-07 22:03:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-08 06:00:12 +0000 libthr: Patch to reduce latency to acquire+release a pthread mutex. The acquisition and release of an uncontended default/normal pthread mutex on FreeBSD is suprisingly slow, e.g., pthread wrlocks and binary semaphores both exhibit roughly 33% lower latency, while default/normal mutexes on Linux exhibit roughly 67% lower latency than FreeBSD. This is likely explained by the fact that AFAICT in the best case to acquire an uncontended mutex on Linux one need touch only 1 page and read+modify only 1 cacheline, whereas on FreeBSD we need to touch at least 4 pages, read 6 cachelines, and modify at least 4 cachelines. This patch does not address the pthread mutex architecture. Instead, it improves performance by adding the __always_inline attribute to mutex_lock_common() and mutex_unlock_common() to encourage constant folding and propagation, thereby lowering the latency to acquire and release a mutex due to a shorter code path with fewer compares, jumps, and mispredicts. With this patch on a stock build I see a reduction in latency of roughly 7% for default/normal mutexes, and 17% for robust mutexes. When built without PTHREADS_ASSERTIONS enabled I see a reduction in latency of roughly 15% and 26%, respectively. Suprisingly, I see similar reductions in latency for heavily contended mutexes. By default, this patch increases the size of libthr.so.3 by 2448 bytes, but when built without PTHREAD_ASSERTIONS enabled it only increases by 448 bytes. Reviewed by: jhb (previous version), kib MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40912 --- lib/libthr/thread/thr_mutex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 2cbfd9a459d3..40e0b7382f95 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -596,7 +596,7 @@ check_and_init_mutex(pthread_mutex_t *mutex, struct pthread_mutex **m) *m = *mutex; ret = 0; - if (*m == THR_PSHARED_PTR) { + if (__predict_false(*m == THR_PSHARED_PTR)) { *m = __thr_pshared_offpage(mutex, 0); if (*m == NULL) ret = EINVAL; @@ -714,7 +714,7 @@ done: return (ret); } -static inline int +static __always_inline int mutex_lock_common(struct pthread_mutex *m, const struct timespec *abstime, bool cvattach, bool rb_onlist) { @@ -728,7 +728,7 @@ mutex_lock_common(struct pthread_mutex *m, const struct timespec *abstime, if (!rb_onlist) robust = _mutex_enter_robust(curthread, m); ret = _thr_umutex_trylock2(&m->m_lock, TID(curthread)); - if (ret == 0 || ret == EOWNERDEAD) { + if (__predict_true(ret == 0) || ret == EOWNERDEAD) { enqueue_mutex(curthread, m, ret); if (ret == EOWNERDEAD) m->m_lock.m_flags |= UMUTEX_NONCONSISTENT; @@ -951,7 +951,7 @@ mutex_self_lock(struct pthread_mutex *m, const struct timespec *abstime) return (ret); } -static int +static __always_inline int mutex_unlock_common(struct pthread_mutex *m, bool cv, int *mtx_defer) { struct pthread *curthread; From nobody Sat Jul 8 06:15:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qyg4F6HQ2z4lvZQ; Sat, 8 Jul 2023 06:15:41 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qyg4F5gN2z3hrk; Sat, 8 Jul 2023 06:15:41 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688796941; 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=21GWLPZZuOuQiEAnG8u6dajWALUEdJRGkwhAXvqPAU8=; b=KsL5UX/b1MgRQTsFRkyznBVY7F8CEm6hdYcLvKtGx1sf5SQr3dVibdB4XQZ/C7rBHPuqrG BVqr/Cfs2cHSaWWpmMwe5RhEOQBWTNljNfZJixdzSmTBYks7fBXeX7w8IuwzLZt2NLel4G oNpQiNZogFjFwg3Zc836Ub42rIQkyu7C0Lt3i9WUz4x6Ay0rCGk6yMES0W12giDpdhA07g 8kmrQv7H4zxQ4DNJZiyxPzKpcmLKolBGpZa7b77oX8Hk10OX9e4bqy66fT5mvgTkqNupwH Yb9OSXwyJ+XN46p/L6iNvXfyPdJ5/hkP++NRiOXf3wnMr+lJIcQRbLvjhTcZkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688796941; 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=21GWLPZZuOuQiEAnG8u6dajWALUEdJRGkwhAXvqPAU8=; b=Gghd4F/6syYHTh9cABG2zdEyiPXAsXpCH8JIBnU1XFaURoNZ7fbGH5OT9keYUmdHnHL6MZ SPAFh5JfLTh5CHJ/BvGUc5WxLqV7/iPGvi/A+sYN98fHUcKj2Ye3PJTi5LcniIqeRACSGf o2rZz6p9ovyj3/v+ysR4JDBORjS6XBQZobDK2sNBJ/rdmGkj4K3Hf+pbh5KhUe//gb8d33 LjYGVkKnuvrc0zslalAkiUdlA47WWIIqE0+2Qt3XwIFEaLRdXM0jB4/RoJGLsGF/p996pL MgdjkkSIkFApcq9dZHi68Z5iK48O6S0YfNnGvqj6jVhQas5fM0ihRcoQVW80eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688796941; a=rsa-sha256; cv=none; b=TMj9oew98cQvthoGTm0C0vrr9SHrgYS4m76lL1r4CIWd5XQki0EAmaTaYhdNCXoH38kOW/ TKboxH2qgVgA8LSI8GjbW18C/mH8Jqu88wxK1qC5GH/TKuY3z3tR2MAMKEXKq5N0wxCFzK UPV8pEo6+Do1d8nJRuVfvMTa76cBaIh1/hp6LEqZN0zRgCbryLoJxAYopIYjt7JWJjOMkH cfpvwy7QLSixahP0L+Qbvl+C5XQcNNvvudMVM5vNfSIaWlQYO4Lb4sVZKWUgfh6xgnMRCp 0DY/6eKiNC4f37Ee/x152XfkYCgv52zL1RjwPyKKOBReOuUb8B3DyCUTYyI0QA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id A832217C; Sat, 8 Jul 2023 06:15:41 +0000 (UTC) Date: Sat, 8 Jul 2023 06:15:41 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 29cbe944e928 - main - CONTRIBUTING.md: minor changes Message-ID: References: <202307072123.367LNZ4J060993@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202307072123.367LNZ4J060993@gitrepo.freebsd.org> X-ThisMailContainsUnwantedMimeParts: N On Fri, Jul 07, 2023 at 09:23:35PM +0000, Warner Losh wrote: > commit 29cbe944e9287c2e61928c456512d3990aaffdaa > > CONTRIBUTING.md: minor changes > > - Misspelled GitHub > - angle bracket not escaped correctly > - Double white spaces You've removed them, while they are typically used after full stops as texts render better with them unless you're using proportional font. ./danfe From nobody Sat Jul 8 06:32:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QygRT5W1Wz4m0GS; Sat, 8 Jul 2023 06:32: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 4QygRT4tZBz3lBb; Sat, 8 Jul 2023 06:32:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688797941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80X/tZlEKDKZfHmmGiY3zfgjlqDTluKqz8AQSZ/Ge2Y=; b=ZE5p0yZPqF8fIuqgsS6EEUd+jzKKB5cx1yKtnv/coWegLgBpbICtL9MeqrdWEWF3AWVubF Ptrn5vtWWZvFPx1PRXFn2EqGt/dMWL+1YO1AJNAtawdpUHCXWpf2Jf+/02IYgkEFRmGJxd t5pEsyqEmO2aUWfWj5lGKbpGtLQnX1IMpzVaksvU14pCfpxPHh1m9qlhRlMFyEUnTW+JjH DdEpJo9v/hObpcK/g0Bd2dh4N4lvpTVDfYTsynF2E44dm0VgPRsq1u5cyR5TZGoT+SDR9Y NT2ZKmFBDoqZhpBPCF6zvHoP3zmIIotziSJhQJ89OJQ57GFnEAKwX8wEFrdrDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688797941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80X/tZlEKDKZfHmmGiY3zfgjlqDTluKqz8AQSZ/Ge2Y=; b=bmcknI9WlZFd3f7k/wqSAC0iEa58ZjxNDilfX6j7dEh+FiCpdhNJUHD2G40u1h8UjhQE65 pjzQ1+MW/kJmM3SmjzlTGSuVxiamrMA2MNSx9F6Cf6+KnamwDe15vdg8NfBDGhA/OGvL/O bKFKP8m3roFuC0qbJirsQ0Tte4yBrVJVI6QoU/34ukycTTl/RVIGi/YK8wbm6qTV+H+WoV XZr1FJds+kepGEwzbFB0xH63TDyPBsuWBrX0M2IhIAAGWHJomtIulszTEIpjtGmMMiM56U IxRnMEpMya2f6ClDLyviJ7iqd8Ib57zVCFvlj7Jl4JrAsvGTlQzT0SWHVcTaHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688797941; a=rsa-sha256; cv=none; b=yQ8mrKD4CxD8gH6CsVvt2tpRTNjAdw92Uc5qBqoORWs98o7g1aLEGzAk9IQkFxZv0wxg2t lAcfgTn5j09Z+jsojToN/OhBChL1x/vp9rFqmrZuV6rpoxBAoJUQUe7VOdPZFGNfXKusrP 2K61gHfZZw25w5C+bcCy5rG9YZVZjHC2kGvKszr46l+0CQ9ZtrHYzrH9G9as6MxgR920Qc EA20oopERsHALnUHm8uGELZ7OsmisFe7+aiRHj4khHAJMCrgmu2E+4YwcmzPu9pN9+qh/4 G+SwG+V74qmN9An2a3nmBt9tN8VRnIHZT3CB8dIFSxBjPmuqrSvtTLVkVQK/LQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QygRT3yTRz19rr; Sat, 8 Jul 2023 06:32: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 3686WLPU071584; Sat, 8 Jul 2023 06:32:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3686WLv0071583; Sat, 8 Jul 2023 06:32:21 GMT (envelope-from git) Date: Sat, 8 Jul 2023 06:32:21 GMT Message-Id: <202307080632.3686WLv0071583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 666c54d12ec9 - main - hwpmc(4): instead of manual edition, use sysrc(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 666c54d12ec941e1fa3741f28ba19223ec4d2c81 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=666c54d12ec941e1fa3741f28ba19223ec4d2c81 commit 666c54d12ec941e1fa3741f28ba19223ec4d2c81 Author: Graham Perrin AuthorDate: 2023-07-08 06:24:18 +0000 Commit: Graham Perrin CommitDate: 2023-07-08 06:30:52 +0000 hwpmc(4): instead of manual edition, use sysrc(8) Exemplifying safe use of sysrc(8) has become commonplace in documentation such as the FreeBSD Handbook. Encourage its use. Consistency: 'the driver' (not 'this driver'). Co-authored-by: Mina Galić Reviewed-by: imp, Mina Galić Approved by: imp MFC after: 3 days Pull-request: https://github.com/freebsd/freebsd-src/pull/785 --- share/man/man4/hwpmc.4 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/share/man/man4/hwpmc.4 b/share/man/man4/hwpmc.4 index 3ae3ce726395..1794adb66460 100644 --- a/share/man/man4/hwpmc.4 +++ b/share/man/man4/hwpmc.4 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2023 +.Dd July 8, 2023 .Dt HWPMC 4 .Os .Sh NAME @@ -47,14 +47,12 @@ Additionally, for i386 systems: .Cd "device apic" .Ed .Pp -To load the driver as a module at boot time, place the -following line in -.Xr rc.conf 5 : +To load the driver as a module at boot time: .Bd -literal -offset indent -kld_list="${kld_list} hwpmc" +sysrc kld_list+=hwpmc .Ed .Pp -Alternatively, to compile this driver into the kernel: +Alternatively, to compile the driver into the kernel: .Bd -ragged -offset indent .Cd "device hwpmc" .Ed From nobody Sat Jul 8 07:32:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qyhmg1f5bz4mDGy; Sat, 8 Jul 2023 07:32:19 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qyhmd0WpDz3vhW; Sat, 8 Jul 2023 07:32:16 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1688801525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wEchf4t+UD/zvSzu1MJ+Bxu7nRM46mTu0KPtm+YUyb0=; b=iBof6lJSL1jO5kARBnVJpbU2X1kfiR6hrIRN0Ysjt1k09Hhg2XxLJQKpLj2tYA/BcvWL+h BPYlezeyUZsQetpOJp9k7ZWBnrjim9XBsKPBZssJpzMKdhXGb5fPn19GzaL0akby2UbGlk DQunx7ZGYaMDoNpuvavFVQ67yPeYz/w= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 73b85500 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 8 Jul 2023 07:32:04 +0000 (UTC) Date: Sat, 8 Jul 2023 09:32:01 +0200 From: Emmanuel Vadot To: Mateusz Piotrowski <0mp@FreeBSD.org> Cc: Emmanuel Vadot , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: c81495a621c4 - main - fwget: Fix quoting Message-Id: <20230708093201.60f020f9e809aebf35f2fab5@bidouilliste.com> In-Reply-To: <98DC3116-140D-47C8-8B33-E5C666A76D75@FreeBSD.org> References: <202307070719.3677JqSM058134@gitrepo.freebsd.org> <98DC3116-140D-47C8-8B33-E5C666A76D75@FreeBSD.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Qyhmd0WpDz3vhW X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Hi Mateusz, On Fri, 7 Jul 2023 18:48:23 +0200 Mateusz Piotrowski <0mp@FreeBSD.org> wrote: > Hey Manu, > > > > On 7. Jul 2023, at 09:19, Emmanuel Vadot wrote: > > > > The branch main has been updated by manu: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c81495a621c461b3d3395a7c5b0e73458201c443 > > > > commit c81495a621c461b3d3395a7c5b0e73458201c443 > > Author: Emmanuel Vadot > > AuthorDate: 2023-07-07 07:16:05 +0000 > > Commit: Emmanuel Vadot > > CommitDate: 2023-07-07 07:19:41 +0000 > > > > fwget: Fix quoting > > > > This kind of quoting doesn't work, no idea why shellcheck wanted this. > > If there is a "safer" way to "fix" this feel free to do it just test > > that it's working after. > > > > Reported by: Kenneth Raplee > > Sponsored by: Beckhoff Automation GmbH & Co. KG > > Fixes: 7ad4d94d5bf2 ("Fix some shell issues by adding quotes and replace backticks with $()") > > --- > > usr.sbin/fwget/fwget.sh | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh > > index 61acaee86687..90bc23b07077 100644 > > --- a/usr.sbin/fwget/fwget.sh > > +++ b/usr.sbin/fwget/fwget.sh > > @@ -27,7 +27,7 @@ > > # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > > # POSSIBILITY OF SUCH DAMAGE. > > > > -: "${LIBEXEC_PATH:='/usr/libexec/fwget'}" > > +: ${LIBEXEC_PATH:="/usr/libexec/fwget"} > > What was the reported bug here? Quoting here looks alright. See bcr@ commit, I think it was "- Quote default assignments (SC2223)" Cheers, > > > > > usage() > > { > > > > > > Best, > > Mateusz > -- Emmanuel Vadot From nobody Sat Jul 8 09:56:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QylzT5Bfxz4lgWg; Sat, 8 Jul 2023 09:56: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 4QylzT4RGfz4KtY; Sat, 8 Jul 2023 09:56:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688810213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NPD4TwAZ8lgDLSNYPQy13vU2m08HOBVL5VD2RHZ8c40=; b=hScTZbfVwE83PyQwGaW0sleHYae5mtnkKThMSFGP01Z6zmGW+sm5DgBzYn4/etIPFq6lkD VBziV6vxWNS3mnu5pBDxCogbOBfREl2/i2XwF4a2tgCh/K+jqkN/8I47inJvFbsbZK0179 0/3b/wwim29xfzkXll1kKyTe41RBYjrgRqgnqjTNpOxWVWT5W8DFaBsLq5uaYFHdECnemK UKM8oCMLRGDkA2G2pAk5HX+skEFi6N5/G/LK2QvoIDxMJPFWuhZ/n4yYrEOwj/BCZJNcJn Oq00eecwf1iUtOvP+sT4kYR2buX2T31VppYDyE4o8q4dNV0CYnxN8aP1j5Hm/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688810213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NPD4TwAZ8lgDLSNYPQy13vU2m08HOBVL5VD2RHZ8c40=; b=rOk01nx7wAtjNn17q5hF9H6o95nl4p75iuQi2dSfKDvQMjkb+kv5XFec93XzlQvWir3JeP RHA5e1GPA+PW6jFU027PEqHkK9IyMQXUbnqkiFfj4qifQguTtR1oejAdIC5yxw0ayG6OgP AE+xvmXJETw3Cor3PJpo31tttVJIpz1sv0yEg8hGAPU5W+cB2D7dXzN52l6JYxIvfa4GWe ZrYw5gNcTr6PTI+aQWRG5TTNZI8F5vXlt/Q2i7U2PENi4OT6vBtykZ7zFVoNUM8DqLa++j iIreHxn+jtE3y8oTiCVXZ4rDRcSy4xihUXRtKSfYgjX40LX0lWQrdI1Puph0wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688810213; a=rsa-sha256; cv=none; b=Uu2QU0UIBgk4/+fBPUcVYIo9YYC6p4oNEKedHQ7bORy7RkSsUsGhE0llpWh8Z671red86h YLs9mmz6o10l4lBDjJ99eukRmYmBWMq6IZifktoWCuKmS7PW8ldk9PWVhNJGHZ8ilrz5qu PdeKkwhbzTukBtauXZm8MaG2fxc8YBj+jNrxPG+JHXrmhIcS3PWiIiY721Pkc6zh60Sq2y Pcp6O/yQW3qi7jouEEDBC4tFkvN6STyG5kUIDR1A4JsXkJRCBONLtAZt4wFke4IH1rHj98 p+uttutFtlExhCEoVkAeyL0/osL0JsnFPnfeD1KsxjUd7YkeqrGigXl3TFikpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QylzT3V44zHLg; Sat, 8 Jul 2023 09:56: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 3689urFC003337; Sat, 8 Jul 2023 09:56:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3689urEH003336; Sat, 8 Jul 2023 09:56:53 GMT (envelope-from git) Date: Sat, 8 Jul 2023 09:56:53 GMT Message-Id: <202307080956.3689urEH003336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jens Schweikhardt Subject: git: 2c2a04984c95 - main - Correct a grammo. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: schweikh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c2a04984c95d78d9bb9498963fb71dc43cd5764 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by schweikh: URL: https://cgit.FreeBSD.org/src/commit/?id=2c2a04984c95d78d9bb9498963fb71dc43cd5764 commit 2c2a04984c95d78d9bb9498963fb71dc43cd5764 Author: Jens Schweikhardt AuthorDate: 2023-07-08 09:55:54 +0000 Commit: Jens Schweikhardt CommitDate: 2023-07-08 09:55:54 +0000 Correct a grammo. --- share/man/man3/pthread_affinity_np.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man3/pthread_affinity_np.3 b/share/man/man3/pthread_affinity_np.3 index b36e5772c1e3..83fed59c235e 100644 --- a/share/man/man3/pthread_affinity_np.3 +++ b/share/man/man3/pthread_affinity_np.3 @@ -61,7 +61,7 @@ The kernel uses the meaningful part of the mask, where the upper bound is the maximum CPU id present in the system. If bits for non-existing CPUs are set, calls to .Fn pthread_setaffinity_np -fails with +fail with .Er EINVAL . .Pp The supplied mask should have a size of From nobody Sat Jul 8 12:26:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyqHf2HG3z4lLlS; Sat, 8 Jul 2023 12:26: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 4QyqHf1qQCz3DRx; Sat, 8 Jul 2023 12:26:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688819166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qcc3NA+JIVqCWULpu8lRpOjX8e6ipIMrqp5GEnw9TMg=; b=aN2PZhAjc7WH85XznCcUUaL5YEjUeN+KjKQecSITVbCb/RjtdQKH/BgAIFIc2nWE9T4IXN T3yk5xfq6ks59Lg6RX6N1KmbNYdyz+I3hcqQgqFUgBoQ27MnbweAOiEjbelWaP1ikHg/3A iRgOPinbnaGkD1tStjCvu/nFqEfIELGHq5hS9dpTg4qocALBvyrMKVRcVirWbz30cCXpha x6JNZ9NR/wr3l3Vhm5xPybpn9OXLtcgMOyHcM/kx/hmMtQe6Cn1hV9IQl75oz7/MkilUYw 3G8gQFToE7bzyPUnrRFni9Djt3KfpG7lDCTkV43ID6igZpl+GX1+nsrPILt3lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688819166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qcc3NA+JIVqCWULpu8lRpOjX8e6ipIMrqp5GEnw9TMg=; b=G7DVydEAeMls/zvkcrGHmD60qKwhKv80GuT6JSAPYxZMhBP0SjzvyGxsNLCUyD2NfQH9Jy oszs8dGY2Ben/dENzdjLACQ5pbm4fm1Ul1jreK8n19PmaiMJ0cJnqd7U0JgNptuHLGSBZh 9YMHpFWEd3vtZV4Uz27TvynzLrnnwDUDa+esQR+K2Vkp7lJolX6ptHk1U4Ziz5yhxVVMg1 MNLEzbKDEiWQ2F+c9G9cP/zTKDy4Z2UQAOF8wuxnrTv9rvLsX1/Usz149+OXcVFP/85hFW fhS5SkqFfNJQI1ujaoI1cJEbHw2we/af6rLgF6gAa+wUH5TtuZtlInqEMylfaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688819166; a=rsa-sha256; cv=none; b=aD/SZbeFqs0VBa6W+Z2JxOY8KdE8Zvu6n6EFzAk/VYUi1Rgdb9DCYdyef9Rlgn8peXFf4f 2D30/9AxgTNKljwK3vnEjZPpKvzSibBuESWgQUCF9yMJQj5IJ6tj6ztaptJrcE4XOZoewp qzq/MyWQb2s2ul1weWaHhxPfI7lbeu2Bii6RO9rOrKhpTHmc1XCkED5ePKG7OgLBqbfF7w +ULQdpduWAy9ekp04GhE+3LJWJ9Zq+XW8ssglrojBDkyg4mee3m8aj3I9N4ACwOkEmx49x vNJN0EBZbsZcRth3i50GY/RkaGo7ePg9PCDO8jzN2+4wCjGnf2yEhApHDPSalA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyqHf0tBKzLyv; Sat, 8 Jul 2023 12:26: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 368CQ6t5051725; Sat, 8 Jul 2023 12:26:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368CQ6Ua051724; Sat, 8 Jul 2023 12:26:06 GMT (envelope-from git) Date: Sat, 8 Jul 2023 12:26:06 GMT Message-Id: <202307081226.368CQ6Ua051724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jens Schweikhardt Subject: git: 7a949a0f1cda - main - Correct grammo. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: schweikh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a949a0f1cda4b300eb998c86ed5c95a84abf418 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by schweikh: URL: https://cgit.FreeBSD.org/src/commit/?id=7a949a0f1cda4b300eb998c86ed5c95a84abf418 commit 7a949a0f1cda4b300eb998c86ed5c95a84abf418 Author: Jens Schweikhardt AuthorDate: 2023-07-08 12:25:44 +0000 Commit: Jens Schweikhardt CommitDate: 2023-07-08 12:25:44 +0000 Correct grammo. --- lib/libc/sys/cpuset_getaffinity.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/sys/cpuset_getaffinity.2 b/lib/libc/sys/cpuset_getaffinity.2 index f7ac3873a9be..354536ed8a9e 100644 --- a/lib/libc/sys/cpuset_getaffinity.2 +++ b/lib/libc/sys/cpuset_getaffinity.2 @@ -82,7 +82,7 @@ The kernel uses the meaningful part of the mask, where the upper bound is the maximum CPU id present in the system. If bits for non-existing CPUs are set, calls to .Fn cpuset_setaffinity -fails with +fail with .Er EINVAL . .Pp The supplied mask should have a size of From nobody Sat Jul 8 12:36:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyqWJ4VXVz4lP9J; Sat, 8 Jul 2023 12:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyqWJ405Vz3Fl1; Sat, 8 Jul 2023 12:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688819772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ah8K4+m37XtqaFiIG7iF9PTz0VF2OevAdqd67EIeSD0=; b=mUjL3zBsc/+g44CV6OUvzTLm/7954vLu9YIhXVbjpmpV+vl1rbdto3qA82cyxo/oNMJ2Id W7y1w/R5ghiGFnERPugT/xA9LBfJGmKYLnRgRwCdKZ/dSHHByogcBGr4uXaK4IvhBtDajk 2lWN+3bw+cv1Hb2ljqKl8+27j3ZG+H0ylninh6JyJIBtr6dj1p1jMFliu7mAuJpFueYN1+ ALQ9hT6sRE/sLmWztTduahi3peWLsTEVPWvr0D9LvBiT4u2SfGyZJp0WMnixA/rFFItqaw CQcKKVO2givkpAcDWiudlTV/00wUkuArpIJcMtLBbXWH3B4V6GQ2xBUDqzqPhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688819772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ah8K4+m37XtqaFiIG7iF9PTz0VF2OevAdqd67EIeSD0=; b=jTJU7K6NjN2p7LpA1nj9CJyd7C2tULO/tqoTfVtMQ8a26hyzPQFIxtA0Xd6tuG68TOByB5 2PcxfU6l6rxdzPio90p4qaS8y1MdP1+iwXaVmYO64iS9DxG3WHEr055hXFz0dnznKWjtGs KdPtGPgje5SyC+M4p/JL5BXZn6CscWVdfDZcDoBdGXnG7mPbMlysMIq4r/XV6kuIWEwNpm GmTDPTxJi/TUUqdBIM6xrwchMSSaIkkd+kxQ6KHghWbJuckPSB8zofQpOeRgdbsz0G83V3 3J0IyQpbigOnYDonAZlqCUKo4eqHf6IyKRFixLx6ziA9yah4UdKPf9yAyBdbnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688819772; a=rsa-sha256; cv=none; b=hv1pQnItPl3iLdfDUxETWaYmu6QsbTDUEt2NPpesMcxjwLYsPoelovS0EimJCBdKi1JDS9 NY9Dcq9AFF+HU8oMQoLRC3BfAgGNsPV3KqLtsT1Jn1AtJWwsnSMIp4ELbIjqBo5Dq1D7Dv EAhlYBm3pQcjg2ZLoHz14SkpQ16q6mKINWJ+sh+IPC8iDXkKViuJawwP1KOIEqf8UxqCp4 Ivs7p2nuB5YvhhGNakDtMZKXnQPN+SnPQhMrT7R8NQ2sc5IzRulpeM5h0hGp8xqQsdYM/n 09LZbd1P2jero0lcpmXsnUPu0mPqaOZMk2TmByl7swlw+I/Lulwi5ntKdW6i/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 4QyqWJ32trzMJZ; Sat, 8 Jul 2023 12:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 368CaCYp067666; Sat, 8 Jul 2023 12:36:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368CaCTe067665; Sat, 8 Jul 2023 12:36:12 GMT (envelope-from git) Date: Sat, 8 Jul 2023 12:36:12 GMT Message-Id: <202307081236.368CaCTe067665@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jens Schweikhardt Subject: git: 5fee12e18967 - main - Correct grammo. This one has spread. Should be the last. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: schweikh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fee12e18967d8896a68bf9c5f6d92e7d5ae6bf9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by schweikh: URL: https://cgit.FreeBSD.org/src/commit/?id=5fee12e18967d8896a68bf9c5f6d92e7d5ae6bf9 commit 5fee12e18967d8896a68bf9c5f6d92e7d5ae6bf9 Author: Jens Schweikhardt AuthorDate: 2023-07-08 12:35:41 +0000 Commit: Jens Schweikhardt CommitDate: 2023-07-08 12:35:41 +0000 Correct grammo. This one has spread. Should be the last. --- share/man/man3/pthread_attr_affinity_np.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man3/pthread_attr_affinity_np.3 b/share/man/man3/pthread_attr_affinity_np.3 index c1b9d0d79cd8..912b64ae0941 100644 --- a/share/man/man3/pthread_attr_affinity_np.3 +++ b/share/man/man3/pthread_attr_affinity_np.3 @@ -63,7 +63,7 @@ uses the meaningful part of the mask, where the upper bound is the maximum CPU id present in the system. If bits for non-existing CPUs are set, calls to .Fn pthread_attr_setaffinity_np -fails with +fail with .Er EINVAL . .Pp The supplied mask should have a size of From nobody Sat Jul 8 19:07:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz0Bp46mDz4m6cs; Sat, 8 Jul 2023 19:07: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 4Qz0Bp3jC1z3CL1; Sat, 8 Jul 2023 19:07:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688843250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U1ImtANpmgk3yD9REYzDzAt15JsqoakyjKfCtgfkrMI=; b=KgCQpyqMQ58yWo697bf0loT++Cl1149Ry3VGteQ93Ryq7tuhZmw818YvNSFldq8pAYIV3l sJr4olSlduE4bhMnQxPNlFZrZz1JHcCFzBfzIO0X/zEtywb2Ap+uGDMe9WYp6cOH3pRvpi BonnOoiRpJsbfDc6pKNOiFmyRxhsM/6kAtfpZgCtRxQoAa918VQbxB78meHKCOY2hzbLY0 HItSadesEQBls8opKQDynhnp74A/FXwjPcTi5ldfK1zRICHkWU48mFZJ8Fzo+hctV3Np4L IYmVTtttkVXEyWoaVm2+SRF08QGc6qJaXYyMG5oQ0B+QQK0OisiVuIcyvFfoDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688843250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U1ImtANpmgk3yD9REYzDzAt15JsqoakyjKfCtgfkrMI=; b=Pm0gZ/3R3M0S7ySWAomm8M1OfyZ7W29FeUQRlaczUyWpP8l2684RggO2e/Qe6O5TKnrNEP mCBZmEErTa0D4C4sn906HH1PKX3NPTunemby16OOXxURsgspr/EBIlp0eaG9taZUAemPH3 8ScxO2yWijKh7iA8xZO0O9IXhFde6DCBGKfguTBOUooGYh+N+Cn1I2qhtxRPsdfH5HGRme StyZ5lLWWdb2iOslaoTzzjudaKElGkaS79az/ou+V1n2K5P0sJvXjTQ5a19A96wi9A+bUd vMB44UT7KjUH4xh/RtZwjsgVXFgE1vCYlkCJIuYdrP68z6FQYlG7vIMVPrM6dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688843250; a=rsa-sha256; cv=none; b=VYqlOWkYyRfl6df6R+kYuX39NbB48Vao3eDUaBlgX4MZkwLNclfysXCD08NHhncQ1LaOT3 jDm/GB8XQZ9Avq7R48+5V70CL1uMu6l7gp8wx0jEVklvuNZsUvVvZymALJU5Zf6CZ0J+k+ SKRSQrHmNVFHuCsxNrvFF0KY/ZDkyXC1EerZIA44f7gTVLnj17nLQNeGR44fDBhYN69fAI sPRpUXaFMJUiNEVXrvwT9Mf1n/HCaKbtI6jHK60iYFLJr0s26DHfUoHgtI/l6zavqF7P8m eV5lu8WZXShr/dehq4WI8aMZ3djRoVqzGm7VILMOLSc+v4JMk/d91b5P8AgDwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qz0Bp2j7tzXwB; Sat, 8 Jul 2023 19:07:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 368J7Up6011264; Sat, 8 Jul 2023 19:07:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368J7UlU011263; Sat, 8 Jul 2023 19:07:30 GMT (envelope-from git) Date: Sat, 8 Jul 2023 19:07:30 GMT Message-Id: <202307081907.368J7UlU011263@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: ed84cb591df7 - main - sys_setpgid(): style, remove extra ()s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed84cb591df70b860f988c455d70731e6df15186 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ed84cb591df70b860f988c455d70731e6df15186 commit ed84cb591df70b860f988c455d70731e6df15186 Author: Konstantin Belousov AuthorDate: 2023-07-07 16:59:41 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-08 19:05:16 +0000 sys_setpgid(): style, remove extra ()s Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/kern_prot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 733a92839f53..1fac6c496945 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -461,7 +461,7 @@ again: } done: sx_xunlock(&proctree_lock); - KASSERT((error == 0) || (newpgrp != NULL), + KASSERT(error == 0 || newpgrp != NULL, ("setpgid failed and newpgrp is NULL")); if (error == ERESTART) goto again; From nobody Sat Jul 8 19:07:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz0Bq55J5z4m6lk; Sat, 8 Jul 2023 19:07: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 4Qz0Bq4J6Bz3CWf; Sat, 8 Jul 2023 19:07:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688843251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TvBA/HgZv4OiDm5m9VeB+lydDSmivsYaXeIotemJQek=; b=k66Hpz12UdR+7Mf7JcPwxfUgVdVhvlepWm6evuBpDirspvtAqYbn8i5gL18TWSVw/J8MfC 0T/uOXLKNklhl9jA3/hTWQ5fA13zmzhhM8Hb8p3IdPeRSO+t/Ayk/rwEfqBoQuNVWoUSsE 4JgCwyRwtVF0KNQipEUboPmNZ5QbcHXUbBDj+tS9kfxr4MNgS83acjktNut4ALYHmoURfY jNfRGFslatL3gwvqNG+bGWW0qr+JwdLgjmoZpsWpBhefXqUQD8xV9BUXCU8Ld/Tnd1apqP Lbelqpd1MPIxXQ0KLKzVnUBsO+S/mtWX+Wlg5DYcc7eGfgI1VhhLf4z14RdW3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688843251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TvBA/HgZv4OiDm5m9VeB+lydDSmivsYaXeIotemJQek=; b=GlMZ5bKy/ULfP2I+0SBZXNXagn/6xvcHj4/5W1hWrl8ZdrAXV6s93JA/3zD913NLisxNb0 uuIwCELgm7vz+ktvZ8f7I8gw2qDg8w/Z2ooX65lHb4mLddoycajJKpu6lTRtQEct+4qaFz Oe/iH+WSk3My3Iw0GHuBsJFBBB8q40jiuIIqcO4jbXwKn7Xr7038EYgmGTRJ9lYAMGaKsG vLmVI60aa2XyK1ALCH7p1l2K+V6oS1qPNYzM7g8TFT6z+Sc00l3JnT31uqs/9iqMIUp6sV ewIhUZ7RCyFhhbmku3psCgrc6rQJMOEnuC/Kohb4Rt5njujBfF61x8CyiSC/hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688843251; a=rsa-sha256; cv=none; b=FUY2aKRQdDt2Yce92JRmBTxvvbnmBE1iKb0Gds8XZlzfVBdX8qgkBNOHAkKlyPk5kk93Gn eLUUjy3J4/qHLiralL0bt8WBWd7eXHbTkEwO/WSPrDzdCgUJIns0A6bJnaAXzG90STxjV6 BRwxvLITMqTU8S6bi268Jxr/nd+Pewb7ekm64sO58L5vi9zulzZzkq7Haa7enSseCI9wP/ trv+5AKPJsi7DyVEfei+QRpXy68dbkG76o94FXL0Am8MbGp49V/QDxY8Hsn3RtKiO9BFZq zQg1xeZvXhyiBwuYYZwc6z5R+YEVFcqMlDge4cKXxpViPsRK83OhBo9LaJpr0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qz0Bq3N4hzXhB; Sat, 8 Jul 2023 19:07: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 368J7VrE011286; Sat, 8 Jul 2023 19:07:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368J7VLL011285; Sat, 8 Jul 2023 19:07:31 GMT (envelope-from git) Date: Sat, 8 Jul 2023 19:07:31 GMT Message-Id: <202307081907.368J7VLL011285@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: 7a70f17ac4bd - main - killpg(): more carefully avoid LoR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a70f17ac4bd64dc1a5020f963ba4380cf37b7e5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7a70f17ac4bd64dc1a5020f963ba4380cf37b7e5 commit 7a70f17ac4bd64dc1a5020f963ba4380cf37b7e5 Author: Konstantin Belousov AuthorDate: 2023-07-07 17:19:33 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-08 19:05:25 +0000 killpg(): more carefully avoid LoR otherwise we could end up with the livelock. When pg_killsx trylock failed, ensure that we do wait for lock availability before retry. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/kern_proc.c | 15 +++++++++++++-- sys/kern/kern_prot.c | 6 ++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 6d804d93eccc..b82dd07b17c1 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -587,8 +587,12 @@ enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess) ("enterpgrp: session leader attempted setpgrp")); old_pgrp = p->p_pgrp; - if (!sx_try_xlock(&old_pgrp->pg_killsx)) + if (!sx_try_xlock(&old_pgrp->pg_killsx)) { + sx_xunlock(&proctree_lock); + sx_xlock(&old_pgrp->pg_killsx); + sx_xunlock(&old_pgrp->pg_killsx); return (ERESTART); + } MPASS(old_pgrp == p->p_pgrp); if (sess != NULL) { @@ -656,11 +660,18 @@ enterthispgrp(struct proc *p, struct pgrp *pgrp) ("%s: p %p belongs to pgrp %p", __func__, p, pgrp)); old_pgrp = p->p_pgrp; - if (!sx_try_xlock(&old_pgrp->pg_killsx)) + if (!sx_try_xlock(&old_pgrp->pg_killsx)) { + sx_xunlock(&proctree_lock); + sx_xlock(&old_pgrp->pg_killsx); + sx_xunlock(&old_pgrp->pg_killsx); return (ERESTART); + } MPASS(old_pgrp == p->p_pgrp); if (!sx_try_xlock(&pgrp->pg_killsx)) { sx_xunlock(&old_pgrp->pg_killsx); + sx_xunlock(&proctree_lock); + sx_xlock(&pgrp->pg_killsx); + sx_xunlock(&pgrp->pg_killsx); return (ERESTART); } diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 1fac6c496945..46d73a471291 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -347,10 +347,8 @@ again: error = EPERM; } else { error = enterpgrp(p, p->p_pid, newpgrp, newsess); - if (error == ERESTART) { - sx_xunlock(&proctree_lock); + if (error == ERESTART) goto again; - } MPASS(error == 0); td->td_retval[0] = p->p_pid; newpgrp = NULL; @@ -460,11 +458,11 @@ again: error = enterthispgrp(targp, pgrp); } done: - sx_xunlock(&proctree_lock); KASSERT(error == 0 || newpgrp != NULL, ("setpgid failed and newpgrp is NULL")); if (error == ERESTART) goto again; + sx_xunlock(&proctree_lock); uma_zfree(pgrp_zone, newpgrp); return (error); } From nobody Sat Jul 8 19:27:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz0dP31RCz4mBt4; Sat, 8 Jul 2023 19:27:05 +0000 (UTC) (envelope-from jhb@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 4Qz0dP28wkz3GZM; Sat, 8 Jul 2023 19:27:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688844425; h=from:from:reply-to:subject: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=MmQcljBPgzrMM/J3sCNLnv6SRsfcjcjbSibOnCssLpI=; b=SFb3w/0GN5x+4PveMN1agYnbrqZWLFAHGBlR/vRKsUVZGwH/+S5ww0WfRawOJjIaxSVtCY hssdDMWIEeyF+u63ow1hmSDCigk7FiIdqcnKpf5uAxxLSyUy7KFQps386wnbps5mokIXSL IXDmDXMnniYrHf90CvuP3jmuD602tWZx8ewMdoNz0SuUcFlGKn9SAwT+SAOW2pPmNcFngd iOqQMS6zmMxN+WTAFYqbjbmv/w6XXtYVQwbxW3Q76f7IerVE56UDaZPkHhPpfgt6NUSBc/ G6GIAdHmWjUSuk7YFaeEZtS6T7BjMP0O8/dtAP7HfGhaJqohozS5I6dpfzmrsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688844425; h=from:from:reply-to:subject: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=MmQcljBPgzrMM/J3sCNLnv6SRsfcjcjbSibOnCssLpI=; b=dR/8P7sxJj/XbqfYBqTbgbSrb4HFqIbbT1n0WhtlkntlbAzfDNby2k+Uh3i3iTFexpHkkp lpwvqOVdtPONFUnmBZHmORNNCuBcKcXEMsfouUShSQxaSD6E2DUfJEIzutQ1AMsO8hxixL WLa4DUu1Hb+FihGlspaplquF+OJjEo21mKR+GRZQayBDWMPQ2aXepdOEPmQTm2qQQTNC+d fAkfYscFmk/FRRxdc9NvzttcLi6uN11+2tpFasfY408rWYTRo/PLUGlfYPac7BcOGnvexC JlkNmckutwrAqEMRTBCZUX6HVMJ1XE5XdcWPztpK+Q+23lvCIPC0dgEJVqD1GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688844425; a=rsa-sha256; cv=none; b=MjywFPrWUYUpSEXP473kc/IlsxDwa2aunbRtWMgwjuFfaV2bG9XEqv9BoSMkXbNs64YApL x94bu/UML1lLz3txIj/vcJh5T3jkNNKLOWw2qPfKnwIE1Cf8U/kuNtkb6+5xP1J8l/oyx0 FvOAYeBMB9D3tH/42zCLZ3/i/RFLAgvLSirUQSmhk3vSXVgmrYBVxNjT3vEXE/EGUgq1Q6 7/shsjg+XH+gdQuUebzh8GO0JSoNZWvNCIvCdkyQ+0VG40HA9NKb0DqxT70lK/0iTH3rk+ HwPZvX8NnrQPI9FnyOX2oXYRa6PKkHHqQZrM2bGeJvfHHj5xqYyyvBpOU73/Mw== Received: from [IPV6:2601:648:8680:16b0:4145:5d2:5e8b:6dd1] (unknown [IPv6:2601:648:8680:16b0:4145:5d2:5e8b:6dd1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qz0dN58VNzLF4; Sat, 8 Jul 2023 19:27:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Sat, 8 Jul 2023 12:27:01 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: git: 5684c8783b64 - main - qlnxe: Add missing #ifdef INET to fix amd64 LINT-NOINET/NOIP builds Content-Language: en-US To: Jessica Clarke , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202307072354.367NsbXj010151@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202307072354.367NsbXj010151@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 7/7/23 4:54 PM, Jessica Clarke wrote: > The branch main has been updated by jrtc27: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5684c8783b64e33f0dab058126b36776adcc8e82 > > commit 5684c8783b64e33f0dab058126b36776adcc8e82 > Author: Jessica Clarke > AuthorDate: 2023-07-07 23:54:07 +0000 > Commit: Jessica Clarke > CommitDate: 2023-07-07 23:54:07 +0000 > > qlnxe: Add missing #ifdef INET to fix amd64 LINT-NOINET/NOIP builds > > The approach here is copied directly from qlxgb. > > Fixes: b0d3d44dfe63 ("qlnxe: add driver to amd64 NOTES") > --- > sys/dev/qlnx/qlnxe/qlnx_os.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c > index 135aea62c05b..e8bb373fbab4 100644 > --- a/sys/dev/qlnx/qlnxe/qlnx_os.c > +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c > @@ -2634,7 +2634,9 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) > { > int ret = 0, mask; > struct ifreq *ifr = (struct ifreq *)data; > +#ifdef INET > struct ifaddr *ifa = (struct ifaddr *)data; > +#endif > qlnx_host_t *ha; > > ha = (qlnx_host_t *)if_getsoftc(ifp); > @@ -2643,6 +2645,7 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) > case SIOCSIFADDR: > QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); > > +#ifdef INET > if (ifa->ifa_addr->sa_family == AF_INET) { > if_setflagbits(ifp, IFF_UP, 0); > if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) { > @@ -2654,9 +2657,10 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) > cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); > > arp_ifinit(ifp, ifa); > - } else { > - ether_ioctl(ifp, cmd, data); > + break; > } > +#endif > + ether_ioctl(ifp, cmd, data); > break; > > case SIOCSIFMTU: Probably the entire SIOCSIFADDR clause should just removed. ether_ioctl already calls if_init before arp_ifinit and most ifnet drivers in the tree just use ether_ioctl for this case. -- John Baldwin From nobody Sat Jul 8 19:46:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz13t0kn8z4mHBp; Sat, 8 Jul 2023 19:46: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 4Qz13t0HPYz3KBg; Sat, 8 Jul 2023 19:46:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688845594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0AQbCoOGtRr4HSHfpmLtY4td2n9gNV8FaiutUJObB0o=; b=fmZZJWUCqL307fiBttCH5YY/GikdA3GBCnh16OTuo4f1aIK2AhWgUVlUvbStkXHAKxseJG wFeNOihsHNEO9ci5kI5z6nBlIVFUsHFFUPa2AL7376pD9I5u+saVirsOWqMGskfY2ZW6en KX2Q0k8CknkSOwZU1ButjhixcXge91lBBgmLBGx+IrSctOC+khpD7nHWX1BKV1YkW5d39f zWvnCDmhMTtXpRPF8WVxCMHwdhurNjZSzh5UFPAj4+UlujiDi8Ifu516OsDU0cqT/mImQQ XCo1BYUKR9n7L91DBcXjncrOy+SP7StQ+7YRR2zBRKwoyj1Bp7001WBE6R0Z1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688845594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0AQbCoOGtRr4HSHfpmLtY4td2n9gNV8FaiutUJObB0o=; b=wZ6XW4mx7ap/9HpCebDsAWVkmFNPFJHru8RpbprETr3f5/S2IEJSLibYXokOlF/RsA8VnS GQVFTVGlpU64b9xlj4q4Oo9opgtmHAcBddDCEBc38A1W+MBBhCUHCCSPLai41mLimm1EkL LmQC8QnRHjshx5yjZnV6rPotbEKi68b6EAeyjTQChDwpsr/gFDHkUGSFqaafesrajE2Izn OX0Y4Va9cd4AbU41d51/KZbxxG83vkSA8DcgmjHLj4C8ajzRKV3VSvEmBFh2Nhh3At4gVQ PG/KUAQxa0H5fy5r5L1Nvb/7plq9OioVKkW5ITmZK2xivVmhf4n9hn2qVoPvtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688845594; a=rsa-sha256; cv=none; b=LqjeHXK3N+wrN6I6oCV8eHHj5eJoCEmRkA0M8/xCEKSucVS1tejU+Bwp3MlOnZD45UEkM8 HKbY0aRP52Q49qLkRfAOi61VHu95zgofTIUHB6Z9fPAQvqvuSWn6wVPp9B1t7/iNTGyldu vXxbewH9GP/Ca1LaqJo37fFcLmJWlnIv9Q0zgI9orN3aqyrK6DFV0NfPQVKqfBATIaNUw4 3hSVHKJP17lSw9oNmHvnN7oR9GU+Z4ULEBCBEqkP90DXAAsD1Uynli5kpOJ0jB3xH8zjfR Eu6tQ9aTT/5Erac11moTj72eZaE6pbZXpaHPx5JMdQfXDnHGUQydsMvbgGbIyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qz13s6TZLzYVV; Sat, 8 Jul 2023 19:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 368JkX8g077356; Sat, 8 Jul 2023 19:46:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368JkXgv077355; Sat, 8 Jul 2023 19:46:33 GMT (envelope-from git) Date: Sat, 8 Jul 2023 19:46:33 GMT Message-Id: <202307081946.368JkXgv077355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 70c00442d2bc - main - vfs: clean up unused NDF_NO* macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70c00442d2bcf76fe123d84d39ea81346dfa2290 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=70c00442d2bcf76fe123d84d39ea81346dfa2290 commit 70c00442d2bcf76fe123d84d39ea81346dfa2290 Author: Mateusz Guzik AuthorDate: 2023-07-08 19:45:46 +0000 Commit: Mateusz Guzik CommitDate: 2023-07-08 19:45:46 +0000 vfs: clean up unused NDF_NO* macros The manpage is touched up to not mention them, but still desperately needs help. --- share/man/man9/namei.9 | 53 ++------------------------------------------------ sys/sys/namei.h | 9 --------- 2 files changed, 2 insertions(+), 60 deletions(-) diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index f98646725fb3..807c68bbae02 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2015 +.Dd July 8, 2023 .Dt NAMEI 9 .Os .Sh NAME @@ -219,23 +219,10 @@ and we have not gone through any symlinks with an absolute path, and the root otherwise. .Pp In this case, it is only used by -.Fn lookup , +.Fn vfs_lookup , and should not be considered valid after a call to .Fn namei . -If -.Dv SAVESTART -is set, this is set to the same as -.Va ni_dvp , -with an extra -.Xr vref 9 . -To block -.Fn NDFREE -from releasing -.Va ni_startdir , -the -.Dv NDF_NO_STARTDIR_RELE -can be set. .It Va ni_dvp Vnode pointer to directory of the object on which lookup is performed. This is available on successful return if @@ -246,13 +233,6 @@ is set. It is locked if .Dv LOCKPARENT is set. -Freeing this in -.Fn NDFREE -can be inhibited by -.Dv NDF_NO_DVP_RELE , NDF_NO_DVP_PUT , -or -.Dv NDF_NO_DVP_UNLOCK -(with the obvious effects). .It Va ni_vp Vnode pointer to the resulting object, .Dv NULL @@ -264,13 +244,6 @@ If .Dv LOCKLEAF is set, it is also locked. .Pp -Freeing this in -.Fn NDFREE -can be inhibited by -.Dv NDF_NO_VP_RELE , NDF_NO_VP_PUT , -or -.Dv NDF_NO_VP_UNLOCK -(with the obvious effects). .It Va ni_cnd.cn_pnbuf The pathname buffer contains the location of the file or directory that will be used by the @@ -279,28 +252,6 @@ operations. It is managed by the .Xr uma 9 zone allocation interface. -If the -.Dv SAVESTART -or -.Dv SAVENAME -flag is set, then the pathname buffer is available -after calling the -.Fn namei -function. -.Pp -To only deallocate resources used by the pathname buffer, -.Va ni_cnd.cn_pnbuf , -then -.Dv NDF_ONLY_PNBUF -flag can be passed to the -.Fn NDFREE -function. -To keep the pathname buffer intact, -the -.Dv NDF_NO_FREE_PNBUF -flag can be passed to the -.Fn NDFREE -function. .El .Sh RETURN VALUES If successful, diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 88ddb0f13458..547b337c7e32 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -268,15 +268,6 @@ do { \ (ndp)->ni_vp_seqc = SEQC_MOD; \ } while (0) -#define NDF_NO_DVP_RELE 0x00000001 -#define NDF_NO_DVP_UNLOCK 0x00000002 -#define NDF_NO_DVP_PUT 0x00000003 -#define NDF_NO_VP_RELE 0x00000004 -#define NDF_NO_VP_UNLOCK 0x00000008 -#define NDF_NO_VP_PUT 0x0000000c -#define NDF_NO_STARTDIR_RELE 0x00000010 -#define NDF_NO_FREE_PNBUF 0x00000020 - #define NDFREE_IOCTLCAPS(ndp) do { \ struct nameidata *_ndp = (ndp); \ filecaps_free(&_ndp->ni_filecaps); \ From nobody Sat Jul 8 19:52:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz1B83fCHz4mHvn; Sat, 8 Jul 2023 19:52: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 4Qz1B83DLDz3LYD; Sat, 8 Jul 2023 19:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688845920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DwaAr4vDgr7n2Hy2ZomCwmQT2xvxUbJ+ExY7LHACzI=; b=LCpW/yz6zCQfBBsVt72u8cl3vmJAxf4Nr1nvI7Jl3csDmVit4JbLnQi54J880+wEufeNRv 3oy1RlirMai0iAB/65GcFO4+iaRyO1dB4egJdITRXlXB9mGUiQv9mJc3GdAIUeazIH6Kna 4vAoNF+MURQDLXvus1kdCKYsg0UzzbJZexph+DZ5vmybKzbIWRvS6UM8vRQ9sJoHtDmjB7 NEHvCSAOKnZ6L75bxz+WDryLG2BZLkn49D2/tNFMSJs9KViGwhgRGAKBTIiaTXwcABRj9x XgogUkvuHqooj45VBz78N5wCgbj5Jhmh/mjltBo7UYslqECFqHakW/W+fiMY0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688845920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DwaAr4vDgr7n2Hy2ZomCwmQT2xvxUbJ+ExY7LHACzI=; b=TXSyZC59ev0k9tDyr6BNTCjzKKDB0wXWadWGBYs8djhVUTgOMRx8kg0FvY/gZ6mwqkXVO+ 6xcCk0AsC5qrt7+2KWYORwdJ/lHmjyKk0XM443MQxm1ELHQcqbqQ1EL9g8/oclapN6GjXH qdylcwxU77WkdDw2Yjxj2f4PSobbAYEhXOWzIkgsKI8lPX1xEf0dbRQT7lI4nJHfUST2J+ 91tgpo8kEM66PI2IhDONzoe2i3b+0KNpvo/3jH/wW+c3QmutmHC5jJLldJSisWyVb52Um+ LCEA5gUwmMqcd1U/dA36NrlBTVQtLntZjjByWzexAayK3K2Hs6AobotoZjT2KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688845920; a=rsa-sha256; cv=none; b=gxEOA1Nh60XZGZF+gjp5jKZT/nftz7KORqZrr3KlrlMCPgRa6ETDCG/u3WmG3JS087QEqx CSZB4lcsVSQgC4qtiiQMqoK94QiRqa6JChBpN09ALNGBEf1b+SSPM902WT41x+gNJHHZuL Za9apcmmieYZdT1JhTvXQNaNjIUVj8VsOkjgTKO/X27hs2SwGVdXiwnpt7PFsdmaBz8ws4 pEpcsMXRVG1kAKa8aXk8/LxIbgZGIFGqEFl2LVd0uvK+ONtpCC1IVfz9R92udgZLjMwv5d 5CtZ26JderHt3W341tS6EG8w+Zl6yYevkXlOhTPXkDBJVyaBPqWB0MPZlMKW+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 4Qz1B82HZqzYdN; Sat, 8 Jul 2023 19:52: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 368Jq0jp092039; Sat, 8 Jul 2023 19:52:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368Jq0UH092038; Sat, 8 Jul 2023 19:52:00 GMT (envelope-from git) Date: Sat, 8 Jul 2023 19:52:00 GMT Message-Id: <202307081952.368Jq0UH092038@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: 8113cc827611 - main - cat: use copy_file_range(2) with fallback to previous behavior List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8113cc827611a88540736c92ced7d3a7020a1723 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=8113cc827611a88540736c92ced7d3a7020a1723 commit 8113cc827611a88540736c92ced7d3a7020a1723 Author: Martin Matuska AuthorDate: 2023-07-08 18:31:38 +0000 Commit: Martin Matuska CommitDate: 2023-07-08 19:51:15 +0000 cat: use copy_file_range(2) with fallback to previous behavior This allows to use special filesystem features like server-side copying on NFS 4.2 or block cloning on OpenZFS 2.2. Reviewed by: imp, rmacklem Differential revision: https://reviews.freebsd.org/D40882 --- bin/cat/cat.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index a58bbe93835e..1158a839cfd8 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -83,6 +83,7 @@ static void usage(void) __dead2; static void scanfiles(char *argv[], int cooked); #ifndef BOOTSTRAP_CAT static void cook_cat(FILE *); +static ssize_t in_kernel_copy(int); #endif static void raw_cat(int); @@ -280,7 +281,16 @@ scanfiles(char *argv[], int cooked __unused) } #endif } else { +#ifndef BOOTSTRAP_CAT + if (in_kernel_copy(fd) == -1) { + if (errno == EINVAL) + raw_cat(fd); + else + err(1, "stdout"); + } +#else raw_cat(fd); +#endif if (fd != STDIN_FILENO) close(fd); } @@ -380,6 +390,21 @@ ilseq: if (ferror(stdout)) err(1, "stdout"); } + +static ssize_t +in_kernel_copy(int rfd) +{ + int wfd; + ssize_t ret; + + wfd = fileno(stdout); + ret = 1; + + while (ret > 0) + ret = copy_file_range(rfd, NULL, wfd, NULL, SSIZE_MAX, 0); + + return (ret); +} #endif /* BOOTSTRAP_CAT */ static void From nobody Sat Jul 8 19:52:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz1B94yWRz4mHvq; Sat, 8 Jul 2023 19:52: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 4Qz1B94BwYz3M2N; Sat, 8 Jul 2023 19:52:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688845921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xHOYBF9sbAnX7KEY27fq3gOEtPCIZjpF2d9NcbAQ4Yk=; b=pfjcQtKIzSCqUo5dJuUOassuAJUghx1kVAmyRnCWrPM4CeP0OO+6QTmnHYPs1pSc31susw 9d9coVOG4OjVxBMzmVlMmXTjd44IOYOWa5xqwfv9gjAKFmEdpjmzucV5QNxru3B5SSNiUK 8ia+C7fTKSRSL4ClwlFcB1qFE5SUskCB+/BlL6D8x24JujcC3kZu+1bo9TotlG37/JXi+D SrpS/QqP3745QPbO0SfGnbBrttyglA9sUjO35Hss4vi0RUJeBcEEcN7xWiIDmYorAls0gE LhuDcnIdnU16Gk3UoeEIrttBzwQUXP5+gKbIQ9ESd/Gt83d9OpHYSGtFO4FVOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688845921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xHOYBF9sbAnX7KEY27fq3gOEtPCIZjpF2d9NcbAQ4Yk=; b=gwLOG2UIl8NzuyqI7Yw+UJXZKIOBj28cwQVJn/H20Yxt9rNf+m7WwmkrWq8rCJRjWHtpdH ry9g8x26wDZheIRe3g4bljUcojeFRE+Y5Y2UGxcqmWmqioHla1CmgqnscROM3XmkmbNlU2 6paZMuzoYPXQVKYRZamkLAduGnAVTD9pRFjU7OMwl/oaDT9sBcDlROLorUE2PBa5duFCEY u3q6hbcIVFGXLu88tw0ThKk4bsUhse+qNg9shfSzXLRU0ocLQLtI1xBuk3SJtVWJjWpsTG OSYdQQLewXT8EObC1BCu1VyJA1itYs1m62Jq5XYDHE5S7Zh9aghsMMTED91OAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688845921; a=rsa-sha256; cv=none; b=hKuMDqLlprM6rLdbZeaQPnvs4I6voxWr+CjSMI2wPbSj0d+aB27Ywg97uMcutuTmZ3PYln U9SqFxeMyzYF5Nz3f8+vpvaOeoOxZBRtbad2cq2RGMmitGIdpeQEZJkjDv8L4zbGXDaXSt WGqimBQt/gH7jO824aN77l35FW74qNZLaUjfLE23Q3RjP1JLdmAUC1oU2ScNSGslhAwx54 zCgiXFvX08APVpm0MwsmzT3+RyTbCTbabthSXdKvDkbOatRkAAS1H8NQBcqyfzGRZe6Prg XupuBZVwjCllHak5vCWXrRRkrESOo2dh14pmf+f0zJhWfp1xcEvdVBO1It7New== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qz1B93CclzZ0x; Sat, 8 Jul 2023 19:52: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 368Jq11O092061; Sat, 8 Jul 2023 19:52:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368Jq1JY092060; Sat, 8 Jul 2023 19:52:01 GMT (envelope-from git) Date: Sat, 8 Jul 2023 19:52:01 GMT Message-Id: <202307081952.368Jq1JY092060@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: 5a50d52f112a - main - xinstall: use copy_file_range(2) with fallback to previous behavior List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a50d52f112a86ebd0696da6564c7c7befa27f5d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=5a50d52f112a86ebd0696da6564c7c7befa27f5d commit 5a50d52f112a86ebd0696da6564c7c7befa27f5d Author: Martin Matuska AuthorDate: 2023-07-08 19:46:46 +0000 Commit: Martin Matuska CommitDate: 2023-07-08 19:51:21 +0000 xinstall: use copy_file_range(2) with fallback to previous behavior This allows to use special filesystem features like server-side copying on NFS 4.2 or block cloning on OpenZFS 2.2. Note: copy_file_range(2) is not used when a digest calculation is requested as this would require to read the input file twice. Reviewed by: asomers, imp, rmacklem Differential revision: https://reviews.freebsd.org/D40898 --- usr.bin/xinstall/xinstall.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index b0e52453ca29..8dace862ef1e 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -1300,6 +1300,7 @@ copy(int from_fd, const char *from_name, int to_fd, const char *to_name, static size_t bufsize; int nr, nw; int serrno; + ssize_t ret; char *p; int done_copy; DIGEST_CTX ctx; @@ -1310,6 +1311,26 @@ copy(int from_fd, const char *from_name, int to_fd, const char *to_name, if (lseek(to_fd, (off_t)0, SEEK_SET) == (off_t)-1) err(EX_OSERR, "lseek: %s", to_name); + /* Try copy_file_range() if no digest is requested */ + if (digesttype == DIGEST_NONE) { + ret = 1; + while (ret > 0) { + ret = copy_file_range(from_fd, NULL, to_fd, NULL, + SSIZE_MAX, 0); + } + if (ret == 0) { + /* DIGEST_NONE always returns NULL */ + return (NULL); + } + if (errno != EINVAL) { + serrno = errno; + (void)unlink(to_name); + errno = serrno; + err(EX_OSERR, "%s", to_name); + } + /* Fall back */ + } + digest_init(&ctx); done_copy = 0; From nobody Sat Jul 8 20:00:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz1Mh49yWz4mKpX; Sat, 8 Jul 2023 20:00: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 4Qz1Mh3bZJz3NB5; Sat, 8 Jul 2023 20:00:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688846416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RDJ5TfMbvBnEyCIMwXkyX5uKYNtv2M7Ze8BivMz2d/Y=; b=jXl/SOn0ZUzaTIsfvOaPfuN622m9t5j1DJmbNVDmqBuB5qKB7qEgNyNS0GrsiPkcsw1tAK KHzbHGHm97jEpDWBL/ZNBNbdP75ny0F8L8AqoVZvYfdxwvgAB0UZPNbV+CMa3B6tMjI/Ls /HvMEY4SojT3SwoC3M9rKW5NKRm4RZk4RmTz5kgU3C1K1piAS7jFsNsswdJ98rhiX3wd8E ORcg9tfyPItj+pVyS03vQbRG+l1WTKmsJM1e2ShjGRwUpiQCjr2lCmUVnb04xvg09dskz0 gcKq3OxH2wBKSdb/ek8g8dpzLRZdPY7KLxTGUpK1g6k81UlOuCU6SEPoMXqxDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688846416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RDJ5TfMbvBnEyCIMwXkyX5uKYNtv2M7Ze8BivMz2d/Y=; b=uUghJEvf0jpAVAGXy5a2hIBKFyH+1JzIF4kBZzJDpc53qbXqOGkXUBl+y8X5Xw9GtQWxH6 yw1mif+vknUnxebqmPuRBPUqEk9NAgA+hy9fPOdsZg85puhxQFfEm9GVuamoqM144nS8Yd JqPo5ELjm0D/QhJN0VOMgnvdDlv9Md3o2cbh79k1SfxGnYEemvab0/pKDbcb7mxzvLqdvC y+2P/pk++tOvhwe/mpgYxQQEZq10LPI8vw0bHMQ0z32hbBQUa8JX7STapnGfnfnqRsSCn2 HwLSw4DgSiQfT/ArYyMPV0r8R7PF3mjwqeT3QZdSiw/QPyeeR0Gqv7jWfsUn1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688846416; a=rsa-sha256; cv=none; b=sksyCG5yz4MglBFoRkuNbcktW03oxDw/bxYP309G7vSFXifxkaeAK0iwbf8PE3fKpsZJ1d R50ZR+cvMQ1Q2gg0adT+IDaVZQJABlMW5bcldxVrQzcVUWlPkWW9sP/84o4YXtEMRaYqi/ fR4MiBHzJrSVsqUN8u4S5FlPpu59DPs/KR9TcJMn8yJlUUGe3CT2iwILNKODKOSJY8mHnO bksOJIiFFWEu+x5f+d05z3fs3g7eKoa1XkQhiyKILjfqMpRgQTlhp2Modgfa3tHkUO1ABx Nse2KoyDcH9DEGPQn1D9X+XxG3uNYfgQgDV8qKKD4r3LPLZq7JXBCseGp3Jz6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qz1Mh2dRnzZ9H; Sat, 8 Jul 2023 20:00: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 368K0GoD002687; Sat, 8 Jul 2023 20:00:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368K0G2c002680; Sat, 8 Jul 2023 20:00:16 GMT (envelope-from git) Date: Sat, 8 Jul 2023 20:00:16 GMT Message-Id: <202307082000.368K0G2c002680@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: 2596008a0bde - main - amd64 pcpu.h: Add missing 'do' from do-while loop around __PCPU_SET. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2596008a0bded7efe578d7de30e42b78d6ab8d0f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2596008a0bded7efe578d7de30e42b78d6ab8d0f commit 2596008a0bded7efe578d7de30e42b78d6ab8d0f Author: John Baldwin AuthorDate: 2023-07-08 19:59:26 +0000 Commit: John Baldwin CommitDate: 2023-07-08 19:59:26 +0000 amd64 pcpu.h: Add missing 'do' from do-while loop around __PCPU_SET. Reported by: mjg Diagnosed by: jrtc27 --- sys/amd64/include/pcpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index dc78a07b83e9..2a51413b0d5e 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -163,7 +163,7 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); /* * Sets the value of the per-cpu variable name to value val. */ -#define __PCPU_SET(name, val) { \ +#define __PCPU_SET(name, val) do { \ static struct pcpu __seg_gs *__pc = 0; \ __pcpu_type(name) __val; \ \ From nobody Sat Jul 8 22:17:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz4Qs0GrSz4lhbW; Sat, 8 Jul 2023 22:18:13 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) (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 4Qz4Qr2hv6z3x9l; Sat, 8 Jul 2023 22:18:12 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-45739737afcso881986e0c.2; Sat, 08 Jul 2023 15:18:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688854690; x=1691446690; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qv+Ci44NoSInjJJpJf7fEESb2uY39sX1hwLABhARgko=; b=UqGDRKOVuS2UCHaoaNoyiB+5O99P27TKKXHwWwaEtwmV5HAi1LlC2O8ytjDQx3dqJW AWnIMsNvQ396eo+IIXsbmsmeuLq4kSt4pWkS/QGkGNZ3HqwiI4JT0gQY26vxvwR2ckpO WIkWzIoM9cFE40ADoSG9A56hR6fAUyuH5tCzNHNUq7jH1FjobhJyYN72c6f8vPguorN3 ThV0DH2vsORGWHJ0aGmj8pJ2yWIgDhY6EmL7tvIM2TNkmjLg/R+o4OdW+cxzzXhODJVq mrwod1nTzdrThjM4L6p0EnzpGWRVBmmbivJNekI6vQ5cBfUF8cuYhOybpDjWCYq5pCfB GgTA== X-Gm-Message-State: ABy/qLYXkw5yXztdZTS8id2GGXeBF50xt3qgslOIobydmr05s9dj82EW gOQ9ycnlp3E95u5BjJeib9CyIx5HiNyXvbTt34HzjdHlXmU= X-Google-Smtp-Source: APBJJlFSX0v614Xsbefp2srxJoPWXYWkO/egssFJ89nIw3/KFMa0i6vWvn9QrNsASFiqekBaThKOGiGkHSL5Cfwiiv8= X-Received: by 2002:a1f:4554:0:b0:464:7445:cbcb with SMTP id s81-20020a1f4554000000b004647445cbcbmr3315132vka.2.1688854689885; Sat, 08 Jul 2023 15:18:09 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202307081952.368Jq0UH092038@gitrepo.freebsd.org> In-Reply-To: <202307081952.368Jq0UH092038@gitrepo.freebsd.org> From: Antoine Brodin Date: Sat, 8 Jul 2023 22:17:58 +0000 Message-ID: Subject: Re: git: 8113cc827611 - main - cat: use copy_file_range(2) with fallback to previous behavior To: Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Qz4Qr2hv6z3x9l X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, Jul 8, 2023 at 7:52=E2=80=AFPM Martin Matuska wrot= e: > > The branch main has been updated by mm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8113cc827611a88540736c92ce= d7d3a7020a1723 > > commit 8113cc827611a88540736c92ced7d3a7020a1723 > Author: Martin Matuska > AuthorDate: 2023-07-08 18:31:38 +0000 > Commit: Martin Matuska > CommitDate: 2023-07-08 19:51:15 +0000 > > cat: use copy_file_range(2) with fallback to previous behavior > > This allows to use special filesystem features like server-side > copying on NFS 4.2 or block cloning on OpenZFS 2.2. > > Reviewed by: imp, rmacklem > Differential revision: https://reviews.freebsd.org/D40882 Hello, Did you fix those errors that happened during the exp-run? cat: stdout: Bad file descriptor Antoine From nobody Sat Jul 8 23:09:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz5Yd5wZgz4lwxq; Sat, 8 Jul 2023 23:09: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 4Qz5Yd5Pgxz45ZG; Sat, 8 Jul 2023 23:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688857749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xbEZQctwiT2SZ7UvCpAfiTtKA+i/2BU9lYfy60WMa6c=; b=wKPwIldQu0v/9IK5uoTGvf7y+X1Cld3g4uDcsymlFgcq1q8/GwNVyFUN2jdm0Thdpk1bPg iu1Kwg+KbyaWwMrbmBL5XGH9BWdSG1zKP599yfAxllEdTCdo47+HaJbQ9TMpVKsyJMAgXX Q+R+fHk+IadO1m+Mm3IqlJE68ExyBULB2Up30q1DfM8dKrxosI2mgUXbikMIRzN18AmZaM 2I9AgSXrTmUfaOnhyXIfWSTfQDqzAH97lrgNb5fWCjcs55WuIKkxRRA3Lh+18VX1XNaxHf +UKl25nYNJiFs56xA3eMKw1r/moXVy+NqNn9Svbwid+SIeRiD+BdMbV7XxuKDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688857749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xbEZQctwiT2SZ7UvCpAfiTtKA+i/2BU9lYfy60WMa6c=; b=fbSx4prB1s993BR0f/2JMQwgE8b7F6BxBeONgC9YK4JvTCV/1+KOgX6BfQaZWWFdqmNqB9 EP5XK2ovvpRxBXDithQFdcqewqlYSD7JHjhP2tTUqMuXHAe0s0vlX/XCJWzuSgOMKGCbHR jNhKqfY0PZnYeP5zwpfTobcH1007br+UCsXKSH7a06rj//oRS4JueYS/k78i/+V1WGbiZS Hv7trSjrgCQ1tQQHrFnoqxwYy2PaMdjudd6w/MU5E/E1O5wucdIysE2dFrvVcNmebAb01W xPvYc8eI9mLRrPs7BRH5v0IKiknZCldL7S4THINqSw5mKqrTUJZBe2vJ6oeCyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688857749; a=rsa-sha256; cv=none; b=OzxrGI8VMRv+ko8LVl1FZeX6sJqIlNlPqgNcnB97XkRSHufT5XIApE/Ncm+hfIcvZ4weNu vHNsdtO5FC8nNi+Kh7CY9T4a9GtJnaDnC47Cv0yv2aRzMtNnvjFWCqEq2RQ8eVp09tdN+I gbqDaoSYwR71Oip8eZuvdNqY/AsDQdD+noHSAyboIUdlwg0T1gwBXYPFYZhwygu9gvHBYo N605OT8qreNcn+NSzyWjbhnDEdWc0KF29yqZKk/eUyfTL6gs5W46/AzOJQZ2BIcQK9g4Hg RAcgGpJk7/159EVsZHSphSyv926BOCqhIKD82Vc0kVzFy//de3iPZlIFyiI8CQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qz5Yd4MLDzfmF; Sat, 8 Jul 2023 23:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 368N99WA009561; Sat, 8 Jul 2023 23:09:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368N99n7009560; Sat, 8 Jul 2023 23:09:09 GMT (envelope-from git) Date: Sat, 8 Jul 2023 23:09:09 GMT Message-Id: <202307082309.368N99n7009560@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: 055f920ebe21 - main - cat: fallback on EBADF with copy_file_range(2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=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: 055f920ebe21b8e05235363bc11a83cc649cdc6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=055f920ebe21b8e05235363bc11a83cc649cdc6a commit 055f920ebe21b8e05235363bc11a83cc649cdc6a Author: Martin Matuska AuthorDate: 2023-07-08 23:04:25 +0000 Commit: Martin Matuska CommitDate: 2023-07-08 23:08:46 +0000 cat: fallback on EBADF with copy_file_range(2) When stdout is opened with O_APPEND, copy_file_range(2) fails with EBADF. --- bin/cat/cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 1158a839cfd8..44a406dd037b 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -283,7 +283,7 @@ scanfiles(char *argv[], int cooked __unused) } else { #ifndef BOOTSTRAP_CAT if (in_kernel_copy(fd) == -1) { - if (errno == EINVAL) + if (errno == EINVAL || errno == EBADF) raw_cat(fd); else err(1, "stdout"); From nobody Sat Jul 8 23:48:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz6QW3FYnz4m6sg; Sat, 8 Jul 2023 23:48: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 4Qz6QW2q4tz4DMG; Sat, 8 Jul 2023 23:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688860083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eDQ7GE2sUnBiKEpoHa8iGK9Y5ZVwjbV1ud+zoZeWR1M=; b=xzofhaHIOirM6z5TpfSQY0Ks661juZUuU96xC3Jxyueb6jXZLPwcHTErue21yJjydGlCS6 h5Sq5xiB++uBAAUinmK+rlLgarD54lC22dH+D/ieYNrrgSWUUTnXn66/9B9GjFeh3aUWuB uKC/DXPUVRY6GCaCquQVnNv56E9gh9bLVtzAfiY3P2d0WbbJt+aYvHGxm+b0EgPceKkQ/p UVDBPZYWrt5rTyjDl48paAcbLulV+jQLRZm0ogYD43b057NK/XUa1Uw1MaY8qj1Oq0cxq2 K47ARL2EjMUT+PesHa9awhIQav1HJgmlGFSPqxssT0CITqCZYjAsyyxojbPP0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688860083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eDQ7GE2sUnBiKEpoHa8iGK9Y5ZVwjbV1ud+zoZeWR1M=; b=mYgoAXJgpg+FnD/2tNhClE3P7zwh6zT5SsXgg+8ZmY/pczn6GqV1EusukdbtEMF+WIFK31 lqhhjuG863pl5j8abkww7CEGwClAwqVRX6Mhy7crk9AgAa9jqNH9dES24lJza3m+sGVghz a1GyiaIPRt1ODpP5AcJ73yjIEdecdBHlge6xJWOVot1KCcQzQ5JO9HWSJtClLfe8deD73n CECcJO8/dOfJlJqGHvEQY47Zt+6RA3wdqGkDn1Pd4S8QgLyPSdgPnOakj/Kk04LYacH+CT kE1o/vt4Ecg/pyW45CCDiDZW8bn5zM/NKdiqNlStVOmt+R2149Vg3HBVZt6Pzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688860083; a=rsa-sha256; cv=none; b=FOBz4CsqUwsJHTneBM4tpP2EQxH5i8SwMA6MYJ5DUdVKV3N2++YDD/UdUyUpbRh6TCLwEw xvDP3cIPvzqWSDRTkR0UwXvpEXJs538LJljXL8etDcNuiOuBllQsFqhE8kDjIM6u4u7C5Z UbAd4qWmhVdvBqJcODSgwUbSBZvsSadzBJxIKq7gort8NQRmG9ZXSaHqsC1LweXbHg3tRT uj0ozXqHmg0r263u48mBpnU7x+rcBv9koJWxetnzr1oWpQdc6Ygk0pz6l4frahfqkxmssb btVOQHJ2OgMZK2as+U/3TvzbmFMdWi0wpASkNPjp/nz3b2iLVXiWDThgtlKvjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qz6QW1mgRzgTp; Sat, 8 Jul 2023 23:48: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 368Nm35s074667; Sat, 8 Jul 2023 23:48:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368Nm3TN074666; Sat, 8 Jul 2023 23:48:03 GMT (envelope-from git) Date: Sat, 8 Jul 2023 23:48:03 GMT Message-Id: <202307082348.368Nm3TN074666@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: e64780fbc394 - main - xinstall: do not use copy_file_range(2) when BOOTSTRAPPING List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e64780fbc394b10581e50a850cc06c1c12a8e4f9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=e64780fbc394b10581e50a850cc06c1c12a8e4f9 commit e64780fbc394b10581e50a850cc06c1c12a8e4f9 Author: Martin Matuska AuthorDate: 2023-07-08 23:24:38 +0000 Commit: Martin Matuska CommitDate: 2023-07-08 23:25:23 +0000 xinstall: do not use copy_file_range(2) when BOOTSTRAPPING Reported by: arichardson --- usr.bin/xinstall/Makefile | 5 +++++ usr.bin/xinstall/xinstall.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile index 9969ef104e98..3b49cb39d27a 100644 --- a/usr.bin/xinstall/Makefile +++ b/usr.bin/xinstall/Makefile @@ -17,6 +17,11 @@ CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= md CFLAGS+= -DWITH_MD5 -DWITH_RIPEMD160 +.ifdef BOOTSTRAPPING +# For the bootstrap we disable copy_file_range() +CFLAGS+= -DBOOTSTRAP_XINSTALL +.endif + HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 8dace862ef1e..6c269bbb5d91 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -1300,7 +1300,9 @@ copy(int from_fd, const char *from_name, int to_fd, const char *to_name, static size_t bufsize; int nr, nw; int serrno; +#ifndef BOOTSTRAP_XINSTALL ssize_t ret; +#endif char *p; int done_copy; DIGEST_CTX ctx; @@ -1311,6 +1313,7 @@ copy(int from_fd, const char *from_name, int to_fd, const char *to_name, if (lseek(to_fd, (off_t)0, SEEK_SET) == (off_t)-1) err(EX_OSERR, "lseek: %s", to_name); +#ifndef BOOTSTRAP_XINSTALL /* Try copy_file_range() if no digest is requested */ if (digesttype == DIGEST_NONE) { ret = 1; @@ -1331,6 +1334,7 @@ copy(int from_fd, const char *from_name, int to_fd, const char *to_name, /* Fall back */ } +#endif digest_init(&ctx); done_copy = 0;