From nobody Mon Feb 5 03:13:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TSrzr0DwVz58x5w; Mon, 5 Feb 2024 03:13: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 4TSrzq6Xd6z3y1s; Mon, 5 Feb 2024 03:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707102791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q0egce7VYg72/EBNmIbGyGx6cMPZzZkCFaM6PocdAiY=; b=Q275VBFH8zC+qqroeLxnI+lMuA1IR7qfqj+r4PsEIReH7j4Zuu2EvP/VMy8flsmnBfyxe6 OTSWgd5Ro3R+x32oE3Ta3prQn0CfDUpFrD1TDwMtIXJ6Lax04qSjaLnc3tpC2GOlxnuqLL 2z3V939rbWA/tDiIXdqszZrYGk4LvTGae+51/ojmSHRLCmrs3s83NaoZAY4rzVIpR0GW9p IkFAXR3kmPhku98sbK2hJZZAmUtRFhLADoiWAD/d/SsTh2lZjk/LPVcEsllBACayS92lax TRVpZw2cem3aJOOkouIJxKLnJ1Vw68vOGMYouvbfMRR2AcRvZwgCjK8Rz7n7sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707102791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q0egce7VYg72/EBNmIbGyGx6cMPZzZkCFaM6PocdAiY=; b=Y9ksZX75+eQYRYQPIwmE9Ei1HpdubTTDY3uolPf2x72b2tqY6j17fPqJ6YcIz8XJR3jOTG 6Ige7a4Pyg+5Z9d0Bwasv+ofGueIn+mZ3uqQn2rN/Ds1Soa7c/mQFDz9XAuQJHGZyZu51U ipjq5o9eEE300EyF6c2ruwm0hXnCubXX3F1+vuGtV/lneLKAbfL0lRre0RQeFM45S8kgge 4n4mZHyp4JwE5IGYny+MzZYzxACK21o7mNSvLeXJq1+V2K9QU2m6Ig9U4Lny9WQR47o9qF hhz+fw1UuXRpuyZkJpldGM4Z2dIiQkPnaq8l/kHXokuHLh0XD94QE9zg55Ucag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707102791; a=rsa-sha256; cv=none; b=YSHgfgHH9k945MbOQV2oeJyLX2NRyF3UydseG+hbmzp5NEinHpk4p7wjoby7oDcKSrarhg brZwTAScdArSJhCmFfberkCG/3kjksq8AH9gnnGrxqU2fr1wxZ2zmWt945lo1I2KDA1Yxs VsrgcslIJdDC2taKrgOZk912RdwVGxqk1H73AofceoRfFcyAe3pPac2NdSq6NzKx9R7zXp 4Eelxl8uqbLOIhGZ7gnC86pmxhLi9bYx8xRDhTe+8X5r0KxKI/5b2tnjFR/FYcwT5rbd6/ fHreb99sOrwfGzhsE9KR5GEGm4r2jFiniZNYxNiQOebhnVhYBPCwClcYAocUxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TSrzq5bVnzPBb; Mon, 5 Feb 2024 03:13: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 4153DBAA023195; Mon, 5 Feb 2024 03:13:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4153DBtJ023192; Mon, 5 Feb 2024 03:13:11 GMT (envelope-from git) Date: Mon, 5 Feb 2024 03:13:11 GMT Message-Id: <202402050313.4153DBtJ023192@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: 4b62b42a8dbd - main - subr_firmware: Sort includes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b62b42a8dbd3be7c5e9e107fbba2c9adfa49673 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4b62b42a8dbd3be7c5e9e107fbba2c9adfa49673 commit 4b62b42a8dbd3be7c5e9e107fbba2c9adfa49673 Author: Warner Losh AuthorDate: 2024-02-05 03:12:37 +0000 Commit: Warner Losh CommitDate: 2024-02-05 03:12:37 +0000 subr_firmware: Sort includes Sponsored by: Netflix --- sys/kern/subr_firmware.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 99d5ddd56672..9c9c831d83a8 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -27,20 +27,20 @@ */ #include +#include +#include +#include #include -#include -#include -#include -#include +#include #include +#include +#include #include -#include -#include -#include #include #include -#include -#include +#include +#include +#include #include #include From nobody Mon Feb 5 05:45:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TSwMf1w7Bz59Cl3; Mon, 5 Feb 2024 05:45: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 4TSwMf1P6vz4CfN; Mon, 5 Feb 2024 05:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707111934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mjw71poVTtMjCtAlzkHcDSRvw7oEy2WN4bWSsNK83vI=; b=gxJqtVodD2WFh/erGISkQ0yIIDt3M1CKIP3dRJ268p8PKt9cKKXUiP5E7R0gf/EDynfdmo 3dd7B9ZNZkX/m0NNRKx2TOTZfOCp4R2UINFyvVWz9Vqpq9hykKATAg4FWNt5xiPloJz+wY gy9deXcpaZynG6M/AAB0Q6KRgLKgJnRlf35vmAK4B6MVBIKlLTjn/01FyqaxVYqv6Vtqa7 NcwI6BxtgWFtcVL4Jpl70jPmO6tKaMgrPmXXDiqoZ1FF7qDDcHAAvU8oPHgfNdCHKBDdE7 Xm5FcUSg+jCn2GBCcp5J80jYbldoPfk2hdheb+/OyisiB+YsvHAgiB7oBNBYEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707111934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mjw71poVTtMjCtAlzkHcDSRvw7oEy2WN4bWSsNK83vI=; b=LYeH5tF4Tr7U5ScZcjSjtDWdlySukFmCcFZmOXmi6Gkko30XLAqGCloicEf4NlOTuz9MQn HpQoubKqIgJ6Y9xj4OOg4+Wnwi8Pbl8JV3Gnek0Wl01dgNWvVqOyxrDLwQPQlCHI1/hSza mw+EZ50W+vqbbVoQD+G0dD6C+MBdGdLUASYUiskqLCQp+szLwiSUGYiEoNu/i2sBsJU6MY G289rzE5pEN9L6UmHXbdx/brqK/ODuru3ghyEZtq4ZhtvmZTh7x4bAkUErYs/5du9Xc9RF nElt8MfSnR6Bjp/d0jwcA05TKqdfo9kEnKHmA5RD/+ekwFSWfDeFQrEJWHXhLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707111934; a=rsa-sha256; cv=none; b=QZ1rX/7W/vhGPP39uXrmUo4djfsNDpXnpZku5N/vEi8IRK1mdAbRopw90/I0+k6VVp/yBF Lau0o75E/+6a8AOT9zEbhWsntWH1QDJZtHzRbB2P53flVXw5LpC1bTjq52/8tDZybVxUHp RHi8uHXhQlN+Bgzx6+I91Fj53TC9ygdbX4gAxaabo8WzXORwwovaLmXxrW6wMAlBPrdbX4 hnEW2HSGhFHh/QBpWrcZUUc8y/G81rIouiis2yjrC8imC80lDq2+WVijOZ2T1FLLbrc4mW g8Ur/BkpMDC7wcuj0ipsuMTlmv5eIUbNoBYnxKYeBzDtw5Xl/eNrHs9lGIhCHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TSwMf0KrFzSrF; Mon, 5 Feb 2024 05:45: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 4155jXZC073982; Mon, 5 Feb 2024 05:45:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4155jXIQ073979; Mon, 5 Feb 2024 05:45:33 GMT (envelope-from git) Date: Mon, 5 Feb 2024 05:45:33 GMT Message-Id: <202402050545.4155jXIQ073979@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: d9e0e4262761 - main - vtnet: Account for the padding when selecting allocation size List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9e0e42627613b56abf0f8fa1ad601e5690d775c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d9e0e42627613b56abf0f8fa1ad601e5690d775c commit d9e0e42627613b56abf0f8fa1ad601e5690d775c Author: Warner Losh AuthorDate: 2024-02-05 05:43:39 +0000 Commit: Warner Losh CommitDate: 2024-02-05 05:43:39 +0000 vtnet: Account for the padding when selecting allocation size While we account for the padding in the length of the mbuf we use, we do not account for it when we 'guess' the size of the mbuf to allocate based in the MTU of the device. This leads to a situation where we might fail if the mtu is close to a bucket size (say 2018) such that the added padding would push us over the edge for a full-sized packet. mtu of 2018 is super rare (2016 and 2020 would both work), but fix it none-the-less. It's a shame we can't just set VTNET_RX_HEADER_PAD to 2 in this case. The 4 seems hard-coded somewhere I've not found documented (I think it's in the protocol given the comments about VIRTIO_F_ANY_LAYOUT). Sponsored by: Netflix Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D43656 --- sys/dev/virtio/network/if_vtnet.c | 9 +++++++++ sys/dev/virtio/network/if_vtnetvar.h | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 11c640bccdeb..3d85fee122c7 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1223,6 +1223,15 @@ vtnet_rx_cluster_size(struct vtnet_softc *sc, int mtu) } else framesz = sizeof(struct vtnet_rx_header); framesz += sizeof(struct ether_vlan_header) + mtu; +#ifndef __NO_STRICT_ALIGNMENT + /* + * Account for the offsetting we'll do elsewhere so we allocate the + * right size for the mtu. + */ + if (sc->vtnet_hdr_size % 4 == 0) { + framesz += ETHER_ALIGN; + } +#endif if (framesz <= MCLBYTES) return (MCLBYTES); diff --git a/sys/dev/virtio/network/if_vtnetvar.h b/sys/dev/virtio/network/if_vtnetvar.h index 6c2e6e90107a..d690ad3bf63c 100644 --- a/sys/dev/virtio/network/if_vtnetvar.h +++ b/sys/dev/virtio/network/if_vtnetvar.h @@ -232,7 +232,13 @@ vtnet_software_lro(struct vtnet_softc *sc) */ #define VTNET_VLAN_FILTER_NWORDS (4096 / 32) -/* We depend on these being the same size (and same layout). */ +/* + * We depend on all of the hdr structures being even, and matching the standard + * length. As well, we depend on two being identally sized (with the same + * layout). + */ +CTASSERT(sizeof(struct virtio_net_hdr_v1) == 12); +CTASSERT(sizeof(struct virtio_net_hdr) == 10); CTASSERT(sizeof(struct virtio_net_hdr_mrg_rxbuf) == sizeof(struct virtio_net_hdr_v1)); From nobody Mon Feb 5 05:45:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TSwMg4Pv8z59Cvj; Mon, 5 Feb 2024 05:45: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 4TSwMg1ys8z4Ck6; Mon, 5 Feb 2024 05:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707111935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0bVNlYmBHhgRgdEwMWR+ZzVbupOJI41TvtCevF27wPY=; b=nv9B2bsN+16kWjV7rE26PrbU+KrblR8zo7d+D/YkEF6YcjjYcdCXge1iN+OrETnfCEBrOS Hxy/uIHE7NQ69hRCKqBoQkXHOoz2zaMr1RQ1nOYJLW462wYTrqsYC8G32bA54h/CeE80KU IHuCWH7RWcy3snLjwRPB+dOE+uDHNbMMhS/ZNF0af+kZPdTB7r0DRU6wYuUZlKD1LtvQwU TX4WTeOND3Nd0SRyFe6NNAy1RuEw2hTUgsNZdQAwoADHG9UZZUnhMtKvEWpUnTju69t56E PtO0QR02mrvAody3rvpKDrE8k1CFzjOUlFxjSOsbooOH7INSHgp4yKqTeA9GPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707111935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0bVNlYmBHhgRgdEwMWR+ZzVbupOJI41TvtCevF27wPY=; b=uzgYDSJ82KeVkMRuwlPSj9S3nMKXlHlh3X1Aw2vi/NWPfUAz7Ie+3q26FHKQT1FNtStI/x MKo5DbgHVP4NSG31TxpvfCmjAUeRV7QiYq+ABH8bDLuJJgp3n3RIyLCeDokXt96tI3crg5 pCyMG2IyISAO9BncWkHCL97rLEBlYgvgLVb7vOHJvvE/Cc4ATMlJkLp15TC/+u/G6BThAe 7+EBHn74/kgeBIvwhbnLcR+Kobake98IcQbERiqwwIrdxVjtvRgBmMP523SPaoQ9EL4rrx Gw0tUk5E6mUqtk5tA2rZeZopzeUgQY2AyqtaJaILRziaEPX7netgrQ6DcR7RZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707111935; a=rsa-sha256; cv=none; b=UdFejgqtxR7SwSI/xVbOKaBAnSoh4IeAO6IXQ8wCR2vSghZ50dW0QuV82SWoqJbNNDRDDo 5nljv0dVod//R9XzFqAiplWu2O/hWG3FRm+vKIL3jCgTAlfzmm692C4XiPauXtrXIP22MO cHQ54y5Hse412TCTKbjezQY45cEUCR+OxGcocYeHH+pfUnQFLIvLrIhLBYDONmWlIBcJ3M yilYZIovpr7dsZRx5LODLsIRgWvHhmiZaXhnMdEbn4zcxblQ61OvLNLM8dOT9/t3nhonSR LvfR19d/0u6Wb53ofCIXGHtYz2ZTBfcIG5lpbECGAy0nxvhGYY8MqMTZK2vRIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TSwMg12RvzSZV; Mon, 5 Feb 2024 05:45: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 4155jZe5074027; Mon, 5 Feb 2024 05:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4155jZ9s074024; Mon, 5 Feb 2024 05:45:35 GMT (envelope-from git) Date: Mon, 5 Feb 2024 05:45:35 GMT Message-Id: <202402050545.4155jZ9s074024@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: 0ea4b4084845 - main - vtnet: Avoid ifdefs based on __NO_STRICT_ALIGNMENT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ea4b4084845bfeedc8c692e4d34252023b78cb3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0ea4b4084845bfeedc8c692e4d34252023b78cb3 commit 0ea4b4084845bfeedc8c692e4d34252023b78cb3 Author: Warner Losh AuthorDate: 2024-02-05 05:43:49 +0000 Commit: Warner Losh CommitDate: 2024-02-05 05:43:49 +0000 vtnet: Avoid ifdefs based on __NO_STRICT_ALIGNMENT Some platforms require an adjustment of the ethernet hearders. Rather than make this be on __NO_STRICT_ALIGNMENT being defined, define VTNET_ETHER_ALIGN to be either 0 or ETHER_ALIGN (aka 2). Add a test to the if statements to only do them when != 0. This eliminates the #ifdef sprinkled in the code, still communicates the intent and gives the same compiled results. Sponsored by: Netflix Reviewed by: bz, bryanv Differential Revision: https://reviews.freebsd.org/D43654 --- sys/dev/virtio/network/if_vtnet.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 3d85fee122c7..1c731b496f12 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -89,6 +89,12 @@ #include #endif +#ifdef __NO_STRICT_ALIGNMENT +#define VTNET_ETHER_ALIGN 0 +#else /* Strict alignment */ +#define VTNET_ETHER_ALIGN ETHER_ALIGN +#endif + static int vtnet_modevent(module_t, int, void *); static int vtnet_probe(device_t); @@ -1223,15 +1229,13 @@ vtnet_rx_cluster_size(struct vtnet_softc *sc, int mtu) } else framesz = sizeof(struct vtnet_rx_header); framesz += sizeof(struct ether_vlan_header) + mtu; -#ifndef __NO_STRICT_ALIGNMENT /* * Account for the offsetting we'll do elsewhere so we allocate the * right size for the mtu. */ - if (sc->vtnet_hdr_size % 4 == 0) { - framesz += ETHER_ALIGN; + if (VTNET_ETHER_ALIGN != 0 && sc->vtnet_hdr_size % 4 == 0) { + framesz += VTNET_ETHER_ALIGN; } -#endif if (framesz <= MCLBYTES) return (MCLBYTES); @@ -1543,15 +1547,13 @@ vtnet_rx_alloc_buf(struct vtnet_softc *sc, int nbufs, struct mbuf **m_tailp) } m->m_len = size; -#ifndef __NO_STRICT_ALIGNMENT /* * Need to offset the mbuf if the header we're going to add * will misalign. */ - if (sc->vtnet_hdr_size % 4 == 0) { - m_adj(m, ETHER_ALIGN); + if (VTNET_ETHER_ALIGN != 0 && sc->vtnet_hdr_size % 4 == 0) { + m_adj(m, VTNET_ETHER_ALIGN); } -#endif if (m_head != NULL) { m_tail->m_next = m; m_tail = m; @@ -1578,14 +1580,12 @@ vtnet_rxq_replace_lro_nomrg_buf(struct vtnet_rxq *rxq, struct mbuf *m0, sc = rxq->vtnrx_sc; clustersz = sc->vtnet_rx_clustersz; -#ifndef __NO_STRICT_ALIGNMENT /* * Need to offset the mbuf if the header we're going to add will * misalign, account for that here. */ - if (sc->vtnet_hdr_size % 4 == 0) - clustersz -= ETHER_ALIGN; -#endif + if (VTNET_ETHER_ALIGN != 0 && sc->vtnet_hdr_size % 4 == 0) + clustersz -= VTNET_ETHER_ALIGN; m_prev = NULL; m_tail = NULL; From nobody Mon Feb 5 15:34:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TT9R853FTz58QNV for ; Mon, 5 Feb 2024 15:34:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 4TT9R80WD9z4Fpn for ; Mon, 5 Feb 2024 15:34:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=mOTXVMUY; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::52c) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-56025fcaebaso2155461a12.0 for ; Mon, 05 Feb 2024 07:34:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1707147265; x=1707752065; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=u8bGyFtFSYuF1sVvco5YMUWJri/eWo3L1zykVsYTSiA=; b=mOTXVMUYCoqQTGM4mhImQDLYHtDGluo75+y3ip/fiuKfTb+ZRdcOKPnpFbtah0M+kQ jBOm6EMQ7LZHGgKUvawlwGkoOG+VZMqRmhRmXABqWLdRrp3G1G4Tp/D8+CFIvxjTSeNi YXeQw2QCsahzBPTKj42eDE3YirM4rf195otQpYKIER+NjGtJsycIMXoLWxFs5uKfWGZk +c82kzWkG1vD3+uoaOS5z/HTHQ4ihqJ7I1zcjcw0d7ejgo/3RVcavyZ0M2kqWI0g5vjG XYDnk6EuPANoPIAMZ86gvUVTKcUkI3jZKbFq/79dLEt5mw0o5lOg1is/mmNCD6ORg6QE jBfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707147265; x=1707752065; 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=u8bGyFtFSYuF1sVvco5YMUWJri/eWo3L1zykVsYTSiA=; b=RSY2jNk6hOeAGbLmXNPdRLQY3elxwVN6W/7z5kgImY+uwFE+ULi+rlzFQEG9YUQpVH LapHT+Ng9U02bcHU05UaLQSQ3M/nnoA9k3pccqp6KXBFQ/Dd+BA7hYut4SXYH/rp2DUQ Ru3M63C0MjgtBZWTZdhnIT8+ObpMBxqpY+ZNFqOmoVdsCBQLW+sPAS1FN/DnkzklVZl7 ST7D0IT49IhVa0LUTBJx3AZmv0rGpRy+y4fV5n89GlO+XKI8on2Tk3Q+eBHXhmyqAoaY /mG75lYVrRGjZQWpQGrZTZ4Ws5YTzV4SEJgQHeFmNVmNbI1NGUEu6plK7dtqk+7gbji0 lW/g== X-Gm-Message-State: AOJu0Yxo6NKRUSpqtxSj/vzqGy90Td2bW8zNfQeMjMr6nfXiLDspgmE9 CDdFkOUrt+ChVxWrp46U8LTm/XSI/zLgAOcjajhHDzQSpOSUqPLHVC4e99uLRX90rXTpwgV/lCh ub8a/2NRHe5LQ0QLYjOMpCRbQn8LePyQJZ8lkhA== X-Google-Smtp-Source: AGHT+IES0pQRSbi4TNC+2enrmeP2l5k6qtD13wlbH1rLZffLj1aRFDpKUNnui2goIilTBZ0Q8Bmkdv2t+GRBTg0HRDM= X-Received: by 2002:a05:6402:33cf:b0:55f:3cb:9c33 with SMTP id a15-20020a05640233cf00b0055f03cb9c33mr5149066edc.31.1707147265295; Mon, 05 Feb 2024 07:34:25 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <737703f2-26a6-4a84-a64b-3fa55cad721c@FreeBSD.org> <20240131204355.9EA2B19F@slippy.cwsent.com> In-Reply-To: From: Warner Losh Date: Mon, 5 Feb 2024 08:34:16 -0700 Message-ID: Subject: Re: git: 07c64d74917e - main - acpica: Import ACPICA 20230628 To: Cy Schubert Cc: Andriy Gapon , Jung-uk Kim , Baptiste Daroussin , src-committers , "" , "" , Dmitry Salychev Content-Type: multipart/alternative; boundary="00000000000053dd9a0610a43290" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52c:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4TT9R80WD9z4Fpn --00000000000053dd9a0610a43290 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 1:59=E2=80=AFPM Warner Losh wrote: > > > On Wed, Jan 31, 2024, 1:44=E2=80=AFPM Cy Schubert > wrote: > >> In message <737703f2-26a6-4a84-a64b-3fa55cad721c@FreeBSD.org>, Andriy >> Gapon >> wri >> tes: >> > On 31/01/2024 19:40, Cy Schubert wrote: >> > > In message <04c4a0e1-aa79-4d25-a1f7-2196cfa65578@FreeBSD.org>, >> Jung-uk Kim >> > > writ >> > > es: >> > >> On 24. 1. 31., Baptiste Daroussin wrote: >> > >>> Hello, >> > >>> >> > >>> Either this one or the previous import is breaking arm64 build >> > >>> >> > >>> --- acpi_iort.o --- >> > >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:103:4: >> error: fiel >> > d >> > >>> 'data' with variable sized type 'union (unnamed union at >> > >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:98:2 >> > >>> )' not at the end of a struct or class is a GNU extension >> > >>> [-Werror,-Wgnu-variable-sized-type-not-at-end] >> > >>> 103 | } data; >> > >>> | ^ >> > >> >> > >> Sorry for the breakage. I will fix it soon. >> > >> >> > >> BTW, this code was added by this: >> > >> >> > >> https://reviews.freebsd.org/D31267 >> > >> >> > >> It seems struct iort_named_component was a hack, which duplicated >> > >> ACPI_IORT_NAMED_COMPONENT but with a fixed length field >> DeviceName[32]. >> > >> Is it really necessary? >> > > >> > > Though they incorporated the WOL patch I've been using, they've brok= en >> > > poweroff. >> > >> > The poweroff issue could be because of 9cdf326b4f >> >> Thanks. I clued into that a while ago after taking a break to read the M= L. >> >> This smelled of the original WOL problem I had last year that required >> pulling the plug to allow the NIC to see the magic packet, but worse. >> Hence >> I was barking up the wrong tree. >> > > On an semi-related issue... mind if I do a proper merge commit to catch u= p > and not leave hidden landmines for the future? > OK. I'll do a proper merge commit. We've accumulated a few dozen conflicts I'll have to sort out (though I think they are all in files we don't user or have deleted). Warner > Warner > >> >> -- >> Cheers, >> Cy Schubert >> FreeBSD UNIX: Web: https://FreeBSD.org >> NTP: Web: https://nwtime.org >> >> e^(i*pi)+1=3D0 >> >> >> --00000000000053dd9a0610a43290 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jan 31, 2024 at 1:59=E2=80=AF= PM Warner Losh <imp@bsdimp.com>= wrote:


On Wed, Jan 31, 2024, 1:44=E2=80=AFPM Cy Schubert <Cy.Schubert@cschube= rt.com> wrote:
In message <737703f2-26a6-4a84-a64b-3fa55cad721c@FreeBSD.org>, = Andriy Gapon
wri
tes:
> On 31/01/2024 19:40, Cy Schubert wrote:
> > In message <04c4a0e1-aa79-4d25-a1f7-2196cfa65578@FreeBSD.org&g= t;, Jung-uk Kim
> > writ
> > es:
> >> On 24. 1. 31., Baptiste Daroussin wrote:
> >>> Hello,
> >>>
> >>> Either this one or the previous import is breaking arm64 = build
> >>>
> >>> --- acpi_iort.o ---
> >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:10= 3:4: error: fiel
> d
> >>> 'data' with variable sized type 'union (unnam= ed union at
> >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:98= :2
> >>> )' not at the end of a struct or class is a GNU exten= sion
> >>> [-Werror,-Wgnu-variable-sized-type-not-at-end]
> >>>=C2=A0 =C2=A0 =C2=A0103 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0} data;
> >>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0^
> >>
> >> Sorry for the breakage.=C2=A0 I will fix it soon.
> >>
> >> BTW, this code was added by this:
> >>
> >> https://reviews.freebsd.org/D31267 > >>
> >> It seems struct iort_named_component was a hack, which duplic= ated
> >> ACPI_IORT_NAMED_COMPONENT but with a fixed length field Devic= eName[32].
> >> Is it really necessary?
> >
> > Though they incorporated the WOL patch I've been using, they&= #39;ve broken
> > poweroff.
>
> The poweroff issue could be because of 9cdf326b4f

Thanks. I clued into that a while ago after taking a break to read the ML.<= br>
This smelled of the original WOL problem I had last year that required
pulling the plug to allow the NIC to see the magic packet, but worse. Hence=
I was barking up the wrong tree.

On an semi-related issue... mind if I do a = proper merge commit to catch up and not leave hidden landmines for the futu= re?

OK. I'll do a proper me= rge commit. We've accumulated a few dozen conflicts I'll have to so= rt out (though I think they
are all in files we don't user or= have deleted).

Warner
=C2=A0
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Warner

--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 ht= tps://FreeBSD.org
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<cy@nwtime.org>=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 =C2=A0 =C2= =A0 =C2=A0 e^(i*pi)+1=3D0


--00000000000053dd9a0610a43290-- From nobody Mon Feb 5 15:55:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TT9vs5vjVz58Rxn for ; Mon, 5 Feb 2024 15:55:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) (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 4TT9vs1Hdrz4JMC for ; Mon, 5 Feb 2024 15:55:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=vksZoPep; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::22c) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2d0a4e8444dso16266761fa.2 for ; Mon, 05 Feb 2024 07:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1707148551; x=1707753351; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=361e9qjHbvPOF9/mSOAcwasPKrcOQ3yyKtPtrT/mG8I=; b=vksZoPeptqYjnkV5LNoXpapotHtMGAoGU+JT8j3XTUgQ1R4R5WX2PxvkXHCId5w29A S/RCwfcEl8jt6HvSNZ9qv85Sfr+1EVtf8JhkOT4OF2Ev709y2QXy+3j5ql8GrUzUhO39 NzoQ4Q9gSn86qeHzrDFqbBexeN/sipDt3E9CnzbwDbtDFFPevbBsnzr4dIlzNvtkW8Rj OaMRo62WHeaZsp+dkJ/14chgTXrRERauq7uhyDoa/96MEVGyxfbb7nePBZy5Ls6V6B7H ZgqKs57FSpP5EDk80fc7Ozf9t1uGQjC6dEWagmSALiuTMhCiVjkH8vcZv4HFgsM9cfpC HHsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707148551; x=1707753351; 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=361e9qjHbvPOF9/mSOAcwasPKrcOQ3yyKtPtrT/mG8I=; b=vJo+V2RPQCzmDSXFulN1drNvX0kewqTi+VQxn7C8Jcx2OshPQDNfPDVCmb5BBEgVby IjjKaR/dwAhiRra3KzYtdsoYWuKr1dDPByn0wgsELmOn3paQRlhmNHDI8XalzaN4gyGL wZ+3CkLCL9o8fmiRRqLf5HnMlsItURSCN2l/X9kOo+YRPGmkaLaHBFFApkrJUNhUdh+F PR/4XWGrsFmGtWSQRdYZg2wouQ+UlumD8MxN4tvwi8U/7K2Hv7MCIGbtabCHqhdHlhWT gozOUN6B6TrpxmmZ+DCxZPPoXn4wWP9EVG9FdFQydgHUoBc/Sx9hPUVloaAkGUYaYzrE yQRg== X-Gm-Message-State: AOJu0YxrMFeOCPsB7E71a+ZNAMwYTDu1bfI7Qn6pLmcfSUul2yTbABjw XtejmGrp2kU27gdz3OM7qh/et3uT/1mZmNTRK88h1YD96AB2wUNBON+dMcD2AUpTFXGdMsnmBxc opfW01kKB7RXTvY9jOzX7yACavZL9ykvh4IELgQ== X-Google-Smtp-Source: AGHT+IHQeIF3EpEmZon/+Q3kckQT4H0EjFeisyLgHsdtC1i8j3OuGsbhEsEiyq7aUlmr/KpFO9Xlq2QG6fmQDoXH7R8= X-Received: by 2002:a2e:9890:0:b0:2d0:b2cd:2791 with SMTP id b16-20020a2e9890000000b002d0b2cd2791mr65420ljj.46.1707148551332; Mon, 05 Feb 2024 07:55:51 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <737703f2-26a6-4a84-a64b-3fa55cad721c@FreeBSD.org> <20240131204355.9EA2B19F@slippy.cwsent.com> In-Reply-To: From: Warner Losh Date: Mon, 5 Feb 2024 08:55:42 -0700 Message-ID: Subject: Re: git: 07c64d74917e - main - acpica: Import ACPICA 20230628 To: Cy Schubert Cc: Andriy Gapon , Jung-uk Kim , Baptiste Daroussin , src-committers , "" , "" , Dmitry Salychev Content-Type: multipart/alternative; boundary="000000000000fb3f010610a47ee2" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22c:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4TT9vs1Hdrz4JMC --000000000000fb3f010610a47ee2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 5, 2024 at 8:34=E2=80=AFAM Warner Losh wrote: > > > On Wed, Jan 31, 2024 at 1:59=E2=80=AFPM Warner Losh wrot= e: > >> >> >> On Wed, Jan 31, 2024, 1:44=E2=80=AFPM Cy Schubert >> wrote: >> >>> In message <737703f2-26a6-4a84-a64b-3fa55cad721c@FreeBSD.org>, Andriy >>> Gapon >>> wri >>> tes: >>> > On 31/01/2024 19:40, Cy Schubert wrote: >>> > > In message <04c4a0e1-aa79-4d25-a1f7-2196cfa65578@FreeBSD.org>, >>> Jung-uk Kim >>> > > writ >>> > > es: >>> > >> On 24. 1. 31., Baptiste Daroussin wrote: >>> > >>> Hello, >>> > >>> >>> > >>> Either this one or the previous import is breaking arm64 build >>> > >>> >>> > >>> --- acpi_iort.o --- >>> > >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:103:4: >>> error: fiel >>> > d >>> > >>> 'data' with variable sized type 'union (unnamed union at >>> > >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:98:2 >>> > >>> )' not at the end of a struct or class is a GNU extension >>> > >>> [-Werror,-Wgnu-variable-sized-type-not-at-end] >>> > >>> 103 | } data; >>> > >>> | ^ >>> > >> >>> > >> Sorry for the breakage. I will fix it soon. >>> > >> >>> > >> BTW, this code was added by this: >>> > >> >>> > >> https://reviews.freebsd.org/D31267 >>> > >> >>> > >> It seems struct iort_named_component was a hack, which duplicated >>> > >> ACPI_IORT_NAMED_COMPONENT but with a fixed length field >>> DeviceName[32]. >>> > >> Is it really necessary? >>> > > >>> > > Though they incorporated the WOL patch I've been using, they've >>> broken >>> > > poweroff. >>> > >>> > The poweroff issue could be because of 9cdf326b4f >>> >>> Thanks. I clued into that a while ago after taking a break to read the >>> ML. >>> >>> This smelled of the original WOL problem I had last year that required >>> pulling the plug to allow the NIC to see the magic packet, but worse. >>> Hence >>> I was barking up the wrong tree. >>> >> >> On an semi-related issue... mind if I do a proper merge commit to catch >> up and not leave hidden landmines for the future? >> > > OK. I'll do a proper merge commit. We've accumulated a few dozen conflict= s > I'll have to sort out (though I think they > are all in files we don't user or have deleted). > After resolving the conflicts, it's one file (limts.h) that's now included where it wasn't before. Once I make sure that world and kernel still build, I'll push the change since limits.h isn't going to affect any functionality and I may need to ifdef it for the kernel anyay... Many of the conflicts could be avoided if we didn't modify the files like we do. I'll see about working up a patch, either myself or someone else who has interest, and submitting it for review. This would make future merges even easier since the changes we've made are all build-system related and need manual intervention today. Warner > Warner > > >> Warner >> >>> >>> -- >>> Cheers, >>> Cy Schubert >>> FreeBSD UNIX: Web: https://FreeBSD.org >>> NTP: Web: https://nwtime.org >>> >>> e^(i*pi)+1=3D0 >>> >>> >>> --000000000000fb3f010610a47ee2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Feb 5, 2024 at 8:34=E2=80=AFA= M Warner Losh <imp@bsdimp.com> = wrote:


On Wed, Jan 31, 2024 at 1:59=E2=80=AFPM Warne= r Losh <imp@bsdimp.c= om> wrote:


On Wed, Jan 31, 2024, 1:44=E2=80=AFPM Cy Schubert &l= t;Cy.Schuber= t@cschubert.com> wrote:
In message <737703f2-26a6-4a84-a64b-3fa55cad721c@FreeBSD.= org>, Andriy Gapon
wri
tes:
> On 31/01/2024 19:40, Cy Schubert wrote:
> > In message <04c4a0e1-aa79-4d25-a1f7-2196cfa65578@FreeBSD.org&g= t;, Jung-uk Kim
> > writ
> > es:
> >> On 24. 1. 31., Baptiste Daroussin wrote:
> >>> Hello,
> >>>
> >>> Either this one or the previous import is breaking arm64 = build
> >>>
> >>> --- acpi_iort.o ---
> >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:10= 3:4: error: fiel
> d
> >>> 'data' with variable sized type 'union (unnam= ed union at
> >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:98= :2
> >>> )' not at the end of a struct or class is a GNU exten= sion
> >>> [-Werror,-Wgnu-variable-sized-type-not-at-end]
> >>>=C2=A0 =C2=A0 =C2=A0103 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0} data;
> >>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0^
> >>
> >> Sorry for the breakage.=C2=A0 I will fix it soon.
> >>
> >> BTW, this code was added by this:
> >>
> >> https://reviews.freebsd.org/D31267 > >>
> >> It seems struct iort_named_component was a hack, which duplic= ated
> >> ACPI_IORT_NAMED_COMPONENT but with a fixed length field Devic= eName[32].
> >> Is it really necessary?
> >
> > Though they incorporated the WOL patch I've been using, they&= #39;ve broken
> > poweroff.
>
> The poweroff issue could be because of 9cdf326b4f

Thanks. I clued into that a while ago after taking a break to read the ML.<= br>
This smelled of the original WOL problem I had last year that required
pulling the plug to allow the NIC to see the magic packet, but worse. Hence=
I was barking up the wrong tree.

On an semi-related issue... mind if I do a = proper merge commit to catch up and not leave hidden landmines for the futu= re?

OK. I'll do a proper me= rge commit. We've accumulated a few dozen conflicts I'll have to so= rt out (though I think they
are all in files we don't user or= have deleted).

After res= olving the conflicts, it's one file (limts.h) that's now included w= here it wasn't before. Once I make sure that world and kernel still bui= ld, I'll push the change since limits.h isn't going to affect any f= unctionality and I may need to ifdef it for the kernel anyay...

Many of the conflicts could be avoided if we didn't m= odify the files like we do. I'll see about working up a patch, either m= yself or someone else who has interest, and submitting it for review. This = would make future merges even easier since the changes we've made are a= ll build-system related and need manual intervention today.
<= br>
Warner
=C2=A0
Warn= er
=C2=A0
Warner

--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 ht= tps://FreeBSD.org
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<cy@nwtime.org>=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 =C2=A0 =C2= =A0 =C2=A0 e^(i*pi)+1=3D0


--000000000000fb3f010610a47ee2-- From nobody Mon Feb 5 20:10:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTHYS3l41z58vC3; Mon, 5 Feb 2024 20:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTHYS38ZFz4mMM; Mon, 5 Feb 2024 20:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707163820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tt9XboXG2cSrZxW9dlg1uxcy2CDq8Uo5HTNM1juP+Uw=; b=B4gIpNW5VBNCHuwCb87Ry0ge75/tA28iTKR83LVwlv3/h/hbrPPS/HHxTSCrAhUUJNwTKt w7Qn/CGVgEYoOg9pi6WdtKCQBUrqs2VGcIVzqGD0bIC958yTHvbXVh7REW159Djlptz96t ILKzjBb75s3n8LsVrNdwoea3ODizG6T9GTOT3GekCqcZxY2GLxaFGiuZHrB6RfNEVcw2Fu MrkSDL4r6rKtjaADy6qryu+z2yYfvksG5AoFYenT7uC0indDVK/08iEnTEi4vGuHcJw/3F TkEtgOSZ+hfOIOjrVhPW47Sum1M8pfw5II+828rUSeEzOLKG9Uw4ay4IKKwvPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707163820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tt9XboXG2cSrZxW9dlg1uxcy2CDq8Uo5HTNM1juP+Uw=; b=uOy+dp4elsp6GAgOJVK4YwAYf9tUIvS4P3euNsMKjFitjmmmWksFgnvDLInLNYast85GdB m7mqA5sRYjlJmZz7dHWLuCY3094eITJPZXfiAcOqsmVz39S9ORBXcwdJBU9I2cxAuNVgWE ejiOkfhJMdELz7tg02xl+r4fm16AP9zb/WiHC96fmh/d7pZyBZUOM11l3WXDKrZh2tFMwN Xp7L+Xh4fZkP7S/n/2AaGz0KZEfNpXEEVrixTIpJvBa4bJP4Hik2KjXug3WuBbSkVSs6+c U5Gy55HcGA+Dihu+cr6Oo6U4v+GFGcEhQAVqev137Ze5/f2uSb+5+ZAeottqeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707163820; a=rsa-sha256; cv=none; b=HSGcCgVpGwKK18hG9MvAe/EZ1ZPpbzk3dqJpsJoBfZ8ZXz4CWYaC0s8BQ8xHhUngInt2Tm G8hJ2bEbcp8jL71qWK8Ywpca1G0fqtroFfMOhgLWkeuaPw6GgQhZ4MsR4zPKDdGvRM+3Pu VnrhVUmTN3bIcvPl2poZZbyacXxHZkUIO5K0lxYgbR9IJ7X9OSJVR+/z3OQdvlrn+/lfNJ JD3QVPaMu7rbUIDxJE5SN+mk9rw9Os42gTejbn3zY575b8TEFT2JWPc6CQWaWbVE9nXoiF /xleoPaEasnURImlZgiERsgwXOd+OaDbem7FPr3rUiI51vZMYVgsSDEc/Jlq6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTHYS2DHXztnd; Mon, 5 Feb 2024 20:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 415KAKtl027049; Mon, 5 Feb 2024 20:10:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KAKFm027046; Mon, 5 Feb 2024 20:10:20 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:10:20 GMT Message-Id: <202402052010.415KAKFm027046@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: da63ac1b0757 - main - OpenSSL: Update date string List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da63ac1b0757e10255613bdae1b7fa353eb4aea2 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=da63ac1b0757e10255613bdae1b7fa353eb4aea2 commit da63ac1b0757e10255613bdae1b7fa353eb4aea2 Author: Cy Schubert AuthorDate: 2024-02-05 20:09:08 +0000 Commit: Cy Schubert CommitDate: 2024-02-05 20:09:08 +0000 OpenSSL: Update date string Reported by: "Herbert J. Skuhra" Fixes: 74fe298c8299 MFC after: 3 days --- crypto/openssl/include/openssl/opensslv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/openssl/include/openssl/opensslv.h b/crypto/openssl/include/openssl/opensslv.h index b35da9255c44..012d77ee8bd0 100644 --- a/crypto/openssl/include/openssl/opensslv.h +++ b/crypto/openssl/include/openssl/opensslv.h @@ -82,13 +82,13 @@ extern "C" { * * These strings are defined separately to allow them to be parsable. */ -# define OPENSSL_RELEASE_DATE "24 Oct 2023" +# define OPENSSL_RELEASE_DATE "30 Jan 2024" /* * SECTION 4: BACKWARD COMPATIBILITY */ -# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.13 24 Oct 2023" +# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.13 30 Jan 2024" /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ # ifdef OPENSSL_VERSION_PRE_RELEASE From nobody Mon Feb 5 20:38:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJ9r0kH2z58xwJ; Mon, 5 Feb 2024 20:38: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 4TTJ9r0TSzz4pqC; Mon, 5 Feb 2024 20:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwtCROZonXt9RWqn30qbXpJTpa/4g9xRrjKzP4i97S4=; b=ID/sIzJ3enSGAs4mpsSZeNORQcgDrVLc64i9eS5GSxMr8WAElP7f7LXQ6QUrkjgpKqCeJc LKbVVkRa6mWTH3X+JUqb0mTNeT8BREy2OH9vv5Lz7QtBe23RRnR4Uo6SJkBbqWJVdvbfVE +Qla3CJ1jCU4HNBiLY6GNWjIdl5cu9aqg97FcIwIYEvSo9qZefQQWq5BTi5MDzGWwIhpqP 2BrnJip8XRWHShh+h7p7HW9sbfJ6HCyl8REEH4EcofD/NirKZY66yRK6Yj+FEjiW0i1/Vu RRqgHe8h3Spnte13X6823pOSI4mWboB7o8YB5q/KRk5jBgKIo817A0LJm/uxNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwtCROZonXt9RWqn30qbXpJTpa/4g9xRrjKzP4i97S4=; b=a/17Z+Z+QqznLmq4C+rP7B5qwm9lHqpFoya+yUIYQ2vyDFQkOy3dsFnqV5BFR77uq99Prv E5coXEjp0SbAgFG4hJvyDBcCm2XstBagiVTlXtTXKP5e7PJUjxa/PaJGdSfr3re3MAlmXR L4e8Jdz0UsmTfunWlO7Wh0zw1vf8z8tl32T7ppruBbAs/kapofNJtmumKIwG2spb1//RIy B9zicvoYJMgTrQb/5BhSYReGU24DnLcHe2kcniIZUBh+7BbofRo2asa5vef8IHpcAMaxth MsEgCGtXZLEEiP2kOnUjNurdiASHWzXtIidDipjVMuB7SYgmaQVAUfSFKzo3KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165504; a=rsa-sha256; cv=none; b=EHVT2F+0lpg/6T5RxXtTdjehFrQhvVO+4LqBwjju5XGg48gkvA73sA+q4qZPukHfyZMAol VB0LkXAo4PHFgLS0SHBBHy+JD9W003+u0h0ePO3h3xIuqQN+Kx1Le6exsUBYbMCAgB70Ic 6eofCt6BbzsK0V5eD6ou90bXf1FQiuLU/YIymbumvN0pvCOXKmVJLlQ173/MFX4bYvt9R7 oxzf6Fybxk3nP74kWbOjSNqaaqvyasM6/Trqa5EcMuHjMtkYnRj0FSVVr4l2G3wF5HAMyU 27xQ1Y2dNNDbk/2Az3altUw/SQ5r/CAjn6ysvy22snMdiroy0A1o/jErJTrJTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJ9q6fgVzvlf; Mon, 5 Feb 2024 20:38: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 415KcNER068807; Mon, 5 Feb 2024 20:38:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcNej068804; Mon, 5 Feb 2024 20:38:23 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:23 GMT Message-Id: <202402052038.415KcNej068804@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: 9cbd96582c0a - main - libc: split libc and syscall interposing (1/2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cbd96582c0ac133f911270a47bff189d769ac8d Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9cbd96582c0ac133f911270a47bff189d769ac8d commit 9cbd96582c0ac133f911270a47bff189d769ac8d Author: Brooks Davis AuthorDate: 2024-01-16 20:16:39 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libc: split libc and syscall interposing (1/2) System calls or their wrappers are now interposed by __libsys_interposing with purely libc entries remaining in __libc_interposing. Use __libsys_interposing_slot in libthr to update __libsys_interposing, but also make __libc_interposing_slot fall back to __libsys_interposing_slot so an out of date libc has a chance of working during updates. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/compat-43/creat.c | 3 +-- lib/libc/gen/lockf.c | 4 ++-- lib/libc/gen/sleep.c | 2 +- lib/libc/gen/usleep.c | 2 +- lib/libc/gen/wait.c | 3 +-- lib/libc/gen/wait3.c | 4 ++-- lib/libc/gen/waitid.c | 2 +- lib/libc/gen/waitpid.c | 3 +-- lib/libc/include/libc_private.h | 2 ++ lib/libc/net/recv.c | 2 +- lib/libc/net/send.c | 2 +- lib/libc/sys/Symbol.map | 1 + lib/libc/sys/accept.c | 3 +-- lib/libc/sys/accept4.c | 3 +-- lib/libc/sys/aio_suspend.c | 3 +-- lib/libc/sys/clock_nanosleep.c | 3 +-- lib/libc/sys/close.c | 3 +-- lib/libc/sys/connect.c | 3 +-- lib/libc/sys/fcntl.c | 2 +- lib/libc/sys/fdatasync.c | 3 +-- lib/libc/sys/fork.c | 3 +-- lib/libc/sys/fsync.c | 3 +-- lib/libc/sys/interposing_table.c | 28 ++++++++++++++++++++-------- lib/libc/sys/kevent.c | 3 +-- lib/libc/sys/msync.c | 3 +-- lib/libc/sys/nanosleep.c | 3 +-- lib/libc/sys/open.c | 3 ++- lib/libc/sys/openat.c | 2 +- lib/libc/sys/pdfork.c | 4 ++-- lib/libc/sys/poll.c | 3 +-- lib/libc/sys/ppoll.c | 3 +-- lib/libc/sys/pselect.c | 3 +-- lib/libc/sys/read.c | 3 +-- lib/libc/sys/readv.c | 3 +-- lib/libc/sys/recvfrom.c | 3 +-- lib/libc/sys/recvmsg.c | 3 +-- lib/libc/sys/select.c | 3 +-- lib/libc/sys/sendmsg.c | 3 +-- lib/libc/sys/sendto.c | 3 +-- lib/libc/sys/setcontext.c | 3 +-- lib/libc/sys/sigaction.c | 3 +-- lib/libc/sys/sigprocmask.c | 3 +-- lib/libc/sys/sigsuspend.c | 3 +-- lib/libc/sys/sigtimedwait.c | 3 +-- lib/libc/sys/sigwait.c | 3 +-- lib/libc/sys/sigwaitinfo.c | 3 +-- lib/libc/sys/swapcontext.c | 3 +-- lib/libc/sys/wait4.c | 3 +-- lib/libc/sys/wait6.c | 3 +-- lib/libc/sys/write.c | 3 +-- lib/libc/sys/writev.c | 3 +-- lib/libthr/thread/thr_syscalls.c | 15 ++++++++++----- 52 files changed, 85 insertions(+), 101 deletions(-) diff --git a/lib/libc/compat-43/creat.c b/lib/libc/compat-43/creat.c index 2597b4950ed3..9bc1db19de1d 100644 --- a/lib/libc/compat-43/creat.c +++ b/lib/libc/compat-43/creat.c @@ -43,9 +43,8 @@ int __creat(const char *path, mode_t mode); int __creat(const char *path, mode_t mode) { - return (((int (*)(int, const char *, int, ...)) - __libc_interposing[INTERPOS_openat])(AT_FDCWD, path, O_WRONLY | + __libsys_interposing[INTERPOS_openat])(AT_FDCWD, path, O_WRONLY | O_CREAT | O_TRUNC, mode)); } diff --git a/lib/libc/gen/lockf.c b/lib/libc/gen/lockf.c index fec65896eaaa..bb98ebc1be82 100644 --- a/lib/libc/gen/lockf.c +++ b/lib/libc/gen/lockf.c @@ -63,7 +63,7 @@ lockf(int filedes, int function, off_t size) case F_TEST: fl.l_type = F_WRLCK; if (((int (*)(int, int, ...)) - __libc_interposing[INTERPOS_fcntl])(filedes, F_GETLK, &fl) + __libsys_interposing[INTERPOS_fcntl])(filedes, F_GETLK, &fl) == -1) return (-1); if (fl.l_type == F_UNLCK || (fl.l_sysid == 0 && @@ -79,5 +79,5 @@ lockf(int filedes, int function, off_t size) } return (((int (*)(int, int, ...)) - __libc_interposing[INTERPOS_fcntl])(filedes, cmd, &fl)); + __libsys_interposing[INTERPOS_fcntl])(filedes, cmd, &fl)); } diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c index a0ec4898867c..7d0fa5332ecc 100644 --- a/lib/libc/gen/sleep.c +++ b/lib/libc/gen/sleep.c @@ -56,7 +56,7 @@ __sleep(unsigned int seconds) time_to_sleep.tv_sec = seconds; time_to_sleep.tv_nsec = 0; if (((int (*)(const struct timespec *, struct timespec *)) - __libc_interposing[INTERPOS_nanosleep])( + __libsys_interposing[INTERPOS_nanosleep])( &time_to_sleep, &time_remaining) != -1) return (0); if (errno != EINTR) diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c index d0d2f020c36b..efd5ee0d1667 100644 --- a/lib/libc/gen/usleep.c +++ b/lib/libc/gen/usleep.c @@ -46,7 +46,7 @@ __usleep(useconds_t useconds) time_to_sleep.tv_nsec = (useconds % 1000000) * 1000; time_to_sleep.tv_sec = useconds / 1000000; return (((int (*)(const struct timespec *, struct timespec *)) - __libc_interposing[INTERPOS_nanosleep])(&time_to_sleep, NULL)); + __libsys_interposing[INTERPOS_nanosleep])(&time_to_sleep, NULL)); } __weak_reference(__usleep, usleep); diff --git a/lib/libc/gen/wait.c b/lib/libc/gen/wait.c index 893618880254..c400d07f9dd5 100644 --- a/lib/libc/gen/wait.c +++ b/lib/libc/gen/wait.c @@ -43,9 +43,8 @@ pid_t __wait(int *); pid_t __wait(int *istat) { - return (((pid_t (*)(pid_t, int *, int, struct rusage *)) - __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, 0, NULL)); + __libsys_interposing[INTERPOS_wait4])(WAIT_ANY, istat, 0, NULL)); } __weak_reference(__wait, wait); diff --git a/lib/libc/gen/wait3.c b/lib/libc/gen/wait3.c index bb2ad7638893..40baf70ac6e6 100644 --- a/lib/libc/gen/wait3.c +++ b/lib/libc/gen/wait3.c @@ -43,9 +43,9 @@ pid_t __wait3(int *, int, struct rusage *); pid_t __wait3(int *istat, int options, struct rusage *rup) { - return (((pid_t (*)(pid_t, int *, int, struct rusage *)) - __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, options, rup)); + __libsys_interposing[INTERPOS_wait4])(WAIT_ANY, istat, options, + rup)); } __weak_reference(__wait3, wait3); diff --git a/lib/libc/gen/waitid.c b/lib/libc/gen/waitid.c index 8690105ba147..b6e5ca33eed3 100644 --- a/lib/libc/gen/waitid.c +++ b/lib/libc/gen/waitid.c @@ -47,7 +47,7 @@ __waitid(idtype_t idtype, id_t id, siginfo_t *info, int flags) pid_t ret; ret = ((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *, - siginfo_t *))__libc_interposing[INTERPOS_wait6])(idtype, id, + siginfo_t *))__libsys_interposing[INTERPOS_wait6])(idtype, id, &status, flags, NULL, info); /* diff --git a/lib/libc/gen/waitpid.c b/lib/libc/gen/waitpid.c index 9d5c3a37df59..ba7e667218cf 100644 --- a/lib/libc/gen/waitpid.c +++ b/lib/libc/gen/waitpid.c @@ -43,9 +43,8 @@ pid_t __waitpid(pid_t, int *, int); pid_t __waitpid(pid_t pid, int *istat, int options) { - return (((pid_t (*)(pid_t, int *, int, struct rusage *)) - __libc_interposing[INTERPOS_wait4])(pid, istat, options, NULL)); + __libsys_interposing[INTERPOS_wait4])(pid, istat, options, NULL)); } __weak_reference(__waitpid, waitpid); diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index bfeada696538..b2284d2df5c6 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -200,6 +200,8 @@ int _pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex, typedef int (*interpos_func_t)(void); interpos_func_t *__libc_interposing_slot(int interposno); extern interpos_func_t __libc_interposing[] __hidden; +interpos_func_t *__libsys_interposing_slot(int interposno); +extern interpos_func_t __libsys_interposing[] __hidden; enum { INTERPOS_accept, diff --git a/lib/libc/net/recv.c b/lib/libc/net/recv.c index 397388dc6b9d..db3d6216ed61 100644 --- a/lib/libc/net/recv.c +++ b/lib/libc/net/recv.c @@ -44,6 +44,6 @@ recv(int s, void *buf, size_t len, int flags) */ return (((ssize_t (*)(int, void *, size_t, int, struct sockaddr *, socklen_t *)) - __libc_interposing[INTERPOS_recvfrom])(s, buf, len, flags, + __libsys_interposing[INTERPOS_recvfrom])(s, buf, len, flags, NULL, NULL)); } diff --git a/lib/libc/net/send.c b/lib/libc/net/send.c index e3efc269d9f6..94983553b1c3 100644 --- a/lib/libc/net/send.c +++ b/lib/libc/net/send.c @@ -44,6 +44,6 @@ send(int s, const void *msg, size_t len, int flags) */ return (((ssize_t (*)(int, const void *, size_t, int, const struct sockaddr *, socklen_t)) - __libc_interposing[INTERPOS_sendto])(s, msg, len, flags, + __libsys_interposing[INTERPOS_sendto])(s, msg, len, flags, NULL, 0)); } diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index a49229ace995..ff35693d808d 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -1051,6 +1051,7 @@ FBSDprivate_1.0 { /* Things that aren't system calls (in sort(1) order) */ __libc_interposing_slot; __libc_sigwait; + __libsys_interposing_slot; __set_error_selector; __sigwait; gssd_syscall; diff --git a/lib/libc/sys/accept.c b/lib/libc/sys/accept.c index 81f227c1caab..974d26eeaa6b 100644 --- a/lib/libc/sys/accept.c +++ b/lib/libc/sys/accept.c @@ -40,7 +40,6 @@ __weak_reference(__sys_accept, __accept); int accept(int s, struct sockaddr *addr, socklen_t *addrlen) { - return (((int (*)(int, struct sockaddr *, socklen_t *)) - __libc_interposing[INTERPOS_accept])(s, addr, addrlen)); + __libsys_interposing[INTERPOS_accept])(s, addr, addrlen)); } diff --git a/lib/libc/sys/accept4.c b/lib/libc/sys/accept4.c index 01fdce342e42..d69e843e28e6 100644 --- a/lib/libc/sys/accept4.c +++ b/lib/libc/sys/accept4.c @@ -40,7 +40,6 @@ __weak_reference(__sys_accept4, __accept4); int accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags) { - return (((int (*)(int, struct sockaddr *, socklen_t *, int)) - __libc_interposing[INTERPOS_accept4])(s, addr, addrlen, flags)); + __libsys_interposing[INTERPOS_accept4])(s, addr, addrlen, flags)); } diff --git a/lib/libc/sys/aio_suspend.c b/lib/libc/sys/aio_suspend.c index 3324bcc8de2f..41872fbdd049 100644 --- a/lib/libc/sys/aio_suspend.c +++ b/lib/libc/sys/aio_suspend.c @@ -40,8 +40,7 @@ int aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct timespec *timeout) { - return (((int (*)(const struct aiocb * const[], int, const struct timespec *)) - __libc_interposing[INTERPOS_aio_suspend])(iocbs, niocb, timeout)); + __libsys_interposing[INTERPOS_aio_suspend])(iocbs, niocb, timeout)); } diff --git a/lib/libc/sys/clock_nanosleep.c b/lib/libc/sys/clock_nanosleep.c index a9d811f11b04..58d76243f42c 100644 --- a/lib/libc/sys/clock_nanosleep.c +++ b/lib/libc/sys/clock_nanosleep.c @@ -41,9 +41,8 @@ int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp) { - return (((int (*)(clockid_t, int, const struct timespec *, struct timespec *)) - __libc_interposing[INTERPOS_clock_nanosleep])(clock_id, flags, + __libsys_interposing[INTERPOS_clock_nanosleep])(clock_id, flags, rqtp, rmtp)); } diff --git a/lib/libc/sys/close.c b/lib/libc/sys/close.c index e4d81614b056..923339f06e71 100644 --- a/lib/libc/sys/close.c +++ b/lib/libc/sys/close.c @@ -40,6 +40,5 @@ __weak_reference(__sys_close, __close); int close(int fd) { - - return (((int (*)(int))__libc_interposing[INTERPOS_close])(fd)); + return (((int (*)(int))__libsys_interposing[INTERPOS_close])(fd)); } diff --git a/lib/libc/sys/connect.c b/lib/libc/sys/connect.c index dd70908496a7..c908ec5dc493 100644 --- a/lib/libc/sys/connect.c +++ b/lib/libc/sys/connect.c @@ -40,7 +40,6 @@ __weak_reference(__sys_connect, __connect); int connect(int s, const struct sockaddr *addr, socklen_t addrlen) { - return (((int (*)(int, const struct sockaddr *, socklen_t)) - __libc_interposing[INTERPOS_connect])(s, addr, addrlen)); + __libsys_interposing[INTERPOS_connect])(s, addr, addrlen)); } diff --git a/lib/libc/sys/fcntl.c b/lib/libc/sys/fcntl.c index ad3734dfbf14..52e041003b4d 100644 --- a/lib/libc/sys/fcntl.c +++ b/lib/libc/sys/fcntl.c @@ -50,5 +50,5 @@ fcntl(int fd, int cmd, ...) va_end(args); return (((int (*)(int, int, ...)) - __libc_interposing[INTERPOS_fcntl])(fd, cmd, arg)); + __libsys_interposing[INTERPOS_fcntl])(fd, cmd, arg)); } diff --git a/lib/libc/sys/fdatasync.c b/lib/libc/sys/fdatasync.c index e400d1bcefb5..dc6927eae324 100644 --- a/lib/libc/sys/fdatasync.c +++ b/lib/libc/sys/fdatasync.c @@ -37,6 +37,5 @@ int fdatasync(int fd) { - - return (((int (*)(int))__libc_interposing[INTERPOS_fdatasync])(fd)); + return (((int (*)(int))__libsys_interposing[INTERPOS_fdatasync])(fd)); } diff --git a/lib/libc/sys/fork.c b/lib/libc/sys/fork.c index ecd8ecdf5730..4feecb355a56 100644 --- a/lib/libc/sys/fork.c +++ b/lib/libc/sys/fork.c @@ -39,6 +39,5 @@ __weak_reference(__sys_fork, __fork); pid_t fork(void) { - - return (((pid_t (*)(void))__libc_interposing[INTERPOS_fork])()); + return (((pid_t (*)(void))__libsys_interposing[INTERPOS_fork])()); } diff --git a/lib/libc/sys/fsync.c b/lib/libc/sys/fsync.c index 32302eb96492..92e3ae89bccc 100644 --- a/lib/libc/sys/fsync.c +++ b/lib/libc/sys/fsync.c @@ -39,6 +39,5 @@ __weak_reference(__sys_fsync, __fsync); int fsync(int fd) { - - return (((int (*)(int))__libc_interposing[INTERPOS_fsync])(fd)); + return (((int (*)(int))__libsys_interposing[INTERPOS_fsync])(fd)); } diff --git a/lib/libc/sys/interposing_table.c b/lib/libc/sys/interposing_table.c index e497319e8d27..f7678a1352ff 100644 --- a/lib/libc/sys/interposing_table.c +++ b/lib/libc/sys/interposing_table.c @@ -30,11 +30,22 @@ */ #include +#include #include "libc_private.h" #define SLOT(a, b) \ [INTERPOS_##a] = (interpos_func_t)b interpos_func_t __libc_interposing[INTERPOS_MAX] = { + SLOT(system, __libc_system), + SLOT(tcdrain, __libc_tcdrain), + SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub), + SLOT(spinlock, __libc_spinlock_stub), + SLOT(spinunlock, __libc_spinunlock_stub), + SLOT(map_stacks_exec, __libc_map_stacks_exec), + SLOT(distribute_static_tls, __libc_distribute_static_tls), +}; + +interpos_func_t __libsys_interposing[INTERPOS_MAX] = { SLOT(accept, __sys_accept), SLOT(accept4, __sys_accept4), SLOT(aio_suspend, __sys_aio_suspend), @@ -63,21 +74,14 @@ interpos_func_t __libc_interposing[INTERPOS_MAX] = { SLOT(sigtimedwait, __sys_sigtimedwait), SLOT(sigwaitinfo, __sys_sigwaitinfo), SLOT(swapcontext, __sys_swapcontext), - SLOT(system, __libc_system), - SLOT(tcdrain, __libc_tcdrain), SLOT(wait4, __sys_wait4), SLOT(write, __sys_write), SLOT(writev, __sys_writev), - SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub), - SLOT(spinlock, __libc_spinlock_stub), - SLOT(spinunlock, __libc_spinunlock_stub), SLOT(kevent, __sys_kevent), SLOT(wait6, __sys_wait6), SLOT(ppoll, __sys_ppoll), - SLOT(map_stacks_exec, __libc_map_stacks_exec), SLOT(fdatasync, __sys_fdatasync), SLOT(clock_nanosleep, __sys_clock_nanosleep), - SLOT(distribute_static_tls, __libc_distribute_static_tls), SLOT(pdfork, __sys_pdfork), }; #undef SLOT @@ -85,6 +89,14 @@ interpos_func_t __libc_interposing[INTERPOS_MAX] = { interpos_func_t * __libc_interposing_slot(int interposno) { - + /* XXX: forward compat. Remove after 15.0-RELEASE. */ + if (__libc_interposing[interposno] == NULL) + return (__libsys_interposing_slot(interposno)); return (&__libc_interposing[interposno]); } + +interpos_func_t * +__libsys_interposing_slot(int interposno) +{ + return (&__libsys_interposing[interposno]); +} diff --git a/lib/libc/sys/kevent.c b/lib/libc/sys/kevent.c index 4987dbc9a967..4be825e5c078 100644 --- a/lib/libc/sys/kevent.c +++ b/lib/libc/sys/kevent.c @@ -41,9 +41,8 @@ int kevent(int kq, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout) { - return (((int (*)(int, const struct kevent *, int, struct kevent *, int, const struct timespec *)) - __libc_interposing[INTERPOS_kevent])(kq, changelist, nchanges, + __libsys_interposing[INTERPOS_kevent])(kq, changelist, nchanges, eventlist, nevents, timeout)); } diff --git a/lib/libc/sys/msync.c b/lib/libc/sys/msync.c index 587687e636a5..6836d4db265c 100644 --- a/lib/libc/sys/msync.c +++ b/lib/libc/sys/msync.c @@ -40,7 +40,6 @@ __weak_reference(__sys_msync, __msync); int msync(void *addr, size_t len, int flags) { - return (((int (*)(void *, size_t, int)) - __libc_interposing[INTERPOS_msync])(addr, len, flags)); + __libsys_interposing[INTERPOS_msync])(addr, len, flags)); } diff --git a/lib/libc/sys/nanosleep.c b/lib/libc/sys/nanosleep.c index 22ebd4868fd4..83d54a1ca04a 100644 --- a/lib/libc/sys/nanosleep.c +++ b/lib/libc/sys/nanosleep.c @@ -39,7 +39,6 @@ __weak_reference(__sys_nanosleep, __nanosleep); int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) { - return (((int (*)(const struct timespec *, struct timespec *)) - __libc_interposing[INTERPOS_nanosleep])(rqtp, rmtp)); + __libsys_interposing[INTERPOS_nanosleep])(rqtp, rmtp)); } diff --git a/lib/libc/sys/open.c b/lib/libc/sys/open.c index 25e72d1a03d7..0ab3e9c4501e 100644 --- a/lib/libc/sys/open.c +++ b/lib/libc/sys/open.c @@ -51,5 +51,6 @@ open(const char *path, int flags, ...) mode = 0; } return (((int (*)(int, const char *, int, ...)) - __libc_interposing[INTERPOS_openat])(AT_FDCWD, path, flags, mode)); + __libsys_interposing[INTERPOS_openat])(AT_FDCWD, path, flags, + mode)); } diff --git a/lib/libc/sys/openat.c b/lib/libc/sys/openat.c index 8ed95e938a38..4d8a0fc627cb 100644 --- a/lib/libc/sys/openat.c +++ b/lib/libc/sys/openat.c @@ -54,5 +54,5 @@ openat(int fd, const char *path, int flags, ...) mode = 0; } return (((int (*)(int, const char *, int, ...)) - __libc_interposing[INTERPOS_openat])(fd, path, flags, mode)); + __libsys_interposing[INTERPOS_openat])(fd, path, flags, mode)); } diff --git a/lib/libc/sys/pdfork.c b/lib/libc/sys/pdfork.c index e2a5eca848ea..12cf6d858826 100644 --- a/lib/libc/sys/pdfork.c +++ b/lib/libc/sys/pdfork.c @@ -37,6 +37,6 @@ pid_t pdfork(int *fdp, int flags) { - return (((pid_t (*)(int *, int))__libc_interposing[ - INTERPOS_pdfork])(fdp, flags)); + return (((pid_t (*)(int *, int))__libsys_interposing[INTERPOS_pdfork]) + (fdp, flags)); } diff --git a/lib/libc/sys/poll.c b/lib/libc/sys/poll.c index 69c44731d18b..58fbb64fdda5 100644 --- a/lib/libc/sys/poll.c +++ b/lib/libc/sys/poll.c @@ -39,7 +39,6 @@ __weak_reference(__sys_poll, __poll); int poll(struct pollfd pfd[], nfds_t nfds, int timeout) { - return (((int (*)(struct pollfd *, nfds_t, int)) - __libc_interposing[INTERPOS_poll])(pfd, nfds, timeout)); + __libsys_interposing[INTERPOS_poll])(pfd, nfds, timeout)); } diff --git a/lib/libc/sys/ppoll.c b/lib/libc/sys/ppoll.c index ea998b6dadb5..2ff693fc5b19 100644 --- a/lib/libc/sys/ppoll.c +++ b/lib/libc/sys/ppoll.c @@ -40,8 +40,7 @@ int ppoll(struct pollfd pfd[], nfds_t nfds, const struct timespec *__restrict timeout, const sigset_t *__restrict newsigmask) { - return (((int (*)(struct pollfd *, nfds_t, const struct timespec *, - const sigset_t *)) __libc_interposing[INTERPOS_ppoll])(pfd, nfds, + const sigset_t *)) __libsys_interposing[INTERPOS_ppoll])(pfd, nfds, timeout, newsigmask)); } diff --git a/lib/libc/sys/pselect.c b/lib/libc/sys/pselect.c index 562c304fc594..dfd918b4c6d2 100644 --- a/lib/libc/sys/pselect.c +++ b/lib/libc/sys/pselect.c @@ -40,8 +40,7 @@ int pselect(int n, fd_set *rs, fd_set *ws, fd_set *es, const struct timespec *t, const sigset_t *s) { - return (((int (*)(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *)) - __libc_interposing[INTERPOS_pselect])(n, rs, ws, es, t, s)); + __libsys_interposing[INTERPOS_pselect])(n, rs, ws, es, t, s)); } diff --git a/lib/libc/sys/read.c b/lib/libc/sys/read.c index 266763257dd8..846e7185bc02 100644 --- a/lib/libc/sys/read.c +++ b/lib/libc/sys/read.c @@ -40,7 +40,6 @@ __weak_reference(__sys_read, __read); ssize_t read(int fd, void *buf, size_t nbytes) { - return (((ssize_t (*)(int, void *, size_t)) - __libc_interposing[INTERPOS_read])(fd, buf, nbytes)); + __libsys_interposing[INTERPOS_read])(fd, buf, nbytes)); } diff --git a/lib/libc/sys/readv.c b/lib/libc/sys/readv.c index 05c14b5dd030..5493f7964098 100644 --- a/lib/libc/sys/readv.c +++ b/lib/libc/sys/readv.c @@ -41,7 +41,6 @@ __weak_reference(__sys_readv, __readv); ssize_t readv(int fd, const struct iovec *iov, int iovcnt) { - return (((ssize_t (*)(int, const struct iovec *, int)) - __libc_interposing[INTERPOS_readv])(fd, iov, iovcnt)); + __libsys_interposing[INTERPOS_readv])(fd, iov, iovcnt)); } diff --git a/lib/libc/sys/recvfrom.c b/lib/libc/sys/recvfrom.c index dd5df99b8898..630b27404b7a 100644 --- a/lib/libc/sys/recvfrom.c +++ b/lib/libc/sys/recvfrom.c @@ -41,9 +41,8 @@ ssize_t recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr * __restrict from, socklen_t * __restrict fromlen) { - return (((ssize_t (*)(int, void *, size_t, int, struct sockaddr *, socklen_t *)) - __libc_interposing[INTERPOS_recvfrom])(s, buf, len, flags, + __libsys_interposing[INTERPOS_recvfrom])(s, buf, len, flags, from, fromlen)); } diff --git a/lib/libc/sys/recvmsg.c b/lib/libc/sys/recvmsg.c index db471f3fd5d3..69b71c54e636 100644 --- a/lib/libc/sys/recvmsg.c +++ b/lib/libc/sys/recvmsg.c @@ -40,7 +40,6 @@ __weak_reference(__sys_recvmsg, __recvmsg); ssize_t recvmsg(int s, struct msghdr *msg, int flags) { - return (((int (*)(int, struct msghdr *, int)) - __libc_interposing[INTERPOS_recvmsg])(s, msg, flags)); + __libsys_interposing[INTERPOS_recvmsg])(s, msg, flags)); } diff --git a/lib/libc/sys/select.c b/lib/libc/sys/select.c index a03079964d1c..4b5862f72100 100644 --- a/lib/libc/sys/select.c +++ b/lib/libc/sys/select.c @@ -39,7 +39,6 @@ __weak_reference(__sys_select, __select); int select(int n, fd_set *rs, fd_set *ws, fd_set *es, struct timeval *t) { - return (((int (*)(int, fd_set *, fd_set *, fd_set *, struct timeval *)) - __libc_interposing[INTERPOS_select])(n, rs, ws, es, t)); + __libsys_interposing[INTERPOS_select])(n, rs, ws, es, t)); } diff --git a/lib/libc/sys/sendmsg.c b/lib/libc/sys/sendmsg.c index b4f442e02bcb..769bb4d2d136 100644 --- a/lib/libc/sys/sendmsg.c +++ b/lib/libc/sys/sendmsg.c @@ -40,7 +40,6 @@ __weak_reference(__sys_sendmsg, __sendmsg); ssize_t sendmsg(int s, const struct msghdr *msg, int flags) { - return (((int (*)(int, const struct msghdr *, int)) - __libc_interposing[INTERPOS_sendmsg])(s, msg, flags)); + __libsys_interposing[INTERPOS_sendmsg])(s, msg, flags)); } diff --git a/lib/libc/sys/sendto.c b/lib/libc/sys/sendto.c index 2dbf466360cd..60104ba2e5c7 100644 --- a/lib/libc/sys/sendto.c +++ b/lib/libc/sys/sendto.c @@ -41,9 +41,8 @@ ssize_t sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) { - return (((ssize_t (*)(int, const void *, size_t, int, const struct sockaddr *, socklen_t)) - __libc_interposing[INTERPOS_sendto])(s, msg, len, flags, + __libsys_interposing[INTERPOS_sendto])(s, msg, len, flags, to, tolen)); } diff --git a/lib/libc/sys/setcontext.c b/lib/libc/sys/setcontext.c index 918377d61e66..734bd9c186fe 100644 --- a/lib/libc/sys/setcontext.c +++ b/lib/libc/sys/setcontext.c @@ -42,7 +42,6 @@ __sym_default(setcontext, setcontext, FBSD_1.2); int setcontext(const ucontext_t *uc) { - return (((int (*)(const ucontext_t *)) - __libc_interposing[INTERPOS_setcontext])(uc)); + __libsys_interposing[INTERPOS_setcontext])(uc)); } diff --git a/lib/libc/sys/sigaction.c b/lib/libc/sys/sigaction.c index 27f003e0eb48..4fa7b5d8699b 100644 --- a/lib/libc/sys/sigaction.c +++ b/lib/libc/sys/sigaction.c @@ -40,7 +40,6 @@ __weak_reference(sigaction, __libc_sigaction); int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) { - return (((int (*)(int, const struct sigaction *, struct sigaction *)) - __libc_interposing[INTERPOS_sigaction])(sig, act, oact)); + __libsys_interposing[INTERPOS_sigaction])(sig, act, oact)); } diff --git a/lib/libc/sys/sigprocmask.c b/lib/libc/sys/sigprocmask.c index 441cd2590c1f..c0d86de4b156 100644 --- a/lib/libc/sys/sigprocmask.c +++ b/lib/libc/sys/sigprocmask.c @@ -40,7 +40,6 @@ __weak_reference(sigprocmask, __libc_sigprocmask); int sigprocmask(int how, const sigset_t *set, sigset_t *oset) { - return (((int (*)(int, const sigset_t *, sigset_t *)) - __libc_interposing[INTERPOS_sigprocmask])(how, set, oset)); + __libsys_interposing[INTERPOS_sigprocmask])(how, set, oset)); } diff --git a/lib/libc/sys/sigsuspend.c b/lib/libc/sys/sigsuspend.c index 1de1e5e4089d..de57d645354d 100644 --- a/lib/libc/sys/sigsuspend.c +++ b/lib/libc/sys/sigsuspend.c @@ -40,7 +40,6 @@ __weak_reference(sigsuspend, __libc_sigsuspend); int sigsuspend(const sigset_t *set) { - return (((int (*)(const sigset_t *)) - __libc_interposing[INTERPOS_sigsuspend])(set)); + __libsys_interposing[INTERPOS_sigsuspend])(set)); } diff --git a/lib/libc/sys/sigtimedwait.c b/lib/libc/sys/sigtimedwait.c index 945a98e191ca..0cfcbb9811bc 100644 --- a/lib/libc/sys/sigtimedwait.c +++ b/lib/libc/sys/sigtimedwait.c @@ -40,8 +40,7 @@ int sigtimedwait(const sigset_t * __restrict set, siginfo_t * __restrict info, const struct timespec * __restrict t) { - return (((int (*)(const sigset_t *, siginfo_t *, const struct timespec *)) - __libc_interposing[INTERPOS_sigtimedwait])(set, info, t)); + __libsys_interposing[INTERPOS_sigtimedwait])(set, info, t)); } diff --git a/lib/libc/sys/sigwait.c b/lib/libc/sys/sigwait.c index 3ca16fb24102..4b863eb04db0 100644 --- a/lib/libc/sys/sigwait.c +++ b/lib/libc/sys/sigwait.c @@ -35,9 +35,8 @@ __weak_reference(__libc_sigwait, __sigwait); int sigwait(const sigset_t *set, int *sig) { - return (((int (*)(const sigset_t *, int *)) - __libc_interposing[INTERPOS_sigwait])(set, sig)); + __libsys_interposing[INTERPOS_sigwait])(set, sig)); } int diff --git a/lib/libc/sys/sigwaitinfo.c b/lib/libc/sys/sigwaitinfo.c index 06df1f67d0ef..277bd96a06a1 100644 --- a/lib/libc/sys/sigwaitinfo.c +++ b/lib/libc/sys/sigwaitinfo.c @@ -39,7 +39,6 @@ __weak_reference(__sys_sigwaitinfo, __sigwaitinfo); int sigwaitinfo(const sigset_t * __restrict set, siginfo_t * __restrict info) { - return (((int (*)(const sigset_t *, siginfo_t *)) - __libc_interposing[INTERPOS_sigwaitinfo])(set, info)); + __libsys_interposing[INTERPOS_sigwaitinfo])(set, info)); } diff --git a/lib/libc/sys/swapcontext.c b/lib/libc/sys/swapcontext.c index ea1942a31d5e..28f7c9f769a7 100644 --- a/lib/libc/sys/swapcontext.c +++ b/lib/libc/sys/swapcontext.c @@ -44,7 +44,6 @@ __sym_default(swapcontext, swapcontext, FBSD_1.2); int swapcontext(ucontext_t *oucp, const ucontext_t *ucp) { - return (((int (*)(ucontext_t *, const ucontext_t *)) - __libc_interposing[INTERPOS_swapcontext])(oucp, ucp)); + __libsys_interposing[INTERPOS_swapcontext])(oucp, ucp)); } diff --git a/lib/libc/sys/wait4.c b/lib/libc/sys/wait4.c index 2650b8932869..bbd866a8bb16 100644 --- a/lib/libc/sys/wait4.c +++ b/lib/libc/sys/wait4.c @@ -39,7 +39,6 @@ __weak_reference(__sys_wait4, __wait4); pid_t wait4(pid_t pid, int *status, int options, struct rusage *ru) { - return (((pid_t (*)(pid_t, int *, int, struct rusage *)) - __libc_interposing[INTERPOS_wait4])(pid, status, options, ru)); + __libsys_interposing[INTERPOS_wait4])(pid, status, options, ru)); } diff --git a/lib/libc/sys/wait6.c b/lib/libc/sys/wait6.c index f2610813ee2b..eab11d4a6212 100644 --- a/lib/libc/sys/wait6.c +++ b/lib/libc/sys/wait6.c @@ -41,8 +41,7 @@ pid_t wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *ru, siginfo_t *infop) { - return (((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *, - siginfo_t *))__libc_interposing[INTERPOS_wait6])(idtype, id, + siginfo_t *))__libsys_interposing[INTERPOS_wait6])(idtype, id, status, options, ru, infop)); } diff --git a/lib/libc/sys/write.c b/lib/libc/sys/write.c index b974dd055a84..5bb372c2b8f4 100644 --- a/lib/libc/sys/write.c +++ b/lib/libc/sys/write.c @@ -40,7 +40,6 @@ __weak_reference(__sys_write, __write); ssize_t write(int fd, const void *buf, size_t nbytes) { - return (((ssize_t (*)(int, const void *, size_t)) - __libc_interposing[INTERPOS_write])(fd, buf, nbytes)); + __libsys_interposing[INTERPOS_write])(fd, buf, nbytes)); } diff --git a/lib/libc/sys/writev.c b/lib/libc/sys/writev.c index a56d9389ddcc..d311cb075e3c 100644 --- a/lib/libc/sys/writev.c +++ b/lib/libc/sys/writev.c @@ -41,7 +41,6 @@ __weak_reference(__sys_writev, __writev); ssize_t writev(int fd, const struct iovec *iov, int iovcnt) { - return (((ssize_t (*)(int, const struct iovec *, int)) - __libc_interposing[INTERPOS_writev])(fd, iov, iovcnt)); + __libsys_interposing[INTERPOS_writev])(fd, iov, iovcnt)); } diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c index d68ca60e5993..31b686c1d064 100644 --- a/lib/libthr/thread/thr_syscalls.c +++ b/lib/libthr/thread/thr_syscalls.c @@ -644,6 +644,16 @@ __thr_interpose_libc(void) #define SLOT(name) \ *(__libc_interposing_slot(INTERPOS_##name)) = \ (interpos_func_t)__thr_##name; + SLOT(system); + SLOT(tcdrain); + SLOT(spinlock); + SLOT(spinunlock); + SLOT(map_stacks_exec); +#undef SLOT + +#define SLOT(name) \ + *(__libsys_interposing_slot(INTERPOS_##name)) = \ + (interpos_func_t)__thr_##name; SLOT(accept); SLOT(accept4); SLOT(aio_suspend); @@ -672,17 +682,12 @@ __thr_interpose_libc(void) SLOT(sigtimedwait); SLOT(sigwaitinfo); SLOT(swapcontext); - SLOT(system); - SLOT(tcdrain); SLOT(wait4); SLOT(write); SLOT(writev); - SLOT(spinlock); - SLOT(spinunlock); SLOT(kevent); SLOT(wait6); SLOT(ppoll); - SLOT(map_stacks_exec); SLOT(fdatasync); SLOT(clock_nanosleep); SLOT(pdfork); From nobody Mon Feb 5 20:38:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJ9s2zyVz58xqc; Mon, 5 Feb 2024 20:38: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 4TTJ9s1mcsz4pnS; Mon, 5 Feb 2024 20:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sBVHGIvZWh9i7lCwFgkfghvceu8deaxzTuTOJxASKTI=; b=xs6vAlZ2F6WgFnJgWpyH42I3yZnlDoQqPPAQlU8f0JSR/o0OlHkAjtHwFPXeZVij0R02yY NTurxOdP0WGp/6/k4hW2EivqyfjFm2T9YDH1NHgbPpwKI1RnNlJnioc9XWdQyOsx2kvkNE 9LRoojQ338HqrOgFHzPsQ/WC5+AhphlTzz1/bg0XF18UjWlYEurYpMJ41DByGM65XF2f0u IsxQtbxOd7xHPtkHD8AwAESiOyMMk10thl5LWUbGCVnVPdJnGSaES3OVJif2vEOyWxftjb 7DJCui27K2eetlzzJ6JhSaO/M/Shf7A5uYI+FNNxMKZzHaooRxe5ZymJanWaLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sBVHGIvZWh9i7lCwFgkfghvceu8deaxzTuTOJxASKTI=; b=g3kDKdNDBQR+2+c3nXzBwUGvMypxkI1B1raTyjf7KqeIvSz2makHtRYPBhLHTkvzaZvU1J m0d/I7M4h21aEEP+vscbsH0TL0VqjQzkvvtDLiDcxaRBwez+Xa6ZJnz/pChOFw2R8MWSdD uuekUyQnY+JbsN+FvQZx5629kKz6cpj+hoW5dxU6RZzTVUYWpT0dsgg3zih97wUZou5zQ7 sZgiBDrmfp/h1w4yux6kCMagNh/d3BR78meiAYyFmzODpRW3XticKUQBPVCp70TjaQNf5p xdB7znvcmvXvJNBPZCV4yvl9wQhmMwU7iEANPUnxSjBoSvPpY1j1zZfaWB/mnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165505; a=rsa-sha256; cv=none; b=L9zTMFJlwF/mIOAB0O0v5adQAeZIvyrfraEKiEG2EzwZekuSDVGzWBT7byDy/NeeSXZG0p sB6z+jEUsQe38aOTxixQkMr3gh9YzAYXOG6bbJCH2yVeFZjBnCWT4BxZgyK5NJGM0xVUZF QjX8jCqLfP4aP2YfHoMc+QBjmmWgqaVam19D91m4/rkBDMd7eAOWGecQ3QKeAS/ZDzSEeE TwKfM/97g3MgO9NkLoxRi/VNFlb/FFD/WJR71vIzsAkJwnmsc4F6GZqc2mXKaXgZmB24EO qX7RIl8y945T6ijZ3euLEbQl/JG4E9R/lxE/cSXSQYoaZYXbZ2Zi9z/V5vSS0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJ9s0WgFzvZQ; Mon, 5 Feb 2024 20:38: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 415KcOXa068855; Mon, 5 Feb 2024 20:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcOhN068852; Mon, 5 Feb 2024 20:38:24 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:24 GMT Message-Id: <202402052038.415KcOhN068852@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: 228d8c9efe1e - main - libc: split libc and syscall interposing (2/2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 228d8c9efe1e9a2946a5e64ff33362a54b9c3b5d Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=228d8c9efe1e9a2946a5e64ff33362a54b9c3b5d commit 228d8c9efe1e9a2946a5e64ff33362a54b9c3b5d Author: Brooks Davis AuthorDate: 2024-01-16 22:51:40 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libc: split libc and syscall interposing (2/2) Move the __libc_interposing implementation to libc/gen so it doesn't end up in libsys. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/gen/Makefile.inc | 1 + lib/libc/gen/Symbol.map | 2 ++ lib/libc/gen/libc_interposing_table.c | 56 +++++++++++++++++++++++++++++++++++ lib/libc/sys/Symbol.map | 1 - lib/libc/sys/interposing_table.c | 20 ------------- 5 files changed, 59 insertions(+), 21 deletions(-) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index f657bd949cb7..5c3f029586b8 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -98,6 +98,7 @@ SRCS+= __getosreldate.c \ kqueue1.c \ lcong48.c \ libc_dlopen.c \ + libc_interposing_table.c \ lockf.c \ lrand48.c \ memalign.c \ diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 51c7348c5cc4..ee23d6112e44 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -567,6 +567,8 @@ FBSDprivate_1.0 { __waitpid; _waitpid; + __libc_interposing_slot; + _libc_sem_init_compat; _libc_sem_destroy_compat; _libc_sem_open_compat; diff --git a/lib/libc/gen/libc_interposing_table.c b/lib/libc/gen/libc_interposing_table.c new file mode 100644 index 000000000000..6997dce86569 --- /dev/null +++ b/lib/libc/gen/libc_interposing_table.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2014 The FreeBSD Foundation. + * + * Portions of this software were developed by Konstantin Belousov + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) 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 "libc_private.h" + +#define SLOT(a, b) \ + [INTERPOS_##a] = (interpos_func_t)b +interpos_func_t __libc_interposing[INTERPOS_MAX] = { + SLOT(system, __libc_system), + SLOT(tcdrain, __libc_tcdrain), + SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub), + SLOT(spinlock, __libc_spinlock_stub), + SLOT(spinunlock, __libc_spinunlock_stub), + SLOT(map_stacks_exec, __libc_map_stacks_exec), + SLOT(distribute_static_tls, __libc_distribute_static_tls), +}; +#undef SLOT + +interpos_func_t * +__libc_interposing_slot(int interposno) +{ + /* XXX: forward compat. Remove after 15.0-RELEASE. */ + if (__libc_interposing[interposno] == NULL) + return (__libsys_interposing_slot(interposno)); + return (&__libc_interposing[interposno]); +} diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index ff35693d808d..3b207e59fec6 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -1049,7 +1049,6 @@ FBSDprivate_1.0 { __sys_writev; /* Things that aren't system calls (in sort(1) order) */ - __libc_interposing_slot; __libc_sigwait; __libsys_interposing_slot; __set_error_selector; diff --git a/lib/libc/sys/interposing_table.c b/lib/libc/sys/interposing_table.c index f7678a1352ff..4ee36da4c4c4 100644 --- a/lib/libc/sys/interposing_table.c +++ b/lib/libc/sys/interposing_table.c @@ -30,21 +30,10 @@ */ #include -#include #include "libc_private.h" #define SLOT(a, b) \ [INTERPOS_##a] = (interpos_func_t)b -interpos_func_t __libc_interposing[INTERPOS_MAX] = { - SLOT(system, __libc_system), - SLOT(tcdrain, __libc_tcdrain), - SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub), - SLOT(spinlock, __libc_spinlock_stub), - SLOT(spinunlock, __libc_spinunlock_stub), - SLOT(map_stacks_exec, __libc_map_stacks_exec), - SLOT(distribute_static_tls, __libc_distribute_static_tls), -}; - interpos_func_t __libsys_interposing[INTERPOS_MAX] = { SLOT(accept, __sys_accept), SLOT(accept4, __sys_accept4), @@ -86,15 +75,6 @@ interpos_func_t __libsys_interposing[INTERPOS_MAX] = { }; #undef SLOT -interpos_func_t * -__libc_interposing_slot(int interposno) -{ - /* XXX: forward compat. Remove after 15.0-RELEASE. */ - if (__libc_interposing[interposno] == NULL) - return (__libsys_interposing_slot(interposno)); - return (&__libc_interposing[interposno]); -} - interpos_func_t * __libsys_interposing_slot(int interposno) { From nobody Mon Feb 5 20:38:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJ9t4Fccz58xsS; Mon, 5 Feb 2024 20:38: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 4TTJ9t2bcbz4pt1; Mon, 5 Feb 2024 20:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6hj0YvI/Cg+H9FD/e7qoQAQbRNSZclsWauBmK34m50I=; b=brdy0dPOp9txc136Qy6V5FV0y0Y3K/rZtb4Ny22WLPRPXSVPhsVo+iWMoAdErnY9ZyBcXb WICav12ZEVSIPsBdzQNeYHtzVgdVXoO/fOZvWA1RRn4Qlg6Zo5/0nfaUpJKBkp6zsVW9dk g8Nybl9dtv78HZ6AQLwXz3LxsJwZ1YhiLy7EH12QIoX48ETg+42X3p0/AoPqJzw/6nodHR Nv1KIbc0kj2Y2Ju9V/OzGuNPjo5CUoTJihT9yFCkBSaexV4Rocfc0RntyivQD2ykddxF8s 6i/7HRyEYXIuYpu2in5aSfedSEoJzgVIGCq/hkIcWA8wSgj9K6Qhuoj0Y/8iFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6hj0YvI/Cg+H9FD/e7qoQAQbRNSZclsWauBmK34m50I=; b=My04i8/vVofiP2NtPED2AZcvyp9QOn/WoY5uWQcwhQFExld4mJHWNc+BTlv9K2iBdzwCHZ tzWKrPsrV8xRVY4i3LsRKceYq9xGKfgkNNTyO3BVbnQZjJV/A6t18bxX5FdKQLP9fqZ7sg mUVQBdQZEUsqXa7DLGoIbAO6RmFc395D/gg92KporBB/5SIpn5ke80iaH//QwlApdbOvmr Cd7pdrbUNbFo52blLhm2XkJeTCWdeTYn/9ixljz2WiAvzpIuXKOFrSfVqdMvXpmRriEstk fUfk8UBABea/cM/Iw9zQmAdplAyZZeOgMmcHpiP9N1KvLhngl9VX9UgoWwXbkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165506; a=rsa-sha256; cv=none; b=dqP3ovaM6BFbRy1Q7PgfbcSJtNwH+kZ07ct8gVUfgDtayyZ3/nzexpQ+Cg+ZJcjKkERjpl kadIN7Qn+vL7flnNKdXZ8agW68O6zLR0VudeobF/ENr8OXzOOv47m2wP0Huyma6nN+QwR7 830be4G0GIrNdSHOKAnR35KY9TvoXs7vOCPSmsfgImhu2nD2p4uZYLRde6muj44wESqMHN BrHMN5+QStaNm88fbBSop1HShOtab1VF0YI56rboeelPlfumMbeBqkTkvUDG8SJR/CpEwI qU80OlNTQ++lsLZmosWV+8IHBOAN7sEJyx+vnzzAQbJOaEeb9KnzMDnb1aoRtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJ9t1SVgzts8; Mon, 5 Feb 2024 20:38: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 415KcQ3u068903; Mon, 5 Feb 2024 20:38:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcQ3K068899; Mon, 5 Feb 2024 20:38:26 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:26 GMT Message-Id: <202402052038.415KcQ3K068899@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: 8269e7673cf0 - main - libsys: relocate implementations and manpages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8269e7673cf033aba67dab8264fe719920c70f87 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8269e7673cf033aba67dab8264fe719920c70f87 commit 8269e7673cf033aba67dab8264fe719920c70f87 Author: Brooks Davis AuthorDate: 2023-11-14 17:54:03 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libsys: relocate implementations and manpages Remove core system call implementations and documentation to lib/libsys and lib/libsys/ from lib/libc/sys and lib/libc//. Update paths to allow libc to find them in their new home. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/Makefile | 2 ++ lib/libc/powerpcspe/sys/Makefile.inc | 1 + lib/libc/sys/Makefile.inc | 5 +++-- lib/{libc/sys => libsys}/POSIX2x_Fork.c | 0 lib/{libc/sys/Symbol.map => libsys/Symbol.sys.map} | 0 lib/{libc/sys => libsys}/__error.c | 0 lib/{libc/sys => libsys}/__vdso_gettimeofday.c | 0 lib/{libc/sys => libsys}/_exit.2 | 0 lib/{libc/sys => libsys}/_umtx_op.2 | 0 lib/{libc => libsys}/aarch64/SYS.h | 0 lib/{libc/aarch64/sys => libsys/aarch64}/cerror.S | 0 lib/{libc/aarch64/sys => libsys/aarch64}/syscall.S | 0 lib/{libc/aarch64/sys => libsys/aarch64}/vfork.S | 0 lib/{libc/sys => libsys}/abort2.2 | 0 lib/{libc/sys => libsys}/accept.2 | 0 lib/{libc/sys => libsys}/accept.c | 0 lib/{libc/sys => libsys}/accept4.c | 0 lib/{libc/sys => libsys}/access.2 | 0 lib/{libc/sys => libsys}/acct.2 | 0 lib/{libc/sys => libsys}/adjtime.2 | 0 lib/{libc/sys => libsys}/aio_cancel.2 | 0 lib/{libc/sys => libsys}/aio_error.2 | 0 lib/{libc/sys => libsys}/aio_fsync.2 | 0 lib/{libc/sys => libsys}/aio_mlock.2 | 0 lib/{libc/sys => libsys}/aio_read.2 | 0 lib/{libc/sys => libsys}/aio_return.2 | 0 lib/{libc/sys => libsys}/aio_suspend.2 | 0 lib/{libc/sys => libsys}/aio_suspend.c | 0 lib/{libc/sys => libsys}/aio_waitcomplete.2 | 0 lib/{libc/sys => libsys}/aio_write.2 | 0 lib/{libc => libsys}/amd64/SYS.h | 0 lib/{libc/amd64/sys => libsys/amd64}/cerror.S | 0 lib/{libc/amd64/sys => libsys/amd64}/getcontext.S | 0 lib/{libc/amd64/sys => libsys/amd64}/vfork.S | 0 lib/{libc => libsys}/arm/SYS.h | 0 lib/{libc/arm/sys => libsys/arm}/cerror.S | 0 lib/{libc/arm/sys => libsys/arm}/syscall.S | 0 lib/{libc/arm/sys => libsys/arm}/vfork.S | 0 lib/{libc/sys => libsys}/bind.2 | 0 lib/{libc/sys => libsys}/bindat.2 | 0 lib/{libc/sys => libsys}/brk.2 | 0 lib/{libc/sys => libsys}/brk.c | 0 lib/{libc/sys => libsys}/cap_enter.2 | 0 lib/{libc/sys => libsys}/cap_fcntls_limit.2 | 0 lib/{libc/sys => libsys}/cap_ioctls_limit.2 | 0 lib/{libc/sys => libsys}/cap_rights_limit.2 | 0 lib/{libc/sys => libsys}/chdir.2 | 0 lib/{libc/sys => libsys}/chflags.2 | 0 lib/{libc/sys => libsys}/chmod.2 | 0 lib/{libc/sys => libsys}/chown.2 | 0 lib/{libc/sys => libsys}/chroot.2 | 0 lib/{libc/sys => libsys}/clock_gettime.2 | 0 lib/{libc/sys => libsys}/clock_gettime.c | 0 lib/{libc/sys => libsys}/clock_nanosleep.c | 0 lib/{libc/sys => libsys}/close.2 | 0 lib/{libc/sys => libsys}/close.c | 0 lib/{libc/sys => libsys}/closefrom.2 | 0 lib/{libc/sys => libsys}/closefrom.c | 0 lib/{libc/sys => libsys}/compat-stub.c | 0 lib/{libc/sys => libsys}/connect.2 | 0 lib/{libc/sys => libsys}/connect.c | 0 lib/{libc/sys => libsys}/connectat.2 | 0 lib/{libc/sys => libsys}/copy_file_range.2 | 0 lib/{libc/sys => libsys}/cpuset.2 | 0 lib/{libc/sys => libsys}/cpuset_getaffinity.2 | 0 lib/{libc/sys => libsys}/cpuset_getdomain.2 | 0 lib/{libc/sys => libsys}/dup.2 | 0 lib/{libc/sys => libsys}/eventfd.2 | 0 lib/{libc/sys => libsys}/execve.2 | 0 lib/{libc/sys => libsys}/extattr_get_file.2 | 0 lib/{libc/sys => libsys}/fcntl.2 | 0 lib/{libc/sys => libsys}/fcntl.c | 0 lib/{libc/sys => libsys}/fdatasync.c | 0 lib/{libc/sys => libsys}/ffclock.2 | 0 lib/{libc/sys => libsys}/fhlink.2 | 0 lib/{libc/sys => libsys}/fhopen.2 | 0 lib/{libc/sys => libsys}/fhreadlink.2 | 0 lib/{libc/sys => libsys}/flock.2 | 0 lib/{libc/sys => libsys}/fork.2 | 0 lib/{libc/sys => libsys}/fork.c | 0 lib/{libc/sys => libsys}/fspacectl.2 | 0 lib/{libc/sys => libsys}/fsync.2 | 0 lib/{libc/sys => libsys}/fsync.c | 0 lib/{libc/sys => libsys}/getdents.c | 0 lib/{libc/sys => libsys}/getdirentries.2 | 0 lib/{libc/sys => libsys}/getdtablesize.2 | 0 lib/{libc/sys => libsys}/getfh.2 | 0 lib/{libc/sys => libsys}/getfsstat.2 | 0 lib/{libc/sys => libsys}/getgid.2 | 0 lib/{libc/sys => libsys}/getgroups.2 | 0 lib/{libc/sys => libsys}/getitimer.2 | 0 lib/{libc/sys => libsys}/getlogin.2 | 0 lib/{libc/sys => libsys}/getloginclass.2 | 0 lib/{libc/sys => libsys}/getpeername.2 | 0 lib/{libc/sys => libsys}/getpgrp.2 | 0 lib/{libc/sys => libsys}/getpid.2 | 0 lib/{libc/sys => libsys}/getpriority.2 | 0 lib/{libc/sys => libsys}/getrandom.2 | 0 lib/{libc/sys => libsys}/getrlimit.2 | 0 lib/{libc/sys => libsys}/getrusage.2 | 0 lib/{libc/sys => libsys}/getsid.2 | 0 lib/{libc/sys => libsys}/getsockname.2 | 0 lib/{libc/sys => libsys}/getsockopt.2 | 0 lib/{libc/sys => libsys}/gettimeofday.2 | 0 lib/{libc/sys => libsys}/gettimeofday.c | 0 lib/{libc/sys => libsys}/getuid.2 | 0 lib/{libc => libsys}/i386/SYS.h | 0 lib/{libc/i386/sys => libsys/i386}/cerror.S | 0 lib/{libc/i386/sys => libsys/i386}/getcontext.S | 0 lib/{libc/i386/sys => libsys/i386}/syscall.S | 0 lib/{libc/i386/sys => libsys/i386}/vfork.S | 0 lib/{libc/sys => libsys}/interposing_table.c | 0 lib/{libc/sys => libsys}/intro.2 | 0 lib/{libc/sys => libsys}/ioctl.2 | 0 lib/{libc/sys => libsys}/issetugid.2 | 0 lib/{libc/sys => libsys}/jail.2 | 0 lib/{libc/sys => libsys}/kcmp.2 | 0 lib/{libc/sys => libsys}/kenv.2 | 0 lib/{libc/sys => libsys}/kevent.c | 0 lib/{libc/sys => libsys}/kill.2 | 0 lib/{libc/sys => libsys}/kldfind.2 | 0 lib/{libc/sys => libsys}/kldfirstmod.2 | 0 lib/{libc/sys => libsys}/kldload.2 | 0 lib/{libc/sys => libsys}/kldnext.2 | 0 lib/{libc/sys => libsys}/kldstat.2 | 0 lib/{libc/sys => libsys}/kldsym.2 | 0 lib/{libc/sys => libsys}/kldunload.2 | 0 lib/{libc/sys => libsys}/kqueue.2 | 0 lib/{libc/sys => libsys}/ktrace.2 | 0 lib/{libc/sys => libsys}/link.2 | 0 lib/{libc/sys => libsys}/lio_listio.2 | 0 lib/{libc/sys => libsys}/listen.2 | 0 lib/{libc/sys => libsys}/lseek.2 | 0 lib/{libc/sys => libsys}/lstat.c | 0 lib/{libc/sys => libsys}/madvise.2 | 0 lib/{libc/sys => libsys}/mincore.2 | 0 lib/{libc/sys => libsys}/minherit.2 | 0 lib/{libc/sys => libsys}/mkdir.2 | 0 lib/{libc/sys => libsys}/mkfifo.2 | 0 lib/{libc/sys => libsys}/mknod.2 | 0 lib/{libc/sys => libsys}/mknod.c | 0 lib/{libc/sys => libsys}/mlock.2 | 0 lib/{libc/sys => libsys}/mlockall.2 | 0 lib/{libc/sys => libsys}/mmap.2 | 0 lib/{libc/sys => libsys}/modfind.2 | 0 lib/{libc/sys => libsys}/modnext.2 | 0 lib/{libc/sys => libsys}/modstat.2 | 0 lib/{libc/sys => libsys}/mount.2 | 0 lib/{libc/sys => libsys}/mprotect.2 | 0 lib/{libc/sys => libsys}/mq_close.2 | 0 lib/{libc/sys => libsys}/mq_getattr.2 | 0 lib/{libc/sys => libsys}/mq_notify.2 | 0 lib/{libc/sys => libsys}/mq_open.2 | 0 lib/{libc/sys => libsys}/mq_receive.2 | 0 lib/{libc/sys => libsys}/mq_send.2 | 0 lib/{libc/sys => libsys}/mq_setattr.2 | 0 lib/{libc/sys => libsys}/mq_unlink.2 | 0 lib/{libc/sys => libsys}/msgctl.2 | 0 lib/{libc/sys => libsys}/msgget.2 | 0 lib/{libc/sys => libsys}/msgrcv.2 | 0 lib/{libc/sys => libsys}/msgsnd.2 | 0 lib/{libc/sys => libsys}/msync.2 | 0 lib/{libc/sys => libsys}/msync.c | 0 lib/{libc/sys => libsys}/munmap.2 | 0 lib/{libc/sys => libsys}/nanosleep.2 | 0 lib/{libc/sys => libsys}/nanosleep.c | 0 lib/{libc/sys => libsys}/nfssvc.2 | 0 lib/{libc/sys => libsys}/ntp_adjtime.2 | 0 lib/{libc/sys => libsys}/open.2 | 0 lib/{libc/sys => libsys}/open.c | 0 lib/{libc/sys => libsys}/openat.c | 0 lib/{libc/sys => libsys}/pathconf.2 | 0 lib/{libc/sys => libsys}/pdfork.2 | 0 lib/{libc/sys => libsys}/pdfork.c | 0 lib/{libc/sys => libsys}/pipe.2 | 0 lib/{libc/sys => libsys}/pipe.c | 0 lib/{libc/sys => libsys}/poll.2 | 0 lib/{libc/sys => libsys}/poll.c | 0 lib/{libc/sys => libsys}/posix_fadvise.2 | 0 lib/{libc/sys => libsys}/posix_fallocate.2 | 0 lib/{libc/sys => libsys}/posix_openpt.2 | 0 lib/{libc => libsys}/powerpc/SYS.h | 0 lib/{libc/powerpc/sys => libsys/powerpc}/cerror.S | 0 lib/{libc => libsys}/powerpc64/SYS.h | 0 lib/{libc/powerpc64/sys => libsys/powerpc64}/cerror.S | 0 lib/{libc/sys => libsys}/ppoll.c | 0 lib/{libc/sys => libsys}/procctl.2 | 0 lib/{libc/sys => libsys}/profil.2 | 0 lib/{libc/sys => libsys}/pselect.2 | 0 lib/{libc/sys => libsys}/pselect.c | 0 lib/{libc/sys => libsys}/ptrace.2 | 0 lib/{libc/sys => libsys}/ptrace.c | 0 lib/{libc/sys => libsys}/quotactl.2 | 0 lib/{libc/sys => libsys}/rctl_add_rule.2 | 0 lib/{libc/sys => libsys}/read.2 | 0 lib/{libc/sys => libsys}/read.c | 0 lib/{libc/sys => libsys}/readlink.2 | 0 lib/{libc/sys => libsys}/readv.c | 0 lib/{libc/sys => libsys}/reboot.2 | 0 lib/{libc/sys => libsys}/recv.2 | 0 lib/{libc/sys => libsys}/recvfrom.c | 0 lib/{libc/sys => libsys}/recvmsg.c | 0 lib/{libc/sys => libsys}/rename.2 | 0 lib/{libc/sys => libsys}/revoke.2 | 0 lib/{libc/sys => libsys}/rfork.2 | 0 lib/{libc => libsys}/riscv/SYS.h | 0 lib/{libc/riscv/sys => libsys/riscv}/cerror.S | 0 lib/{libc/riscv/sys => libsys/riscv}/syscall.S | 0 lib/{libc/riscv/sys => libsys/riscv}/vfork.S | 0 lib/{libc/sys => libsys}/rmdir.2 | 0 lib/{libc/sys => libsys}/rtprio.2 | 0 lib/{libc/sys => libsys}/sched_get_priority_max.2 | 0 lib/{libc/sys => libsys}/sched_setparam.2 | 0 lib/{libc/sys => libsys}/sched_setscheduler.2 | 0 lib/{libc/sys => libsys}/sched_yield.2 | 0 lib/{libc/sys => libsys}/sctp_generic_recvmsg.2 | 0 lib/{libc/sys => libsys}/sctp_generic_sendmsg.2 | 0 lib/{libc/sys => libsys}/sctp_peeloff.2 | 0 lib/{libc/sys => libsys}/select.2 | 0 lib/{libc/sys => libsys}/select.c | 0 lib/{libc/sys => libsys}/semctl.2 | 0 lib/{libc/sys => libsys}/semget.2 | 0 lib/{libc/sys => libsys}/semop.2 | 0 lib/{libc/sys => libsys}/send.2 | 0 lib/{libc/sys => libsys}/sendfile.2 | 0 lib/{libc/sys => libsys}/sendmsg.c | 0 lib/{libc/sys => libsys}/sendto.c | 0 lib/{libc/sys => libsys}/setcontext.c | 0 lib/{libc/sys => libsys}/setfib.2 | 0 lib/{libc/sys => libsys}/setgroups.2 | 0 lib/{libc/sys => libsys}/setpgid.2 | 0 lib/{libc/sys => libsys}/setregid.2 | 0 lib/{libc/sys => libsys}/setresuid.2 | 0 lib/{libc/sys => libsys}/setreuid.2 | 0 lib/{libc/sys => libsys}/setsid.2 | 0 lib/{libc/sys => libsys}/setuid.2 | 0 lib/{libc/sys => libsys}/shm_open.2 | 0 lib/{libc/sys => libsys}/shm_open.c | 0 lib/{libc/sys => libsys}/shmat.2 | 0 lib/{libc/sys => libsys}/shmctl.2 | 0 lib/{libc/sys => libsys}/shmget.2 | 0 lib/{libc/sys => libsys}/shutdown.2 | 0 lib/{libc/sys => libsys}/sigaction.2 | 0 lib/{libc/sys => libsys}/sigaction.c | 0 lib/{libc/sys => libsys}/sigaltstack.2 | 0 lib/{libc/sys => libsys}/sigfastblock.2 | 0 lib/{libc/sys => libsys}/sigpending.2 | 0 lib/{libc/sys => libsys}/sigprocmask.2 | 0 lib/{libc/sys => libsys}/sigprocmask.c | 0 lib/{libc/sys => libsys}/sigqueue.2 | 0 lib/{libc/sys => libsys}/sigreturn.2 | 0 lib/{libc/sys => libsys}/sigstack.2 | 0 lib/{libc/sys => libsys}/sigsuspend.2 | 0 lib/{libc/sys => libsys}/sigsuspend.c | 0 lib/{libc/sys => libsys}/sigtimedwait.c | 0 lib/{libc/sys => libsys}/sigwait.2 | 0 lib/{libc/sys => libsys}/sigwait.c | 0 lib/{libc/sys => libsys}/sigwaitinfo.2 | 0 lib/{libc/sys => libsys}/sigwaitinfo.c | 0 lib/{libc/sys => libsys}/socket.2 | 0 lib/{libc/sys => libsys}/socketpair.2 | 0 lib/{libc/sys => libsys}/stat.2 | 0 lib/{libc/sys => libsys}/stat.c | 0 lib/{libc/sys => libsys}/statfs.2 | 0 lib/{libc/sys => libsys}/swapcontext.c | 0 lib/{libc/sys => libsys}/swapon.2 | 0 lib/{libc/sys => libsys}/symlink.2 | 0 lib/{libc/sys => libsys}/sync.2 | 0 lib/{libc/sys => libsys}/sysarch.2 | 0 lib/{libc/sys => libsys}/syscall.2 | 0 lib/{libc/sys => libsys}/thr_exit.2 | 0 lib/{libc/sys => libsys}/thr_kill.2 | 0 lib/{libc/sys => libsys}/thr_new.2 | 0 lib/{libc/sys => libsys}/thr_self.2 | 0 lib/{libc/sys => libsys}/thr_set_name.2 | 0 lib/{libc/sys => libsys}/thr_suspend.2 | 0 lib/{libc/sys => libsys}/thr_wake.2 | 0 lib/{libc/sys => libsys}/timer_create.2 | 0 lib/{libc/sys => libsys}/timer_delete.2 | 0 lib/{libc/sys => libsys}/timer_settime.2 | 0 lib/{libc/sys => libsys}/timerfd.2 | 0 lib/{libc/sys => libsys}/truncate.2 | 0 lib/{libc/sys => libsys}/umask.2 | 0 lib/{libc/sys => libsys}/undelete.2 | 0 lib/{libc/sys => libsys}/unlink.2 | 0 lib/{libc/sys => libsys}/utimensat.2 | 0 lib/{libc/sys => libsys}/utimes.2 | 0 lib/{libc/sys => libsys}/utrace.2 | 0 lib/{libc/sys => libsys}/uuidgen.2 | 0 lib/{libc/sys => libsys}/vadvise.c | 0 lib/{libc/sys => libsys}/vfork.2 | 0 lib/{libc/sys => libsys}/wait.2 | 0 lib/{libc/sys => libsys}/wait4.c | 0 lib/{libc/sys => libsys}/wait6.c | 0 lib/{libc/sys => libsys}/write.2 | 0 lib/{libc/sys => libsys}/write.c | 0 lib/{libc/sys => libsys}/writev.c | 0 297 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 1f256449ffce..f96dddbf99f6 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -5,6 +5,7 @@ SHLIBDIR?= /lib .include LIBC_SRCTOP?= ${.CURDIR} +LIBSYS_SRCTOP?= ${.CURDIR:H}/libsys # Pick the current architecture directory for libc. In general, this is named # MACHINE_CPUARCH, but some ABIs are different enough to require their own libc, @@ -38,6 +39,7 @@ SHLIB_LDSCRIPT_LINKS=libxnet.so WARNS?= 2 CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} +CFLAGS+=-I${LIBSYS_SRCTOP}/${LIBC_ARCH} .if ${MK_NLS} != "no" CFLAGS+=-DNLS .endif diff --git a/lib/libc/powerpcspe/sys/Makefile.inc b/lib/libc/powerpcspe/sys/Makefile.inc index 328c43d2b1ca..70662c94db0b 100644 --- a/lib/libc/powerpcspe/sys/Makefile.inc +++ b/lib/libc/powerpcspe/sys/Makefile.inc @@ -1,2 +1,3 @@ .PATH: ${LIBC_SRCTOP}/powerpc/sys +.PATH: ${LIBSYS_SRCTOP}/powerpc .sinclude "${LIBC_SRCTOP}/powerpc/sys/Makefile.inc" diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index b533443f96b2..2c7472ebad06 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,6 +1,7 @@ # sys sources -.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/sys ${LIBC_SRCTOP}/sys +.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/sys +.PATH: ${LIBSYS_SRCTOP}/${LIBC_ARCH} ${LIBSYS_SRCTOP} # Include the generated makefile containing the *complete* list # of syscall names in MIASM. @@ -109,7 +110,7 @@ SPSEUDO= ${PSEUDO:S/.o/.S/} SRCS+= ${SASM} ${SPSEUDO} -SYM_MAPS+= ${LIBC_SRCTOP}/sys/Symbol.map +SYM_MAPS+= ${LIBSYS_SRCTOP}/Symbol.sys.map # Generated files CLEANFILES+= ${SASM} ${SPSEUDO} diff --git a/lib/libc/sys/POSIX2x_Fork.c b/lib/libsys/POSIX2x_Fork.c similarity index 100% rename from lib/libc/sys/POSIX2x_Fork.c rename to lib/libsys/POSIX2x_Fork.c diff --git a/lib/libc/sys/Symbol.map b/lib/libsys/Symbol.sys.map similarity index 100% rename from lib/libc/sys/Symbol.map rename to lib/libsys/Symbol.sys.map diff --git a/lib/libc/sys/__error.c b/lib/libsys/__error.c similarity index 100% rename from lib/libc/sys/__error.c rename to lib/libsys/__error.c diff --git a/lib/libc/sys/__vdso_gettimeofday.c b/lib/libsys/__vdso_gettimeofday.c similarity index 100% rename from lib/libc/sys/__vdso_gettimeofday.c rename to lib/libsys/__vdso_gettimeofday.c diff --git a/lib/libc/sys/_exit.2 b/lib/libsys/_exit.2 similarity index 100% rename from lib/libc/sys/_exit.2 rename to lib/libsys/_exit.2 diff --git a/lib/libc/sys/_umtx_op.2 b/lib/libsys/_umtx_op.2 similarity index 100% rename from lib/libc/sys/_umtx_op.2 rename to lib/libsys/_umtx_op.2 diff --git a/lib/libc/aarch64/SYS.h b/lib/libsys/aarch64/SYS.h similarity index 100% rename from lib/libc/aarch64/SYS.h rename to lib/libsys/aarch64/SYS.h diff --git a/lib/libc/aarch64/sys/cerror.S b/lib/libsys/aarch64/cerror.S similarity index 100% rename from lib/libc/aarch64/sys/cerror.S rename to lib/libsys/aarch64/cerror.S diff --git a/lib/libc/aarch64/sys/syscall.S b/lib/libsys/aarch64/syscall.S similarity index 100% rename from lib/libc/aarch64/sys/syscall.S rename to lib/libsys/aarch64/syscall.S diff --git a/lib/libc/aarch64/sys/vfork.S b/lib/libsys/aarch64/vfork.S similarity index 100% rename from lib/libc/aarch64/sys/vfork.S rename to lib/libsys/aarch64/vfork.S diff --git a/lib/libc/sys/abort2.2 b/lib/libsys/abort2.2 similarity index 100% rename from lib/libc/sys/abort2.2 rename to lib/libsys/abort2.2 diff --git a/lib/libc/sys/accept.2 b/lib/libsys/accept.2 similarity index 100% rename from lib/libc/sys/accept.2 rename to lib/libsys/accept.2 diff --git a/lib/libc/sys/accept.c b/lib/libsys/accept.c similarity index 100% rename from lib/libc/sys/accept.c rename to lib/libsys/accept.c diff --git a/lib/libc/sys/accept4.c b/lib/libsys/accept4.c similarity index 100% rename from lib/libc/sys/accept4.c rename to lib/libsys/accept4.c diff --git a/lib/libc/sys/access.2 b/lib/libsys/access.2 similarity index 100% rename from lib/libc/sys/access.2 rename to lib/libsys/access.2 diff --git a/lib/libc/sys/acct.2 b/lib/libsys/acct.2 similarity index 100% rename from lib/libc/sys/acct.2 rename to lib/libsys/acct.2 diff --git a/lib/libc/sys/adjtime.2 b/lib/libsys/adjtime.2 similarity index 100% rename from lib/libc/sys/adjtime.2 rename to lib/libsys/adjtime.2 diff --git a/lib/libc/sys/aio_cancel.2 b/lib/libsys/aio_cancel.2 similarity index 100% rename from lib/libc/sys/aio_cancel.2 rename to lib/libsys/aio_cancel.2 diff --git a/lib/libc/sys/aio_error.2 b/lib/libsys/aio_error.2 similarity index 100% rename from lib/libc/sys/aio_error.2 rename to lib/libsys/aio_error.2 diff --git a/lib/libc/sys/aio_fsync.2 b/lib/libsys/aio_fsync.2 similarity index 100% rename from lib/libc/sys/aio_fsync.2 rename to lib/libsys/aio_fsync.2 diff --git a/lib/libc/sys/aio_mlock.2 b/lib/libsys/aio_mlock.2 similarity index 100% rename from lib/libc/sys/aio_mlock.2 rename to lib/libsys/aio_mlock.2 diff --git a/lib/libc/sys/aio_read.2 b/lib/libsys/aio_read.2 similarity index 100% rename from lib/libc/sys/aio_read.2 rename to lib/libsys/aio_read.2 diff --git a/lib/libc/sys/aio_return.2 b/lib/libsys/aio_return.2 similarity index 100% rename from lib/libc/sys/aio_return.2 rename to lib/libsys/aio_return.2 diff --git a/lib/libc/sys/aio_suspend.2 b/lib/libsys/aio_suspend.2 similarity index 100% rename from lib/libc/sys/aio_suspend.2 rename to lib/libsys/aio_suspend.2 diff --git a/lib/libc/sys/aio_suspend.c b/lib/libsys/aio_suspend.c similarity index 100% rename from lib/libc/sys/aio_suspend.c rename to lib/libsys/aio_suspend.c diff --git a/lib/libc/sys/aio_waitcomplete.2 b/lib/libsys/aio_waitcomplete.2 similarity index 100% rename from lib/libc/sys/aio_waitcomplete.2 rename to lib/libsys/aio_waitcomplete.2 diff --git a/lib/libc/sys/aio_write.2 b/lib/libsys/aio_write.2 similarity index 100% rename from lib/libc/sys/aio_write.2 rename to lib/libsys/aio_write.2 diff --git a/lib/libc/amd64/SYS.h b/lib/libsys/amd64/SYS.h similarity index 100% rename from lib/libc/amd64/SYS.h rename to lib/libsys/amd64/SYS.h diff --git a/lib/libc/amd64/sys/cerror.S b/lib/libsys/amd64/cerror.S similarity index 100% rename from lib/libc/amd64/sys/cerror.S rename to lib/libsys/amd64/cerror.S diff --git a/lib/libc/amd64/sys/getcontext.S b/lib/libsys/amd64/getcontext.S similarity index 100% rename from lib/libc/amd64/sys/getcontext.S rename to lib/libsys/amd64/getcontext.S diff --git a/lib/libc/amd64/sys/vfork.S b/lib/libsys/amd64/vfork.S similarity index 100% rename from lib/libc/amd64/sys/vfork.S rename to lib/libsys/amd64/vfork.S diff --git a/lib/libc/arm/SYS.h b/lib/libsys/arm/SYS.h similarity index 100% rename from lib/libc/arm/SYS.h rename to lib/libsys/arm/SYS.h diff --git a/lib/libc/arm/sys/cerror.S b/lib/libsys/arm/cerror.S similarity index 100% rename from lib/libc/arm/sys/cerror.S rename to lib/libsys/arm/cerror.S diff --git a/lib/libc/arm/sys/syscall.S b/lib/libsys/arm/syscall.S similarity index 100% rename from lib/libc/arm/sys/syscall.S rename to lib/libsys/arm/syscall.S diff --git a/lib/libc/arm/sys/vfork.S b/lib/libsys/arm/vfork.S similarity index 100% rename from lib/libc/arm/sys/vfork.S rename to lib/libsys/arm/vfork.S diff --git a/lib/libc/sys/bind.2 b/lib/libsys/bind.2 similarity index 100% rename from lib/libc/sys/bind.2 rename to lib/libsys/bind.2 diff --git a/lib/libc/sys/bindat.2 b/lib/libsys/bindat.2 similarity index 100% rename from lib/libc/sys/bindat.2 rename to lib/libsys/bindat.2 diff --git a/lib/libc/sys/brk.2 b/lib/libsys/brk.2 similarity index 100% rename from lib/libc/sys/brk.2 rename to lib/libsys/brk.2 diff --git a/lib/libc/sys/brk.c b/lib/libsys/brk.c similarity index 100% rename from lib/libc/sys/brk.c rename to lib/libsys/brk.c diff --git a/lib/libc/sys/cap_enter.2 b/lib/libsys/cap_enter.2 similarity index 100% rename from lib/libc/sys/cap_enter.2 rename to lib/libsys/cap_enter.2 diff --git a/lib/libc/sys/cap_fcntls_limit.2 b/lib/libsys/cap_fcntls_limit.2 similarity index 100% rename from lib/libc/sys/cap_fcntls_limit.2 rename to lib/libsys/cap_fcntls_limit.2 diff --git a/lib/libc/sys/cap_ioctls_limit.2 b/lib/libsys/cap_ioctls_limit.2 similarity index 100% rename from lib/libc/sys/cap_ioctls_limit.2 rename to lib/libsys/cap_ioctls_limit.2 diff --git a/lib/libc/sys/cap_rights_limit.2 b/lib/libsys/cap_rights_limit.2 similarity index 100% rename from lib/libc/sys/cap_rights_limit.2 rename to lib/libsys/cap_rights_limit.2 diff --git a/lib/libc/sys/chdir.2 b/lib/libsys/chdir.2 similarity index 100% rename from lib/libc/sys/chdir.2 rename to lib/libsys/chdir.2 diff --git a/lib/libc/sys/chflags.2 b/lib/libsys/chflags.2 similarity index 100% rename from lib/libc/sys/chflags.2 rename to lib/libsys/chflags.2 diff --git a/lib/libc/sys/chmod.2 b/lib/libsys/chmod.2 similarity index 100% rename from lib/libc/sys/chmod.2 rename to lib/libsys/chmod.2 diff --git a/lib/libc/sys/chown.2 b/lib/libsys/chown.2 similarity index 100% rename from lib/libc/sys/chown.2 rename to lib/libsys/chown.2 diff --git a/lib/libc/sys/chroot.2 b/lib/libsys/chroot.2 similarity index 100% rename from lib/libc/sys/chroot.2 rename to lib/libsys/chroot.2 diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libsys/clock_gettime.2 similarity index 100% rename from lib/libc/sys/clock_gettime.2 rename to lib/libsys/clock_gettime.2 diff --git a/lib/libc/sys/clock_gettime.c b/lib/libsys/clock_gettime.c similarity index 100% rename from lib/libc/sys/clock_gettime.c rename to lib/libsys/clock_gettime.c diff --git a/lib/libc/sys/clock_nanosleep.c b/lib/libsys/clock_nanosleep.c similarity index 100% rename from lib/libc/sys/clock_nanosleep.c rename to lib/libsys/clock_nanosleep.c diff --git a/lib/libc/sys/close.2 b/lib/libsys/close.2 similarity index 100% rename from lib/libc/sys/close.2 rename to lib/libsys/close.2 diff --git a/lib/libc/sys/close.c b/lib/libsys/close.c similarity index 100% rename from lib/libc/sys/close.c rename to lib/libsys/close.c diff --git a/lib/libc/sys/closefrom.2 b/lib/libsys/closefrom.2 similarity index 100% rename from lib/libc/sys/closefrom.2 rename to lib/libsys/closefrom.2 diff --git a/lib/libc/sys/closefrom.c b/lib/libsys/closefrom.c similarity index 100% rename from lib/libc/sys/closefrom.c rename to lib/libsys/closefrom.c diff --git a/lib/libc/sys/compat-stub.c b/lib/libsys/compat-stub.c similarity index 100% rename from lib/libc/sys/compat-stub.c rename to lib/libsys/compat-stub.c diff --git a/lib/libc/sys/connect.2 b/lib/libsys/connect.2 similarity index 100% rename from lib/libc/sys/connect.2 rename to lib/libsys/connect.2 diff --git a/lib/libc/sys/connect.c b/lib/libsys/connect.c similarity index 100% rename from lib/libc/sys/connect.c rename to lib/libsys/connect.c diff --git a/lib/libc/sys/connectat.2 b/lib/libsys/connectat.2 similarity index 100% rename from lib/libc/sys/connectat.2 rename to lib/libsys/connectat.2 diff --git a/lib/libc/sys/copy_file_range.2 b/lib/libsys/copy_file_range.2 similarity index 100% rename from lib/libc/sys/copy_file_range.2 rename to lib/libsys/copy_file_range.2 diff --git a/lib/libc/sys/cpuset.2 b/lib/libsys/cpuset.2 similarity index 100% rename from lib/libc/sys/cpuset.2 rename to lib/libsys/cpuset.2 diff --git a/lib/libc/sys/cpuset_getaffinity.2 b/lib/libsys/cpuset_getaffinity.2 similarity index 100% rename from lib/libc/sys/cpuset_getaffinity.2 rename to lib/libsys/cpuset_getaffinity.2 diff --git a/lib/libc/sys/cpuset_getdomain.2 b/lib/libsys/cpuset_getdomain.2 similarity index 100% rename from lib/libc/sys/cpuset_getdomain.2 rename to lib/libsys/cpuset_getdomain.2 diff --git a/lib/libc/sys/dup.2 b/lib/libsys/dup.2 similarity index 100% rename from lib/libc/sys/dup.2 rename to lib/libsys/dup.2 diff --git a/lib/libc/sys/eventfd.2 b/lib/libsys/eventfd.2 similarity index 100% rename from lib/libc/sys/eventfd.2 rename to lib/libsys/eventfd.2 diff --git a/lib/libc/sys/execve.2 b/lib/libsys/execve.2 similarity index 100% rename from lib/libc/sys/execve.2 rename to lib/libsys/execve.2 diff --git a/lib/libc/sys/extattr_get_file.2 b/lib/libsys/extattr_get_file.2 similarity index 100% rename from lib/libc/sys/extattr_get_file.2 rename to lib/libsys/extattr_get_file.2 diff --git a/lib/libc/sys/fcntl.2 b/lib/libsys/fcntl.2 similarity index 100% rename from lib/libc/sys/fcntl.2 rename to lib/libsys/fcntl.2 diff --git a/lib/libc/sys/fcntl.c b/lib/libsys/fcntl.c similarity index 100% rename from lib/libc/sys/fcntl.c rename to lib/libsys/fcntl.c diff --git a/lib/libc/sys/fdatasync.c b/lib/libsys/fdatasync.c similarity index 100% rename from lib/libc/sys/fdatasync.c rename to lib/libsys/fdatasync.c diff --git a/lib/libc/sys/ffclock.2 b/lib/libsys/ffclock.2 similarity index 100% rename from lib/libc/sys/ffclock.2 rename to lib/libsys/ffclock.2 diff --git a/lib/libc/sys/fhlink.2 b/lib/libsys/fhlink.2 similarity index 100% rename from lib/libc/sys/fhlink.2 rename to lib/libsys/fhlink.2 diff --git a/lib/libc/sys/fhopen.2 b/lib/libsys/fhopen.2 similarity index 100% rename from lib/libc/sys/fhopen.2 rename to lib/libsys/fhopen.2 diff --git a/lib/libc/sys/fhreadlink.2 b/lib/libsys/fhreadlink.2 similarity index 100% rename from lib/libc/sys/fhreadlink.2 rename to lib/libsys/fhreadlink.2 diff --git a/lib/libc/sys/flock.2 b/lib/libsys/flock.2 similarity index 100% rename from lib/libc/sys/flock.2 rename to lib/libsys/flock.2 diff --git a/lib/libc/sys/fork.2 b/lib/libsys/fork.2 similarity index 100% rename from lib/libc/sys/fork.2 rename to lib/libsys/fork.2 diff --git a/lib/libc/sys/fork.c b/lib/libsys/fork.c similarity index 100% rename from lib/libc/sys/fork.c rename to lib/libsys/fork.c diff --git a/lib/libc/sys/fspacectl.2 b/lib/libsys/fspacectl.2 similarity index 100% rename from lib/libc/sys/fspacectl.2 rename to lib/libsys/fspacectl.2 diff --git a/lib/libc/sys/fsync.2 b/lib/libsys/fsync.2 similarity index 100% rename from lib/libc/sys/fsync.2 rename to lib/libsys/fsync.2 diff --git a/lib/libc/sys/fsync.c b/lib/libsys/fsync.c similarity index 100% rename from lib/libc/sys/fsync.c rename to lib/libsys/fsync.c diff --git a/lib/libc/sys/getdents.c b/lib/libsys/getdents.c similarity index 100% rename from lib/libc/sys/getdents.c rename to lib/libsys/getdents.c diff --git a/lib/libc/sys/getdirentries.2 b/lib/libsys/getdirentries.2 similarity index 100% rename from lib/libc/sys/getdirentries.2 rename to lib/libsys/getdirentries.2 diff --git a/lib/libc/sys/getdtablesize.2 b/lib/libsys/getdtablesize.2 similarity index 100% rename from lib/libc/sys/getdtablesize.2 rename to lib/libsys/getdtablesize.2 diff --git a/lib/libc/sys/getfh.2 b/lib/libsys/getfh.2 similarity index 100% rename from lib/libc/sys/getfh.2 rename to lib/libsys/getfh.2 diff --git a/lib/libc/sys/getfsstat.2 b/lib/libsys/getfsstat.2 similarity index 100% rename from lib/libc/sys/getfsstat.2 rename to lib/libsys/getfsstat.2 diff --git a/lib/libc/sys/getgid.2 b/lib/libsys/getgid.2 similarity index 100% rename from lib/libc/sys/getgid.2 rename to lib/libsys/getgid.2 diff --git a/lib/libc/sys/getgroups.2 b/lib/libsys/getgroups.2 similarity index 100% rename from lib/libc/sys/getgroups.2 rename to lib/libsys/getgroups.2 diff --git a/lib/libc/sys/getitimer.2 b/lib/libsys/getitimer.2 similarity index 100% rename from lib/libc/sys/getitimer.2 rename to lib/libsys/getitimer.2 diff --git a/lib/libc/sys/getlogin.2 b/lib/libsys/getlogin.2 similarity index 100% rename from lib/libc/sys/getlogin.2 rename to lib/libsys/getlogin.2 diff --git a/lib/libc/sys/getloginclass.2 b/lib/libsys/getloginclass.2 similarity index 100% rename from lib/libc/sys/getloginclass.2 rename to lib/libsys/getloginclass.2 diff --git a/lib/libc/sys/getpeername.2 b/lib/libsys/getpeername.2 similarity index 100% rename from lib/libc/sys/getpeername.2 rename to lib/libsys/getpeername.2 diff --git a/lib/libc/sys/getpgrp.2 b/lib/libsys/getpgrp.2 similarity index 100% rename from lib/libc/sys/getpgrp.2 rename to lib/libsys/getpgrp.2 diff --git a/lib/libc/sys/getpid.2 b/lib/libsys/getpid.2 similarity index 100% rename from lib/libc/sys/getpid.2 rename to lib/libsys/getpid.2 diff --git a/lib/libc/sys/getpriority.2 b/lib/libsys/getpriority.2 similarity index 100% rename from lib/libc/sys/getpriority.2 rename to lib/libsys/getpriority.2 diff --git a/lib/libc/sys/getrandom.2 b/lib/libsys/getrandom.2 similarity index 100% rename from lib/libc/sys/getrandom.2 rename to lib/libsys/getrandom.2 diff --git a/lib/libc/sys/getrlimit.2 b/lib/libsys/getrlimit.2 similarity index 100% rename from lib/libc/sys/getrlimit.2 rename to lib/libsys/getrlimit.2 diff --git a/lib/libc/sys/getrusage.2 b/lib/libsys/getrusage.2 similarity index 100% rename from lib/libc/sys/getrusage.2 rename to lib/libsys/getrusage.2 diff --git a/lib/libc/sys/getsid.2 b/lib/libsys/getsid.2 similarity index 100% rename from lib/libc/sys/getsid.2 rename to lib/libsys/getsid.2 diff --git a/lib/libc/sys/getsockname.2 b/lib/libsys/getsockname.2 similarity index 100% rename from lib/libc/sys/getsockname.2 rename to lib/libsys/getsockname.2 diff --git a/lib/libc/sys/getsockopt.2 b/lib/libsys/getsockopt.2 similarity index 100% rename from lib/libc/sys/getsockopt.2 rename to lib/libsys/getsockopt.2 diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libsys/gettimeofday.2 similarity index 100% rename from lib/libc/sys/gettimeofday.2 rename to lib/libsys/gettimeofday.2 diff --git a/lib/libc/sys/gettimeofday.c b/lib/libsys/gettimeofday.c similarity index 100% rename from lib/libc/sys/gettimeofday.c rename to lib/libsys/gettimeofday.c diff --git a/lib/libc/sys/getuid.2 b/lib/libsys/getuid.2 similarity index 100% rename from lib/libc/sys/getuid.2 rename to lib/libsys/getuid.2 diff --git a/lib/libc/i386/SYS.h b/lib/libsys/i386/SYS.h similarity index 100% rename from lib/libc/i386/SYS.h rename to lib/libsys/i386/SYS.h diff --git a/lib/libc/i386/sys/cerror.S b/lib/libsys/i386/cerror.S similarity index 100% rename from lib/libc/i386/sys/cerror.S rename to lib/libsys/i386/cerror.S diff --git a/lib/libc/i386/sys/getcontext.S b/lib/libsys/i386/getcontext.S similarity index 100% rename from lib/libc/i386/sys/getcontext.S rename to lib/libsys/i386/getcontext.S diff --git a/lib/libc/i386/sys/syscall.S b/lib/libsys/i386/syscall.S similarity index 100% rename from lib/libc/i386/sys/syscall.S rename to lib/libsys/i386/syscall.S diff --git a/lib/libc/i386/sys/vfork.S b/lib/libsys/i386/vfork.S similarity index 100% rename from lib/libc/i386/sys/vfork.S rename to lib/libsys/i386/vfork.S diff --git a/lib/libc/sys/interposing_table.c b/lib/libsys/interposing_table.c similarity index 100% rename from lib/libc/sys/interposing_table.c rename to lib/libsys/interposing_table.c diff --git a/lib/libc/sys/intro.2 b/lib/libsys/intro.2 similarity index 100% rename from lib/libc/sys/intro.2 rename to lib/libsys/intro.2 diff --git a/lib/libc/sys/ioctl.2 b/lib/libsys/ioctl.2 similarity index 100% rename from lib/libc/sys/ioctl.2 rename to lib/libsys/ioctl.2 diff --git a/lib/libc/sys/issetugid.2 b/lib/libsys/issetugid.2 similarity index 100% rename from lib/libc/sys/issetugid.2 rename to lib/libsys/issetugid.2 diff --git a/lib/libc/sys/jail.2 b/lib/libsys/jail.2 similarity index 100% rename from lib/libc/sys/jail.2 rename to lib/libsys/jail.2 diff --git a/lib/libc/sys/kcmp.2 b/lib/libsys/kcmp.2 similarity index 100% rename from lib/libc/sys/kcmp.2 rename to lib/libsys/kcmp.2 diff --git a/lib/libc/sys/kenv.2 b/lib/libsys/kenv.2 similarity index 100% rename from lib/libc/sys/kenv.2 rename to lib/libsys/kenv.2 diff --git a/lib/libc/sys/kevent.c b/lib/libsys/kevent.c similarity index 100% rename from lib/libc/sys/kevent.c rename to lib/libsys/kevent.c diff --git a/lib/libc/sys/kill.2 b/lib/libsys/kill.2 similarity index 100% rename from lib/libc/sys/kill.2 rename to lib/libsys/kill.2 diff --git a/lib/libc/sys/kldfind.2 b/lib/libsys/kldfind.2 similarity index 100% rename from lib/libc/sys/kldfind.2 rename to lib/libsys/kldfind.2 diff --git a/lib/libc/sys/kldfirstmod.2 b/lib/libsys/kldfirstmod.2 similarity index 100% rename from lib/libc/sys/kldfirstmod.2 rename to lib/libsys/kldfirstmod.2 diff --git a/lib/libc/sys/kldload.2 b/lib/libsys/kldload.2 similarity index 100% rename from lib/libc/sys/kldload.2 rename to lib/libsys/kldload.2 diff --git a/lib/libc/sys/kldnext.2 b/lib/libsys/kldnext.2 similarity index 100% rename from lib/libc/sys/kldnext.2 rename to lib/libsys/kldnext.2 diff --git a/lib/libc/sys/kldstat.2 b/lib/libsys/kldstat.2 similarity index 100% rename from lib/libc/sys/kldstat.2 rename to lib/libsys/kldstat.2 diff --git a/lib/libc/sys/kldsym.2 b/lib/libsys/kldsym.2 similarity index 100% rename from lib/libc/sys/kldsym.2 rename to lib/libsys/kldsym.2 diff --git a/lib/libc/sys/kldunload.2 b/lib/libsys/kldunload.2 similarity index 100% rename from lib/libc/sys/kldunload.2 rename to lib/libsys/kldunload.2 diff --git a/lib/libc/sys/kqueue.2 b/lib/libsys/kqueue.2 similarity index 100% rename from lib/libc/sys/kqueue.2 rename to lib/libsys/kqueue.2 diff --git a/lib/libc/sys/ktrace.2 b/lib/libsys/ktrace.2 similarity index 100% rename from lib/libc/sys/ktrace.2 rename to lib/libsys/ktrace.2 diff --git a/lib/libc/sys/link.2 b/lib/libsys/link.2 similarity index 100% rename from lib/libc/sys/link.2 rename to lib/libsys/link.2 diff --git a/lib/libc/sys/lio_listio.2 b/lib/libsys/lio_listio.2 similarity index 100% rename from lib/libc/sys/lio_listio.2 rename to lib/libsys/lio_listio.2 diff --git a/lib/libc/sys/listen.2 b/lib/libsys/listen.2 similarity index 100% rename from lib/libc/sys/listen.2 rename to lib/libsys/listen.2 diff --git a/lib/libc/sys/lseek.2 b/lib/libsys/lseek.2 similarity index 100% rename from lib/libc/sys/lseek.2 rename to lib/libsys/lseek.2 diff --git a/lib/libc/sys/lstat.c b/lib/libsys/lstat.c similarity index 100% rename from lib/libc/sys/lstat.c rename to lib/libsys/lstat.c diff --git a/lib/libc/sys/madvise.2 b/lib/libsys/madvise.2 similarity index 100% rename from lib/libc/sys/madvise.2 rename to lib/libsys/madvise.2 diff --git a/lib/libc/sys/mincore.2 b/lib/libsys/mincore.2 similarity index 100% rename from lib/libc/sys/mincore.2 rename to lib/libsys/mincore.2 diff --git a/lib/libc/sys/minherit.2 b/lib/libsys/minherit.2 similarity index 100% rename from lib/libc/sys/minherit.2 rename to lib/libsys/minherit.2 diff --git a/lib/libc/sys/mkdir.2 b/lib/libsys/mkdir.2 similarity index 100% rename from lib/libc/sys/mkdir.2 rename to lib/libsys/mkdir.2 diff --git a/lib/libc/sys/mkfifo.2 b/lib/libsys/mkfifo.2 similarity index 100% rename from lib/libc/sys/mkfifo.2 rename to lib/libsys/mkfifo.2 diff --git a/lib/libc/sys/mknod.2 b/lib/libsys/mknod.2 similarity index 100% rename from lib/libc/sys/mknod.2 rename to lib/libsys/mknod.2 diff --git a/lib/libc/sys/mknod.c b/lib/libsys/mknod.c similarity index 100% rename from lib/libc/sys/mknod.c rename to lib/libsys/mknod.c diff --git a/lib/libc/sys/mlock.2 b/lib/libsys/mlock.2 similarity index 100% rename from lib/libc/sys/mlock.2 rename to lib/libsys/mlock.2 diff --git a/lib/libc/sys/mlockall.2 b/lib/libsys/mlockall.2 similarity index 100% rename from lib/libc/sys/mlockall.2 rename to lib/libsys/mlockall.2 diff --git a/lib/libc/sys/mmap.2 b/lib/libsys/mmap.2 similarity index 100% rename from lib/libc/sys/mmap.2 rename to lib/libsys/mmap.2 diff --git a/lib/libc/sys/modfind.2 b/lib/libsys/modfind.2 similarity index 100% rename from lib/libc/sys/modfind.2 rename to lib/libsys/modfind.2 diff --git a/lib/libc/sys/modnext.2 b/lib/libsys/modnext.2 similarity index 100% rename from lib/libc/sys/modnext.2 rename to lib/libsys/modnext.2 diff --git a/lib/libc/sys/modstat.2 b/lib/libsys/modstat.2 similarity index 100% rename from lib/libc/sys/modstat.2 rename to lib/libsys/modstat.2 diff --git a/lib/libc/sys/mount.2 b/lib/libsys/mount.2 similarity index 100% rename from lib/libc/sys/mount.2 rename to lib/libsys/mount.2 diff --git a/lib/libc/sys/mprotect.2 b/lib/libsys/mprotect.2 similarity index 100% rename from lib/libc/sys/mprotect.2 rename to lib/libsys/mprotect.2 diff --git a/lib/libc/sys/mq_close.2 b/lib/libsys/mq_close.2 similarity index 100% rename from lib/libc/sys/mq_close.2 rename to lib/libsys/mq_close.2 diff --git a/lib/libc/sys/mq_getattr.2 b/lib/libsys/mq_getattr.2 similarity index 100% rename from lib/libc/sys/mq_getattr.2 rename to lib/libsys/mq_getattr.2 diff --git a/lib/libc/sys/mq_notify.2 b/lib/libsys/mq_notify.2 similarity index 100% rename from lib/libc/sys/mq_notify.2 rename to lib/libsys/mq_notify.2 diff --git a/lib/libc/sys/mq_open.2 b/lib/libsys/mq_open.2 similarity index 100% rename from lib/libc/sys/mq_open.2 rename to lib/libsys/mq_open.2 diff --git a/lib/libc/sys/mq_receive.2 b/lib/libsys/mq_receive.2 similarity index 100% rename from lib/libc/sys/mq_receive.2 rename to lib/libsys/mq_receive.2 diff --git a/lib/libc/sys/mq_send.2 b/lib/libsys/mq_send.2 similarity index 100% rename from lib/libc/sys/mq_send.2 rename to lib/libsys/mq_send.2 diff --git a/lib/libc/sys/mq_setattr.2 b/lib/libsys/mq_setattr.2 similarity index 100% rename from lib/libc/sys/mq_setattr.2 rename to lib/libsys/mq_setattr.2 diff --git a/lib/libc/sys/mq_unlink.2 b/lib/libsys/mq_unlink.2 similarity index 100% rename from lib/libc/sys/mq_unlink.2 rename to lib/libsys/mq_unlink.2 diff --git a/lib/libc/sys/msgctl.2 b/lib/libsys/msgctl.2 similarity index 100% *** 558 LINES SKIPPED *** From nobody Mon Feb 5 20:38:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJ9v5QKkz58xp5; Mon, 5 Feb 2024 20:38: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 4TTJ9v3R7Vz4pwD; Mon, 5 Feb 2024 20:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fb42y+o++PicqosW6n4aWh966sIgq/jkL7xeubYalE0=; b=TJ1qdioRF3X48vexYbiIN4bawCMyjws19GnV2NN7rxYo0uBSlWGmB1BonZR4TfDWiRCy0n Gyxik44oJjXR6Xoga4QeUwldRPvFYCqRqm+iD7rvAkWu4qeJ0N3lVlEqBBw3+ee2v08aWx gLsmNh+/8G11R+kc7Vksq4BYxG08wxo7QDnHR826t2SmVWDYxVdbBIJuXI05fW/wgTS1q5 /2ko0mcpCS8b4eG04jlA05TNKE9QH2HE8c91zvMD5y82kV/tHD+lP6a/PLB/zLJ8bokD04 TbtxsV2I750l/YT0BCB5uwI+X1IKjsqqr0Q6xfyvWzW173b/S6hrRsi+QgALOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fb42y+o++PicqosW6n4aWh966sIgq/jkL7xeubYalE0=; b=i1Xg/5dOTQaLXWfoq3P2eO5LIpXKwZr5eq4J1U7Tp4uKjxADWkC61rghfAPmzvA0kEYMEs DzH9mcmp9QCDIndTSCFXdRkLm3UpSIiRf5+OryQvdyhiRahG61qaf5dbJjd5zsRSfRUJQ8 coY/UFRakfhSWkHhkCwFidTm9/lXXJy88khWGj7MqdCaXAbf9s4UPTlqA0FkDUOpGKBWiB nTlsVScvide7Y3FmaqOoIB60xP++nq4jsOPGcKbZJslmvLvROh2bPUMH7guoj3PinSDBFK ot0Evy6LVHhrUvPA0OWxxgbWHI26pNfDiyfood9EhC4sa+oi6th87+aWNWjcMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165507; a=rsa-sha256; cv=none; b=E2thyF3yOl4scp7tcGf3ohjbgo/Jlvr786wSUHblwacvxh26XKIPPMnuhQ9P7IRt5asG9e W+wLa+5QmK4pchkDHiye4lKrqPI5UnQcDlbgmsfOZvfMVbeR2gefPq7Y+x4N78fV5s2HPC NhjaNFKg42VaVVClSNvIQMtfc1ExZ6UDjeAQ9jMrJNwIkJ+IpevyMJm0XukfdvU5vAbBYM DlzLav08QFE6TtS9tgjqqXw1k5akq6/q2FUL93R0LnEWW5IGQk4PU9IdwIPGCb/TgzD5zn wKAkheqadNUbp1cyeZ/YA5bgHdWa8CrQhB7Ff3txBikj8uAeGy9WdYtlOczy9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJ9v2PhVzvP3; Mon, 5 Feb 2024 20:38: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 415KcR38068943; Mon, 5 Feb 2024 20:38:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcRKv068940; Mon, 5 Feb 2024 20:38:27 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:27 GMT Message-Id: <202402052038.415KcRKv068940@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: 8f529310bd09 - main - libc: libc/sys/Makefile.inc -> libsys/Makefile.sys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f529310bd09c064d5d69740f03c6fe6f12650a3 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8f529310bd09c064d5d69740f03c6fe6f12650a3 commit 8f529310bd09c064d5d69740f03c6fe6f12650a3 Author: Brooks Davis AuthorDate: 2023-11-14 20:19:10 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libc: libc/sys/Makefile.inc -> libsys/Makefile.sys Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/Makefile | 2 +- lib/{libc/sys/Makefile.inc => libsys/Makefile.sys} | 0 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index f96dddbf99f6..2662d8b6aad0 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -114,7 +114,7 @@ NOASM= .include "${LIBC_SRCTOP}/stdlib/Makefile.inc" .include "${LIBC_SRCTOP}/stdtime/Makefile.inc" .include "${LIBC_SRCTOP}/string/Makefile.inc" -.include "${LIBC_SRCTOP}/sys/Makefile.inc" +.include "${LIBSYS_SRCTOP}/Makefile.sys" .include "${LIBC_SRCTOP}/secure/Makefile.inc" .include "${LIBC_SRCTOP}/rpc/Makefile.inc" .include "${LIBC_SRCTOP}/uuid/Makefile.inc" diff --git a/lib/libc/sys/Makefile.inc b/lib/libsys/Makefile.sys similarity index 100% rename from lib/libc/sys/Makefile.inc rename to lib/libsys/Makefile.sys From nobody Mon Feb 5 20:38:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJ9x0yMLz58xsX; Mon, 5 Feb 2024 20:38: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 4TTJ9w4M8Mz4pjG; Mon, 5 Feb 2024 20:38:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iMlaY48XJ33qagnGRY2OvWnLEGO51LOMSmCd7LWxZ5Y=; b=o488bmkLqRVyio2zNxy5vSuFwG8Nmp3OuG1nY/W1RugRdHzmr6he8X0Zj82DZpk+FDaNhW jTceBN6OINCBxUw3hAALS0A5kFLc294bkc9qJ2XTSgKPBqI742n2N8UMug5MPz3MdQu3RY eo4ViUmw/RJYn1vS9+6N4dj7YYZAVAqTu45b5vf6KaHV2K7e/yT8dATcUFcICt2CX46Hci Q8TytAiNxyPPdsuOtujPaF82aiIQpl1X2ya0ffilvr9cCZKTScpsYY0tH0nJjzFjqxkVCg jKtJGJIZWpeggsPeQY2FA0O5bBzW/5IlK2uzjBg/A4dtLd1nlT/X/hh0a119yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iMlaY48XJ33qagnGRY2OvWnLEGO51LOMSmCd7LWxZ5Y=; b=I/fcLLUZu/+RnLMwsZV2AbuZKn0exQKhv87KCr+ruu+bpBpVvFf2Cipths6AmRLod0P41Y w0OF05AeziQVHSxoKwTsh99TyYzrX3nhAoH3Sy5HgTxhgE8i8iKjvL1MADbniAoLEtbEM1 Iyqw1nUqGWYrNTdhvAAyvGjhW3zJXYnQkQ1Sh4cHzWD/L0ng+0AaYQA5HSYxuM/ShvSRjT ar5pvSB/yrPvKljLCnYd+7D+IO4ejjs34oFtv2qP0AGfFVfZV897VV8jw57m33Dy4eiVDG 016KiHYOBbGDm79NVuVMinHzwEqL7YfgThL6gwxFOcCbXqkyyX3W+hcGPc8yXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165508; a=rsa-sha256; cv=none; b=Vma8OPCh7HYNtQO67vKKJDsMRGQJF7ycP35QTCxDVFodsj9jsgKOYfFkTFcvG54ajo1DYk mgy1b9rtSjwQvo3oJNb8/9WrA/o3cxHMZZZ68JAagjU1x0sKxaTAxxviEHEPW2pQUq0uLZ FXlj8YfAmuqMLSGfngJQQJk5tKp3Q55lry9q5SIt38xn5dY+FagbRpB3PmWRikZkOtPD/W zxSCWaQCRGeDeaU4Ckqh+R1KJTVab2Cs6jhb0Y6X/d36Y0NvFU84yawXVhaW1P8dlhcFPv mTNKjU01ZuWkS15l+QTiHqDKe7QnT+0O/ZxsPaE+6aJQQkY+zWsJ1wEx7jZdBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJ9w3BW8zts9; Mon, 5 Feb 2024 20:38: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 415KcScp068984; Mon, 5 Feb 2024 20:38:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcSQu068981; Mon, 5 Feb 2024 20:38:28 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:28 GMT Message-Id: <202402052038.415KcSQu068981@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: 29d079c96491 - main - libsys: move __libsys_interposer consumers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29d079c9649174a36a87a26d1f99e3c0b3e78e0c Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=29d079c9649174a36a87a26d1f99e3c0b3e78e0c commit 29d079c9649174a36a87a26d1f99e3c0b3e78e0c Author: Brooks Davis AuthorDate: 2024-01-16 22:25:07 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libsys: move __libsys_interposer consumers These system call wrappers call interposed system calls in fairly trivial ways. Move them over to libsys so all __libsys_interposer consumers end up in libsys. Also move recvmmsg and sendmmsg as they are documented with recv and send. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/compat-43/Makefile.inc | 4 ++-- lib/libc/gen/Makefile.inc | 14 -------------- lib/libc/net/Makefile.inc | 2 +- lib/libsys/Makefile.sys | 10 ++++++++++ lib/{libc/compat-43 => libsys}/creat.2 | 0 lib/{libc/compat-43 => libsys}/creat.c | 0 lib/{libc/gen => libsys}/lockf.c | 0 lib/{libc/net => libsys}/recv.c | 0 lib/{libc/gen => libsys}/recvmmsg.c | 0 lib/{libc/net => libsys}/send.c | 0 lib/{libc/gen => libsys}/sendmmsg.c | 0 lib/{libc/gen => libsys}/sleep.c | 0 lib/{libc/gen => libsys}/usleep.c | 0 lib/{libc/gen => libsys}/wait.c | 0 lib/{libc/gen => libsys}/wait3.c | 0 lib/{libc/gen => libsys}/waitid.c | 0 lib/{libc/gen => libsys}/waitpid.c | 0 17 files changed, 13 insertions(+), 17 deletions(-) diff --git a/lib/libc/compat-43/Makefile.inc b/lib/libc/compat-43/Makefile.inc index f0b385e8372c..b0fcd0d4af8b 100644 --- a/lib/libc/compat-43/Makefile.inc +++ b/lib/libc/compat-43/Makefile.inc @@ -2,12 +2,12 @@ # compat-43 sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/compat-43 ${LIBC_SRCTOP}/compat-43 -SRCS+= creat.c gethostid.c getwd.c killpg.c sethostid.c setpgrp.c \ +SRCS+= gethostid.c getwd.c killpg.c sethostid.c setpgrp.c \ setrgid.c setruid.c sigcompat.c SYM_MAPS+=${LIBC_SRCTOP}/compat-43/Symbol.map -MAN+= creat.2 killpg.2 sigpause.2 sigsetmask.2 sigvec.2 +MAN+= killpg.2 sigpause.2 sigsetmask.2 sigvec.2 MAN+= gethostid.3 setruid.3 MLINKS+=gethostid.3 sethostid.3 diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 5c3f029586b8..b7eb92090722 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -99,7 +99,6 @@ SRCS+= __getosreldate.c \ lcong48.c \ libc_dlopen.c \ libc_interposing_table.c \ - lockf.c \ lrand48.c \ memalign.c \ memfd_create.c \ @@ -121,7 +120,6 @@ SRCS+= __getosreldate.c \ readdir.c \ readdir-compat11.c \ readpassphrase.c \ - recvmmsg.c \ rewinddir.c \ scandir.c \ scandir_b.c \ @@ -131,7 +129,6 @@ SRCS+= __getosreldate.c \ seed48.c \ seekdir.c \ semctl.c \ - sendmmsg.c \ setdomainname.c \ sethostname.c \ setjmperr.c \ @@ -142,7 +139,6 @@ SRCS+= __getosreldate.c \ siglist.c \ signal.c \ sigsetops.c \ - sleep.c \ srand48.c \ statvfs.c \ stringlist.c \ @@ -166,14 +162,9 @@ SRCS+= __getosreldate.c \ ulimit.c \ uname.c \ unvis-compat.c \ - usleep.c \ utime.c \ utxdb.c \ valloc.c \ - wait.c \ - wait3.c \ - waitpid.c \ - waitid.c \ wordexp.c CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20 @@ -267,7 +258,6 @@ MAN+= alarm.3 \ initgroups.3 \ isgreater.3 \ ldexp.3 \ - lockf.3 \ makecontext.3 \ modf.3 \ nice.3 \ @@ -304,7 +294,6 @@ MAN+= alarm.3 \ siginterrupt.3 \ signal.3 \ sigsetops.3 \ - sleep.3 \ statvfs.3 \ stringlist.3 \ strtofflags.3 \ @@ -330,7 +319,6 @@ MAN+= alarm.3 \ ulimit.3 \ uname.3 \ unvis.3 \ - usleep.3 \ utime.3 \ valloc.3 \ vis.3 \ @@ -501,7 +489,6 @@ MLINKS+=rand48.3 _rand48.3 \ rand48.3 nrand48.3 \ rand48.3 seed48.3 \ rand48.3 srand48.3 -MLINKS+=recv.2 recvmmsg.2 MLINKS+=scandir.3 alphasort.3 \ scandir.3 scandirat.3 \ scandir.3 scandir_b.3 \ @@ -510,7 +497,6 @@ MLINKS+=sem_open.3 sem_close.3 \ sem_open.3 sem_unlink.3 MLINKS+=sem_wait.3 sem_trywait.3 MLINKS+=sem_timedwait.3 sem_clockwait_np.3 -MLINKS+=send.2 sendmmsg.2 MLINKS+=setjmp.3 _longjmp.3 \ setjmp.3 _setjmp.3 \ setjmp.3 longjmp.3 \ diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index d75d42fb0679..1305500176a3 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -12,7 +12,7 @@ SRCS+= base64.c ether_addr.c eui64.c \ if_indextoname.c if_nameindex.c if_nametoindex.c \ ip6opt.c linkaddr.c map_v4v6.c name6.c ntoh.c \ nsdispatch.c nslexer.l nsparser.y nss_compat.c \ - rcmd.c rcmdsh.c recv.c rthdr.c sctp_sys_calls.c send.c \ + rcmd.c rcmdsh.c rthdr.c sctp_sys_calls.c \ sockatmark.c sourcefilter.c vars.c .if ${MK_NS_CACHING} != "no" diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 2c7472ebad06..42409c35121b 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -34,6 +34,10 @@ SRCS+= \ SRCS+= getdents.c lstat.c mknod.c stat.c +SRCS+= creat.c +SRCS+= lockf.c sleep.c usleep.c wait.c wait3.c waitpid.c waitid.c +SRCS+= recv.c recvmmsg.c send.c sendmmsg.c + NOASM+= sched_getcpu.o PSEUDO+= _sched_getcpu.o @@ -177,6 +181,7 @@ MAN+= abort2.2 \ cpuset.2 \ cpuset_getaffinity.2 \ cpuset_getdomain.2 \ + creat.2 \ dup.2 \ eventfd.2 \ execve.2 \ @@ -356,6 +361,11 @@ MAN+= abort2.2 \ write.2 \ _umtx_op.2 +MAN+= \ + lockf.3 \ + sleep.3 \ + usleep.3 + MLINKS+=aio_read.2 aio_readv.2 MLINKS+=aio_write.2 aio_writev.2 MLINKS+=accept.2 accept4.2 diff --git a/lib/libc/compat-43/creat.2 b/lib/libsys/creat.2 similarity index 100% rename from lib/libc/compat-43/creat.2 rename to lib/libsys/creat.2 diff --git a/lib/libc/compat-43/creat.c b/lib/libsys/creat.c similarity index 100% rename from lib/libc/compat-43/creat.c rename to lib/libsys/creat.c diff --git a/lib/libc/gen/lockf.c b/lib/libsys/lockf.c similarity index 100% rename from lib/libc/gen/lockf.c rename to lib/libsys/lockf.c diff --git a/lib/libc/net/recv.c b/lib/libsys/recv.c similarity index 100% rename from lib/libc/net/recv.c rename to lib/libsys/recv.c diff --git a/lib/libc/gen/recvmmsg.c b/lib/libsys/recvmmsg.c similarity index 100% rename from lib/libc/gen/recvmmsg.c rename to lib/libsys/recvmmsg.c diff --git a/lib/libc/net/send.c b/lib/libsys/send.c similarity index 100% rename from lib/libc/net/send.c rename to lib/libsys/send.c diff --git a/lib/libc/gen/sendmmsg.c b/lib/libsys/sendmmsg.c similarity index 100% rename from lib/libc/gen/sendmmsg.c rename to lib/libsys/sendmmsg.c diff --git a/lib/libc/gen/sleep.c b/lib/libsys/sleep.c similarity index 100% rename from lib/libc/gen/sleep.c rename to lib/libsys/sleep.c diff --git a/lib/libc/gen/usleep.c b/lib/libsys/usleep.c similarity index 100% rename from lib/libc/gen/usleep.c rename to lib/libsys/usleep.c diff --git a/lib/libc/gen/wait.c b/lib/libsys/wait.c similarity index 100% rename from lib/libc/gen/wait.c rename to lib/libsys/wait.c diff --git a/lib/libc/gen/wait3.c b/lib/libsys/wait3.c similarity index 100% rename from lib/libc/gen/wait3.c rename to lib/libsys/wait3.c diff --git a/lib/libc/gen/waitid.c b/lib/libsys/waitid.c similarity index 100% rename from lib/libc/gen/waitid.c rename to lib/libsys/waitid.c diff --git a/lib/libc/gen/waitpid.c b/lib/libsys/waitpid.c similarity index 100% rename from lib/libc/gen/waitpid.c rename to lib/libsys/waitpid.c From nobody Mon Feb 5 20:38:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJ9y0Wnzz58y02; Mon, 5 Feb 2024 20:38: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 4TTJ9x51hvz4q2M; Mon, 5 Feb 2024 20:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qhHFGUX6ummtmhCNZPSCSnTbn10JFillqJH727gtEpg=; b=nM8uE46R8xX+sNXUG0N0jGyK3D73rry4pApKbDdR2TG0Hmn9rJSZ3J5Hm0qcFbaxsqmhnR 6/W/BEiTba1xeDe3jgGlMMaF9Z7vqPPzpAqOYPdmUv36TuGkU8xjaJZO+5v530VrndN9OD gu4ccFvvZYnJWvIBXMqpOG+19Kzs6WdMn95ZLE+espLaxPK3QZ8B0ZVDGLLtmQAdFg0KC1 KTAPniuLnTm6oH0Rkvt3iNhv7h1FCtDJINaOqYRD5plKx0Z2ejtL443KH0fzMeCi8EpFNr YGaWEpM6itvUxu0ioHWWKJLSy4WjcTsBNwJfCHfQ2D2ROFL+DAjq6N+aCHxRJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qhHFGUX6ummtmhCNZPSCSnTbn10JFillqJH727gtEpg=; b=r6QtUFcCpTOR4Si9l/baiuElYYkb05gIpw3PxCwlCNpwk21JcbMBM8lp+NUVZMMTxZzelS 2UVLnm8QNGx1kj0IR2QA7qjT6u+efGMcYu1PADz6FlyHBKE6jHEmNxX9DYXRWGtUrXVIgk UdjaB2NKH+pUCtPjQg8OWyUEY/zhPSUFRik3JcHfx/cp2mU5+JfEiVb4CiGonLCRACO+iR S4GsSqcaUsh0/4cciEYdIGZP/0+zaQH2PzOhtSZkKPNpM2YMPbYkgjg9n47GbxguMMZR6V V+C+MojjbzXpuXcuSkCNFQjYfQV1UjfCXxBScOSbBCJAmhkdCaf5C6i9I+4Keg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165509; a=rsa-sha256; cv=none; b=ObhDAYarL2UIupKji16gKylZNNYl6SASB7XxYYvPh1h/K4Yj7R6qMMyatptevNcuEpmfpx deY29nmpCdFDy+sPi8VO+WpqZKWpYkzvluwXyRbfqBJwr1LwVhJ/DFZ3oeC4PbFMG32f+f /XluNJFWjU3+eXPg3y+CUo7YWro3hBWK4MND+xusALqDc0+Jk4jUqL7XUvrn3DbY7YHx1x qXUzvmXDxPkdbgMCWm6Fp17u3ZcXTVF6gTZqV0EopmyrWFZyaOGVxjXu5osAAwXs9OiT8D 1wHb/iiNc6Q0HMBdD+VeNW4/0H8Ha0Lx1VqfD/JZACLBUFagQf+R6HRlB80Hyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJ9x46dlzvm1; Mon, 5 Feb 2024 20:38: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 415KcTYn069023; Mon, 5 Feb 2024 20:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcTRg069020; Mon, 5 Feb 2024 20:38:29 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:29 GMT Message-Id: <202402052038.415KcTRg069020@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: 84dd0c080ba5 - main - libc: libc/gen/sched_getcpu_gen.c -> libsys/ List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84dd0c080ba5ddf67a54e9eb070fe5174ffead19 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=84dd0c080ba5ddf67a54e9eb070fe5174ffead19 commit 84dd0c080ba5ddf67a54e9eb070fe5174ffead19 Author: Brooks Davis AuthorDate: 2023-11-14 21:35:01 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libc: libc/gen/sched_getcpu_gen.c -> libsys/ It is a trivial system call wrapper. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/x86/sys/Makefile.inc | 1 + lib/{libc/gen => libsys}/sched_getcpu_gen.c | 0 2 files changed, 1 insertion(+) diff --git a/lib/libc/x86/sys/Makefile.inc b/lib/libc/x86/sys/Makefile.inc index cbc28773ab79..05d07ee5552a 100644 --- a/lib/libc/x86/sys/Makefile.inc +++ b/lib/libc/x86/sys/Makefile.inc @@ -1,4 +1,5 @@ .PATH: ${LIBC_SRCTOP}/x86/sys +.PATH: ${LIBSYS_SRCTOP}/x86 SRCS+= \ __vdso_gettc.c \ diff --git a/lib/libc/gen/sched_getcpu_gen.c b/lib/libsys/sched_getcpu_gen.c similarity index 100% rename from lib/libc/gen/sched_getcpu_gen.c rename to lib/libsys/sched_getcpu_gen.c From nobody Mon Feb 5 20:38:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJ9z3DgJz58y06; Mon, 5 Feb 2024 20:38: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 4TTJ9y6z9Fz4q06; Mon, 5 Feb 2024 20:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g/j+vCRc06tndkT7rrZJshZ6D4WAXTHhy08Oye/8qfE=; b=HLbI1qzhpNw59vAawM62extiZaAR8FdKmWENY+U/F0enHumQh9LwROVecZHMrS9vsbHjc3 LMmiDFmRbqXmuTYpMUSkQkJOpJbceJ3pdURKZFNuROYoZTDsLv4fZrgGMZfLVg/UPeffSI 0fgdUkCJbe4cj7nRwl33ILTDYYgPdFpbBX/bCMXvvsXlu1I80PXtp6NNmgpuYfpBNkZxuY HMqJLxTqEo7yfEuPvCCaG5OP1H0mMwR0E5yLPJ/RKhvIhvEYQd2lwGGjvgqaDgZpjADF44 cTppC1gjnK7/O5Or7xSPkZoPKnFwsxI0CuKIxkk+k0SGc5ehDSaFhCKvlvKSUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g/j+vCRc06tndkT7rrZJshZ6D4WAXTHhy08Oye/8qfE=; b=aMJVWxYETGzUWYj1Qs9NHi7WWVVbE8McrqZJjRDXlXjbmifsvFcmNw4sanqPPQf/zGhyxo zQ14mfEGmftA6omtOzbVAVw/oR+jvY2eRlCtm4w0W76NvFbQ5p3BRaAIxEGfpxSoZVefMf V+Zpsj+I1cSjfRL9pbLj68F88uesYVWAUdnCNM/R49ghiIdoBtB/i4XXBWiG7HaXabZpz6 QwUCeldXypaDWAv9RhLZMETEwl2rrSjGblzE7yi83gWrTRKHPdJexwJHvVHl18bDhtjd2Z ZcqA22ce8AiQrVYprYPrcuKciBSWj6mUamt/V+IOF59yyYif0CNpqx7n32RalQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165511; a=rsa-sha256; cv=none; b=wu1F3asu1J1i0f5l+UIYSdfG8OWHMnccofVXB1+2TGa89UgHMzzlwbAKmwEc1ByUCxhhfj 0lhKrMy2hWrP94UcnMywlLDySCSYR3IP39+K2M+VA3tc2iO3xwoJ5LO8JzZh3H/Byll02h zyNEsBgLQk/gECqeSg1DaQ/FOp8+UuOQKyrguEnQI3LIkVBwju8ynhLoR6FJ57HBLmZly6 zkw988ZNi4L1HF9s3+gHlGGgzSSTsEOceKJXpbk4favt59LILPg4uhciw9k0WsuhyAUITQ TUHTVsTQP5i1pmf9V6T+fkwq94q83RwyEjWoWO5xFubZMScHrBRa2IvIMFfBmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJ9y5MKgzvm2; Mon, 5 Feb 2024 20:38: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 415KcUXT069062; Mon, 5 Feb 2024 20:38:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcUQg069059; Mon, 5 Feb 2024 20:38:30 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:30 GMT Message-Id: <202402052038.415KcUQg069059@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: 0d6cc87b18de - main - libc: libc//sys/__vdso_gettc -> libsys// List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d6cc87b18ded879b17574384ce86f119921bc5d Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0d6cc87b18ded879b17574384ce86f119921bc5d commit 0d6cc87b18ded879b17574384ce86f119921bc5d Author: Brooks Davis AuthorDate: 2023-11-14 21:39:35 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libc: libc//sys/__vdso_gettc -> libsys// Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/{libc/aarch64/sys => libsys/aarch64}/__vdso_gettc.c | 0 lib/{libc/arm/sys => libsys/arm}/__vdso_gettc.c | 0 lib/{libc/powerpc/sys => libsys/powerpc}/__vdso_gettc.c | 0 lib/{libc/powerpc64/sys => libsys/powerpc64}/__vdso_gettc.c | 0 lib/{libc/riscv/sys => libsys/riscv}/__vdso_gettc.c | 0 lib/{libc/x86/sys => libsys/x86}/__vdso_gettc.c | 0 6 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/libc/aarch64/sys/__vdso_gettc.c b/lib/libsys/aarch64/__vdso_gettc.c similarity index 100% rename from lib/libc/aarch64/sys/__vdso_gettc.c rename to lib/libsys/aarch64/__vdso_gettc.c diff --git a/lib/libc/arm/sys/__vdso_gettc.c b/lib/libsys/arm/__vdso_gettc.c similarity index 100% rename from lib/libc/arm/sys/__vdso_gettc.c rename to lib/libsys/arm/__vdso_gettc.c diff --git a/lib/libc/powerpc/sys/__vdso_gettc.c b/lib/libsys/powerpc/__vdso_gettc.c similarity index 100% rename from lib/libc/powerpc/sys/__vdso_gettc.c rename to lib/libsys/powerpc/__vdso_gettc.c diff --git a/lib/libc/powerpc64/sys/__vdso_gettc.c b/lib/libsys/powerpc64/__vdso_gettc.c similarity index 100% rename from lib/libc/powerpc64/sys/__vdso_gettc.c rename to lib/libsys/powerpc64/__vdso_gettc.c diff --git a/lib/libc/riscv/sys/__vdso_gettc.c b/lib/libsys/riscv/__vdso_gettc.c similarity index 100% rename from lib/libc/riscv/sys/__vdso_gettc.c rename to lib/libsys/riscv/__vdso_gettc.c diff --git a/lib/libc/x86/sys/__vdso_gettc.c b/lib/libsys/x86/__vdso_gettc.c similarity index 100% rename from lib/libc/x86/sys/__vdso_gettc.c rename to lib/libsys/x86/__vdso_gettc.c From nobody Mon Feb 5 20:38:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB03M09z58y23; Mon, 5 Feb 2024 20:38: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 4TTJB008fJz4prT; Mon, 5 Feb 2024 20:38:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3kKr2UaWiwydrp1GRRWZsEZ7vpJEx6pl7s0FxS7lDI=; b=aP5HuEEODkOtE2mhxvJIqEwp2JncuZQyKG7kMNsWKQ7BTQ5ThHg7Yez3au7Gu8JL06iX+E 18Og5iJ7rA1M+efacFUE74nodWfvU4VacuO2JPhI1EtNaUjubPOMX+nfDUH0+e3F9asKGQ hYNRVM+dvO4ZGLQGU/u+roJ1T5L0kGEIk2INr8KO6pKJ2yeM98g1ZtPUPX/LNOTisynUOX l0M2ytoOsFPn7F+IefWMs5YNB1KcHAMGqV6jDsFpAOWt9PpDfBaJGxg6LEHhcLOkYXnr74 g8V0MoLRVFDVHE57e2QZASm1GlAnFElccCKiD6t8IRgk1rLpyz3PSL1HaVlA+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3kKr2UaWiwydrp1GRRWZsEZ7vpJEx6pl7s0FxS7lDI=; b=vuXUAdCvKGXuAUeo9CnnqgoMkgMIIgCQcKUJz+6EByEp0CfAzzVmY2tzMFVcPZ92mUo19F eSWb841CU76vpw5jTVqJK28iU7xh+exK6H76E12yXdpn5mqtD4PLJLxxT28CiPg1eQA4V8 Quhau/5+NB1+o5lnQviCoZFvMjTXVI4d7Jx1Yl4ESBRwR7EmR+SW4k1jjdhA3ynvqjuqjr Jf3EIcA0+bZFdlqQkhvqWRCojHhCofRkS4HwRsz9KR179QjlNuWyT5ojz67Dd5nzMxkNGF s4dmYkkA2hUbOLOZHtOuB6jdE8gSi45+8VGhiYmbxF+wJvJYJmy+ox4PfdqDmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165512; a=rsa-sha256; cv=none; b=wQQsZfEPzWqqGDouXj8ZsVO1fi6ABYHEo8VuwHY/2rZHuaXNzR+C3V28ZpMyzsDl8B3Pwd l/foeGsPWbjVnpEsON4eOPVKVhAtZM2XXcmb0R84vATJZvrv/fJoCf7ItKsJpI9UpYsdXp J6f0I2VuE3bmxCbt+qFk4EPaSLwRNzlLaoYlFUfDoAuwjlbBB3LfwchP5corFtwfZsCsbl bJs40EUcuVKZZrKGLRt/+OWYaQH2e8fwILf8DHCqjlJO8kjWlHAQNq4MZhbFHrNqyzOZql nflHv7h176w+SxF5W8uYHLF0A9BiF6Ep0cYo6ibZ0JTJ1naKB1KYVt0dRW3I6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJ9z5w1FzvMD; Mon, 5 Feb 2024 20:38: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 415KcVYZ069117; Mon, 5 Feb 2024 20:38:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcVVY069113; Mon, 5 Feb 2024 20:38:31 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:31 GMT Message-Id: <202402052038.415KcVVY069113@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: 4bc66c0f9f2c - main - libc: remove remaining x86 sys bits to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4bc66c0f9f2c349af86cbf4e77f000b49d819fea Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=4bc66c0f9f2c349af86cbf4e77f000b49d819fea commit 4bc66c0f9f2c349af86cbf4e77f000b49d819fea Author: Brooks Davis AuthorDate: 2023-11-14 22:05:59 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libc: remove remaining x86 sys bits to libsys Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/{libc/amd64/sys => libsys/amd64}/amd64_get_fsbase.c | 0 lib/{libc/amd64/sys => libsys/amd64}/amd64_get_gsbase.c | 0 lib/{libc/amd64/sys => libsys/amd64}/amd64_set_fsbase.c | 0 lib/{libc/amd64/sys => libsys/amd64}/amd64_set_gsbase.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_clr_watch.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_get_fsbase.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_get_gsbase.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_get_ioperm.2 | 0 lib/{libc/i386/sys => libsys/i386}/i386_get_ioperm.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_get_ldt.2 | 0 lib/{libc/i386/sys => libsys/i386}/i386_get_ldt.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_set_fsbase.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_set_gsbase.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_set_ioperm.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_set_ldt.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_set_watch.3 | 0 lib/{libc/i386/sys => libsys/i386}/i386_set_watch.c | 0 lib/{libc/i386/sys => libsys/i386}/i386_vm86.2 | 0 lib/{libc/i386/sys => libsys/i386}/i386_vm86.c | 0 lib/{libc/x86/sys => libsys/x86}/pkru.3 | 0 lib/{libc/x86/sys => libsys/x86}/pkru.c | 0 21 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/libc/amd64/sys/amd64_get_fsbase.c b/lib/libsys/amd64/amd64_get_fsbase.c similarity index 100% rename from lib/libc/amd64/sys/amd64_get_fsbase.c rename to lib/libsys/amd64/amd64_get_fsbase.c diff --git a/lib/libc/amd64/sys/amd64_get_gsbase.c b/lib/libsys/amd64/amd64_get_gsbase.c similarity index 100% rename from lib/libc/amd64/sys/amd64_get_gsbase.c rename to lib/libsys/amd64/amd64_get_gsbase.c diff --git a/lib/libc/amd64/sys/amd64_set_fsbase.c b/lib/libsys/amd64/amd64_set_fsbase.c similarity index 100% rename from lib/libc/amd64/sys/amd64_set_fsbase.c rename to lib/libsys/amd64/amd64_set_fsbase.c diff --git a/lib/libc/amd64/sys/amd64_set_gsbase.c b/lib/libsys/amd64/amd64_set_gsbase.c similarity index 100% rename from lib/libc/amd64/sys/amd64_set_gsbase.c rename to lib/libsys/amd64/amd64_set_gsbase.c diff --git a/lib/libc/i386/sys/i386_clr_watch.c b/lib/libsys/i386/i386_clr_watch.c similarity index 100% rename from lib/libc/i386/sys/i386_clr_watch.c rename to lib/libsys/i386/i386_clr_watch.c diff --git a/lib/libc/i386/sys/i386_get_fsbase.c b/lib/libsys/i386/i386_get_fsbase.c similarity index 100% rename from lib/libc/i386/sys/i386_get_fsbase.c rename to lib/libsys/i386/i386_get_fsbase.c diff --git a/lib/libc/i386/sys/i386_get_gsbase.c b/lib/libsys/i386/i386_get_gsbase.c similarity index 100% rename from lib/libc/i386/sys/i386_get_gsbase.c rename to lib/libsys/i386/i386_get_gsbase.c diff --git a/lib/libc/i386/sys/i386_get_ioperm.2 b/lib/libsys/i386/i386_get_ioperm.2 similarity index 100% rename from lib/libc/i386/sys/i386_get_ioperm.2 rename to lib/libsys/i386/i386_get_ioperm.2 diff --git a/lib/libc/i386/sys/i386_get_ioperm.c b/lib/libsys/i386/i386_get_ioperm.c similarity index 100% rename from lib/libc/i386/sys/i386_get_ioperm.c rename to lib/libsys/i386/i386_get_ioperm.c diff --git a/lib/libc/i386/sys/i386_get_ldt.2 b/lib/libsys/i386/i386_get_ldt.2 similarity index 100% rename from lib/libc/i386/sys/i386_get_ldt.2 rename to lib/libsys/i386/i386_get_ldt.2 diff --git a/lib/libc/i386/sys/i386_get_ldt.c b/lib/libsys/i386/i386_get_ldt.c similarity index 100% rename from lib/libc/i386/sys/i386_get_ldt.c rename to lib/libsys/i386/i386_get_ldt.c diff --git a/lib/libc/i386/sys/i386_set_fsbase.c b/lib/libsys/i386/i386_set_fsbase.c similarity index 100% rename from lib/libc/i386/sys/i386_set_fsbase.c rename to lib/libsys/i386/i386_set_fsbase.c diff --git a/lib/libc/i386/sys/i386_set_gsbase.c b/lib/libsys/i386/i386_set_gsbase.c similarity index 100% rename from lib/libc/i386/sys/i386_set_gsbase.c rename to lib/libsys/i386/i386_set_gsbase.c diff --git a/lib/libc/i386/sys/i386_set_ioperm.c b/lib/libsys/i386/i386_set_ioperm.c similarity index 100% rename from lib/libc/i386/sys/i386_set_ioperm.c rename to lib/libsys/i386/i386_set_ioperm.c diff --git a/lib/libc/i386/sys/i386_set_ldt.c b/lib/libsys/i386/i386_set_ldt.c similarity index 100% rename from lib/libc/i386/sys/i386_set_ldt.c rename to lib/libsys/i386/i386_set_ldt.c diff --git a/lib/libc/i386/sys/i386_set_watch.3 b/lib/libsys/i386/i386_set_watch.3 similarity index 100% rename from lib/libc/i386/sys/i386_set_watch.3 rename to lib/libsys/i386/i386_set_watch.3 diff --git a/lib/libc/i386/sys/i386_set_watch.c b/lib/libsys/i386/i386_set_watch.c similarity index 100% rename from lib/libc/i386/sys/i386_set_watch.c rename to lib/libsys/i386/i386_set_watch.c diff --git a/lib/libc/i386/sys/i386_vm86.2 b/lib/libsys/i386/i386_vm86.2 similarity index 100% rename from lib/libc/i386/sys/i386_vm86.2 rename to lib/libsys/i386/i386_vm86.2 diff --git a/lib/libc/i386/sys/i386_vm86.c b/lib/libsys/i386/i386_vm86.c similarity index 100% rename from lib/libc/i386/sys/i386_vm86.c rename to lib/libsys/i386/i386_vm86.c diff --git a/lib/libc/x86/sys/pkru.3 b/lib/libsys/x86/pkru.3 similarity index 100% rename from lib/libc/x86/sys/pkru.3 rename to lib/libsys/x86/pkru.3 diff --git a/lib/libc/x86/sys/pkru.c b/lib/libsys/x86/pkru.c similarity index 100% rename from lib/libc/x86/sys/pkru.c rename to lib/libsys/x86/pkru.c From nobody Mon Feb 5 20:38:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB13F7gz58xsl; Mon, 5 Feb 2024 20:38: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 4TTJB10hKKz4prf; Mon, 5 Feb 2024 20:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qcygMPc0OlTtB3sFRTTlX8jLgOqmNmq2V/DeLSZTjcM=; b=DvrXrhkbR0Ts+mwf+PgxkyMp+AF4m29bl/ZWbz4VgQEFgsx6qwjp0K8l7sjij5IPpeC6SI 101UE9gHTv5BKQ4cW6oUKurZDrOo8rt8ihuXyriQiEd8wgFSpOEbIOgyH6vAJTALrT0eM/ hXf53dMYAFYjVwdP/9m2kGx4qIISrB9+yV1NzkK2A2hEXia+bcR52qTm3B1aSTf54Zhjho BIQQxJc01u9Dsux9uFOjNbJKSRNDoAYqgVQP6c6BrKxWojZKLMa6iOc92up1SNl+lmikz4 uE0WgOjAJh8aHYLQjqNfhd4CJSxqzw/bjic3htog4eQjcQy+Ev9LrWRIC/04dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qcygMPc0OlTtB3sFRTTlX8jLgOqmNmq2V/DeLSZTjcM=; b=PywbYZ9+xpU79Hi+uzv0OZMd7e8lsTbhk/3glfxmvjY2QwUBPxGZooXTv2xT2hJMCuNqu+ VfE3gvoh/Z9MbG1DNIMrGkJD+4ptCa+vWvdJG2YD7vvYGRKD+9OwGKI9Ifuh0xj9DLx/M+ DCggKL6RjMdvHTJJynFnZifCI068LgoBj5ACg8L3c1KEASdl74O2rQyzH59GZKitC+n+9/ Td/I1kHl9z8JCIfcsKna86odQlzlp+JZd57yvOxyVZ5AwKJ9uyLy+NM00bZXyDY1Ca7FHd C1dWZc04hTa1qiGTwRydiEhdmlVSW4Qhp5K6hWcoYX2JtU+hYwMdWCe67CDSoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165513; a=rsa-sha256; cv=none; b=T/HfIa3zkQ7nCBHka4a6t85Y1bxKyMPMn5KKy6QIjdTsUHH/auf2OyPUDRAYRXm2RveOX+ ZjxrLmPr+9v+GzmTZPHwR99wDIKuI36VWaMCWQ0a6TlQNVu/f8GpgfOXYT0VvYEi+PbLO9 lrBerIA7oxI2ZkoZFkP24VeMF/kxtAM1hOm0DAxsKCHI+cgPQnQgcnuVERScoQzBO9Oo49 ssqO4ngwMKP5HYh3OvvSZuziX8dWHBh1NLT4YQ8IDi4uyLV6fuTgbY2i7mIN8jTTrFFLSV 1PHZvc3ub3uars2fmLD4aNx6cx1Ec8tDdlAsx4i4xs1M0RULC51XCVSKXUoe/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 4TTJB06w5QzvJj; Mon, 5 Feb 2024 20:38: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 415KcWvO069164; Mon, 5 Feb 2024 20:38:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcWSp069161; Mon, 5 Feb 2024 20:38:32 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:32 GMT Message-Id: <202402052038.415KcWSp069161@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: 19149b03b1b5 - main - libc: remove .PATH refs to libc//sys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19149b03b1b5ae3134a58bb6baafef07888181a5 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=19149b03b1b5ae3134a58bb6baafef07888181a5 commit 19149b03b1b5ae3134a58bb6baafef07888181a5 Author: Brooks Davis AuthorDate: 2023-11-14 22:11:34 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libc: remove .PATH refs to libc//sys There are no longer any source files here so remove references. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/powerpcspe/sys/Makefile.inc | 1 - lib/libc/x86/sys/Makefile.inc | 1 - lib/libsys/Makefile.sys | 1 - 3 files changed, 3 deletions(-) diff --git a/lib/libc/powerpcspe/sys/Makefile.inc b/lib/libc/powerpcspe/sys/Makefile.inc index 70662c94db0b..79a5fe2716be 100644 --- a/lib/libc/powerpcspe/sys/Makefile.inc +++ b/lib/libc/powerpcspe/sys/Makefile.inc @@ -1,3 +1,2 @@ -.PATH: ${LIBC_SRCTOP}/powerpc/sys .PATH: ${LIBSYS_SRCTOP}/powerpc .sinclude "${LIBC_SRCTOP}/powerpc/sys/Makefile.inc" diff --git a/lib/libc/x86/sys/Makefile.inc b/lib/libc/x86/sys/Makefile.inc index 05d07ee5552a..d5e4cd75e78b 100644 --- a/lib/libc/x86/sys/Makefile.inc +++ b/lib/libc/x86/sys/Makefile.inc @@ -1,4 +1,3 @@ -.PATH: ${LIBC_SRCTOP}/x86/sys .PATH: ${LIBSYS_SRCTOP}/x86 SRCS+= \ diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 42409c35121b..699117ff437b 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -1,6 +1,5 @@ # sys sources -.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/sys .PATH: ${LIBSYS_SRCTOP}/${LIBC_ARCH} ${LIBSYS_SRCTOP} # Include the generated makefile containing the *complete* list From nobody Mon Feb 5 20:38:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB24fMCz58xlP; Mon, 5 Feb 2024 20:38: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 4TTJB22Hylz4q7G; Mon, 5 Feb 2024 20:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+5ifi+B4VoR54yg9iEVset9Y5eWdZuCWCltSuiO/y/8=; b=btw2sW/U43jiVvl3NJY63dPII9KveMIg4v+4myxVOKCnkKp6wVKNP3GkD0jQfV8KwGst6m 1k33K/DlZe719eLHd1L78iZIZaBCV+DdsAMfNLWAygiLmqGhBBom1pg0ZybgGQzM//5183 uzG1Ar9DqL//gOTXukSK+7aKN8oxv+LEJHk8B7QYZI0DrGapNl9Cc+kDPX1El044ZQSdmt 0lRLCGZVmHkfYlYJmU1aI9Z+OB8JEw2rhoiqz8yHPvV7wckaUmnHvbZHPHEkYKobPT3v+y M9gf/rd8JK9uwIW3Db7ntFFtIv6VryL6Qu2PRyNxmnCEFdCZocEof63w8EKMnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+5ifi+B4VoR54yg9iEVset9Y5eWdZuCWCltSuiO/y/8=; b=rFcYWhPU9WDp4zYFpESGnByYQLfWj96g6ruCe1BTikwTGrpTfq2v9jwp+QMTU0xxmhS2uf mhoSL8FFMy/+BTQaHYodc0qL7hDpZcyFutXDLbfR7J6CKszRXhv+runuuGEEroBKof9yIm OshTTEB+gTkvJcwE8jsuk8nqeFkg5ru5gQjLLz655y2RzS/8fJajNjiLRnKcCB/sxaBp2S edtY8k6PH0K5HEEYB7VeTG5gMk5zRqQITT+VRFaWIIQP7JRcCSQtiY2BSu6M21fQTySVIQ +KamAV9guhqS8rJtDLTDwYVc9PI4lcMoXiV0z4SyYS593Y/QTv1UBxv35nGBzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165514; a=rsa-sha256; cv=none; b=cTLIgRsZsEug8ote1lTAgydZKCLuXHg1+aUE5uCna+zVGTzMkB5BXexJasMN31MkjUdiUn pGTCrEIlsVHpcTx9VM2tYE2egIpcFxjJrwEeLmOewCBTM0o7O8ZSyhkX7NkSou/JtZRxOl iRCR4L2ynJmuFgOH1zBMwaPmahs0put5iePfQsScZkNk5b2a0C5yJUF0YyuRAC56G8WVH3 Kae4uzSJAINuDUf7LgvNxQdfcmM2fN8aM2BrrYv97Fcc0R/hcuHIwttEOvEZ/9kvSVk6p/ Lx5/2pGC8kKmVJx2UHkMbmNl2bfIPmaGqChKhayf3MAva1qgGNQV+2rnknUxig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJB210RRzvlg; Mon, 5 Feb 2024 20:38: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 415KcY43069209; Mon, 5 Feb 2024 20:38:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcY2J069206; Mon, 5 Feb 2024 20:38:34 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:34 GMT Message-Id: <202402052038.415KcY2J069206@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: 31a46e2cc84d - main - libc: Move per-arch sys/Makefile.inc to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31a46e2cc84d7ebfc25ce5a33e54681057e9ed9a Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=31a46e2cc84d7ebfc25ce5a33e54681057e9ed9a commit 31a46e2cc84d7ebfc25ce5a33e54681057e9ed9a Author: Brooks Davis AuthorDate: 2023-11-14 22:25:24 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:55 +0000 libc: Move per-arch sys/Makefile.inc to libsys libc//sys/Makefile.inc -> libsys//Makefile.sys. Require that libsys//Makefile.sys exist. At least for current archtiectures, it's not possible for an architecture to not have and MD syscall bits. powerpcspe/Makefile.sys's structure means it had to be modified when moved so rename detection won't work, but it has trivial contents so the history is unimportant. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/Makefile | 1 - lib/libc/powerpcspe/sys/Makefile.inc | 2 -- lib/libsys/Makefile.sys | 5 ++++- lib/{libc/aarch64/sys/Makefile.inc => libsys/aarch64/Makefile.sys} | 0 lib/{libc/amd64/sys/Makefile.inc => libsys/amd64/Makefile.sys} | 0 lib/{libc/arm/sys/Makefile.inc => libsys/arm/Makefile.sys} | 2 +- lib/{libc/i386/sys/Makefile.inc => libsys/i386/Makefile.sys} | 0 lib/{libc/powerpc/sys/Makefile.inc => libsys/powerpc/Makefile.sys} | 0 .../powerpc64/sys/Makefile.inc => libsys/powerpc64/Makefile.sys} | 0 lib/libsys/powerpcspe/Makefile.sys | 7 +++++++ lib/{libc/riscv/sys/Makefile.inc => libsys/riscv/Makefile.sys} | 0 lib/{libc/x86/sys/Makefile.inc => libsys/x86/Makefile.sys} | 0 lib/{libc/x86/sys => libsys/x86}/sched_getcpu_x86.c | 0 13 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 2662d8b6aad0..72300e88d3d7 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -123,7 +123,6 @@ NOASM= .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" .endif .if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" -.include "${LIBC_SRCTOP}/x86/sys/Makefile.inc" .include "${LIBC_SRCTOP}/x86/gen/Makefile.inc" .endif .if ${MK_NIS} != "no" diff --git a/lib/libc/powerpcspe/sys/Makefile.inc b/lib/libc/powerpcspe/sys/Makefile.inc deleted file mode 100644 index 79a5fe2716be..000000000000 --- a/lib/libc/powerpcspe/sys/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -.PATH: ${LIBSYS_SRCTOP}/powerpc -.sinclude "${LIBC_SRCTOP}/powerpc/sys/Makefile.inc" diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 699117ff437b..7600c9ef2aae 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -20,7 +20,10 @@ NOASM= exit.o \ yield.o PSEUDO= _exit.o \ _getlogin.o -.sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/sys/Makefile.inc" +.include "${LIBSYS_SRCTOP}/${LIBC_ARCH}/Makefile.sys" +.if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" +.include "${LIBSYS_SRCTOP}/x86/Makefile.sys" +.endif SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c NOASM+= clock_gettime.o gettimeofday.o diff --git a/lib/libc/aarch64/sys/Makefile.inc b/lib/libsys/aarch64/Makefile.sys similarity index 100% rename from lib/libc/aarch64/sys/Makefile.inc rename to lib/libsys/aarch64/Makefile.sys diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libsys/amd64/Makefile.sys similarity index 100% rename from lib/libc/amd64/sys/Makefile.inc rename to lib/libsys/amd64/Makefile.sys diff --git a/lib/libc/arm/sys/Makefile.inc b/lib/libsys/arm/Makefile.sys similarity index 56% rename from lib/libc/arm/sys/Makefile.inc rename to lib/libsys/arm/Makefile.sys index d5b62d61c90d..ccfaa03a201b 100644 --- a/lib/libc/arm/sys/Makefile.inc +++ b/lib/libsys/arm/Makefile.sys @@ -1,4 +1,4 @@ SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c -MDASM= vfork.S cerror.S syscall.S +MDASM= vfork.S cerror.S syscall.S diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libsys/i386/Makefile.sys similarity index 100% rename from lib/libc/i386/sys/Makefile.inc rename to lib/libsys/i386/Makefile.sys diff --git a/lib/libc/powerpc/sys/Makefile.inc b/lib/libsys/powerpc/Makefile.sys similarity index 100% rename from lib/libc/powerpc/sys/Makefile.inc rename to lib/libsys/powerpc/Makefile.sys diff --git a/lib/libc/powerpc64/sys/Makefile.inc b/lib/libsys/powerpc64/Makefile.sys similarity index 100% rename from lib/libc/powerpc64/sys/Makefile.inc rename to lib/libsys/powerpc64/Makefile.sys diff --git a/lib/libsys/powerpcspe/Makefile.sys b/lib/libsys/powerpcspe/Makefile.sys new file mode 100644 index 000000000000..3862699ae8b2 --- /dev/null +++ b/lib/libsys/powerpcspe/Makefile.sys @@ -0,0 +1,7 @@ +CFLAGS+= -I${LIBC_SRCTOP}/powerpc +CFLAGS+= -I${LIBSYS_SRCTOP}/powerpc + +SYM_MAPS+= ${LIBSYS_SRCTOP}/powerpc/Symbol.map + +.PATH: ${LIBSYS_SRCTOP}/powerpc +.include "${LIBSYS_SRCTOP}/powerpc/Makefile.sys" diff --git a/lib/libc/riscv/sys/Makefile.inc b/lib/libsys/riscv/Makefile.sys similarity index 100% rename from lib/libc/riscv/sys/Makefile.inc rename to lib/libsys/riscv/Makefile.sys diff --git a/lib/libc/x86/sys/Makefile.inc b/lib/libsys/x86/Makefile.sys similarity index 100% rename from lib/libc/x86/sys/Makefile.inc rename to lib/libsys/x86/Makefile.sys diff --git a/lib/libc/x86/sys/sched_getcpu_x86.c b/lib/libsys/x86/sched_getcpu_x86.c similarity index 100% rename from lib/libc/x86/sys/sched_getcpu_x86.c rename to lib/libsys/x86/sched_getcpu_x86.c From nobody Mon Feb 5 20:38:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB34rMCz58y0J; Mon, 5 Feb 2024 20:38: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 4TTJB3408Fz4pvh; Mon, 5 Feb 2024 20:38:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDrj31Fzd8y8bRuvVaNParxNmcCLOXlCVyuyI6h5Cu4=; b=x5qr2v43jhth/AiP/lhemhUFmMJ1cu28AfMIgCqxXNaNPM/xPrmHsDqdDSi7GnCnSRMmAm W7PASwEUHPTP+WGpDtRPjDHKy3G1JvPDRBmA9rWqF9M5LPFqXJk0EkRy61jmdeJjOOQgYV V+Hh0ST/3pbywPLcBdze4wAA1Rl7ywjfpTqX1HhkRq83cLo2IFOeDS6pcQfI59e1i9y+/p tPVh3gyNr+DE3W23rw3/vPMw1uTfsGoCs453YG//AMXEBWlg4ttYNcxSsNnUs8ObxwcwC4 bKkYMARLW03hdTpccCBYcVVHkIXFzCaQGNpfOwo2ZprmnyWPjQL+xatOqQJr1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDrj31Fzd8y8bRuvVaNParxNmcCLOXlCVyuyI6h5Cu4=; b=ga0EZldLa4a0nqR8j+XT/u0jeEFHCiTWUuLsVToIEjWMZS/HLK4p0UnLwtf55XvazeoDsX 9RYy0/uJ/ufHS7kIIBvMoNoLSa/3L6p9maqybeJZl/z0kObLSNw6ZVaQOtfm9Eq2/p7dkc tNQZgRRdhbzbVXPT0ObbWzMG1i3OWRpU1qCkZ7vftTE3jpUzcfsoH2SPkxpo3RfpszILgW dmfUUbHgZLSr0neW7dLPYn6seAHE8Hng1W0YEB+NDAj4p7qHOokuky+DMr4tAz01iyiugU YSsyACDPo2DkgDOWL5fMV0FXDznxBmMaZiA+KdZpNOHfOrxCJ6X/fMuOuW5lPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165515; a=rsa-sha256; cv=none; b=vjR2YcNbzfASh+Wq2BhyYrGPURd2lAwT5PRVuwnMltIfXcu+qX6gUGnhXIzaO+N0nagsMS Gk2gc9LJXTYsZxZEJcu4itgmjBZbZ/krXc8StvWtDPcqQgqgZOGlsTcEc5eFO0Ss/+Hkx4 IwPjTp7ykDhalOzhbkXrk2bemku3OLmjXUFBuqdiPJuzf3LDxAPkspNrdfCRYZv+jAAaHy QmytcWRo2kTaK1iOzpCfW8HHX7tfH2S7EYRBim+IIfJN/xJoaLqAyMyEjK90ZsNLu2K6Yq tAnLuPNwuWUzBkCOgV6Vfbys38IMi3v1LKjEWX5pXdGY4w2R8Q0yshSXTzvxWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJB32QmbzvZS; Mon, 5 Feb 2024 20:38: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 415KcZPx069251; Mon, 5 Feb 2024 20:38:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcZjB069248; Mon, 5 Feb 2024 20:38:35 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:35 GMT Message-Id: <202402052038.415KcZjB069248@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: cdecda8da32b - main - libc: move rfork_thread(3) to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cdecda8da32b67f2be34a4d2ea37f90986a45a00 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=cdecda8da32b67f2be34a4d2ea37f90986a45a00 commit cdecda8da32b67f2be34a4d2ea37f90986a45a00 Author: Brooks Davis AuthorDate: 2023-11-15 21:44:43 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libc: move rfork_thread(3) to libsys rfork_thread(3) is assembly that makes syscalls directly and uses cerror so it belongs in libsys. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/amd64/gen/Makefile.inc | 2 +- lib/libc/gen/Makefile.inc | 1 - lib/libc/i386/gen/Makefile.inc | 2 +- lib/libsys/Makefile.sys | 1 + lib/libsys/amd64/Makefile.sys | 3 ++- lib/{libc/amd64/gen => libsys/amd64}/rfork_thread.S | 0 lib/libsys/i386/Makefile.sys | 3 ++- lib/{libc/i386/gen => libsys/i386}/rfork_thread.S | 0 lib/{libc/gen => libsys}/rfork_thread.3 | 0 9 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/libc/amd64/gen/Makefile.inc b/lib/libc/amd64/gen/Makefile.inc index 8175a99c8c8a..583418c4620e 100644 --- a/lib/libc/amd64/gen/Makefile.inc +++ b/lib/libc/amd64/gen/Makefile.inc @@ -1,5 +1,5 @@ -SRCS+= _setjmp.S rfork_thread.S setjmp.S sigsetjmp.S \ +SRCS+= _setjmp.S setjmp.S sigsetjmp.S \ fabs.S \ infinity.c ldexp.c makecontext.c signalcontext.c \ flt_rounds.c fpgetmask.c fpsetmask.c fpgetprec.c fpsetprec.c \ diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index b7eb92090722..9eeab36f7d00 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -279,7 +279,6 @@ MAN+= alarm.3 \ raise.3 \ rand48.3 \ readpassphrase.3 \ - rfork_thread.3 \ scandir.3 \ sem_destroy.3 \ sem_getvalue.3 \ diff --git a/lib/libc/i386/gen/Makefile.inc b/lib/libc/i386/gen/Makefile.inc index b4c5306ed1ce..1c4eb2a9981f 100644 --- a/lib/libc/i386/gen/Makefile.inc +++ b/lib/libc/i386/gen/Makefile.inc @@ -1,4 +1,4 @@ SRCS+= _ctx_start.S _setjmp.S fabs.S \ flt_rounds.c infinity.c ldexp.c makecontext.c \ - rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S + setjmp.S signalcontext.c sigsetjmp.S diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 7600c9ef2aae..880b0f7f08ed 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -365,6 +365,7 @@ MAN+= abort2.2 \ MAN+= \ lockf.3 \ + rfork_thread.3 \ sleep.3 \ usleep.3 diff --git a/lib/libsys/amd64/Makefile.sys b/lib/libsys/amd64/Makefile.sys index d4a767c90a5f..09947d998480 100644 --- a/lib/libsys/amd64/Makefile.sys +++ b/lib/libsys/amd64/Makefile.sys @@ -2,6 +2,7 @@ SRCS+= \ amd64_get_fsbase.c \ amd64_get_gsbase.c \ amd64_set_fsbase.c \ - amd64_set_gsbase.c + amd64_set_gsbase.c \ + rfork_thread.S MDASM= vfork.S cerror.S getcontext.S diff --git a/lib/libc/amd64/gen/rfork_thread.S b/lib/libsys/amd64/rfork_thread.S similarity index 100% rename from lib/libc/amd64/gen/rfork_thread.S rename to lib/libsys/amd64/rfork_thread.S diff --git a/lib/libsys/i386/Makefile.sys b/lib/libsys/i386/Makefile.sys index bbc3497aa5a5..f42c5f7ec0ef 100644 --- a/lib/libsys/i386/Makefile.sys +++ b/lib/libsys/i386/Makefile.sys @@ -1,6 +1,7 @@ SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \ i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c \ - i386_clr_watch.c i386_set_watch.c i386_vm86.c + i386_clr_watch.c i386_set_watch.c i386_vm86.c \ + rfork_thread.S MDASM= vfork.S cerror.S getcontext.S syscall.S diff --git a/lib/libc/i386/gen/rfork_thread.S b/lib/libsys/i386/rfork_thread.S similarity index 100% rename from lib/libc/i386/gen/rfork_thread.S rename to lib/libsys/i386/rfork_thread.S diff --git a/lib/libc/gen/rfork_thread.3 b/lib/libsys/rfork_thread.3 similarity index 100% rename from lib/libc/gen/rfork_thread.3 rename to lib/libsys/rfork_thread.3 From nobody Mon Feb 5 20:38:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB512WXz58xlX; Mon, 5 Feb 2024 20:38:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTJB44cjMz4q3W; Mon, 5 Feb 2024 20:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VKZV2PYvxQED1p4fyaRKugLnKGnks7UWl0wBMPuMcCw=; b=lYaDaEvAPIVd8px9ykqq4hutGpA0IEhMnPIXvorepGhdCVxXH4gDTLLzlYecag3QJFEaIz PpivGR34M3QWJ5gaVCzUkYUphbftb0vqhiS96ovs4EV1vpsoiFlXWrvaz9vuQHWWT7/6j3 2U6yOoaPBlFT7Dr3LhB+pRAmnRfpEEA11pP3pGhu0bKhRAlWrQdMiGGO+At7DXVYgwmCu7 ARTnNtU/hiln03bxpVSibGc9CnPSXO00DyzVGPmSp09IiqIcteHAhMZ8FlbmabimTPMSTc 58+04FDwPU7yw6qMcrBMR+XrPy1GEA0SrKHJVvnRdDJrYp5qlNvJND482wFUZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VKZV2PYvxQED1p4fyaRKugLnKGnks7UWl0wBMPuMcCw=; b=OXSktdyfj3xZiM5OpWKGq2KN5JmIzL2YbwQrISz3mMPrsxKglkTip6HF1rv5t//g1cq5GA zezVxRqJteumgrgcETKsb8ONA41ZOxov5troGiP+6wkNDsBIeaYjEW7rOVXvNydMUZIbzd zo/GicYOTGPpNohsFNgbVvvjOCzaiQXo2Y4ZhQV+i5g+XcNtHw3Hy5/tuu5+VF+qDwoRqQ uW/9SpCM2TywAuEscrOdb5mrExF6kwXpWcOmijQumk6Z1HO5jIOfF2s8X9vUHceX3TEleM +zrmA3hdDuI/Pn35mWrgDJsK4jxFeXy3jxTH7ve6b6YN20zVVaWFxDnrLBXx/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165516; a=rsa-sha256; cv=none; b=WuIjDPpkKUCf+/1XI4QhYdZIudJSJ0BhQhxtLu6HA22wkldEx3U14Q8iae+2p9MtvOIb05 96Z3apw1Ndu0vXMAtP5Aey9qR1Ne6IPg1aq4yZUWO9wr27tiUXHbUuuldD+qs1UZgTKj+r +lX2nZVTsxGNPlpSgBSQEnKs6ChicNRGPc2TRMPATA6uOPxYngla0ho41D77d0fdHNbAwn sNUOP4i9IdsGfn93DzDXOhk9mixpNCqnqIMAUkOvqh7BZe4ju8J2LRZFdOvRB2mPp72tP8 TJDzUPMbfxjNUaJIEEezHkArkgT2f3QUWgAdzd66BLHXUTIRJ3hoZtRmUURpqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJB43X0hzvlh; Mon, 5 Feb 2024 20:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 415Kca2I069305; Mon, 5 Feb 2024 20:38:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415Kca2u069302; Mon, 5 Feb 2024 20:38:36 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:36 GMT Message-Id: <202402052038.415Kca2u069302@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: 1e2502bfca58 - main - libc: move MD sys related symbols to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e2502bfca58344780747c3948b51164e25c8b5f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1e2502bfca58344780747c3948b51164e25c8b5f commit 1e2502bfca58344780747c3948b51164e25c8b5f Author: Brooks Davis AuthorDate: 2023-11-15 21:48:45 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libc: move MD sys related symbols to libsys This is a mix genuine MD interfaces and compat symbols like _getlogin. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/amd64/Symbol.map | 19 ------------------- lib/libc/arm/Symbol.map | 8 -------- lib/libc/i386/Symbol.map | 26 -------------------------- lib/libc/powerpc/Symbol.map | 5 ----- lib/libc/powerpc64/Symbol.map | 9 --------- lib/libsys/Makefile.sys | 3 +++ lib/libsys/amd64/Symbol.sys.map | 28 ++++++++++++++++++++++++++++ lib/libsys/arm/Symbol.sys.map | 11 +++++++++++ lib/libsys/i386/Symbol.sys.map | 29 +++++++++++++++++++++++++++++ lib/libsys/powerpc/Symbol.sys.map | 8 ++++++++ lib/libsys/powerpc64/Symbol.sys.map | 8 ++++++++ 11 files changed, 87 insertions(+), 67 deletions(-) diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index aa2744b15a74..2fc723102f90 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -13,20 +13,6 @@ FBSD_1.0 { fpsetmask; fpsetprec; fpsetround; - rfork_thread; - amd64_get_fsbase; - amd64_get_gsbase; - amd64_set_fsbase; - amd64_set_gsbase; - brk; - sbrk; -}; - -FBSD_1.6 { - x86_pkru_get_perm; - x86_pkru_set_perm; - x86_pkru_protect_range; - x86_pkru_unprotect_range; }; /* @@ -35,14 +21,9 @@ FBSD_1.6 { * */ FBSDprivate_1.0 { - /* PSEUDO syscalls */ - _getlogin; - ___longjmp; __longjmp; __signalcontext; signalcontext; __siglongjmp; - _brk; - _vfork; }; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 6fef9598e7ef..ac5a7184b2a1 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -6,8 +6,6 @@ FBSD_1.0 { __mcount; alloca; - brk; - sbrk; }; FBSD_1.3 { @@ -25,18 +23,12 @@ FBSD_1.6 { }; FBSDprivate_1.0 { - /* PSEUDO syscalls */ - _getlogin; - __aeabi_read_tp; ___longjmp; __longjmp; signalcontext; _signalcontext; __siglongjmp; - _vfork; - _brk; - _sbrk; _libc_arm_fpu_present; }; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 66939e2eb55d..270ba4b129a7 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -7,39 +7,13 @@ FBSD_1.0 { .mcount; alloca; __flt_rounds; - rfork_thread; - brk; - i386_clr_watch; - i386_get_fsbase; - i386_get_gsbase; - i386_get_ioperm; - i386_get_ldt; - i386_set_fsbase; - i386_set_gsbase; - i386_set_ioperm; - i386_set_ldt; - i386_set_watch; - i386_vm86; - sbrk; ___tls_get_addr; }; -FBSD_1.6 { - x86_pkru_get_perm; - x86_pkru_set_perm; - x86_pkru_protect_range; - x86_pkru_unprotect_range; -}; - FBSDprivate_1.0 { - /* PSEUDO syscalls */ - _getlogin; - ___longjmp; __longjmp; __signalcontext; signalcontext; __siglongjmp; - _vfork; - _brk; }; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index 5074596b3c09..0996b79369f3 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -11,8 +11,6 @@ FBSD_1.0 { fpgetsticky; fpsetmask; fpsetround; - brk; - sbrk; }; FBSD_1.3 { @@ -20,9 +18,6 @@ FBSD_1.3 { }; FBSDprivate_1.0 { - /* PSEUDO syscalls */ - _getlogin; - _fpgetsticky; __longjmp; signalcontext; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 1bf990a52088..3a772922e2e3 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -11,17 +11,8 @@ FBSD_1.0 { fpgetsticky; fpsetmask; fpsetround; - brk; - sbrk; }; FBSDprivate_1.0 { - /* PSEUDO syscalls */ _getlogin; - - _fpgetsticky; - __longjmp; - signalcontext; - __signalcontext; - __syncicache; }; diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 880b0f7f08ed..e31a30d731bb 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -117,6 +117,9 @@ SPSEUDO= ${PSEUDO:S/.o/.S/} SRCS+= ${SASM} ${SPSEUDO} SYM_MAPS+= ${LIBSYS_SRCTOP}/Symbol.sys.map +.if exists(${LIBSYS_SRCTOP}/${LIBC_ARCH}/Symbol.sys.map) +SYM_MAPS+= ${LIBSYS_SRCTOP}/${LIBC_ARCH}/Symbol.sys.map +.endif # Generated files CLEANFILES+= ${SASM} ${SPSEUDO} diff --git a/lib/libsys/amd64/Symbol.sys.map b/lib/libsys/amd64/Symbol.sys.map new file mode 100644 index 000000000000..6a531b659c46 --- /dev/null +++ b/lib/libsys/amd64/Symbol.sys.map @@ -0,0 +1,28 @@ +FBSD_1.0 { + rfork_thread; + amd64_get_fsbase; + amd64_get_gsbase; + amd64_set_fsbase; + amd64_set_gsbase; + brk; + sbrk; +}; + +FBSD_1.6 { + x86_pkru_get_perm; + x86_pkru_set_perm; + x86_pkru_protect_range; + x86_pkru_unprotect_range; +}; + +/* + * + * FreeBSD private ABI + * + */ +FBSDprivate_1.0 { + _getlogin; + + _brk; + _vfork; +}; diff --git a/lib/libsys/arm/Symbol.sys.map b/lib/libsys/arm/Symbol.sys.map new file mode 100644 index 000000000000..89a57d68f81d --- /dev/null +++ b/lib/libsys/arm/Symbol.sys.map @@ -0,0 +1,11 @@ +FBSD_1.0 { + brk; + sbrk; +}; + +FBSDprivate_1.0 { + _getlogin; + _vfork; + _brk; + _sbrk; +}; diff --git a/lib/libsys/i386/Symbol.sys.map b/lib/libsys/i386/Symbol.sys.map new file mode 100644 index 000000000000..c1b52b49c7a4 --- /dev/null +++ b/lib/libsys/i386/Symbol.sys.map @@ -0,0 +1,29 @@ +FBSD_1.0 { + rfork_thread; + brk; + i386_clr_watch; + i386_get_fsbase; + i386_get_gsbase; + i386_get_ioperm; + i386_get_ldt; + i386_set_fsbase; + i386_set_gsbase; + i386_set_ioperm; + i386_set_ldt; + i386_set_watch; + i386_vm86; + sbrk; +}; + +FBSD_1.6 { + x86_pkru_get_perm; + x86_pkru_set_perm; + x86_pkru_protect_range; + x86_pkru_unprotect_range; +}; + +FBSDprivate_1.0 { + _getlogin; + _vfork; + _brk; +}; diff --git a/lib/libsys/powerpc/Symbol.sys.map b/lib/libsys/powerpc/Symbol.sys.map new file mode 100644 index 000000000000..d79597c0b45e --- /dev/null +++ b/lib/libsys/powerpc/Symbol.sys.map @@ -0,0 +1,8 @@ +FBSD_1.0 { + brk; + sbrk; +}; + +FBSDprivate_1.0 { + _getlogin; +}; diff --git a/lib/libsys/powerpc64/Symbol.sys.map b/lib/libsys/powerpc64/Symbol.sys.map new file mode 100644 index 000000000000..d79597c0b45e --- /dev/null +++ b/lib/libsys/powerpc64/Symbol.sys.map @@ -0,0 +1,8 @@ +FBSD_1.0 { + brk; + sbrk; +}; + +FBSDprivate_1.0 { + _getlogin; +}; From nobody Mon Feb 5 20:38:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB615Z1z58y2D; Mon, 5 Feb 2024 20:38: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 4TTJB55G84z4pw4; Mon, 5 Feb 2024 20:38:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Er7gKOqSRAtGFFJFURPXKCbnjHKYWDI/WLOcpWs0f0=; b=LExM08fPhbKIWUt9OLjzj7IF1iT9xEikNIqD0s6Cg4eg7cg2RVYa7bMDTkZ/22RKvd4BP6 97HBUybLk6PZzZ7TPZNXr6m9dMKPP9XPBWOFV3uQShKXixMjDyU2Po0RE89sU7gL30j+DG Cq6971hVfeybXJckNln9/t5e+heHfEnZlfdKBkusgYGlLpbhlM9AfV/ugeJOjBvuiqlpnm CRyjqn14nwYx5LV64YTJVV2B47vZhuDSzfnBrCIfsQoQGBRyuMoAf3IYeLOWRcjhpElduf K2V1+ivEWHphDb6lFsPOP0XF7hCxpDuluc/Hps0AUtFRyiTOdZf+Tf+Nem2eFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Er7gKOqSRAtGFFJFURPXKCbnjHKYWDI/WLOcpWs0f0=; b=XSS6L6kLgnbLpuUy0R9N1YfkeSz3lbNlQYEhC08MLX8amJ56jLqBD7DtAacOit/1NOsZYB bfsZL/RBtn1HS/33w8aPI4EwqqATtQ1/SKZ9zsWS5+kLl4wl4OLbS9sf7sNbP0pefRgiHA ovnVJC6zGJJacfMlTGZrqSI4+Hcx1kppNFd0ezm0wysUm4EiYDAXwzFfGCbnuX2btEZh/P 7S/5Wvy00tTJ8uzfL57hgj7bTLGJ1vUpBIIvugLihnb3zWiJaHr5QtXQsmGbFXOiqXMo6W ZMhRn+u3Fofb7RmuMocWagButU/+cZmxVbIhmeEZFXyBv1osexDSwa8dqEv6Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165517; a=rsa-sha256; cv=none; b=Wg7nYxIFtoh1qZhoNyhwMWknyR3eS8Lmj2wFXJSLs1AKFLJgKq4RPK2vVRewwHE/X4UyRq yqo+UlIxdy9JmvJqM1w4mRzFUhm7pVoT4SHXaaUbq2Jb6UcQtO2A7cT5B5nOYFE5InZCko /G1m7zjALFJ4rsMpHJT9C4xdsPvGcORNvZDT2KikS07pkd8v5evSWbBXzwmFY+7hK7hIxy 6jooQN4J+24hMtfEES6gc0z4SKtso5YykSsUl1bvJFYEVEeviypVj2pmmMxmLAPqICxwRq WpctyUys+Iam1VOksa8i3fO014a80ZQgsePA/bSPUDKfHXSvnjDt7FGrjjHDrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJB54MpbzvJk; Mon, 5 Feb 2024 20:38: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 415Kcb7b069356; Mon, 5 Feb 2024 20:38:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcbwB069353; Mon, 5 Feb 2024 20:38:37 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:37 GMT Message-Id: <202402052038.415KcbwB069353@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: 81245a77f0a3 - main - libc: compile _once in libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81245a77f0a34f80f8097ed461d785a9074855e3 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=81245a77f0a34f80f8097ed461d785a9074855e3 commit 81245a77f0a34f80f8097ed461d785a9074855e3 Author: Brooks Davis AuthorDate: 2023-11-21 18:30:43 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libc: compile _once in libsys auxv support requires _once(), but we don't want the libsys version stomping on the libc version should they diverge in the future. We could rename it entierly, but for now just hook it in via Makefile.sys. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/gen/Makefile.inc | 1 - lib/libsys/Makefile.sys | 1 + lib/{libc/gen => libsys}/_once_stub.c | 0 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 9eeab36f7d00..ae5a12d8b668 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -9,7 +9,6 @@ CONFSPACKAGE= runtime SRCS+= __getosreldate.c \ __pthread_mutex_init_calloc_cb_stub.c \ __xuname.c \ - _once_stub.c \ _pthread_stubs.c \ _rand48.c \ _spinlock_stub.c \ diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index e31a30d731bb..ef800e4d2445 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -32,6 +32,7 @@ PSEUDO+= _clock_gettime.o _gettimeofday.o # Sources common to both syscall interfaces: SRCS+= \ __error.c \ + _once_stub.c \ interposing_table.c SRCS+= getdents.c lstat.c mknod.c stat.c diff --git a/lib/libc/gen/_once_stub.c b/lib/libsys/_once_stub.c similarity index 100% rename from lib/libc/gen/_once_stub.c rename to lib/libsys/_once_stub.c From nobody Mon Feb 5 20:38:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB71GPzz58xSf; Mon, 5 Feb 2024 20:38:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTJB66fPYz4q1Q; Mon, 5 Feb 2024 20:38:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9X/GsBo0gU8hEyVLZCpcm5WnGDI/4ToTCuxEEN+KEnE=; b=m2ooPKfFFah9kBQsSqD2mgSZh9dDD5Nslt8NqvGibofLDzIxxddS/D7QWhJhfhxZ+B5Q7J qqEUqRsZyTvBkG2XLRFSwoQ++jn81RsES68zI3zFpg+JpWjiG9NuFdlVsU0numGrlRXw1z 5anzs/H+1TL5YcER6cdy2KrGsU8dq8sC8ioG/Q1k4EN4M+QNMhVz038vy4FWhn8uaYjwQX Ge6Ur8JMBJdPT6AI1qyf+tnIlGLXK9M+6bau+c1tSDg5GoWZKEfMNrkuoxFo+PdkBsvxy3 knu5NHsj92JNpgZk2+ILz5ozalT6NnA+lVe6Qs/MrU+eZj8cOzli4k0tDJlTtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9X/GsBo0gU8hEyVLZCpcm5WnGDI/4ToTCuxEEN+KEnE=; b=WhvAB4w0t3gMqFyH/qeXFxMHGqTP6YjSb/+Uv3yL5mglylDQ/naIYEoO0GsjFZsijKRr9K 0Y9IDDcZhtuoupw2cTNcNKIZG8QfzZWUHNVTtZgJw2+BFBYZ04OqkNL9GuNpKYsSLSLru3 lNpPMMk7LSVBt58wvd/v+w3zeuvz21Gi+4U+6jRxbf596kW5luw9ynTWf6DvKm/SMNRh+Z o0KGlBGim5acPgLz2y4vnGdK8kE4AOAqtiU6dudyoq33c7xCKXpkZj6ZCys2FZZRVGvNPv A8ob7OoyiV8aubJsvToWVd6Pr/cz1hQ+9GQwBfkVlk2ZXHwbRSxpmF9hqSd9Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165518; a=rsa-sha256; cv=none; b=DQkFxjchLlY8q51Hou54ijU2BQnILwQkrJb+hsHc5hvNai7giUvlXCD0IqYb/mpZCWifaQ OzTY6Z1XMr5f90tprbhGSYdeFYJOH6R7Tvhkpoev4dt0gvgOg0h6AP/ZRXKySi2kq25x75 kiev4J3Tu7m1IkgVkJNWpY0Y+IcmAOo7FLuXxs43lor2eHS+TEjId6jBgjNUd+BffM+fEv AoJjlzZWQUcfRQhCaGYFsKGs0fCjXCQdw2EdCz9/abYwvwqqqj8jB7ypr8hof20pYAAGOy HqT1PaI5WWqYlUl9in4QwHgNR5JFi0Vlw8MkpYoI+lB9elomFoJ+VJDoWn/sDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJB65SchzvMF; Mon, 5 Feb 2024 20:38:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 415KccmG069406; Mon, 5 Feb 2024 20:38:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415Kcc2t069403; Mon, 5 Feb 2024 20:38:38 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:38 GMT Message-Id: <202402052038.415Kcc2t069403@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: 4c33415e4cf5 - main - libc: elf auxiliary vector handling to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c33415e4cf52c075046569000d92032496978fb Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=4c33415e4cf52c075046569000d92032496978fb commit 4c33415e4cf52c075046569000d92032496978fb Author: Brooks Davis AuthorDate: 2023-11-15 20:53:28 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libc: elf auxiliary vector handling to libsys This is part of the interface to the kernel and some syscall wrappers depend on it so move it there. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/gen/Makefile.inc | 3 --- lib/libc/gen/Symbol.map | 2 -- lib/libsys/Makefile.sys | 4 ++++ lib/libsys/Symbol.sys.map | 3 +++ lib/{libc/gen => libsys}/auxv.3 | 0 lib/{libc/gen => libsys}/auxv.c | 0 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index ae5a12d8b668..64b3e99ec6c0 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -18,7 +18,6 @@ SRCS+= __getosreldate.c \ arc4random-compat.c \ arc4random_uniform.c \ assert.c \ - auxv.c \ basename.c \ basename_compat.c \ cap_sandboxed.c \ @@ -197,7 +196,6 @@ SYM_MAPS+=${LIBC_SRCTOP}/gen/Symbol.map MAN+= alarm.3 \ arc4random.3 \ - auxv.3 \ basename.3 \ cap_rights_get.3 \ cap_sandboxed.3 \ @@ -324,7 +322,6 @@ MAN+= alarm.3 \ MLINKS+=arc4random.3 arc4random_buf.3 \ arc4random.3 arc4random_uniform.3 -MLINKS+=auxv.3 elf_aux_info.3 MLINKS+=ctermid.3 ctermid_r.3 MLINKS+=daemon.3 daemonfd.3 MLINKS+=devname.3 devname_r.3 diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index ee23d6112e44..73b0f58e5f26 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -404,7 +404,6 @@ FBSD_1.5 { devname; devname_r; dirname; - elf_aux_info; fts_children; fts_close; fts_get_clientptr; @@ -582,7 +581,6 @@ FBSDprivate_1.0 { __libc_tcdrain; - __elf_aux_vector; __pthread_distribute_static_tls; __pthread_map_stacks_exec; __fillcontextx; diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index ef800e4d2445..e8db2a585ce4 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -44,6 +44,8 @@ SRCS+= recv.c recvmmsg.c send.c sendmmsg.c NOASM+= sched_getcpu.o PSEUDO+= _sched_getcpu.o +SRCS+= auxv.c + SRCS+= brk.c SRCS+= closefrom.c SRCS+= pipe.c @@ -166,6 +168,7 @@ MAN+= abort2.2 \ aio_suspend.2 \ aio_waitcomplete.2 \ aio_write.2 \ + auxv.3 \ bind.2 \ bindat.2 \ brk.2 \ @@ -378,6 +381,7 @@ MLINKS+=aio_write.2 aio_writev.2 MLINKS+=accept.2 accept4.2 MLINKS+=access.2 eaccess.2 \ access.2 faccessat.2 +MLINKS+=auxv.3 elf_aux_info.3 MLINKS+=brk.2 sbrk.2 MLINKS+=cap_enter.2 cap_getmode.2 MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2 diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index 3b207e59fec6..17731304d311 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -378,6 +378,7 @@ FBSD_1.4 { FBSD_1.5 { clock_nanosleep; + elf_aux_info; fdatasync; fhstat; fhstatfs; @@ -1049,10 +1050,12 @@ FBSDprivate_1.0 { __sys_writev; /* Things that aren't system calls (in sort(1) order) */ + __elf_aux_vector; __libc_sigwait; __libsys_interposing_slot; __set_error_selector; __sigwait; + _elf_aux_info; gssd_syscall; nlm_syscall; rpctls_syscall; diff --git a/lib/libc/gen/auxv.3 b/lib/libsys/auxv.3 similarity index 100% rename from lib/libc/gen/auxv.3 rename to lib/libsys/auxv.3 diff --git a/lib/libc/gen/auxv.c b/lib/libsys/auxv.c similarity index 100% rename from lib/libc/gen/auxv.c rename to lib/libsys/auxv.c From nobody Mon Feb 5 20:38:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB81w5tz58xx1; Mon, 5 Feb 2024 20:38: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 4TTJB808jLz4q1b; Mon, 5 Feb 2024 20:38:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0QeuY98Lqi7SimtuypefqUeNH8bpXNR+DoEr8YnCNac=; b=UV0FZJCpzJyJFrGT9AA4NcrCq2bDaiwXgYh+KMDQKD5yQZYaCFKaSxzj+05ORAme+kXLA2 AIzBIsWlxY6xrN/xaYc/6rCAsEYoZve98QcvdNdaLsqevHLUbugCMJ182ZhYEO0GvOLs6x T8ZpQvsuEL7fp1APjDRsSUVvqFf4Lek+pQGSL9ouTCwjLND5lUrkk14tXihreWhjTioa1K m1QRPMErp4f6UZg/3vKTStxm43HlaqHIAh+y3O3hKcCygYsGy+Ga/IpRYInWPYUA3xVlJ7 RQI19reipJYVqT/NuJYqjfybiMbhlGaFFATDhfQPFSWNoipfC0VH6l/2NdSwtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0QeuY98Lqi7SimtuypefqUeNH8bpXNR+DoEr8YnCNac=; b=Q6C79ZhXYRKG0r12a1RXTocJAfJS/YgmyIu85cV9tIohbwEjMXHuW/MVVZYWBzu7f1Sjo+ YFVqdRn1dNKYeKlNELhVmTHXQj3RvTksJmCqxwaOtz+itOA53MQJjD5dgYNXUxChG3JyLE eKTYh0XCGGzY1HAJyCrYs7+UsJfgWBz/1twy1MWn22Uc1YIiDPkX1nkVMsOLysC95FOBjU RfOEMcyvnxx0CNrOat4knPvssgsRdGrSts+E4Zd+s7JEWWauW/U7K//T/24vlknl2Q/+RG eVkZNfoMp2HuksHzkbQMpZRd5WaL35ilvKcy17UTPNL9jnDHNPJYGXlrrIEIMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165520; a=rsa-sha256; cv=none; b=JDvng36Yv+5worcNBsOTuiRhOcKcrEviawvrNft9r0Gnxfhul2tpejUJMvPeiRD17XbIFf AcihPd4V71esBUU+waqlUHmKD4eg5mhjUYxul+h55CdHE2gcCEf5y5R/kU8Qqbzt+5BmvL Jw29Zfs27oGi1mYaZ6pl7zPyuoiBP/Mf9/LUorjbMerAG1GdWz8om58LN2jVQlULosHJfL cX4ROH9cPIIYtnUSqMyRjkRpsqpHp9UvHTikQUBHtSii1oL7VO6kUrM/bu/YsxKsZKJn/4 o8Y7jRtoE9eysYVsPyEI39aEvHFs63m3Hyf1AY43AVnaoAWsw5IeSOnIPIhl7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJB76K3hzvP4; Mon, 5 Feb 2024 20:38: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 415Kcd4N069450; Mon, 5 Feb 2024 20:38:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcdDj069447; Mon, 5 Feb 2024 20:38:39 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:39 GMT Message-Id: <202402052038.415KcdDj069447@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: f70c5a0925c6 - main - libc: move getpagesize(s) to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f70c5a0925c621ce862327a1f335394e731fbaed Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f70c5a0925c621ce862327a1f335394e731fbaed commit f70c5a0925c621ce862327a1f335394e731fbaed Author: Brooks Davis AuthorDate: 2023-11-17 18:55:25 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libc: move getpagesize(s) to libsys Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/gen/Makefile.inc | 4 ---- lib/libc/gen/Symbol.map | 2 -- lib/libsys/Makefile.sys | 4 ++++ lib/libsys/Symbol.sys.map | 2 ++ lib/{libc/gen => libsys}/getpagesize.3 | 0 lib/{libc/gen => libsys}/getpagesize.c | 0 lib/{libc/gen => libsys}/getpagesizes.3 | 0 lib/{libc/gen => libsys}/getpagesizes.c | 0 8 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 64b3e99ec6c0..6d1f98c241d4 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -77,8 +77,6 @@ SRCS+= __getosreldate.c \ getmntinfo-compat11.c \ getnetgrent.c \ getosreldate.c \ - getpagesize.c \ - getpagesizes.c \ getpeereid.c \ getprogname.c \ getpwent.c \ @@ -241,8 +239,6 @@ MAN+= alarm.3 \ getmntinfo.3 \ getnetgrent.3 \ getosreldate.3 \ - getpagesize.3 \ - getpagesizes.3 \ getpass.3 \ getpeereid.3 \ getprogname.3 \ diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 73b0f58e5f26..7d1fe00284fd 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -159,7 +159,6 @@ FBSD_1.0 { endnetgrent; innetgr; getosreldate; - getpagesize; getpeereid; _getprogname; getprogname; @@ -339,7 +338,6 @@ FBSD_1.1 { FBSD_1.2 { cfmakesane; endutxent; - getpagesizes; getutxent; getutxid; getutxline; diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index e8db2a585ce4..e299396585b9 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -33,6 +33,8 @@ PSEUDO+= _clock_gettime.o _gettimeofday.o SRCS+= \ __error.c \ _once_stub.c \ + getpagesize.c \ + getpagesizes.c \ interposing_table.c SRCS+= getdents.c lstat.c mknod.c stat.c @@ -371,6 +373,8 @@ MAN+= abort2.2 \ _umtx_op.2 MAN+= \ + getpagesize.3 \ + getpagesizes.3 \ lockf.3 \ rfork_thread.3 \ sleep.3 \ diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index 17731304d311..34c5984ddde6 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -98,6 +98,7 @@ FBSD_1.0 { getgid; getgroups; getitimer; + getpagesize; getpeername; getpgid; getpgrp; @@ -331,6 +332,7 @@ FBSD_1.2 { cap_enter; cap_getmode; getloginclass; + getpagesizes; pdfork; pdgetpid; pdkill; diff --git a/lib/libc/gen/getpagesize.3 b/lib/libsys/getpagesize.3 similarity index 100% rename from lib/libc/gen/getpagesize.3 rename to lib/libsys/getpagesize.3 diff --git a/lib/libc/gen/getpagesize.c b/lib/libsys/getpagesize.c similarity index 100% rename from lib/libc/gen/getpagesize.c rename to lib/libsys/getpagesize.c diff --git a/lib/libc/gen/getpagesizes.3 b/lib/libsys/getpagesizes.3 similarity index 100% rename from lib/libc/gen/getpagesizes.3 rename to lib/libsys/getpagesizes.3 diff --git a/lib/libc/gen/getpagesizes.c b/lib/libsys/getpagesizes.c similarity index 100% rename from lib/libc/gen/getpagesizes.c rename to lib/libsys/getpagesizes.c From nobody Mon Feb 5 20:38:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJB94hf8z58xSp; Mon, 5 Feb 2024 20:38: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 4TTJB91T2Dz4q1n; Mon, 5 Feb 2024 20:38:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ng73KUuFJUeMGEbDOgv39eNj91v4Q2hqlM8glYFQujs=; b=qPVNq1oiANayZt6rPZNqDREokTvA1orNqaVeGHXc0f92XZXK6qvlA1dkGlwcvhY0YsvUfo 8xzPe9USKLSc+j+MF2lCfm0qy3bT4JerMadb24SG2bFsE4Av+LviVh3k1GmSvqjQ8yMkrj /9Hf1wutHmG/TNwGepM3ujyOl3Rn4Oa/N1Qc3fpYuu5kKhYVZgXOp5eYz1HFD2z9mb9O41 xUsPF3CoHhxJePglRTYSP+G0l6SypwPRga0hMaBMw5ubHKL1KiA7H/tHSBx47ipkGVEFVZ YV2hi2APEhS4K/o1SsTJm0YDTQhGAl3x6OtR8F/vEUVXO2HWXH8ZGsFDcHZQQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ng73KUuFJUeMGEbDOgv39eNj91v4Q2hqlM8glYFQujs=; b=RW5mrlQIcBe/Zj6m1U1+KJXVTJRkbjGhu3Pc72UUCflMYhJILFlxzXwpfHdlo28qpQzQsv fy70DxJpZ+TjDMMHrGtWHM8+IyzcgcJXMXormJugaSjybnAg9Qh39yv6V4jj2Rm6nRx8pb wCUyUSTIsjsFjlsnJyrm/UKJEz05q0l98MXp4FGWp/ypHom7H3uTEkZroAOPAHVK0uk7lF ls3ER8EUT2JkoHIKg95lKmyiqEXQWsREPdypZKi+yxEWclxrDMWGXbkXhOUwoTZcdX2O+M B+Tjp3memzuyPjKWVYH+A1sglUw1DUBZTRODoCQmsBfoH4zrJ/W1OQUswIklRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165521; a=rsa-sha256; cv=none; b=evKZrniD/dNZffg6xPC5Vmy+3pCCcWJSXiW8bjemfyG89iOJmthDZnLxGJQgldHH+Mic6D cSSin2u98tOsT4j2fQOIzlLAvpMyiEApwly4sJH3Trcmo/KoF1uOFP2WoO6xi4vi+UWSAT FxYYcpr7ZrLprOhfXLF0oCCKsnCpPh9oFuQXzKCujjA7UbIYqrFqppDjJJND6FxAhmIP3n /Fa0uR5j9EhQgp93Uv7A4cdAE6ChWwwVUhLKm439Yme86YuVMfK5cPE5fijXNfxjeKri77 Zf/mOGcH/O8BdGkq37U4SRO8O1x2k+1zmjFy0Hz9Nsvy1jPM21pUx69MpH2SNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJB90ZfCzvXY; Mon, 5 Feb 2024 20:38: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 415Kcepi069492; Mon, 5 Feb 2024 20:38:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcebP069489; Mon, 5 Feb 2024 20:38:40 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:40 GMT Message-Id: <202402052038.415KcebP069489@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: 10f1b536ad71 - main - libc: move __getosreldate to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10f1b536ad71fddc725da58d9e30a42fa66d183c Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=10f1b536ad71fddc725da58d9e30a42fa66d183c commit 10f1b536ad71fddc725da58d9e30a42fa66d183c Author: Brooks Davis AuthorDate: 2023-11-17 20:13:40 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libc: move __getosreldate to libsys Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/gen/Makefile.inc | 2 +- lib/libsys/Makefile.sys | 1 + lib/{libc/gen => libsys}/__getosreldate.c | 15 +-------------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 6d1f98c241d4..bbd090e46b27 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -6,7 +6,7 @@ CONFS+= group master.passwd shells CONFSMODE_master.passwd= 600 CONFSPACKAGE= runtime -SRCS+= __getosreldate.c \ +SRCS+= \ __pthread_mutex_init_calloc_cb_stub.c \ __xuname.c \ _pthread_stubs.c \ diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index e299396585b9..f7fd08f1702d 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -32,6 +32,7 @@ PSEUDO+= _clock_gettime.o _gettimeofday.o # Sources common to both syscall interfaces: SRCS+= \ __error.c \ + __getosreldate.c \ _once_stub.c \ getpagesize.c \ getpagesizes.c \ diff --git a/lib/libc/gen/__getosreldate.c b/lib/libsys/__getosreldate.c similarity index 83% rename from lib/libc/gen/__getosreldate.c rename to lib/libsys/__getosreldate.c index 053ec4c94a9b..0bb2efd2ba6a 100644 --- a/lib/libc/gen/__getosreldate.c +++ b/lib/libsys/__getosreldate.c @@ -44,23 +44,10 @@ int __getosreldate(void) { static int osreldate; - size_t len; - int oid[2]; - int error, osrel; if (osreldate != 0) return (osreldate); - error = _elf_aux_info(AT_OSRELDATE, &osreldate, sizeof(osreldate)); - if (error == 0 && osreldate != 0) - return (osreldate); - - oid[0] = CTL_KERN; - oid[1] = KERN_OSRELDATE; - osrel = 0; - len = sizeof(osrel); - error = sysctl(oid, 2, &osrel, &len, NULL, 0); - if (error == 0 && osrel > 0 && len == sizeof(osrel)) - osreldate = osrel; + (void)_elf_aux_info(AT_OSRELDATE, &osreldate, sizeof(osreldate)); return (osreldate); } From nobody Mon Feb 5 20:38:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJBB48YQz58y2T; Mon, 5 Feb 2024 20:38: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 4TTJBB2qhpz4qKh; Mon, 5 Feb 2024 20:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hXfvIiItcae46gKqwVGPf+7+mgO3/w5MuETHK5vJVbo=; b=VPmVWQLbF8ZrTqyFrOjnP4R+YPFS4IwCm6MZhULuEqr2aP/y442dJE9zsFiIFVr5pimpQi heiFx6ZVTsK7xhR/2WjwJw6ju/y5uupgZ4SzXudsOyEEkOiL8RUHff0Dn9Ob99erIX3YVU s3WhDBbkoBbAwMa91zS8vDaovXtHMkzkjVAkRn8avYShl5ymhJhmJK9mSpnluuL5CRJsTI eshpcnC9FxN8Y5EQrD+CuZNI2mjpCDmmyg0S12KTNdwB/Nry9SGbZD0ZMv4SaVspOYJCrw tVgDD0t5fWi2BC2uY+jB0HVEdLiTzFnnI8RNYtVBe3r7nVJ7yJzI8Gx2S6Rc7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hXfvIiItcae46gKqwVGPf+7+mgO3/w5MuETHK5vJVbo=; b=O+5+b7/Cn3kHmBrhnbXfIeA73aju3aXuTYiQN26zhBf59GcKggs6BJ97d4yteq9jm1ATY6 eXM/8LGG8n1e1MsW+eiNaSH7Ohs2R0v6kbINQ0zO7odu4eoU3MC4lWFgfvtEt40mtRGmge IwNN1KQbUjdhd8z180A03kQDBXIjLOoAVBivhtIcPGVmbb81Ze/zE+X+CmoD9htUr1lLiV VXeL9o7fw6ScB+Yrf2sJvVQCsnTZcgV3fdHWMbloOHLXtGsMjlHzZ+ADgxO9aWh69CqXUh amWpcNH0ACYdnxioEJOxNNb2zy7lHx325TJRSd6RBZfSgm1X2DjYtF1Z5giNqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165522; a=rsa-sha256; cv=none; b=cjk89sTG72NLFoCah5Netn+F28ldfHsEcwl3nG7HjQGLqDafKjClOl+9XNv96wwqpd6g1w hT9GKnh3F6U+9mJxxTvGVZ+lagHX/QQHBwFt9fHVorgH3uvEE0zCO0YMXtjo96lqdtr/0S 4kHdpnshSY3Ie670VogiGJi0mAyRNMkZxJAdYDifh4nPsyiFgcBYfP37gvMPRinXgz3Euu Q3xHEtESbBRjuiIcn8RsOeLM+BbtSedqMMngYuVP2Ld5DKRekHn0U82opQa7esET/zsgvo k3i9fhuEXl4IIYdhn136bpm39GEN8Ft2KLZs/hV+z97Gkgpf2/2vPNBu9lj6uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJBB1fJtzvMG; Mon, 5 Feb 2024 20:38: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 415KcgSA069534; Mon, 5 Feb 2024 20:38:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcgXg069531; Mon, 5 Feb 2024 20:38:42 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:42 GMT Message-Id: <202402052038.415KcgXg069531@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: b71defdbd871 - main - makesyscalls: generate private syscall symbols List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b71defdbd8715c1a778ebf8195e41b1c6db90d6c Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b71defdbd8715c1a778ebf8195e41b1c6db90d6c commit b71defdbd8715c1a778ebf8195e41b1c6db90d6c Author: Brooks Davis AuthorDate: 2023-11-21 16:55:06 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 makesyscalls: generate private syscall symbols For libsys we need to expose all the private symbols (_ and __sys_ prefixes) so libsys can replace the libc versions. Rather than trying to maintain a table, teach makesyscalls to generate it. There are a small number of "_" prefixed symbols that are exposed as public interfaces rather than in the private symbol space. Since the list is short, just hardcode it for now. If doesn't appear that we need to export freebsd#_foo symbols for compat system calls explicitly. If it turns out we do, there are probably few enough of them to handle seperately. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- sys/tools/makesyscalls.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 393fe57713aa..1c80aa44c1a7 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -42,6 +42,7 @@ local generated_tag = "@" .. "generated" local config = { os_id_keyword = "FreeBSD", -- obsolete, ignored on input, not generated abi_func_prefix = "", + libsysmap = "/dev/null", sysnames = "syscalls.c", sysproto = "../sys/sysproto.h", sysproto_h = "_SYS_SYSPROTO_H_", @@ -85,6 +86,7 @@ local output_files = { "sysnames", "syshdr", "sysmk", + "libsysmap", "syssw", "systrace", "sysproto", @@ -922,6 +924,12 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, config.syscallprefix, funcalias, sysnum)) write_line("sysmk", string.format(" \\\n\t%s.o", funcalias)) + if funcalias ~= "exit" and funcalias ~= "getlogin" and funcalias ~= "vfork" then + write_line("libsysmap", string.format("\t_%s;\n", + funcalias)) + end + write_line("libsysmap", string.format("\t__sys_%s;\n", + funcalias)) end end @@ -1485,6 +1493,13 @@ write_line("sysmk", string.format([[# FreeBSD system call object files. # DO NOT EDIT-- this file is automatically %s. MIASM = ]], generated_tag)) +write_line("libsysmap", string.format([[/* + * FreeBSD system call symbols. + * DO NOT EDIT-- this file is automatically %s. + */ +FBSDprivate_1.0 { +]], generated_tag)) + write_line("systrace", string.format([[/* * System call argument to DTrace register array converstion. * @@ -1548,6 +1563,7 @@ write_line("sysprotoend", string.format([[ ]], config.sysproto_h)) write_line("sysmk", "\n") +write_line("libsysmap", "};\n") write_line("sysent", "};\n") write_line("sysnames", "};\n") -- maxsyscall is the highest seen; MAXSYSCALL should be one higher From nobody Mon Feb 5 20:38:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJBC5ln6z58xll; Mon, 5 Feb 2024 20:38: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 4TTJBC39vmz4q6T; Mon, 5 Feb 2024 20:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CKlUmqePXFMIG+zw6PiuI+EFqCU6+5S3GtPHWwLhyA=; b=cQ5Zy16Q8XELfMfwlv78gWd/BRwQTnP3H/Ic25xSw73IURhwec7qN9LSYu+lN3s38/IaqY s0DnR/MKbanBNE+didNOU3RBFnMNP42+pP74ictIO7gU+5MfZBQj2gn4V/4c28zCci9pRA yV5n/l5PQUGn4Y/uCtNCYlNXhpkVfCg8OQdb7wD6V/Souhq1cl9z92GwIr+oY+Hf2K8RS/ ReAZhOT1xrLqf4fNSWyJaOoOXXYelgfH1GPZZVuVd4qFSzmohpqa/55hsm/ZOXklCiysLW ScOKZqllWI9owaU5uk8imue23tS/t2Wz1YPmU5IEL0MJUFfU6nHR2goDshA+mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CKlUmqePXFMIG+zw6PiuI+EFqCU6+5S3GtPHWwLhyA=; b=UcaeHO5qtIoSnMhYraDCi9lSZZTKdzMW0B3/DNkz+zM+ky2KdBf9BTdmWf1cJH4aiBbIEP +K6xsVBCR9NVTKMzaC1UdeTkgLfrK7g7hkZEQNB/fLkSTVXeUZi1RL3EHijj3LAHZ5ahjm 5yRS9PV9fmJbk/hGjVfrcgDl9Y6xIiJTrEgCEn1CycXHXiC/iM5lPuPTSoCCoAYNdDGSVi EDSQLavem6R7xS6dU/Yxg38MwhPDE7MPOqn+7B63tAIxxTSo1Y3b1FMusRehWkQ75oRhwN XNmV7pQ5hfFcgbxnyYvKbQut409mbat/NUQlxrN0gcIUc/Z5shXSAwk2WDZAUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165523; a=rsa-sha256; cv=none; b=jwbbCjvEAvDOxzoG60UzC97e47wZeO4ed9Q//9zDCLdH3//7MopGyLoqBFqe/LoO4qViH7 /D6nyrZVn2bFfpn6Yboje6J4l3yJi56z93aEigzqsmAKMNefTKKmDsrfgSOttCl+epKfIK BioOBQQ1DuUozvOXnlaaJOYoLlKWyPpFEvdBUQuvqKVuhpDPPfnM7PGHQoHt9u156GLNFA JPxA6xFfBHe4HgKF3vKRO7Z578f0nAdYBtUerWQhReK3oNaagcq8/PGiwXs6EfGF6tHB7O l7HxxU7fXDUpstyYUjfLPcMOmvR0Jdpq9G2tXmR2g7mw26+TZe3QNP7RudZ5xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJBC2GThzvm3; Mon, 5 Feb 2024 20:38: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 415KchFk069581; Mon, 5 Feb 2024 20:38:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415Kch0T069578; Mon, 5 Feb 2024 20:38:43 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:43 GMT Message-Id: <202402052038.415Kch0T069578@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: 86deddfacb6f - main - libsys: generate private symbol map List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86deddfacb6f66549303c1cea241a55de25fc0c2 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=86deddfacb6f66549303c1cea241a55de25fc0c2 commit 86deddfacb6f66549303c1cea241a55de25fc0c2 Author: Brooks Davis AuthorDate: 2023-11-21 18:30:00 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libsys: generate private symbol map We now export all _ and __sys_ prefixed syscalls stubs from libc and libsys so that libsys can replace them. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libsys/Makefile.sys | 1 + lib/libsys/Symbol.sys.map | 621 +---------------------------------- lib/libsys/syscalls.map | 805 ++++++++++++++++++++++++++++++++++++++++++++++ sys/kern/syscalls.conf | 1 + 4 files changed, 808 insertions(+), 620 deletions(-) diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index f7fd08f1702d..c2373b972bb1 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -122,6 +122,7 @@ SPSEUDO= ${PSEUDO:S/.o/.S/} SRCS+= ${SASM} ${SPSEUDO} +SYM_MAPS+= ${LIBSYS_SRCTOP}/syscalls.map SYM_MAPS+= ${LIBSYS_SRCTOP}/Symbol.sys.map .if exists(${LIBSYS_SRCTOP}/${LIBC_ARCH}/Symbol.sys.map) SYM_MAPS+= ${LIBSYS_SRCTOP}/${LIBC_ARCH}/Symbol.sys.map diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index 34c5984ddde6..73a1cf297ca0 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -432,626 +432,7 @@ FBSD_1.8 { }; FBSDprivate_1.0 { - /* System call stubs */ - ___acl_aclcheck_fd; - __sys___acl_aclcheck_fd; - ___acl_aclcheck_file; - __sys___acl_aclcheck_file; - ___acl_aclcheck_link; - __sys___acl_aclcheck_link; - ___acl_delete_fd; - __sys___acl_delete_fd; - ___acl_delete_file; - __sys___acl_delete_file; - ___acl_delete_link; - __sys___acl_delete_link; - ___acl_get_fd; - __sys___acl_get_fd; - ___acl_get_file; - __sys___acl_get_file; - ___acl_get_link; - __sys___acl_get_link; - ___acl_set_fd; - __sys___acl_set_fd; - ___acl_set_file; - __sys___acl_set_file; - ___acl_set_link; - __sys___acl_set_link; - ___getcwd; - __sys___getcwd; - ___mac_execve; - __sys___mac_execve; - ___mac_get_fd; - __sys___mac_get_fd; - ___mac_get_file; - __sys___mac_get_file; - ___mac_get_link; - __sys___mac_get_link; - ___mac_get_pid; - __sys___mac_get_pid; - ___mac_get_proc; - __sys___mac_get_proc; - ___mac_set_fd; - __sys___mac_set_fd; - ___mac_set_file; - __sys___mac_set_file; - ___mac_set_link; - __sys___mac_set_link; - ___mac_set_proc; - __sys___mac_set_proc; - ___semctl; - __sys___semctl; - ___setugid; - __sys___setugid; - ___syscall; - __sys___syscall; - ___sysctl; - __sys___sysctl; - __umtx_op; - __sys__umtx_op; - _abort2; - __sys_abort2; - _accept; - __sys_accept; - _accept4; - __sys_accept4; - _access; - __sys_access; - _acct; - __sys_acct; - _adjtime; - __sys_adjtime; - __sys_aio_cancel; - __sys_aio_error; - __sys_aio_fsync; - __sys_aio_read; - __sys_aio_readv; - __sys_aio_return; - __sys_aio_suspend; - __sys_aio_waitcomplete; - __sys_aio_write; - __sys_aio_writev; - _audit; - __sys_audit; - _auditctl; - __sys_auditctl; - _auditon; - __sys_auditon; - _bind; - __sys_bind; - _chdir; - __sys_chdir; - _chflags; - __sys_chflags; - _chmod; - __sys_chmod; - _chown; - __sys_chown; - _chroot; - __sys_chroot; - _clock_getcpuclockid2; - __sys_clock_getcpuclockid2; - _clock_getres; - __sys_clock_getres; - _clock_gettime; - __sys_clock_gettime; - __sys_clock_nanosleep; - _clock_settime; - __sys_clock_settime; - _close; - __sys_close; - _connect; - __sys_connect; - _cpuset; - __sys_cpuset; - _cpuset_getdomain; - __sys_cpuset_getdomain; - _cpuset_getid; - __sys_cpuset_getid; - _cpuset_setdomain; - __sys_cpuset_setdomain; - _cpuset_setid; - __sys_cpuset_setid; - _cpuset_getaffinity; - __sys_cpuset_getaffinity; - _cpuset_setaffinity; - __sys_cpuset_setaffinity; - _dup; - __sys_dup; - _dup2; - __sys_dup2; - _eaccess; - __sys_eaccess; - _execve; - __sys_execve; - _extattr_delete_fd; - __sys_extattr_delete_fd; - _extattr_delete_file; - __sys_extattr_delete_file; - _extattr_delete_link; - __sys_extattr_delete_link; - _extattr_get_fd; - __sys_extattr_get_fd; - _extattr_get_file; - __sys_extattr_get_file; - _extattr_get_link; - __sys_extattr_get_link; - _extattr_list_fd; - __sys_extattr_list_fd; - _extattr_list_file; - __sys_extattr_list_file; - _extattr_list_link; - __sys_extattr_list_link; - _extattr_set_fd; - __sys_extattr_set_fd; - _extattr_set_file; - __sys_extattr_set_file; - _extattr_set_link; - __sys_extattr_set_link; - _extattrctl; - __sys_extattrctl; - __sys_sigfastblock; - _fchdir; - __sys_fchdir; - _fchflags; - __sys_fchflags; - _fchmod; - __sys_fchmod; - _fchown; - __sys_fchown; - _fcntl; - __sys_fcntl; - _fhopen; - __sys_fhopen; - _fhstat; - __sys_fhstat; - _fhstatfs; - __sys_fhstatfs; - _flock; - __sys_flock; - _fork; - __sys_fork; - _fpathconf; - __sys_fpathconf; - _fstat; - __sys_fstat; - _fstatfs; - __sys_fstatfs; - _fsync; - __sys_fsync; - _fdatasync; - __sys_fdatasync; - _futimes; - __sys_futimes; - _getaudit; - __sys_getaudit; - _getaudit_addr; - __sys_getaudit_addr; - _getauid; - __sys_getauid; - _getcontext; - __sys_getcontext; - _getdirentries; - __sys_getdirentries; - _getdtablesize; - __sys_getdtablesize; - _getegid; - __sys_getegid; - _geteuid; - __sys_geteuid; - _getfh; - __sys_getfh; - _getfsstat; - __sys_getfsstat; - _getgid; - __sys_getgid; - _getgroups; - __sys_getgroups; - _getitimer; - __sys_getitimer; - _getpeername; - __sys_getpeername; - _getpgid; - __sys_getpgid; - _getpgrp; - __sys_getpgrp; - _getpid; - __sys_getpid; - _getppid; - __sys_getppid; - _getpriority; - __sys_getpriority; - _getresgid; - __sys_getresgid; - _getresuid; - __sys_getresuid; - _getrlimit; - __sys_getrlimit; - _getrusage; - __sys_getrusage; - _getsid; - __sys_getsid; - _getsockname; - __sys_getsockname; - _getsockopt; - __sys_getsockopt; - _gettimeofday; - __sys_gettimeofday; - _getuid; - __sys_getuid; - _ioctl; - __sys_ioctl; - _issetugid; - __sys_issetugid; - _jail; - __sys_jail; - _jail_attach; - __sys_jail_attach; - _kenv; - __sys_kenv; - _kevent; - __sys_kevent; - _kill; - __sys_kill; - _kldfind; - __sys_kldfind; - _kldfirstmod; - __sys_kldfirstmod; - _kldload; - __sys_kldload; - _kldnext; - __sys_kldnext; - _kldstat; - __sys_kldstat; - _kldsym; - __sys_kldsym; - _kldunload; - __sys_kldunload; - _kldunloadf; - __sys_kldunloadf; - _kmq_notify; - __sys_kmq_notify; - _kmq_open; - __sys_kmq_open; - _kmq_setattr; - __sys_kmq_setattr; - _kmq_timedreceive; - __sys_kmq_timedreceive; - _kmq_timedsend; - __sys_kmq_timedsend; - _kmq_unlink; - __sys_kmq_unlink; - _kqueue; - __sys_kqueue; - _ksem_close; - __sys_ksem_close; - _ksem_destroy; - __sys_ksem_destroy; - _ksem_getvalue; - __sys_ksem_getvalue; - _ksem_init; - __sys_ksem_init; - _ksem_open; - __sys_ksem_open; - _ksem_post; - __sys_ksem_post; - _ksem_timedwait; - __sys_ksem_timedwait; - _ksem_trywait; - __sys_ksem_trywait; - _ksem_unlink; - __sys_ksem_unlink; - _ksem_wait; - __sys_ksem_wait; - _ktrace; - __sys_ktrace; - _lchflags; - __sys_lchflags; - _lchmod; - __sys_lchmod; - _lchown; - __sys_lchown; - _lgetfh; - __sys_lgetfh; - _link; - __sys_link; - __sys_lio_listio; - _listen; - __sys_listen; - _lutimes; - __sys_lutimes; - _mac_syscall; - __sys_mac_syscall; - _madvise; - __sys_madvise; - _mincore; - __sys_mincore; - _minherit; - __sys_minherit; - _mkdir; - __sys_mkdir; - _mkfifo; - __sys_mkfifo; - _mknod; - __sys_mknod; - _mlock; - __sys_mlock; - _mlockall; - __sys_mlockall; - _mmap; - __sys_mmap; - _modfind; - __sys_modfind; - _modfnext; - __sys_modfnext; - _modnext; - __sys_modnext; - _modstat; - __sys_modstat; - _mount; - __sys_mount; - _mprotect; - __sys_mprotect; - _msgctl; - __sys_msgctl; - _msgget; - __sys_msgget; - _msgrcv; - __sys_msgrcv; - _msgsnd; - __sys_msgsnd; - _msgsys; - __sys_msgsys; - _msync; - __sys_msync; - _munlock; - __sys_munlock; - _munlockall; - __sys_munlockall; - _munmap; - __sys_munmap; - _nanosleep; - __sys_nanosleep; - _nfssvc; - __sys_nfssvc; - _nmount; - __sys_nmount; - _ntp_adjtime; - __sys_ntp_adjtime; - _ntp_gettime; - __sys_ntp_gettime; - _open; - __sys_open; - _openat; - __sys_openat; - _pathconf; - __sys_pathconf; - __sys_pdfork; - _pipe; - __sys_pipe; - _poll; - __sys_poll; - _ppoll; - __sys_ppoll; - _preadv; - __sys_preadv; - _procctl; - __sys_procctl; - _profil; - __sys_profil; - _pselect; - __sys_pselect; - _ptrace; - __sys_ptrace; - _pwritev; - __sys_pwritev; - _quotactl; - __sys_quotactl; - _read; - __sys_read; - _readlink; - __sys_readlink; - _readv; - __sys_readv; - _reboot; - __sys_reboot; - _recvfrom; - __sys_recvfrom; - _recvmsg; - __sys_recvmsg; - _rename; - __sys_rename; - _revoke; - __sys_revoke; - _rfork; - __sys_rfork; - _rmdir; - __sys_rmdir; - _rtprio; - __sys_rtprio; - _rtprio_thread; - __sys_rtprio_thread; - _sched_get_priority_max; - __sys_sched_get_priority_max; - _sched_get_priority_min; - __sys_sched_get_priority_min; - _sched_getparam; - __sys_sched_getparam; - _sched_getscheduler; - __sys_sched_getscheduler; - _sched_rr_get_interval; - __sys_sched_rr_get_interval; - _sched_setparam; - __sys_sched_setparam; - _sched_setscheduler; - __sys_sched_setscheduler; - _sched_yield; - __sys_sched_yield; - _select; - __sys_select; - _semget; - __sys_semget; - _semop; - __sys_semop; - _semsys; - __sys_semsys; - _sendfile; - __sys_sendfile; - _sendmsg; - __sys_sendmsg; - _sendto; - __sys_sendto; - _setaudit; - __sys_setaudit; - _setaudit_addr; - __sys_setaudit_addr; - _setauid; - __sys_setauid; - _setcontext; - __sys_setcontext; - _setegid; - __sys_setegid; - _seteuid; - __sys_seteuid; - _setgid; - __sys_setgid; - _setgroups; - __sys_setgroups; - _setitimer; - __sys_setitimer; - _setlogin; - __sys_setlogin; - _setpgid; - __sys_setpgid; - _setpriority; - __sys_setpriority; - _setregid; - __sys_setregid; - _setresgid; - __sys_setresgid; - _setresuid; - __sys_setresuid; - _setreuid; - __sys_setreuid; - _setrlimit; - __sys_setrlimit; - _setsid; - __sys_setsid; - _setsockopt; - __sys_setsockopt; - _settimeofday; - __sys_settimeofday; - _setuid; - __sys_setuid; - _shm_open; - __sys_shm_open; - __sys_shm_open2; - _shm_unlink; - __sys_shm_unlink; - _shmat; - __sys_shmat; - _shmctl; - __sys_shmctl; - _shmdt; - __sys_shmdt; - _shmget; - __sys_shmget; - _shmsys; - __sys_shmsys; - _shutdown; - __sys_shutdown; - _sigaction; - __sys_sigaction; - _sigaltstack; - __sys_sigaltstack; - _sigpending; - __sys_sigpending; - _sigprocmask; - __sys_sigprocmask; - _sigqueue; - __sys_sigqueue; - _sigreturn; - __sys_sigreturn; - _sigsuspend; - __sys_sigsuspend; - _sigtimedwait; - __sys_sigtimedwait; - _sigwait; - __sys_sigwait; - _sigwaitinfo; - __sys_sigwaitinfo; - _socket; - __sys_socket; - _socketpair; - __sys_socketpair; - _statfs; - __sys_statfs; - _swapcontext; - __sys_swapcontext; - _swapoff; - __sys_swapoff; - _swapon; - __sys_swapon; - _symlink; - __sys_symlink; - _sync; - __sys_sync; - _sysarch; - __sys_sysarch; - _syscall; - __sys_syscall; - _thr_create; - __sys_thr_create; - _thr_exit; - __sys_thr_exit; - _thr_kill; - __sys_thr_kill; - _thr_kill2; - __sys_thr_kill2; - _thr_new; - __sys_thr_new; - _thr_self; - __sys_thr_self; - _thr_set_name; - __sys_thr_set_name; - _thr_suspend; - __sys_thr_suspend; - _thr_wake; - __sys_thr_wake; - _ktimer_create; - __sys_ktimer_create; - _ktimer_delete; - __sys_ktimer_delete; - _ktimer_getoverrun; - __sys_ktimer_getoverrun; - _ktimer_gettime; - __sys_ktimer_gettime; - _ktimer_settime; - __sys_ktimer_settime; - _umask; - __sys_umask; - _undelete; - __sys_undelete; - _unlink; - __sys_unlink; - _unmount; - __sys_unmount; - _utimes; - __sys_utimes; - _utrace; - __sys_utrace; - _uuidgen; - __sys_uuidgen; - _wait4; - __sys_wait4; - _wait6; - __sys_wait6; - _write; - __sys_write; - _writev; - __sys_writev; - - /* Things that aren't system calls (in sort(1) order) */ + /* Add entries in sort(1) order */ __elf_aux_vector; __libc_sigwait; __libsys_interposing_slot; diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map new file mode 100644 index 000000000000..f96647652430 --- /dev/null +++ b/lib/libsys/syscalls.map @@ -0,0 +1,805 @@ +/* + * FreeBSD system call symbols. + * DO NOT EDIT-- this file is automatically @generated. + */ +FBSDprivate_1.0 { + _syscall; + __sys_syscall; + __sys_exit; + _fork; + __sys_fork; + _read; + __sys_read; + _write; + __sys_write; + _open; + __sys_open; + _close; + __sys_close; + _wait4; + __sys_wait4; + _link; + __sys_link; + _unlink; + __sys_unlink; + _chdir; + __sys_chdir; + _fchdir; + __sys_fchdir; + _chmod; + __sys_chmod; + _chown; + __sys_chown; + _break; + __sys_break; + _getpid; + __sys_getpid; + _mount; + __sys_mount; + _unmount; + __sys_unmount; + _setuid; + __sys_setuid; + _getuid; + __sys_getuid; + _geteuid; + __sys_geteuid; + _ptrace; + __sys_ptrace; + _recvmsg; + __sys_recvmsg; + _sendmsg; + __sys_sendmsg; + _recvfrom; + __sys_recvfrom; + _accept; + __sys_accept; + _getpeername; + __sys_getpeername; + _getsockname; + __sys_getsockname; + _access; + __sys_access; + _chflags; + __sys_chflags; + _fchflags; + __sys_fchflags; + _sync; + __sys_sync; + _kill; + __sys_kill; + _getppid; + __sys_getppid; + _dup; + __sys_dup; + _getegid; + __sys_getegid; + _profil; + __sys_profil; + _ktrace; + __sys_ktrace; + _getgid; + __sys_getgid; + __sys_getlogin; + _setlogin; + __sys_setlogin; + _acct; + __sys_acct; + _sigaltstack; + __sys_sigaltstack; + _ioctl; + __sys_ioctl; + _reboot; + __sys_reboot; + _revoke; + __sys_revoke; + _symlink; + __sys_symlink; + _readlink; + __sys_readlink; + _execve; + __sys_execve; + _umask; + __sys_umask; + _chroot; + __sys_chroot; + _msync; + __sys_msync; + __sys_vfork; + _munmap; + __sys_munmap; + _mprotect; + __sys_mprotect; + _madvise; + __sys_madvise; + _mincore; + __sys_mincore; + _getgroups; + __sys_getgroups; + _setgroups; + __sys_setgroups; + _getpgrp; + __sys_getpgrp; + _setpgid; + __sys_setpgid; + _setitimer; + __sys_setitimer; + _swapon; + __sys_swapon; + _getitimer; + __sys_getitimer; + _getdtablesize; + __sys_getdtablesize; + _dup2; + __sys_dup2; + _fcntl; + __sys_fcntl; + _select; + __sys_select; + _fsync; + __sys_fsync; + _setpriority; + __sys_setpriority; + _socket; + __sys_socket; + _connect; + __sys_connect; + _getpriority; + __sys_getpriority; + _bind; + __sys_bind; + _setsockopt; + __sys_setsockopt; + _listen; + __sys_listen; + _gettimeofday; + __sys_gettimeofday; + _getrusage; + __sys_getrusage; + _getsockopt; + __sys_getsockopt; + _readv; + __sys_readv; + _writev; + __sys_writev; + _settimeofday; + __sys_settimeofday; + _fchown; + __sys_fchown; + _fchmod; + __sys_fchmod; + _setreuid; + __sys_setreuid; + _setregid; + __sys_setregid; + _rename; + __sys_rename; + _flock; + __sys_flock; + _mkfifo; + __sys_mkfifo; + _sendto; + __sys_sendto; + _shutdown; + __sys_shutdown; + _socketpair; + __sys_socketpair; + _mkdir; + __sys_mkdir; + _rmdir; + __sys_rmdir; + _utimes; + __sys_utimes; + _adjtime; + __sys_adjtime; + _setsid; + __sys_setsid; + _quotactl; + __sys_quotactl; + _nlm_syscall; + __sys_nlm_syscall; + _nfssvc; + __sys_nfssvc; + _lgetfh; + __sys_lgetfh; + _getfh; + __sys_getfh; + _sysarch; + __sys_sysarch; + _rtprio; + __sys_rtprio; + _semsys; + __sys_semsys; + _msgsys; + __sys_msgsys; + _shmsys; + __sys_shmsys; + _setfib; + __sys_setfib; + _ntp_adjtime; + __sys_ntp_adjtime; + _setgid; + __sys_setgid; + _setegid; + __sys_setegid; + _seteuid; + __sys_seteuid; + _pathconf; + __sys_pathconf; + _fpathconf; + __sys_fpathconf; + _getrlimit; + __sys_getrlimit; + _setrlimit; + __sys_setrlimit; + ___syscall; + __sys___syscall; + ___sysctl; + __sys___sysctl; + _mlock; + __sys_mlock; + _munlock; + __sys_munlock; + _undelete; + __sys_undelete; + _futimes; + __sys_futimes; + _getpgid; + __sys_getpgid; + _poll; + __sys_poll; + _semget; + __sys_semget; + _semop; + __sys_semop; + _msgget; + __sys_msgget; + _msgsnd; + __sys_msgsnd; + _msgrcv; + __sys_msgrcv; + _shmat; + __sys_shmat; + _shmdt; + __sys_shmdt; + _shmget; + __sys_shmget; + _clock_gettime; + __sys_clock_gettime; + _clock_settime; + __sys_clock_settime; + _clock_getres; + __sys_clock_getres; + _ktimer_create; + __sys_ktimer_create; + _ktimer_delete; + __sys_ktimer_delete; + _ktimer_settime; + __sys_ktimer_settime; + _ktimer_gettime; + __sys_ktimer_gettime; + _ktimer_getoverrun; + __sys_ktimer_getoverrun; + _nanosleep; + __sys_nanosleep; + _ffclock_getcounter; + __sys_ffclock_getcounter; + _ffclock_setestimate; + __sys_ffclock_setestimate; + _ffclock_getestimate; + __sys_ffclock_getestimate; + _clock_nanosleep; + __sys_clock_nanosleep; + _clock_getcpuclockid2; + __sys_clock_getcpuclockid2; + _ntp_gettime; + __sys_ntp_gettime; + _minherit; + __sys_minherit; + _rfork; + __sys_rfork; + _issetugid; + __sys_issetugid; + _lchown; + __sys_lchown; + _aio_read; + __sys_aio_read; + _aio_write; + __sys_aio_write; + _lio_listio; + __sys_lio_listio; + _lchmod; + __sys_lchmod; *** 500 LINES SKIPPED *** From nobody Mon Feb 5 20:38:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJBD6zkSz58xr8; Mon, 5 Feb 2024 20:38: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 4TTJBD5nSfz4qQd; Mon, 5 Feb 2024 20:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vq0jq/cGsyOxaNlBDFEpGckoOCyP2G2fHvvojV4SbQ8=; b=RQWm2Fe1dptW5EUWFqTJ0KE2xWMceKkHq44wGxVC8oNXIHG1VRt5200f26nHJ+To44vlOm GLfwYE6ZkUCc/vYtBlMRKhk5vxkX9jZCujorBWS4+3z515FZUqe6ZKBNU1DYcUoZUyn8PR 0b/q7yl2VvAwopRIkVF4StE2SNr5FTWFrRroax7zLZLdRvESD/ZNqAxHknFXDSXeYRXhph uqk6ExYEpXntsaEw2KKPImzmVXsp8CYZWjMheFF3jwxWQ5/VOvG/j5y+Nk597I5eJke7mx EmcPLqZdW+ZiDMfHRWFcbqLsz1ZLA+fDkgv+v/lkg9uKPUdI2FFbqvNtau61gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vq0jq/cGsyOxaNlBDFEpGckoOCyP2G2fHvvojV4SbQ8=; b=sMBsMh3mGgjOwcAJjsmrsQjjV9K0bbHXJOjd5eXh8jq0VPhSrxL2OHeiLB2aAYWJvT1S3S 6lg0P4GWv6iafqmAYHxU00/GJ0nlXInweroyxv9HcFpr94YrnJxBHZdmt8dNvCgnJJvvjO nHh/QivW0ssfrwPgKapoNuBTPjBwbGxlT9m/bexoKqSEgO2WVG/IoefssiXMXjIKdC9x7q gTNhBmdyH7v4xLTFwBgBHXigYS+ot3NCac6NJDaKmOBCbIabSGjdKFNqXepTsUIIGNSaPX ZG1pUW5dycV1uKsOiX5ccpF+2T5R6ZrlHNKiJyc1m1nC0XAvS9CNi/hCsOR7EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165524; a=rsa-sha256; cv=none; b=wZh+T+aYbOKfiD2jgQm9AjFy2Y5oldgzfR2rl57fZI3G/hZ6qq+GJicwTMQaLDLu45I3hP tcLG9Tfhpz7JbchAgvJ09k9b46/+xvTeHAy8R9GinbPzQBhmeKCoZqKUxjvn5isLGkufkI BkFdA1AszSCKiWCeZQq4DuTAJkGJmJosKHaOONDFYcWAqNQZfRw+oGg5FGAs3aJNSwFNYM jGFURI/WLq3+sNrJVY4EwGj8e+yk+7Ls9448uxkN/27yf+5uNb+S1TLDaCREaOixqjoN5c CDc97LqUCNMuGHeG6XoeSJ/uVb87jvapk+p2bNUxQ1mN7o9m4bSdtuMqjRH25w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJBD38fBzvlj; Mon, 5 Feb 2024 20:38: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 415KciHm069624; Mon, 5 Feb 2024 20:38:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415Kciv9069621; Mon, 5 Feb 2024 20:38:44 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:44 GMT Message-Id: <202402052038.415Kciv9069621@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: e9d961055aa2 - main - libsys: plumb in to build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9d961055aa2502f4915611e8fb2e9f9f9c86719 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e9d961055aa2502f4915611e8fb2e9f9f9c86719 commit e9d961055aa2502f4915611e8fb2e9f9f9c86719 Author: Brooks Davis AuthorDate: 2023-11-15 23:31:57 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libsys: plumb in to build libsys provides the FreeBSD kernel interface (auxargs, system calls, vdso). It can be linked directly for programs using a non-standard libc and will later be linked as a filter library to libc providing the actual system call implementation. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/Makefile | 3 ++ lib/libsys/Makefile | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/libsys/Makefile.sys | 2 ++ share/mk/src.libnames.mk | 11 ++++++++ 4 files changed, 89 insertions(+) diff --git a/lib/Makefile b/lib/Makefile index 4b1bda780b2d..db07883e2b10 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -19,6 +19,7 @@ SUBDIR_BOOTSTRAP= \ libelf \ libssp \ libssp_nonshared \ + libsys \ msun # The main list; please keep these sorted alphabetically. @@ -137,6 +138,8 @@ SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd SUBDIR_DEPEND_libsmb= libkiconv +# See comment above about libssp_nonshared +SUBDIR_DEPEND_libsys= libcompiler_rt libssp_nonshared SUBDIR_DEPEND_libtacplus= libmd SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libunbound= ${_libldns} diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile new file mode 100644 index 000000000000..45d3fec14300 --- /dev/null +++ b/lib/libsys/Makefile @@ -0,0 +1,73 @@ +PACKAGE= clibs +SHLIBDIR?= /lib + +.include + +LIBC_SRCTOP?= ${.CURDIR}/../libc +LIBSYS_SRCTOP?= ${.CURDIR} + +# Pick the current architecture directory for libsys. In general, this is named +# MACHINE_CPUARCH, but some ABIs are different enough to require their own +# libsys, so allow a directory named MACHINE_ARCH to override this (though +# treat powerpc64le and powerpc64 the same). +# Note: This is copied from libc/Makefile +M=${MACHINE_ARCH:S/powerpc64le/powerpc64/} +.if exists(${LIBC_SRCTOP}/${M}) +LIBC_ARCH=${M} +.else +LIBC_ARCH=${MACHINE_CPUARCH} +.endif + +LIB=sys +SHLIB_MAJOR= 7 +WARNS?= 2 + +CFLAGS+=-I${LIBSYS_SRCTOP}/include -I${LIBC_SRCTOP}/include +CFLAGS+=-I${LIBSYS_SRCTOP}/${LIBC_ARCH} +CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} + +CLEANFILES+=tags +INSTALL_PIC_ARCHIVE= +#XXX? BUILD_NOSSP_PIC_ARCHIVE= +PRECIOUSLIB= + +# Use a more efficient TLS model for libc since we can reasonably assume that +# it will be loaded during program startup. +CFLAGS+= -ftls-model=initial-exec + +# +# Link with static libcompiler_rt.a. +# +LDFLAGS+= -nodefaultlibs +LIBADD+= compiler_rt + +.if ${MK_SSP} != "no" && \ + (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") +LIBADD+= ssp_nonshared +.endif + +#.if ${MK_SSP} != "no" && \ +# (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") +#LIBADD+= ssp_nonshared +#.endif + +# Define (empty) variables so that make doesn't give substitution +# errors if the included makefiles don't change these: +MDASM= +MIASM= +NOASM= + +.include "${LIBSYS_SRCTOP}/Makefile.sys" + +VERSION_DEF=${LIBC_SRCTOP}/Versions.def +SYMBOL_MAPS=${SYM_MAPS} + +# XXX: let libc install the manpages for now +MAN= +MLINKS= + +# XXX: move sys tests? +#HAS_TESTS= +#SUBDIR.${MK_TESTS}+= tests + +.include diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index c2373b972bb1..f88a107f9eb8 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -158,6 +158,7 @@ ${SPSEUDO}: printf ${NOTE_GNU_STACK} >>${.TARGET} printf ${FEATURE_NOTE} >> ${.TARGET} +.if ${LIB} == "sys" MAN+= abort2.2 \ accept.2 \ access.2 \ @@ -541,3 +542,4 @@ MLINKS+=wait.2 wait3.2 \ MLINKS+=write.2 pwrite.2 \ write.2 pwritev.2 \ write.2 writev.2 +.endif # ${LIB} == "sys" diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 33b8507a9eb9..5a6932614b29 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -202,6 +202,7 @@ _LIBRARIES= \ stats \ stdthreads \ supcplusplus \ + sys \ sysdecode \ tacplus \ termcapw \ @@ -401,6 +402,13 @@ _DP_c+= ssp_nonshared .endif _DP_stats= sbuf pthread _DP_stdthreads= pthread +_DP_sys= compiler_rt +# Use libssp_nonshared only on i386 and power*. Other archs emit direct calls +# to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. +.if ${MK_SSP} != "no" && \ + (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") +_DP_sys+= ssp_nonshared +.endif _DP_tacplus= md pam _DP_ncursesw= tinfow _DP_formw= ncursesw @@ -554,6 +562,9 @@ LIBSMDB?= ${LIBSMDBDIR}/libsmdb${PIE_SUFFIX}.a LIBSMUTILDIR= ${_LIB_OBJTOP}/lib/libsmutil LIBSMUTIL?= ${LIBSMUTILDIR}/libsmutil${PIE_SUFFIX}.a +LIBSYSDIR= ${_LIB_OBJTOP}/lib/libsys +LIBSYS?= ${LIBSYSDIR}/libsys${PIE_SUFFIX}.a + LIBNETBSDDIR?= ${_LIB_OBJTOP}/lib/libnetbsd LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd${PIE_SUFFIX}.a From nobody Mon Feb 5 20:38:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJBG0kxXz58y6b; Mon, 5 Feb 2024 20:38: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 4TTJBF5C9Wz4q9B; Mon, 5 Feb 2024 20:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HLAJbBSNQTAQihRsiA6NN+Ns2egsdvXCEoynDn32c1c=; b=wEYDI6pwCcCmJySwKSjei7ml03VdBN7m2CZlDsoTvBmMp4I+X8IZOK1b1NT9ghbnTfGOc2 PSo0cKi++Jxf2FW7/7MIX0YmuFX7vxqzgGTSN3lBaeCYmXPo/9vemAyrr33wPeFgENjv4u oDTaUCrcYb43Uq0oQf2iMIFMwudD3DMM5EqcLW+09C3mHLLIC6OQKodCaaHcshv08kozoh CB1OIEuj+d6jjUmL/Q4S4LRAxqk2dL+LvzyBWck0XzvbiHK1JqwKmwPUpnF6R6bym12TUy +aElX3daMuYjW/7R4doenbl/T1RcF8L3bHJOw8c3q9xmrcqK2XI0ZxNteur0zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HLAJbBSNQTAQihRsiA6NN+Ns2egsdvXCEoynDn32c1c=; b=iCd3+sJC4iBgGL4XUM+fEkTvbLJvr2C+BPydHPFakL1y/U4lqPs1V8fLQIQM2QQ6b1opoN 8ESbsM+BblLLKSN56zDnFYsl994Zk59TvaIp8/Gf1NiB2I0PDO1NviShl0AFck27lnKrVY 9901V/9dp7s3kufPTEvMi2ybfWzVkjo3UJOyJ57bD5CYMFuNDmkZHoI2dfgCe5fXhGx9i7 /ebt9gvCToy11942O6sdgrRqaFuoNU3vFi2MDs6z8BKS2BKRkGuqSP3drXzJ0zELlgXQb/ lNwCfMQ4lNkhIIyHnwbkNhXGerb2wfAS5rA6xbG2aEDUMVBfx/RsNS/JAG4RzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165525; a=rsa-sha256; cv=none; b=xoPU6BdNK6GLM3mjPuRsr02+UFK+FmaKmSDAw//IC9WCkWQR8Eb/uOGZG5QegXQgbYdEMJ GGicDPNQLIlMMxV2LK2aLv5VzDoux971TndDO7bBQoJa/ksCc+wkydFqrbQnqPh+sggGvY 6/5XAmzyyG/6EA5kBPzJxEUTexwG2/SpOijFr3qVA2xwtViqwAMSVhkPIsl3WvonnTs6US 8kaeCiWlmd1Go+c1ziPNzRUmLNqpZV+AUHZCR7eWQ+kIPZkK1ATB4ToL6PoZo/jI62RTwc 7LXLt3997V51eg8xyU2Sj5lwjApD199wnS2eJqsY13MyhQiUz87I/45jNYhvDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJBF49jGzvMH; Mon, 5 Feb 2024 20:38: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 415KcjHO069667; Mon, 5 Feb 2024 20:38:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcjPr069664; Mon, 5 Feb 2024 20:38:45 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:45 GMT Message-Id: <202402052038.415KcjPr069664@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: ef9871c6205c - main - libthr: move _umtx_op_err() to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef9871c6205c158b16ee23702d2b8c043debc51a Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ef9871c6205c158b16ee23702d2b8c043debc51a commit ef9871c6205c158b16ee23702d2b8c043debc51a Author: Brooks Davis AuthorDate: 2024-01-17 20:26:52 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libthr: move _umtx_op_err() to libsys Declare in sys/umtx.h and implement in libsys. Explicitly link libthr with libsys. When building libthr static include _umtx_op_err so we don't break static linkage with -lpthread. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libsys/Makefile | 7 ++++ lib/libsys/Symbol.thr.map | 3 ++ lib/libsys/_umtx_op_err.c | 39 ++++++++++++++++++++++ lib/libsys/amd64/Makefile.thr | 1 + .../arch/amd64 => libsys}/amd64/_umtx_op_err.S | 0 lib/libsys/i386/Makefile.thr | 1 + .../arch/i386 => libsys}/i386/_umtx_op_err.S | 0 lib/libsys/powerpc/Makefile.thr | 1 + .../arch/powerpc => libsys}/powerpc/_umtx_op_err.S | 0 lib/libthr/Makefile | 11 ++++++ lib/libthr/arch/amd64/Makefile.inc | 3 -- lib/libthr/arch/amd64/include/pthread_md.h | 2 -- lib/libthr/arch/i386/Makefile.inc | 3 -- lib/libthr/arch/i386/include/pthread_md.h | 2 -- lib/libthr/arch/powerpc/Makefile.inc | 2 -- lib/libthr/arch/powerpc/include/pthread_md.h | 2 -- lib/libthr/thread/thr_umtx.c | 10 ------ lib/libthr/thread/thr_umtx.h | 1 - rescue/rescue/Makefile | 4 +-- sys/sys/umtx.h | 1 + 20 files changed, 66 insertions(+), 27 deletions(-) diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile index 45d3fec14300..b51f44025748 100644 --- a/lib/libsys/Makefile +++ b/lib/libsys/Makefile @@ -59,6 +59,13 @@ NOASM= .include "${LIBSYS_SRCTOP}/Makefile.sys" +SYM_MAPS+= ${LIBSYS_SRCTOP}/Symbol.thr.map +.PATH: ${LIBSYS_SRCTOP}/${MACHINE_CPUARCH} +.sinclude "${LIBSYS_SRCTOP}/${MACHINE_CPUARCH}/Makefile.thr" +.if !${SRCS:M_umtx_op_err.S} +SRCS+=_umtx_op_err.c +.endif + VERSION_DEF=${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS=${SYM_MAPS} diff --git a/lib/libsys/Symbol.thr.map b/lib/libsys/Symbol.thr.map new file mode 100644 index 000000000000..a245de2e547a --- /dev/null +++ b/lib/libsys/Symbol.thr.map @@ -0,0 +1,3 @@ +FBSDprivate_1.0 { + _umtx_op_err; +}; diff --git a/lib/libsys/_umtx_op_err.c b/lib/libsys/_umtx_op_err.c new file mode 100644 index 000000000000..8281b8af7110 --- /dev/null +++ b/lib/libsys/_umtx_op_err.c @@ -0,0 +1,39 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2005 David Xu + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +int +_umtx_op_err(void *obj, int op, u_long val, void *uaddr, void *uaddr2) +{ + if (_umtx_op(obj, op, val, uaddr, uaddr2) == -1) + return (errno); + return (0); +} diff --git a/lib/libsys/amd64/Makefile.thr b/lib/libsys/amd64/Makefile.thr new file mode 100644 index 000000000000..52e861709faf --- /dev/null +++ b/lib/libsys/amd64/Makefile.thr @@ -0,0 +1 @@ +SRCS+= _umtx_op_err.S diff --git a/lib/libthr/arch/amd64/amd64/_umtx_op_err.S b/lib/libsys/amd64/_umtx_op_err.S similarity index 100% rename from lib/libthr/arch/amd64/amd64/_umtx_op_err.S rename to lib/libsys/amd64/_umtx_op_err.S diff --git a/lib/libsys/i386/Makefile.thr b/lib/libsys/i386/Makefile.thr new file mode 100644 index 000000000000..52e861709faf --- /dev/null +++ b/lib/libsys/i386/Makefile.thr @@ -0,0 +1 @@ +SRCS+= _umtx_op_err.S diff --git a/lib/libthr/arch/i386/i386/_umtx_op_err.S b/lib/libsys/i386/_umtx_op_err.S similarity index 100% rename from lib/libthr/arch/i386/i386/_umtx_op_err.S rename to lib/libsys/i386/_umtx_op_err.S diff --git a/lib/libsys/powerpc/Makefile.thr b/lib/libsys/powerpc/Makefile.thr new file mode 100644 index 000000000000..52e861709faf --- /dev/null +++ b/lib/libsys/powerpc/Makefile.thr @@ -0,0 +1 @@ +SRCS+= _umtx_op_err.S diff --git a/lib/libthr/arch/powerpc/powerpc/_umtx_op_err.S b/lib/libsys/powerpc/_umtx_op_err.S similarity index 100% rename from lib/libthr/arch/powerpc/powerpc/_umtx_op_err.S rename to lib/libsys/powerpc/_umtx_op_err.S diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index dde2a9dce94e..1d34f5cb5f09 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -12,6 +12,9 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 + +LIBADD= sys + NO_WTHREAD_SAFETY=1 NO_WCAST_ALIGN.gcc=1 # for gcc 4.2 CFLAGS+=-DPTHREAD_KERNEL @@ -67,6 +70,14 @@ PRECIOUSLIB= .include "${.CURDIR}/thread/Makefile.inc" SRCS+= rtld_malloc.c +LIBSYS_SRCTOP= ${.CURDIR:H}/libsys +.if exists(${LIBSYS_SRCTOP}/${MACHINE_CPUARCH}/_umtx_op_err.S) +.PATH: ${LIBSYS_SRCTOP}/${MACHINE_CPUARCH} +.else +.PATH: ${LIBSYS_SRCTOP} +.endif +STATICOBJS+= _umtx_op_err.o + .if ${MK_INSTALLLIB} != "no" SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a .endif diff --git a/lib/libthr/arch/amd64/Makefile.inc b/lib/libthr/arch/amd64/Makefile.inc index 24e5dd7c9b03..f8013ea914ed 100644 --- a/lib/libthr/arch/amd64/Makefile.inc +++ b/lib/libthr/arch/amd64/Makefile.inc @@ -1,6 +1,3 @@ - -SRCS+= _umtx_op_err.S - # With the current compiler and libthr code, using SSE in libthr # does not provide enough performance improvement to outweigh # the extra context switch cost. This can measurably impact diff --git a/lib/libthr/arch/amd64/include/pthread_md.h b/lib/libthr/arch/amd64/include/pthread_md.h index fa0802e64ebb..f43578a8241a 100644 --- a/lib/libthr/arch/amd64/include/pthread_md.h +++ b/lib/libthr/arch/amd64/include/pthread_md.h @@ -52,6 +52,4 @@ _get_curthread(void) return (thr); } -#define HAS__UMTX_OP_ERR 1 - #endif diff --git a/lib/libthr/arch/i386/Makefile.inc b/lib/libthr/arch/i386/Makefile.inc index 24e5dd7c9b03..f8013ea914ed 100644 --- a/lib/libthr/arch/i386/Makefile.inc +++ b/lib/libthr/arch/i386/Makefile.inc @@ -1,6 +1,3 @@ - -SRCS+= _umtx_op_err.S - # With the current compiler and libthr code, using SSE in libthr # does not provide enough performance improvement to outweigh # the extra context switch cost. This can measurably impact diff --git a/lib/libthr/arch/i386/include/pthread_md.h b/lib/libthr/arch/i386/include/pthread_md.h index 2a396abe3824..021ce8126909 100644 --- a/lib/libthr/arch/i386/include/pthread_md.h +++ b/lib/libthr/arch/i386/include/pthread_md.h @@ -52,6 +52,4 @@ _get_curthread(void) return (thr); } -#define HAS__UMTX_OP_ERR 1 - #endif diff --git a/lib/libthr/arch/powerpc/Makefile.inc b/lib/libthr/arch/powerpc/Makefile.inc deleted file mode 100644 index 663706b1b364..000000000000 --- a/lib/libthr/arch/powerpc/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ - -SRCS+= _umtx_op_err.S diff --git a/lib/libthr/arch/powerpc/include/pthread_md.h b/lib/libthr/arch/powerpc/include/pthread_md.h index 14f1703b5460..89fae48328cb 100644 --- a/lib/libthr/arch/powerpc/include/pthread_md.h +++ b/lib/libthr/arch/powerpc/include/pthread_md.h @@ -49,6 +49,4 @@ _get_curthread(void) return (NULL); } -#define HAS__UMTX_OP_ERR 1 - #endif /* _PTHREAD_MD_H_ */ diff --git a/lib/libthr/thread/thr_umtx.c b/lib/libthr/thread/thr_umtx.c index 37b378e74405..c6a032c773db 100644 --- a/lib/libthr/thread/thr_umtx.c +++ b/lib/libthr/thread/thr_umtx.c @@ -30,16 +30,6 @@ #include "thr_private.h" #include "thr_umtx.h" -#ifndef HAS__UMTX_OP_ERR -int _umtx_op_err(void *obj, int op, u_long val, void *uaddr, void *uaddr2) -{ - - if (_umtx_op(obj, op, val, uaddr, uaddr2) == -1) - return (errno); - return (0); -} -#endif - void _thr_umutex_init(struct umutex *mtx) { diff --git a/lib/libthr/thread/thr_umtx.h b/lib/libthr/thread/thr_umtx.h index a56997871ed1..89f70e4ab14f 100644 --- a/lib/libthr/thread/thr_umtx.h +++ b/lib/libthr/thread/thr_umtx.h @@ -39,7 +39,6 @@ #endif #define DEFAULT_URWLOCK {0,0,0,0,{0,0,0,0}} -int _umtx_op_err(void *, int op, u_long, void *, void *) __hidden; int __thr_umutex_lock(struct umutex *mtx, uint32_t id) __hidden; int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden; int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 7bf3299f4d48..76810a903856 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -142,7 +142,7 @@ CRUNCH_PROGS_usr.sbin+= zdb CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lpthread -luutil -lumem -ltpool -lspl -lrt +CRUNCH_LIBS+= -lavl -lpthread -lsys -luutil -lumem -ltpool -lspl -lrt CRUNCH_LIBS_zfs+= ${LIBBE} \ ${LIBZPOOL} \ ${LIBZFS} \ @@ -156,7 +156,7 @@ CRUNCH_LIBS_zpool+= ${CRUNCH_LIBS_zfs} CRUNCH_LIBS_zdb+= ${CRUNCH_LIBS_zfs} .else # liblzma needs pthread -CRUNCH_LIBS+= -lpthread +CRUNCH_LIBS+= -lpthread -lsys .endif CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv .if ${MK_OPENSSL} == "no" diff --git a/sys/sys/umtx.h b/sys/sys/umtx.h index 0bc2e3efe594..f7a69ae772c3 100644 --- a/sys/sys/umtx.h +++ b/sys/sys/umtx.h @@ -135,6 +135,7 @@ struct umtx_robust_lists_params { __BEGIN_DECLS int _umtx_op(void *obj, int op, u_long val, void *uaddr, void *uaddr2); +int _umtx_op_err(void *obj, int op, u_long val, void *uaddr, void *uaddr2); __END_DECLS From nobody Mon Feb 5 20:38:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJBH1yjHz58y2f; Mon, 5 Feb 2024 20:38: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 4TTJBG68l3z4qLL; Mon, 5 Feb 2024 20:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ba5N3t+IejEpgwxuixQwp1pGSEt3zWKlInuAbFzMfc4=; b=gm9SsAEylMHvL8sRza7u3GifBicmXcuCQLyLi1P/xNLX/bmZOIrxuU5uhi1yoM3VP5x0Wq UsaezCvS+b7R2I0Ne1iQNHljgHTpWh25GOJyIWP9g6Q+R27m5SLM+nTHhTTFbXMwzCB3mf I1kE6DMSpzVtduMDqRLRoSaY9HY38t77BNLgeAKlRveyMeP0hro/uDjMiByoaiILPWkBCN zBX306BUUdUZ1Y+IiTETCKmU/GWUTviGnH3pWNrxeZ8Y5gvIuuN0z/xldFpYHdaewJ2UBt rLOvvB5lgpPL8ewdsEqDdRZheBJG+hn7TIAtj/2lL8PXMZq46asWP4kqbhRMYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ba5N3t+IejEpgwxuixQwp1pGSEt3zWKlInuAbFzMfc4=; b=jgyfjvf0DBs1FIJqvgD8WjqfHRx5lD9223d9go9wS4J4Uv6uBtg/ZMnCbhji2dqBvFJi1W QgOJkriRpeziYmytlLtrYOHwb1AZj+7lcaOuqR5j2RlgMVdQS3mXZSKeX8lRDYqgqEuqHX qsfRr4IoZCWC9zmFz9jcmeK2dlx7TgTGuGdOimto35PLmpwljx3onSnxsjNiYmhSJa/mNh sjSQLI8NKvDvnDOFk22LvPO7YSvqEbenBc4aOkEW159BqhD3I94fqNlF6Yzcf9VuSbX90w lQ/ssWUx9Cc2AQQGayvQTsh25dulkgikPlvtHQiUK5OGUa6E9Pt4PUBZdtb5KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165526; a=rsa-sha256; cv=none; b=L18wMLiM6QNFXSOwn3nQKwdZVmOQZmu18U+8tQvzempJ6CtXrSTNPUpMYSRgBJyHnM1QOM wiE//9PfqxcaslmOkJKPl8khcp5PYEZ9GHs1lY/eodaLyh7aePDJ4I26R+Y/S9azAg5mF2 PjImGFtCI2oF/O8OGmY6vPyjhTl/856nnEca/nToTOkvBsD6bJcNm+OtYr6rOxZR1ror4T b9loImqeBo7w8t9nctG/alYHi4X9IT2+Bw3RX23mFUMCiIHrmOLrN3FVMvDjoGoaN09jZ/ ZitSj8+WQBnsGvxtAmeF6MY+JKZZMvOrBAIPYrKI2XRjbt0SRhhn0axMfJ0sSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJBG5F3yzvXZ; Mon, 5 Feb 2024 20:38: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 415Kckb5069719; Mon, 5 Feb 2024 20:38:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KckEC069716; Mon, 5 Feb 2024 20:38:46 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:46 GMT Message-Id: <202402052038.415KckEC069716@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: 0d4f7723bc43 - main - libc: link libsys as a auxiliary filter library List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d4f7723bc43e06ca22025740cb826a7f282ea11 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0d4f7723bc43e06ca22025740cb826a7f282ea11 commit 0d4f7723bc43e06ca22025740cb826a7f282ea11 Author: Brooks Davis AuthorDate: 2023-11-15 23:35:16 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libc: link libsys as a auxiliary filter library At runtime, when rtld loads libc it will also load libsys. For each symbol that is present in both, the libsys one will override the libc one. It continues to be the case that program need only link against libc (usually implicitly). The linkage to libsys is automatic. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- Makefile.inc1 | 2 ++ UPDATING | 6 ++++++ lib/Makefile | 2 +- lib/libc/Makefile | 3 +++ share/mk/src.libnames.mk | 2 +- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 7a9917fd8a74..f97e53cc7f9a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3125,10 +3125,12 @@ _startup_libs= lib/csu _startup_libs+= lib/libc _startup_libs+= lib/libc_nonshared _startup_libs+= lib/libcxxrt +_startup_libs+= lib/libsys _prereq_libs+= lib/libgcc_eh lib/libgcc_s _startup_libs+= lib/libgcc_eh lib/libgcc_s +lib/libc__L: lib/libsys__L lib/libgcc_s__L: lib/libc__L lib/libgcc_s__L: lib/libc_nonshared__L lib/libcxxrt__L: lib/libgcc_s__L diff --git a/UPDATING b/UPDATING index 33bae2a42b9d..aae30936a8b5 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20240205: + For dynamically linked programs, system calls are now made from + libsys rather than libc. No change in linkage is required as + libsys is an auxiliary filter for libc. People building custom + images must ensure that libsys.so.7 is included. + 20240202: Loader now also read configuration files listed in local_loader_conf_files. Files listed here are the last ones read. And /boot/loader.conf.local was diff --git a/lib/Makefile b/lib/Makefile index db07883e2b10..9d2531820c8b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -123,7 +123,7 @@ SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} SUBDIR_DEPEND_libc++:= libcxxrt # libssp_nonshared doesn't need to be linked into libc on every arch, but it is # small enough to build that this bit of serialization is likely insignificant. -SUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared +SUBDIR_DEPEND_libc= libsys libcompiler_rt libssp_nonshared SUBDIR_DEPEND_libcam= libsbuf SUBDIR_DEPEND_libcasper= libnv SUBDIR_DEPEND_libdevstat= libkvm diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 72300e88d3d7..6a54f7641087 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -62,6 +62,9 @@ CFLAGS+= -ftls-model=initial-exec # LDFLAGS+= -nodefaultlibs LIBADD+= compiler_rt +LIBADD+= sys + +LDFLAGS+=-Wl,--auxiliary,libsys.so .if ${MK_SSP} != "no" && \ (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 5a6932614b29..3c19a4c45da3 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -393,7 +393,7 @@ _DP_xo= util _DP_ztest= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs uutil icp # The libc dependencies are not strictly needed but are defined to make the # assert happy. -_DP_c= compiler_rt +_DP_c= sys compiler_rt # Use libssp_nonshared only on i386 and power*. Other archs emit direct calls # to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. .if ${MK_SSP} != "no" && \ From nobody Mon Feb 5 20:38:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJBJ5fSCz58y7Z; Mon, 5 Feb 2024 20:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTJBH6y6vz4qLY; Mon, 5 Feb 2024 20:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E2Bz+s2Xx6T+mqmfaXCIGGdPlnryJ83z3waVxtaOcLM=; b=VjhiQ3luEUHsK+MvuCiia82hIlSEBPm9L970x4T760WOR2f6XzxSb42DEHNUGhtuxqaOGY XD8SuVcSo8xjINM7nPnBQuOixQKuFp7En7l2q4/vRJVM0vdATADzUfxFXaFDBII1FhN3vU boJ43iUCIUacsuIkIbZIwwvDfeQbVXGA9jZpX9L2dOvtx5JqEewlNFdhnvB4EYzuGRluFG ZWZmB7mT8wOMrV/9eJYxLHUF/KDgCKaDd6jX7816cr6rChgY6cnd1b5YmHbLtfWu32649K pY5h0cmc/aTi1obnDmbbenFu5mzOmIT5bVXx8tKCNz3F226Ar0llmVTihCmV/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E2Bz+s2Xx6T+mqmfaXCIGGdPlnryJ83z3waVxtaOcLM=; b=mjoO8P8sDXuwHOZtF8pAwB28qMJEVTEjnMldENpzCyGbjuF8f6TYBx7hqqvaKu94LJZO9P f9FP9lE7ynCQRG6nAokRD5t2OD2Ro5EK2WNSI3tPJkRYO8hur5TcfRVvUAOeQb+Q/PULTJ Za+dxOGDgZlXc5TszBOr0/PkSgrwqtt84nr/HTDuJF8+J8598cM3BukOxuJsOz9iDPItIZ teD0QOvdPW835CTvar+yCofjfmGc3MrepAU7rm0y/D6S6hpaYm9TDfe682EbTmm6ZuYbXY oB38MjZn8F8a4M1SZoV2WaquSpm+lrFryJDlJuPVzOsCzsbngLWvTFpRVysX3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165528; a=rsa-sha256; cv=none; b=SCN/Dd37tx/gnw/+qOIhFgizEpk4dioI86CSJvK6t3UlHNar3tVTRSmZkfw4IRkjfBFrSh rAJtuyrSn9q7MKqkVC+Q9NcRvWx7NbD1CHk5TZHsnbESMiew59F506YD6J2pEvPKkUv1nQ 1XkzRE/YULe8RFjnkm5iwsMhbAcDjqcEQpAaWDBzAAKg0JmZDxi5vh6kB/v7Vr7SkWvkwZ OZLg9LzNXURWN3Now+np96Y+D4aOW1qeWxKQYZFZDlAw8SuSnpNcZF3eCEjSbi32xoSltP na7B8UPJeDnmtIjK0Nl5ouiJ/lurjOQ/jl7w4YMQW0xSpjb3UWvtoxX3YQ2UWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJBH5sq3zvP5; Mon, 5 Feb 2024 20:38: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 415KclxR069758; Mon, 5 Feb 2024 20:38:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415Kclfw069755; Mon, 5 Feb 2024 20:38:47 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:47 GMT Message-Id: <202402052038.415Kclfw069755@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: f21777224411 - main - SYS.h: make _SYSCALL_BODY overridable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f21777224411fee14b8aea6d8465bd6c2b318429 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f21777224411fee14b8aea6d8465bd6c2b318429 commit f21777224411fee14b8aea6d8465bd6c2b318429 Author: Brooks Davis AuthorDate: 2024-01-05 18:33:37 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 SYS.h: make _SYSCALL_BODY overridable Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libsys/aarch64/SYS.h | 2 ++ lib/libsys/amd64/SYS.h | 2 ++ lib/libsys/arm/SYS.h | 2 ++ lib/libsys/i386/SYS.h | 2 ++ lib/libsys/powerpc/SYS.h | 2 ++ lib/libsys/powerpc64/SYS.h | 2 ++ lib/libsys/riscv/SYS.h | 2 ++ 7 files changed, 14 insertions(+) diff --git a/lib/libsys/aarch64/SYS.h b/lib/libsys/aarch64/SYS.h index 07d14ab1bb44..a2ff7af18b18 100644 --- a/lib/libsys/aarch64/SYS.h +++ b/lib/libsys/aarch64/SYS.h @@ -34,6 +34,7 @@ mov x8, SYS_ ## name; \ svc 0 +#ifndef _SYSCALL_BODY /* * Conditional jumps can only go up to one megabyte in either * direction, and cerror can be located anywhere, so we have @@ -45,6 +46,7 @@ b.cs 1f; \ ret; \ 1: b cerror +#endif #define PSEUDO(name) \ ENTRY(__sys_##name); \ diff --git a/lib/libsys/amd64/SYS.h b/lib/libsys/amd64/SYS.h index 2dfca1896fcd..e27bb2cf9a93 100644 --- a/lib/libsys/amd64/SYS.h +++ b/lib/libsys/amd64/SYS.h @@ -40,10 +40,12 @@ movq %rcx, %r10; \ syscall +#ifndef _SYSCALL_BODY #define _SYSCALL_BODY(name) \ _SYSCALL(name); \ jb HIDENAME(cerror); \ ret +#endif #define RSYSCALL(name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ diff --git a/lib/libsys/arm/SYS.h b/lib/libsys/arm/SYS.h index c3bc78704a16..187851c67543 100644 --- a/lib/libsys/arm/SYS.h +++ b/lib/libsys/arm/SYS.h @@ -45,11 +45,13 @@ #define CERROR _C_LABEL(cerror) +#ifndef _SYSCALL_BODY #define _SYSCALL_BODY(x) \ _SYSCALL(x); \ it cs; \ bcs PIC_SYM(CERROR, PLT); \ RET +#endif #define PSEUDO(x) \ ENTRY(__CONCAT(__sys_, x)); \ diff --git a/lib/libsys/i386/SYS.h b/lib/libsys/i386/SYS.h index 292b705f80f2..f5e0565452da 100644 --- a/lib/libsys/i386/SYS.h +++ b/lib/libsys/i386/SYS.h @@ -39,10 +39,12 @@ mov $SYS_##name, %eax; \ int $0x80 +#ifndef _SYSCALL_BODY #define _SYSCALL_BODY(name) \ _SYSCALL(name); \ jb HIDENAME(cerror); \ ret +#endif #define RSYSCALL(name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ diff --git a/lib/libsys/powerpc/SYS.h b/lib/libsys/powerpc/SYS.h index b990793c7e3e..04672ed51528 100644 --- a/lib/libsys/powerpc/SYS.h +++ b/lib/libsys/powerpc/SYS.h @@ -40,10 +40,12 @@ li 0,(SYS_##name); \ sc +#ifndef _SYSCALL_BODY #define _SYSCALL_BODY(name) \ _SYSCALL(name); \ bnslr; \ b CNAME(HIDENAME(cerror)) +#endif #define PSEUDO(name) \ .text; \ diff --git a/lib/libsys/powerpc64/SYS.h b/lib/libsys/powerpc64/SYS.h index bf8bc6cc0e27..ceb85bb4e361 100644 --- a/lib/libsys/powerpc64/SYS.h +++ b/lib/libsys/powerpc64/SYS.h @@ -40,6 +40,7 @@ li 0,(SYS_##name); \ sc +#ifndef _SYSCALL_BODY #define _SYSCALL_BODY(name) \ _SYSCALL(name); \ bnslr; \ @@ -52,6 +53,7 @@ ld %r0,16(%r1); \ mtlr %r0; \ blr +#endif #define PSEUDO(name) \ .text; \ diff --git a/lib/libsys/riscv/SYS.h b/lib/libsys/riscv/SYS.h index 47c79e38f916..c2d93c567e2b 100644 --- a/lib/libsys/riscv/SYS.h +++ b/lib/libsys/riscv/SYS.h @@ -40,12 +40,14 @@ li t0, SYS_ ## name; \ ecall +#ifndef _SYSCALL_BODY #define _SYSCALL_BODY(name) \ _SYSCALL(name); \ bnez t0, 1f; \ ret; \ 1: la t1, cerror; \ jr t1 +#endif #define PSEUDO(name) \ ENTRY(__sys_##name); \ From nobody Mon Feb 5 20:38:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJBK59cpz58y9D; Mon, 5 Feb 2024 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 4TTJBK0x1Dz4qLh; Mon, 5 Feb 2024 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=1707165529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1O16EtI0K4LEDXplEbkrHqsbgjn9l6KVisb/TMa/xYw=; b=J/IyKEWSK2plHSSq78ovnq89pl3RZJ0ocOZtBJpykh/2LSyLZ3tftVhc+2CKPkj/ibarcr WFRQPE34P3WP6o/9n+I8so1Q/vH4nDr0iaAD4E1bc9w1GyqNmKiex9THRj2WKywZMDItte tc2Dbsqf91V7xoP8eVOEMeFFQSgflugpPz13OEllXla7E7I/SuLmw/0Kyik2dLmKMNbsXJ prZ3JKi4Kh4JJEqOsaFbrN3P4sdXmt92huc9Q1taW4ICqnCxTHVT6X6nhkUipc0o4N8MIY OI6Q1dJUAv7I0AMHCg/LDUAtXPTHAGVPngg5mBDbF4MY8gqPpqwUR6PgtwVrBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1O16EtI0K4LEDXplEbkrHqsbgjn9l6KVisb/TMa/xYw=; b=rJwjNCDcumH1HCTq4WWrTmwq1JIMcLhRYeQkIQAdfpO/hYFMUvtQeV5xTNnqAWOAdvFZUa oKVAHfUEIlGzlSa+FuR6mQOy8XTIYOFB3u5BwTQgpVYxHVR+GCzWPrGl2KZ6xqJTY9lCFm e0vzNaXCLRYCW1W0RbdwSf6vsO8aEyWwaYstbyFfI9TmD1a6yK+kp/mSezJbdUwK8YriSy OJbBqkzmAF0KTzdUSrb/cCEpD1H1a86/2P7vvdJIAFs+olBLDebU2d1rii/nj1Dm6kMqyZ KlmAoMfkAcEroATovqxEq+1DkuvEDqsiRq+myKQswv3+bqVGaw/CL6lwI6yRjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165529; a=rsa-sha256; cv=none; b=ZPSe7v0vSO0DzDIL222wk1fT0cbALh1ugjxXDUqvSniXJ8gTTT9vS3/yj32XzWB5sh9PMJ erloQpUcHiUYrBN8DIM626+kFvI1pSvU2/1x159Lz4jXMJaLzrz+YlAypFzHdS0f/LGuYN TBjcv7Aze0AFDbGXh8z6vwqEVxBONZWa4O4uHm9BbV3F47ApCIjrercSrTbyl32FGYDQuN mFZxepJI7GUxPjjuaA3gUxv2SkBmBZkK32DEe5C87W7IytYXo/VODPR8wsfMbvkDX1Fc4a Jw6dGE2Yyji69QT7GAkkBeh8aFsBiKt7yGKe21jtBT58qChhYp5GmO02LG7vNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTJBK02x5zvm4; Mon, 5 Feb 2024 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 415Kcmbd069815; Mon, 5 Feb 2024 20:38:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KcmSh069812; Mon, 5 Feb 2024 20:38:48 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:48 GMT Message-Id: <202402052038.415KcmSh069812@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: 8d2e8f720516 - main - libc: make syscall stubs empty for shared lib List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d2e8f720516e88a896390763ff372a6e5a2550f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8d2e8f720516e88a896390763ff372a6e5a2550f commit 8d2e8f720516e88a896390763ff372a6e5a2550f Author: Brooks Davis AuthorDate: 2024-01-05 19:04:53 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:57 +0000 libc: make syscall stubs empty for shared lib They are always replaced by libsys so just make them empty. In https://reviews.freebsd.org/D14609 x86 variants call abort2, but that requires per-arch assembly and should be of low value in the steady state. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- lib/libc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 6a54f7641087..7c728ffe6443 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -117,6 +117,7 @@ NOASM= .include "${LIBC_SRCTOP}/stdlib/Makefile.inc" .include "${LIBC_SRCTOP}/stdtime/Makefile.inc" .include "${LIBC_SRCTOP}/string/Makefile.inc" +SHARED_CFLAGS+= -D'_SYSCALL_BODY(name)=' .include "${LIBSYS_SRCTOP}/Makefile.sys" .include "${LIBC_SRCTOP}/secure/Makefile.inc" .include "${LIBC_SRCTOP}/rpc/Makefile.inc" From nobody Mon Feb 5 20:52:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTJVV1FYlz590j4 for ; Mon, 5 Feb 2024 20:52:50 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTJVT1dStz50HW for ; Mon, 5 Feb 2024 20:52:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40fdd5bbe65so8942635e9.2 for ; Mon, 05 Feb 2024 12:52:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707166367; x=1707771167; 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=VTvedsp8/7KWWMjM3Pify68Hmh4sG62Dfbuf7S20Qo4=; b=SL0NN4RQz3LTeBIU89wTnPlHnYCugzIcnzBmrl09xfGdwmJKaUJCuVeeOoOt8/riJ4 VMCS/l9A/nyzDTG/DwAHBAfJ89/g8X/u8QcLleMD18OK1Ov2cln0OnyREomLXO87NxBp 9LpsMQYpMp75OS3zR1ZseK21xR3BrJ9WnPcIMMDb+SGn/I8SEl8F9RdG6dAhJyyj6a3e od82Ykz6CVka8DWWrm+n28zI2EWF3AJ4y0kJnn1rkgQvJT45YsxEN8maE45yen9KfcHH 2WKVryrODPjaNS8W14Pce50+0yZv9ynI5Y3gllVptvhqVJkbGj75J9FVON29LhM1p8Nf Y6cA== X-Gm-Message-State: AOJu0YyqFIwFkeJw0Ye3ei071BnglIG1r794icsrf/vkO5AvGVn/JwAE teJB1vYerzke8A2Iq1KQ1s7Ui5MdY6lhQpsgveTc4fgAaeDvYzwbdBK9uMS5mA8= X-Google-Smtp-Source: AGHT+IEDGaXTB8EK+todKq6vK3sXTxPyVkVhptf/WKT2bHI4EknJMeJQe6vv6jJ4LwQDZqzM0ZFBgA== X-Received: by 2002:a5d:4dca:0:b0:33b:1aca:8c01 with SMTP id f10-20020a5d4dca000000b0033b1aca8c01mr460084wru.19.1707166367291; Mon, 05 Feb 2024 12:52:47 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUdY/kMgFS8j6wPjb1w5mdqQkeABndSLNdkwnj0uzelX7x1U7d9UvNyzRdijY4MQbgfLwT5rQz6IHDd9c7/GpjOjBzDrTcIXibbwxZO31xjxnaN/Uv7OWTtyt0V6yWhv5TmKw2546z+i91hxN649tlWHQ== Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id p15-20020adfe60f000000b0033aee3bfac5sm443687wrm.16.2024.02.05.12.52.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2024 12:52:46 -0800 (PST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: 0d4f7723bc43 - main - libc: link libsys as a auxiliary filter library From: Jessica Clarke In-Reply-To: <202402052038.415KckEC069716@gitrepo.freebsd.org> Date: Mon, 5 Feb 2024 20:52:36 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <68B8B759-E01F-498A-850B-23EAE4A3DABC@freebsd.org> References: <202402052038.415KckEC069716@gitrepo.freebsd.org> To: Brooks Davis X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TTJVT1dStz50HW X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 5 Feb 2024, at 20:38, Brooks Davis wrote: >=20 > The branch main has been updated by brooks: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D0d4f7723bc43e06ca22025740cb826a7= f282ea11 >=20 > commit 0d4f7723bc43e06ca22025740cb826a7f282ea11 > Author: Brooks Davis > AuthorDate: 2023-11-15 23:35:16 +0000 > Commit: Brooks Davis > CommitDate: 2024-02-05 20:34:56 +0000 >=20 > libc: link libsys as a auxiliary filter library >=20 > At runtime, when rtld loads libc it will also load libsys. For = each > symbol that is present in both, the libsys one will override the = libc > one. It continues to be the case that program need only link = against > libc (usually implicitly). The linkage to libsys is automatic. >=20 > Reviewed by: kib, emaste, imp > Pull Request: https://github.com/freebsd/freebsd-src/pull/908 > --- > Makefile.inc1 | 2 ++ > UPDATING | 6 ++++++ > lib/Makefile | 2 +- > lib/libc/Makefile | 3 +++ > share/mk/src.libnames.mk | 2 +- > 5 files changed, 13 insertions(+), 2 deletions(-) >=20 > diff --git a/Makefile.inc1 b/Makefile.inc1 > index 7a9917fd8a74..f97e53cc7f9a 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -3125,10 +3125,12 @@ _startup_libs=3D lib/csu > _startup_libs+=3D lib/libc > _startup_libs+=3D lib/libc_nonshared > _startup_libs+=3D lib/libcxxrt > +_startup_libs+=3D lib/libsys >=20 > _prereq_libs+=3D lib/libgcc_eh lib/libgcc_s > _startup_libs+=3D lib/libgcc_eh lib/libgcc_s >=20 > +lib/libc__L: lib/libsys__L > lib/libgcc_s__L: lib/libc__L > lib/libgcc_s__L: lib/libc_nonshared__L > lib/libcxxrt__L: lib/libgcc_s__L > diff --git a/UPDATING b/UPDATING > index 33bae2a42b9d..aae30936a8b5 100644 > --- a/UPDATING > +++ b/UPDATING > @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: > world, or to merely disable the most expensive debugging functionality > at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >=20 > +20240205: > + For dynamically linked programs, system calls are now made from > + libsys rather than libc. No change in linkage is required as > + libsys is an auxiliary filter for libc. People building custom > + images must ensure that libsys.so.7 is included. > + > 20240202: > Loader now also read configuration files listed in = local_loader_conf_files. > Files listed here are the last ones read. And /boot/loader.conf.local = was > diff --git a/lib/Makefile b/lib/Makefile > index db07883e2b10..9d2531820c8b 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -123,7 +123,7 @@ SUBDIR_DEPEND_libbsnmp=3D ${_libnetgraph} > SUBDIR_DEPEND_libc++:=3D libcxxrt > # libssp_nonshared doesn't need to be linked into libc on every arch, = but it is > # small enough to build that this bit of serialization is likely = insignificant. > -SUBDIR_DEPEND_libc=3D libcompiler_rt libssp_nonshared > +SUBDIR_DEPEND_libc=3D libsys libcompiler_rt libssp_nonshared > SUBDIR_DEPEND_libcam=3D libsbuf > SUBDIR_DEPEND_libcasper=3D libnv > SUBDIR_DEPEND_libdevstat=3D libkvm > diff --git a/lib/libc/Makefile b/lib/libc/Makefile > index 72300e88d3d7..6a54f7641087 100644 > --- a/lib/libc/Makefile > +++ b/lib/libc/Makefile > @@ -62,6 +62,9 @@ CFLAGS+=3D -ftls-model=3Dinitial-exec > # > LDFLAGS+=3D -nodefaultlibs > LIBADD+=3D compiler_rt > +LIBADD+=3D sys > + > +LDFLAGS+=3D-Wl,--auxiliary,libsys.so =46rom reading documentation and implementation code (LLD + rtld), = should this not be the soname, i.e. libsys.so.7? Jess > .if ${MK_SSP} !=3D "no" && \ > (${LIBC_ARCH} =3D=3D "i386" || ${LIBC_ARCH:Mpowerpc*} !=3D "") > diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk > index 5a6932614b29..3c19a4c45da3 100644 > --- a/share/mk/src.libnames.mk > +++ b/share/mk/src.libnames.mk > @@ -393,7 +393,7 @@ _DP_xo=3D util > _DP_ztest=3D geom m nvpair umem zpool pthread avl zfs_core spl zutil = zfs uutil icp > # The libc dependencies are not strictly needed but are defined to = make the > # assert happy. > -_DP_c=3D compiler_rt > +_DP_c=3D sys compiler_rt > # Use libssp_nonshared only on i386 and power*. Other archs emit = direct calls > # to __stack_chk_fail, not __stack_chk_fail_local provided by = libssp_nonshared. > .if ${MK_SSP} !=3D "no" && \ From nobody Mon Feb 5 21:19:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTK545ndKz592cq; Mon, 5 Feb 2024 21:19: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 4TTK544bGpz53PD; Mon, 5 Feb 2024 21:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707167960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4482zJ0ZCTZAh3MEEljd4pQfPRYv25KGMxApG7YMEKY=; b=gjc8m/d5rezTmtFvRsqUgepa0EtO2SJrmTe/p8/o7kak92/B93PJ3RfJuVJbw5Yw0VxhHM P22yEPSYDM5CI/ea1lsjmhswmMj1K7zR442hjubGRf+KsYc5KH4lqAGROfLx6GhiD8C6Cm aqesVOppcXPUNHd2lTCOuhdZfPDY9BZCaxDxmIKxAPIJRij8UsXRmK0ioMXe+4FtBKaXJQ EDibuQ0r7dGbrBAlf3IcyXlz7IaXq9CEXyHSAjaV+XQTsS7e3VV7qtL+jWPHtI1ofE4jOI 2252JNq7DNnUHRnZ24dZHFvqN6Moq987euWY491ATtGwNgZQC1H988uznuDK1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707167960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4482zJ0ZCTZAh3MEEljd4pQfPRYv25KGMxApG7YMEKY=; b=qp7ghLZ/gST7OU8sE1EIn2AfRQS/YEQTlJhGs65mhSiGk27EWpy9c+p/fJcRz41wNtChcI ElEktDjatY7epvJOdswomkBO6VeSYUmCfgEF13yAHpp9KWXkHPuuH9wQogVp1tsnqq/e3o 2oct3KRcKu5YJavAtQsIuTTOwNopEhMYsj/t2vW3MOJ4xmxybzwQ5STWP9yu3pbq3JA+ca vGatQFIo0VsRRINAXSqadOv0NgQ/zy1KhCalqf0VDjqrepkcKhiQMrza+6H+J7cOh93T2A yVGengehXUI4pCYXFamclcZqO7vMrU6aZJu4n901sjRlA7BO36rKnhZTDH7iLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707167960; a=rsa-sha256; cv=none; b=jHtkqVVdUCcNYb8HH0LuxW9VYFa4GHtEce7/b3wlkBpdcSZJC6QxS7/7BRu0STisXAASMA O1qOzVtlksXI08BwvpL+vjbyEPN7SOA2Qnwj2vBcOhpnEHXkIEDjTNxFqgol99wiRoWCI3 kVNFv3CM9xPf4pXphdh7HOnIMydVUsqNkeywBziXwYfXGvsG/RNQgJUMVj8Tx5fqu2SKRl rqX4m1ZaR2ci0WFW4W683pjajQteqWfQeDQTaMeQzOaGxgLCOk/Ecjk31qz7u1MzoqfIjp JDY2M7lfiIZyWGUXSuM5R7rGtcWCuuY83AxbxN6cP2RPrjVrLvr55vkqfhj5hA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTK543h7czwHr; Mon, 5 Feb 2024 21:19: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 415LJKCP037383; Mon, 5 Feb 2024 21:19:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415LJKSN037380; Mon, 5 Feb 2024 21:19:20 GMT (envelope-from git) Date: Mon, 5 Feb 2024 21:19:20 GMT Message-Id: <202402052119.415LJKSN037380@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: 6d4a140acfdf - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d4a140acfdf637bb559d371c583e4db478e1549 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d4a140acfdf637bb559d371c583e4db478e1549 commit 6d4a140acfdf637bb559d371c583e4db478e1549 Author: Igor Ostapenko AuthorDate: 2024-02-05 16:22:31 +0000 Commit: Kristof Provost CommitDate: 2024-02-05 21:18:11 +0000 pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex The redirection pool stored in r->rpool.cur is used for loadbalancing and cur can change whenever loadbalancing happens, which is for every new connection. Therefore it can't be trusted outside of pf_map_addr() and the r->rpool->mtx mutex. After evaluating the ruleset, loadbalancing decission is made in pf_map_addr() called from within pf_create_state() and stored in the state itself. This patch modifies BOUND_IFACE() so that it only uses the information already stored in the state which has been obtained in a way which respects the r->rpool->mtx mutex. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D43741 --- sys/netpfil/pf/pf.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9f2c07c614b3..12b72f50aa02 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -413,25 +413,22 @@ VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); } while (0) static struct pfi_kkif * -BOUND_IFACE(struct pf_krule *r, struct pfi_kkif *k, struct pf_pdesc *pd) +BOUND_IFACE(struct pf_kstate *st, struct pfi_kkif *k) { /* Floating unless otherwise specified. */ - if (! (r->rule_flag & PFRULE_IFBOUND)) + if (! (st->rule.ptr->rule_flag & PFRULE_IFBOUND)) return (V_pfi_all); /* Don't overrule the interface for states created on incoming packets. */ - if (pd->dir == PF_IN) - return (k); - - /* No route-to, so don't overrrule. */ - if (r->rt != PF_ROUTETO) + if (st->direction == PF_IN) return (k); - if (r->rpool.cur == NULL) + /* No route-to, so don't overrule. */ + if (st->rt != PF_ROUTETO) return (k); /* Bind to the route-to interface. */ - return (r->rpool.cur->kif); + return (st->rt_kif); } #define STATE_INC_COUNTERS(s) \ @@ -5018,7 +5015,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, __func__, nr, sk, nk)); /* Swap sk/nk for PF_OUT. */ - if (pf_state_insert(BOUND_IFACE(r, kif, pd), kif, + if (pf_state_insert(BOUND_IFACE(s, kif), kif, (pd->dir == PF_IN) ? sk : nk, (pd->dir == PF_IN) ? nk : sk, s)) { REASON_SET(&reason, PFRES_STATEINS); From nobody Mon Feb 5 21:59:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTKzW6XVZz596GT; Mon, 5 Feb 2024 21:59:35 +0000 (UTC) (envelope-from brd@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 4TTKzW601fz56nL; Mon, 5 Feb 2024 21:59:35 +0000 (UTC) (envelope-from brd@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707170375; 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=8RAPmQO73QqH4gjcFViWR6vlwNPSXckqacN2+F9Xs+c=; b=Ku71oUoi1dU7TPmHO3XmLU90r2i9EBeX/dlf/CkA8ixPls8vdWvXMRbxWQkpfVoGN1Agz5 hZRZPY+Vvvfc8PSGIkFh634YHdC2kxeuDK6dOUn4EHeXqryYzvQPKLJsoHMkrr6URaAyhS Arr6YdSkQ7OyrTKRSot7TJEOFtMCVpa3NI95kXfZhcuDHquIAcBZ+fCtUijjNHDA7pp+0e a6//m+JfW9wdNmtUwc0aUtC8K0jrnOME0ezTF0muQkNQtMJz4Can1w5c9geTn0Z3/w/Ciz XqEM1Xdgn9qdQyH/TY1r2yD5Dw8VS2XHtGTu0lI1yIeeWFGbbrY/0kMr91vGNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707170375; 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=8RAPmQO73QqH4gjcFViWR6vlwNPSXckqacN2+F9Xs+c=; b=lwaSf7s/V3aKiTzqXq6aW6+JQTPqfMgApHSVkunAzAmCMN5wBPQHdB12R13EXZmhesXnAy Q+wqL++B0BHtzUcOiAJvHL5OlnC/B7/9QnNwQJ1bmdfl7ktpwwB2TN5GYrT+C5iSgolktO vVk/y5UnuvtweUFmKDopIoDJ4U/jVxE5MaqECOzxD2dPgHTtV0yXO8VQV83eJGhEPgVfWp /8CAmacOYvG3cPCIN4+Xeyo45XKXMbbRTRFP2WA3qNPAcjJJsuTy2Qg6GLgr0Itlh4oPU0 dbojC+HVijZ/fcDe5e+mkBPtDgusOLRHwFGl8tDbdxapue2NwKXR5okcqI3Y5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707170375; a=rsa-sha256; cv=none; b=s6kxT3KM0L2OjxpK1Q26CCOE8RqfpXc64UMGt/3CPBSYC2m0ydn+Hl+3wec7LNyl027/RE 3frxCR1DXeL2UqojpzZFWlO/dC7X5nmArbXvDo5Z2gwFY0kO2O9mrMR8yI2Al8Qk5i0zVK sZvVrHb1UFlj9S1xnBWpEXlGzqM0Ey4Y5XWk3fgAcUB2flnvIKIUmnXCSNNGO5g0cg9oy8 j5981zpWoRCahzhlvbNAP8YqWMUUGl83YJ7Wjc6NWOysLHgudAlrBASTmjWKmSlvUCesE0 NGVz08loW7KR/c6Du4wMAtriw7BGJHvQ7yHhg2k4gV++vmBDD7gGYTGW0+NxIg== Received: from fauth2-smtp.messagingengine.com (fauth2-smtp.messagingengine.com [103.168.172.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: brd/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TTKzW4N7Zz1QFK; Mon, 5 Feb 2024 21:59:35 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfauth.nyi.internal (Postfix) with ESMTP id 9E4A01200066; Mon, 5 Feb 2024 16:59:34 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute1.internal (MEProxy); Mon, 05 Feb 2024 16:59:34 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedvuddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvvefutgfgse htqhertderreejnecuhfhrohhmpedfuehrrgguucffrghvihhsfdcuoegsrhgusefhrhgv vgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeegjeeikeehgfffteelveefgfdtke ehleffieduffevheevveegjedtkedtleetveenucffohhmrghinhepfhhrvggvsghsugdr ohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsrhgrugdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqjedtjeeifedvfedv qddukedtieelieekkedqsghrugeppefhrhgvvgeuufffrdhorhhgsegsrhgruggurghvih hsrdhioh X-ME-Proxy: Feedback-ID: if7394599:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1F6B831A0065; Mon, 5 Feb 2024 16:59:34 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Message-Id: In-Reply-To: <1BF97C99-2AB2-44C5-B0C7-8FC441735748@freebsd.org> References: <202401312205.40VM5dQS018685@gitrepo.freebsd.org> <1D1F0A7A-C735-4D6F-B333-39920E84CD5D@freebsd.org> <49467837-dadd-4252-bfa7-169b0630bb41@app.fastmail.com> <1BF97C99-2AB2-44C5-B0C7-8FC441735748@freebsd.org> Date: Mon, 05 Feb 2024 14:59:12 -0700 From: "Brad Davis" To: "Jessica Clarke" Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 009d3f66cb5f - main - bsdinstall: separate out dist selection in prep for pkgbase support Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, Feb 4, 2024, at 10:15 AM, Jessica Clarke wrote: > On 4 Feb 2024, at 16:41, Brad Davis wrote: >> On Fri, Feb 2, 2024, at 6:27 PM, Jessica Clarke wrote: >>> On 31 Jan 2024, at 22:15, Jessica Clarke wrote: >>>> On 31 Jan 2024, at 22:05, Brad Davis wrote: >>>>>=20 >>>>> The branch main has been updated by brd: >>>>>=20 >>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D009d3f66cb5f0cf3f1d= 353f311d3a6878b2a534e >>>>>=20 >>>>> commit 009d3f66cb5f0cf3f1d353f311d3a6878b2a534e >>>>> Author: Brad Davis >>>>> AuthorDate: 2024-01-26 17:46:46 +0000 >>>>> Commit: Brad Davis >>>>> CommitDate: 2024-01-31 22:05:27 +0000 >>>>>=20 >>>>> bsdinstall: separate out dist selection in prep for pkgbase suppo= rt >>>>>=20 >>>>> No functional change intended. >>>>>=20 >>>>> Approved by: asiciliano >>>>> Sponsored by: Rubicon Communications, LLC ("Netgate") >>>>> Differential Revision: https://reviews.freebsd.org/D43621 >>>>> --- >>>>> usr.sbin/bsdinstall/scripts/auto | 40 ++++-------------- >>>>> usr.sbin/bsdinstall/scripts/selectdists | 73 +++++++++++++++++++++= ++++++++++++ >>>>> usr.sbin/bsdinstall/startbsdinstall | 1 + >>>>> 3 files changed, 82 insertions(+), 32 deletions(-) >>>>>=20 >>>>> diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstal= l/scripts/auto >>>>> index 9f4b5b52fe5d..c651d654d62e 100755 >>>>> --- a/usr.sbin/bsdinstall/scripts/auto >>>>> +++ b/usr.sbin/bsdinstall/scripts/auto >>>>> @@ -153,36 +153,10 @@ trap true SIGINT # This section is optional >>>>> trap error SIGINT # Catch cntrl-C here >>>>> if [ -z "$BSDINSTALL_SKIP_HOSTNAME" ]; then bsdinstall hostname ||= error "Set hostname failed"; fi >>>>>=20 >>>>> -export DISTRIBUTIONS=3D"${DISTRIBUTIONS:-base.txz kernel.txz}" >>>>> -if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then >>>>> - DISTMENU=3D`awk -F'\t' '!/^(kernel\.txz|base\.txz)/{print $1,$5,= $6}' $BSDINSTALL_DISTDIR/MANIFEST` >>>>> - DISTMENU=3D"$(echo ${DISTMENU} | sed -E 's/\.txz//g')" >>>>> - >>>>> - if [ -n "$DISTMENU" ]; then >>>>> - exec 5>&1 >>>>> - EXTRA_DISTS=3D$( eval bsddialog \ >>>>> - --backtitle \"$OSNAME Installer\" \ >>>>> - --title \"Distribution Select\" --nocancel --separate-output \ >>>>> - --checklist \"Choose optional system components to install:\"= \ >>>>> - 0 0 0 $DISTMENU \ >>>>> - 2>&1 1>&5 ) >>>>> - for dist in $EXTRA_DISTS; do >>>>> - export DISTRIBUTIONS=3D"$DISTRIBUTIONS $dist.txz" >>>>> - done >>>>> - fi >>>>> -fi >>>>> - >>>>> -FETCH_DISTRIBUTIONS=3D"" >>>>> -for dist in $DISTRIBUTIONS; do >>>>> - if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then >>>>> - FETCH_DISTRIBUTIONS=3D"$FETCH_DISTRIBUTIONS $dist" >>>>> - fi >>>>> -done >>>>> - >>>>> -if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" = ]; then >>>>> - bsddialog --backtitle "$OSNAME Installer" --title "Network Insta= llation" --msgbox "Some installation files were not found on the boot vo= lume. The next few screens will allow you to configure networking so tha= t they can be downloaded from the Internet." 0 0 >>>>> - bsdinstall netconfig || error >>>>> - NETCONFIG_DONE=3Dyes >>>>> +if [ -n "$BSDINSTALL_USE_DISTRIBUTIONS" ]; then >>>>> + exec 5>&1 >>>>> + export DISTRIBUTIONS=3D$( `dirname $0`/selectdists 2>&1 1>&5 ) >>>>> + exec 5>&- >>>>> fi >>>>>=20 >>>>> rm -f $PATH_FSTAB >>>>> @@ -347,8 +321,10 @@ if [ -n "$FETCH_DISTRIBUTIONS" ]; then >>>>>=20 >>>>> [ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote distribut= ions" >>>>> fi >>>>> -bsdinstall checksum || error "Distribution checksum failed" >>>>> -bsdinstall distextract || error "Distribution extract failed" >>>>> +if [ -n "$BSDINSTALL_USE_DISTRIBUTIONS" ]; then >>>>> + bsdinstall checksum || error "Distribution checksum failed" >>>>> + bsdinstall distextract || error "Distribution extract failed" >>>>> +fi >>>>>=20 >>>>> # Set up boot loader >>>>> bsdinstall bootconfig || error "Failed to configure bootloader" >>>>> diff --git a/usr.sbin/bsdinstall/scripts/selectdists b/usr.sbin/bs= dinstall/scripts/selectdists >>>>> new file mode 100644 >>>>> index 000000000000..b548e82a95f8 >>>>> --- /dev/null >>>>> +++ b/usr.sbin/bsdinstall/scripts/selectdists >>>>> @@ -0,0 +1,73 @@ >>>>> +#!/bin/sh >>>>> +#- >>>>> +# Copyright (c) 2011 Nathan Whitehorn >>>>> +# Copyright (c) 2013-2018 Devin Teske >>>>> +# All rights reserved. >>>>> +# >>>>> +# Redistribution and use in source and binary forms, with or with= out >>>>> +# modification, are permitted provided that the following conditi= ons >>>>> +# are met: >>>>> +# 1. Redistributions of source code must retain the above copyrig= ht >>>>> +# notice, this list of conditions and the following disclaimer. >>>>> +# 2. Redistributions in binary form must reproduce the above copy= right >>>>> +# notice, this list of conditions and the following disclaimer= in the >>>>> +# documentation and/or other materials provided with the distr= ibution. >>>>> +# >>>>> +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS I= S'' AND >>>>> +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED T= O, THE >>>>> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICU= LAR PURPOSE >>>>> +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS B= E LIABLE >>>>> +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CO= NSEQUENTIAL >>>>> +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITU= TE GOODS >>>>> +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRU= PTION) >>>>> +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTR= ACT, STRICT >>>>> +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING = IN ANY WAY >>>>> +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBI= LITY OF >>>>> +# SUCH DAMAGE. >>>>> +# >>>>> +# >>>>> +############################################################ INCL= UDES >>>>> + >>>>> +BSDCFG_SHARE=3D"/usr/share/bsdconfig" >>>>> +. $BSDCFG_SHARE/common.subr || exit 1 >>>>> + >>>>> +############################################################ CONF= IGURATION >>>>> + >>>>> +# >>>>> +# Default distributions >>>>> +# >>>>> +DISTRIBUTIONS=3D"${DISTRIBUTIONS:-base.txz kernel.txz}" >>>>> + >>>>> +############################################################ MAIN >>>>> + >>>>> +if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then >>>>> + DISTMENU=3D`awk -F'\t' '!/^(kernel\.txz|base\.txz)/{print $1,$5,= $6}' $BSDINSTALL_DISTDIR/MANIFEST` >>>>> + DISTMENU=3D"$(echo ${DISTMENU} | sed -E 's/\.txz//g')" >>>>> + >>>>> + if [ -n "$DISTMENU" ]; then >>>>> + EXTRA_DISTS=3D$( eval bsddialog \ >>>>> + --backtitle \"$OSNAME Installer\" \ >>>>> + --title \"Distribution Select\" --nocancel --separate-output \ >>>>> + --checklist \"Choose optional system components to install:\" \ >>>>> + 0 0 0 $DISTMENU \ >>>>> + 2>&1 >&3 ) >>>>> + for dist in $EXTRA_DISTS; do >>>>> + DISTRIBUTIONS=3D"$DISTRIBUTIONS $dist.txz" >>>>> + done >>>>> + fi >>>>> +fi >>>>> + >>>>> +FETCH_DISTRIBUTIONS=3D"" >>>>> +for dist in $DISTRIBUTIONS; do >>>>> + if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then >>>>> + FETCH_DISTRIBUTIONS=3D"$FETCH_DISTRIBUTIONS $dist" >>>>> + fi >>>>> +done >>>>> + >>>>> +if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" = ]; then >>>>> + bsddialog --backtitle "$OSNAME Installer" --title "Network Insta= llation" --msgbox "Some installation files were not found on the boot vo= lume. The next few screens will allow you to configure networking so tha= t they can be downloaded from the Internet." 0 0 >>>>> + bsdinstall netconfig || error >>>>> + NETCONFIG_DONE=3Dyes >>>>> +fi >>>>> + >>>>> +echo $DISTRIBUTIONS >&2 >>>>> diff --git a/usr.sbin/bsdinstall/startbsdinstall b/usr.sbin/bsdins= tall/startbsdinstall >>>>> index 63239c969ac6..8d9fb981c11d 100644 >>>>> --- a/usr.sbin/bsdinstall/startbsdinstall >>>>> +++ b/usr.sbin/bsdinstall/startbsdinstall >>>>> @@ -6,6 +6,7 @@ >>>>> : ${BSDDIALOG_EXTRA=3D3} >>>>> : ${BSDDIALOG_ESC=3D5} >>>>> : ${BSDDIALOG_ERROR=3D255} >>>>> +export BSDINSTALL_USE_DISTRIBUTIONS=3Dy >>>>=20 >>>> I said it in the review and I=E2=80=99ll say it again here since yo= u decided to >>>> just ignore me: this does not belong here. Please remove it and fix= the >>>> default in selectdists. >>>=20 >>> Firstly, ping on this. I still object to the approach taken here. >>>=20 >>> Secondly, this commit was not at all tested. You do not install the = new >>> selectdists script, and so the installer falls over (in a rather >>> cryptic way*). I am extremely unimpressed at ignoring reviewer comme= nts >>> and completely breaking the installer, and thus am immediately >>> reverting this commit. It probably works if you install the script, = but >>> it=E2=80=99s your job to test that, not mine, so when you have a pat= ch that >>> actually works please re-seek review and actually engage with the >>> comments. >>=20 >> I appreciate your feedback, but I explained why I did it that way and= that wasn't good enough for you. > > That=E2=80=99s a rather misleading characterisation of what was a disc= ussion: > > jrtc27: > This seems pretty strange to do here. Why isn't it the default? > brd: > Because in the near future it won't be the default > jrtc27: > Then change the default when the default should change? This doesn't > belong here. Besides, I'd expect a transitional period where there's a > menu asking which you'd like; pkgbase is coming along but it still > seems like it isn't quite battle-tested enough to be the only way to > install FreeBSD. > emaste: > What I'd like to do is have a menu in the boot loader that sets a > variable for experimental features, so that it can be available in > snapshots but still somewhat hidden > jrtc27: > That seems reasonable. But that still doesn't make this line belong > here. > > That was the limit of your explanation, with no response to the more > detailed follow-ups refuting that explanation. > > If you want more of a technical justification that just what is in my > view an ugly design, startbsdinstall is meant to just be a wrapper > around bsdinstall that provides the install media-specific behaviour, > with bsdinstall itself being usable standalone as a program you can > just run. Therefore any default settings like this one need to be set > inside bsdinstall, not startbsdinstall. But you also didn't provide any constructive suggestions of a better loc= ation, just went off on a tangent unrelated to this change. I have no i= dea why you brought up pkgbase as being the only way to install, as this= in no way made pkgbase the default, but just starts making room for add= ing pkgbase support in the future. I will endeavor to ask more question= s in the future. I will submit a new review taking this suggestion into account and fix t= he Makefile issue. >> Sorry for the breakage. I tested by rebuilding the memstick image ov= er and over and installing a bhyve VM: >>=20 >> sudo make -C release clean && sudo make -C release memstick NOPORTS=3D= y NOPKG=3Dy NOSRC=3Dy WITHOUT_DEBUG=3Dy >>=20 >> # ls -al /usr/libexec/bsdinstall/selectdists=20 >> -r-xr-xr-x 1 root wheel 2882 Jan 31 21:37 /usr/libexec/bsdinstall/se= lectdists >>=20 >> So I am not sure how it worked for me. > > Who knows. Maybe you forgot to stage one hunk (though you likely still > missed OptionalObsoleteFiles.inc, which is often forgotten). But arc > doesn=E2=80=99t normally let you run arc diff in that case... I missed it teasing out this part of the bigger change. Regards, Brad Davis From nobody Mon Feb 5 22:11:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTLFN14tSz597Jx for ; Mon, 5 Feb 2024 22:11:36 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTLFM35tFz57kQ for ; Mon, 5 Feb 2024 22:11:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-40fd72f7125so16061865e9.1 for ; Mon, 05 Feb 2024 14:11:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707171094; x=1707775894; 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=8DxFZY3xaI11khOlLv6yfzGVCow0lFEkITY97+WiUjs=; b=kBKlVlTkrnoTdVpCLJ83+Va9suQjLMzIr61XN2WQU8zCBWe/NPMErSMSdboBS3pICN Mw/gCzKZo9yxFFMGgL/I4+idMhAjvFWzDa//iDm1jMJ9sLl3FMmOdDS1R7stG7fBz7RX 0lI9cW5AUv0Ao5FJyvzG9xO/mVyDtICmC/rfHmjNnuDIfJBI/XVeUrcYgQbmeoIqoTjX SxbTmTii2g+ZCoEyJoaA/bfsg6HVSRpoxohUyQ2F/JocIXPtv2LnnsS29ZVCjiof6hYb YDRWx8FlEWLilYzFdajtqe22Inwwk1jcoCn23d009c1f53xnQyjd7djRQXdEoYdeE3XL F/4Q== X-Gm-Message-State: AOJu0Yz8/ABOlJgWlo1K9Vb+llhEhMMfNTPZKabQLlHYyaFU8++vxTWp fqMyXbSPaZQ10WkO5dEDJmd+plxhiWzyHzL2bKqSZqBDI8ZX65pNdK9iskIaGfWYH8Ap0b43HAX R X-Google-Smtp-Source: AGHT+IHRPXxGWEmEW//XI22uMX3wPqN/6GLRA6k+HeFJMX/2bnPuuln6qNSQFWADnrP2q5QkiPw64A== X-Received: by 2002:a05:600c:5491:b0:40f:c5cc:e756 with SMTP id iv17-20020a05600c549100b0040fc5cce756mr705237wmb.32.1707171093871; Mon, 05 Feb 2024 14:11:33 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVJx/pBKYeSVm43rWg0BkmWbcyZbKCnUw2WqU8gzg3V4+YVNTEO142LbNXaZHNqRljPCFxLG3owtegnjSP0zMmhHUAzDiHJikqHdsFfw9T3g3LHXZ/hAFwTbVoDqavivIUhPWFwCcLFEbEmUDXqwC5LLw== Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id o15-20020a05600c510f00b0040d5ae2906esm9947364wms.30.2024.02.05.14.11.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2024 14:11:33 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: 009d3f66cb5f - main - bsdinstall: separate out dist selection in prep for pkgbase support From: Jessica Clarke In-Reply-To: Date: Mon, 5 Feb 2024 22:11:22 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202401312205.40VM5dQS018685@gitrepo.freebsd.org> <1D1F0A7A-C735-4D6F-B333-39920E84CD5D@freebsd.org> <49467837-dadd-4252-bfa7-169b0630bb41@app.fastmail.com> <1BF97C99-2AB2-44C5-B0C7-8FC441735748@freebsd.org> To: Brad Davis X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TTLFM35tFz57kQ X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 5 Feb 2024, at 21:59, Brad Davis wrote: > On Sun, Feb 4, 2024, at 10:15 AM, Jessica Clarke wrote: >> On 4 Feb 2024, at 16:41, Brad Davis wrote: >>> On Fri, Feb 2, 2024, at 6:27 PM, Jessica Clarke wrote: >>>> On 31 Jan 2024, at 22:15, Jessica Clarke = wrote: >>>>> On 31 Jan 2024, at 22:05, Brad Davis wrote: >>>>>>=20 >>>>>> The branch main has been updated by brd: >>>>>>=20 >>>>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D009d3f66cb5f0cf3f1d353f311d3a687= 8b2a534e >>>>>>=20 >>>>>> commit 009d3f66cb5f0cf3f1d353f311d3a6878b2a534e >>>>>> Author: Brad Davis >>>>>> AuthorDate: 2024-01-26 17:46:46 +0000 >>>>>> Commit: Brad Davis >>>>>> CommitDate: 2024-01-31 22:05:27 +0000 >>>>>>=20 >>>>>> bsdinstall: separate out dist selection in prep for pkgbase = support >>>>>>=20 >>>>>> No functional change intended. >>>>>>=20 >>>>>> Approved by: asiciliano >>>>>> Sponsored by: Rubicon Communications, LLC ("Netgate") >>>>>> Differential Revision: https://reviews.freebsd.org/D43621 >>>>>> --- >>>>>> usr.sbin/bsdinstall/scripts/auto | 40 ++++-------------- >>>>>> usr.sbin/bsdinstall/scripts/selectdists | 73 = +++++++++++++++++++++++++++++++++ >>>>>> usr.sbin/bsdinstall/startbsdinstall | 1 + >>>>>> 3 files changed, 82 insertions(+), 32 deletions(-) >>>>>>=20 >>>>>> diff --git a/usr.sbin/bsdinstall/scripts/auto = b/usr.sbin/bsdinstall/scripts/auto >>>>>> index 9f4b5b52fe5d..c651d654d62e 100755 >>>>>> --- a/usr.sbin/bsdinstall/scripts/auto >>>>>> +++ b/usr.sbin/bsdinstall/scripts/auto >>>>>> @@ -153,36 +153,10 @@ trap true SIGINT # This section is optional >>>>>> trap error SIGINT # Catch cntrl-C here >>>>>> if [ -z "$BSDINSTALL_SKIP_HOSTNAME" ]; then bsdinstall hostname = || error "Set hostname failed"; fi >>>>>>=20 >>>>>> -export DISTRIBUTIONS=3D"${DISTRIBUTIONS:-base.txz kernel.txz}" >>>>>> -if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then >>>>>> - DISTMENU=3D`awk -F'\t' '!/^(kernel\.txz|base\.txz)/{print = $1,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` >>>>>> - DISTMENU=3D"$(echo ${DISTMENU} | sed -E 's/\.txz//g')" >>>>>> - >>>>>> - if [ -n "$DISTMENU" ]; then >>>>>> - exec 5>&1 >>>>>> - EXTRA_DISTS=3D$( eval bsddialog \ >>>>>> - --backtitle \"$OSNAME Installer\" \ >>>>>> - --title \"Distribution Select\" --nocancel --separate-output = \ >>>>>> - --checklist \"Choose optional system components to = install:\" \ >>>>>> - 0 0 0 $DISTMENU \ >>>>>> - 2>&1 1>&5 ) >>>>>> - for dist in $EXTRA_DISTS; do >>>>>> - export DISTRIBUTIONS=3D"$DISTRIBUTIONS $dist.txz" >>>>>> - done >>>>>> - fi >>>>>> -fi >>>>>> - >>>>>> -FETCH_DISTRIBUTIONS=3D"" >>>>>> -for dist in $DISTRIBUTIONS; do >>>>>> - if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then >>>>>> - FETCH_DISTRIBUTIONS=3D"$FETCH_DISTRIBUTIONS $dist" >>>>>> - fi >>>>>> -done >>>>>> - >>>>>> -if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" = ]; then >>>>>> - bsddialog --backtitle "$OSNAME Installer" --title "Network = Installation" --msgbox "Some installation files were not found on the = boot volume. The next few screens will allow you to configure networking = so that they can be downloaded from the Internet." 0 0 >>>>>> - bsdinstall netconfig || error >>>>>> - NETCONFIG_DONE=3Dyes >>>>>> +if [ -n "$BSDINSTALL_USE_DISTRIBUTIONS" ]; then >>>>>> + exec 5>&1 >>>>>> + export DISTRIBUTIONS=3D$( `dirname $0`/selectdists 2>&1 1>&5 ) >>>>>> + exec 5>&- >>>>>> fi >>>>>>=20 >>>>>> rm -f $PATH_FSTAB >>>>>> @@ -347,8 +321,10 @@ if [ -n "$FETCH_DISTRIBUTIONS" ]; then >>>>>>=20 >>>>>> [ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote = distributions" >>>>>> fi >>>>>> -bsdinstall checksum || error "Distribution checksum failed" >>>>>> -bsdinstall distextract || error "Distribution extract failed" >>>>>> +if [ -n "$BSDINSTALL_USE_DISTRIBUTIONS" ]; then >>>>>> + bsdinstall checksum || error "Distribution checksum failed" >>>>>> + bsdinstall distextract || error "Distribution extract failed" >>>>>> +fi >>>>>>=20 >>>>>> # Set up boot loader >>>>>> bsdinstall bootconfig || error "Failed to configure bootloader" >>>>>> diff --git a/usr.sbin/bsdinstall/scripts/selectdists = b/usr.sbin/bsdinstall/scripts/selectdists >>>>>> new file mode 100644 >>>>>> index 000000000000..b548e82a95f8 >>>>>> --- /dev/null >>>>>> +++ b/usr.sbin/bsdinstall/scripts/selectdists >>>>>> @@ -0,0 +1,73 @@ >>>>>> +#!/bin/sh >>>>>> +#- >>>>>> +# Copyright (c) 2011 Nathan Whitehorn >>>>>> +# Copyright (c) 2013-2018 Devin Teske >>>>>> +# All rights reserved. >>>>>> +# >>>>>> +# Redistribution and use in source and binary forms, with or = without >>>>>> +# modification, are permitted provided that the following = conditions >>>>>> +# are met: >>>>>> +# 1. Redistributions of source code must retain the above = copyright >>>>>> +# notice, this list of conditions and the following = disclaimer. >>>>>> +# 2. Redistributions in binary form must reproduce the above = copyright >>>>>> +# notice, this list of conditions and the following = disclaimer in the >>>>>> +# documentation and/or other materials provided with the = distribution. >>>>>> +# >>>>>> +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS = IS'' AND >>>>>> +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED = TO, THE >>>>>> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A = PARTICULAR PURPOSE >>>>>> +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS = BE LIABLE >>>>>> +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL >>>>>> +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF = SUBSTITUTE GOODS >>>>>> +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) >>>>>> +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT >>>>>> +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING = IN ANY WAY >>>>>> +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF >>>>>> +# SUCH DAMAGE. >>>>>> +# >>>>>> +# >>>>>> +############################################################ = INCLUDES >>>>>> + >>>>>> +BSDCFG_SHARE=3D"/usr/share/bsdconfig" >>>>>> +. $BSDCFG_SHARE/common.subr || exit 1 >>>>>> + >>>>>> +############################################################ = CONFIGURATION >>>>>> + >>>>>> +# >>>>>> +# Default distributions >>>>>> +# >>>>>> +DISTRIBUTIONS=3D"${DISTRIBUTIONS:-base.txz kernel.txz}" >>>>>> + >>>>>> +############################################################ = MAIN >>>>>> + >>>>>> +if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then >>>>>> + DISTMENU=3D`awk -F'\t' '!/^(kernel\.txz|base\.txz)/{print = $1,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` >>>>>> + DISTMENU=3D"$(echo ${DISTMENU} | sed -E 's/\.txz//g')" >>>>>> + >>>>>> + if [ -n "$DISTMENU" ]; then >>>>>> + EXTRA_DISTS=3D$( eval bsddialog \ >>>>>> + --backtitle \"$OSNAME Installer\" \ >>>>>> + --title \"Distribution Select\" --nocancel --separate-output \ >>>>>> + --checklist \"Choose optional system components to install:\" \ >>>>>> + 0 0 0 $DISTMENU \ >>>>>> + 2>&1 >&3 ) >>>>>> + for dist in $EXTRA_DISTS; do >>>>>> + DISTRIBUTIONS=3D"$DISTRIBUTIONS $dist.txz" >>>>>> + done >>>>>> + fi >>>>>> +fi >>>>>> + >>>>>> +FETCH_DISTRIBUTIONS=3D"" >>>>>> +for dist in $DISTRIBUTIONS; do >>>>>> + if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then >>>>>> + FETCH_DISTRIBUTIONS=3D"$FETCH_DISTRIBUTIONS $dist" >>>>>> + fi >>>>>> +done >>>>>> + >>>>>> +if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" = ]; then >>>>>> + bsddialog --backtitle "$OSNAME Installer" --title "Network = Installation" --msgbox "Some installation files were not found on the = boot volume. The next few screens will allow you to configure networking = so that they can be downloaded from the Internet." 0 0 >>>>>> + bsdinstall netconfig || error >>>>>> + NETCONFIG_DONE=3Dyes >>>>>> +fi >>>>>> + >>>>>> +echo $DISTRIBUTIONS >&2 >>>>>> diff --git a/usr.sbin/bsdinstall/startbsdinstall = b/usr.sbin/bsdinstall/startbsdinstall >>>>>> index 63239c969ac6..8d9fb981c11d 100644 >>>>>> --- a/usr.sbin/bsdinstall/startbsdinstall >>>>>> +++ b/usr.sbin/bsdinstall/startbsdinstall >>>>>> @@ -6,6 +6,7 @@ >>>>>> : ${BSDDIALOG_EXTRA=3D3} >>>>>> : ${BSDDIALOG_ESC=3D5} >>>>>> : ${BSDDIALOG_ERROR=3D255} >>>>>> +export BSDINSTALL_USE_DISTRIBUTIONS=3Dy >>>>>=20 >>>>> I said it in the review and I=E2=80=99ll say it again here since = you decided to >>>>> just ignore me: this does not belong here. Please remove it and = fix the >>>>> default in selectdists. >>>>=20 >>>> Firstly, ping on this. I still object to the approach taken here. >>>>=20 >>>> Secondly, this commit was not at all tested. You do not install the = new >>>> selectdists script, and so the installer falls over (in a rather >>>> cryptic way*). I am extremely unimpressed at ignoring reviewer = comments >>>> and completely breaking the installer, and thus am immediately >>>> reverting this commit. It probably works if you install the script, = but >>>> it=E2=80=99s your job to test that, not mine, so when you have a = patch that >>>> actually works please re-seek review and actually engage with the >>>> comments. >>>=20 >>> I appreciate your feedback, but I explained why I did it that way = and that wasn't good enough for you. >>=20 >> That=E2=80=99s a rather misleading characterisation of what was a = discussion: >>=20 >> jrtc27: >> This seems pretty strange to do here. Why isn't it the default? >> brd: >> Because in the near future it won't be the default >> jrtc27: >> Then change the default when the default should change? This doesn't >> belong here. Besides, I'd expect a transitional period where there's = a >> menu asking which you'd like; pkgbase is coming along but it still >> seems like it isn't quite battle-tested enough to be the only way to >> install FreeBSD. >> emaste: >> What I'd like to do is have a menu in the boot loader that sets a >> variable for experimental features, so that it can be available in >> snapshots but still somewhat hidden >> jrtc27: >> That seems reasonable. But that still doesn't make this line belong >> here. >>=20 >> That was the limit of your explanation, with no response to the more >> detailed follow-ups refuting that explanation. >>=20 >> If you want more of a technical justification that just what is in my >> view an ugly design, startbsdinstall is meant to just be a wrapper >> around bsdinstall that provides the install media-specific behaviour, >> with bsdinstall itself being usable standalone as a program you can >> just run. Therefore any default settings like this one need to be set >> inside bsdinstall, not startbsdinstall. >=20 > But you also didn't provide any constructive suggestions of a better = location, Because I provided the constructive suggestion that it should not exist and instead be the default in bsdinstall. > just went off on a tangent unrelated to this change. It was not unrelated. You said it wouldn=E2=80=99t be the default = behaviour in future. So I explained why even in that future where it=E2=80=99s no = longer the default, startbsdinstall still shouldn=E2=80=99t be overriding whatever bsdinstall=E2=80=99s default is, and that in a future where there is = more than one option in bsdinstall, that should be a user option, not hard-coded up in startbsdinstall. That is, in every possible future, the variable in question should never be set in startbsdinstall. That seems pretty related to me as a justification for my review comments? > I have no idea why you brought up pkgbase as being the only way to = install, as this in no way made pkgbase the default, but just starts = making room for adding pkgbase support in the future. See above. > I will endeavor to ask more questions in the future. >=20 > I will submit a new review taking this suggestion into account and fix = the Makefile issue. Thank you. Jess >>> Sorry for the breakage. I tested by rebuilding the memstick image = over and over and installing a bhyve VM: >>>=20 >>> sudo make -C release clean && sudo make -C release memstick = NOPORTS=3Dy NOPKG=3Dy NOSRC=3Dy WITHOUT_DEBUG=3Dy >>>=20 >>> # ls -al /usr/libexec/bsdinstall/selectdists=20 >>> -r-xr-xr-x 1 root wheel 2882 Jan 31 21:37 = /usr/libexec/bsdinstall/selectdists >>>=20 >>> So I am not sure how it worked for me. >>=20 >> Who knows. Maybe you forgot to stage one hunk (though you likely = still >> missed OptionalObsoleteFiles.inc, which is often forgotten). But arc >> doesn=E2=80=99t normally let you run arc diff in that case... >=20 > I missed it teasing out this part of the bigger change. >=20 >=20 > Regards, > Brad Davis From nobody Mon Feb 5 22:19:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTLQv5Sxdz598Gs; Mon, 5 Feb 2024 22:19: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 4TTLQv4yPBz58HZ; Mon, 5 Feb 2024 22:19:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707171591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aSnpaxX9gFvL2CsUYyLk7JHp/JoHZW4SQn0RoV1hd38=; b=GCogt3EGXKqRxXePTKOceKmJBow82SZZK0qu11duOwLkGZBNX7jT9ILm+BEV6MOopOTuzu pRR90MJSbLGFZ8AiQoeiynpUk0JU3OGfAhBFhN8PyOUBhSP14SbMidkcq7Xtc/3kpGwL3Q 6rLGTOKfejWxkVrJwvq/4nMT1D72gG42efiDWJabD6JvmFYLqdZOEwMimNLTduLDSCP09D 2ayeOyt0AGUveo27zyVljwveanlT+gGQRIDELIoUukT6Ml2Ff1P0qj/GuY1paCJs8C9zII MvoP2TprUYOzP5hdSv36Eqk/BpxADLWHcu2KeMMlP0q9jEXwqftv+3dCY+tSYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707171591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aSnpaxX9gFvL2CsUYyLk7JHp/JoHZW4SQn0RoV1hd38=; b=sswlLC5c2UPbLlFlGuyTRcGareDJjbbaqa9D4cHaWQqs6Y9PoFLNisQ60h2tw2cZiKeFED ehFHPqz16030MJSGsZiifS9tGjvdwHUsDMUmgpbBeKgTDvgWDn0pa3kEq6vgHPRoqozU16 pcb8pXJOY+Kci7D1Jput7tXdgB7XM8w8H3KXAxFTyQqruAikA631z50tfe1Ss9rhM140xV oDcsuSg63KnjIBYRcVAaAnc6jXQxVidjJe/ROBGk32FJW6mEW4P+X5WbRYiswXQPpzuPzm UtLl51VHRMJCNpkgOcHftFcFfc0NpD+Z4iNQ40c0sU9dSeV11Gjq/cCDN2tv8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707171591; a=rsa-sha256; cv=none; b=gudR+YthxAjz9j5N09bSo/o720afnIfMOaXP/BQ3oqrw6lslVFerVnuMkmLQ1DuhZhtoKj H+TdbygoynyiC45vcGHgnG0tVYihHyvOOPPQ92XKE0dmZp6aWsBDJ2rsChgM9qZZnL373Y RVlXOX+5iGxao3rNgBF4FMDep/2eT9M6qmPeeIAquWphtsgciGmHGqyXAlFbeZ0CCV+th6 d1/ezpwpsM5dlq16vstXrFRMxSkwg21f0B/LUV+VhNQ9Y4PvTie7ZJVlI7voa6tIE8rYBL qW2QXcsq/tEk10GNB2byI1SYyFTHey4qDaqWfZeNtJU4mWTDr1fN+T8TYJjwvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTLQv41sWzxRJ; Mon, 5 Feb 2024 22:19: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 415MJpnU038171; Mon, 5 Feb 2024 22:19:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415MJp7X038168; Mon, 5 Feb 2024 22:19:51 GMT (envelope-from git) Date: Mon, 5 Feb 2024 22:19:51 GMT Message-Id: <202402052219.415MJp7X038168@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: a841e5470385 - main - acpica: Create merge commit against vendor branch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a841e5470385fa62fa65d6de5bcba33afdbf42ea Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a841e5470385fa62fa65d6de5bcba33afdbf42ea commit a841e5470385fa62fa65d6de5bcba33afdbf42ea Merge: 6d4a140acfdf ef3ba9d62592 Author: Warner Losh AuthorDate: 2024-02-05 22:13:57 +0000 Commit: Warner Losh CommitDate: 2024-02-05 22:17:02 +0000 acpica: Create merge commit against vendor branch Merge tracking branch 'vendor/acpica' for vendor/acpica/20230628, and resolve conflicts. This deletes files that we've deleted since the last merge (during SVN times it seems) so future merges don't bring them up. It resolves conflicts in several files that we have modified (but we can likely fix the build system so we don't have to modify them since it's almost all headers) and one ifndef kernel that could be solved with an empty #define. It also deletes new files in the platform directory that are similar to prior non-freebsd platform files we've deleted. The net delta: +1 line. Sponsored by: Netflix sys/contrib/dev/acpica/components/debugger/dbcmds.c | 1 + 1 file changed, 1 insertion(+) diff --cc sys/contrib/dev/acpica/components/debugger/dbcmds.c index 4c8f091f126c,6636f7b9736c..74263a01dc9f --- a/sys/contrib/dev/acpica/components/debugger/dbcmds.c +++ b/sys/contrib/dev/acpica/components/debugger/dbcmds.c @@@ -149,13 -149,14 +149,14 @@@ * *****************************************************************************/ -#include "acpi.h" -#include "accommon.h" -#include "acevents.h" -#include "acdebug.h" -#include "acnamesp.h" -#include "acresrc.h" -#include "actables.h" +#include +#include +#include +#include +#include +#include +#include + #include "limits.h" #define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME ("dbcmds") From nobody Mon Feb 5 22:46:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTM1d1q95z59BMG; Mon, 5 Feb 2024 22:46: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 4TTM1d1J98z3x43; Mon, 5 Feb 2024 22:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707173189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c652tQscMEcvtTwllRJ8NSCn+XRpgx/qeXGVOKYLgJw=; b=U/lb+imm62LMrPQC7I3tSsdgtM8K+WieSlp/88J6C+NHEQxMoNbR8TJAZtMAtJ78uHSVDq veSYZgUMfZ+3R4IdvfEWYZrXxZjnlllJr7eK/Dze2amMW0oXlyiXWqItyqsPu1lpkJ3F3O TOO3YLafMz0isCNzGRhNAiAfNR8O6yKBbkXP1bKTWKEjj9pqK3LTBHM12uYBrKZnQOWPOX D9j6hlA4MwSaweb1YV5AX19tazNAtv4IHqXrWd1Dn5d+PUnC+kUSdB9KaQC+6yclGmch7b YO5ahe68WOephiPeIQmebpm2XbLR/S362vxcPTzZYx72TGapGuRgjprMW4o57w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707173189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c652tQscMEcvtTwllRJ8NSCn+XRpgx/qeXGVOKYLgJw=; b=GdCIGU2Qjek20BdhA7IldZO2vCaFy1sYoijO43MPWths+0uyIGOXjUDLK+53kR68j2nWA2 zyf/RITFnGPwdSLPGxt3hIviBF7vi02oxF00pEBeoGiFh5crkIIM74ENU7FKYlUR7Qsl67 rt4JBzKkBk5iaSuEsDSQOT7G3JaUOWlILOAUTcThzBvIZTzeDBeT1q6rtkm2wUNuoyvCNk mb4dFNa8JMMAOchwy6NO4n10IgXnh5kFH1C3L8bVCs6h5TRnesNGjahO5+YI7dHnmQ3zwE 5zyO0I848zhLIPiZA9z90xmYuZq0+C9d8CTHj9X7+foHTCpdtmumd0zxF/zVPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707173189; a=rsa-sha256; cv=none; b=al5+TlAqMceIrXQevjBncFJrvJDTyBAJqUEkoXavRHrMQBFFZErxNmouaaR2WtJN/SzzTe MIk2YEFgUpP+smP4h+u43wAnD3ewHLxs73epQTMWJpz/Z00ouCvZHmKJvXCiraY6EIuz02 Un2eEyg9ewBf3aDAjstKrmPkG2UrQc+QmTIM5mpI3wzQaBjBfodwR/PE7rZVAW6lzHN6s0 sE3IB+2FWDW1Jh4j4PJNsfRhIsKOKG5G8OYVQmGKU8FK3TCdmch0kSuMgTXY2Xc9FGeSmx A5yJC24Fp797hfUVWAxZSe1IM1GN/7w4oTk2kArSuOT5ffof7jE6DtxFmxr14Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTM1d0Ms3zysZ; Mon, 5 Feb 2024 22:46: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 415MkSvA086947; Mon, 5 Feb 2024 22:46:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415MkSG1086944; Mon, 5 Feb 2024 22:46:28 GMT (envelope-from git) Date: Mon, 5 Feb 2024 22:46:28 GMT Message-Id: <202402052246.415MkSG1086944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 069c6ac2c698 - main - sdhci_fsl_fdt(4): Actually use modified SDHCI capabilities List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 069c6ac2c698db68983efd17198e9c202c976d25 Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=069c6ac2c698db68983efd17198e9c202c976d25 commit 069c6ac2c698db68983efd17198e9c202c976d25 Author: Marius Strobl AuthorDate: 2024-02-05 19:08:33 +0000 Commit: Marius Strobl CommitDate: 2024-02-05 22:43:48 +0000 sdhci_fsl_fdt(4): Actually use modified SDHCI capabilities SDHCI_QUIRK_MISSING_CAPS needs to be set unconditionally so sdhci(4) adheres to the slot caps and caps2 set by sdhci_fsl_fdt(4). However, so far this bug didn't have an impact as the front-end only filters SDHCI_CAN_DO_SUSPEND, which in turn isn't used, yet. --- sys/dev/sdhci/sdhci_fsl_fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sdhci/sdhci_fsl_fdt.c b/sys/dev/sdhci/sdhci_fsl_fdt.c index c04bdefb1382..3220f00f277d 100644 --- a/sys/dev/sdhci/sdhci_fsl_fdt.c +++ b/sys/dev/sdhci/sdhci_fsl_fdt.c @@ -818,6 +818,7 @@ sdhci_fsl_fdt_of_parse(device_t dev) /* Call mmc_fdt_parse in order to get mmc related properties. */ mmc_fdt_parse(dev, node, &sc->fdt_helper, &sc->slot.host); + sc->slot.quirks |= SDHCI_QUIRK_MISSING_CAPS; sc->slot.caps = sdhci_fsl_fdt_read_4(dev, &sc->slot, SDHCI_CAPABILITIES) & ~(SDHCI_CAN_DO_SUSPEND); sc->slot.caps2 = sdhci_fsl_fdt_read_4(dev, &sc->slot, @@ -837,7 +838,6 @@ sdhci_fsl_fdt_of_parse(device_t dev) (vdd_mask != (sc->slot.caps & SDHCI_FSL_CAN_VDD_MASK))) { sc->slot.caps &= ~(SDHCI_FSL_CAN_VDD_MASK); sc->slot.caps |= vdd_mask; - sc->slot.quirks |= SDHCI_QUIRK_MISSING_CAPS; } } From nobody Mon Feb 5 22:46:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTM1f35Hvz59BJn; Mon, 5 Feb 2024 22:46: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 4TTM1f2Jgbz3x95; Mon, 5 Feb 2024 22:46:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707173190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f5YlHSrnTYdxlx+a/iinQswhrN72evZyOhSuXg/K2WE=; b=v+Hr2Mic0y2VJofkt7HEI3xhJjT7m4zNAYg8xc9kJSxvPm0CMqsrauOES5leSsI7YgVCXp jZoHvZm2JAOcWqI+CDOKxkQW0K0gtKpKHrXNiDyBc4Uljqz/GIcAzIEZvQA5Jl0tKof2Kw 6305g8bEGPcex8Z3YIQC7IeTRMFQCGzCOHqy97CW7uH6Oy0pDVfvirlc4uCX4n+bLNyzfd K3mmBYiFwTVs39F6+ftw0SaTONXqLRn5fuIlWGpYoff833xIhKL0VXo8+8/wiQvBvPTToN lp4LIU+x8DwNaIGweK1XfY8rSpcO0Cw4VqoO2QrOtvBW6C5aBOcIWybssy9EOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707173190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f5YlHSrnTYdxlx+a/iinQswhrN72evZyOhSuXg/K2WE=; b=eMRw+oVNlBuO2MaPVlT54g3BHkN3L7FMJFHH+yTo02sLvpOuQ3bTpTOp0ou3KymooVEVtE /BtZEQAFe9Q0/9sxChhxj2onsOsGMkloGk1BmYXX489AwIOLgD8Ghz5lpi//66KIhbx8d+ sX7+lMriwM0z0EnJKr7fveI7qG3OZ7VDqyXEmcWZPyKoZ6z7UDw190oUYmHOkYG6MoUS3c X1CPV4TyDP9H/y8CZI4vQslHmNatnLL2qKemRLSOv4e7j5Ki130t1AVYVI7kzrBa5QytS2 lLWEyfylmRT9DKls9RiSSfsikfOuBFRwWwTPtGfpylRhK6gaAbcPj6LAwfhCxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707173190; a=rsa-sha256; cv=none; b=hSCmYV+PnoKJxABVwqdTgS04OLe07RRXIyRP/p+Z7oEGdJX9kJbWigfJEy+KNmBm2HC9vQ zn15LvnnG4C7R6YUk3wGYGW3TiiQEpqzbkuWc3fA2rcEvjEKRxutZ9xLgOt4uDgZxAihng 7T+G3oG8Xg5E6bp3O5IWtWTo/vpzTq2JaRdEaVougilDjaEIrmW5DqINzj6GyEJ8Y++qbY PNQ0XPUun67AZjtgJm+3TGbArgGSBBtDrbvIFz0VWzE7fg23iB1sYjfCgHuOqXHKiUzvOa 2L3tTPYOLwFITDkDiGDKhERtbTMGD9nDJ6GrVQlsFsolsCu88gH9xkxiqsGEAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTM1f1PXlzyw2; Mon, 5 Feb 2024 22:46: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 415MkUtj087001; Mon, 5 Feb 2024 22:46:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415MkUsI086998; Mon, 5 Feb 2024 22:46:30 GMT (envelope-from git) Date: Mon, 5 Feb 2024 22:46:30 GMT Message-Id: <202402052246.415MkUsI086998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: ed81a15517b8 - main - fib_algo(4): Lower level of algorithm switching messages to LOG_INFO List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed81a15517b8a8f587fd7282c3690513bb798242 Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=ed81a15517b8a8f587fd7282c3690513bb798242 commit ed81a15517b8a8f587fd7282c3690513bb798242 Author: Marius Strobl AuthorDate: 2024-02-05 19:36:13 +0000 Commit: Marius Strobl CommitDate: 2024-02-05 22:44:38 +0000 fib_algo(4): Lower level of algorithm switching messages to LOG_INFO Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather easy to trigger debug messages such as: [fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to radix4_lockless Also, the "severity" of these events generally only justifies LOG_INFO and not LOG_NOTICE. Reviewed by: melifaro --- sys/net/route/fib_algo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c index 1e37acf620a9..25370f18934f 100644 --- a/sys/net/route/fib_algo.c +++ b/sys/net/route/fib_algo.c @@ -1382,7 +1382,7 @@ rebuild_fd_flm(struct fib_data *fd, struct fib_lookup_module *flm_new) if (flm_new == fd->fd_flm) fd_tmp = fd; else - FD_PRINTF(LOG_NOTICE, fd, "switching algo to %s", flm_new->flm_name); + FD_PRINTF(LOG_INFO, fd, "switching algo to %s", flm_new->flm_name); result = setup_fd_instance(flm_new, fd->fd_rh, fd_tmp, &fd_new, true); if (result != FLM_SUCCESS) { From nobody Mon Feb 5 23:45:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTNKy25vCz59HmT; Mon, 5 Feb 2024 23:45: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 4TTNKy10Stz45g4; Mon, 5 Feb 2024 23:45:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707176742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wx0PeZg8jixzuU2B+lcqmg8+WEF9OcE+SGDqQmMjEPc=; b=I4PV0ZvfA7oKdSia3IiykYi6Ju5X5AeBkKMIRKHFsIUh5qpmPS7FopbQarKmx8x/+xl9hB PP9FmsSJgeNFy3e9NAe61RnOxGBsKB8O2z9vZem4BIdu6DVFaJeNQb5Fo+9MEbPCbRJ1bf RhqGv1xSEalKnKCj8dirNEPt/3uPkdKnnMM1Mz9fkconFRx0d75DacQCHwg8F2Y8ymqO1m s42ZhUmR+b2fjr/+45jdz18M7dlEb56+LXxFvGuup7RTSkqxteZZweRQumgpiHU52eS3Qs YjN+SE+PfVTGm7WlFyJhHmQI7luLrNfEF/TZTfHOFJXXs6kq3geomyE66xdu9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707176742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wx0PeZg8jixzuU2B+lcqmg8+WEF9OcE+SGDqQmMjEPc=; b=wNTXy9vDUxO2sieIMgEfai1ZsAf46wpQxEGJ7+o5tSQFXB1YRE8bDQfGabP7RbKXVVk/9k IiFJcXFsKXAj9nI/cBodRk304CvzuiVAFeTTDhTGzz9MB+k1LEd7AR/oqejNhrBp79iaFr S9XaXVpI2qPMMDahWVrSMaCbn//vUdj9psdU5eCavEVBgPwsDR3a30YK41Ep3M76kRY2Sw P/eXsf3UNZFdPXGghztJCKD46DvzySejUsrl2Z7QmHde129mvpD/BJzBq7HtOfCPcQZquo B/bD9nQAnyemnW49caN82N8mmZu/tBmKEBvH7HtdZvcbLq6J6ZTzkh0VK7EP3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707176742; a=rsa-sha256; cv=none; b=Ph2+gZZrDDUIUTo/nUHZYpH+1VoQGgJ4unubcFJcrJdlYbNbv56idbVcbT85yPMocessUI LVpLIYJof6r4/tsJTdIzLhptkzfaC1IZ7wShml7aMOCv8JjNVxhsxAoWf/b23n9m4zLSH/ 8Mob7axXzzOUvXvUUJI0rdJaEwamdI6+r4miss/5WAvZo73GLd/F11NYQuq3Ki0BUidqSI 7uf9faNez1LIiJJoAqd0z5J+3JQhnIJNejdj/+lZL+xyi4n+WRUQAf4f2GWEZV5LYlGemn SnRXNwyjaB2Ld7tnx1pUXXAHfvC+hkqniyCe0uQuembg2o0TDkPoXl0zK2TORA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTNKx6ttwz11CW; Mon, 5 Feb 2024 23:45: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 415NjfeO087889; Mon, 5 Feb 2024 23:45:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415NjfaN087886; Mon, 5 Feb 2024 23:45:41 GMT (envelope-from git) Date: Mon, 5 Feb 2024 23:45:41 GMT Message-Id: <202402052345.415NjfaN087886@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: bf20896da454 - main - i386: Use bool for booleans in getmemsize List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf20896da4545067eec2e6d8203a57fcdcee52cf Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bf20896da4545067eec2e6d8203a57fcdcee52cf commit bf20896da4545067eec2e6d8203a57fcdcee52cf Author: John Baldwin AuthorDate: 2024-02-05 23:39:31 +0000 Commit: John Baldwin CommitDate: 2024-02-05 23:39:31 +0000 i386: Use bool for booleans in getmemsize Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43716 --- sys/i386/i386/machdep.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index ac675bd0dd42..008d67017f68 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1130,10 +1130,11 @@ physmap_done: if (physmap[i + 1] < end) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { - int tmp, page_bad, full; int *ptr; + int tmp; + bool full, page_bad; - full = FALSE; + full = false; /* * block out kernel memory as not available. */ @@ -1148,7 +1149,7 @@ physmap_done: && pa < dcons_addr + dcons_size) goto do_dump_avail; - page_bad = FALSE; + page_bad = false; if (memtest == 0) goto skip_memtest; @@ -1163,25 +1164,25 @@ physmap_done: */ *(volatile int *)ptr = 0xaaaaaaaa; if (*(volatile int *)ptr != 0xaaaaaaaa) - page_bad = TRUE; + page_bad = true; /* * Test for alternating 0's and 1's */ *(volatile int *)ptr = 0x55555555; if (*(volatile int *)ptr != 0x55555555) - page_bad = TRUE; + page_bad = true; /* * Test for all 1's */ *(volatile int *)ptr = 0xffffffff; if (*(volatile int *)ptr != 0xffffffff) - page_bad = TRUE; + page_bad = true; /* * Test for all 0's */ *(volatile int *)ptr = 0x0; if (*(volatile int *)ptr != 0x0) - page_bad = TRUE; + page_bad = true; /* * Restore original value. */ @@ -1191,7 +1192,7 @@ skip_memtest: /* * Adjust array of valid/good pages. */ - if (page_bad == TRUE) + if (page_bad == true) continue; /* * If this good page is a continuation of the @@ -1212,7 +1213,7 @@ skip_memtest: printf( "Too many holes in the physical address space, giving up\n"); pa_indx--; - full = TRUE; + full = true; goto do_dump_avail; } phys_avail[pa_indx++] = pa; /* start */ From nobody Mon Feb 5 23:45:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTNKz4F7mz59Hgw; Mon, 5 Feb 2024 23:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTNKz1dXvz45qv; Mon, 5 Feb 2024 23:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707176743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1fBKG8VYZr25nCz7RakeT9PMz95BbFGdDn8AQpQdK18=; b=x6rw5QqMMk3lt1f9RLgRIAIjU/YN67RwiaONGox92BZdwDj3rOzfooD+LncbOuLneTgmOZ Za7CjFqe/hRU/1vi0fXOMCRDhMdaOlDMvujlZQTBiTMgRTO1XQJ/Sg2IVpZs87EsuuAkRW N7z/62ZPozEwWbVHFvP9aSsP2WuP3I48O0mJr6iISnWDlFlo7gStzKK9YiD2G75qH+F3Tn sr5ctGLVdoS3GW9T6/L+matdcJ4bDA1IeYuyWzruwU2G6twxS8U17/1VqkTg0/wOTByX+u sjYoMbtJD5BgXE/RggfaNprUA+FSGadfT8HhsAUNxtvR6gS1BHx8knwH2QaJGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707176743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1fBKG8VYZr25nCz7RakeT9PMz95BbFGdDn8AQpQdK18=; b=ewntLNOul5jW0PbjVfZ20x6e1zQGWPRIPBQfGBupO8dDh27rtstQTqWm/muQBiK0oFkxcY Mn0ySg7CHxu7yL+5zxfUDUkYmKkBwe7LBEjD4zs5TgmeUwkB/tJHoJKZzAoBK7dNOHaIAv nd23v/A3XOaAs4TdXUjCS+7Jcl7GTssDZAxKA2DUzNzbHx6XEjWLKD6I2BRKmSp4V7Nh8i tg5jds5lCPIO0Q0dSyifphJG1lVhLlT0TcT0KTOlVRAgzZ+CheHv7td1UR7U3V1eckOyXE ztUY6fai7IbEsCoxa0eZGpC8KD1Xza/1kSazyItqtMXM/SfNVIHKAZ5RFU7fZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707176743; a=rsa-sha256; cv=none; b=Qvl7eYf3wHGVuXs8FahjcfDo67+UxBQZvb0obohriczS3c5/bv/h7oQRND7Hln6XBEGV4d ln62D7WhTVITweOB5zm090sbUc8AgUOSxKXYkFm9Svo/JldbkZYKxua6GBdllASvQDf+M6 W7o8NTqecS5B/SlnUIJIssx+89jdCa/w/jbgkQoxekYrQyqqHR0cvJ2xHC1GVDMBX0KwHk 4fh2Iesj1AnD1X4nq5wGO4As9tA04mPhrCMtrslQSO6DLkyji9nDRJngceZPDLe+bFHz9j 8grB195976FiknmanYHoYBwjLea0SDYV961VncwKGSY7oWtw0owVVvJeBnNalg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTNKz0RYvz10yZ; Mon, 5 Feb 2024 23:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 415NjgZk087931; Mon, 5 Feb 2024 23:45:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415NjgsS087928; Mon, 5 Feb 2024 23:45:42 GMT (envelope-from git) Date: Mon, 5 Feb 2024 23:45:42 GMT Message-Id: <202402052345.415NjgsS087928@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: c83d83206a39 - main - speaker: Use standard C bool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c83d83206a39c7c47139acac46885bea54ee4876 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c83d83206a39c7c47139acac46885bea54ee4876 commit c83d83206a39c7c47139acac46885bea54ee4876 Author: John Baldwin AuthorDate: 2024-02-05 23:40:34 +0000 Commit: John Baldwin CommitDate: 2024-02-05 23:45:32 +0000 speaker: Use standard C bool Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43717 --- sys/dev/speaker/spkr.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index fa01c7366d8d..c698a4820434 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -121,12 +121,6 @@ rest(int centisecs) * except possibly at physical block boundaries. */ -#ifndef __bool_true_false_are_defined -typedef int bool; -#endif -#define TRUE 1 -#define FALSE 0 - #define dtoi(c) ((c) - '0') static int octave; /* currently selected octave */ @@ -182,8 +176,8 @@ playinit(void) whole = (100 * SECS_PER_MIN * WHOLE_NOTE) / DFLT_TEMPO; fill = NORMAL; value = DFLT_VALUE; - octtrack = FALSE; - octprefix = TRUE; /* act as though there was an initial O(n) */ + octtrack = false; + octprefix = true; /* act as though there was an initial O(n) */ } /* @@ -280,7 +274,7 @@ playstring(char *cp, size_t slen) pitch -= OCTAVE_NOTES; } } - octprefix = FALSE; + octprefix = false; lastpitch = pitch; /* ...which may in turn be followed by an override time value */ @@ -309,29 +303,29 @@ playstring(char *cp, size_t slen) break; case 'O': if (cp[1] == 'N' || cp[1] == 'n') { - octprefix = octtrack = FALSE; + octprefix = octtrack = false; ++cp; slen--; } else if (cp[1] == 'L' || cp[1] == 'l') { - octtrack = TRUE; + octtrack = true; ++cp; slen--; } else { GETNUM(cp, octave); if (octave >= nitems(pitchtab) / OCTAVE_NOTES) octave = DFLT_OCTAVE; - octprefix = TRUE; + octprefix = true; } break; case '>': if (octave < nitems(pitchtab) / OCTAVE_NOTES - 1) octave++; - octprefix = TRUE; + octprefix = true; break; case '<': if (octave > 0) octave--; - octprefix = TRUE; + octprefix = true; break; case 'N': GETNUM(cp, pitch); @@ -396,7 +390,7 @@ playstring(char *cp, size_t slen) * endtone(), and rest() functions defined above. */ -static int spkr_active = FALSE; /* exclusion flag */ +static bool spkr_active = false; /* exclusion flag */ static char *spkr_inbuf; /* incoming buf */ static int @@ -414,7 +408,7 @@ spkropen(struct cdev *dev, int flags, int fmt, struct thread *td) #endif /* DEBUG */ playinit(); spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, M_WAITOK); - spkr_active = TRUE; + spkr_active = true; return(0); } } @@ -455,7 +449,7 @@ spkrclose(struct cdev *dev, int flags, int fmt, struct thread *td) wakeup(&endtone); wakeup(&endrest); free(spkr_inbuf, M_SPKR); - spkr_active = FALSE; + spkr_active = false; return(0); } From nobody Tue Feb 6 00:15:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTP0g27Gyz59Lhv for ; Tue, 6 Feb 2024 00:15:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTP0f4D2Vz4B3g for ; Tue, 6 Feb 2024 00:15:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=ZyTeDH5D; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::534) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-56025fcaebaso2734250a12.0 for ; Mon, 05 Feb 2024 16:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1707178545; x=1707783345; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=y0q5DMomjYKNPBjd3d0KfKk9I4GCfSPshP8O1e07oYI=; b=ZyTeDH5DzmlbiJhLyS1hxJzPIjnsrzfY9sk+151b99A6xgt0s/rJ9cFBnul0bIgIXV O3MM/QqJHZ9vtxeZgsCE5PXGcbm9DJYBQyEzbd805qd7CWr2cbehYyLfIblVVnpIkf26 LIWcJ+xmks0fosVlLeZr16MGQ9w2pu/4pwS9uTJlbKMekUj34mWCbJjL941FXyK+oIeA +EkLhva3k011nPYyd2jPXRuXqTp7gWfhNdrUse7ZjuQ2jHUtJD/gL9cBp6fpuSYPOz9r ggXgFDZTVFjfBpZT6rgpSQyX1bLw48lkAMuOG+0GBxtRdpaCO1Unchbes8eW9ITh7J// cvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707178545; x=1707783345; 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=y0q5DMomjYKNPBjd3d0KfKk9I4GCfSPshP8O1e07oYI=; b=E9EdM/ptmyewg3TxlS9AQStSmP6YunCQrjTXaOt3649+TCgeskJ7JtV4IRKrUjZ7Xi invAUqaJ1/AO8ydyl8DMTEFlWKHdeoftnUKIzjnw96pbZG6yu+gJxoRHU3mCKDY19AX6 04V7p6ON36ljg722dWZdXxjxCg+uHnhEJjUfM/MvFPrVJBBcUafDXMHkLTLLAp5g4Uto u38uNnnBpkShP3BdEiGa1G2DZcZ553fSFkO4pfS/giFMWA2OdPqVG1x1JQmUtk8zSUDu fy2M8FgyJyGzhv9hrLTPVjle0RoNQRKbqzsp0BFOFV+UKXOohjMp+8VvMtAr6CZJreu8 mnrQ== X-Gm-Message-State: AOJu0YyZwQd2Sh7OWW9ycXbMh5g8tWcpA9bTFMZL+KTZtgwZA2DC3TCB au7ywoOAP43Irqdb9Jrf0AXVLnKyE6EW1mG7dVpZJE30XsioVE9zbgWIVcbHHUD9goa1Vc/xy2K jzY1wZF9YbDegrBQ1iBC/yR9udaAV1Sck4eAniw== X-Google-Smtp-Source: AGHT+IEOyp0qxCDdxKMaT0sM1Qdv9YVqCamS7L+MBshAF+q+icf++hd7Uu5JvstwonY2SlfDYUVEiRfivE1PUg9sXRA= X-Received: by 2002:a05:6402:1203:b0:560:64f4:cbd5 with SMTP id c3-20020a056402120300b0056064f4cbd5mr518785edw.21.1707178545532; Mon, 05 Feb 2024 16:15:45 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <737703f2-26a6-4a84-a64b-3fa55cad721c@FreeBSD.org> <20240131204355.9EA2B19F@slippy.cwsent.com> In-Reply-To: From: Warner Losh Date: Mon, 5 Feb 2024 17:15:36 -0700 Message-ID: Subject: Re: git: 07c64d74917e - main - acpica: Import ACPICA 20230628 To: Cy Schubert Cc: Andriy Gapon , Jung-uk Kim , Baptiste Daroussin , src-committers , "" , "" , Dmitry Salychev Content-Type: multipart/alternative; boundary="000000000000c66e3d0610ab7a3a" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::534:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4TTP0f4D2Vz4B3g --000000000000c66e3d0610ab7a3a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 5, 2024 at 8:55=E2=80=AFAM Warner Losh wrote: > > > On Mon, Feb 5, 2024 at 8:34=E2=80=AFAM Warner Losh wrote= : > >> >> >> On Wed, Jan 31, 2024 at 1:59=E2=80=AFPM Warner Losh wro= te: >> >>> >>> >>> On Wed, Jan 31, 2024, 1:44=E2=80=AFPM Cy Schubert >>> wrote: >>> >>>> In message <737703f2-26a6-4a84-a64b-3fa55cad721c@FreeBSD.org>, Andriy >>>> Gapon >>>> wri >>>> tes: >>>> > On 31/01/2024 19:40, Cy Schubert wrote: >>>> > > In message <04c4a0e1-aa79-4d25-a1f7-2196cfa65578@FreeBSD.org>, >>>> Jung-uk Kim >>>> > > writ >>>> > > es: >>>> > >> On 24. 1. 31., Baptiste Daroussin wrote: >>>> > >>> Hello, >>>> > >>> >>>> > >>> Either this one or the previous import is breaking arm64 build >>>> > >>> >>>> > >>> --- acpi_iort.o --- >>>> > >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:103:4: >>>> error: fiel >>>> > d >>>> > >>> 'data' with variable sized type 'union (unnamed union at >>>> > >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:98:2 >>>> > >>> )' not at the end of a struct or class is a GNU extension >>>> > >>> [-Werror,-Wgnu-variable-sized-type-not-at-end] >>>> > >>> 103 | } data; >>>> > >>> | ^ >>>> > >> >>>> > >> Sorry for the breakage. I will fix it soon. >>>> > >> >>>> > >> BTW, this code was added by this: >>>> > >> >>>> > >> https://reviews.freebsd.org/D31267 >>>> > >> >>>> > >> It seems struct iort_named_component was a hack, which duplicated >>>> > >> ACPI_IORT_NAMED_COMPONENT but with a fixed length field >>>> DeviceName[32]. >>>> > >> Is it really necessary? >>>> > > >>>> > > Though they incorporated the WOL patch I've been using, they've >>>> broken >>>> > > poweroff. >>>> > >>>> > The poweroff issue could be because of 9cdf326b4f >>>> >>>> Thanks. I clued into that a while ago after taking a break to read the >>>> ML. >>>> >>>> This smelled of the original WOL problem I had last year that required >>>> pulling the plug to allow the NIC to see the magic packet, but worse. >>>> Hence >>>> I was barking up the wrong tree. >>>> >>> >>> On an semi-related issue... mind if I do a proper merge commit to catch >>> up and not leave hidden landmines for the future? >>> >> >> OK. I'll do a proper merge commit. We've accumulated a few dozen >> conflicts I'll have to sort out (though I think they >> are all in files we don't user or have deleted). >> > > After resolving the conflicts, it's one file (limts.h) that's now include= d > where it wasn't before. Once I make sure that world and kernel still buil= d, > I'll push the change since limits.h isn't going to affect any functionali= ty > and I may need to ifdef it for the kernel anyay... > > Many of the conflicts could be avoided if we didn't modify the files like > we do. I'll see about working up a patch, either myself or someone else w= ho > has interest, and submitting it for review. This would make future merges > even easier since the changes we've made are all build-system related and > need manual intervention today. > I've merged the merge commit with the one fixup. I'm also thinking that we can stop doing the transforms that we do on import that make it harder than it needs to be to continue merging. Slight changes to the build infrastructure, as well as git's vastly better merging abilities should allow us to drop about 2k lines of diffs, allowing us to audit the delta with upstream, which currently is all-in at: 347 files changed, 2891 insertions(+), 1700 deletions(-) which is kinda hard to audit for correctness. The vast majority of the files changed are just hacking headers that's better done with the build system. Once that's fixed we can look at why we have 6 files that have over 100 lines of difference each (much if it has the feel of mismerges rather than intention). Warner > > Warner >>> >>>> >>>> -- >>>> Cheers, >>>> Cy Schubert >>>> FreeBSD UNIX: Web: https://FreeBSD.org >>>> NTP: Web: https://nwtime.org >>>> >>>> e^(i*pi)+1=3D0 >>>> >>>> >>>> --000000000000c66e3d0610ab7a3a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Feb 5, 2024 at 8:55=E2=80=AFA= M Warner Losh <imp@bsdimp.com> = wrote:


On Mon, Feb 5, 2024 at 8:34=E2=80=AFAM Warner= Losh <imp@bsdimp.co= m> wrote:


On Wed, Jan 31, 2024 at 1:59=E2=80= =AFPM Warner Losh <i= mp@bsdimp.com> wrote:


On Wed, Jan 31, 2024, 1:44=E2=80=AFPM Cy = Schubert <Cy.Schubert@cschubert.com> wrote:
In message <737703f2-26a6-4a84-a64b-3fa55cad72= 1c@FreeBSD.org>, Andriy Gapon
wri
tes:
> On 31/01/2024 19:40, Cy Schubert wrote:
> > In message <04c4a0e1-aa79-4d25-a1f7-2196cfa65578@FreeBSD.org&g= t;, Jung-uk Kim
> > writ
> > es:
> >> On 24. 1. 31., Baptiste Daroussin wrote:
> >>> Hello,
> >>>
> >>> Either this one or the previous import is breaking arm64 = build
> >>>
> >>> --- acpi_iort.o ---
> >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:10= 3:4: error: fiel
> d
> >>> 'data' with variable sized type 'union (unnam= ed union at
> >>> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:98= :2
> >>> )' not at the end of a struct or class is a GNU exten= sion
> >>> [-Werror,-Wgnu-variable-sized-type-not-at-end]
> >>>=C2=A0 =C2=A0 =C2=A0103 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0} data;
> >>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0^
> >>
> >> Sorry for the breakage.=C2=A0 I will fix it soon.
> >>
> >> BTW, this code was added by this:
> >>
> >> https://reviews.freebsd.org/D31267 > >>
> >> It seems struct iort_named_component was a hack, which duplic= ated
> >> ACPI_IORT_NAMED_COMPONENT but with a fixed length field Devic= eName[32].
> >> Is it really necessary?
> >
> > Though they incorporated the WOL patch I've been using, they&= #39;ve broken
> > poweroff.
>
> The poweroff issue could be because of 9cdf326b4f

Thanks. I clued into that a while ago after taking a break to read the ML.<= br>
This smelled of the original WOL problem I had last year that required
pulling the plug to allow the NIC to see the magic packet, but worse. Hence=
I was barking up the wrong tree.

On an semi-related issue... mind if I do a = proper merge commit to catch up and not leave hidden landmines for the futu= re?

OK. I'll do a proper me= rge commit. We've accumulated a few dozen conflicts I'll have to so= rt out (though I think they
are all in files we don't user or= have deleted).

After res= olving the conflicts, it's one file (limts.h) that's now included w= here it wasn't before. Once I make sure that world and kernel still bui= ld, I'll push the change since limits.h isn't going to affect any f= unctionality and I may need to ifdef it for the kernel anyay...

Many of the conflicts could be avoided if we didn't m= odify the files like we do. I'll see about working up a patch, either m= yself or someone else who has interest, and submitting it for review. This = would make future merges even easier since the changes we've made are a= ll build-system related and need manual intervention today.

I've merged the merge commit with th= e one fixup.

I'm also thinking that we can sto= p doing the transforms that we do on import that make it harder than it nee= ds to be to continue merging. Slight changes to the build infrastructure, a= s well as git's vastly better merging abilities should allow us to drop= about 2k lines of diffs, allowing us to audit the delta with upstream, whi= ch currently is all-in at:
=C2=A0347 files changed, 2891 insertio= ns(+), 1700 deletions(-)
which is kinda hard to audit for correct= ness. The vast majority of the files changed are just hacking headers that&= #39;s better done with the build system. Once that's fixed we can look = at why we have 6 files that have over 100 lines of difference each (much if= it has the feel of mismerges rather than intention).

<= div>Warner
=C2=A0

Warner

--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 ht= tps://FreeBSD.org
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<cy@nwtime.org>=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 =C2=A0 =C2= =A0 =C2=A0 e^(i*pi)+1=3D0


--000000000000c66e3d0610ab7a3a-- From nobody Tue Feb 6 02:02:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTRN130PZz59WRw; Tue, 6 Feb 2024 02:02:41 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTRN11tkBz4Nqx; Tue, 6 Feb 2024 02:02:41 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707184961; 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=dmA0I8mqMnA9FVxDALX6TEuSo04BboqJdoHitt+3hlg=; b=Ui1Mh9rTlIDOrer8AMG2YWYv8Q3zuiHPvQ/ehpoWbI92SJ+yQhLMwtVh4mo//Tb2o7iclJ DOs90TTHtgY6o2laiUxDQeqDylkPwdwFCNKhKrz7EY+nr5XDrKvycQ8KXE2qveSD8Z0l3A sgwuMnRatLXYUOWJE+lco/DDcI11ZdtsBcSwh3xnrvHgpSKcw8xzzolaJLAwzyBw8EBSuD i5fGuA1YkHlMJcL/Sl3HR4/GLpFDW7Q/h6NVILQ9vEyrYY+uhHzxq6CTQQuZ6uIcEMAfEy 5ppKFHDjS0r+Y+GYYwHb6tgd6RWMYjX0OHQLbGHtLg1cQmKmmaGx0gKOLdU3Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707184961; 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=dmA0I8mqMnA9FVxDALX6TEuSo04BboqJdoHitt+3hlg=; b=XgAaQxS/BCOjaTIYMh8tl4CGRnmeORVPx6lh55BpA7kIDtPJhlyfOjGgJMrJYifFp9WlCE TY8dyzfcOoUUag4Ioi3RcbPX+RT856WmaXwlFFN3T0a4LeojoQr0iY/mVn1a6iKZCHvxl4 LserMgRM5wmDSOvcUmn6nIvAnNYimuIyOJFIS92AP9K9OSawQPr/1crkG2/MT/8h44j+PI g+oNUaJcpfrxWfX+JE00/wONKScgIxMoq72npPZn1eR88rwsK/tDxfpCOptBY2Zh5ebWEC /cIlolvw5/uIbx+LBXF99V+Duj8RwhVPAyWq23eSN6qrQmpgpEpHdbJO0YZNxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707184961; a=rsa-sha256; cv=none; b=JqaeIa9EBy6qhr5h5qxkMGw781cpMZ49seNbokii5a/apY8rN+FLezdwWMhMVA2Nevm2QL w3huRUy5/7dSGftOOe9Jw3Tmwe8nmhn5zMV7nNS/c8m8aQYTOYGVunipBWUSE7B2z8od6M 3dMOL7ToSI/COr5kUGYB3B7owmEyDiJ9P4zckhsqhIjfNP+znpudB1H5Xy3i9zr9ATizec o5LwQ7wYx0t6XKb4OBIKjb3Zxc+mr5RHdS8gIcsWpiqOWfWtSqL4606MVDm0etDJwZ7/VH IHmqksJI39X7zy0dzOngQUVQ2HenOl1/4r9xmw5jEENyscNYI0dHPd3ynvaW+w== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TTRN00Y2FzJ1s; Tue, 6 Feb 2024 02:02:39 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 5 Feb 2024 18:02:37 -0800 From: Gleb Smirnoff To: Kristof Provost Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6d4a140acfdf - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex Message-ID: References: <202402052119.415LJKSN037380@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202402052119.415LJKSN037380@gitrepo.freebsd.org> On Mon, Feb 05, 2024 at 09:19:20PM +0000, Kristof Provost wrote: K> The branch main has been updated by kp: K> K> URL: https://cgit.FreeBSD.org/src/commit/?id=6d4a140acfdf637bb559d371c583e4db478e1549 K> K> commit 6d4a140acfdf637bb559d371c583e4db478e1549 K> Author: Igor Ostapenko K> AuthorDate: 2024-02-05 16:22:31 +0000 K> Commit: Kristof Provost K> CommitDate: 2024-02-05 21:18:11 +0000 The author should be Kajetan :( I guess you were working on several reviews at a time and had name in paste buffer. :( K> pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex K> K> The redirection pool stored in r->rpool.cur is used for loadbalancing K> and cur can change whenever loadbalancing happens, which is for every K> new connection. Therefore it can't be trusted outside of pf_map_addr() K> and the r->rpool->mtx mutex. After evaluating the ruleset, loadbalancing K> decission is made in pf_map_addr() called from within pf_create_state() K> and stored in the state itself. K> K> This patch modifies BOUND_IFACE() so that it only uses the information K> already stored in the state which has been obtained in a way which K> respects the r->rpool->mtx mutex. K> K> Reviewed by: kp K> Differential Revision: https://reviews.freebsd.org/D43741 -- Gleb Smirnoff From nobody Tue Feb 6 02:08:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTRW06HhTz59Wsn; Tue, 6 Feb 2024 02:08:44 +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 4TTRW03lQHz4PWy; Tue, 6 Feb 2024 02:08:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707185324; 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=i+DX4PN3SbkDY6SDDmq1V/Vs/7W6hUw/Gg2cD9Tm7SA=; b=k8TLWiXYud1jjeC9eGIkUOgn/a5NOBS/Dd05UqIwpiUCqyYeka02EKPBZt2+7hqMcfyO5h aWNnX6k0ODgIuxjXr39mEVhhwQEXqD7MOK8nAahWXffAd2FSCLJcB8UNmfZ01PSA58lXaQ jc4ypEiA1gDIyLl2Aap5SDCQODvT6hBNVk0h+iWgqp+vy39mcGWRB+nmChWbG0j3wUhqaz 1EbcRyNrwhgzH7Jl/CyDcmyGv5s0oreSjsXydJ2fVOnjfv+0lJy4cWFL/wNxp6f5YIhPSv JK/iSrmdAsgwhmRbez2NBXaQ9lYIoe57Ktw3+o386GYV0fsNxoViiktOOmG1aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707185324; 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=i+DX4PN3SbkDY6SDDmq1V/Vs/7W6hUw/Gg2cD9Tm7SA=; b=ujiuysHrfaFbNC3NXaB24wGpBrXPRdgHQytzMWubCjBadLcqpKhlt6RWnBk7bRPIfuPWc0 SaYvyku1F9thDFZZjS/MupBH0WLC2fCGnMEZ8dtufWfWFZaI/0wvLlsNibp6fR8hgh/UOO Frn2mpFN3kCey7JCv+tjF61LDCMAWbETG0kn61OcUn8M4KhHaWHtJigyxroMEbbHk3aifC a8s67+1uBkkZZ2Rbzj0vEM1UHbZ0z2k68ybFI4a1sk5CZ26ZS3ktu4kDaAetboKqYzjY/i MGN2FshnYr3Qk7UOc2Ow2AcY9JJeiYDoktWxSZDU3LdVH/ab8lfx7ky8i1PJhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707185324; a=rsa-sha256; cv=none; b=bKS96LUv8O7hxKX1oleATlnWmqM3H7uY02WNG56nGj/XqEyss1SXE3b+2t+DmuAShUJBdA SPhwyRd35bqVUUpCFYdBT10997tNNOTI1rhrtC4oMEfJXIEjlGZ4S8s8ABLDQvzIDD+uCo 2NlSvEJ8dbXR/6QmDlJReNPDEyMGq+lbI8fSK+gKOqjeyVPYKQXqLWQ6mtSUFuTmL6Gixh hIcOZ/EsaK0415GjikQVJXuoksrb6qOgAjYFO7CYJIDiMbjLDZ79l+cA1dH7DOw7jTl2ki ItIsdWXfIKvh1Bz1gNUiYq/wPUDlD1sxpTXjJj4gIAEDZbo39DbztJpT8Irb5w== 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 4TTRW0265kzJcy; Tue, 6 Feb 2024 02:08:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id A55B541E3E; Tue, 6 Feb 2024 03:08:41 +0100 (CET) From: Kristof Provost To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Igor Ostapenko , Kajetan Staszkiewicz Subject: Re: git: 6d4a140acfdf - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex Date: Mon, 05 Feb 2024 19:08:39 -0700 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: References: <202402052119.415LJKSN037380@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_1960957C-4C3A-4D0A-9135-23839B1128B2_=" --=_MailMate_1960957C-4C3A-4D0A-9135-23839B1128B2_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5 Feb 2024, at 19:02, Gleb Smirnoff wrote: > On Mon, Feb 05, 2024 at 09:19:20PM +0000, Kristof Provost wrote: > K> The branch main has been updated by kp: > K> > K> URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D6d4a140acfdf637bb559d371c583e= 4db478e1549 > K> > K> commit 6d4a140acfdf637bb559d371c583e4db478e1549 > K> Author: Igor Ostapenko > K> AuthorDate: 2024-02-05 16:22:31 +0000 > K> Commit: Kristof Provost > K> CommitDate: 2024-02-05 21:18:11 +0000 > > The author should be Kajetan :( Indeed it should. My apologies to Kajetan. And Igor as well, although he = probably got the better end of the deal. > I guess you were working on several reviews at a time and had name in = > paste buffer. :( Not exactly. I had grabbed the patch with `git arc patch D43741`, tested = it and committed with `git commit =E2=80=94author=3D=E2=80=A6`. I=E2=80=99ve committed enough patches from both Kajetan and Igor that = they=E2=80=99re both in my shell history, and I had a brainfart and grabb= ed = the wrong git commit line. Again, my apologies to both for the confusion. Best regards, Kristof --=_MailMate_1960957C-4C3A-4D0A-9135-23839B1128B2_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 5 Feb 2024, at 19:02, Gleb Smirnoff wrote:

On Mon, Feb 05, 2024 at 09:19:20PM = +0000, Kristof Provost wrote:
K> The branch main has been updated by kp:
K>
K> URL: https://cgit.FreeBSD.org/src/commit/?id=3D= 6d4a140acfdf637bb559d371c583e4db478e1549
K>
K> commit 6d4a140acfdf637bb559d371c583e4db478e1549
K> Author: Igor Ostapenko <pm@igoro.pro>
K> AuthorDate: 2024-02-05 16:22:31 +0000
K> Commit: Kristof Provost <kp@FreeBSD.org>
K> CommitDate: 2024-02-05 21:18:11 +0000

The author should be Kajetan :(

Indeed it should. My apologies to Kajetan. And Igor as we= ll, although he probably got the better end of the deal.

I guess you were working on several= reviews at a time and had name in paste buffer. :(

Not exactly. I had grabbed the patch with git arc patch D43741, tested it and committed with git commit =E2=80=94author=3D=E2=80=A6.
I=E2=80=99ve committed enough patches from both Kajetan and Igor that the= y=E2=80=99re both in my shell history, and I had a brainfart and grabbed = the wrong git commit line.

Again, my apologies to both for the confusion.

Best regards,
Kristof

--=_MailMate_1960957C-4C3A-4D0A-9135-23839B1128B2_=-- From nobody Tue Feb 6 02:13:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTRc44DcXz59XM2; Tue, 6 Feb 2024 02:13:08 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTRc43JtDz4QCC; Tue, 6 Feb 2024 02:13:08 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707185588; 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=Skp/XDu4wOEDmaQO/OTDbo3+NV5EpGjwwQpk+iC5Rvc=; b=j4b+v59GixLwLLKRvrvvNgUOaymGuJr6km9Nq/7smW8XhLcPVvUu+Cl1fE6+GIyQ3xboUq R0SUkU9Fb1m1Vw6dGATWqoaGmBSwFWcN70yX4yIc2FcsBl9f5fXGB7pHSpnm0Eg3scK3Fv Psa2XOKJ8Fz1UMpTvQcsKmfrPvAsfw52x0W41kD448fefbKE7SQPn+5xFIgZ5JCvpgaUyx RBs9TQQFFjQOZiyOEqaTdFKkjJuhacXak+H2XncYWxDs6oeSBvffR+gma5JOF+gwnljqSI G+0HHp+aBQX+Sp4K5p7P6OZ46Bi+CyeLs5IjrMy6hN7gJ0tdXspOHUdDJ/71vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707185588; 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=Skp/XDu4wOEDmaQO/OTDbo3+NV5EpGjwwQpk+iC5Rvc=; b=q7oHSxvHMzDWg4k1+3ORpW2T1PMm6SbLT3yG9OPz8YDAq0MHTM3GooP6ngbIaIYcP6yuju bwqPGVEJvjs+97bwoziBaXCStJfmyrNHLa0D7rv5mUTgMWl2pynco+TamVc+GbGQ+Y1IMe XnZ6c4+LVTPzx+AoRmdr49DY0CB53ZFG5IX/7AfLwHzGaRDHiwpBys+J4z0G2jB71753Ji +KK7riFA+4E1BUInbk6lgbPhG5Rz0qlVmzX/moTV2uAEngPeDiTs7pBU5DAiZmb+E92e83 ZBL8NnzBbbzs7AkPSk12lpA2lu0CIKmbmFwGkc85ZO7cFv76ftq6zvRO0pZH0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707185588; a=rsa-sha256; cv=none; b=hHkq71So119BTKFv6LVT7bd273sOnMfXK82/s5ww0wZuvgNi0Sj2FCtRjAb7JKzbYpQSF3 p4L1RzNqtZ2UVEgC7pi/C6RvCaVTv2byqeWtxMQcTA8tzSUUKu/8A/OlBaEUwADCqXP0Mh GLHd9RCCUH4PFMWYbW42LId6JZB1eTUKvHQxjpdMXJnVNxVNsAAkX+oHbSVl0fV0sJrwbc g9l/H3fVU2+VbEpKPLp0RqMP43skHScdn1Sgu5DTvPkBklnZUmT1AT87BxcEYVgqaNiMqw /8egDUTHH+rGOySyhTo84KzLFG8CD3f7uV8nyDfNwleSM+4pOjT9ETCIz4MdrQ== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TTRc33gBlzHSq; Tue, 6 Feb 2024 02:13:07 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 5 Feb 2024 18:13:05 -0800 From: Gleb Smirnoff To: Kristof Provost Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Igor Ostapenko , Kajetan Staszkiewicz Subject: Re: git: 6d4a140acfdf - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex Message-ID: References: <202402052119.415LJKSN037380@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Feb 05, 2024 at 07:08:39PM -0700, Kristof Provost wrote: K> > K> commit 6d4a140acfdf637bb559d371c583e4db478e1549 K> > K> Author: Igor Ostapenko K> > K> AuthorDate: 2024-02-05 16:22:31 +0000 K> > K> Commit: Kristof Provost K> > K> CommitDate: 2024-02-05 21:18:11 +0000 K> > K> > The author should be Kajetan :( K> K> Indeed it should. My apologies to Kajetan. And Igor as well, although he K> probably got the better end of the deal. K> K> > I guess you were working on several reviews at a time and had name in K> > paste buffer. :( K> K> Not exactly. I had grabbed the patch with `git arc patch D43741`, tested it K> and committed with `git commit —author=…`. K> I’ve committed enough patches from both Kajetan and Igor that they’re both K> in my shell history, and I had a brainfart and grabbed the wrong git commit K> line. K> K> Again, my apologies to both for the confusion. I believe both will submit hundred more patches soon and this +1/-1 won't make a big difference :) -- Gleb Smirnoff From nobody Tue Feb 6 02:58:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTScp4j3Cz58NW6; Tue, 6 Feb 2024 02:58: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 4TTScp3ql9z4T54; Tue, 6 Feb 2024 02:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707188330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RfGwUm8A0MgeddJmZWCyKc43jjbw0sELhZDeKVHppGk=; b=KxmjegzZOPilCG2xC/GdPj+QYwxKME1ud5/mbkKc3qN82fB2hZHgtCjwwYM/rJcFG98460 940s+m/guBymqfYcuVnY+HGk7NhbWj37SL/gdov7y8xUSBDgHx4C3bZMa2AKajPTrqU9tE 0uccybxgcWJC+hDP91XN3bHUccD6aIk0tkgHpxX9O32veJTxRJ8HFsK1Obk0FKCEXvH/QV F0K3R0aB4LtwPIsvIVxqw2Qss8Q+xlQ69jEGBWuPsU49fbOZh9Njd3dPkrAWMOzxMQYiO/ hErCySHEcwD37WHMqodCHYe7p8ZAw4NUkh2cLVvpWL28n8YLTjFKl7b2ci03Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707188330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RfGwUm8A0MgeddJmZWCyKc43jjbw0sELhZDeKVHppGk=; b=jWWjXFhCnIeOWyVABzrVj3EonpNbslYlywMDtDo8MvZfAOAR4guYPnyrgW9wd+0oJnACes 9MGe5kFjuM8ANXWZKPE2Akq8GgpYU1GoqBJ/SVVYkYIOM52GZPyu1EmkyExQ8Qs49DLWM1 amIfq/v6S93eeykui2Q7k1INTc6QLWJjjS5WcbwPLCxswcdeopn9mXBmaoqmIeCznhcH82 aQLCqgablv/vy1bwUlMuK0nAoIWT44OasmE+k/6ftPhmPDFq9FclpirB8Q1VghDzR13LHE wnCrtdt7LGA+FgNiNTWk7e5cRIE3eceb8ehiqePNL7ngE+hMev4tqxoTCkEFgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707188330; a=rsa-sha256; cv=none; b=OmhHylt0D+Aq0x9ONgj5llr6pGNvtk79nwcS/aPZp41MBns8xA06sm9rZuo51TtWX4MnLZ slAkwn16apy245q//VCvVEXhKQeT2A6sS7a/1MWAd6mlIHCsW8ozhNESx23TIjNLMkE+BR nHblj22Dj27mu1XGh0245F63romskyk7odO3M/fxAo58Eu79f/wBKq+AybQIGxuvIb1rB7 KwffacKBi2sXHEczaRyZv6yloysUbarepBFKUqXZ27BsiuXy7ggs79+CXMnfzyf9r5kUnY 62qYAJG58+2YebSvDExwEtkxpMerL7HMgTQRd2CoIB89Ck9zMJ0s6stLusNfUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTScp2v0vz15r3; Tue, 6 Feb 2024 02:58: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 4162woqW005688; Tue, 6 Feb 2024 02:58:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4162woqo005685; Tue, 6 Feb 2024 02:58:50 GMT (envelope-from git) Date: Tue, 6 Feb 2024 02:58:50 GMT Message-Id: <202402060258.4162woqo005685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 8e1f58caf79b - main - ofed: fix warnings during libibverbs compilation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e1f58caf79bd50e6d0b1ae29d4fee8344f6f84c Auto-Submitted: auto-generated The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=8e1f58caf79bd50e6d0b1ae29d4fee8344f6f84c commit 8e1f58caf79bd50e6d0b1ae29d4fee8344f6f84c Author: Bartosz Sobczak AuthorDate: 2024-02-06 02:43:48 +0000 Commit: Eric Joyner CommitDate: 2024-02-06 02:58:20 +0000 ofed: fix warnings during libibverbs compilation create_qp_handle_resp_common_cleanup should be void __ibv_cleanup_wq should use wq->cond for cond destroy both issues were overlooked in: a687910 ('Cleanup pthread locks in ofed RDMA verbs') Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Reviewed by: sean.lim@dell.com, vangyzen@, erj@ MFC after: 1 day Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D43491 --- contrib/ofed/libibverbs/cmd.c | 2 +- contrib/ofed/libibverbs/device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ofed/libibverbs/cmd.c b/contrib/ofed/libibverbs/cmd.c index 488ffedd146b..df6af3933e36 100644 --- a/contrib/ofed/libibverbs/cmd.c +++ b/contrib/ofed/libibverbs/cmd.c @@ -904,7 +904,7 @@ static int create_qp_ex_common(struct verbs_qp *qp, return 0; } -static int create_qp_handle_resp_common_cleanup(struct verbs_qp *qp) +static void create_qp_handle_resp_common_cleanup(struct verbs_qp *qp) { pthread_cond_destroy(&qp->qp.cond); pthread_mutex_destroy(&qp->qp.mutex); diff --git a/contrib/ofed/libibverbs/device.c b/contrib/ofed/libibverbs/device.c index c3d0dbf573ab..6ea7fc241ed8 100644 --- a/contrib/ofed/libibverbs/device.c +++ b/contrib/ofed/libibverbs/device.c @@ -456,7 +456,7 @@ default_symver(__ibv_init_wq, ibv_init_wq); void __ibv_cleanup_wq(struct ibv_wq *wq) { - pthread_cond_destroy(&wq->mutex); + pthread_cond_destroy(&wq->cond); pthread_mutex_destroy(&wq->mutex); } default_symver(__ibv_cleanup_wq, ibv_cleanup_wq); From nobody Tue Feb 6 06:24:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTY9Z3tRdz58kv8; Tue, 6 Feb 2024 06:24:02 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTY9Z0HFQz4l9J; Tue, 6 Feb 2024 06:24:02 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5961a2726aaso3066929eaf.0; Mon, 05 Feb 2024 22:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707200640; x=1707805440; darn=freebsd.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1R8ALRZ2ukJG/dzKcQ2lVgi4WhvHQDhVETmEIJT5V4M=; b=db5Q2hKVkGmTAsyfs5I9vqRyaNzNibW8Ro7L3SLps4AbbkofYOyJVEVrub20SzG+7S kzHZJvnybSF85k4PPU3mauxpH5+rPTvxisuV6ZedZBBIyrJ93iRRFUYBjTMRkcf/6brp Z+RkpxYwLj91JVZe2mh+h1AeoXKSeBzg+yrNHBLLLAGFbO+s9txS6lIQ0yXHppxGsYfH PqsKBDJJFNQln+g/N+WlNGYZQE3o5A+RMnM/d7ojWaRhezSAxqmfRmoDhKZl6vXFwnA5 GXqHz75wOmyoBiKvflEwuSEx+fNXc2f0CZa+E7TLzOVlHtZxLxkMfgTaMupGyDdCUxwK RHig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707200640; x=1707805440; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1R8ALRZ2ukJG/dzKcQ2lVgi4WhvHQDhVETmEIJT5V4M=; b=HVM1x1wqe4rCSNvcjYE+u/WSqR6apNaom6IdZ852eAp+ooa8y9IIa0+pbRaJ1yeZrD r5UxWxE9fWl/E7KadKsRjwJ334F3vKpuTPdIyaOUTAOkATP4QCaz0Fni+RJDrdFBtJBZ 4QeT3jFyyc6k6RQ1nzmpVpDdagVRNLks+AMqNxjivugYN8lTNe3e9iqQINyMipUK7yjk gZnvLHHKGF5q5UsBHClBHYlba7Bz5FRmNdIGDOYOb/vgAoyIL0tkZKCEf2+YAEq5+WAX YozSbSdhODjIac7j1hq4lOerczol9tpl9VG2JsviGehXT3L/fKxm4vGCuEwGRVeruwvb MXAA== X-Gm-Message-State: AOJu0YzyPDHYxafnOtsnsQNXprNOlF+VvQs1lWDWuG0mwxb07OdE+/bN hXEN59kZ79cPbjchhboysBTs9bh6jPiSFQcZKJmp1QQ+mYPeuBZYRabX3tBdcNwhelBv1an2QQo IOGoeDLLymYZmagNgSGyTMUcM1xW6CfCC X-Google-Smtp-Source: AGHT+IG6o97dj9gVsCl8UGIhbDpLv239HdmpQPMZZb7D85hi3cLw4lfmOC5Euf/0PVkK1WWFRSHJ06Oj/3o19uq1jSE= X-Received: by 2002:a4a:ea2b:0:b0:59a:94cc:c7c with SMTP id y11-20020a4aea2b000000b0059a94cc0c7cmr1539499ood.4.1707200640534; Mon, 05 Feb 2024 22:24:00 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Received: by 2002:a05:6802:1606:b0:517:6330:dd0f with HTTP; Mon, 5 Feb 2024 22:24:00 -0800 (PST) In-Reply-To: References: <202402052119.415LJKSN037380@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 6 Feb 2024 07:24:00 +0100 Message-ID: Subject: Re: git: 6d4a140acfdf - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex To: Kristof Provost Cc: Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Igor Ostapenko , Kajetan Staszkiewicz Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4TTY9Z0HFQz4l9J X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] On 2/6/24, Kristof Provost wrote: > On 5 Feb 2024, at 19:02, Gleb Smirnoff wrote: >> On Mon, Feb 05, 2024 at 09:19:20PM +0000, Kristof Provost wrote: >> K> The branch main has been updated by kp: >> K> >> K> URL: >> https://cgit.FreeBSD.org/src/commit/?id=6d4a140acfdf637bb559d371c583e4db478e1549 >> K> >> K> commit 6d4a140acfdf637bb559d371c583e4db478e1549 >> K> Author: Igor Ostapenko >> K> AuthorDate: 2024-02-05 16:22:31 +0000 >> K> Commit: Kristof Provost >> K> CommitDate: 2024-02-05 21:18:11 +0000 >> >> The author should be Kajetan :( > > Indeed it should. My apologies to Kajetan. And Igor as well, although he > probably got the better end of the deal. > You can revert and commit the correct version. -- Mateusz Guzik From nobody Tue Feb 6 06:27:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTYFH4Qbnz58lJg for ; Tue, 6 Feb 2024 06:27:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 4TTYFH1Q8Dz4m2t for ; Tue, 6 Feb 2024 06:27:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5602500d1a6so2969482a12.3 for ; Mon, 05 Feb 2024 22:27:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1707200834; x=1707805634; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fVpPmxy+sLjv21ciephofhzl1f/2i3oe8l+vloodINI=; b=Kj4X38qtiNrnhUV+Jr4DZJIrSYFsOjxs9o2KdLpXjk2EP/pg2bgt5qZXvP30yz9bJM iWcEbRsnmzOkLMUUKTveXKivZNBoTj9z/TejVALgnNadsmuW+TwCH2SYFkX00jib0pCz goXRISewJRlJXj5ifngIcXo2NVfNrnB3I4erC89xut9A1QHQO9/k7cuhv+qFluDFFOGl 4pHo7Q3Eg5SbNhqlWs/0UA+KihOHcQmA7Zfeuhdyu3CP2uCTRf7TLW8Ae8ZlM41Ikec+ /sQlUd04d6HV82CENMo0LZrb6ShO+jSrI9L6J+a2KHAJDNWq19kVH8X5bFvqfjvtesGn xBVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707200834; x=1707805634; 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=fVpPmxy+sLjv21ciephofhzl1f/2i3oe8l+vloodINI=; b=h9y4BL+R37VkdRephQjGQdrzpdEvXecw++R9059399a5NXk+nwEaDEROWt8NX5/W7n 7sVJVt2YD4PXPCIe2LCL6f5ZavH4mtx3fEvYe9hk00Yy6hBOo7plnfmmCX/OZjrE7bkV y3sm9iJNxO1IgyaLgt54y202zeYAVzaqZiz4ZwqLtqLYC5vror8w2O4BzLzZ1iHocIxt 1Kaj+LiPGMLrdfHOo7Zt51GEI/6mm3FwzmQ01qLqsp5yYvNyK8ydEie8VE32+Wfb5MWd 7zh4O6WABb5qYhkjfp1IbxB/TMr35anzSkvhPMLc/SrC11cqqXMvq+WPrRrvA6ZpqUxZ Jaxw== X-Gm-Message-State: AOJu0Yz+d31oubywiPZRK7vRNLxDDSL9CTEY5aQkjoUPl7R4aFJhbhaH FJEBgjmkZI3nWhL8W7qb4tbj/brHmfe5zsbe+eanw1suVNNB/NwJ70KzvqsYPrq8Ry5O1qUPrMW 6D7pPSZwkZTINjytoWijmtYGfojpl+/0AbIC9wQ== X-Google-Smtp-Source: AGHT+IGRx821u43/RVpvKB9ERSNCadafBj1clbstQxqV5YU7wRub4D/76UIEbt+aXbSmjjFbXhK/RxZt728CMgkeBb4= X-Received: by 2002:a05:6402:33c8:b0:55f:d7b3:d539 with SMTP id a8-20020a05640233c800b0055fd7b3d539mr967223edc.27.1707200833700; Mon, 05 Feb 2024 22:27:13 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202402052119.415LJKSN037380@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 5 Feb 2024 23:27:02 -0700 Message-ID: Subject: Re: git: 6d4a140acfdf - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex To: Mateusz Guzik Cc: Kristof Provost , Gleb Smirnoff , src-committers , "" , "" , Igor Ostapenko , Kajetan Staszkiewicz Content-Type: multipart/alternative; boundary="00000000000040d6430610b0abf2" X-Rspamd-Queue-Id: 4TTYFH1Q8Dz4m2t X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --00000000000040d6430610b0abf2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 5, 2024, 11:24=E2=80=AFPM Mateusz Guzik wro= te: > On 2/6/24, Kristof Provost wrote: > > On 5 Feb 2024, at 19:02, Gleb Smirnoff wrote: > >> On Mon, Feb 05, 2024 at 09:19:20PM +0000, Kristof Provost wrote: > >> K> The branch main has been updated by kp: > >> K> > >> K> URL: > >> > https://cgit.FreeBSD.org/src/commit/?id=3D6d4a140acfdf637bb559d371c583e4d= b478e1549 > >> K> > >> K> commit 6d4a140acfdf637bb559d371c583e4db478e1549 > >> K> Author: Igor Ostapenko > >> K> AuthorDate: 2024-02-05 16:22:31 +0000 > >> K> Commit: Kristof Provost > >> K> CommitDate: 2024-02-05 21:18:11 +0000 > >> > >> The author should be Kajetan :( > > > > Indeed it should. My apologies to Kajetan. And Igor as well, although h= e > > probably got the better end of the deal. > > > > You can revert and commit the correct version. > The counts would still count the bad version though... I need to land my -c flag that automates git arc patch more... Warner --=20 > Mateusz Guzik > --00000000000040d6430610b0abf2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Feb 5, 2024, 11:24=E2=80=AFPM Mateusz Guzik &l= t;mjguzik@gmail.com> wrote:
=
On 2/6/24, Kristof Provost <kp@freebsd.= org> wrote:
> On 5 Feb 2024, at 19:02, Gleb Smirnoff wrote:
>> On Mon, Feb 05, 2024 at 09:19:20PM +0000, Kristof Provost wrote: >> K> The branch main has been updated by kp:
>> K>
>> K> URL:
>> https://cgit.FreeBSD.org/src/commit/?id=3D6d4a140acfdf637bb559d371c583e4d= b478e1549
>> K>
>> K> commit 6d4a140acfdf637bb559d371c583e4db478e1549
>> K> Author:=C2=A0 =C2=A0 =C2=A0Igor Ostapenko <pm@igoro.pro>=
>> K> AuthorDate: 2024-02-05 16:22:31 +0000
>> K> Commit:=C2=A0 =C2=A0 =C2=A0Kristof Provost <kp@FreeBSD.or= g>
>> K> CommitDate: 2024-02-05 21:18:11 +0000
>>
>> The author should be Kajetan :(
>
> Indeed it should. My apologies to Kajetan. And Igor as well, although = he
> probably got the better end of the deal.
>

You can revert and commit the correct version.
=

The counts would still count = the bad version though...

I need to land my -c flag that automates git arc patch more...

Warner=C2=A0

--
Mateusz Guzik <mjguzik gmail.com>
--00000000000040d6430610b0abf2-- From nobody Tue Feb 6 09:41:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTdYq5crwz595FT; Tue, 6 Feb 2024 09:41: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 4TTdYq57wwz45dj; Tue, 6 Feb 2024 09:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707212511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCf3tFQyD3Ac43jQ/Piu/3YDieTlRxlZ3ZrYlF7TajU=; b=pORyCexaFazsq5dwEaZmudG2qZLfr0ebP6EmISParZ3G4WH2abbjDf131aJ5rGZSCHjgIW mXoNfbe7skk+4PktBb0vuz1jTsp6hUl3lKXyzF1ng49FDaOzxdPavkCLrC1zpBOGNEog8f wJ05ySE1sRboYDd62e2NSx3iPUx3OBZ0hiFVld/hShyGruU2Lk/wSQErtiaB86FbsFPXJI bd4G+JqfF6pxY0KmQt+P8tGUTmJXke96QF5ScTNQxT4aKk8mZ4Sosv/xyPoZW4SL8Xj9BC pmc8rsSUteFiXHyj66n8oe3Ia0Cglizjxdu1J8tNyr8OW+E1Sz/Jhcp+BIvVGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707212511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCf3tFQyD3Ac43jQ/Piu/3YDieTlRxlZ3ZrYlF7TajU=; b=Ht414OBqLCA6y3yzsfvJjK929fdCrTQYOrWnA/EQjwS8PRekPSIwLwftUsrA8tMmyoGK35 1/9SiwxBQphV1oVXD5/1SmzYBTWoAnnxubSgJLfHRzEGKWPEouYW+BVlq2olLjetfnl8cx NQ5YmwGn5O6mWg/bMs1Had10APkvUP+HVOqhtIglCdxbE9lCkj2KC/ofxOZbcj0DKwNz+4 0TI7smYoDCPvHUt5jSBfwvR7LhIDkeSc6hZz/LOB2mvf1NQ7d+LZ/Xc/Nk8qVE8eksQLJv wRTjmla8vaUVK7PbOjLaoo99zUD6Dv13Dw5FE3Ne0jvtiSfLt6E97aviU02nBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707212511; a=rsa-sha256; cv=none; b=wAUnP6CbbajB4y8FoPDc/ld1R18jwCQblO/JMvuN4C+2Xd1dqui3YoNbder4xjFsw0Wki9 gagQSriiKciLIomOU/rsbG3ki9joRi4dwByaSG6ZQGWLYOtBcR0iVcQe0bKKTwe85IGLYC 6/d2JaTExJfMjMtp3oBhfbLK2Pp2nkW0IMRzK3YDAi3mg1VSQK4aWNv7eirkxPMqVyEJIZ l1v2cNTtU9w67s8hehrIgjKlQEk5swqg6eCojBZi3+JmMDjkXCadSQ5cdb4YbBNqMWofdm SrBmOIudHxygBbaUxY3Gp+oON0WNbpgRFzk1zH3RzIX4DmVij0LnWpE47cs7rA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTdYq4BnYzJCQ; Tue, 6 Feb 2024 09:41: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 4169fpPK092975; Tue, 6 Feb 2024 09:41:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4169fpXE092972; Tue, 6 Feb 2024 09:41:51 GMT (envelope-from git) Date: Tue, 6 Feb 2024 09:41:51 GMT Message-Id: <202402060941.4169fpXE092972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: e4ab361e5394 - main - fix poweroff regression from 9cdf326b4f by delaying shutdown_halt List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 commit e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 Author: Andriy Gapon AuthorDate: 2024-02-06 08:55:13 +0000 Commit: Andriy Gapon CommitDate: 2024-02-06 08:55:13 +0000 fix poweroff regression from 9cdf326b4f by delaying shutdown_halt The regression affected ACPI-based systems without EFI poweroff support (including VMs). The key reason for the regression is that I overlooked that poweroff is requested by RB_POWEROFF | RB_HALT combination of flags. In my opinion, that command is a bit bipolar, but since we've been doing that forever, then so be it. Because of that flag combination, the order of shutdown_final handlers that check for either flag does matter. Some additional complexity comes from platform-specific shutdown_final handlers that aim to handle multiple reboot options at once. E.g., acpi_shutdown_final handles both poweroff and reboot / reset. As explained in 9cdf326b4f, such a handler must run after shutdown_panic to give it a chance. But as the change revealed, the handler must also run before shutdown_halt, so that the system can actually power off before entering the halt limbo. Previously, shutdown_panic and shutdown_halt had the same priority which appears to be incompatible with handlers that can do both poweroff and reset. The above also applies to power cycle handlers. PR: 276784 Reported by: many Tested by: Katsuyuki Miyoshi , Masachika ISHIZUKA Fixes: 9cdf326b4fae run acpi_shutdown_final later to give other handlers a chance MFC after: 1 week --- sys/kern/kern_shutdown.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index ee666281418f..f49e315a503d 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -262,10 +262,10 @@ shutdown_conf(void *unused) EVENTHANDLER_REGISTER(shutdown_final, poweroff_wait, NULL, SHUTDOWN_PRI_FIRST); - EVENTHANDLER_REGISTER(shutdown_final, shutdown_halt, NULL, - SHUTDOWN_PRI_LAST + 100); EVENTHANDLER_REGISTER(shutdown_final, shutdown_panic, NULL, SHUTDOWN_PRI_LAST + 100); + EVENTHANDLER_REGISTER(shutdown_final, shutdown_halt, NULL, + SHUTDOWN_PRI_LAST + 200); } SYSINIT(shutdown_conf, SI_SUB_INTRINSIC, SI_ORDER_ANY, shutdown_conf, NULL); From nobody Tue Feb 6 10:13:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTfGj52R4z598Bk; Tue, 6 Feb 2024 10:13:49 +0000 (UTC) (envelope-from avg@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 4TTfGj4Kzqz48BH; Tue, 6 Feb 2024 10:13:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707214429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DOntLQu/iMREhV/gydCaCBlY2dVsZzQkOC4maQG6P6M=; b=VNGlyyoWBFnrK9JqVAQBmMbnNyvFUBLWfnW3Xm+rlJLbShdteu2d9SbUo2idFxSWKpe5ud rI0PEh93ZCMn9iMpv3dcklyZH2sOUnJuHRddbuzUtApLf0cG2eBCn5OELe29tzkWRXZDzi YQEt2eP2baxkPd4J93aGOOZjCsSGv9rOLlbSDc8rqUfFgeZp7K8d22nMplSSgpo63EztO3 Unsvl2RF540SQ0kDEH8ZR9IhkOxas/GBhuqjZOcuh1iqJ1ElyXwnrvd/H2OMYqrMHtcVqG kMl0Og7Wtd8FgY9hyFtksXBzeOcaEtp2UHu4gkuqenJDah1vNIPoU/v6K7gI8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707214429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DOntLQu/iMREhV/gydCaCBlY2dVsZzQkOC4maQG6P6M=; b=rsTkOrtHoSyEvedKibsd5v+0auiKSfP17tn/jHWMW8I+JpwDKRnvj9IVIXbBlda7NLZq/H kZrOAJKImVFnpDMAsuQ0r+JzniBdaMVLd17kXZPIl9x4F1yz8h9HbTXbq7qQ6MDGX+mKIx 6xZJsmVyV8D9MUl5ZFCE4nEpdUGuVRC4zoM5I0toF9+WbHP+r99FXRKrKzshvE9HMzJgNC CNWT2UdKKTmliMA28iMCaAZ3tSps+OGQblGrNxM0/3YwowLn6dr5W26GkyyTE+/PWrL9U/ zeD8XUxjDpFWHcbg44cLsastD7+sZP6KMfS90S1YcX2IDd/OJSjD/T55VZxnxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707214429; a=rsa-sha256; cv=none; b=tO/atHZ62f9HpbufsCweAc9m7mLnRvx7t6TEw8iGPPLMdAQHAg6rAIqTWcsH+4V9iZZhcs skSkpeS0u0UZ6z5rjohbzSpL4h1TH8XsCbe5MdubQME/r5oYws4HGkYfSH/3y295PrNWPk ftC08CXWl0a0IWQXJTIfPz7InOblWSyOLO0Qq7jKpbOly+OKMxMPV1UPehsBvC20R7km2u 6k5hbBPqfhJH0V9MGkjg8UoEzcoevGO+78G5Cfp7xMgw5n+svJmsn4BW0xIXuR8iv3n8y/ 8xgcPL0BRccKj/0PQlb8BemiPbWByYGacjqRCRd6OqM7foSGu3ZyPM2yR3eSZw== Received: from [192.168.0.88] (unknown [93.188.39.137]) (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: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TTfGj00K8zRBv; Tue, 6 Feb 2024 10:13:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <72def5a9-ffcc-4dcc-9b85-875ba7f46539@FreeBSD.org> Date: Tue, 6 Feb 2024 12:13:46 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: e4ab361e5394 - main - fix poweroff regression from 9cdf326b4f by delaying shutdown_halt From: Andriy Gapon To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 06/02/2024 11:41, Andriy Gapon wrote: > The branch main has been updated by avg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 > > commit e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 > Author: Andriy Gapon > AuthorDate: 2024-02-06 08:55:13 +0000 > Commit: Andriy Gapon > CommitDate: 2024-02-06 08:55:13 +0000 > > fix poweroff regression from 9cdf326b4f by delaying shutdown_halt > > The regression affected ACPI-based systems without EFI poweroff support > (including VMs). > > The key reason for the regression is that I overlooked that poweroff is > requested by RB_POWEROFF | RB_HALT combination of flags. In my opinion, > that command is a bit bipolar, but since we've been doing that forever, > then so be it. Because of that flag combination, the order of > shutdown_final handlers that check for either flag does matter. > > Some additional complexity comes from platform-specific shutdown_final > handlers that aim to handle multiple reboot options at once. E.g., > acpi_shutdown_final handles both poweroff and reboot / reset. As > explained in 9cdf326b4f, such a handler must run after shutdown_panic to > give it a chance. But as the change revealed, the handler must also run > before shutdown_halt, so that the system can actually power off before > entering the halt limbo. > > Previously, shutdown_panic and shutdown_halt had the same priority which > appears to be incompatible with handlers that can do both poweroff and > reset. I want to add that having many handlers with priorities expressed like SHUTDOWN_PRI_LAST ± N while some of those handlers have implicit inter-dependencies (interactions, interference) also does not help to see a clear picture. Perhaps it would be better to handle all (reasonable) RB flag combinations centrally in kern_reboot and then dispatch events like shutdown_reset, shutdown_poweroff, etc. Handlers for those events would have a single and simple job of performing that one action (perhaps failing and letting another handler try). Also, I would split reboot howto into command and flag portions, so that only one command can be specified at a time. E.g., I would consider RB_AUTOBOOT ("RB_REBOOT"), RB_POWEROFF, RB_HALT to be distinct commands. Then, flags like RB_NOSYNC or RB_DUMP could be optional flags. As an aside, some flags documented for reboot(2) do not seem to have much to do with reboot. E.g., RB_DFLTROOT affects how a system boots up, but not how the system goes for a reboot. Not surprisingly, that option is not handled by anything kicked off with reboot(2). Maybe, it would make more sense if we had fast reboot support and the running kernel could instruct the next kernel directly. But, it's still a bit weird that flags like RB_POWEROFF and RB_DFLTROOT belong in the same domain and can be set together. -- Andriy Gapon From nobody Tue Feb 6 13:38:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTkpg5XyFz592BT; Tue, 6 Feb 2024 13:38: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 4TTkpg51Hfz4VxG; Tue, 6 Feb 2024 13: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=1707226699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GunQjHy85DHIHKpYT9yYFzF3mWyuLElr6eKgF2OrL3o=; b=lFLxsTQxDEGB9vi3SvSkiydBB2trZsOxj8X8K26zxk7zjMDYR1YfnSZsMvNnHVWvzMD4Kf fFEcC+4XBQQnU9koLyU5kD8JknQ1oMs/7G9npuCd23eYAi1p2z+6zKGuNirgHR0xshlMkt ebewtiy2xX/7paWdX7ut64vmQG9r/jg8F29wQQscJ+uQjOB7drBxLJOdHgTrHO35AjS9Db JoZcfSFCns5hlgVP/maY+maayesDLwtTbQkyQcxBMVhS4Aaw7mOhlX7O23tyII9RhagamH lSOQvc9QiCuSWebnVrJneo46jnhjds7wFsKYuw11zgnvyGJOAsG+QBMVtct79w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707226699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GunQjHy85DHIHKpYT9yYFzF3mWyuLElr6eKgF2OrL3o=; b=F0s96nCbpI8kG4ZoL0NaKwr8grWvLaIHKe+Ww6SMiufmGPLkQ8qb/1GFdiZLd2R+H0BpfB rzDcGBrp2KDF408z7yY8T0iTl51kQGmC9XgBOl70XippwFpAthImUvVZVR3LNcLkybBn7r fPXklGXnwSPjTBo0LIYcbCUzT4+YOnDr0rYcXRkqxeNgU8z1JuN4X/unB1UizhHChqVBz7 sLgzBUfrBll979ehtXS3k0JBcv+/8+Yk3h5Bjaew/hp7sjxRpcatcBi5g1Egci6dOFh3Vw 8EQlutdC1SCbRxbepjcs97hS2IMF5VsVPMOGq30S2MKmDTmcnm51RBhofpl8lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707226699; a=rsa-sha256; cv=none; b=YHe07JFH9sELqM79Qk8hA3NgCDCt88XsGCAye8qZpN8mDrNtI+tTmAxENJPVooS1UP+UTu Vw7PVUXvVWDIWIO55E/5iuxYjIhai3m8Z0+nwPIvSHdN+yM+yIqGGIvmpAWQnlBQkZbzrn TGtASPU5DUlJvJkHtcOE2tEvmNGuSW6YbAG2rFVlUnGY/dS4ycNfVpkt40hK5kqd4KY5VE s0LNmdganCAAW2VzRhDfAm4Y0s4ZqSndyT2L2s+Xxh7HgvGPqR5sIPnA37YiflaOVs0Gim 9j+oXUgkGRBD3WSa5nDJEMWdwZ5hg52S7vv8I5Ff8TzxTxjJxtO727eDDqJGyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTkpg43xszQYB; Tue, 6 Feb 2024 13: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 416DcJoI081621; Tue, 6 Feb 2024 13: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 416DcJQC081618; Tue, 6 Feb 2024 13:38:19 GMT (envelope-from git) Date: Tue, 6 Feb 2024 13:38:19 GMT Message-Id: <202402061338.416DcJQC081618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 912b52a62c72 - main - msgs: Use C99 bool instead of defining our own List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 912b52a62c72ca9c96a396148a6b30ff9c0917e7 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=912b52a62c72ca9c96a396148a6b30ff9c0917e7 commit 912b52a62c72ca9c96a396148a6b30ff9c0917e7 Author: Collin Funk AuthorDate: 2024-02-06 12:40:05 +0000 Commit: Ed Maste CommitDate: 2024-02-06 13:37:50 +0000 msgs: Use C99 bool instead of defining our own Use stdbool.h definitions instead of defining non-standard ones. Signed-off-by: Collin Funk Pull-request: https://github.com/freebsd/freebsd-src/pull/1105 --- usr.bin/msgs/msgs.c | 97 ++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c index c9183df27610..64e21c5863d4 100644 --- a/usr.bin/msgs/msgs.c +++ b/usr.bin/msgs/msgs.c @@ -74,11 +74,10 @@ #include #include #include +#include #include "pathnames.h" #define CMODE 0644 /* bounds file creation mode */ -#define NO 0 -#define YES 1 #define SUPERUSER 0 /* superuser uid */ #define DAEMON 1 /* daemon uid */ #define NLINES 24 /* default number of lines/crt screen */ @@ -90,8 +89,6 @@ #define MORE "More? [ynq]" #define NOMORE "(No more) [q] ?" -typedef char bool; - static FILE *msgsrc; static FILE *newmsg; static const char *sep = "-"; @@ -109,11 +106,11 @@ static bool totty; static bool seenfrom; static bool seensubj; static bool blankline; -static bool printing = NO; -static bool mailing = NO; -static bool quitit = NO; -static bool sending = NO; -static bool intrpflg = NO; +static bool printing = false; +static bool mailing = false; +static bool quitit = false; +static bool sending = false; +static bool intrpflg = false; static uid_t uid; static int msg; static int prevmsg; @@ -124,14 +121,14 @@ static time_t t; static time_t keep; /* option initialization */ -static bool hdrs = NO; -static bool qopt = NO; -static bool hush = NO; -static bool send_msg = NO; -static bool locomode = NO; -static bool use_pager = NO; -static bool clean = NO; -static bool lastcmd = NO; +static bool hdrs = false; +static bool qopt = false; +static bool hush = false; +static bool send_msg = false; +static bool locomode = false; +static bool use_pager = false; +static bool clean = false; +static bool lastcmd = false; static jmp_buf tstpbuf; static void ask(const char *); @@ -187,35 +184,35 @@ main(int argc, char *argv[]) if (uid != SUPERUSER && uid != DAEMON) errx(1, "only the super-user can use the c flag"); - clean = YES; + clean = true; break; case 'f': /* silently */ - hush = YES; + hush = true; break; case 'h': /* headers only */ - hdrs = YES; + hdrs = true; break; case 'l': /* local msgs only */ - locomode = YES; + locomode = true; break; case 'o': /* option to save last message */ - lastcmd = YES; + lastcmd = true; break; case 'p': /* pipe thru 'more' during long msgs */ - use_pager = YES; + use_pager = true; break; case 'q': /* query only */ - qopt = YES; + qopt = true; break; case 's': /* sending TO msgs */ - send_msg = YES; + send_msg = true; break; default: @@ -233,13 +230,13 @@ main(int argc, char *argv[]) /* * Test access rights to the bounds file * This can be a little tricky. if(send_msg), then - * we will create it. We assume that if(send_msg), + * we will create it. We assume that if(send_msg), * then you have write permission there. * Else, it better be there, or we bail. */ - if (send_msg != YES) { + if (!send_msg) { if (stat(fname, &buf) < 0) { - if (hush != YES) { + if (!hush) { err(errno, "%s", fname); } else { exit(1); @@ -260,7 +257,7 @@ main(int argc, char *argv[]) if (clean || bounds == NULL) { /* relocate message bounds */ struct dirent *dp; struct stat stbuf; - bool seenany = NO; + bool seenany = false; DIR *dirp; dirp = opendir(_PATH_MSGS); @@ -301,7 +298,7 @@ main(int argc, char *argv[]) lastmsg = i; if (i < firstmsg) firstmsg = i; - seenany = YES; + seenany = true; } closedir(dirp); @@ -341,7 +338,7 @@ main(int argc, char *argv[]) fprintf(bounds, "%d %d\n", firstmsg, nextmsg); fclose(bounds); - sending = YES; + sending = true; if (ruptible) signal(SIGINT, onintr); @@ -355,10 +352,10 @@ main(int argc, char *argv[]) fflush(stdout); fprintf(newmsg, "From %s %sSubject: %s\n", ptr, ctime(&t), inbuf); - blankline = seensubj = YES; + blankline = seensubj = true; } else - blankline = seensubj = NO; + blankline = seensubj = false; for (;;) { fgets(inbuf, sizeof inbuf, stdin); if (feof(stdin) || ferror(stdin)) @@ -394,20 +391,20 @@ main(int argc, char *argv[]) snprintf(fname, sizeof(fname), "%s/%s", cp, MSGSRC); msgsrc = fopen(fname, "r"); if (msgsrc) { - newrc = NO; + newrc = false; fscanf(msgsrc, "%d\n", &nextmsg); fclose(msgsrc); if (nextmsg > lastmsg+1) { printf("Warning: bounds have been reset (%d, %d)\n", firstmsg, lastmsg); truncate(fname, (off_t)0); - newrc = YES; + newrc = true; } else if (!rcfirst) rcfirst = nextmsg - rcback; } else - newrc = YES; + newrc = true; msgsrc = fopen(fname, "r+"); if (msgsrc == NULL) msgsrc = fopen(fname, "w"); @@ -444,9 +441,9 @@ main(int argc, char *argv[]) #endif Lpp -= 6; /* for headers, etc. */ - already = NO; + already = false; prevmsg = firstmsg; - printing = YES; + printing = true; if (ruptible) signal(SIGINT, onintr); @@ -480,7 +477,7 @@ main(int argc, char *argv[]) if (totty) signal(SIGTSTP, onsusp); (void) setjmp(tstpbuf); - already = YES; + already = true; nlines = 2; if (seenfrom) { printf("Message %d:\nFrom %s %s", msg, from, date); @@ -535,7 +532,7 @@ cmnd: case 'q': /* FALLTHROUGH */ case 'Q': - quitit = YES; + quitit = true; printf("--Postponed--\n"); exit(0); /* NOTREACHED */ @@ -682,7 +679,7 @@ onintr(int unused __unused) sep = "Interrupt"; if (newmsg) fseeko(newmsg, (off_t)0, SEEK_END); - intrpflg = YES; + intrpflg = true; } } @@ -733,7 +730,7 @@ ask(const char *prompt) printf("%s ", prompt); fflush(stdout); - intrpflg = NO; + intrpflg = false; (void) fgets(inbuf, sizeof inbuf, stdin); if ((n = strlen(inbuf)) > 0 && inbuf[n - 1] == '\n') inbuf[n - 1] = '\0'; @@ -779,14 +776,14 @@ ask(const char *prompt) if (fd != -1) { snprintf(cmdbuf, sizeof(cmdbuf), _PATH_MAIL, fname); - mailing = YES; + mailing = true; } } if (fd == -1 || (cpto = fdopen(fd, "a")) == NULL) { if (fd != -1) close(fd); warn("%s", fname); - mailing = NO; + mailing = false; fseeko(newmsg, oldpos, SEEK_SET); ask(prompt); fclose(cpfrom); @@ -804,7 +801,7 @@ ask(const char *prompt) else { system(cmdbuf); unlink(fname); - mailing = NO; + mailing = false; } ask(prompt); } @@ -816,8 +813,8 @@ gfrsub(FILE *infile) off_t frompos; int count; - seensubj = seenfrom = NO; - local = YES; + seensubj = seenfrom = false; + local = true; subj[0] = from[0] = date[0] = '\0'; /* @@ -828,7 +825,7 @@ gfrsub(FILE *infile) /* * expected form starts with From */ - seenfrom = YES; + seenfrom = true; frompos = ftello(infile); ptr = from; in = nxtfld(inbuf); @@ -837,7 +834,7 @@ gfrsub(FILE *infile) while (*in && *in > ' ' && count-- > 0) { if (*in == ':' || *in == '@' || *in == '!') - local = NO; + local = false; *ptr++ = *in++; } } @@ -872,7 +869,7 @@ gfrsub(FILE *infile) * extract Subject line */ if (!seensubj && strncmp(inbuf, "Subj", 4)==0) { - seensubj = YES; + seensubj = true; frompos = ftello(infile); strlcpy(subj, nxtfld(inbuf), sizeof subj); } From nobody Tue Feb 6 15:40:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTnWt4zHdz59TJ7; Tue, 6 Feb 2024 15:40: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 4TTnWt4Vsgz4nD6; Tue, 6 Feb 2024 15:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707234042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HUI2po+t4PG0yHi+Og6gXUVqxy4OuVJBG74TE/jgpdQ=; b=xTVToKFvVJwKVw0ooXBpRIxeEvbj5LPgCsEsETSemX+MOhou4K4L/sFXsGuANbXoP/wPhh D23i5st0GPQuanNFluyCIMKUlnMh5UD2C8WFBJSIgCBNk3p3+6pykESZznfz2FPZ+OKDYp USkOlAodWOwM4FE3rZqrlxXsh2tzEYp+kr4xVi4DDUfH523JMlndWbtzTiGX6V2gptQqrV +UlRZudHP9/RLeL/VsiohUrLOuJqkti7yvil4R/Ukxo3ZDdQDpdnOcSW0cqxH5SxqWViaS PHPiPoVcCoGzRkKq5CQEDc+8pljNA+H7sau3D7GOQAORZCU4uyae3S1PInfQtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707234042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HUI2po+t4PG0yHi+Og6gXUVqxy4OuVJBG74TE/jgpdQ=; b=CI5KRokysWXnoXtMzN8wYlP568Ad2l4ENo9cKRzeHdYxz8m8Q/u2QFXnoi6HUY+BbepSIY bdf/EGVUHSR+nNpzjz23tNcFaQidft4u2T/udXRonUojxMEoiuZkoHxoYLd5wO1spUaBjr zupXxRALHH8v3qVr18aWw3N82Wz5ykYkPWGsshfpl7i1RKwKlbZBO3WyJrEcetxJA9qAV5 QcCIE8vMZrZC9kHNk175WzRsJs1kqrzxnBUp12PYaqCQJuccseLD5RLDen+gA1PPFh1r/i QuPnk3zKfT+hnL6u7nFIjs3a1oGlCWMB9fuNQ1bZOMvQcEw93YgLf5zq/Y8ssQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707234042; a=rsa-sha256; cv=none; b=akwgoDzCdFyqWsBEd7+Jm3Tnsyj0bbcc69XSmy6YYFvpm3YClOzqo1ZkuCGHjqE902n4Gj gFaVegpJ8bkfndAj3GxnzrkfV3lB81L7K5UxIJZxxrag7p6jJRwNgVGf1KKPfjWn5VktOo +ubxhIvrhI0Tmdg63yTyvBXucOhNFgRaj4G68qxxaWnGRS8K/fIkJsmf/PPbU10x0mo/hJ JDLmcC/nmaPucgX/8GmmMXK+aVFByx4mXvcgVO2XvypBpA9BDW6Yr2PzuW7i76Afktq5k1 4zqh1soVhXs9S457u3hYZHWEW+TZ2Tqh1w/mb81gpJ4CTOjmi5t5lEVZpnqZCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTnWt3YJBzV9H; Tue, 6 Feb 2024 15:40: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 416FegXa091457; Tue, 6 Feb 2024 15:40:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416FegbW091454; Tue, 6 Feb 2024 15:40:42 GMT (envelope-from git) Date: Tue, 6 Feb 2024 15:40:42 GMT Message-Id: <202402061540.416FegbW091454@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: df64d7c8c82d - main - arm64: Add netmap(4) to default kernel config List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df64d7c8c82d59958cb546b23ba240ab97dc5033 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df64d7c8c82d59958cb546b23ba240ab97dc5033 commit df64d7c8c82d59958cb546b23ba240ab97dc5033 Author: Daniel Roethlisberger AuthorDate: 2024-02-06 15:26:13 +0000 Commit: Mark Johnston CommitDate: 2024-02-06 15:38:28 +0000 arm64: Add netmap(4) to default kernel config Allows the development, testing and deployment of netmap(4)-based code on arm64 without having to recompile the kernel. netmap(4) is already in the amd64 and powerpc64 default configs, so it does not seem unreasonable to also provide it on arm64 by default. Note that netmap(4) is useful even on systems without NIC that fully support it. Reviewed by: vmaffione MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D43702 --- sys/arm64/conf/std.dev | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev index 0ebf2e775b11..eefff7e3a6e0 100644 --- a/sys/arm64/conf/std.dev +++ b/sys/arm64/conf/std.dev @@ -88,6 +88,9 @@ device miibus # MII bus support # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter +# Netmap provides direct access to TX/RX rings on supported NICs +device netmap # netmap(4) support + # USB support options USB_DEBUG # enable debug msgs options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. From nobody Tue Feb 6 15:40:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTnWv6vbZz59T5B; Tue, 6 Feb 2024 15:40: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 4TTnWv5NkXz4nQ6; Tue, 6 Feb 2024 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707234043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=duRN3vBTasOBKM3h3858jbH0CULLhNPpbnz1FV7NGqA=; b=vQJhopLdksdzUDYh9o4JNj9Rtme9M5qa3u0ddXyDrqhxcP39NIHMDSdVgOHHWyAIGg1UZW Py9XrUChNLVlgxxb4Kjn9N06VRkglUP7I5TM2CsTpLnjhhBo6gfmOtu9cl9lFRUrzZNaT/ PJKFJTufNJFXdAhZGdA03fkHeYKu036EcoIuV+T9zqCp75zA/s3EvX1u9w5yFAjrMQRW4k 8hd3oZzdDQKAFEBWLrMVS3vvlJY8kwhJayMqCbv7THInCb1M+7S7221VvHkJu3ygCvbVpQ 9gyGjriAgOrTgNB+WAIQmoDVn7dHGPXtBRlISiHpt/qlRh2FOPkCiivNtSTOyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707234043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=duRN3vBTasOBKM3h3858jbH0CULLhNPpbnz1FV7NGqA=; b=Kexx8hwmi+jZTh+GJKzPVySlxvNUOUP+Pw60gvPmbHnUxGaMhfBgnW4Kso0EPy4bZSk/DK lfC030nm2EIwYvc+RBvjyGFP0wHmC0Du+AKOVwDoodbRfYDzld8sI8mDHEOTZi1FbZadX8 ZJh9ERbbCvW9BiK22lKvd6QI8ltzMO81x/L+acxYXNVrHf2Kj7GmK5hrmC5vsLEt8ecWTM s3qHkIureVx2PR5qX3IGMA2KoPP2IxrqFT89lBu1/tZXOXT6v3SE0g1Iu//Vx6Ld4VoTuD BZHMPt7aXTL6yUHSSlKy+xk93hzdJyfQ34t4c678GDz9Xfz5VvUWkqEseUfo4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707234043; a=rsa-sha256; cv=none; b=IMjP2rN1ZtahJLoqpOfkB26JEcKHRYzGrOFffcAyrpWmliwXVVQ3ROlK29ffKDE2m6GaR/ YSsBP230M9ScZdMAPvhcBo8jiwYo/aLvCddulhDyIfN74e3PYweXMakF6w7SUyJJmdsNp6 G2xlOOACFKRuKbT73mhDSQUwmTsd3T+uGMrNpwdUAB7fXdst+SMIN+n9PeZQbk+6Z+s7tq vIBzCPxBRfpjD/I01OAxqNrLA/vaQ71bw29gQHZchswQilXCDYiF2KQdoUI7YFZLDKAuUv oCD6QktOcHnW6rkKNg83aB1TM78IlF9dZ5p67IACIU69+sPOTuiUV3TviFU6VA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTnWv4SK7zTr3; Tue, 6 Feb 2024 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 416FehxH091502; Tue, 6 Feb 2024 15:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416FehUh091499; Tue, 6 Feb 2024 15:40:43 GMT (envelope-from git) Date: Tue, 6 Feb 2024 15:40:43 GMT Message-Id: <202402061540.416FehUh091499@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: 7572fe89ada6 - main - vmm: Fix compiling error with BHYVE_SNAPSHOT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7572fe89ada63719b558c6b844e2743cd3ff6b6a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7572fe89ada63719b558c6b844e2743cd3ff6b6a commit 7572fe89ada63719b558c6b844e2743cd3ff6b6a Author: Vitaliy Gusev AuthorDate: 2024-02-06 15:36:17 +0000 Commit: Mark Johnston CommitDate: 2024-02-06 15:38:34 +0000 vmm: Fix compiling error with BHYVE_SNAPSHOT The return values of copyin() and copyout() must be checked. vm_snapshot_buf_cmp() is unused by the kernel and was incorrectly implemented, so just remove it. Reviewed by: markj Sponsored by: vStack MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43754 --- sys/amd64/include/vmm_snapshot.h | 7 +++++-- sys/amd64/vmm/vmm_snapshot.c | 44 +++++++--------------------------------- 2 files changed, 12 insertions(+), 39 deletions(-) diff --git a/sys/amd64/include/vmm_snapshot.h b/sys/amd64/include/vmm_snapshot.h index 5ed00c71d58a..b39c342bf6d9 100644 --- a/sys/amd64/include/vmm_snapshot.h +++ b/sys/amd64/include/vmm_snapshot.h @@ -98,8 +98,6 @@ void vm_snapshot_buf_err(const char *bufname, const enum vm_snapshot_op op); int vm_snapshot_buf(void *data, size_t data_size, struct vm_snapshot_meta *meta); size_t vm_get_snapshot_size(struct vm_snapshot_meta *meta); -int vm_snapshot_buf_cmp(void *data, size_t data_size, - struct vm_snapshot_meta *meta); #define SNAPSHOT_BUF_OR_LEAVE(DATA, LEN, META, RES, LABEL) \ do { \ @@ -113,6 +111,10 @@ do { \ #define SNAPSHOT_VAR_OR_LEAVE(DATA, META, RES, LABEL) \ SNAPSHOT_BUF_OR_LEAVE(&(DATA), sizeof(DATA), (META), (RES), LABEL) +#ifndef _KERNEL +int vm_snapshot_buf_cmp(void *data, size_t data_size, + struct vm_snapshot_meta *meta); + /* compare the value in the meta buffer with the data */ #define SNAPSHOT_BUF_CMP_OR_LEAVE(DATA, LEN, META, RES, LABEL) \ do { \ @@ -126,4 +128,5 @@ do { \ #define SNAPSHOT_VAR_CMP_OR_LEAVE(DATA, META, RES, LABEL) \ SNAPSHOT_BUF_CMP_OR_LEAVE(&(DATA), sizeof(DATA), (META), (RES), LABEL) +#endif /* _KERNEL */ #endif diff --git a/sys/amd64/vmm/vmm_snapshot.c b/sys/amd64/vmm/vmm_snapshot.c index 54de57e04c4a..cd53f05a1603 100644 --- a/sys/amd64/vmm/vmm_snapshot.c +++ b/sys/amd64/vmm/vmm_snapshot.c @@ -57,7 +57,7 @@ int vm_snapshot_buf(void *data, size_t data_size, struct vm_snapshot_meta *meta) { struct vm_snapshot_buffer *buffer; - int op; + int op, error; buffer = &meta->buffer; op = meta->op; @@ -68,11 +68,14 @@ vm_snapshot_buf(void *data, size_t data_size, struct vm_snapshot_meta *meta) } if (op == VM_SNAPSHOT_SAVE) - copyout(data, buffer->buf, data_size); + error = copyout(data, buffer->buf, data_size); else if (op == VM_SNAPSHOT_RESTORE) - copyin(buffer->buf, data, data_size); + error = copyin(buffer->buf, data, data_size); else - return (EINVAL); + error = EINVAL; + + if (error) + return (error); buffer->buf += data_size; buffer->buf_rem -= data_size; @@ -98,36 +101,3 @@ vm_get_snapshot_size(struct vm_snapshot_meta *meta) return (length); } - -int -vm_snapshot_buf_cmp(void *data, size_t data_size, struct vm_snapshot_meta *meta) -{ - struct vm_snapshot_buffer *buffer; - int op; - int ret; - - buffer = &meta->buffer; - op = meta->op; - - if (buffer->buf_rem < data_size) { - printf("%s: buffer too small\r\n", __func__); - ret = E2BIG; - goto done; - } - - if (op == VM_SNAPSHOT_SAVE) { - ret = 0; - copyout(data, buffer->buf, data_size); - } else if (op == VM_SNAPSHOT_RESTORE) { - ret = memcmp(data, buffer->buf, data_size); - } else { - ret = EINVAL; - goto done; - } - - buffer->buf += data_size; - buffer->buf_rem -= data_size; - -done: - return (ret); -} From nobody Tue Feb 6 16:25:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTpWV2vqZz59Y1G; Tue, 6 Feb 2024 16:25: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 4TTpWV2QmJz4tsX; Tue, 6 Feb 2024 16:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707236726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R2UN4lqdlJvdPLtD2/YZUqKKU5RlkoGRcS8wVWhicPU=; b=bdf9Shrd/X+7LUVKZUvU20wu/nKiTCCGRTiXFSQTv6wo+zK6F/PAwWHWGFbjhXZ54hdNAx +ucNneuIoHmRlt0KzLdVXJ4CcI+d2u7wobYel07MbpjhNgomBtUE6/azKkF47ZvKOYmqzR h4773i5QPg0lMw66NCWRCNdxaxtz7MXiiD2IfbtSrZ636JQ0E2etJGINhKqbKqs4xyGIV3 ue/NPQkDCM5R6iNu/xqQuYwLPq5Yi5Y5Uyo+3npAUaxF2rS8I8Uekqh5gfH3hUmwi5Cxb1 OEjYJYKjkFCXS2PvVuOcs1V62L9oheDEttTvFYY8otwQmcFqpwoaXz6/llz1nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707236726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R2UN4lqdlJvdPLtD2/YZUqKKU5RlkoGRcS8wVWhicPU=; b=ZjESaMqkwHPG7vqWoSeFpAVdnlxBSWo0Dmrm8Isni8ygm+WdB1cDmZj+JCMqJAsQ7YnWSH FQp7xKq1IJitcA5ttCSNdy5zRIJMKyymbByJMZuuienNQe0+fA131Ye/B5RI8obJ3SgId/ WDgqEj5mwavdv0STBTrWx6krMiU5ryrn8408dh738G3RWDnILIlegNEJMAZRgIN72GOeNI x7nDkj8hOv2ZAQbx+9gK5tet8FuYeo6DpuU6vrAUbreNn85DJaum9cxlErv8SYhOc3RzUB G2LmgJjNvUY5EE7LwUnHW+QgNJVr263PWmwgEo6Ckjh1Wx/sYRbQZgT4n3lcew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707236726; a=rsa-sha256; cv=none; b=xpUm9zdW89Q3Hi583VgET4IOfg11aqq8a/vjUYfqu1d8aQqNSsf/IhGp3OISUKwnJu9mjQ uoGBG93AmS+6U9pWLqZzcbbM1xAycc3svN0mR0lB3YPXpVSMWy1AiuIWzx7kiXN+TCL8mf qraL40IJqkR4qKAZATJvYnJL7bL1x4OS3yKGqFFgzcVsO/o4sSMJrZBW6lLw/Td+wc/4ub 6avwgSgVIdr3yuAuJT7altcTtdz0zlO+lxygNaEJQfCJJZku5b1LVVVVTWscISe1wSb1Jo U/Efx4J2SIVtp/pjemWGgQ2MkkOBNPyBIGYXLjlMPhKTY8m5DOn+IJTrSRcRgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTpWV1TZ9zWPv; Tue, 6 Feb 2024 16:25: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 416GPQtZ066556; Tue, 6 Feb 2024 16:25:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416GPQX8066553; Tue, 6 Feb 2024 16:25:26 GMT (envelope-from git) Date: Tue, 6 Feb 2024 16:25:26 GMT Message-Id: <202402061625.416GPQX8066553@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: 8a16fd431d83 - main - Revert "pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a16fd431d832f4601000f927701612c5d6e0a41 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a16fd431d832f4601000f927701612c5d6e0a41 commit 8a16fd431d832f4601000f927701612c5d6e0a41 Author: Kristof Provost AuthorDate: 2024-02-06 16:22:59 +0000 Commit: Kristof Provost CommitDate: 2024-02-06 16:22:59 +0000 Revert "pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex" This commit is correct, but was misattributed. Revert so we can re-apply with the correct author set. This reverts commit 6d4a140acfdf637bb559d371c583e4db478e1549. --- sys/netpfil/pf/pf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 12b72f50aa02..9f2c07c614b3 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -413,22 +413,25 @@ VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); } while (0) static struct pfi_kkif * -BOUND_IFACE(struct pf_kstate *st, struct pfi_kkif *k) +BOUND_IFACE(struct pf_krule *r, struct pfi_kkif *k, struct pf_pdesc *pd) { /* Floating unless otherwise specified. */ - if (! (st->rule.ptr->rule_flag & PFRULE_IFBOUND)) + if (! (r->rule_flag & PFRULE_IFBOUND)) return (V_pfi_all); /* Don't overrule the interface for states created on incoming packets. */ - if (st->direction == PF_IN) + if (pd->dir == PF_IN) + return (k); + + /* No route-to, so don't overrrule. */ + if (r->rt != PF_ROUTETO) return (k); - /* No route-to, so don't overrule. */ - if (st->rt != PF_ROUTETO) + if (r->rpool.cur == NULL) return (k); /* Bind to the route-to interface. */ - return (st->rt_kif); + return (r->rpool.cur->kif); } #define STATE_INC_COUNTERS(s) \ @@ -5015,7 +5018,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, __func__, nr, sk, nk)); /* Swap sk/nk for PF_OUT. */ - if (pf_state_insert(BOUND_IFACE(s, kif), kif, + if (pf_state_insert(BOUND_IFACE(r, kif, pd), kif, (pd->dir == PF_IN) ? sk : nk, (pd->dir == PF_IN) ? nk : sk, s)) { REASON_SET(&reason, PFRES_STATEINS); From nobody Tue Feb 6 16:25:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTpWW5RNWz59Y1L; Tue, 6 Feb 2024 16:25: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 4TTpWW3KKSz4twl; Tue, 6 Feb 2024 16:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707236727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eAO0dJL6SuoCPHcixdccG+RqSasKZEBDRMBulexzPsI=; b=ZCFNUBUlKfJ3uHkjfwgJZApp6UVOb2QOTYsanB7uSas2NE8LtGAbGGGr9a4W7okAFyUtec TTZzHwZkOyOypSSPPxSsMg1l/F4X05JP/MK3+7ldaW+5eWDDBvWLzGJQOT95zsQ2GF7EQH FNSBGHWRyDbVDB6xVSVnMj1IRX5xFMBflhV8FjRAiMtyMAP5oI61Xf8Tju9kfbaQbD/FNB E8KUi/9f6vWGKjD9gMgyQl+L3HJ09fYQ7R/Mr+dwfcot1Kn1NzaaTYJILYWO39mfFDgL8p dF4c3aE1VG+1Ub4A5tM3gra2cMoHh54Hp+loV09Sf6NGzOVoD1TH7lfct3pnTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707236727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eAO0dJL6SuoCPHcixdccG+RqSasKZEBDRMBulexzPsI=; b=HUMMmi70fKLyycEnCiUzuAMEhYPCvETQMfLt/gaEvT3VMbuZWqrHHGxF0MQ2B7OewwcKvc dJgDW7RqkcIn5fjSkCoQCp37qg3Vzm9iiGMkEbRf/dtoa6xCdpojvSGS6/253DyMChblPZ pDzFAcmO7E9ktrrAK7QPcQNE0T4s0NNrmHIwpNNLjREuhPFZah4rvgL3/JLgOLGXbkY3Y2 gHlSuQUWRMz9j4W1Y8gWRATRb9ujBEM/Ziv3hsqeMySyxHlFhVKTWMKgYENikE+NQaVYI+ TRxAKdU74fpipDDLxsIECYnyPHDg3vSSG2cnyPTCSai7vCY1P9nf3m8nR31rDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707236727; a=rsa-sha256; cv=none; b=enhubGQR9W0Somr5XbqUVtphdDtyayNQX6M1SL+4OvwnPgPO9SvJYLiHjk2LV2xJiImeTx Ph32RTscj3Mc/VdDv/2kZTizbq/v5bWjyi60UyEnd1csxEo2ilydZTfa90B9UJLtA/fivM R9+/Wz+uw7Zs23DmowljoLQwmtXIxWmt8HWHM3JItwQi8+k7tOCRG9FctUU7hI2OWEbGKL RRKWsQFJy6vlww+L8KPVrFCjOiWonBQZxuAU9whMPe1K/eSIaijDRiLvmSyB9TI0+tfa6V igk656L2Jnj8Akb/ZYjoZzcr+gC3sIH6SgmrulBkY3Fix1RbYogoY8p7yTsZAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTpWW2NwczWkL; Tue, 6 Feb 2024 16:25: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 416GPRdj066625; Tue, 6 Feb 2024 16:25:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416GPRbI066622; Tue, 6 Feb 2024 16:25:27 GMT (envelope-from git) Date: Tue, 6 Feb 2024 16:25:27 GMT Message-Id: <202402061625.416GPRbI066622@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: 58a26743145a - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58a26743145a0092903125973512035e97d41237 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=58a26743145a0092903125973512035e97d41237 commit 58a26743145a0092903125973512035e97d41237 Author: Kajetan Staszkiewicz AuthorDate: 2024-02-05 16:22:31 +0000 Commit: Kristof Provost CommitDate: 2024-02-06 16:24:28 +0000 pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex The redirection pool stored in r->rpool.cur is used for loadbalancing and cur can change whenever loadbalancing happens, which is for every new connection. Therefore it can't be trusted outside of pf_map_addr() and the r->rpool->mtx mutex. After evaluating the ruleset, loadbalancing decission is made in pf_map_addr() called from within pf_create_state() and stored in the state itself. This patch modifies BOUND_IFACE() so that it only uses the information already stored in the state which has been obtained in a way which respects the r->rpool->mtx mutex. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D43741 --- sys/netpfil/pf/pf.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9f2c07c614b3..12b72f50aa02 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -413,25 +413,22 @@ VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); } while (0) static struct pfi_kkif * -BOUND_IFACE(struct pf_krule *r, struct pfi_kkif *k, struct pf_pdesc *pd) +BOUND_IFACE(struct pf_kstate *st, struct pfi_kkif *k) { /* Floating unless otherwise specified. */ - if (! (r->rule_flag & PFRULE_IFBOUND)) + if (! (st->rule.ptr->rule_flag & PFRULE_IFBOUND)) return (V_pfi_all); /* Don't overrule the interface for states created on incoming packets. */ - if (pd->dir == PF_IN) - return (k); - - /* No route-to, so don't overrrule. */ - if (r->rt != PF_ROUTETO) + if (st->direction == PF_IN) return (k); - if (r->rpool.cur == NULL) + /* No route-to, so don't overrule. */ + if (st->rt != PF_ROUTETO) return (k); /* Bind to the route-to interface. */ - return (r->rpool.cur->kif); + return (st->rt_kif); } #define STATE_INC_COUNTERS(s) \ @@ -5018,7 +5015,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, __func__, nr, sk, nk)); /* Swap sk/nk for PF_OUT. */ - if (pf_state_insert(BOUND_IFACE(r, kif, pd), kif, + if (pf_state_insert(BOUND_IFACE(s, kif), kif, (pd->dir == PF_IN) ? sk : nk, (pd->dir == PF_IN) ? nk : sk, s)) { REASON_SET(&reason, PFRES_STATEINS); From nobody Tue Feb 6 16:26:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTpYL3JKsz59YHW; Tue, 6 Feb 2024 16:27:02 +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 4TTpYL2j9Wz4vlx; Tue, 6 Feb 2024 16:27:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707236822; 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=daWRI+AoXYoO0kHYFx+72DQsOEGc44Or5uB6WL4YM+k=; b=lcKLQxO1sMsKySo3i+ZcSof7654OcJJZcePIcwhFzeJxjC2dQfTtXeX/Fkr8TiuvrJav87 UcjBNtsnzz01lMn6Pn4Ywc//Dcoe9hqgq8m9hOYMwjp0RP5ZfaObLGPMAWkduQLvgvgvBI eqLuZfkslwUXlC4YSn/Z94vxMQVuBgUCWnDgUla/E1++d7FekOsF32+zcGE0QVi4ZIcYft 0JQwhu6dmd4HA1jje+lnJOVL6m0lPgOOx+2SwoEDN/YUOY1lxXagcwhCCR2HCScGTJIfHj 9VLfS01Zol6QaoE2mFlLU+dnhm1beS5GoQGNrEfhF0ZZf5vxmyhuabsdbtureQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707236822; 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=daWRI+AoXYoO0kHYFx+72DQsOEGc44Or5uB6WL4YM+k=; b=ex5ztig5s7Yp7yrb6TSSLgL8Ya4jP/06+25eFKsNRHygF04s7RvSQySRT1e8F6aRitD5+f s38dZqoj7AMT1uouL7deYvZ6izFxwqKjkUrSvlX2hz6aSKw5LyG5I0RT8FZqVqxsR6l4Pg D5unjDq0RTuzXc8aUrB/cAPvPy2FLr6AAkWy61vXCV5CmN8x64h4FiIXlsh/RI5UUfLdgP vWzhsOuVPFvK+7A9mzsC8eGTYYl0pu/Oeh534NzGYht0jcYzr66KAXwf+1yQMrrFfNd/ze DGXN82aKd8eMuNZUrX59DtX/BzIPamfg/grgMe6hmFCFbX0cR3raRJlD7/TZYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707236822; a=rsa-sha256; cv=none; b=chAZR+8w+ZrdDYJakJZhDu7CPwSiE3NaMGqtfJxjWXzNnOLAxBBkWbBYkLokhdplfPC/og WVtaZ2r7GU/BQk1nzf4DGEZk3+w1shZLeX2GJr5FCAzXGCdHzMbYPRE4dYmlchNiW+NENx Xm79bW+UGIlxWVVcEEdJ6p3jqhNBkyakZmzlhmSB7uL9+8R9g9r4eIDpCS/zb1S5XJtb7z BE+pZt7C1bCFk+zhMxYthaHjCweRkLMGrtxwbWtrs/20u/2jlupvOXNLSdaxcmnMSHnGd8 mP5Vfyxb6YsGEapfQNUbsovFnyy69jvNzBxydY71y4oR+IqjRCZtbcqPXfPIsA== 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 4TTpYL0yznzb5C; Tue, 6 Feb 2024 16:27:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 4E3A642EB0; Tue, 6 Feb 2024 17:26:59 +0100 (CET) From: Kristof Provost To: Warner Losh Cc: Mateusz Guzik , Gleb Smirnoff , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Igor Ostapenko , Kajetan Staszkiewicz Subject: Re: git: 6d4a140acfdf - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex Date: Tue, 06 Feb 2024 09:26:57 -0700 X-Mailer: MailMate (1.14r5937) Message-ID: <0A170E1B-4684-470F-9B4B-65B166191CEE@FreeBSD.org> In-Reply-To: References: <202402052119.415LJKSN037380@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 5 Feb 2024, at 23:27, Warner Losh wrote: > On Mon, Feb 5, 2024, 11:24=E2=80=AFPM Mateusz Guzik = wrote: > >> On 2/6/24, Kristof Provost wrote: >>> On 5 Feb 2024, at 19:02, Gleb Smirnoff wrote: >>>> On Mon, Feb 05, 2024 at 09:19:20PM +0000, Kristof Provost wrote: >>>> K> The branch main has been updated by kp: >>>> K> >>>> K> URL: >>>> >> https://cgit.FreeBSD.org/src/commit/?id=3D6d4a140acfdf637bb559d371c583= e4db478e1549 >>>> K> >>>> K> commit 6d4a140acfdf637bb559d371c583e4db478e1549 >>>> K> Author: Igor Ostapenko >>>> K> AuthorDate: 2024-02-05 16:22:31 +0000 >>>> K> Commit: Kristof Provost >>>> K> CommitDate: 2024-02-05 21:18:11 +0000 >>>> >>>> The author should be Kajetan :( >>> >>> Indeed it should. My apologies to Kajetan. And Igor as well, although= he >>> probably got the better end of the deal. >>> >> >> You can revert and commit the correct version. >> > > The counts would still count the bad version though... I=E2=80=99ve done the revert/re-apply dance anyway, so git annotate will = show the correct author. > I need to land my -c flag that automates git arc patch more... If that does what I think it does (i.e. commit the patch locally, rather = than just staging it) you do indeed need to land that. It=E2=80=99ll be v= ery helpful. Best regards, Kristof From nobody Tue Feb 6 17:24:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTqr152Tpz59dPT; Tue, 6 Feb 2024 17:24:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTqr11FFTz42sf; Tue, 6 Feb 2024 17:24:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.17.1/8.17.1) with ESMTP id 416HOZZT019545; Tue, 6 Feb 2024 19:24:38 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 416HOZZT019545 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 416HOZ90019544; Tue, 6 Feb 2024 19:24:35 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 6 Feb 2024 19:24:35 +0200 From: Konstantin Belousov To: Jessica Clarke Cc: Brooks Davis , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 0d4f7723bc43 - main - libc: link libsys as a auxiliary filter library Message-ID: References: <202402052038.415KckEC069716@gitrepo.freebsd.org> <68B8B759-E01F-498A-850B-23EAE4A3DABC@freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68B8B759-E01F-498A-850B-23EAE4A3DABC@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4TTqr11FFTz42sf X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] On Mon, Feb 05, 2024 at 08:52:36PM +0000, Jessica Clarke wrote: > On 5 Feb 2024, at 20:38, Brooks Davis wrote: > > > > The branch main has been updated by brooks: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=0d4f7723bc43e06ca22025740cb826a7f282ea11 > > > > commit 0d4f7723bc43e06ca22025740cb826a7f282ea11 > > Author: Brooks Davis > > AuthorDate: 2023-11-15 23:35:16 +0000 > > Commit: Brooks Davis > > CommitDate: 2024-02-05 20:34:56 +0000 > > > > libc: link libsys as a auxiliary filter library > > > > At runtime, when rtld loads libc it will also load libsys. For each > > symbol that is present in both, the libsys one will override the libc > > one. It continues to be the case that program need only link against > > libc (usually implicitly). The linkage to libsys is automatic. > > > > Reviewed by: kib, emaste, imp > > Pull Request: https://github.com/freebsd/freebsd-src/pull/908 > > --- > > Makefile.inc1 | 2 ++ > > UPDATING | 6 ++++++ > > lib/Makefile | 2 +- > > lib/libc/Makefile | 3 +++ > > share/mk/src.libnames.mk | 2 +- > > 5 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/Makefile.inc1 b/Makefile.inc1 > > index 7a9917fd8a74..f97e53cc7f9a 100644 > > --- a/Makefile.inc1 > > +++ b/Makefile.inc1 > > @@ -3125,10 +3125,12 @@ _startup_libs= lib/csu > > _startup_libs+= lib/libc > > _startup_libs+= lib/libc_nonshared > > _startup_libs+= lib/libcxxrt > > +_startup_libs+= lib/libsys > > > > _prereq_libs+= lib/libgcc_eh lib/libgcc_s > > _startup_libs+= lib/libgcc_eh lib/libgcc_s > > > > +lib/libc__L: lib/libsys__L > > lib/libgcc_s__L: lib/libc__L > > lib/libgcc_s__L: lib/libc_nonshared__L > > lib/libcxxrt__L: lib/libgcc_s__L > > diff --git a/UPDATING b/UPDATING > > index 33bae2a42b9d..aae30936a8b5 100644 > > --- a/UPDATING > > +++ b/UPDATING > > @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: > > world, or to merely disable the most expensive debugging functionality > > at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > > > +20240205: > > + For dynamically linked programs, system calls are now made from > > + libsys rather than libc. No change in linkage is required as > > + libsys is an auxiliary filter for libc. People building custom > > + images must ensure that libsys.so.7 is included. > > + > > 20240202: > > Loader now also read configuration files listed in local_loader_conf_files. > > Files listed here are the last ones read. And /boot/loader.conf.local was > > diff --git a/lib/Makefile b/lib/Makefile > > index db07883e2b10..9d2531820c8b 100644 > > --- a/lib/Makefile > > +++ b/lib/Makefile > > @@ -123,7 +123,7 @@ SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} > > SUBDIR_DEPEND_libc++:= libcxxrt > > # libssp_nonshared doesn't need to be linked into libc on every arch, but it is > > # small enough to build that this bit of serialization is likely insignificant. > > -SUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared > > +SUBDIR_DEPEND_libc= libsys libcompiler_rt libssp_nonshared > > SUBDIR_DEPEND_libcam= libsbuf > > SUBDIR_DEPEND_libcasper= libnv > > SUBDIR_DEPEND_libdevstat= libkvm > > diff --git a/lib/libc/Makefile b/lib/libc/Makefile > > index 72300e88d3d7..6a54f7641087 100644 > > --- a/lib/libc/Makefile > > +++ b/lib/libc/Makefile > > @@ -62,6 +62,9 @@ CFLAGS+= -ftls-model=initial-exec > > # > > LDFLAGS+= -nodefaultlibs > > LIBADD+= compiler_rt > > +LIBADD+= sys > > + > > +LDFLAGS+=-Wl,--auxiliary,libsys.so > > >From reading documentation and implementation code (LLD + rtld), should > this not be the soname, i.e. libsys.so.7? Yes it should be soname, since otherwise several things are wrong: - libsys.so open requires /usr mounted - different filter soname/name results in unneeded DT_NEEDED entry for libc 0x000000007ffffffd (AUXILIARY) Auxiliary library: [libsys.so] 0x0000000000000001 (NEEDED) Shared library: [libsys.so.7] From nobody Tue Feb 6 17:28:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTqvn6mBpz59dv2; Tue, 6 Feb 2024 17:28: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 4TTqvn6Cnbz42vf; Tue, 6 Feb 2024 17:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707240485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPskB3wx2M3MaJRn1DQYZ1HNweOtWqeTGfk2AnI+M8Q=; b=PzdOGzJoGzq7WVmD2YoT/vTNS789qyluB1jpsCiQxhor+kf72V64bteQ7XWewhgIJaTWQI FQQ8NjnEJu3EcgPC4ev7nSKAe2h3BEquGeg3DjuLMRvo1kdhC5Rz8LdckVQ+yPqh/0N8ex o/ixed2IMAZFchH9SJgxwGwUkmOJ9Nf6P5pAFaNVP8t5GCzeX7TmUD7sRfzIUkzQZ2zqb0 7m2VRoCBoiTwYGM5nRbRh8rS/GH8qksw3EwEY2mV51vdUQifjILCX56dAYUhkeIAfsJzFW ch71jrH8QyWA2qUrdpjsDgGvNE8CRSF4VcglDW5Dmcwf3JMJfOXXGXQWwInIFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707240485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPskB3wx2M3MaJRn1DQYZ1HNweOtWqeTGfk2AnI+M8Q=; b=Otpx26TW4YQkSgjRqv3wydA54kVNRnRSt5NTRSqPSPwTGiPJLOTkxqIoRdSu/Rw4YqP59m qLOCe040aR5SW9URl6d1Q1bMkcZV0v9l/WB95cthTn3fQsUjnrlCtsQvVRki4Pi6Bo/wkG Rn+0dAcCdTscyHLuJ15lmlraygBYH6DVwgGCe6bLSQzeNiWXMrgoTOYGMyPYwQ9SYSjpQ9 TLOYNlAKnpYZ8CgsRfj2LHm+lmcfRnCkSHVuWRTaWhtIB8E/ziqJXOjrUUAY2l+CebI5Qv 4Esibow08jbRCITZnrd4YUP7/P8Z9lgb7O8v/WyFPqpzDheklAkW1IO9KsSnMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707240485; a=rsa-sha256; cv=none; b=otoTAjw0CFD/SEkbXtXtI8HyhK/bxArKFNDTi2UHdUJaqesEy2EKSuZ/gwsbD+KN9Dh1BS mdwCJ2muZKNsSzR22Y2Xuj4G8mRp7oCBBcrd5l04KKSNmSGRvyTHkhz1O2gWeFesBejhYV qohCMjgCy4Rt31RRbft4h4YtRCCqpzur8Sb+AOpoFGxD7l3+U/GOWJdUYizqjnkwp5vQgC /bRDzw8UDcXzGwsAixP1GERbFaeqwUg7z3QcsJEXqlljdviPINTk9k6DdutpSKa1f+Ri6k ZTVB8HQ3Mqaovw86aH86cdaVxGNX3QJFwJDKNIGMEEv2nJrVKo1WcyxPyihntQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTqvn5GFfzYBH; Tue, 6 Feb 2024 17:28: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 416HS5Zo067705; Tue, 6 Feb 2024 17:28:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416HS5px067702; Tue, 6 Feb 2024 17:28:05 GMT (envelope-from git) Date: Tue, 6 Feb 2024 17:28:05 GMT Message-Id: <202402061728.416HS5px067702@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: 3747af169917 - main - Revert "hier.7: add /lib/casper directory" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3747af1699171a1a253be02d90df176cbf5c2406 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3747af1699171a1a253be02d90df176cbf5c2406 commit 3747af1699171a1a253be02d90df176cbf5c2406 Author: Konstantin Belousov AuthorDate: 2024-02-06 04:48:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-06 17:27:50 +0000 Revert "hier.7: add /lib/casper directory" This reverts commit 407345752d0330766c86b5600740152c34be3ff0. No longer needed since helpers are moved to /lib. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D43758 --- share/man/man7/hier.7 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 49635ca5be9d..0eeaa7beb6d1 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 6, 2023 +.Dd February 6, 2024 .Dt HIER 7 .Os .Sh NAME @@ -147,10 +147,6 @@ and .Pa /sbin .Pp .Bl -tag -width "nvmecontrol/" -compact -.It Pa casper/ -service-specific -.Xr libcasper 3 -Capsicum support libraries .It Pa geom/ class-specific libraries for the .Xr geom 8 From nobody Tue Feb 6 17:49:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTrP26MZ2z59gbV; Tue, 6 Feb 2024 17:49: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 4TTrP24Kjcz44jQ; Tue, 6 Feb 2024 17:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707241798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2LaFpg6IRuI7DJNnCFD8ESJw5UFDepy66L/tAE29O8g=; b=xVHiThLct/i8kHiAyJfQTUA0IMygZRQQo272lEi/CCcEgc+nMB4ALZ87lnOUIV1SVF86Qt h/NY3p1VqKTXwy0rJ0wKWuPv0uzbMO97EkZSgCcO/jE6pWbdKSr4c60EoqakzY+5YL9Zlh ZrBDHysujxthuTp/Tvpl7zTeZdqfxTy369WMwNhRZ491k/MosCJi7iSnv073x7YuqemAf4 QqZpyCguEGi1w18Qjqhbd7YUdHxOz//9kT8RFJJhmoj769TB/X6GOw76h1CYWZhW8/Hg2a +if4+h5AErr1roaqrJNjGyp8jwu7rKMqrJYgx9Yj774K0BO7e2sZ/3bbjKWkTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707241798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2LaFpg6IRuI7DJNnCFD8ESJw5UFDepy66L/tAE29O8g=; b=fyKQO8ZB5nC0s1DKtfYaiorsEtWlplC/urFgUYXufc8ofF8VJViX+DUNHnsGMsTJzUv4lJ d1pkd5gI6edoI+JYo99FTe32BxwWNU1VolQF468Yy8BRN6p/9aLBK9L4vZoX03givPvTpx sxAJJm4Mdd5ecwCm9tjWmWqHFFrHWq4EMkktqh7ioCZEqCeGLF/rOKvctN+WsU3N16y3/d VnRKK+4YNNwZGDAOZ4yY6rQexZ4lVXVYqLS77OkKWOfbQ0i43RqUTr0yELHqBHSCUaVAob /ZGl3LsRjt4wPVgN2EMlvMD6o3G9wZMBBGS5ajCfe6bT9teBoeoTEGeGQTSdsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707241798; a=rsa-sha256; cv=none; b=qCiAUQysdV8CV8CzlQ530jytvKD2NX68/8ovC9oqw4lSNWFLQKCBFGESBrJVCsOVD6Er9F Ro0Zy3w5nXQyQQNq3no46l5TbvlDDI4BinUyhLmCdFwRxiAs8qHkbMJwUVwk8CVIUnFhGI DiHvTmETaYTlGk0F4vSh+sDiNKvCvgirc7YICh+Hkh1k18On7LXgJlRlsiEW5EF0n9SqvM t6tv61syzbBAaXYlliDFBUt6tK2F/ddoXvoTxkfnNL7uzDLErTg7FrppInL0SG3zok8ZNY S/rIU/zZzpNjChTa1G0NQ7hGDNwpj3Xmjlu4hTLgm+1CYdR6P7edlgESuEenIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTrP23PLgzYG1; Tue, 6 Feb 2024 17:49: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 416HnwaW001150; Tue, 6 Feb 2024 17:49:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416Hnwp9001147; Tue, 6 Feb 2024 17:49:58 GMT (envelope-from git) Date: Tue, 6 Feb 2024 17:49:58 GMT Message-Id: <202402061749.416Hnwp9001147@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: 04c68025ea1d - main - pf: add a probe point to BOUND_IFACE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04c68025ea1dc35778db0ac1d195de9745678e28 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=04c68025ea1dc35778db0ac1d195de9745678e28 commit 04c68025ea1dc35778db0ac1d195de9745678e28 Author: Kristof Provost AuthorDate: 2024-02-02 20:51:50 +0000 Commit: Kristof Provost CommitDate: 2024-02-06 17:47:07 +0000 pf: add a probe point to BOUND_IFACE It's been useful at least once, so we may as well keep it. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 12b72f50aa02..8bfda12b2b2e 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -126,6 +126,8 @@ SDT_PROBE_DEFINE4(pf, ip, test6, done, "int", "int", "struct pf_krule *", SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_state_key_cmp *", "int", "struct pf_pdesc *", "struct pf_kstate *"); +SDT_PROBE_DEFINE2(pf, ip, , bound_iface, "struct pf_kstate *", + "struct pfi_kkif *"); SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", "struct pf_krule *", "struct mbuf *", "int"); @@ -415,6 +417,8 @@ VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); static struct pfi_kkif * BOUND_IFACE(struct pf_kstate *st, struct pfi_kkif *k) { + SDT_PROBE2(pf, ip, , bound_iface, st, k); + /* Floating unless otherwise specified. */ if (! (st->rule.ptr->rule_flag & PFRULE_IFBOUND)) return (V_pfi_all); From nobody Tue Feb 6 19:34:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTtjN2sHKz59qCq; Tue, 6 Feb 2024 19:34: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 4TTtjN2M5rz4Hv6; Tue, 6 Feb 2024 19:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707248056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2UHBZnxUpObPz6i5nNW4nEDKT7Og42n/bJPjFVfX8zo=; b=AYJ1cDvLLLSuPrDp7IKqP8uE7oeQtq9fYphtPBqBFbqokl9WJd6AjL3cWap4z3wGiNCTct 8saB8yzgzRbRDSldPxoTwAC1t1wKMKK0/A95/q7cknt0rr3wM0G/hbwUj6lVA0PvR6R/jD DlCkdnQ09GEkK6gJeGQJ1+/gm10UuqGc3jvtoqQNkasQqTG/kxeTycMgVMCTmoS6i2Z2oV RcOJ3z/AsaxwtJuLHlGcnYMq6mlbJqgY0MgCjAVqdQRkBymJtAtbFgcYNm96cT7Zdzsk/O Ni0/ELswkgf19ZCiDJMQ7B6Y3ytvWKIMzzec4dOEWdbe4SmLcKkvXVtdDWInXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707248056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2UHBZnxUpObPz6i5nNW4nEDKT7Og42n/bJPjFVfX8zo=; b=j80/P0tLZTGfobL2hqFCc9vUuozaA/Kb2rnNR/TrE7vsdAwyrFkU1WkddX5XYocsxm2Trs /6K/l0gaf1RdVSvQLm1CjPcHy08pLt9qKATGB4sLe/DcuS3Zux6MF+604v8JklnL4lDq/i pxiGuLim72m6hzB9QHQC2+BPV8lHXG2yjgL1cxqXHFhvN5YCHLukg1dL9lHTk1yIVxhR87 Gtb10e0ACWFDEDfUzRSz5J/+KZvqIGanHJQyZ1v1OoDjsrKtlSETiXD/6nHjW/frT4sHn7 /3PzOJNEkfHqHbw4f4BgsmsbXbiyfGWgr5ErWiUbNRo9lUMyt7jPnfQmadLheA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707248056; a=rsa-sha256; cv=none; b=Aa5t7uw/Z71DgHhs2jMgL2eDxB6+fk8qcfU5mcR8UMlwutXa22cQLUNNDOzOzmGAAx9x/P ACTktv/yexcIdDDc4k3ILJ2yt9waTXkj2xcsu2AeEV2aW5ULPtmn3skqX8CdsXSy4CPJJS txx/2IRlrEJiA16jYKiaghDwA/+FMx9jdOWvzH2E8WCGCN1p/y6V23Q5VoqAfwWd2378Mt AFpKMQTfT8NH1AbGVi9wDkHmNRNwWAruJ1pci+q/ozyoP1FRh5qRn9NKrIozDqE59X+OFt l+3n24708sarQCLeuCcleoWv56O2nzC1CsF7GsUsoQCAHPtlk1tHZXh7mvwrqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTtjN1RsQzcHV; Tue, 6 Feb 2024 19:34: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 416JYGHN084574; Tue, 6 Feb 2024 19:34:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416JYGQ7084571; Tue, 6 Feb 2024 19:34:16 GMT (envelope-from git) Date: Tue, 6 Feb 2024 19:34:16 GMT Message-Id: <202402061934.416JYGQ7084571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Pawel Stefaniak Subject: git: 12bae251fbfa - main - libcompat: silence -Wdeprecated-non-prototype List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pstef X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12bae251fbfa33f375d134e0840d88c4363b8b94 Auto-Submitted: auto-generated The branch main has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=12bae251fbfa33f375d134e0840d88c4363b8b94 commit 12bae251fbfa33f375d134e0840d88c4363b8b94 Author: Piotr Paweł Stefaniak AuthorDate: 2024-02-03 18:12:42 +0000 Commit: Piotr Paweł Stefaniak CommitDate: 2024-02-06 19:32:46 +0000 libcompat: silence -Wdeprecated-non-prototype by removing unnecessary re-declarations and converting K&R-style function definitions. Differential Revision: https://reviews.freebsd.org/D43723 Reviewed by: imp, emaste --- lib/libcompat/4.3/rexec.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c index b6ed92e2a313..b2f37a09c0fb 100644 --- a/lib/libcompat/4.3/rexec.c +++ b/lib/libcompat/4.3/rexec.c @@ -49,7 +49,6 @@ #include int rexecoptions; -char *getpass(), *getlogin(); /* * Options and other state info. @@ -130,8 +129,7 @@ token() } static int -ruserpass(host, aname, apass, aacct) - char *host, **aname, **apass, **aacct; +ruserpass(char *host, char **aname, char **apass, char **aacct) { char *hdir, buf[BUFSIZ], *tmp; char myname[MAXHOSTNAMELEN], *mydomain; @@ -289,11 +287,7 @@ bad: } int -rexec(ahost, rport, name, pass, cmd, fd2p) - char **ahost; - int rport; - char *name, *pass, *cmd; - int *fd2p; +rexec(char **ahost, int rport, char *name, char *pass, char *cmd, int *fd2p) { struct sockaddr_in sin, sin2, from; struct hostent *hp; From nobody Tue Feb 6 21:18:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTx1Y4HLXz5B00h; Tue, 6 Feb 2024 21:18: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 4TTx1Y3bM3z4YxY; Tue, 6 Feb 2024 21:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707254305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mc9DpDGoUNS5Cm0xoNlDHcfKC6uy0YcNg7dlbdR6RHY=; b=ZmrcolGIuyqZOkq42POFAKqCN2lJe/ZR3xLR9buYDhmYADthIuB1AuJ2oQbqUf+dL+olOT iPX0rG5lg6wZiSDp3EB76TfN73Gh0xrs6q/DInImvPQKHm+5dU/wCRtbq2nIa7kxZelWj9 BGIP8TH89vvQWN6XNt+AhBXLIzkXIMQEaNBpwatFGvJMBBOAJyrq/fEY+IlECkQOX0qh8p nCURdaIKoTxm12btwo2EJ6OJ+aD5EYXOjnb1Lub6Inal/jXyhBtRqQttdZBxcdFKCWj5XY a9aM61u9M2vjOM1aoMlttV5Dgly1VzKQlgqWhwK9TrEqSpCe/bMbl0ZIzpWwhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707254305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mc9DpDGoUNS5Cm0xoNlDHcfKC6uy0YcNg7dlbdR6RHY=; b=VgSHpI3DXRJZU9+1ZXKU3H86P8mX59mvT8tavIcKsano6HZNffSfEP5eMhFs8Rct8hlqu4 MOGWU0Wc9F8zMSoPBfSkTb5rC8Vi8w39UG34XTsLsf8azURsP6LNdx3JvI32Ws8bKNn6iq wXXOK0dJu+s7qCq7FeNxsYAsOjL8CNpVg7TZ1QdsnjyFu4PGo2yL7ZbbTH/rSsnIPFoW77 fHQKWDLBYXKQ7ihhdQJYvlgmmflXp0BsvNLdoVYCfRhuuGZ5kCsi4vbg0obHbBvGz6UKBi jclCoJRkpKkrw750EbaE9QeANszGEPmlpSTzWC3awrwIzT2a+G6n5W8aFNb+Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707254305; a=rsa-sha256; cv=none; b=YjYh20UlWCKiP7z+Irt4SSgdOOWPKhMiAChunwQ4KIMO/uiAQplsDqxP0YUjg9eEwci1Ih lM1jZgoBV+2DGfKDqg1vKTqOdj/tBpmb2vau55oZMHqJFHmil60ryy6EfavCqDFUXRniSp cH3LV5bf55sHJJFOfyulxCT1RFIiCdQ7NTdnQUMZzdNEHyaj+vwUxGBM/raTcIae0EoGqF yyExnJSWKcjJK0gGGPCs4+S2DxUVF54jxGnufIwLqMcjuYyIlFFJZtwIsLh6dFQHZmZLl0 K5JphQDm4zQaOZ3WR3aq7MBy5vsLso2FHsERscF1/Y9xUo6vkrTEgxZjh21QNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTx1Y2fJFzgD6; Tue, 6 Feb 2024 21:18: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 416LIPIW054369; Tue, 6 Feb 2024 21:18:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416LIP7t054366; Tue, 6 Feb 2024 21:18:25 GMT (envelope-from git) Date: Tue, 6 Feb 2024 21:18:25 GMT Message-Id: <202402062118.416LIP7t054366@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: e1735b35e3e4 - main - git-arc: Retain color status messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1735b35e3e4a61f2552fb0a551973066f2bde34 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e1735b35e3e4a61f2552fb0a551973066f2bde34 commit e1735b35e3e4a61f2552fb0a551973066f2bde34 Author: Warner Losh AuthorDate: 2024-02-06 21:16:51 +0000 Commit: Warner Losh CommitDate: 2024-02-06 21:16:51 +0000 git-arc: Retain color status messages Newer versions of archanist have an --ansi option to always include the ansi colors when doing an arc list (or any command really). Add this to the arc list that's relevant. Add filter to filter out the 'bolding' though since that interferes with our parsing. This should restore the color output after df834e06bbc7. Fixes: df834e06bbc7 Sponsored by: Netflix Reviewed by: markj, jhb Differential Revision: https://reviews.freebsd.org/D43459 --- tools/tools/git/git-arc.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 316e160abeed..c74577e2d5d7 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -159,12 +159,12 @@ arc_call_conduit() } # -# Filter the output of arc list to remove the warnings as above, as well as any -# stray escape sequences that are in the list (it interferes with the parsing) +# Filter the output of arc list to remove the warnings as above, as well as +# the bolding sequence (the color sequence remains intact). # arc_list() { - arc list "$@" | sed 's/\x1b\[[0-9;]*m//g' | grep -v '^Warning: ' + arc list "$@" | grep -v '^Warning: ' | sed -E 's/\x1b\[1m//g;s/\x1b\[m//g' } diff2phid() @@ -219,7 +219,7 @@ title2diff() local title title=$(echo $1 | sed 's/"/\\"/g') - arc_list | + arc_list --no-ansi | awk -F': ' '{ if (substr($0, index($0, FS) + length(FS)) == "'"$title"'") { print substr($1, match($1, "D[1-9][0-9]*")) @@ -430,7 +430,7 @@ gitarc__list() local chash commit commits diff openrevs title commits=$(build_commit_list "$@") - openrevs=$(arc_list) + openrevs=$(arc_list --ansi) for commit in $commits; do chash=$(git show -s --format='%C(auto)%h' "$commit") @@ -449,7 +449,7 @@ gitarc__list() awk -F'D[1-9][0-9]*: ' \ '{if ($2 == "'"$(echo $title | sed 's/"/\\"/g')"'") print $0}') if [ -z "$diff" ]; then - echo "No Review : $title" + echo "No Review : $title" elif [ "$(echo "$diff" | wc -l)" -ne 1 ]; then echo -n "Ambiguous Reviews: " echo "$diff" | grep -E -o 'D[1-9][0-9]*:' | tr -d ':' \ From nobody Tue Feb 6 21:23:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTx7K6PVbz5B0jh for ; Tue, 6 Feb 2024 21:23:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTx7K4YHfz4bMl for ; Tue, 6 Feb 2024 21:23:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-55cca88b6a5so7254261a12.1 for ; Tue, 06 Feb 2024 13:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1707254602; x=1707859402; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=l+YTDtqNw6DIl7W/bJ4qF0z1c3TPUb7WjXTt7T/w9nQ=; b=JqtVQl3ljmrFzEjimwv5xLYJHNghZW94tnjIP8dJ6zkJIaQcvqk2hFro12xJdeDxIn JXc56tBB7vuhxyg1OYpglALTpuGmyfvoY9UMuBUpzOU6Sa/U2XgsClWuNKnH5r44FBwa hnaMeTHTCD1/GTqL8AYc34nzdr1zF1vYsQWG16ndSO+Yubs89WIVhY2kQUBb6kmOrbfz tIszIKV1Wi539270DyaOQ06CWtfa4jDHRnzlLKwdgS5CxC+6Ug2meP+wm89dWsZt59ZQ lZqVVdlS4QuWIwNeBhya/iker2sVrLTTXy9j0J+8vSgZUb0Y2/fh3xQWTg8s616Z9DYx rOVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707254602; x=1707859402; 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=l+YTDtqNw6DIl7W/bJ4qF0z1c3TPUb7WjXTt7T/w9nQ=; b=ivfpNJRQO2PTryRHa3fmUwBzmp18oDHp2VYnQfgWrvy8HaLBQPwIDjnIKhiGUFYa4u xrWK2q/kV0C3rHo/MnGogNuZlUNVBQkkIhLWiflXasa1C/kgJMlik8GKc+MxM2sFDoNK A1nDVPPRyNWZ3ZYSOpETI1Uq6YMPRWLZ1FdIy5ziZiwRUGIWOFc7szBdzTbjYcRxJPDb elnPuFO2V2vznPnWz9YqdLDFtZ3N+tmZoR12AW/UjABXIUNRELG7FJkr9n2h6sibpDtn k95SlsMvbmdi0jfiQsKKrQ+ItRwwYICihHAlLwQkhI5/51qCXglWXrZSL3Ir6W0ExI9d 05mg== X-Forwarded-Encrypted: i=1; AJvYcCVEpv0fTq8e5MFcxxJpqeAR0ZFUNvqntjyF8qquBsqcDPGzK/CMX/7hBRHKcwG91QScYtOKLTJDMD+xZNbhwbpkzD788ZnCB6/qXWQtKkXf3g== X-Gm-Message-State: AOJu0YyCCvHn/Q9MKmJo6arUME86NMVO2gLPKEiKonENiOkIatSq1Ga5 0MmCFsmkeDpz2NM2uPfUwjXIXHyFTt3UIFC99tMNDs6+qqCTyQai7RBHSiG3pl75XAD0ggmWfky aVEDP5cCPsqE++km8kLrxLhb//jnJpDskc+asuw== X-Google-Smtp-Source: AGHT+IG8GWz3eMbFYVFpUvdfco5RZxB+vKGtvrbq9B4ImPTx9thI5aJuI2Ke8g64twa7i4uM8Tt6a+OMbO/6Yx3E9A8= X-Received: by 2002:a05:6402:31f4:b0:55f:11cf:ee54 with SMTP id dy20-20020a05640231f400b0055f11cfee54mr2607129edb.32.1707254602333; Tue, 06 Feb 2024 13:23:22 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202402052119.415LJKSN037380@gitrepo.freebsd.org> <0A170E1B-4684-470F-9B4B-65B166191CEE@FreeBSD.org> In-Reply-To: <0A170E1B-4684-470F-9B4B-65B166191CEE@FreeBSD.org> From: Warner Losh Date: Tue, 6 Feb 2024 14:23:10 -0700 Message-ID: Subject: Re: git: 6d4a140acfdf - main - pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex To: Kristof Provost Cc: Mateusz Guzik , Gleb Smirnoff , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Igor Ostapenko , Kajetan Staszkiewicz Content-Type: multipart/alternative; boundary="0000000000001d183f0610bd30e5" X-Rspamd-Queue-Id: 4TTx7K4YHfz4bMl X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --0000000000001d183f0610bd30e5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 6, 2024 at 9:27=E2=80=AFAM Kristof Provost wro= te: > > I need to land my -c flag that automates git arc patch more... > > If that does what I think it does (i.e. commit the patch locally, rather > than just staging it) you do indeed need to land that. It=E2=80=99ll be v= ery > helpful. > Oh, I already landed it in 787cb30d20ac2031283c6dc2ec829f190997e581. And it does do what you think: It will use the phabricator APIs to scrape as much information as it can out of it (author, etc) and commit it so you can not have to worry about cut and pasting the wrong thing, retyping commit messages, etc. Give it a try, and let me know what screws up. Just add '-c' where you'd use 'git arc patch' today. I have some doodles for pulling the entire chain down as well, but got side tracked into just getting arc (archanist) to do that for me and see what the quality of the results are and I never was happy with the couple of patch trains that I tried. Warner --0000000000001d183f0610bd30e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Feb 6, 2024 at 9:27=E2=80=AFA= M Kristof Provost <kp@freebsd.org&= gt; wrote:
> I need to land my -c flag that automates git arc patch more...

If that does what I think it does (i.e. commit the patch locally, rather th= an just staging it) you do indeed need to land that. It=E2=80=99ll be very = helpful.

Oh, I already landed it in=C2= =A0787cb30d20ac2031283c6dc2ec829f190997e581. And it does do what you think:= It will use the phabricator APIs to scrape as much information as it can o= ut of it (author, etc) and commit it so you can not have to worry about cut= and pasting the wrong thing, retyping commit messages, etc.

=
Give it a try, and let me know what screws up. Just add '-c&= #39; where you'd use 'git arc patch' today. I have some doodles= for pulling the entire chain down as well, but got side tracked into just = getting arc (archanist) to do that for me and see what the quality of the r= esults are and I never was happy with the couple of patch trains that I tri= ed.

Warner
--0000000000001d183f0610bd30e5-- From nobody Tue Feb 6 21:49:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTxjb65Klz5B2Rr; Tue, 6 Feb 2024 21:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTxjb5YRWz4gNX; Tue, 6 Feb 2024 21:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707256179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JO7Yx8pao8lcPNTArVoHqx4b4kfFWvVZBIaDBv/Gkzg=; b=pJ+RsFzAtFNARJQAEeYMTHqE//cdQO7NM0oJT8wM7gDHIH7WolQsXVMqVPiHFW8SVE10ly DqEGggNhlyiRKXThyuryxF105ja1Yq3W2atUrMG0t2Sl0IWuWC4mT/Oj+Qxgb/KJlI29vD U+fvLRPTtLiCOyfUpZm+Io0ZrLgIGWke0gflaSVOEoN0K2aGJsQ64BA5JXsFwbec+2vMHK xZUk1QXvEuYwsandziL1AgsdYIx0hsUSaEr61xZGDS8/TAyS+1m86LICFlyH+/UBRUJNEK 1o6QsEZSmP1WHjZyP6MaRg4nQqedPmfC3oX0PGGEsinyT889uYmNa+YtJMjf3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707256179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JO7Yx8pao8lcPNTArVoHqx4b4kfFWvVZBIaDBv/Gkzg=; b=UC0ArI4KAIfz+q1AnxCInjj1xmNZINj4BUrArERiAES+84fZyFEh6+QOxXsW2IpwizjLW/ z/xDAPTgKbgl8VrxScktMmFbeLx4q1DdW7SSLFwL+sPUP9FYQznhbrbL1LT7AFJuRjSeMy IaHCZ8wzCNthoBQIde4M1YdXUsvo4ihhgtF/ED0OU/t8blsY4Ucq1AnV/ziLewDkgl+Fwp +0HlTNUdpFLSoBjh7TXBtx7WqddbQUyy8xVQVKMJgSIuoyMaULlDyddJ+biDEUFaZxhcTk /iBEYEPMVeYcZCtGSucB441MO3XWGhigB4K1DR3czsUjVVUZEPmNuzNydHg3jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707256179; a=rsa-sha256; cv=none; b=g9tlNqkLO7KhrofKc+JsjnGApUHrRAwS7czLI5cot7UUDMepTZVARBy0RJdSnF9PN6FPMs gCc89iHNJSf24lWxtzEExvC2zkCjfQpylSiQYl+TX59jKyQsVxkwvpCsTltkf5qPVCjbCy 8mrJ1qZjRo6dU0RetqaPuKNQS50o1gKIMpAI2peUbSq8xH9Ftw2ymdHCeTmrO0sTJAuraL 1K8AJMwPhM8iUODeXB0jPz7FJ036BmHGo/ne0ZSrKcmoxRsJemaS6ubTLMVbTcvEmWlRbu 6wblvmavD4Rfq83L5WfYYnMDCPer2GDUA9txjk1DPYQzExmbDHIxq52MyW5fVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTxjb4d4vzgLn; Tue, 6 Feb 2024 21:49: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 416Lnd5q004953; Tue, 6 Feb 2024 21:49:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416LndaQ004950; Tue, 6 Feb 2024 21:49:39 GMT (envelope-from git) Date: Tue, 6 Feb 2024 21:49:39 GMT Message-Id: <202402062149.416LndaQ004950@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: 1d3d30c8d2e4 - main - vnic: fix compilation of an IPv6 only kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d3d30c8d2e41052796c5bdd9220d7e3daabccad Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1d3d30c8d2e41052796c5bdd9220d7e3daabccad commit 1d3d30c8d2e41052796c5bdd9220d7e3daabccad Author: Michael Tuexen AuthorDate: 2024-02-06 21:47:16 +0000 Commit: Michael Tuexen CommitDate: 2024-02-06 21:47:16 +0000 vnic: fix compilation of an IPv6 only kernel MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/dev/vnic/nicvf_queues.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/vnic/nicvf_queues.c b/sys/dev/vnic/nicvf_queues.c index 6b6a36317f63..45d6b54b18ed 100644 --- a/sys/dev/vnic/nicvf_queues.c +++ b/sys/dev/vnic/nicvf_queues.c @@ -1749,10 +1749,15 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qentry, struct ether_vlan_header *eh; #ifdef INET struct ip *ip; +#endif +#if defined(INET6) || defined(INET) struct tcphdr *th; #endif +#ifdef INET + int iphlen; +#endif + int ehdrlen, poff, proto; uint16_t etype; - int ehdrlen, iphlen, poff, proto; nic = sq->nic; From nobody Tue Feb 6 22:14:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTyGQ47nHz5B4MK for ; Tue, 6 Feb 2024 22:14:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 4TTyGQ2Py2z4kjR for ; Tue, 6 Feb 2024 22:14:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-33b28aadb28so8768f8f.3 for ; Tue, 06 Feb 2024 14:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1707257677; x=1707862477; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nNysDbpyDM+nc96i5XcJ52VgsUY2jNl5VYl5anvGsu4=; b=2Z4ZA4nb0Uhbe9PIKmIB6+RB767jq8yXcb7RXSB/ZGbepe5ryhpF5NkWCUPB7e9Knb T9/1uizvVc1xMmRZDevLeIMn8WHNGhovKUvVKkVkivMJHJV5eIIPNVnUUzc17z1C3sri FT8kzk15qZs4c3j1M2MSUs64h+Z7WHH+nUdheh+G5JYFfm2W2A0kS3d+xXs6mJuC3kj4 IiGuP4NhP9ohUyjQAFJWQAPcbJ3pBn6S0llApfJMk5YVA7d07KkEJDZYg6w5xl/2Bsa1 8hduitpSjOwTNC+5TMvg0ZACmffL2QSJJOuXaFnXROfdSACqvMnfzKIiO+wIb586497P FLSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707257677; x=1707862477; 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=nNysDbpyDM+nc96i5XcJ52VgsUY2jNl5VYl5anvGsu4=; b=JszABlhxWPLG8bIcnI0FPv5d9/8p4eoYwj8yplakvT+WLeABwNE13a53X5oAc+GX4L n9etnlUIPRlNuNwYWTQHA17rAFpu7PlaNhXgRuYhDNG7XMKZcg98iXJJL6rl9yWmlTp5 r+OfIcjxWAMWSpV8K0dHy4cUxVBSDezFHXpmqEwLDaVfmEK2kFYmEuF/whEMOvwBeRof G4Xk4z/tx0ZNl0QR7cGl8WZeo3y31qbbu/8QE4t05HfLWazd04h2AQt98YPtoEm//aa1 /XB0AKTMKodsIof/OSDeYY3w1s1alG3r5ggxSNGE3wnlG6zc/aY14+N7qIYZNhpXTAw/ pDUQ== X-Gm-Message-State: AOJu0Yxos83iF1Os8tc8pdSKjAdZ/ZmU34PTBIvDB6BBpODHdsV/xurc wW/gYnoZHqBwkgOaQ3yTSs35+RJeqarA4hV1IiJoCLXy4wqWfSpXjN91biRHf0E4GYYLkGR2+2d kKgSQEK//yRSz3NKBJ/seNf5duySS0DLJ2w4lBQ== X-Google-Smtp-Source: AGHT+IHFDkL36qwDJliTtwaUXXj0kQEiX6nDhmMkPMHWRS43kxAtNqkAL9ZDUI7lhQVNuTUMRartNyfHxRMPdB8ldZ8= X-Received: by 2002:a5d:440b:0:b0:33a:eb5b:f8cd with SMTP id z11-20020a5d440b000000b0033aeb5bf8cdmr1785517wrq.7.1707257676689; Tue, 06 Feb 2024 14:14:36 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <72def5a9-ffcc-4dcc-9b85-875ba7f46539@FreeBSD.org> In-Reply-To: <72def5a9-ffcc-4dcc-9b85-875ba7f46539@FreeBSD.org> From: Warner Losh Date: Tue, 6 Feb 2024 15:14:24 -0700 Message-ID: Subject: Re: git: e4ab361e5394 - main - fix poweroff regression from 9cdf326b4f by delaying shutdown_halt To: Andriy Gapon Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000005c13d20610bde77f" X-Rspamd-Queue-Id: 4TTyGQ2Py2z4kjR X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --0000000000005c13d20610bde77f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 6, 2024 at 3:13=E2=80=AFAM Andriy Gapon wrote= : > On 06/02/2024 11:41, Andriy Gapon wrote: > > The branch main has been updated by avg: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3De4ab361e53945a6c3e9d68c5e5ffc11= de40a35f2 > > > > commit e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 > > Author: Andriy Gapon > > AuthorDate: 2024-02-06 08:55:13 +0000 > > Commit: Andriy Gapon > > CommitDate: 2024-02-06 08:55:13 +0000 > > > > fix poweroff regression from 9cdf326b4f by delaying shutdown_halt > > > > The regression affected ACPI-based systems without EFI poweroff > support > > (including VMs). > > > > The key reason for the regression is that I overlooked that > poweroff is > > requested by RB_POWEROFF | RB_HALT combination of flags. In my > opinion, > > that command is a bit bipolar, but since we've been doing that > forever, > > then so be it. Because of that flag combination, the order of > > shutdown_final handlers that check for either flag does matter. > > > > Some additional complexity comes from platform-specific > shutdown_final > > handlers that aim to handle multiple reboot options at once. E.g.= , > > acpi_shutdown_final handles both poweroff and reboot / reset. As > > explained in 9cdf326b4f, such a handler must run after > shutdown_panic to > > give it a chance. But as the change revealed, the handler must > also run > > before shutdown_halt, so that the system can actually power off > before > > entering the halt limbo. > > > > Previously, shutdown_panic and shutdown_halt had the same priority > which > > appears to be incompatible with handlers that can do both poweroff > and > > reset. > > I want to add that having many handlers with priorities expressed like > SHUTDOWN_PRI_LAST =C2=B1 N while some of those handlers have implicit > inter-dependencies (interactions, interference) also does not help to see > a > clear picture. > > Perhaps it would be better to handle all (reasonable) RB flag combination= s > centrally in kern_reboot and then dispatch events like shutdown_reset, > shutdown_poweroff, etc. Handlers for those events would have a single an= d > simple job of performing that one action (perhaps failing and letting > another > handler try). > > Also, I would split reboot howto into command and flag portions, so that > only > one command can be specified at a time. E.g., I would consider > RB_AUTOBOOT > ("RB_REBOOT"), RB_POWEROFF, RB_HALT to be distinct commands. Then, flags > like > RB_NOSYNC or RB_DUMP could be optional flags. > Part of the problem is that RB_AUTOBOOT's value is 0. And we're using bits to describe what to do (was the fashion in the late 80s/90s, bio used to have its commands as bits, not a bit field). You also didn't include RB_POWERCYCLE which is a new bit in this list. It's a mess. As an aside, some flags documented for reboot(2) do not seem to have much > to do > with reboot. E.g., RB_DFLTROOT affects how a system boots up, but not ho= w > the > system goes for a reboot. Not surprisingly, that option is not handled b= y > anything kicked off with reboot(2). > Maybe, it would make more sense if we had fast reboot support and the > running > kernel could instruct the next kernel directly. But, it's still a bit > weird > that flags like RB_POWEROFF and RB_DFLTROOT belong in the same domain and > can be > set together. > More like 'support again' since this interface is from 4BSD and hasn't been updated in a very long time. It made sense when you could tell the VAX's firmware details about the next reboot, but we don't really have that short of implementing kexec... Though to fix it we should maybe just have a number of handlers that are called at each stage, and we deal with only one bit at a time (POWERCYCLE > POWEROFF > HALT) and your drivers register a separate one for each... It would be a bit more rework in the tree, and there'd be a few more functions called, but it would be a minimal change. But it kinda feels like we should just bite the bullet and have 3 handlers for these cases. One to power cycle, one to power off and one to halt. Then the drivers wouldn't care which ones have priority, they'd just check a bit and do what they are told (or maybe we say that they only run when the bit is set to make that code simpler). And if one bit of hardware can do all three, they'd have to implement 3 handlers... Tha ambiguity would be gone and the ordering wouldn't matter. Warner --0000000000005c13d20610bde77f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Feb 6, 2024 at 3:13=E2=80=AFA= M Andriy Gapon <avg@freebsd.org&g= t; wrote:
On 06/= 02/2024 11:41, Andriy Gapon wrote:
> The branch main has been updated by avg:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3De4ab361e53945a6c3e9d68c5e5ffc11de40a35f2<= /a>
>
> commit e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2
> Author:=C2=A0 =C2=A0 =C2=A0Andriy Gapon <avg@FreeBSD.org>
> AuthorDate: 2024-02-06 08:55:13 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Andriy Gapon <avg@FreeBSD.org>
> CommitDate: 2024-02-06 08:55:13 +0000
>
>=C2=A0 =C2=A0 =C2=A0 fix poweroff regression from 9cdf326b4f by delayin= g shutdown_halt
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 The regression affected ACPI-based systems without= EFI poweroff support
>=C2=A0 =C2=A0 =C2=A0 (including VMs).
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 The key reason for the regression is that I overlo= oked that poweroff is
>=C2=A0 =C2=A0 =C2=A0 requested by RB_POWEROFF | RB_HALT combination of = flags.=C2=A0 In my opinion,
>=C2=A0 =C2=A0 =C2=A0 that command is a bit bipolar, but since we've= been doing that forever,
>=C2=A0 =C2=A0 =C2=A0 then so be it.=C2=A0 Because of that flag combinat= ion, the order of
>=C2=A0 =C2=A0 =C2=A0 shutdown_final handlers that check for either flag= does matter.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Some additional complexity comes from platform-spe= cific shutdown_final
>=C2=A0 =C2=A0 =C2=A0 handlers that aim to handle multiple reboot option= s at once.=C2=A0 E.g.,
>=C2=A0 =C2=A0 =C2=A0 acpi_shutdown_final handles both poweroff and rebo= ot / reset.=C2=A0 As
>=C2=A0 =C2=A0 =C2=A0 explained in 9cdf326b4f, such a handler must run a= fter shutdown_panic to
>=C2=A0 =C2=A0 =C2=A0 give it a chance.=C2=A0 But as the change revealed= , the handler must also run
>=C2=A0 =C2=A0 =C2=A0 before shutdown_halt, so that the system can actua= lly power off before
>=C2=A0 =C2=A0 =C2=A0 entering the halt limbo.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Previously, shutdown_panic and shutdown_halt had t= he same priority which
>=C2=A0 =C2=A0 =C2=A0 appears to be incompatible with handlers that can = do both poweroff and
>=C2=A0 =C2=A0 =C2=A0 reset.

I want to add that having many handlers with priorities expressed like
SHUTDOWN_PRI_LAST =C2=B1 N while some of those handlers have implicit
inter-dependencies (interactions, interference) also does not help to see a=
clear picture.

Perhaps it would be better to handle all (reasonable) RB flag combinations =
centrally in kern_reboot and then dispatch events like shutdown_reset,
shutdown_poweroff, etc.=C2=A0 Handlers for those events would have a single= and
simple job of performing that one action (perhaps failing and letting anoth= er
handler try).

Also, I would split reboot howto into command and flag portions, so that on= ly
one command can be specified at a time.=C2=A0 E.g., I would consider RB_AUT= OBOOT
("RB_REBOOT"), RB_POWEROFF, RB_HALT to be distinct commands.=C2= =A0 Then, flags like
RB_NOSYNC or RB_DUMP could be optional flags.
is a new bit in this list.

It'= s a mess.

As an aside, some flags documented for reboot(2) do not seem to have much t= o do
with reboot.=C2=A0 E.g., RB_DFLTROOT affects how a system boots up, but not= how the
system goes for a reboot.=C2=A0 Not surprisingly, that option is not handle= d by
anything kicked off with reboot(2).
Maybe, it would make more sense if we had fast reboot support and the runni= ng
kernel could instruct the next kernel directly.=C2=A0 But, it's still a= bit weird
that flags like RB_POWEROFF and RB_DFLTROOT belong in the same domain and c= an be
set together.

More like 'support ag= ain' since this interface is from 4BSD and hasn't been updated
in a very long time. It made sense when you could tell the VAX's = firmware details about
the next reboot, but we don't really h= ave that short of implementing kexec...

Though= to fix it we should maybe just have a number of handlers that are called
at each stage, and we deal with only one bit at a time (POWERCYCLE= > POWEROFF > HALT)
and your drivers register a separate on= e for each...=C2=A0 It would be a bit more rework
in the tree, an= d there'd be a few more functions called, but it would be a minimal cha= nge.

But it kinda feels like we should just bite t= he bullet and have 3 handlers for these cases.
One to power cycle= , one to power off and one to halt. Then the drivers wouldn't care whic= h ones
have priority, they'd just check a bit and do what the= y are told=C2=A0 (or maybe we say that they
only run when the bit= is set to make that code simpler). And if one bit of hardware can do
=
all three, they'd have to implement 3 handlers... Tha ambiguity wo= uld be gone and the ordering
wouldn't matter.

<= /div>
Warner
--0000000000005c13d20610bde77f-- From nobody Tue Feb 6 22:23:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTySW4zmWz5B5Bl; Tue, 6 Feb 2024 22:23: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 4TTySW4C1dz4ltC; Tue, 6 Feb 2024 22:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707258203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXDc/0I86qdmJmorOY1RH+Zgnfd8B5+z08sbzBzrDqw=; b=IfaWTPROGoS4MORehDJ+KOvvRXFlAuI42fwSU+O8AO61MyiJjKEGQhtiRTiT7oT0N163wV bdpLDPypF+pE6G+tbBaOOx6kRlKEZj3FlYSpLU9aZVCDwawFZFMo4mpMEtYevI9x+Daf/9 LziqzjR8Qio+mMmrIR6IFDlrIdzQaLYqYkF7vxEnQL4EntGJjpkbv44FcaTcF7qTbCPF1z gyfT903FkFJpteXUseJ6obHbmktq59o5OVB5ArZARzrii+SObgmBrNRxehmy7nBCubt0X/ Bpg0oUtlMkRvw5/+gPj61jDxI+GY8AGg+oxLHrsWeyD3zZ6giNkRJhJc2mmFSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707258203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXDc/0I86qdmJmorOY1RH+Zgnfd8B5+z08sbzBzrDqw=; b=lx3exurmB0AKtemgMonxfX+/6BWn2UYyla4AfH4OK7BUpcL1jRK2YBXPwb9DaLYyDomKWD qx7xwaHbl+hZFmBNVmjmhhUD8vWQfClVXgDyXrdytAjYS2UXt74LN3gqkfphM9KBtdV9vN ghW4R6B9LC6Ja5gbNPSweJMDBoP5I+Brt3ICSxDykqZnvY0NwTXCzxSS+SFwctGZYPXsZw QhVcBno2ID75ks8s+Pwj9CpM+JN95AEjJMk6qImfdfRJMj6qHhn/v1r8xopC4n7J9Jbc8A OMqUkii0F8qJchyh39m63hgs+otlmvLrzRNeCQinz+yEp5hk073KqLkD+lNjbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707258203; a=rsa-sha256; cv=none; b=GdG6zEr4apikCMkp4ZcEGBDNv2kUWE1sVZeFeC3hqr2HhOVgc1gR6h7pMKgLJZ91LUVGgz GSM1CYoHTN1RPXQWPoMGIELXCG/o1h0hbBfnYFoAD8rEnTEbBFkOvkf97IsWdYtZnseUUL Yx80hDX8fzKjAPjcEYYaaYLerjPkwGOFke10D3O1y4zjlmVS1uKHFrijlyKSelTsQXMRCP bhgNuWpCdtSJiEIkFgw0n2eZvJQPDngZlg+8DnSs+frSQVWxVrVuruaYtKxBBUSrW5EQw3 G7Z8dhgkMjHtB3Kb6lZwAJUfdxoLUZy3ewKUI/X/O/LyM/MeMlfkyVzUEUGN6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTySW3FWnzhls; Tue, 6 Feb 2024 22:23: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 416MNNlT071303; Tue, 6 Feb 2024 22:23:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416MNNMZ071300; Tue, 6 Feb 2024 22:23:23 GMT (envelope-from git) Date: Tue, 6 Feb 2024 22:23:23 GMT Message-Id: <202402062223.416MNNMZ071300@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: 9d2c93c24996 - main - ddb: Remove useless includes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d2c93c249962364d599852f00c161870b28f33d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9d2c93c249962364d599852f00c161870b28f33d commit 9d2c93c249962364d599852f00c161870b28f33d Author: Warner Losh AuthorDate: 2024-02-06 22:20:02 +0000 Commit: Warner Losh CommitDate: 2024-02-06 22:22:01 +0000 ddb: Remove useless includes systm.h was included for boothowto here, but it's not used here, so drop this include. Also sys/cdefs.h isn't needed, drop it too. Sponsored by: Netflix --- sys/arm/arm/db_interface.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/arm/arm/db_interface.c b/sys/arm/arm/db_interface.c index 8aad6a42316e..a3e242c305c1 100644 --- a/sys/arm/arm/db_interface.c +++ b/sys/arm/arm/db_interface.c @@ -34,14 +34,12 @@ * Interface to new debugger. */ -#include #include "opt_ddb.h" #include #include #include #include -#include /* just for boothowto */ #include #ifdef KDB #include From nobody Tue Feb 6 22:51:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTz4S6wtjz5B7Hc; Tue, 6 Feb 2024 22:51: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 4TTz4S5gwWz4nJK; Tue, 6 Feb 2024 22: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=1707259864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zYsebTNsyB5y9oo/kBN45cpuUa4EJDJaODDm8ObFS2w=; b=a+K4Jdn4uYAUuDhKyNoC8S8lofQqLQtT9vn06TGZ0t17VBrL9DkSNnCQMzSzEm0kjJZqwe YmpvkVartSFBU9P9qr1tN1iRLhUmtTzVuEieSHHwuH4/UBuWLGJzgL56kFU8Pxb/bSJwbD EcHH2WTCGVkNZWIjOo7Aqe9kOWRCo47VMe190Li22wi4sVggx5M26WPyy8RSqHBIhFmDaR WCZsy14FcJtEpgox4L+ZCVm7ckHOTlOsRJKMf/2Oq2Ou/YeqnpEcCEYTIv1VBospniixRA i+buV19v1y3jEw0TeP/cTNS3rHUsrLMyD4jJ/P/HHSR7p3OpeePuhbcw4jyTJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707259864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zYsebTNsyB5y9oo/kBN45cpuUa4EJDJaODDm8ObFS2w=; b=TjiAJovLt7COWr41J+hmQbTFnvBMF+ok7f/cmZObkG47xVEpNEsTmxiE/eJ8tDqr8+EzUq voiNXUSfMaRTsVe9CTP+qoYp0ys5QrCcs+YH0kMXMaZ/MJBR0quDoOnHL0kljq+fan5dDi pJVamTrVqsg0vubW5mLTtLxAq1KUTIK05dujU8yezZUwUbD15d8MXpW9wlY7ANoNzIkB5A gWGcZGNIfkunhHbKPY7drJAn9B67hMjfl0Ea2By6tJDRlxQCBcwMsa8HsVUuGsMPpro4k7 Tjg4lAMFd3svc++cQOV4I3eQfe3gTcPexsnilrdBQMEyjVHBbRbFSBJkZeb6WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707259864; a=rsa-sha256; cv=none; b=u6aJU+BBY6tWtzrcoheWxRsDR9yZqtR5f1y7LUwL6/QNi4/YrE0CP5aXkmw4LwEDXWzRFj ISu1vU2eToHyTLZzP8AGZajDDFzgHfEjVc2EjXmTOMEbSfI2UaxhDVYzOiOQBlsVNMgu8E MglLhsWfvJ/HZ8bmUk+8EwV/alQo+w46onGP8Xxrq4vn/dfgkOBMIWOUBoS64KxAa5HVEq KNYV6+6l0TF+545hXOW+YfIHV47iR8TaSsU1roEtcp5skjVXC37vmaxkHemgo6YV6afZ89 cUqu4egGhr7n4J2OKjXU0Fk5J31SOV39sx7InyUuCsCci6i1GefrALh8lpailA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTz4S4kGQzhsY; Tue, 6 Feb 2024 22: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 416Mp48J014452; Tue, 6 Feb 2024 22: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 416Mp4t1014449; Tue, 6 Feb 2024 22:51:04 GMT (envelope-from git) Date: Tue, 6 Feb 2024 22:51:04 GMT Message-Id: <202402062251.416Mp4t1014449@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: fc2b8ee6da64 - main - arm: Catchup to atmel retirement List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc2b8ee6da64ff6fe6ccc848df941699499f4a65 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc2b8ee6da64ff6fe6ccc848df941699499f4a65 commit fc2b8ee6da64ff6fe6ccc848df941699499f4a65 Author: Warner Losh AuthorDate: 2024-02-06 22:26:17 +0000 Commit: Warner Losh CommitDate: 2024-02-06 22:26:17 +0000 arm: Catchup to atmel retirement AT91 boot2 loaders have been long gone, and don't support the AT91 parts that have armv7 cores (since we don't have specific support for that). Mentioning its interface is OBE, so remove it. Sponsored by: Netflix --- sys/arm/arm/locore-v6.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/arm/arm/locore-v6.S b/sys/arm/arm/locore-v6.S index 4e356d6b34e2..ce2bf678b648 100644 --- a/sys/arm/arm/locore-v6.S +++ b/sys/arm/arm/locore-v6.S @@ -92,13 +92,12 @@ /* * On entry for FreeBSD boot ABI: - * r0 - metadata pointer or 0 (boothowto on AT91's boot2) + * r0 - metadata pointer or 0 * r1 - if (r0 == 0) then metadata pointer * On entry for Linux boot ABI: * r0 - 0 * r1 - machine type (passed as arg2 to initarm) * r2 - Pointer to a tagged list or dtb image (phys addr) (passed as arg1 initarm) - * * For both types of boot we gather up the args, put them in a struct arm_boot_params * structure and pass that to initarm. */ From nobody Tue Feb 6 22:51:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTz4V0qrFz5B7Bx; Tue, 6 Feb 2024 22: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 4TTz4T6tWvz4n8L; Tue, 6 Feb 2024 22:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707259866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fo2zmxtfGn5TEXVNTSo7z1zy2bXrrJMu8LiJtU5sOvg=; b=E7OKa5Hq4Z8UJroStiI/2rbHCiP+qxfsknA6P1N07xDzXEnPVISu+oKfveZ+X7fhX3lfOA KUBROTmGNUJYzPA3AumPKjHojm7sduQLyPr3LKRpevhRxSxYN6VxPD2HJv57H23MYq8J+j BKSRPWHOgaj7Q6R6geENq1Nx4C+FWRbQYD+eOFUonU/kjOGQM1BSZj7Y7UouEQTjGtEirH JztzvUde+LJeJQ/X2wpq5PfWPHSQCXCEkogdJLL0FZZoTVdv8BpMcwyKZ5muOAmDEtwXFF 2EYvdCXKBsXHNtckwKGb8niaycJAtUxVGN35INpLEXF2Q9qLRy+WUCgcn7wnIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707259866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fo2zmxtfGn5TEXVNTSo7z1zy2bXrrJMu8LiJtU5sOvg=; b=wik927MEoEzs/d3rs2rl0EvKoJ+ibSvbchkenOGeJnPSe9qYOj998UHijBFPfM3xy7ebcf hqAbYFgdkh7LiG3MSeF8ZZJEZfRqpyru0UcS3n4SCxG9foP5gAqFXlSG9zzr+z8HWBQL3y 8XmSQL6PWrkly8cKsEYpK7M9ZaX7ZMxkxY+onq+A7PfvW+fgAWYjswP7Ew9zut3+GB6fs2 /4sta63BELPE48CCTahU5IIMDJZeBV3Xv8VvYb/1kTmMS5dHycekcLd44A4GORe8yGtbja 1OxanThlIw8WDcKtGUz72g/5xFzSUHhXm6KEwS1UrQax1nhSbdy0f/YyiD/0lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707259866; a=rsa-sha256; cv=none; b=QZ03pUT7sJLIIEc70xZzF21JYUqtjl43tx7RMcH0rVBLnlehw4Qaai2hXCObODnFR5gBTs 36h2w5vBGZoJgMqvkTz5sWb/tpMF0ZingEvxo0y8epF6otiKT8itPd2bpuhwx+kmp82r6v epSR3GAAELoupQ5E0ljABJNY+jzPq24hZwgwujw/zIqSLSUK4HCPy60Uo7pvrzb4CZEFt/ /eKHizu1ayxXO0F2r8JAhWcdL+YQMLJtOHGlpJDSVuAxki5W22xHw6xgJHo2dvZhV88l9e 3gQuIn0AeiI5KIPDz/ivESwU+cozBiAjJHX5Vib+Klbqf4sNEgeWP2SIYbv0+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 4TTz4T5ggGzjTl; Tue, 6 Feb 2024 22: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 416Mp5Oo014503; Tue, 6 Feb 2024 22: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 416Mp5To014500; Tue, 6 Feb 2024 22:51:05 GMT (envelope-from git) Date: Tue, 6 Feb 2024 22:51:05 GMT Message-Id: <202402062251.416Mp5To014500@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: 6949ce0486ba - main - arm: Use locore-v6.S directly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6949ce0486baa2cb602a1d8cb7cfb390639f31e8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6949ce0486baa2cb602a1d8cb7cfb390639f31e8 commit 6949ce0486baa2cb602a1d8cb7cfb390639f31e8 Author: Warner Losh AuthorDate: 2024-02-06 22:42:03 +0000 Commit: Warner Losh CommitDate: 2024-02-06 22:42:03 +0000 arm: Use locore-v6.S directly Use locore-v6.S directly, rather than indirectly via including locore.S. This loses acle-compat.h inclusion, but that's only needed for gcc 4.8 and earlier. Since we don't support anything that old, there's no need for it here. Sponsored by: Netflix --- sys/arm/arm/locore.S | 35 ----------------------------------- sys/conf/files.arm | 2 +- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S deleted file mode 100644 index bbca07f65ef3..000000000000 --- a/sys/arm/arm/locore.S +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * Copyright (c) 2014 Ian Lepore - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * The kernel build machinery wants the file containing the entry point to be - * named locore.S, but we want separate files for v4 and v6 builds, so just - * include the arch-appropriate file from this properly-named file. - */ - -#include - -#include "locore-v6.S" diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 28e80016d97b..3526a14a50b7 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -37,7 +37,7 @@ arm/arm/identcpu-v6.c standard arm/arm/in_cksum_arm.S optional inet | inet6 arm/arm/in_cksum_machdep.c optional inet | inet6 kern/subr_intr.c standard -arm/arm/locore.S standard no-obj +arm/arm/locore-v6.S standard no-obj arm/arm/hypervisor-stub.S standard arm/arm/machdep.c standard arm/arm/machdep_boot.c standard From nobody Tue Feb 6 22:51:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTz4W2m9Gz5B7Dr; Tue, 6 Feb 2024 22: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 4TTz4W0CzCz4nKQ; Tue, 6 Feb 2024 22: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=1707259867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f8hHIayz7BQ8mCqkKmtWGUxCv1N2xviP6FCA0Itqd/c=; b=UWUQQRKkYhgvENTnN+Cr2s49WvCECjHzGUW9Jkfcv3XxggTnu91Bv4KpL0/+oZU7z9PyQn bgdkuxtY3YgSSeRLrVxqz6Hph0+hUVuapyuXeZOAOJ3Z8OB6KsOK2gnQGVQEBaxAB0bH3v jUsI4F83kLkwisRHDNMllQocjnOxjRBXf0thNtvg/9HEjYelt5QA/2AXS6qxRAMseNKr0B 4L2RIkbNWi2clFm8XQHPBodGCuw434N2ZtiSxue8HOy8zmf9majUkXW+uJ2LMjLUbCy4/w Vszni9EB6dvgdI71xSqym1RAo3t1fWG4P+z1P2ompOxnby6+PhBvW2EM6jPE6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707259867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f8hHIayz7BQ8mCqkKmtWGUxCv1N2xviP6FCA0Itqd/c=; b=g7PLZts7VgtpZM3efC99+ggNnlsQcyXQaE2/SNR/ZVY0Trr+GVK18MLSTBuxgerCgGqqTX xIsaAK+BoAbppqpP9nieFm/1StitpEB9VALtv9kT5AV0PnF7PkkQfIAZoHNM60WBm3ocua i9BGK0/kHNuc8i0uUTxsob63Kdst9EwQrToi9vNgVrCSafp1bX2b6rDjDYVyqLUjfsPafN PQWAYm9JnqDMJsubX9KIA7M0OTJRxZSO5dAcDUR4KXCUGKpYOWHCjQaG95ZRrrSSWKJ6Ft 8Kq69GLi1/8EZ/FF9ea9TRFXkP3wMElotvTJqDEtW7u6LBWwEVvYTHTB0bcnTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707259867; a=rsa-sha256; cv=none; b=jcemV+YJ8YyzWE6zMdJZBa4ZNJrqMuI0CxQ0DvvgVjjLJGcaBdVEtr9x7gMm7gDpQ6Ve/W dAd7dwLuevpDr+8JfAPSsGvDP0n4Twv+piPF1EKoGPL23SoevNltZUmNguvYO0Cg5nV9gf 1UnnV6/Tc+5T0ZaHyRqgk8P5bYaGD0IYOWLFYnnxDbMkNn4y1NZEHHa4iuJ/7DiJ4aYFJr FhNvtoakYFM5obJN6zXBpHjXoU4Vrklvg8uPjW9fZwrrioq5gx841mi/8mjl1j07huBX6K ZAvT+b5M3AwtSf9X+VL/dQ2jZuSZDvb43a4ancQ/y1w33/SidhEMjQ6KUBCYJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTz4V6Q4gzjKq; Tue, 6 Feb 2024 22:51: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 416Mp6E9014547; Tue, 6 Feb 2024 22: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 416Mp64Y014544; Tue, 6 Feb 2024 22:51:06 GMT (envelope-from git) Date: Tue, 6 Feb 2024 22:51:06 GMT Message-Id: <202402062251.416Mp64Y014544@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: 472f84817dab - main - arm: Move locore-v6.S to locore.S List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 472f84817dabacf8df43bc8ed783b714586de6a1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=472f84817dabacf8df43bc8ed783b714586de6a1 commit 472f84817dabacf8df43bc8ed783b714586de6a1 Author: Warner Losh AuthorDate: 2024-02-06 22:46:06 +0000 Commit: Warner Losh CommitDate: 2024-02-06 22:49:08 +0000 arm: Move locore-v6.S to locore.S As a separate commit, now move locore-v6.S to locore.S. This makes git annotate work, at least back to 2014 when Ian created locore-v6.S. svn didn't save enough metadata for the converter to allow it to go back further. Sponsored by: Netflix --- sys/arm/arm/{locore-v6.S => locore.S} | 0 sys/conf/files.arm | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/arm/locore-v6.S b/sys/arm/arm/locore.S similarity index 100% rename from sys/arm/arm/locore-v6.S rename to sys/arm/arm/locore.S diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 3526a14a50b7..28e80016d97b 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -37,7 +37,7 @@ arm/arm/identcpu-v6.c standard arm/arm/in_cksum_arm.S optional inet | inet6 arm/arm/in_cksum_machdep.c optional inet | inet6 kern/subr_intr.c standard -arm/arm/locore-v6.S standard no-obj +arm/arm/locore.S standard no-obj arm/arm/hypervisor-stub.S standard arm/arm/machdep.c standard arm/arm/machdep_boot.c standard From nobody Tue Feb 6 23:14:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTzbd02ZSz5B9F0; Tue, 6 Feb 2024 23:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTzbc6T1Vz4sHb; Tue, 6 Feb 2024 23:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707261276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0YimMFL1K2m8X8G6SY1n804MdU/ftJR3j8ZbGWKY4c=; b=KqYIpC6hcv5wfZcyQsN2ZqCmRUs8sC8ZbMpp4ln/Mkzu5Nv2KIBUMI9U1Z6RmnDETnnWYv rHACBMwqilURzAJGAnMCLfZM63jrrFCjhlwr2p5iVLeUvKqytux7ZY1U/LyXrKL0iQjJIK Z6EtORP+tweirOd/MrtzJCxnDeK6qO8ByLsjSZ8gnputmnVNFETgvD0RASHhEPkajRxXqB 5bwkQd0OzMfkEmQ5UN/tNNOevt4NzmCPrRszTAEKrqb0csfm2xUYSq0CNcP54Eeugop+tL sL3rT197xQyyUfIwRxiqPhYqOo7ysnkHz+D2P3zofo6QgtoxbRMY3R/6Rp3e6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707261276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0YimMFL1K2m8X8G6SY1n804MdU/ftJR3j8ZbGWKY4c=; b=oLGXj5xk2E577QhGzCn0AeUdWqZNVepirXXI7+zBNZBiFL8d9Zw6/L2P74tMvIoqXhSeXA tV0bmzAQyuLQzv0Z0pqoCc95XfTJBSIxrk3DycsmG3sFFV/ti2kePwCeWqkRPX7qvvMSt6 cLZYgSDnjO9oLpyIjGBlfgD8blMUUDIEgqiEd6CbhRdlySHBLB3SAMHI/1B6PHf0mONBc5 rkVVWwCNpq77kGHYYz0xxzl11yPeDpI1C6esb8P45P8kJtJGuv8aPbCXfb9lpQSgfJHrZc iO1xoAD1egfZ4H3F6DeG0E0dH2iJZcJrKq+HL7ILpyCebQhvC3HFrKXJxZM55w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707261276; a=rsa-sha256; cv=none; b=l1ww3P998/i9WvGNa3ot2igSgUrbGz3rUrcL0Ba6TXxDIbTqaaDVUe/TkFnIsmVROVp6Hw G8VlYtC6+Bx4GhyB6EL8MittRlUTG1sR+US29dWVrP1Vihnshk5IHsoWRT2WV/c9oZDJ7x FFnzwUGboYam3h1B6e7FilXDrtz9KzZOEHtEZMIhY0qZIKq+G08cAb5wjeUFuE7lXoyrtf G3Pnnu6HB7sfWTP7ZCk1alZeOPXwpsarI7fhghSHO8i9jnP6pK8zKpSDoKvp/WJckcDIqZ IUgV5UpiktqjM+Jh72qWccgQOjl8NIbWd1Ytipa6LItD02hX963sfT4ChRGMpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TTzbc5WsSzjct; Tue, 6 Feb 2024 23:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 416NEa7h056115; Tue, 6 Feb 2024 23:14:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416NEaL9056112; Tue, 6 Feb 2024 23:14:36 GMT (envelope-from git) Date: Tue, 6 Feb 2024 23:14:36 GMT Message-Id: <202402062314.416NEaL9056112@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: 11da791920ba - main - leapseconds: Update to the canonical place. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11da791920ba285f0832f09cb504ac81e35ff8d1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=11da791920ba285f0832f09cb504ac81e35ff8d1 commit 11da791920ba285f0832f09cb504ac81e35ff8d1 Author: Warner Losh AuthorDate: 2024-02-06 23:11:38 +0000 Commit: Warner Losh CommitDate: 2024-02-06 23:12:59 +0000 leapseconds: Update to the canonical place. IERS is the source of truth for leap seconds. Their leapsecond file is updated most quickly and is always right (unlike the IANA one which often lags). IERS operates this public service for the express purpose of random people downloading it. Their terms of service are compatible with open source (we could include this in our release). Rather than fighting with questions around this because the IANA one changed locations or the auto update script broken, just use this. This is in preference to the NIST ftp copy. NIST is in the process of retiring their FTP services. Sponsored by: Netflix Reviewed by: philip, delphij, cy Differential Revision: https://reviews.freebsd.org/D43752 --- libexec/rc/rc.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 145e0b70ca3b..20f0a6375a9e 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -423,8 +423,8 @@ ntpd_flags="" # Additional flags to ntpd ntp_src_leapfile="/etc/ntp/leap-seconds" # Initial source for ntpd leapfile ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" - # Working copy (updated weekly) leapfile -ntp_leapfile_sources="https://data.iana.org/time-zones/tzdb/leap-seconds.list" + # Canonical place to get the leap seconds from +ntp_leapfile_sources="https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list" # Source from which to fetch leapfile ntp_leapfile_fetch_opts="-mq" # Options to use for ntp leapfile fetch, # e.g. --no-verify-peer From nobody Wed Feb 7 00:47:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TV1fR4vVJz58KCL; Wed, 7 Feb 2024 00:47: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 4TV1fR3HWkz45Ln; Wed, 7 Feb 2024 00:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707266831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CjofZEQUu/V7Vc7meFJgIlI+A29Ul3cFOJZEN0GZO0Y=; b=yKEPHDHdBQggij6KBoGqph2k81MAbFJTgX0lLgPJiV5/U6Uh6TL3tdRbDJSufXr9TAauOs feU/TCvH56LPg5qcn8DlucTpImwXCsIwHxJnRae+uRb7W/BWOnEsE/Ze2eKp+5UXKssZkN uZqQ5I0lOXUMi9Ghe4r4kz6zlXdTvxeuQlGCm6pilY4lUXhXyMkoPlTO09BA0c2vVOmGma Mcgt+87c56HX7je6j7Ahdr0ggDMyEtJP2ug2Ur1zW1kT0qWaOl/83zgLTQlN+G8Ec+kaE7 TQqUtHhSVsbmBRUwL1ukELbyr7RBkUlclJClmgp4Pt/C8SgtIJDbR7doboa/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707266831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CjofZEQUu/V7Vc7meFJgIlI+A29Ul3cFOJZEN0GZO0Y=; b=AiNjr17GRiz2HNjb3iMLFZbWYsTLQysb0LSbfBqV0T2ah+49a+3gnvTaURg+Ltds5IaJpZ xnRjOd0eRm5lVM3T6wSqL7bJwlSDkLOQGmhbi+bFGgiG/XaCzOmWXFDWV3SMpjuEa+zJYj Y1YRy6iItHAhz43rsHQkMngIGwRULE95DQgW7OtYN8EN859xqx8JRsrlM1GMy3R09XhIdd jXWJZP6m6WHMyVKm/zAKR9LLc8K4KnLJiLbmEuO0M8Y8388WqDY0WadlsgseWmDhtupFlK K1plrs1Nv6mppertqqxro4zUpMOl5vflsrA+gPLP5VBG8ND/4wdQTCuZXsxPug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707266831; a=rsa-sha256; cv=none; b=vW9+eupGx7AYv/jpj0QqJO2SzDpkgBUeCrjaYLUsJzRupiRM3Yj36irt7h18EqYvHvTg5S Tuf/v/3SniTONMEtPdXSXeG3LkEuK05KFwmWGj7ay/PBhikZ6qPm5IVSSaXkduvIm0ls6y E8D/ddg/Vrtc9TQpoULTertjJL33O5tC5HASXRsiIfc45lQH5+D7zt52+DR54Q8frYU49x YiYD5/Oiwxvr/1/dhgJOykP3MP1kQZ0gzmjq6Mjp1jERi0WEUIAcTGurTwe9ablyc/Y9Jl 3hahb8zSLjki8lN18GGxooXdMIn4NW3vx3KNI7z0BCQKeD2i1z++IXD+LxZTXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TV1fR2KwZzlgs; Wed, 7 Feb 2024 00:47: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 4170lBBd007119; Wed, 7 Feb 2024 00:47:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4170lBWE007116; Wed, 7 Feb 2024 00:47:11 GMT (envelope-from git) Date: Wed, 7 Feb 2024 00:47:11 GMT Message-Id: <202402070047.4170lBWE007116@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: 11f9745c5bab - main - libsys: fix powerpcspe build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11f9745c5bab98165238882f0dde1058bf42b3aa Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=11f9745c5bab98165238882f0dde1058bf42b3aa commit 11f9745c5bab98165238882f0dde1058bf42b3aa Author: Brooks Davis AuthorDate: 2024-02-07 00:46:33 +0000 Commit: Brooks Davis CommitDate: 2024-02-07 00:47:03 +0000 libsys: fix powerpcspe build Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43771 --- lib/libsys/powerpcspe/Makefile.sys | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsys/powerpcspe/Makefile.sys b/lib/libsys/powerpcspe/Makefile.sys index 3862699ae8b2..3ab87bf3ded8 100644 --- a/lib/libsys/powerpcspe/Makefile.sys +++ b/lib/libsys/powerpcspe/Makefile.sys @@ -1,7 +1,7 @@ CFLAGS+= -I${LIBC_SRCTOP}/powerpc CFLAGS+= -I${LIBSYS_SRCTOP}/powerpc -SYM_MAPS+= ${LIBSYS_SRCTOP}/powerpc/Symbol.map +SYM_MAPS+= ${LIBSYS_SRCTOP}/powerpc/Symbol.sys.map .PATH: ${LIBSYS_SRCTOP}/powerpc .include "${LIBSYS_SRCTOP}/powerpc/Makefile.sys" From nobody Wed Feb 7 00:47:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TV1fS6FDQz58KCQ; Wed, 7 Feb 2024 00:47: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 4TV1fS4DGcz45Cb; Wed, 7 Feb 2024 00:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707266832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kg+J1e3Axca5ZcRpa2Fv1kO1sbBRQ5J17vXzb7udc/I=; b=Ua+IgzTZghO9QD956hlDqY0JBjX6LhPjGr77UpJb/gRQ0a9u48yXG/U02xhX/pSVYTaCxX e4uua0zoahIm9qoBlUt/AhQd9qg+dkRdxoowQA4EumESkwbT+m3H2UkJglQw/ufRETYrO5 bNw6GQOxXH08i7tWOnJ5lbDj+/slPip0mYAHYmrbvX2kfDAL29/TC6mTRKkuSiilj95n80 mTxDg4NdZ1F/vWXr6WALuB8H8yhNjZoS0eGKv7HWoaG6aKpiUnb7HvIvF88GgCPgsRd8qT q8DD5M+Tghc43ZptBjuF3wDLt8l3e6Iwci+tWTleo+TN/L1kne6fuwcOG0S3HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707266832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kg+J1e3Axca5ZcRpa2Fv1kO1sbBRQ5J17vXzb7udc/I=; b=RJM0hXT457Jvqtu3gngjkYY/zIrJxO3urDpAKEt7DLslRwAGNKvoTDSP7o0R8FDPIn9JZq QmqWPHD2AcAKXEzSgzRAGCvx7RxwbzO77PEUoqvicrvjsZq2t1/472e0IOzEPE7wQ6f8mt G1Q0sFViMzmAr8BTJ7dbRY77KQ9wfJVa/u1gDafIg7for1++TePjNT56uUJsBQqBWqJog6 EZ+wBq2DtgpsLhg/rWSfJfeSuQrD8iiSFrLvBpONiiUzWBUrvlF7Ih8U95JNJubji5AElo hRgbH4OKRiTYhfe1e9nDcMyLlLiIJfrb1qbnT97cDX3LCY4nMH0nBVTovnvPJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707266832; a=rsa-sha256; cv=none; b=M39aVX/QPBNCYKpWGdAbhdF96XIwRSOgwy8/os/Gu1xfrS4A1uFmiomUCA7peX9PMIMzPA /M6+7D2r3JvfkYsbRGZ7xsILlSZdsgp55op3TmHjvUY9PQ8LyWUKs503A1uhScbIWfdmf4 1xdhQmU+cxep/CGRg7rlZpCh5hh0PKQHJ47BQsZDxqc63NBpEEAuubeAWfxd6e8fUyEUtO 8cnDJdvVJgvcFs9DWCYyXhX3CcZXOwq3c6lVrQlfhY/gPod9rqR+6nB4yAH+2fDlLWfFZO rfXNTMvMd+WsdLxZPfsDf+SFIHSPiMuX3cEP8OPobMBZr1WjwGLHC15vZybegg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TV1fS3HDMzld9; Wed, 7 Feb 2024 00:47: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 4170lCS3007160; Wed, 7 Feb 2024 00:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4170lC3i007157; Wed, 7 Feb 2024 00:47:12 GMT (envelope-from git) Date: Wed, 7 Feb 2024 00:47:12 GMT Message-Id: <202402070047.4170lC3i007157@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: 57ddfad884a0 - main - lib/libc: version auxiliary libsys.so List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57ddfad884a0c490e462b78634f2582e6b07dc9a Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=57ddfad884a0c490e462b78634f2582e6b07dc9a commit 57ddfad884a0c490e462b78634f2582e6b07dc9a Author: Brooks Davis AuthorDate: 2024-02-07 00:46:38 +0000 Commit: Brooks Davis CommitDate: 2024-02-07 00:47:04 +0000 lib/libc: version auxiliary libsys.so We need to use libsys.so.7 so that we can work without /usr and because we're bound a specific ABI. Reported by: jtrc27, kib Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43772 --- lib/libc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 7c728ffe6443..41cf0f6de72a 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -64,7 +64,7 @@ LDFLAGS+= -nodefaultlibs LIBADD+= compiler_rt LIBADD+= sys -LDFLAGS+=-Wl,--auxiliary,libsys.so +LDFLAGS+=-Wl,--auxiliary,libsys.so.7 .if ${MK_SSP} != "no" && \ (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") From nobody Wed Feb 7 02:04:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TV3My4HyRz58S6Z; Wed, 7 Feb 2024 02:04: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 4TV3My3mwTz4DVs; Wed, 7 Feb 2024 02:04:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707271486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kKlJtHtFC9vNzkvr8ILxsJgv1Uw/9vjFVGSjHuX/iGU=; b=QS7oTd1KA/UwUXIkep9KmlcDLZVsyPF5exEEpSrNVSp+QKe2tKGGAwYghhHDFWi8egoEGQ 9Q1hhhjZZpBJTBH2AQhWU13TVfwATG4vkzSh7rr5sSqbbEzpMlrPUOkUKd1qLQ9lQ8EJwp F4h127oBDITtYpr3jILsWAO0qjT0FqmmKeuDR77H2A2qJ0epDt5QfV+BdKbyDBbmF9ymIY 5VXOe8CYlY+RNGu4Vj+ALjmZjyxGlSZuD/H+r/UDQWjPWzHreEZhtTAFgn9luSrd4BoS5J 7OBbPHGFXt/h7yYNzgczxyqTfS6fJrW4erhKHFJVevsgFaYn8uKk8S7Sf8eECg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707271486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kKlJtHtFC9vNzkvr8ILxsJgv1Uw/9vjFVGSjHuX/iGU=; b=LuUYYyLz1KzOhzOK6baK3Gz6VG5UVRC9vaI0JFhhrYjYKuB4WKU3R/6umaXBGLIfz9LDvv EJVcgSJbpwXqnYXKfXntxZfamVTBwJyS/0nyD2oFwSHM7dUcQ3KqAWB+085I1ibNTt2/aS Y1Laqf8kDFUN+5B0UkRH6eEQ2D7jgwiqfDDJwtQirVDQdCtMX91qz2bghdltOEFtjVJ83R 72YZhRitv2W/0xfpomJy71XQSFIYYjSSYwX0Vz6aiGZMmm8L7jYGW58q8dezoOVc07m3hf nxQfvug5qUfeXbas7QpnnWg+FlnWydn+Izc0tsiYSXLpD0ovETwAz3uqBcPWBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707271486; a=rsa-sha256; cv=none; b=nj9p5bEsEpvgBvSkm3pzSFkOLvgNgA3B3DLxk/95Scj59CVZT28xmnq+DmZ6ag5fPw2K07 tX8uIotes3xUQbLjLA89Nr/wtFJqSa2ZZ3Hr3NoAzW3WzYg7YSNklFTd5vV+8kiYXDvlAK sp/1HFd7lQp7M69m9A2eeHsWuLSKDp+nCL19f59hM1stFUyFXOqlBZxibpfgbPSDJy3bHv VsyZGMs2Dny5HxqMDz6aufoQqCodxEvvxXEea1gQEwN49SfoZuaedpQj4XTMXfR9A1V6zH 3HnRJ5eaFgF5R4DRugc3mePOH1/n+hKcLAFQAsEo9B6IyRZ3HSOJ5BrYBcHqqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TV3My2qTHzp70; Wed, 7 Feb 2024 02:04: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 41724kXb040786; Wed, 7 Feb 2024 02:04:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41724kvd040783; Wed, 7 Feb 2024 02:04:46 GMT (envelope-from git) Date: Wed, 7 Feb 2024 02:04:46 GMT Message-Id: <202402070204.41724kvd040783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gregory Neil Shapiro Subject: git: 31fbc98c949b - main - Belatedly update version and date for sendmail 8.18.1 upgrade List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gshapiro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31fbc98c949bfca30ab55afef04b4396a61b7e92 Auto-Submitted: auto-generated The branch main has been updated by gshapiro: URL: https://cgit.FreeBSD.org/src/commit/?id=31fbc98c949bfca30ab55afef04b4396a61b7e92 commit 31fbc98c949bfca30ab55afef04b4396a61b7e92 Author: Gregory Neil Shapiro AuthorDate: 2024-02-07 02:03:47 +0000 Commit: Gregory Neil Shapiro CommitDate: 2024-02-07 02:03:47 +0000 Belatedly update version and date for sendmail 8.18.1 upgrade --- contrib/sendmail/FREEBSD-upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/sendmail/FREEBSD-upgrade b/contrib/sendmail/FREEBSD-upgrade index fdc3b429b551..5cf41f10b6ad 100644 --- a/contrib/sendmail/FREEBSD-upgrade +++ b/contrib/sendmail/FREEBSD-upgrade @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.17.1 +sendmail 8.18.1 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -81,4 +81,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -31-January-2022 +31-January-2024 From nobody Wed Feb 7 05:50:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TV8Nw75GWz58rCR; Wed, 7 Feb 2024 05:50: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 4TV8Nw6FyJz4ZNV; Wed, 7 Feb 2024 05:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707285056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZpqcpXyrgJgEDNIJR9Fzu3D7q8+kSybqn4qAvK3VCLI=; b=BKlN6WZ9+Z/IYLSolgrc5RfHXr3yGiLwjafEgczQtOKngc7r4OPduKtSZxTwdOk62aepn/ nAkTAsFPZMecWJWC9n3VBNKez0QXAhxH1KswTH5uo5qFlBAhfnC8D8H0Nz6WoMcIHjv4UI hL9VXi50BJVI4KuD4x1YEN8+4zOIG4nR0z39iO7GUhdMGaJSnAiG6pfNrsKxOhCTx7vm5w nC115C+AczVaK7R9SQgHGA32UaoxKMhTuu1x4almZ6tFe6Q4R7QDf69tAtKUpI5it0eRr3 qFX+dISWcEiYhqu2LY2A2+DJAVajox4kg6v5gBY5ekOE7olp9pcoulNLpQQyng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707285056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZpqcpXyrgJgEDNIJR9Fzu3D7q8+kSybqn4qAvK3VCLI=; b=IPxk6JiNuSkmXJHTi9gla4fQFqhq7qiZ4pheDW6o1+zWKAUU2shCMb5pqJhqmAf23PVZ1m pThYCLnSjH94ctCILg8WPukyLcJkXbLW4nnlDVPJIm3JVBOZWUoWlVYsGTDlF/YrwCQ2Or hS530a+mP5/4lmTFYrbWdmy1cVaKWpy5aPaWViintNnpeEiia0hsSqulgjRcYfvLw6lbX4 9s2hXfccMbKLXLP4NGG4Qb2RslSnj0PkJVGgdt+HHAaHUf1SZVOIpigKSeO19+wNDwm7fK t6yWdSH2wnC8akr+CtulxXoDct0G1gMJm9Aqi8oHp1asdsGVYY8/zAvJvNgKDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707285056; a=rsa-sha256; cv=none; b=K+fiDB7ShcBXx2+rq/P47Kjk6N0Fjx+cuUj7NvJ89c3w9ucHn9dU/m1eGe0kZwpXSt0zM4 wsD3wa0N05lnWsy9KtpXSMs3HxE7tnKo6YAoWzyutS8fFQQ7P6rg4S0iTwA90LDD79Z5hS 14MeyjNz/qrnelHIq9qw77v3t+OkITdKFesd9DR/Sonczk4HkF1RO2vxfFAtGerFORYHPy NNZ0PuDrZq8Eriejem5Pj2/w8bRoQd6KeMwqtzlRjeYwqH/OtIgkHOpsi1D0HhqzGnrKra z5j/wxS2LvO/MV71RdWu1ig3UrGkAF+Ji/cfw05C/gfXfDHJG1MD7UmdWv23TA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TV8Nw5KDqztw8; Wed, 7 Feb 2024 05:50: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 4175oueV022189; Wed, 7 Feb 2024 05:50:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4175oufj022186; Wed, 7 Feb 2024 05:50:56 GMT (envelope-from git) Date: Wed, 7 Feb 2024 05:50:56 GMT Message-Id: <202402070550.4175oufj022186@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: f1e8d3361b94 - main - acpica: Fix my mismerge List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1e8d3361b944a46f514c7d44330a5f2c0b62a1c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f1e8d3361b944a46f514c7d44330a5f2c0b62a1c commit f1e8d3361b944a46f514c7d44330a5f2c0b62a1c Author: Warner Losh AuthorDate: 2024-02-07 05:47:42 +0000 Commit: Warner Losh CommitDate: 2024-02-07 05:47:42 +0000 acpica: Fix my mismerge I merged in the limits.h include. I should have resolved this by deleting it (since we have no easy way to 'fix' it with compat headers). GENERIC doesn't bring in the debugger, but LINT does... Sponsored by: Netflix --- sys/contrib/dev/acpica/components/debugger/dbcmds.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/contrib/dev/acpica/components/debugger/dbcmds.c b/sys/contrib/dev/acpica/components/debugger/dbcmds.c index 74263a01dc9f..4c8f091f126c 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbcmds.c +++ b/sys/contrib/dev/acpica/components/debugger/dbcmds.c @@ -156,7 +156,6 @@ #include #include #include -#include "limits.h" #define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME ("dbcmds") From nobody Wed Feb 7 13:53:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVM5K2xzLz59QYc; Wed, 7 Feb 2024 13: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 4TVM5K28Znz4623; Wed, 7 Feb 2024 13:53:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707313989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhgN6cGeEM/UEtdefakEietHfD8HZyFtny+mLoaLP2w=; b=S4172cTlB3dPqQSSn5CvVABKhEN1pk/hHGpN/3zu+2bs/EhReQOVBiQ39RbZ5YFpMDI0u8 IWNIytnzcDraKbu38I5rdfxdRgg8SKponWDi7ZCQMOE6Sd+ifknL/fKVi4TJaFydUYFGJR 9BAeHjEmxMR+THQ/eRVu4vh5nTI861+Gt4+XnZYjTLudQ3WFsGo4MNcVRtE4okKVMl6oRd kfZ00/P0Ndoh3TOmGtskv74XqZrF1bXhZZaj4Sdd6n69W1ucuDrVPQuWBd9qy/6eclE8R8 EU3JD6EVy0JNBqJOlfJQwfeHPXM5haw2hffwFRXa6Qw1H5QxQu/LfrfEK+gsRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707313989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhgN6cGeEM/UEtdefakEietHfD8HZyFtny+mLoaLP2w=; b=tO/nPm+iNwjRi1k7ragd6CKxcq3Xp8dY3ZQYDVUGj4hlgAHKGIHjBX/41+brbz3Q6oneLS iK4BKtl75BRdY7W2/5yZqgNTEgC8tL7sRnV5BG4xxuKHl0prvv+9q49BCmP1J5h94wVaV7 tHJhbwIxCTC7xbuXf5biVTuPMaEuPsb3LpufwUXa0QgP/lInghaXwyOo9rZ/jlUGtmyjhx MXswdpt66+FRNejNV72+W+gczjgn/piSA2s5SJ+6Pdfd300FV9UoyLl5QNV0bvkSrqIg8/ fweHgMWbs6vvXfnAwp9LXPhlz1zZrx34bDEEd+lAUEU8jpXS6sTt07QyRKbjbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707313989; a=rsa-sha256; cv=none; b=SeDDzWg6Z1mh1brlmueGD6HWh7bG8kLKcOMuUJo0ivJd5mKKgU5D5NsHgG+pcgycpRGA6w /g7qUs7XLHERfkAJGbIRaYlEqj1K3NL2tmxwGyL8EJrqkt/OMmln9hg0y9i373d5p/4Gxa 6gYH/xvio1z7apOtSIzoJPMP5weZFGbuP+upyhpAdk3MBLmyNmUpDX9PBfNZgR9ThKCvfk cnuazuEHdSErOXWWt8oxIHu9CxYOHqcScPJhlplnHeVrDwy/0vtx+7g6KLUO3jJe80/3pR cOYP4ZaBj1ZpTl1aPu4Xc4oMbyHsAZ7vq/mLEn5Mk8qH8We14h1aqEjTZu9Afg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVM5K1BySz18LM; Wed, 7 Feb 2024 13:53:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 417Dr9U1034535; Wed, 7 Feb 2024 13:53:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 417Dr9bh034532; Wed, 7 Feb 2024 13:53:09 GMT (envelope-from git) Date: Wed, 7 Feb 2024 13:53:09 GMT Message-Id: <202402071353.417Dr9bh034532@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: e6516294f4c7 - main - bhyve: Add support for the 'p' query List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6516294f4c7afa9da40a39caab86a5cd2aeb35a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e6516294f4c7afa9da40a39caab86a5cd2aeb35a commit e6516294f4c7afa9da40a39caab86a5cd2aeb35a Author: Mark Johnston AuthorDate: 2024-02-07 13:46:59 +0000 Commit: Mark Johnston CommitDate: 2024-02-07 13:46:59 +0000 bhyve: Add support for the 'p' query This lets gdb query individual registers. It's easy to implement and is used by gdb when attaching to a CHERI target, so let's support it. Sponsored by: Innovate UK Reviewed by: corvink, jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43664 --- usr.sbin/bhyve/gdb.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 4f427b1a0863..84e725f9085e 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -1035,6 +1035,29 @@ gdb_read_regs(void) finish_packet(); } +static void +gdb_read_one_reg(const uint8_t *data, size_t len) +{ + uint64_t regval; + uintmax_t reg; + + reg = parse_integer(data, len); + if (reg >= nitems(gdb_regset)) { + send_error(EINVAL); + return; + } + + if (vm_get_register(vcpus[cur_vcpu], gdb_regset[reg].id, ®val) == + -1) { + send_error(errno); + return; + } + + start_packet(); + append_unsigned_native(regval, gdb_regset[reg].size); + finish_packet(); +} + static void gdb_read_mem(const uint8_t *data, size_t len) { @@ -1597,10 +1620,12 @@ handle_command(const uint8_t *data, size_t len) /* TODO: Resume any stopped CPUs. */ break; - case 'g': { + case 'g': gdb_read_regs(); break; - } + case 'p': + gdb_read_one_reg(data + 1, len - 1); + break; case 'H': { int tid; @@ -1672,7 +1697,6 @@ handle_command(const uint8_t *data, size_t len) case 'v': /* Handle 'vCont' */ /* 'vCtrlC' */ - case 'p': /* TODO */ case 'P': /* TODO */ case 'Q': /* TODO */ case 't': /* TODO */ From nobody Wed Feb 7 13:53:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVM5L3WM5z59QWK; Wed, 7 Feb 2024 13:53: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 4TVM5L2z0Gz4624; Wed, 7 Feb 2024 13:53:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707313990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKis0et04bLyue8SUaHP478a05GDnZ1GrGyVAUUBdZQ=; b=APXdgsJKoO5CLRRmVV3qUUQh/LwfsLBOQ5RqnMXYt3cgstkAZPm2ttwLqPYesuj8jDMdNT DkrtMaQssU/keKpLZIczgW1VdXqXQNgIEegaiJURl0fqTruzKL2QAcwga3tyauD4P9/a6a hV6q/i/GqNZeeydK58jA+zqshE+vbjS40kGuvQXL7B+o0eG+9oiSuxu5+81d6HoPMSxmyK niY5f0sDaOD/ryTiHqoWGqqkmycn1iwvvOCPmmksX7ZofsrueW17h+8YoLUiky0NpCT8m4 fhJiWkeoS7MHy//MDyCW8E5iJ+8PjRZa1JCFcMn8hfSY43PkF5Z82XOkOVxstA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707313990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKis0et04bLyue8SUaHP478a05GDnZ1GrGyVAUUBdZQ=; b=nlOo+dTIurW9quiJjNTdnTazVwr3DNRXBG1f/PEE9m2rRiLPKrJ6dmiI6oxj2uGMnFEAoi +K4fz4avrDQmCVygROUAinpzCYEEBgUf+aeJsuxtlKsPJ+aFGIgV6o9SilOcOQHv+W4bkG Kzj9Wbk70D7cn54IVA3YJ9uSiy77Db9M2GNXqsG1MT3u6mhpOAWRJJuCx63VuLQWpQYAKA NeMjh61sIf5Q3rYttZwuWrIn1LMcF94gHgOcIZT5ONtcy0lDA4vluAHlesYuEBWpYnyS7D mv+ZmZKvVvdhWGtzue7LB94sH1fGmFfc7401elRTYZuJNmyvticMKczeo45wzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707313990; a=rsa-sha256; cv=none; b=dhSz5a79c0VIGMaFyBafWBzaznhFj4A10tO9zF0obDKgo705oJPXVmyverENz1U2fCjPc3 lV3W3wgPeJOWzrLq6OCgNb1Q4fdbKXZcvoBYz6R9Zy/twRh9nxAJuBtFRt2sEvgjUwVcu4 gfANkwKerYcSSyd5JwvsMYStkLhXubEfk3QBb7jPIAXkFfE1Utj+za7AdsTW8orJ/s0dbj dNC2QT+aDFEjMY+pwZ3YjxJ+LST56nDkbl47PtTif4ILnH5cErWLc8PklkhUzFE+g2+OSA WdGGX5oGeuNZJO2e0FdaJnBaIPG9VIiCz/V2S/BpbWGfBrE7qY0RW3BMcOU38Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVM5L22b6z189L; Wed, 7 Feb 2024 13:53: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 417DrAKD034580; Wed, 7 Feb 2024 13:53:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 417DrAu7034577; Wed, 7 Feb 2024 13:53:10 GMT (envelope-from git) Date: Wed, 7 Feb 2024 13:53:10 GMT Message-Id: <202402071353.417DrAu7034577@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: f493ea650e61 - main - vmm: Expose more registers to VM_GET_REGISTER List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f493ea650e6137ba657dfa0627da1e8bb4a985e9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f493ea650e6137ba657dfa0627da1e8bb4a985e9 commit f493ea650e6137ba657dfa0627da1e8bb4a985e9 Author: Mark Johnston AuthorDate: 2024-02-07 13:47:24 +0000 Commit: Mark Johnston CommitDate: 2024-02-07 13:52:46 +0000 vmm: Expose more registers to VM_GET_REGISTER In a follow-up revision the gdb stub will support sending an XML target description to gdb, which lets us send additional registers, including the ones added in this patch. Reviewed by: jhb MFC after: 1 month Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D43665 --- sys/amd64/include/vmm.h | 4 ++++ sys/amd64/vmm/amd/vmcb.c | 17 +++++++++++++++++ sys/amd64/vmm/intel/vmcs.c | 5 ++++- sys/amd64/vmm/intel/vmx.c | 10 +++++++++- 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index 273a1a46ba04..7d5d13678122 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -98,6 +98,10 @@ enum vm_reg_name { VM_REG_GUEST_DR3, VM_REG_GUEST_DR6, VM_REG_GUEST_ENTRY_INST_LENGTH, + VM_REG_GUEST_FS_BASE, + VM_REG_GUEST_GS_BASE, + VM_REG_GUEST_KGS_BASE, + VM_REG_GUEST_TPR, VM_REG_LAST }; diff --git a/sys/amd64/vmm/amd/vmcb.c b/sys/amd64/vmm/amd/vmcb.c index ce05c912fc6a..4bd2fae9f821 100644 --- a/sys/amd64/vmm/amd/vmcb.c +++ b/sys/amd64/vmm/amd/vmcb.c @@ -39,6 +39,7 @@ #include "vmm_ktr.h" +#include "vlapic.h" #include "vmcb.h" #include "svm.h" #include "svm_softc.h" @@ -231,6 +232,22 @@ vmcb_read(struct svm_vcpu *vcpu, int ident, uint64_t *retval) *retval = seg->selector; break; + case VM_REG_GUEST_FS_BASE: + case VM_REG_GUEST_GS_BASE: + seg = vmcb_segptr(vmcb, ident == VM_REG_GUEST_FS_BASE ? + VM_REG_GUEST_FS : VM_REG_GUEST_GS); + KASSERT(seg != NULL, ("%s: unable to get segment %d from VMCB", + __func__, ident)); + *retval = seg->base; + break; + case VM_REG_GUEST_KGS_BASE: + *retval = state->kernelgsbase; + break; + + case VM_REG_GUEST_TPR: + *retval = vlapic_get_cr8(vm_lapic(vcpu->vcpu)); + break; + case VM_REG_GUEST_GDTR: case VM_REG_GUEST_IDTR: /* GDTR and IDTR don't have segment selectors */ diff --git a/sys/amd64/vmm/intel/vmcs.c b/sys/amd64/vmm/intel/vmcs.c index 52068b8eba54..35c2ee5b6eff 100644 --- a/sys/amd64/vmm/intel/vmcs.c +++ b/sys/amd64/vmm/intel/vmcs.c @@ -119,10 +119,13 @@ vmcs_field_encoding(int ident) return (VMCS_GUEST_PDPTE3); case VM_REG_GUEST_ENTRY_INST_LENGTH: return (VMCS_ENTRY_INST_LENGTH); + case VM_REG_GUEST_FS_BASE: + return (VMCS_GUEST_FS_BASE); + case VM_REG_GUEST_GS_BASE: + return (VMCS_GUEST_GS_BASE); default: return (-1); } - } static int diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index b7c1544ac0b3..31ca9256b527 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -3404,8 +3404,16 @@ vmx_getreg(void *vcpui, int reg, uint64_t *retval) panic("vmx_getreg: %s%d is running", vm_name(vmx->vm), vcpu->vcpuid); - if (reg == VM_REG_GUEST_INTR_SHADOW) + switch (reg) { + case VM_REG_GUEST_INTR_SHADOW: return (vmx_get_intr_shadow(vcpu, running, retval)); + case VM_REG_GUEST_KGS_BASE: + *retval = vcpu->guest_msrs[IDX_MSR_KGSBASE]; + return (0); + case VM_REG_GUEST_TPR: + *retval = vlapic_get_cr8(vm_lapic(vcpu->vcpu)); + return (0); + } if (vmxctx_getreg(&vcpu->ctx, reg, retval) == 0) return (0); From nobody Wed Feb 7 16:39:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVQnM5TzMz59gWX; Wed, 7 Feb 2024 16:39: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 4TVQnM50c7z4Wpj; Wed, 7 Feb 2024 16:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707323975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFcLy/dHxCS+wBdNDwruVVyS1FxUIq7aiHKqZr+OD5E=; b=QfdDsCg7mXP9WyRWDyyS+NTWWe1oQA/cEzJXPyUope+Q6uUoSnieWYz5IHQGOecZ46iVAe eMUdoU74bnHDMnIykIyFMCIQdmtF6RRVNHr1KRUZoAEnjQWC0gGFeQTXCOaqg/tJOWPCaq nN0UewiPWJQnQF4jyQWCfEpg3YypkOuu9FDLfVtUNwBLnM/wzPzV1lY2Ql6nldjY7yAulZ TghXZ2qmDuoRSZO3J1yXduj/VeZIT3bMMcDx2NizIRTKxIkly+tI7IF1pfbd5P9RG3kRH/ LcSwcDv0zNHEgp5UxakFGl8n+xb7/XV7sq24OoPfcadK8V1BButMSkB85T+1Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707323975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFcLy/dHxCS+wBdNDwruVVyS1FxUIq7aiHKqZr+OD5E=; b=BAb/xBxSdLIC2GRUq5z1vVjLKH8Zl7rqFO4HQulBJyp3vlm9fHfTn6Q+jDUJDoBFheCUJo jgDkjw57x3besSNE5LTmYiP1T32rucknSx4mXlXldb8wzKrT4sLWrggtYyoGgV8lQBqM8D hkYoGxhPQwqGI1+B2KXiIQ6oNxLJqhp7U9S1TnflLz26h5IYQ29C5/w8FF56smPxeoUJbD zZjB5TKwcfoNzN5ex6JZ7tz31o+azurrQs1D2QppWtpY21Xw4kaeLecISnHI64Rgsosuec JI8wc8y9IVr1VSU+lGGPYR2Iy5jYM42F1k3fcFur4LA2LzjkXtuvwRA+lH/KTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707323975; a=rsa-sha256; cv=none; b=nLuO4qipw7qTpERxHK4SCLf8Rs5hP5nqCJYjh1cQ2mkscFEkqsF0owlW5vPim0ZveL2L2+ NWyUgmeUVB3gUU27ntrpVZgyg3whLfQtvRQkj/1hZwa34QgEeQgKcfsHVDjzOGjpsYgv48 b0Q6v6isvffnSuo1UdTN32oD8QF+aKE7+jeCcdbVY2YnownGUeGZiNbmbQSjL2cTpff6T4 Nadu5M6PAFaRFG7bfVbknBMl1AqQpL6ZaXLIX5I+j55PrEbK1SGmSdVsBEfIL7Gf7YvMCZ 7z72kQp9pfUq+EdbNvobIXr05UA6NEtf9EZqwAvvfRNGO7vgwhyS9ZOJVklgMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVQnM43pRzDfX; Wed, 7 Feb 2024 16:39: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 417GdZKO004778; Wed, 7 Feb 2024 16:39:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 417GdZvd004775; Wed, 7 Feb 2024 16:39:35 GMT (envelope-from git) Date: Wed, 7 Feb 2024 16:39:35 GMT Message-Id: <202402071639.417GdZvd004775@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: b8afdda360e5 - main - gicv3_its: Drop a couple of redundant vm_offset_t casts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8afdda360e5915be3c2cf0d1438f511779b03db Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b8afdda360e5915be3c2cf0d1438f511779b03db commit b8afdda360e5915be3c2cf0d1438f511779b03db Author: Jessica Clarke AuthorDate: 2024-02-07 16:24:34 +0000 Commit: Jessica Clarke CommitDate: 2024-02-07 16:24:34 +0000 gicv3_its: Drop a couple of redundant vm_offset_t casts These are already vm_offset_t, no need to cast. --- sys/arm64/arm64/gicv3_its.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index a667d40b4e3e..42a8fb8a9c26 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -718,8 +718,7 @@ gicv3_its_pendtables_init(struct gicv3_its_softc *sc) 0, LPI_PENDTAB_MAX_ADDR, LPI_PENDTAB_ALIGN, 0); /* Flush so the ITS can see the memory */ - cpu_dcache_wb_range((vm_offset_t)sc->sc_pend_base[i], - LPI_PENDTAB_SIZE); + cpu_dcache_wb_range(sc->sc_pend_base[i], LPI_PENDTAB_SIZE); } } @@ -1329,8 +1328,7 @@ its_device_alloc(struct gicv3_its_softc *sc, int devid) ptable->ptab_page_size, 0); if (!shareable) - cpu_dcache_wb_range((vm_offset_t)l2_table, - ptable->ptab_l2_size); + cpu_dcache_wb_range(l2_table, ptable->ptab_l2_size); table[index] = vtophys(l2_table) | GITS_BASER_VALID; if (!shareable) From nobody Wed Feb 7 19:51:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVW2k49WMz59xtK; Wed, 7 Feb 2024 19:51: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 4TVW2k3ktSz40RY; Wed, 7 Feb 2024 19:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707335486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFHCy2lyZHwhKXn249TuZMnBG4waZPZ0vvZviEGMR1A=; b=XgXUoC2z0EH0BLHTlffRwYWetjTyP3xvpcPHk3R7gg6TJ1RF0Ul2UQaAQaAZ+aatM54OXs MtbpFKmjPw1BDGN/k/bKtAcD8FXjXFOhODHuYsaZSLhOkKby20qEQ8K6p7IAHzcPzlhVWs Vc5rbJIBXJQzyCC6UHrBw0gOunQ67cDS63JUTGC6EfWhJaG9O2LR3sL5O9Ti5eATMme0e6 A+B/glLyfzAf7SGeI+/HQAHLI4Vnirveq316kjoOulQjfAVGVG7oNUtmK5Npqw3Z9jDKNn pLf02HDZf7L4F/jaGsoaYkkY6BJz8SEFDwnknC5LAt7zEeerK8cjuL5litdrOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707335486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFHCy2lyZHwhKXn249TuZMnBG4waZPZ0vvZviEGMR1A=; b=awlA8Msc4/ELFX0yrvLjrQSJQdxTqqmBWxDOyh29VC6bh27HQueREuOjjeGHoT6QrnRtCD scTeK94m3uGBCIVUlkrltQA6imL6efhIrs8BXo4NhbMTNfEtRhi2bZwenkodOsT/9AA05R EYaSOlvHwF800dErYhzPsYfWDNv6VmPrBWC+MsbfPfGYSAVpamONR3WJLmDu5W4/pXHcWB O+s+YzDQkCQ2eizqMiLEaOvD78fLT8oFdfYH/yX9TFYt+6/N/xmcZG3GOGYcvuvxk6hdv+ 9OPdi8nho86LWIHtC4oHaC8DyW7SOlN8/a2Oq0FgysJmLbLV+UD8MEeMYNhdXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707335486; a=rsa-sha256; cv=none; b=D9dpjHQoKnMwF/UUlfuydr6cpDoixqldAyStbFXoiYCTPtFC7xBheL2Vx8GF1vZzmIG3aJ M6t6kyOw+ryycv7vFAetK9g1eQji6e6oBgbYQmLVgRphFDawfw797fhG4fFxPqhSex+Hr3 ivMBe72HHxwP4iFG25eTrR/JP/6lYy6jENmrggyUW54TrNjw0k0xhcm9trzcRdf2iavyMH SBuIA42KWem7oCkbuw+0hqXrNeJlPgjtMUIvAg7x4rmCuRxWR1wdowIi8wG2tjUb8iNqmA BjzwwH7l7+N8pLu1o+N10mINTq2H/rm1S8in1JRU2eRMCMqrBtPeuIN8AQL2Ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVW2k2nGpzKCP; Wed, 7 Feb 2024 19:51: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 417JpQSZ034934; Wed, 7 Feb 2024 19:51:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 417JpQTq034931; Wed, 7 Feb 2024 19:51:26 GMT (envelope-from git) Date: Wed, 7 Feb 2024 19:51:26 GMT Message-Id: <202402071951.417JpQTq034931@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: 49076f376af5 - main - libc: don't directly link libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49076f376af52ac6cb7e8dfaf19766044fedd4d5 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=49076f376af52ac6cb7e8dfaf19766044fedd4d5 commit 49076f376af52ac6cb7e8dfaf19766044fedd4d5 Author: Brooks Davis AuthorDate: 2024-02-07 19:37:55 +0000 Commit: Brooks Davis CommitDate: 2024-02-07 19:50:47 +0000 libc: don't directly link libsys It is sufficent to add it as a filter. Reported by: kib Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43781 --- lib/libc/Makefile | 1 - share/mk/src.libnames.mk | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 41cf0f6de72a..54748abfeff1 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -62,7 +62,6 @@ CFLAGS+= -ftls-model=initial-exec # LDFLAGS+= -nodefaultlibs LIBADD+= compiler_rt -LIBADD+= sys LDFLAGS+=-Wl,--auxiliary,libsys.so.7 diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 3c19a4c45da3..5a6932614b29 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -393,7 +393,7 @@ _DP_xo= util _DP_ztest= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs uutil icp # The libc dependencies are not strictly needed but are defined to make the # assert happy. -_DP_c= sys compiler_rt +_DP_c= compiler_rt # Use libssp_nonshared only on i386 and power*. Other archs emit direct calls # to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. .if ${MK_SSP} != "no" && \ From nobody Wed Feb 7 19:51:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVW2l5Pykz59y2l; Wed, 7 Feb 2024 19:51: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 4TVW2l4kFlz40M5; Wed, 7 Feb 2024 19:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707335487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oT4iFzOpGeJ5ho6FQB0wlYMwhIl/7fIGrT8fDBUv+ew=; b=P5IIZGCgsr4WesVqbcWC1X4XdJCVJzYRUemv8lzvjMEYEnNgaIxIUi0fs+5GmO9V5UIGUr 7Sp94zFp2drn3pHRlIa7KWskZC8WnoRJ361ZTJ841RaW+m3obU13dw6/uZGPfEma6iDhMl AxpDzNVibjgPBTaj4zd+Cc0pDbrKftJzNb/eJWvvMfC0z9qusWO7KdMn2fgDY4H1m7bJxT OsFFfR9NV3NICmJFo2eZxEJuqLaCgea5QsmEb9QtP0X5eUXvAMKVlev7d6H/zZp7p3s0Xu u3I8LpXTmkHGEoWKENQl+roH2xmKD/WnAjuJIt/4HBglEG4HZNG2twdLNnuiBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707335487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oT4iFzOpGeJ5ho6FQB0wlYMwhIl/7fIGrT8fDBUv+ew=; b=tl3m8g4Ik/BOx0ZPx4uEIeFgp83UyxQHRVtQut82WGxITeTe4rUHMV1hOZkRUwjrI/0lpM hxGmGDYkEY2sbXW1KC3zF6Cm5qNlrJoVuvFlygcc2jMV8wBFlF+G6GfYerr+25nZXfrv0r BYSK5mT2+ePT7qSDka5j33qMDjyZU05nmNtnHeiAMsrUSfMfJRDhniaYHY4eLxv3lEt2BB 61Mbhb7XTeyrQzWkN5iY+n9LPxIvTjNM7TQxeViDvyu9cQwseoSk4hnr9gQEFG0KQzdbEF oEtd0TG5m0nWdVUdYmHf95ruJVcgG1ovxF/Xljls1XiQiZV6HlH+UzG92P4Lpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707335487; a=rsa-sha256; cv=none; b=TzLrVdtt0hJ5NbSA1ath4aX56HamHdipDeHp/r7YGkNyV/DZDzMFXHZcnehhtSrk/EOg94 oJn+/Yneb3wT0EErA8Ky8Xv4xOLWZa1CAw93A7Lx68XY3GaEDof1Sb3wVhXBQcnlDxgXAJ G+FCIqlQmdwMgFenRiKbaT7i6VFSLuv5ntM421IPaT2SBGLZvlBK7OYDRyUF6mP3EQWFpc t6B+xHVz6n+7xra0E0WjibqxUgAB96QJ/GPRyUMmzjQpiIZJOEbrxQlsO/OuHU60jVg4eb mS5jlDOOsJVv7FQTngDr2bzWxKM/r22CVJgbDRzMlHVsac7RE62xIkozqkf22g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVW2l3pdqzKFZ; Wed, 7 Feb 2024 19:51: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 417JpR9Z034982; Wed, 7 Feb 2024 19:51:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 417JpRgf034979; Wed, 7 Feb 2024 19:51:27 GMT (envelope-from git) Date: Wed, 7 Feb 2024 19:51:27 GMT Message-Id: <202402071951.417JpRgf034979@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: 49d684369c66 - main - libthr: filter rather than link with libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49d684369c6682eebca325c55a6c96b7c03f5aeb Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=49d684369c6682eebca325c55a6c96b7c03f5aeb commit 49d684369c6682eebca325c55a6c96b7c03f5aeb Author: Brooks Davis AuthorDate: 2024-02-07 19:38:16 +0000 Commit: Brooks Davis CommitDate: 2024-02-07 19:50:47 +0000 libthr: filter rather than link with libsys The allows gcc + GNU ld to link programs with -m32 -pthread without erroring out due to _umtx_op_err being undefined (unless -lsys is added to the link command. We now always link _umtx_op_err into libthr (not just when it's static) and filter it with libsys so we call that implementation. The dynamic implementations (at least the assembly ones) should likely become stubs as a further refinement. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43783 --- lib/libthr/Makefile | 5 ++--- lib/libthr/pthread.map | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 1d34f5cb5f09..932650885dea 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -13,8 +13,6 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 -LIBADD= sys - NO_WTHREAD_SAFETY=1 NO_WCAST_ALIGN.gcc=1 # for gcc 4.2 CFLAGS+=-DPTHREAD_KERNEL @@ -47,6 +45,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND .endif LDFLAGS+=-Wl,-znodelete +LDFLAGS+=-Wl,--auxiliary,libsys.so.7 VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/pthread.map @@ -76,7 +75,7 @@ LIBSYS_SRCTOP= ${.CURDIR:H}/libsys .else .PATH: ${LIBSYS_SRCTOP} .endif -STATICOBJS+= _umtx_op_err.o +OBJS+= _umtx_op_err.o .if ${MK_INSTALLLIB} != "no" SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a diff --git a/lib/libthr/pthread.map b/lib/libthr/pthread.map index 348fd48df398..aa9abb7e6114 100644 --- a/lib/libthr/pthread.map +++ b/lib/libthr/pthread.map @@ -298,6 +298,9 @@ FBSDprivate_1.0 { /* ABI bug workaround, indicate that pli->rtli_version is valid */ _pli_rtli_version; + + /* Expose stub for libsys filter */ + _umtx_op_err; }; FBSD_1.1 { From nobody Wed Feb 7 19:51:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVW2n2gZWz59y7H; Wed, 7 Feb 2024 19:51: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 4TVW2m5mntz40Rj; Wed, 7 Feb 2024 19:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707335488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRaC8N2+v63SvUX/yNjY3VUXBtpBs9Wk61SxJlB4+PQ=; b=MkHGs9X2WbNCW78Doxk/TSwnUM25VPhImZv7b9ya9WdNU+0EOHf5vBmu+EP+RAnmhjTaU8 5YXms6fre9BBrQAM1RWY/zq/yvnI8EOOM106rqZn7k6KQkxjwuElxgJmgI+B7p0SBmSVLo f7a55/mZcbRkFSl9waSWsMOoxNsNfPg9XbF8N1QPL4WpVoDnt1F3TTlcKuCtlYbTUd1h7M KnF9BnkAW2lzVc5nBl/BhKQS8UY+xhzzxT4CZDB7SO953EnCeJeorQwiR6/MAuf4Rav9HQ wEpyOSB6hRTwha/J6Q5xh5+VK7OWmb6Y8LfmTGNNYjXGQOnfiE+IFcqeXrgavA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707335488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRaC8N2+v63SvUX/yNjY3VUXBtpBs9Wk61SxJlB4+PQ=; b=pVCgJNPgHyZ+iuU/fxUAjASegTxd/Q3pYqGGIF+UQIucJYRxotoak/mU0ATdHLyk2+aYR4 acps6b3utkNvK8cU7SFbcin3sr33ZlVtyWT19hwHxDdz8WFE+j+BZSSulg1QyYGDpKYVeu /0hdfINEkfzrYJCnaHEShJL6YCsmKCb38u6Ju09z6lTiud2HbO36aNTTmA0wEWF1d06byT dAUdur2SSwUHux4K9Q7iuejFBkjddyGDteF2uwzS987upFD6tl+ry5LzvVd96IdxOH28KH yc3Xb+khfTvY3oDeB9mqOY0ycuS7vvDQgxxY3D7bUFP9qnKcmPuJWyU/371x7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707335488; a=rsa-sha256; cv=none; b=oXU6VnhNBe87ep2ztX98OmzfVP1lWGAI9PystV8GvtPDlbJkIOUTi3FkuvqB9QSkiyjaZK bebdRpB0nbA37udkNLhviCATzx8b1U6ITfn2IS2fd/Uz8S9sUn7E3eg8uZR2H+/UIz4RtB 1s3SfIExjSiuikaeIATFAfUn2ij9lic68mlUTxd4bG73g/tKOip19FY9A/QKFIEBu3+XY0 HD5OYgBDgGbegljKlNia3aVS8jWq6LG3bJmspFTfr4AorCcL155IGAJQkTpFDpe1joF+sc G+sel/NgYpTDUwqy2V6raHgMGCMsnqx1wxckhMf66SPYebJHCE+S/+5prWpnrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVW2m4hc5zL0Z; Wed, 7 Feb 2024 19:51: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 417JpSA7035024; Wed, 7 Feb 2024 19:51:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 417JpSbn035021; Wed, 7 Feb 2024 19:51:28 GMT (envelope-from git) Date: Wed, 7 Feb 2024 19:51:28 GMT Message-Id: <202402071951.417JpSbn035021@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: d04abb05375d - main - Belatedly bump __FreeBSD_version for libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d04abb05375d3525132f1e9f78090db3d0d27f14 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d04abb05375d3525132f1e9f78090db3d0d27f14 commit d04abb05375d3525132f1e9f78090db3d0d27f14 Author: Brooks Davis AuthorDate: 2024-02-07 19:45:27 +0000 Commit: Brooks Davis CommitDate: 2024-02-07 19:50:47 +0000 Belatedly bump __FreeBSD_version for libsys --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 3f99ee36e4af..8740d37facc3 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500012 +#define __FreeBSD_version 1500013 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Wed Feb 7 21:10:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVXnf1njqz5B5Lb; Wed, 7 Feb 2024 21:10: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 4TVXnf1Gr7z4Dwx; Wed, 7 Feb 2024 21:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707340214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pgXwzH86OeUmsLWPAntOcQRYWq6c1w0imQcosG2JKcg=; b=QLw9+FikASfYstjySKpk7IlDvCitwvp2sbPqvV5oEnIydQryA7OZuuhT1B5EEkV41PR4Kv kVX/wBv/EIW+rhOiPYBJ8OvI7byvnGblXgdUnpPPw1uQn/kpyW6Y58CKUdJR2H0+35uU9L 4I9kDIzxhCmPoimdASGof+0dMZd5vvXvInG58WLwlKEKtyGQ8xkv5RV6oBXgCKatkoquOF PcFDSzBskNT94fPrP+2/S4LduikF0bBGpfW2I/TOn94KEorng+OisplTaDmguXOfrrtHdX czut4zO36FrfBqE4pPOhJlgPVnssUVsaOMdPjSEySNJNRwZufHU1QtxSGOq1oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707340214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pgXwzH86OeUmsLWPAntOcQRYWq6c1w0imQcosG2JKcg=; b=rg29P3/R2hHOVy6OqemDMdMohP+QThI24CEIXvZRxiRLXpCgpJZidC27g4oDojfsPmyIT3 3MNz1Yt7QPWPB3V+I7SLo3M8uY9CLFXUqfk+PLOZoZKwUmV0mesEtUd1udRL6bM3NwXkCx XytGhSRb2mxBB/cnr7Yg6H8lw5twbKPaYam4Qg/MER5h0QUYJ8nvI6KV8u4+ja5j5rVlmA 6Xj53M5zrTe3RO2l/mda90hA3x8Uv47RRAmaQVr1/MYnass848HDvZYDkLyQIldTZ1EowL QehJlTyrtRkraXbfDB/uHzBRgePmsR4kiJ60Twfb7poOOUYXqIm2uTnbGRbsIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707340214; a=rsa-sha256; cv=none; b=YBiCAkVXDOKaaSkSXF/lifGmlHZHh1eW76axgEdRCkMJ8Suc7JNBs20/PkdhHmw86hztvE mvthXTlVijhgfMyq1QoFlYtglwR2nhBfR9sA+OmwAIAkBUx0ZDsxzEIYLVKKv/xHHXB4qB QfTWlQT5miesoWY2/SCEhTLB07jzVDercgv0porTRreyhhYGyUWWjWfLwmVx6shx/0+1+h uDlzE3DaH2/nr/F0vQtZDH29uKYhjijrUjCM72UnaMu5hn/3A2Ar2m5xaw0Ue2DiGOPv/1 2kzhDesYWFm5glpvEYUgy75nlj72eYK9sRckShwYrlE1pIJdL2e/n+yFp3NDIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVXnf0CKjzMdP; Wed, 7 Feb 2024 21:10: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 417LADHB063016; Wed, 7 Feb 2024 21:10:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 417LAD63063008; Wed, 7 Feb 2024 21:10:13 GMT (envelope-from git) Date: Wed, 7 Feb 2024 21:10:13 GMT Message-Id: <202402072110.417LAD63063008@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: 82bebc793658 - main - rescue: Don't explicitly link with libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82bebc7936581e9c4ff3604d4cb998f8cc017f50 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=82bebc7936581e9c4ff3604d4cb998f8cc017f50 commit 82bebc7936581e9c4ff3604d4cb998f8cc017f50 Author: Brooks Davis AuthorDate: 2024-02-07 19:58:33 +0000 Commit: Brooks Davis CommitDate: 2024-02-07 21:06:20 +0000 rescue: Don't explicitly link with libsys libpthread contains the symbols we need when statically linked. This was a leftover from a prior version of ef9871c6205c that I failed to remove before I pushed. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43782 --- rescue/rescue/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 76810a903856..7bf3299f4d48 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -142,7 +142,7 @@ CRUNCH_PROGS_usr.sbin+= zdb CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lpthread -lsys -luutil -lumem -ltpool -lspl -lrt +CRUNCH_LIBS+= -lavl -lpthread -luutil -lumem -ltpool -lspl -lrt CRUNCH_LIBS_zfs+= ${LIBBE} \ ${LIBZPOOL} \ ${LIBZFS} \ @@ -156,7 +156,7 @@ CRUNCH_LIBS_zpool+= ${CRUNCH_LIBS_zfs} CRUNCH_LIBS_zdb+= ${CRUNCH_LIBS_zfs} .else # liblzma needs pthread -CRUNCH_LIBS+= -lpthread -lsys +CRUNCH_LIBS+= -lpthread .endif CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv .if ${MK_OPENSSL} == "no" From nobody Thu Feb 8 05:50:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVmKV3MT7z590S3; Thu, 8 Feb 2024 05:50: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 4TVmKV2WRCz4Cxq; Thu, 8 Feb 2024 05:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707371406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYAUFh6TEljs51KF2Zzs9Nl9GhalRtmPqpo84x6pKB8=; b=gxbsA1gPGgUWdpGQm2eQLfhbt5x/LGcuiJi0/jiZs8hhtULO7hwDnWBAk0TGU0lqyp9FtY XBlAogPEdKHCKanHdLihLl+6ebHEU8tvuu3crKrsh0nRdubfZ4nqJ9JBX6UClWKopen9fy 2Vvr7YjsHzkSB0PKGtjj6LJUInpf4MH3DRcR9S/AN5tN4r4MCxc+UqS5MecKE4zkvm+2cb gALmhKAFaXOnumQqM+ZFDDipyVWxJ22RcKJR2m9fNec+q1XSags3S0xIXl91m+pOtO+3iZ Xr/+8ARa1KwpTlZCA4fQbf0hU0gygainlRaA1D5odWbjkrYkI1Rbra08SznBEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707371406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYAUFh6TEljs51KF2Zzs9Nl9GhalRtmPqpo84x6pKB8=; b=cu9c83r2bu7HgwIrMYfTSrGbKu0llGwVCUvfurvwH1Qt1SbvGWxCX5RQ4ClSEL6HECu7x8 TwFv54Mq/nse0S3kIMoIdawaW/4xod7gwGg9WMcUXYDL3J9dq0gOgYr9uXFLEcuD5rbZSh lWP4Ma8aJKUvl/k6AvuFMyvPcbXZnbFwCX0+EJfBkarBE/tgFe5hIvzeTEnaoi6eno7BJD gpTyQxkKru+JAHJD/qPC6Io1DF53RPf39NQwXbUkGx7sE1c5yKsgOktyJt1Md79WL5KS+X vmFmbY8y9WNs/Q8s90E0I6KlYYim/6PF0Ur+7IwEC3drcLzScfI3MwaGE+fVOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707371406; a=rsa-sha256; cv=none; b=PZWQ1IE5PMvXq/JQfb35Csz6S13fv+Ibadr9Nw8k47WYuvOFd+MagQpMqUv02c51InKQT0 u0z5UwWjPqOojuyxHjnWh+aboezBBDa7/nMaJ/b0AFpod0nwQ5lESOs3KMl8paTqEm75q9 NCuPap3AzKHUAM9NguaXdF5T4A8Wqz8ow+roGfL66+bQntIaSayPczO5XZizU4zIkJNKbJ pBTkaAitHYK7cH5gmuG9Met0qvCimUi6SZ1iESbY3YoWido646QZRYO67KN3OalYcpwGvL Ek+W02bGCzTxyHptBvi/QMAfRoMFiIPjTnWZXIJp5jxG2lugOyFz/DWr2/BMOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVmKV1ZBFzdl9; Thu, 8 Feb 2024 05:50: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 4185o6sA034466; Thu, 8 Feb 2024 05:50:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4185o6k5034461; Thu, 8 Feb 2024 05:50:06 GMT (envelope-from git) Date: Thu, 8 Feb 2024 05:50:06 GMT Message-Id: <202402080550.4185o6k5034461@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: 63007e46110d - main - release: Add AZURE to CLOUDWARE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63007e46110d7f7a1f9d48fbac99f8a5bc166456 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=63007e46110d7f7a1f9d48fbac99f8a5bc166456 commit 63007e46110d7f7a1f9d48fbac99f8a5bc166456 Author: Li-Wen Hsu AuthorDate: 2024-02-08 05:49:01 +0000 Commit: Li-Wen Hsu CommitDate: 2024-02-08 05:49:01 +0000 release: Add AZURE to CLOUDWARE Let Azure use the image directly built by the release engineering team. Reviewed by: emaste Approved by: cperciva (re) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41906 --- release/Makefile.vm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index cab46bb737b3..b9c43e8b491f 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -17,7 +17,8 @@ VMDK_DESC= VMWare, VirtualBox disk image QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image -CLOUDWARE_TYPES?= BASIC-CI \ +CLOUDWARE_TYPES?= AZURE \ + BASIC-CI \ EC2 \ GCE \ OCI \ From nobody Thu Feb 8 06:48:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVncb0TVQz595f3; Thu, 8 Feb 2024 06:48: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 4TVncZ6jRBz4LHH; Thu, 8 Feb 2024 06:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707374894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yGPQbZivvUdnzg+YWU4Q2FY3pwCq8tRatlq/gF3L4qU=; b=ac3PQ1RxIhidQ3yMBgiemnY5m0mPt3a+J8zpvAyRjoaE/ov42PjITO914aTmgCfdOdoCBJ FySgmTxjxHWUqp+vPybeocNNomyfARQQkuydsyY5tdULXqIORHLfKFEycFyNT3MhJeeysT pRgMs6SdlKuX+Jyli7LZwkAIP/ZA4g8opMLn2om1YfNd91vwYJecFOmxtUegUayIKe6m5t ghh2jreBqda+D4b98gDsoW06FgGkmTYMKhH5L1vQYWMPNdf+3Lyo7qepumu130AzCc6HoI 6n68HxJ1STH9CBgak4/fGfNpAsDYfk4YSeD/yafiVGI8jlM3uWOzOhi69utILA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707374894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yGPQbZivvUdnzg+YWU4Q2FY3pwCq8tRatlq/gF3L4qU=; b=IYtomCWh9jO9OobAKbWiVRc8uMke/5SUfJM5K0CToUsW/1ASgocBE7hS7PHRptJF0pR5B6 XalBEpefJa6rmoXGQ6UcP3cL9KoMrlcZGRCtjnSz0eCGJt2+QP9hStzL6BgK4yNwas8ptS U3NcTs7UYmBJP6A5MoPLTcPdrml4/tRU1J7odEkxOZ07FUbLOGl0v443++2X/tBbhm+ezu iBcXxkbsGJVs7o6ICcRczWMmV/BXHJDoHBxqqz/NLe65PUqrGFgFtK1eq+XOOiJD2F8sf6 SDzAosbn9OgoSsn0HObVwgSFKlpRUKGehytQ9L/l0AVXLUu4Jm6OgNx0qVZMIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707374894; a=rsa-sha256; cv=none; b=Y1avCY88UtdYPCwjd5Ang3mgUJrnxNqUY4BwTxgBLsmfGG4jsA+bmxAGezw93K2rGImv71 NobB9UMaWyNrhZC3vAkawnq1JwijHIf92RU/PhVyFrO0fBv8q2FIweTGT85Va2xuiy20Qm 4XyakWAWmZEMBqzEkTLlyap7WkgnnSiblWIiJ3IETNjk/RERvryVfLZOlQNBQ55IXYDhnW Dy/QtexNs1fvDLtUzswOg7gXAiTaFjQ48upQP3LcSq30DjW8UeWL/SWgMMtlMJnbR7eOx2 o9acXo3Sm7NZhA9EE2cXd7L14jT7+R7UnoxauhvR6CbMxq/ntyfhFz5AyKwgzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVncZ5jDtzg5W; Thu, 8 Feb 2024 06:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4186mEch031513; Thu, 8 Feb 2024 06:48:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4186mEd3031510; Thu, 8 Feb 2024 06:48:14 GMT (envelope-from git) Date: Thu, 8 Feb 2024 06:48:14 GMT Message-Id: <202402080648.4186mEd3031510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hiroki Sato Subject: git: 4594eb454891 - main - systat(1): Plug memory leak List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4594eb454891e6247a6ea786f467a0b960ddd835 Auto-Submitted: auto-generated The branch main has been updated by hrs: URL: https://cgit.FreeBSD.org/src/commit/?id=4594eb454891e6247a6ea786f467a0b960ddd835 commit 4594eb454891e6247a6ea786f467a0b960ddd835 Author: Hiroki Sato AuthorDate: 2024-02-08 06:45:04 +0000 Commit: Hiroki Sato CommitDate: 2024-02-08 06:45:04 +0000 systat(1): Plug memory leak The procstat_getprocs() function call in procgetinfo() allocated a buffer but it was not freed properly. --- usr.bin/systat/proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/systat/proc.c b/usr.bin/systat/proc.c index b42d5236927f..25ee286be780 100644 --- a/usr.bin/systat/proc.c +++ b/usr.bin/systat/proc.c @@ -205,7 +205,7 @@ per_proc_swap_usage(struct kinfo_proc *kipp) } while (vmobj != 0); } } - free(freep); + procstat_freevmmap(prstat, freep); return (pages); } @@ -272,6 +272,7 @@ procgetinfo(void) } if (nproc > 1) qsort(pu, nproc, sizeof(*pu), proc_compar); + procstat_freeprocs(prstat, kipp); } void From nobody Thu Feb 8 15:52:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW1hT5WNxz59vvy; Thu, 8 Feb 2024 15:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TW1hT4ryLz4KFW; Thu, 8 Feb 2024 15:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707407545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYxjihtxYt8IsBiAaH/J5q6SXgEAl18cIF6TkmIhM0s=; b=bOsGLvfEIjWg/Mu2u1sW8nnmeuSCck+0+gcehbXDhIHIeBxkS63UdPBFvffgMCeV+Eqj9L nh+bTPt/gUiqMJLlrCQNz4fMxmFK8BYNqrV3GBWAgBltd9NC1z6kGHCp7rxQfmVlQGLYoW lAsgqfUsQiJjo0zbtLDEjGLzLNjaROPLZe9LeJwcmb+x1PLAFrszQaafwfsoXdi8+SsYJM Rx4KdUwkkxacmASM7TtIi86jpiPyuA4xFyUGbD56KuDXRsPc/SO9n0tZMP4zkgDLL//nk0 NeWV1Yhj2WymtIMxLBdN0hAvt6STdFhWHLqQa+dWIM6WTVi+2z5++tgBQXREFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707407545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYxjihtxYt8IsBiAaH/J5q6SXgEAl18cIF6TkmIhM0s=; b=Fa+xDiKQOOT970J8oXltjPMc/1dEG4DA1JdNUQFqNrH+09WdSpKpW4oHaPaptWGE2xPTQT ofQTDuZKCk7Lflvox5ahWNtA5NS3w9NFC16jtYYNn55PEwB9v6bNgkRaj3Tos8+AHec0lC srCrqjWqQVvsPIh51TLI4pr1Ju8YjFahz+qEew467jFvQWQGOnA5fXXA+aYpsIo1kzywUF +h/eQj2ZJFQj8ii5n5+Yp7tGbSBjCiPjq8utghilRhUzmtcSpDC0KVUKy3Om/4JYwUxSC/ rnBcQJ7M1xROgBZGbHcMtaPGpDiCUdCOFcrbn91s60v87Lfor0TQ7bg11B5PBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707407545; a=rsa-sha256; cv=none; b=T660J+ezOV453O1HRKgwHfvcn1fnT5n/G8Kw2OEbUQiJKaM3qepsp5lg1xf4X8y/Vgbwzw LZlmA2Dwyx3hfKXocRT8SCMkUGUAowTk68kF8DO7a4carE/PISeBwL/VHTabPO2fq5zU1q bKU0ekBygU6PkqeCm2M6rKAuxzeRkuc/NgDieQoWE+duByUkXFb/qrFdmEzBG2gzfAU+fS atX7cVIrhmsEEsoIvhU5fAnO8cA7OA7bwTRpQIKohFs546uZPfjBeGW6KGy9OxYuvb9exV 8E75AxpPFJaXYstAYQ46uMv4qUyP00ke6zwAaAPJJiHS3XlnjIOM2B9zqUunqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW1hT3VdbzwDb; Thu, 8 Feb 2024 15:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 418FqPi5052614; Thu, 8 Feb 2024 15:52:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418FqMB2052608; Thu, 8 Feb 2024 15:52:22 GMT (envelope-from git) Date: Thu, 8 Feb 2024 15:52:22 GMT Message-Id: <202402081552.418FqMB2052608@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: a4e5e0106ac7 - main - zfs: merge openzfs/zfs@229b9f4ed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4e5e0106ac7145f56eb39a691e302cabb4635be Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=a4e5e0106ac7145f56eb39a691e302cabb4635be commit a4e5e0106ac7145f56eb39a691e302cabb4635be Merge: 4594eb454891 229b9f4ed05e Author: Martin Matuska AuthorDate: 2024-02-08 12:39:04 +0000 Commit: Martin Matuska CommitDate: 2024-02-08 15:51:08 +0000 zfs: merge openzfs/zfs@229b9f4ed Notable upstream pull request merges: #15769 082338875 Add 'zpool status -e' flag to see unhealthy vdevs #15804 a0d3fe72b libzdb: Initial breakout of libzdb #15847 229b9f4ed LUA: Backport CVE-2020-24370's patch Obtained from: OpenZFS OpenZFS commit: 229b9f4ed05e6d14fb4d73fa04a71e99b01bb534 cddl/lib/Makefile | 1 + cddl/lib/libzdb/Makefile | 25 ++++ cddl/lib/libzdb/Makefile.depend | 14 ++ cddl/usr.sbin/zdb/Makefile | 2 +- rescue/rescue/Makefile | 2 +- share/mk/bsd.libnames.mk | 1 + share/mk/src.libnames.mk | 3 + sys/contrib/openzfs/cmd/zdb/Makefile.am | 1 + sys/contrib/openzfs/cmd/zdb/zdb.c | 108 +------------- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 58 +++++++- sys/contrib/openzfs/config/kernel-blkdev.m4 | 34 ++++- sys/contrib/openzfs/include/Makefile.am | 1 + sys/contrib/openzfs/include/libzdb.h | 68 +++++++++ .../include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 1 - .../include/os/linux/zfs/sys/zfs_vfsops_os.h | 2 - sys/contrib/openzfs/include/sys/zfs_vnops.h | 3 + sys/contrib/openzfs/lib/Makefile.am | 5 +- sys/contrib/openzfs/lib/libzdb/Makefile.am | 7 + sys/contrib/openzfs/lib/libzdb/libzdb.c | 102 +++++++++++++ sys/contrib/openzfs/man/man4/zfs.4 | 9 ++ sys/contrib/openzfs/man/man8/zpool-status.8 | 4 +- sys/contrib/openzfs/module/lua/ldebug.c | 7 +- .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 4 - .../openzfs/module/os/linux/zfs/vdev_disk.c | 72 +++++++-- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 5 - .../openzfs/module/os/linux/zfs/zpl_file_range.c | 48 +++--- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 43 +++++- sys/contrib/openzfs/tests/runfiles/common.run | 5 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 2 + .../openzfs/tests/zfs-tests/include/tunables.cfg | 1 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 2 + .../cli_root/zpool_status/zpool_status_002_pos.ksh | 4 +- .../cli_root/zpool_status/zpool_status_003_pos.ksh | 2 + .../cli_root/zpool_status/zpool_status_008_pos.ksh | 104 +++++++++++++ .../tests/functional/cp_files/cp_files_002_pos.ksh | 161 +++++++++++++++++++++ sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 37 files changed, 736 insertions(+), 181 deletions(-) diff --cc cddl/lib/Makefile index 68250c8300b1,000000000000..e6a0763544f7 mode 100644,000000..100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@@ -1,46 -1,0 +1,47 @@@ + +.include + +.if ${MK_DTRACE} == yes || ${MK_ZFS} == yes +SUBDIR= libspl +.endif + +SUBDIR.${MK_DTRACE}+= \ + drti \ + libctf \ + libdtrace + +SUBDIR.${MK_TESTS}+= tests + +SUBDIR.${MK_ZFS}+= \ + libavl \ + libicp \ + libicp_rescue \ + libnvpair \ + libtpool \ + libumem \ + libuutil \ ++ libzdb \ + libzfs \ + libzfs_core \ + libzfsbootenv \ + libzpool \ + libzutil + +SUBDIR.${MK_ZFS}.${MK_OPENSSL} = pam_zfs_key + +SUBDIR_DEPEND_libavl= libspl +SUBDIR_DEPEND_libctf= libspl +SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libnvpair= libspl +SUBDIR_DEPEND_libtpool= libspl +SUBDIR_DEPEND_libuutil= libavl libspl +SUBDIR_DEPEND_libzfs_core= libnvpair libspl libzutil +SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil +SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp +SUBDIR_DEPEND_libzutil= libavl libtpool +SUBDIR_DEPEND_libzfsbootenv= libzfs libnvpair +SUBDIR_DEPEND_pam_zfs_key= libnvpair libuutil libzfs libzfs_core + +SUBDIR_PARALLEL= + +.include diff --cc cddl/lib/libzdb/Makefile index 000000000000,000000000000..63248399b91c new file mode 100644 --- /dev/null +++ b/cddl/lib/libzdb/Makefile @@@ -1,0 -1,0 +1,25 @@@ ++.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzdb ++.PATH: ${SRCTOP}/sys/contrib/openzfs/include ++ ++LIB= zdb ++PACKAGE= zfs ++ ++INCS = libzdb.h ++ ++SRCS = libzdb.c ++ ++WARNS?= 2 ++CSTD= c99 ++ ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs ++CFLAGS+= -I${SRCTOP}/sys ++CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include ++CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h ++CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzutil ++CFLAGS+= -DHAVE_ISSETUGID -DIN_BASE ++CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h ++ ++.include diff --cc cddl/lib/libzdb/Makefile.depend index 000000000000,000000000000..93249906da4f new file mode 100644 --- /dev/null +++ b/cddl/lib/libzdb/Makefile.depend @@@ -1,0 -1,0 +1,14 @@@ ++# Autogenerated - do NOT edit! ++ ++DIRDEPS = \ ++ include \ ++ lib/${CSU_DIR} \ ++ lib/libc \ ++ lib/libcompiler_rt \ ++ ++ ++.include ++ ++.if ${DEP_RELDIR} == ${_DEP_RELDIR} ++# local dependencies - needed for -jN in clean tree ++.endif diff --cc cddl/usr.sbin/zdb/Makefile index 744db789772c,000000000000..e41f4afce82f mode 100644,000000..100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@@ -1,33 -1,0 +1,33 @@@ + +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +.PATH: ${ZFSTOP}/cmd/zdb +.PATH: ${ZFSTOP}/man/man8 + +PACKAGE= zfs +PROG= zdb +MAN= zdb.8 +INCS= zdb.h +SRCS= zdb.c zdb_il.c + +WARNS?= 2 +CSTD= c99 + +CFLAGS+= \ + -DIN_BASE \ + -I${ZFSTOP}/include \ + -I${ZFSTOP}/lib/libspl/include \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd/spl \ + -I${SRCTOP}/sys \ + -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ + -DHAVE_ISSETUGID + - LIBADD= nvpair umem uutil zfs spl avl zutil zpool crypto ++LIBADD= nvpair umem uutil zdb zfs spl avl zutil zpool crypto + +CFLAGS.gcc+= -fms-extensions +# Since there are many asserts in this program, it makes no sense to compile +# it without debugging. +CFLAGS+= -g -DDEBUG=1 -DZFS_DEBUG=1 + +.include diff --cc rescue/rescue/Makefile index 7bf3299f4d48,000000000000..0a8d142ef83a mode 100644,000000..100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@@ -1,269 -1,0 +1,269 @@@ + +.include +.include + +PACKAGE=rescue +MAN= +MK_SSP= no +# Static-PIE is not supported so we should not be linking against _pie.a libs. +# This is also needed to avoid linking against sanitizer-instrumented libraries +# since MK_ASAN/MK_UBSAN will instrument the .pieo object files. +MK_PIE= no +NO_SHARED= yes +CRUNCH_BUILDOPTS+= MK_PIE=no NO_SHARED=yes + +# lld >= 16 became more strict about multiply defined symbols. Since there are +# many of those in crunchgen'd programs, turn off the check. +.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 160000 +LDFLAGS+= -Wl,--allow-multiple-definition +.endif + +PROG= rescue +BINDIR?=/rescue + +# Shell scripts need #! line to be edited from /bin/sh to /rescue/sh +SCRIPTS= nextboot_FIXED +SCRIPTSNAME_nextboot_FIXED= nextboot +nextboot_FIXED: ../../sbin/reboot/nextboot.sh + sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET} +CLEANFILES+= nextboot_FIXED + +SCRIPTS+= dhclient_FIXED +SCRIPTSNAME_dhclient_FIXED= dhclient-script +dhclient_FIXED: ../../sbin/dhclient/dhclient-script + sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET} +CLEANFILES+= dhclient_FIXED + +# The help which used to be here is now in mk/bsd.crunchgen.mk + +# Define Makefile variable RESCUE +CRUNCH_BUILDOPTS+= -DRESCUE +# Define compile-time RESCUE symbol when compiling components +CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS=-DRESCUE + +# An experiment that failed: try overriding bsd.lib.mk and bsd.prog.mk +# rather than incorporating rescue-specific logic into standard files. +#MAKEFLAGS= -m ${.CURDIR} ${.MAKEFLAGS} + +# Hackery: 'librescue' exists merely as a tool for appropriately +# recompiling specific library entries. We _know_ they're needed, and +# regular archive searching creates ugly library ordering problems. +# Easiest fix: tell the linker to include them into the executable +# first, so they are guaranteed to override the regular lib entries. +# Note that if 'librescue' hasn't been compiled, we'll just get the +# regular lib entries from libc and friends. +CRUNCH_LIBS+= ${.OBJDIR}/../librescue/*.o + +################################################################### +# Programs from stock /bin +# +# WARNING: Changing this list may require adjusting +# /usr/include/paths.h as well! You were warned! +# +CRUNCH_SRCDIRS+= bin +CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \ + ed expr getfacl hostname kenv kill ln ls mkdir mv \ + pkill ps pwd realpath rm rmdir setfacl sh sleep stty \ + sync test +CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -lelf -ltermcapw -lutil -lxo +CRUNCH_BUILDTOOLS+= bin/sh + +# Additional options for specific programs +CRUNCH_ALIAS_test= [ +CRUNCH_ALIAS_sh= -sh +# The -sh alias shouldn't appear in /rescue as a hard link +CRUNCH_SUPPRESS_LINK_-sh= 1 +CRUNCH_ALIAS_ln= link +CRUNCH_ALIAS_rm= unlink +CRUNCH_ALIAS_ed= red +CRUNCH_ALIAS_pkill= pgrep + +.if ${MK_TCSH} != "no" +CRUNCH_PROGS_bin+= csh +CRUNCH_ALIAS_csh= -csh tcsh -tcsh +CRUNCH_BUILDTOOLS+= bin/csh +CRUNCH_SUPPRESS_LINK_-csh= 1 +CRUNCH_SUPPRESS_LINK_-tcsh= 1 +.endif + +################################################################### +# Programs from standard /sbin +# +# WARNING: Changing this list may require adjusting +# /usr/include/paths.h as well! You were warned! +# +# Note that mdmfs have their own private 'pathnames.h' +# headers in addition to the standard 'paths.h' header. +# +CRUNCH_SRCDIRS+= sbin +CRUNCH_PROGS_sbin= \ + camcontrol clri devfs dmesg dump \ + dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb \ + fsirand gbde geom ifconfig init \ + kldconfig kldload kldstat kldunload ldconfig \ + md5 mdconfig mdmfs mknod mount mount_cd9660 \ + mount_msdosfs mount_nfs mount_nullfs \ + mount_udf mount_unionfs newfs \ + newfs_msdos nos-tun reboot \ + restore rcorder route savecore \ + shutdown swapon sysctl tunefs umount + +.if ${MK_CCD} != "no" +CRUNCH_PROGS_sbin+= ccdconfig +.endif + +.if ${MK_INET} != "no" || ${MK_INET6} != "no" +CRUNCH_PROGS_sbin+= ping +.endif + +.if ${MK_INET6_SUPPORT} != "no" +CRUNCH_ALIAS_ping= ping6 +CRUNCH_PROGS_sbin+= rtsol +.endif + +.if ${MK_IPFILTER} != "no" +CRUNCH_PROGS_sbin+= ipf +CRUNCH_LIBS_ipf+= ${LIBIPF} +.endif + +.if ${MK_ROUTED} != "no" +CRUNCH_PROGS_sbin+= routed rtquery +.endif + +.if ${MK_ZFS} != "no" +CRUNCH_PROGS_sbin+= bectl +CRUNCH_PROGS_sbin+= zfs +CRUNCH_PROGS_sbin+= zpool +CRUNCH_PROGS_usr.sbin+= zdb +.endif + +# crunchgen does not like C++ programs; this should be fixed someday +# CRUNCH_PROGS+= devd + +CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma +.if ${MK_ZFS} != "no" +CRUNCH_LIBS+= -lavl -lpthread -luutil -lumem -ltpool -lspl -lrt +CRUNCH_LIBS_zfs+= ${LIBBE} \ + ${LIBZPOOL} \ + ${LIBZFS} \ + ${LIBZUTIL} \ + ${LIBZFS_CORE} \ + ${LIBZFSBOOTENV} \ + ${LIBICP_RESCUE} \ + ${LIBNVPAIR} +CRUNCH_LIBS_bectl+= ${CRUNCH_LIBS_zfs} +CRUNCH_LIBS_zpool+= ${CRUNCH_LIBS_zfs} - CRUNCH_LIBS_zdb+= ${CRUNCH_LIBS_zfs} ++CRUNCH_LIBS_zdb+= ${CRUNCH_LIBS_zfs} ${LIBZDB} +.else +# liblzma needs pthread +CRUNCH_LIBS+= -lpthread +.endif +CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv +.if ${MK_OPENSSL} == "no" +CRUNCH_LIBS+= -lmd +.endif +CRUNCH_LIBS+= -lmt -lsbuf -lufs -lz + +.if ${MACHINE_CPUARCH} == "i386" +CRUNCH_PROGS_sbin+= bsdlabel fdisk +CRUNCH_ALIAS_bsdlabel= disklabel +#CRUNCH_PROGS+= mount_smbfs +#CRUNCH_LIBS+= -lsmb +.endif + +.if ${MACHINE_CPUARCH} == "amd64" +CRUNCH_PROGS_sbin+= bsdlabel fdisk +CRUNCH_ALIAS_bsdlabel= disklabel +.endif + +CRUNCH_SRCDIR_rtquery= ${SRCTOP}/sbin/routed/rtquery +CRUNCH_SRCDIR_ipf= ${SRCTOP}/sbin/ipf/ipf +.if ${MK_ZFS} != "no" +CRUNCH_SRCDIR_zfs= ${SRCTOP}/cddl/sbin/zfs +CRUNCH_SRCDIR_zpool= ${SRCTOP}/cddl/sbin/zpool +CRUNCH_SRCDIR_zdb= ${SRCTOP}/cddl/usr.sbin/zdb +.endif +CRUNCH_ALIAS_reboot= fastboot halt fasthalt +CRUNCH_ALIAS_restore= rrestore +CRUNCH_ALIAS_dump= rdump +CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs +CRUNCH_ALIAS_geom= glabel gpart +CRUNCH_ALIAS_shutdown= poweroff + +# dhclient has historically been troublesome... +CRUNCH_PROGS_sbin+= dhclient + +################################################################## +# Programs from stock /usr/bin +# +CRUNCH_SRCDIRS+= usr.bin + +CRUNCH_PROGS_usr.bin= head mt sed tail tee + +CRUNCH_PROGS_usr.bin+= gzip +CRUNCH_ALIAS_gzip= gunzip gzcat zcat + +CRUNCH_PROGS_usr.bin+= bzip2 +CRUNCH_ALIAS_bzip2= bunzip2 bzcat +CRUNCH_LIBS+= -lbz2 + +CRUNCH_PROGS_usr.bin+= less +CRUNCH_ALIAS_less= more + +CRUNCH_PROGS_usr.bin+= xz +CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat lzcat + +CRUNCH_PROGS_usr.bin+= zstd +CRUNCH_ALIAS_zstd= unzstd zstdcat zstdmt +CRUNCH_LIBS+= ${LDADD_zstd} + +CRUNCH_PROGS_usr.bin+= fetch +CRUNCH_LIBS+= -lfetch + +CRUNCH_PROGS_usr.bin+= tar +CRUNCH_LIBS+= -larchive +.if ${MK_OPENSSL} != "no" +CRUNCH_LIBS+= -lssl -lcrypto +.endif +CRUNCH_LIBS+= -lmd + +.if ${MK_NETCAT} != "no" +CRUNCH_PROGS_usr.bin+= nc +.endif + +.if ${MK_VI} != "no" +CRUNCH_PROGS_usr.bin+= vi +CRUNCH_ALIAS_vi= ex +.endif + +CRUNCH_PROGS_usr.bin+= id +CRUNCH_ALIAS_id= groups whoami + +################################################################## +# Programs from stock /usr/sbin +# +CRUNCH_SRCDIRS+= usr.sbin + +CRUNCH_PROGS_usr.sbin+= chroot + +CRUNCH_PROGS_usr.sbin+= chown +CRUNCH_ALIAS_chown= chgrp +################################################################## + +CRUNCH_LIBS+= ${OBJTOP}/lib/libifconfig/libifconfig.a +CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libifconfig + +CRUNCH_LIBS_ifconfig+= ${LIBNV} + +CRUNCH_LIBS+= -lm + +.if ${MK_ISCSI} != "no" +CRUNCH_PROGS_usr.bin+= iscsictl +CRUNCH_PROGS_usr.sbin+= iscsid + +CRUNCH_LIBS+= ${OBJTOP}/lib/libiscsiutil/libiscsiutil.a +CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libiscsiutil +.endif + +.include +.include diff --cc share/mk/bsd.libnames.mk index db08a5ac718c,000000000000..414ae3164066 mode 100644,000000..100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@@ -1,221 -1,0 +1,222 @@@ + +# The include file define library names. +# Other include files (e.g. bsd.prog.mk, bsd.lib.mk) include this +# file where necessary. + +.if !target(____) +.error bsd.libnames.mk cannot be included directly. +.endif + +LIBDESTDIR?= ${SYSROOT:U${DESTDIR}} + +.sinclude + +# Src directory locations are also defined in src.libnames.mk. + +LIBCRT0?= ${LIBDESTDIR}${LIBDIR_BASE}/crt0.o + +LIB80211?= ${LIBDESTDIR}${LIBDIR_BASE}/lib80211.a +LIB9P?= ${LIBDESTDIR}${LIBDIR_BASE}/lib9p.a +LIBALIAS?= ${LIBDESTDIR}${LIBDIR_BASE}/libalias.a +LIBARCHIVE?= ${LIBDESTDIR}${LIBDIR_BASE}/libarchive.a +LIBASN1?= ${LIBDESTDIR}${LIBDIR_BASE}/libasn1.a +LIBATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libatm.a +LIBAUDITD?= ${LIBDESTDIR}${LIBDIR_BASE}/libauditd.a +LIBAVL?= ${LIBDESTDIR}${LIBDIR_BASE}/libavl.a +LIBBE?= ${LIBDESTDIR}${LIBDIR_BASE}/libbe.a +LIBBEGEMOT?= ${LIBDESTDIR}${LIBDIR_BASE}/libbegemot.a +LIBBLACKLIST?= ${LIBDESTDIR}${LIBDIR_BASE}/libblacklist.a +LIBBLOCKSRUNTIME?= ${LIBDESTDIR}${LIBDIR_BASE}/libBlocksRuntime.a +LIBBLUETOOTH?= ${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a +LIBBSDXML?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsdxml.a +LIBBSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsm.a +LIBBSNMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsnmp.a +LIBBZ2?= ${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a +LIBC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc.a +LIBCALENDAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a +LIBCAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcam.a +LIBCOMPAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a +LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a +LIBCOM_ERR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a +LIBCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libc++.a +LIBCRYPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a +LIBCRYPTO?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a +LIBCTF?= ${LIBDESTDIR}${LIBDIR_BASE}/libctf.a +LIBCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a +LIBCUSE?= ${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a +LIBCXGB4?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a +LIBCXXRT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a +LIBC_PIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a +LIBDEVCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a +LIBDEVDCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a +LIBDEVINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a +LIBDEVSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a +LIBDIALOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a +LIBDL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdl.a +LIBDNS?= ${LIBDESTDIR}${LIBDIR_BASE}/libdns.a +LIBDPV?= ${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a +LIBDTRACE?= ${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a +LIBDWARF?= ${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a +LIBEDIT?= ${LIBDESTDIR}${LIBDIR_BASE}/libedit.a +LIBEFIVAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a +LIBELF?= ${LIBDESTDIR}${LIBDIR_BASE}/libelf.a +LIBEXECINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a +LIBFETCH?= ${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a +LIBFIGPAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a +LIBFL?= "don't use LIBFL, use LIBL" +LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a +LIBG2C?= ${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a +LIBGEOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a +LIBGPIO?= ${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a +LIBGSSAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a +LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a +LIBHDB?= ${LIBDESTDIR}${LIBDIR_BASE}/libhdb.a +LIBHEIMBASE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimbase.a +LIBHEIMNTLM?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimntlm.a +LIBHEIMSQLITE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimsqlite.a +LIBHX509?= ${LIBDESTDIR}${LIBDIR_BASE}/libhx509.a +LIBIBCM?= ${LIBDESTDIR}${LIBDIR_BASE}/libibcm.a +LIBIBMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibmad.a +LIBIBNETDISC?= ${LIBDESTDIR}${LIBDIR_BASE}/libibnetdisc.a +LIBIBUMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibumad.a +LIBIBVERBS?= ${LIBDESTDIR}${LIBDIR_BASE}/libibverbs.a +LIBICP?= ${LIBDESTDIR}${LIBDIR_BASE}/libicp.a +LIBIPSEC?= ${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a +LIBIPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libipt.a +LIBIRDMA?= ${LIBDESTDIR}${LIBDIR_BASE}/libirdma.a +LIBISCSIUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libiscsiutil.a +LIBJAIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libjail.a +LIBKADM5CLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a +LIBKADM5SRV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a +LIBKAFS5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a +LIBKDC?= ${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a +LIBKEYCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a +LIBKICONV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a +LIBKRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a +LIBKVM?= ${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a +LIBL?= ${LIBDESTDIR}${LIBDIR_BASE}/libl.a +LIBLN?= "don't use LIBLN, use LIBL" +LIBLZMA?= ${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a +LIBM?= ${LIBDESTDIR}${LIBDIR_BASE}/libm.a +LIBMAGIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a +LIBMD?= ${LIBDESTDIR}${LIBDIR_BASE}/libmd.a +LIBMEMSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a +LIBMENU?= ${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a +LIBMILTER?= ${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a +LIBMLX4?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a +LIBMLX5?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx5.a +LIBMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libmp.a +LIBMT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmt.a +LIBNCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a +LIBNCURSESW?= ${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a +LIBNETGRAPH?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a +LIBNETMAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetmap.a +LIBNGATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a +LIBNV?= ${LIBDESTDIR}${LIBDIR_BASE}/libnv.a +LIBNVPAIR?= ${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a +LIBOPENCSD?= ${LIBDESTDIR}${LIBDIR_BASE}/libopencsd.a +LIBOPENSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a +LIBOSMCOMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a +LIBOSMVENDOR?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a +LIBPAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libpam.a +LIBPANEL?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a +LIBPANELW?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a +LIBPCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a +LIBPJDLOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a +LIBPMC?= ${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a +LIBPROC?= ${LIBDESTDIR}${LIBDIR_BASE}/libproc.a +LIBPROCSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a +LIBPTHREAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a +LIBRADIUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libradius.a +LIBRDMACM?= ${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a +LIBREGEX?= ${LIBDESTDIR}${LIBDIR_BASE}/libregex.a +LIBROKEN?= ${LIBDESTDIR}${LIBDIR_BASE}/libroken.a +LIBRPCSEC_GSS?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a +LIBRPCSVC?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a +LIBRT?= ${LIBDESTDIR}${LIBDIR_BASE}/librt.a +LIBRTLD_DB?= ${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a +LIBSBUF?= ${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a +LIBSDP?= ${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a +LIBSMB?= ${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a +LIBSPL?= ${LIBDESTDIR}${LIBDIR_BASE}/libspl.a +LIBSSL?= ${LIBDESTDIR}${LIBDIR_BASE}/libssl.a +LIBSSP_NONSHARED?= ${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a +LIBSTATS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstats.a +LIBSTDTHREADS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a +LIBSYSDECODE?= ${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a +LIBTACPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a +LIBTERMCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a +LIBTERMCAPW?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a +LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP" +LIBTINFOW= ${LIBDESTDIR}${LIBDIR_BASE}/libtinfow.a +LIBTPOOL?= ${LIBDESTDIR}${LIBDIR_BASE}/libtpool.a +LIBUFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libufs.a +LIBUGIDFW?= ${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a +LIBULOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libulog.a +LIBUMEM?= ${LIBDESTDIR}${LIBDIR_BASE}/libumem.a +LIBUSB?= ${LIBDESTDIR}${LIBDIR_BASE}/libusb.a +LIBUSBHID?= ${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a +LIBUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libutil.a +LIBUUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a +LIBVGL?= ${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a +LIBVMMAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a +LIBWIND?= ${LIBDESTDIR}${LIBDIR_BASE}/libwind.a +LIBWRAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a +LIBXO?= ${LIBDESTDIR}${LIBDIR_BASE}/libxo.a +LIBXPG4?= ${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a +LIBY?= ${LIBDESTDIR}${LIBDIR_BASE}/liby.a +LIBYPCLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a +LIBZ?= ${LIBDESTDIR}${LIBDIR_BASE}/libz.a ++LIBZDB?= ${LIBDESTDIR}${LIBDIR_BASE}/libzdb.a +LIBZFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a +LIBZFS_CORE?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a +LIBZFSBOOTENV?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfsbootenv.a +LIBZPOOL?= ${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a +LIBZUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libzutil.a + +# enforce the 2 -lpthread and -lc to always be the last in that exact order +.if defined(LDADD) +.if ${LDADD:M-lpthread} +LDADD:= ${LDADD:N-lpthread} -lpthread +.endif +.if ${LDADD:M-lc} +LDADD:= ${LDADD:N-lc} -lc +.endif +.endif + +# Only do this for src builds. +.if defined(SRCTOP) +.if defined(_LIBRARIES) && defined(LIB) && \ + ${_LIBRARIES:M${LIB}} != "" +.if !defined(LIB${LIB:tu}) +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIBDESTDIR}$${LIBDIR_BASE}/lib${LIB}.a +.endif +.endif + +# Derive LIB*SRCDIR from LIB*DIR +.for lib in ${_LIBRARIES} +LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} +.endfor +.else + +# Out of tree builds + +# There are LIBADD defined in an out-of-tree build. Are they *all* +# in-tree libraries? If so convert them to LDADD to support +# partial checkouts. +.if !empty(LIBADD) +_convert_libadd= 1 +.for l in ${LIBADD} +.if empty(LIB${l:tu}) +_convert_libadd= 0 +.endif +.endfor +.if ${_convert_libadd} == 1 +.warning Converting out-of-tree build LIBADDs into LDADD. This is not fully supported. +.for l in ${LIBADD} +LDADD+= -l${l} +.endfor +.endif +.endif + +.endif # defined(SRCTOP) diff --cc share/mk/src.libnames.mk index 5a6932614b29,000000000000..658dd1c3d699 mode 100644,000000..100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@@ -1,804 -1,0 +1,807 @@@ +# +# The include file define library names suitable +# for INTERNALLIB and PRIVATELIB definition + +.if !target(____) +.error src.libnames.mk cannot be included directly. +.endif + +.if !target(____) +____: + +.include + +_PRIVATELIBS= \ + atf_c \ + atf_cxx \ + auditd \ + bsddialog \ + bsdstat \ + cbor \ + devdctl \ + event1 \ + fido2 \ + gmock \ + gtest \ + gmock_main \ + gtest_main \ + heimipcc \ + heimipcs \ + ldns \ + sqlite3 \ + ssh \ + ucl \ + unbound \ + zstd + +# Let projects based on FreeBSD append to _PRIVATELIBS +# by maintaining their own LOCAL_PRIVATELIBS list. +_PRIVATELIBS+= ${LOCAL_PRIVATELIBS} + +_INTERNALLIBS= \ + amu \ + bsnmptools \ + c_nossp_pic \ + cron \ + elftc \ + fifolog \ + ifconfig \ + ipf \ + iscsiutil \ + lpr \ + lua \ + lutok \ + netbsd \ + ntp \ + ntpevent \ + openbsd \ + opts \ + parse \ + pe \ + pfctl \ + pmcstat \ + sl \ + sm \ + smdb \ + smutil \ + telnet \ + vers \ + wpaap \ + wpacommon \ + wpacrypto \ + wpadrivers \ + wpaeap_common \ + wpaeap_peer \ + wpaeap_server \ + wpaeapol_auth \ + wpaeapol_supp \ + wpal2_packet \ + wparadius \ + wparsn_supp \ + wpatls \ + wpautils \ + wpawps + +# Let projects based on FreeBSD append to _INTERNALLIBS +# by maintaining their own LOCAL_INTERNALLIBS list. +_INTERNALLIBS+= ${LOCAL_INTERNALLIBS} + +_LIBRARIES= \ + ${_PRIVATELIBS} \ + ${_INTERNALLIBS} \ + ${LOCAL_LIBRARIES} \ + 80211 \ + 9p \ + alias \ + archive \ + asn1 \ + avl \ + BlocksRuntime \ + be \ + begemot \ + bluetooth \ + bsdxml \ + bsm \ + bsnmp \ + bz2 \ + c \ + c_pic \ + calendar \ + cam \ + casper \ + cap_dns \ + cap_fileargs \ + cap_grp \ + cap_net \ + cap_netdb \ + cap_pwd \ + cap_sysctl \ + cap_syslog \ + com_err \ + compiler_rt \ + crypt \ + crypto \ + ctf \ + cuse \ + cxxrt \ + devctl \ + devdctl \ + devinfo \ + devstat \ + dialog \ + dl \ + dpv \ + dtrace \ + dwarf \ + edit \ + efivar \ + elf \ + execinfo \ + fetch \ + figpar \ + formw \ + geom \ + gpio \ + gssapi \ + gssapi_krb5 \ + hdb \ + heimbase \ + heimntlm \ + heimsqlite \ + hx509 \ + icp \ + ipsec \ + ipt \ + jail \ + kadm5clnt \ + kadm5srv \ + kafs5 \ + kdc \ + kiconv \ + krb5 \ + kvm \ + l \ + lzma \ + m \ + magic \ + md \ + memstat \ + mp \ + mt \ + ncursesw \ + netgraph \ + netmap \ + ngatm \ + nv \ + nvpair \ + opencsd \ + pam \ + panel \ + panelw \ + pcap \ + pcsclite \ + pjdlog \ + pmc \ + proc \ + procstat \ + pthread \ + radius \ + regex \ + roken \ + rpcsec_gss \ + rpcsvc \ + rt \ + rtld_db \ + sbuf \ + sdp \ + sm \ + smb \ + spl \ + ssl \ + ssp_nonshared \ + stats \ + stdthreads \ + supcplusplus \ + sys \ + sysdecode \ + tacplus \ + termcapw \ + tinfow \ + tpool \ + ufs \ + ugidfw \ + ulog \ + umem \ + usb \ + usbhid \ + util \ + uutil \ + vmmapi \ + wind \ + wrap \ + xo \ + y \ + ypclnt \ + z \ ++ zdb \ + zfs_core \ + zfs \ + zfsbootenv \ + zpool \ + zutil + +.if ${MK_BLACKLIST} != "no" +_LIBRARIES+= \ + blacklist \ + +.endif + +.if ${MK_OFED} != "no" +_LIBRARIES+= \ + cxgb4 \ + ibcm \ + ibmad \ + ibnetdisc \ + ibumad \ + ibverbs \ + irdma \ + mlx4 \ + mlx5 \ + rdmacm \ + osmcomp \ + opensm \ + osmvendor +.endif + +.if ${MK_BEARSSL} == "yes" +_LIBRARIES+= \ + bearssl \ + secureboot \ + +LIBBEARSSL?= ${LIBBEARSSLDIR}/libbearssl.a +LIBSECUREBOOT?= ${LIBSECUREBOOTDIR}/libsecureboot.a +.endif + +.if ${MK_VERIEXEC} == "yes" +_LIBRARIES+= veriexec + +LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec.a +.endif + +# Each library's LIBADD needs to be duplicated here for static linkage of +# 2nd+ order consumers. Auto-generating this would be better. +_DP_80211= sbuf bsdxml *** 1766 LINES SKIPPED *** From nobody Thu Feb 8 16:36:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gJ53nXz5B0jh; Thu, 8 Feb 2024 16:36: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 4TW2gJ4YCDz4My0; Thu, 8 Feb 2024 16:36:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IHbV1cw3RwQupGpCJWdLLB/09jNJCBDNac2YnvZSm+Y=; b=qMuRRdZYVgEbx3NHQffZ0BpXthZB1oI4tkFWhlIAauXdFjiCEUvYgi4ZqBM2jWSwaqylME UcqFZEIMmiPH7W/pa+tAH2LiuLU4lbnldL6jYqhCURCnMKwwgWn+bVLnNP1TWhg1ZIaV6l 4B4jpTB87bLO+p87e0VBqpaddy0UcltXZlMMkHz9yqNsaZZI8e3CUcVKjykgFlfiY9zBiT iKs+9Lz/arSKR67fwrW2zjK0qGO1tFvk/vwB5c9KOZ/vvesdx1ErnSTYlVDbjh8E/Kfk/Q k+r1lXWIbFfwvPwPp9Z6sccUqNKKHTE1YLsLDTFqvbUicmv6pyzVAKiCj6gggg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IHbV1cw3RwQupGpCJWdLLB/09jNJCBDNac2YnvZSm+Y=; b=bcL8FFCOeS2+WRzeJlJjlplBCmyv4zr1ecKtLWQagyE3T0XZVJBMRRa/huplMq80+KUTdH eRITDXoqoyKteDdVVMKoXGe3zPUr7X3o6j3RcC9BQ8bMobnVgdD0+DXo/Wex9PDq6Ow/BF Py9ulbfBWDGLUcSs5ohR8ivvgwPTZ7DODcNK8a9OBDabs2/9is703nKHQTeurfs/5MrSC1 bKtqrM6CkozohLlOw6Km33dvQnXXxqW2nPAfyyc6MrHVdb461oPXZNoLaS+5TlX6ieNVsq IrpIXcf5K1S+9LLQ8D+KnJtL3q+7xjnhqQiawKhxKlUGWNertINUzN0IyjZg/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410188; a=rsa-sha256; cv=none; b=TaCSZCAZRGEVH2ct/rjcAju/c5bwdF1PkGJk84wbl1AVhPlsL0CCZOgtVQ37Ha6+xQX51J gdmHI1cs2TU9Lo+qc0nYI8EGcitPVoLIossVtMAMiBU//pn1am05y5aoriMxWK/Sdm4I5e WWYhHKp0r9Za6sycFbU3AuJyf7pHgqnhftyLoisxrn2c2h79MZGRAez9z3Qmd0/I38jGuj uMGGOiDmBWJj9e6xb8ECxLyXo/0v9Z6r6pNFhopcKmXsw/mpn7+lcr9dVJ64JAeOL1QBLz QYiuyLQd4sqKEWHtJVc/KIa2c58gm/qjU2EUyBmiJq/YdwEhnvPT1p5jgtQHPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gJ3bg8zxF9; Thu, 8 Feb 2024 16:36: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 418GaSRP020540; Thu, 8 Feb 2024 16:36:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaSgM020537; Thu, 8 Feb 2024 16:36:28 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:28 GMT Message-Id: <202402081636.418GaSgM020537@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: e04a75a4ec82 - main - arm64: Fix the unwind.c build when sanitizers are enabled List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e04a75a4ec8240050e2782202f45bdd88d0a7cdf Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e04a75a4ec8240050e2782202f45bdd88d0a7cdf commit e04a75a4ec8240050e2782202f45bdd88d0a7cdf Author: Mark Johnston AuthorDate: 2024-02-08 15:39:40 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:22:58 +0000 arm64: Fix the unwind.c build when sanitizers are enabled The presence of -fno-sanitize-memory-param-retval without an accompanying -fsanitize=kernel-memory triggers a compiler error. MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/conf/files.arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 0eed3db41b16..dcdd429c14c4 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -81,7 +81,7 @@ arm64/arm64/uio_machdep.c standard arm64/arm64/uma_machdep.c standard arm64/arm64/undefined.c standard arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack \ - compile-with "${NORMAL_C:N-fsanitize*}" + compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*}" arm64/arm64/vfp.c standard arm64/arm64/vm_machdep.c standard From nobody Thu Feb 8 16:36:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gK6zcgz5B0jn; Thu, 8 Feb 2024 16:36: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 4TW2gK5pGVz4Mm6; Thu, 8 Feb 2024 16:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=udWwrfGRrX2bZt2vLHOOfGxzcQA8b8kh6cjrrXdUKS0=; b=BeSR/0AHMxhwUiyDZJ0BPQwpkhhNVrDVMXKr4EEodMMOofxxYJHh6maJPNAlADRdT56YXS F26B+lf+QxOqWFD8iRL9d/+ejEFczppWpM+vCNO/yTq4ECTfz8FMrhME/cmsVqCALfDt3s D8XFlgrIgy/dSlH5oHKZY3pr/9W8Bj8KRcK6LFAdo0Ba7fC78FpZJ761kDeQQxufe4hq3x 3+0P1GN/hnM5AahsiY2ePV5wsBYX4XaPHEBIp/nyCy/FhM7YZ7juCjUzHYH5nyG4wJKJx5 BXdniEDqXhJ2Oj2QQYgxvcEhTvcUcDYfk7pAAwcGERBxvnwRxfxYOaQnVmPZlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=udWwrfGRrX2bZt2vLHOOfGxzcQA8b8kh6cjrrXdUKS0=; b=TLbvOrTPPaDkP9lJ3uBQxEduj46iYFEmxOBStnPOctBeVgiQWhJ190Wt8RALXj/v+5FgBf ozjDmiimk0s/x/gepMddo+Be3kDjEUBibWaQmG7AO+ivd9oKSBTz5zCFKS7wI4e0NN1tVU ygV0ZPlBmTjX1LRg5mOEGrIMJGsi3UwI/6aC5KFLVRvPv4ERzf0rSRYGYNnnNkTIqz04GK BVrMgubcWKZVQ9//mAzFyDpOKYooFnw9n0KBtjubylfOMOwcNncTt6KGHFFRie8rbONBzJ CsrOamy28HEbGVBTJaL403hBqfA1J7wYxTlSANDiWWanR0EmQY4vDr37xitkXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410189; a=rsa-sha256; cv=none; b=J49sddHkAJ6tnQ/nxVl+GuBEdZ0TCQi3iWspnq0qpLix6bu+PQy4MLe/03txaWGML5WO16 eBZlCvQ3Mmt9uLX5GenJ5Fzhh4GozUGN+Bq9vu0+ygkMrv6dISZvQT+S4Dk7XvsQKmf1j2 m41/ku6EhpoCtx3euw4vgs6taZsLaUEak9Csc2104NOs9Ruzx12AquwZjXhUAaMgqRZlxa p4HqBjLu6pHe0x+3J9zU+KXQwLf/ebNDw8amc+X4yCvrNEW6IXki9SyOUWGBDJ/tP6d17E Pe/SNq/eGMSDZaCvhX/yr9AAPTyYJmyOimOLSCToNG2Wxp3UXVjzxpsUvDMUDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gK4ZRTzxFB; Thu, 8 Feb 2024 16:36: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 418GaTdp020585; Thu, 8 Feb 2024 16:36:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaTNH020582; Thu, 8 Feb 2024 16:36:29 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:29 GMT Message-Id: <202402081636.418GaTNH020582@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: 92eb673b2b0d - main - kmsan: Add some additional bus_space accessors List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92eb673b2b0d229ba046d386f19df7c01c09b26f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=92eb673b2b0d229ba046d386f19df7c01c09b26f commit 92eb673b2b0d229ba046d386f19df7c01c09b26f Author: Mark Johnston AuthorDate: 2024-02-08 15:40:11 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:22:58 +0000 kmsan: Add some additional bus_space accessors These are needed for arm64 support. Co-authored-by: Alexander Stetsenko Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/kern/subr_msan.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index ef3c6c10b0ba..ee60d6baf3fa 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -1391,13 +1391,18 @@ kmsan_bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t hnd, bus_space_barrier(tag, hnd, offset, size, flags); } -/* XXXMJ x86-specific */ +#if defined(__amd64__) +#define BUS_SPACE_IO(tag) ((tag) == X86_BUS_SPACE_IO) +#else +#define BUS_SPACE_IO(tag) (false) +#endif + #define MSAN_BUS_READ_FUNC(func, width, type) \ type kmsan_bus_space_read##func##_##width(bus_space_tag_t tag, \ bus_space_handle_t hnd, bus_size_t offset) \ { \ type ret; \ - if ((tag) != X86_BUS_SPACE_IO) \ + if (!BUS_SPACE_IO(tag)) \ kmsan_shadow_fill((uintptr_t)(hnd + offset), \ KMSAN_STATE_INITED, (width)); \ ret = bus_space_read##func##_##width(tag, hnd, offset); \ @@ -1438,6 +1443,13 @@ MSAN_BUS_READ_PTR_FUNC(region, 4, uint32_t) MSAN_BUS_READ_PTR_FUNC(region_stream, 4, uint32_t) MSAN_BUS_READ_FUNC(, 8, uint64_t) +#ifndef __amd64__ +MSAN_BUS_READ_FUNC(_stream, 8, uint64_t) +MSAN_BUS_READ_PTR_FUNC(multi, 8, uint64_t) +MSAN_BUS_READ_PTR_FUNC(multi_stream, 8, uint64_t) +MSAN_BUS_READ_PTR_FUNC(region, 8, uint64_t) +MSAN_BUS_READ_PTR_FUNC(region_stream, 8, uint64_t) +#endif #define MSAN_BUS_WRITE_FUNC(func, width, type) \ void kmsan_bus_space_write##func##_##width(bus_space_tag_t tag, \ @@ -1504,6 +1516,28 @@ MSAN_BUS_SET_FUNC(region, 4, uint32_t) MSAN_BUS_SET_FUNC(multi_stream, 4, uint32_t) MSAN_BUS_SET_FUNC(region_stream, 4, uint32_t) +#define MSAN_BUS_PEEK_FUNC(width, type) \ + int kmsan_bus_space_peek_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type *value) \ + { \ + return (bus_space_peek_##width(tag, hnd, offset, value)); \ + } + +MSAN_BUS_PEEK_FUNC(1, uint8_t) +MSAN_BUS_PEEK_FUNC(2, uint16_t) +MSAN_BUS_PEEK_FUNC(4, uint32_t) + +#define MSAN_BUS_POKE_FUNC(width, type) \ + int kmsan_bus_space_poke_##width(bus_space_tag_t tag, \ + bus_space_handle_t hnd, bus_size_t offset, type value) \ + { \ + return (bus_space_poke_##width(tag, hnd, offset, value)); \ + } + +MSAN_BUS_POKE_FUNC(1, uint8_t) +MSAN_BUS_POKE_FUNC(2, uint16_t) +MSAN_BUS_POKE_FUNC(4, uint32_t) + /* -------------------------------------------------------------------------- */ void From nobody Thu Feb 8 16:36:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gM3L32z5B0V8; Thu, 8 Feb 2024 16:36: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 4TW2gL6YZ1z4Mdm; Thu, 8 Feb 2024 16:36:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrotmTWrPt4RHyrTZL4gE6K6B01yRfzzmIVi9lz9Hjc=; b=P8pdtytO1U1+sKOIxt1MSSbLhroiK+hcx0lL+KtPgjBJjTNpsocVEaC7e7xnnB1iR1SuVc aNir84DMb2Blakfoz+8sA6lBxIN+QTQbkRW4KgwDEb4ztLwNNjMOOTv/OwtSzSM58tN/7Q yVVYbHMRZaXRcSjjcMoYN+TYAqlfki2vp9E9KseP98qqCIzJoH2B9zx1oTk1qO6KKONjg5 OQVuTuFl00xS5aVbASb8c6bTFyvTeZg0lJH4trVH4ZdXfHOAVqfRoLsp1dY1hzb2d0BFdu 6ELlOVQGlYMFTGMwJuQvz7T9pn0XaZyglK5Fp6KQTGUGbvC4fvg4xQANyoUPGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrotmTWrPt4RHyrTZL4gE6K6B01yRfzzmIVi9lz9Hjc=; b=HtFtLJl2YCkkbcZ/Qi4dcugYp4CvGbgIBA1d0GClhEqzD1c1tUpy66T9KWSzfdmTOFCB/o qEbdcmM4PEzThrv1vjaI6zS5daCL/nlS9vBn3JNb1J2JoXHuTli7tOzURTlnqhBmjWs0i/ PG1mZ4vs+Pvmz0VMQr1eydX3k7oi/IvP50hIVipwf/ZuKzPQoNF5tHiEvrr6K8suPa7Vp2 rfy1NgvJn8XuexyohBHmtLPKCZrj5Z+R0yfCOZGeul05AqluwIKzIdGf6trcTdFt1MAVdG TL81sTS69/AuJanPmaTGhmJE6hu0hmEgJqtAbIq0tpnk9xx4r0K+cvbH02qfTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410190; a=rsa-sha256; cv=none; b=Fe7/e+IGqRohng1tqF5NrOAQC1fWhvf5jVYtTZYRfo1QmgepuxLsRPfoFMW7kVW71SDHTe VMAjcKb4aeOdF3jygRfP4xqU6/fXdV48c+yxKCOqFZ2q/6M5T/G7TsFLa3A1gF0Fk0k+fF F0R8RLD8NBGtg4+1sfraVeZhrMYh8lYqie4oIQRP2+gmpUFNDds8E54YkmAwPxDIlRtouh xBXpvMHbcoOBPTeZEXaHlksOHGgxOrRZYkZ1oPy489PA8nbueqKFo8ImyzpuSDDFTDTQCk IMeXzq09t9zTQwXOfDqX4/RtOxJN/1+8Hmvzd3s61bt7VbFCQFpIa/JIh5w3Iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gL586XzwtS; Thu, 8 Feb 2024 16:36: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 418GaUcp020631; Thu, 8 Feb 2024 16:36:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaUfa020628; Thu, 8 Feb 2024 16:36:30 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:30 GMT Message-Id: <202402081636.418GaUfa020628@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: b5ed3ef802eb - main - ck/aarch64: Specify output operands for ck_pr_md_store_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5ed3ef802ebfed6f08008bff602834b18f83a11 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b5ed3ef802ebfed6f08008bff602834b18f83a11 commit b5ed3ef802ebfed6f08008bff602834b18f83a11 Author: Mark Johnston AuthorDate: 2024-02-08 15:53:10 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:03 +0000 ck/aarch64: Specify output operands for ck_pr_md_store_* This is a backport of upstream commit d1e9f03b89: ck_pr/aarch64: Specify output operands for ck_pr_md_store_* As in commit 2f9acab, we want to specify output operand widths so that MSAN compiler instrumentation correctly updates the shadow map. In particular, LLVM's implementation depends on having type information for output operands, even when that's not otherwise necessary. Without it, KMSAN in FreeBSD generates false positives on aarch64. Reviewed by: cognet MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/contrib/ck/include/gcc/aarch64/ck_pr.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/ck/include/gcc/aarch64/ck_pr.h b/sys/contrib/ck/include/gcc/aarch64/ck_pr.h index 0a473072fffd..3d269a5066c2 100644 --- a/sys/contrib/ck/include/gcc/aarch64/ck_pr.h +++ b/sys/contrib/ck/include/gcc/aarch64/ck_pr.h @@ -137,8 +137,8 @@ CK_PR_LOAD_S_64(double, double, "ldr") CK_CC_INLINE static void \ ck_pr_md_store_##S(M *target, T v) \ { \ - __asm__ __volatile__(I " %w1, [%0]" \ - : \ + __asm__ __volatile__(I " %w2, [%1]" \ + : "=m" (*(T *)target) \ : "r" (target), \ "r" (v) \ : "memory"); \ @@ -148,8 +148,8 @@ CK_PR_LOAD_S_64(double, double, "ldr") CK_CC_INLINE static void \ ck_pr_md_store_##S(M *target, T v) \ { \ - __asm__ __volatile__(I " %1, [%0]" \ - : \ + __asm__ __volatile__(I " %2, [%1]" \ + : "=m" (*(T *)target) \ : "r" (target), \ "r" (v) \ : "memory"); \ From nobody Thu Feb 8 16:36:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gP2s3hz5B0Rp; Thu, 8 Feb 2024 16:36: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 4TW2gP10jsz4NBg; Thu, 8 Feb 2024 16:36:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7KSiix/BFUiZezGvhaGVqUgT/IFetTH3a2RYIip6rg=; b=CPFA08lUc71X5KOAgIPWSAXlZj4ivlFUPtyN9h8P43zAM0OfJ/QaJg9/6NyYA2os4XpG64 6/kXuscl9KcCkPkWioX0IPH3j421Rhf1rlG3CjALIB9hG73yplWC4NBair8z6GpeazdZ7A fb+BlgbE4L3aaJwVWTZRLt6Zb7yX4PlsRioUPqXS/WrpGkXTpbeWs1lr9+wYI5kp2wxytQ LHfoedxJ9rE2JvOovdOBIbiI1H/glbktJQtrO+PjbVuvytbTdJZtJibnExOuIs+FCLJoHC P94sKaU2lHeGTXRQlP9pJ1qQsIuYXG8Qqq4Nwc4KwZr94+i43uc2d2Lx1AMWGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7KSiix/BFUiZezGvhaGVqUgT/IFetTH3a2RYIip6rg=; b=fsazLW0ReCUqTl3jv5Q5bfOTjRTg/xYlTQIdCcPUlTb08KkKiS5bFNYxLvIjaW/WJnjwAJ p2hZd1IC9rwj8a9pvwwPvMubqbwusdm8WIpDjNmuQBYRZncC9OYy7Prk/QIaNUx1mXraqv rn0xPb6Jsarpur95jqyiuhO21ONufUkJhf0TPfmQeWmQxtKQUm4kPsgwAnsZxrlv8DLFWY AMu9WXauVJW9LjFHBNfmrwPPusjSabX7//77BELY34F9xAvJUU27ZU1cTfDUVQBZ9XRCAx hePCK1y1P3lRTpNvhRMptgoJylYt5HL2kul4VNKMkg151Y8ofjrZAA8kk87EDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410193; a=rsa-sha256; cv=none; b=Ql77TxrNi/k1KZZhr8n7a2mqGnZZ33iMzS/VtXTP0U1d9CJ/9c11lC5PU7am6A3Nfjef73 6enXk1iUOreNVcPMQFDR4pGzCMu7Bv+A4WY9RxuPTeSoIgnKYnjcPU8TXPQePwTG+2u8jj lExLW2iq4SSkipa9m7ta9iVhCeq7CY+CxR6cfNHM8kOrCXE3CHKjmoVUx+s2/oc472xqhW xTDyYyZjFUvU/hcApRGeI8+a0ddbeOma/lVTZFBomLGMPXoCBorhSdREQbV7PfwD2JRKKv 8QfXKpBR9wDrsOP4iepvLADq2PH5zPLLwyZdhuuMgePJDDbZIwucHEm5MOG8Sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gP062fzwl2; Thu, 8 Feb 2024 16:36: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 418GaWsL020727; Thu, 8 Feb 2024 16:36:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaW7k020724; Thu, 8 Feb 2024 16:36:32 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:32 GMT Message-Id: <202402081636.418GaW7k020724@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: c05d7bdaf63d - main - arm64: Make KMSAN aware of exceptions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c05d7bdaf63dff2dede5aee742aeb8b1455e40d5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c05d7bdaf63dff2dede5aee742aeb8b1455e40d5 commit c05d7bdaf63dff2dede5aee742aeb8b1455e40d5 Author: Mark Johnston AuthorDate: 2024-02-08 15:57:36 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 arm64: Make KMSAN aware of exceptions - Call kmsan_intr_enter() when an exception occurs. This ensures that code running in the exception context does not clobber thread-local KMSAN state. - Ensure that stack memory containing trap frames is treated as initialized. Co-authored-by: Alexander Stetsenko Reviewed by: imp MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43155 --- sys/arm64/arm64/exception.S | 34 ++++++++++++++++++++++++++++++++++ sys/arm64/arm64/trap.c | 9 +++++++++ sys/kern/subr_intr.c | 2 ++ 3 files changed, 45 insertions(+) diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S index b1990fc71281..bab71fed4453 100644 --- a/sys/arm64/arm64/exception.S +++ b/sys/arm64/arm64/exception.S @@ -193,55 +193,89 @@ 2: .endm +#ifdef KMSAN +/* + * The KMSAN runtime relies on a TLS block to track initialization and origin + * state for function parameters and return values. To keep this state + * consistent in the face of asynchronous kernel-mode traps, the runtime + * maintains a stack of blocks: when handling an exception or interrupt, + * kmsan_intr_enter() pushes the new block to be used until the handler is + * complete, at which point kmsan_intr_leave() restores the previous block. + * + * Thus, KMSAN_ENTER/LEAVE hooks are required only in handlers for events that + * may have happened while in kernel-mode. In particular, they are not required + * around amd64_syscall() or ast() calls. Otherwise, kmsan_intr_enter() can be + * called unconditionally, without distinguishing between entry from user-mode + * or kernel-mode. + */ +#define KMSAN_ENTER bl kmsan_intr_enter +#define KMSAN_LEAVE bl kmsan_intr_leave +#else +#define KMSAN_ENTER +#define KMSAN_LEAVE +#endif + ENTRY(handle_el1h_sync) save_registers 1 + KMSAN_ENTER ldr x0, [x18, #PC_CURTHREAD] mov x1, sp bl do_el1h_sync + KMSAN_LEAVE restore_registers 1 ERET END(handle_el1h_sync) ENTRY(handle_el1h_irq) save_registers 1 + KMSAN_ENTER mov x0, sp bl intr_irq_handler + KMSAN_LEAVE restore_registers 1 ERET END(handle_el1h_irq) ENTRY(handle_el0_sync) save_registers 0 + KMSAN_ENTER ldr x0, [x18, #PC_CURTHREAD] mov x1, sp str x1, [x0, #TD_FRAME] bl do_el0_sync do_ast + KMSAN_LEAVE restore_registers 0 ERET END(handle_el0_sync) ENTRY(handle_el0_irq) save_registers 0 + KMSAN_ENTER mov x0, sp bl intr_irq_handler do_ast + KMSAN_LEAVE restore_registers 0 ERET END(handle_el0_irq) ENTRY(handle_serror) save_registers 0 + KMSAN_ENTER mov x0, sp 1: bl do_serror b 1b + KMSAN_LEAVE END(handle_serror) ENTRY(handle_empty_exception) save_registers 0 + KMSAN_ENTER mov x0, sp 1: bl unhandled_exception b 1b + KMSAN_LEAVE END(handle_empty_exception) .macro vector name, el diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 03cac1e6450e..c0066ae7dcad 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -478,6 +479,8 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) int dfsc; kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0); + kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED); + far = frame->tf_far; /* Read the esr register to get the exception details */ esr = frame->tf_esr; @@ -591,6 +594,8 @@ do_el0_sync(struct thread *td, struct trapframe *frame) get_pcpu(), READ_SPECIALREG(tpidr_el1))); kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0); + kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED); + far = frame->tf_far; esr = frame->tf_esr; exception = ESR_ELx_EXCEPTION(esr); @@ -737,6 +742,8 @@ do_serror(struct trapframe *frame) uint64_t esr, far; kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0); + kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED); + far = frame->tf_far; esr = frame->tf_esr; @@ -752,6 +759,8 @@ unhandled_exception(struct trapframe *frame) uint64_t esr, far; kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0); + kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED); + far = frame->tf_far; esr = frame->tf_esr; diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index a03607c781b2..5958f9025b27 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -334,6 +335,7 @@ intr_irq_handler(struct trapframe *tf) KASSERT(irq_root_filter != NULL, ("%s: no filter", __func__)); kasan_mark(tf, sizeof(*tf), sizeof(*tf), 0); + kmsan_mark(tf, sizeof(*tf), KMSAN_STATE_INITED); VM_CNT_INC(v_intr); critical_enter(); From nobody Thu Feb 8 16:36:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gN4HVqz5B0dG; Thu, 8 Feb 2024 16:36: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 4TW2gN0506z4MmK; Thu, 8 Feb 2024 16:36:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aa5Ovn7Zwmpakc2wma05Fw33B/oHWBX0bBSEpG2wmIs=; b=SzjyW3J8U2RJzuCQQIAlGoSXzF+soFJENchp/vupTClZhLFiSnbGBmIGyfZggCKVZZHyrZ Rx1nZseF4+n0q6zHoAgbUU37EdFAdDUv1Fl5vcZENmgPSYWyCHQkdNZCdN0VQcOVR+NFaj MylaVZpdbD0F1x0nBN2EUSzhQLirRaJC89zQ6LlEnzL0X9B7LRSxOsfoVNd/9xUAgFCg8L TqLT1hV+dqLyltmuKFfGa+FFYJj6uxxavOYnZ5gA48dXkn0GFW797xJ5WRnf51jOoI4U1y Zion6pM+OemgrzPDeGoIqWVC85xRAZwFTPOI4tejOYg4JylNXrUBG66VCF47LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aa5Ovn7Zwmpakc2wma05Fw33B/oHWBX0bBSEpG2wmIs=; b=yQT3ROMDh4oLlKxBwI4V88C7ZajzjjSwus9unRX10nJECwiB0urggfrL7+YfCFyw5vMF8e yQnFuHyHgI5bBneSGhaHsNLFDMu3pU8HG5DvsYcLrR51dGfNhSak+q3VfPjhvEFL4q00n0 dLyPG/lINc1HL3kUrYii2OgSeudTXIOXgZnqDqe1KdVMxJHEL4pwZi7NK2DyLJmjq4OJ4H k7HrYRpIlH/dXf0ZhyNJF2BLZcdRMZr01ajuWzP4jHlCzOkByV1rJC94u648puJ1xqzkXC 5bcDK07OAdUwhE41YdbEJ/3qdgji1yTR/TgAr22RZBRQbOnQKFAl2hXuEEeDCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410192; a=rsa-sha256; cv=none; b=F9DM+az2GdlZLiZVDJi3C9WiPozZ+W+tohy0mUl4mBYV0b3bgNmR4L0HyE5a5fNv9dKcyk hrpTx+TWne/Ldqw7OaUycNO8YEBXkO0yhloLOD1Ua7vUXr4/AWRkgbFLXGKQzVg1iMi/KV tm2UkabLvSuiubczoWsLPjUvMJhzlUaj6GsZw3vTzQvv1aL9EN74gBD7xZ6KnoZtUtSaca S7zQ1WPNt0oZrOSw2hv/Fp/maJHR9CyvHOaS1uc5jHzN76UcXeOv5LGAa8Iu9gp6Aiq1j8 JqW5fSPKfVSbe8AJRKGyA27OpPmyupGw/YHV3mfyG905qU8BDQb1Jwf/2eQl4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gM6ClGzxbx; Thu, 8 Feb 2024 16:36: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 418GaVF6020676; Thu, 8 Feb 2024 16:36:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaVkp020673; Thu, 8 Feb 2024 16:36:31 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:31 GMT Message-Id: <202402081636.418GaVkp020673@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: 52bf6257c2aa - main - arm64: Define shadow maps for KMSAN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52bf6257c2aac19788636e525b139ec57a38fb1c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=52bf6257c2aac19788636e525b139ec57a38fb1c commit 52bf6257c2aac19788636e525b139ec57a38fb1c Author: Mark Johnston AuthorDate: 2024-02-08 15:56:58 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 arm64: Define shadow maps for KMSAN Both are the same size as the kernel map. Reviewed by: imp MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43154 --- sys/arm64/arm64/pmap.c | 6 ++++++ sys/arm64/include/vmparam.h | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 58c21f9d2c30..7c7a9a08fd30 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -8175,6 +8175,12 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) else if (i == pmap_l0_index(KASAN_MIN_ADDRESS)) sbuf_printf(sb, "\nKASAN shadow map:\n"); #endif +#ifdef KMSAN + else if (i == pmap_l0_index(KMSAN_SHAD_MIN_ADDRESS)) + sbuf_printf(sb, "\nKMSAN shadow map:\n"); + else if (i == pmap_l0_index(KMSAN_ORIG_MIN_ADDRESS)) + sbuf_printf(sb, "\nKMSAN origin map:\n"); +#endif l0e = kernel_pmap->pm_l0[i]; if ((l0e & ATTR_DESCR_VALID) == 0) { diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index d577b9315471..0967d3c0aedf 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -131,6 +131,12 @@ * 0xfffffeffffffffff End of DMAP * 0xffffa00000000000 Start of DMAP * + * 0xffff027fffffffff End of KMSAN origin map + * 0xffff020000000000 Start of KMSAN origin map + * + * 0xffff017fffffffff End of KMSAN shadow map + * 0xffff010000000000 Start of KMSAN shadow map + * * 0xffff009fffffffff End of KASAN shadow map * 0xffff008000000000 Start of KASAN shadow map * @@ -167,6 +173,14 @@ #define KASAN_MIN_ADDRESS (0xffff008000000000UL) #define KASAN_MAX_ADDRESS (0xffff00a000000000UL) +/* 512GiB KMSAN shadow map */ +#define KMSAN_SHAD_MIN_ADDRESS (0xffff010000000000UL) +#define KMSAN_SHAD_MAX_ADDRESS (0xffff018000000000UL) + +/* 512GiB KMSAN origin map */ +#define KMSAN_ORIG_MIN_ADDRESS (0xffff020000000000UL) +#define KMSAN_ORIG_MAX_ADDRESS (0xffff028000000000UL) + /* The address bits that hold a pointer authentication code */ #define PAC_ADDR_MASK (0xff7f000000000000UL) From nobody Thu Feb 8 16:36:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gR5dsyz5B0DD; Thu, 8 Feb 2024 16:36: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 4TW2gR2dNjz4NFD; Thu, 8 Feb 2024 16:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TarB+XTze7Rui7qaJjUlOqdEs4+dK1XdKrksP5sgJT0=; b=T3OjugGMKgpj9yb8Ui9KWz4a0GgCJnKEy+Zemfq03lH0pkJr+D1y5E6vqkqlC5wyp5yLlO lAJVsOFH3BweD18qNlEHHcyoxUmGOszwc/A28ySBQUiHZggvYeBeBgLXfBJNdiesVlw7eA FNL9UKddmUtRODgOw3YOsHux2xUKeye7ZUuftl/i5o/d5TcymuuW3T27w0Opu69NE6SOjp FfSzedvsejTVArivbqaozzF4wJgsxUQyS9Ap3IRwXMTNO0slNSvGSvEu3/yiqSiLY0g4Jc ygRmrjQfFn0hXEcr/ZcCjbPbZdZkvAsqH1+3PqLSehAvbzv7gIhJlj2NLO1XVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TarB+XTze7Rui7qaJjUlOqdEs4+dK1XdKrksP5sgJT0=; b=kP+evZ62qLUUoUr04X3q/b4xcN8zDoOlAMfcyXXGnIiKPJ8sJfBG22Ez++ke+jQRK2QpVw OJgYEMgnHY0g9tdSq3AcAJSUl/iOGw6TVTCeMkQ4Ct6k4WFprPDkVM+gsuhxi8Cdyz54gt 01KoH26rkYNxRBJPGUGrBBnlwfitNwF4LoNsf4bpErphLLPW3a2qSlDvFsBHrV6Mp8XB6k T9z1rOyr7kfnxgHdFHemztGrk1BVXP0+yQblZPxurAniU+CckKcDtW/SQUFDkcKkIEWMLZ +G0gut/QpjBvg85803tPlVYf196IbyfdsAhuzBZvxvlK0VFzam4eXsNBHKikWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410195; a=rsa-sha256; cv=none; b=O9ZImMiu09pMstKnc6uTrjU1oNdruAL7N1nhnioiEnO7KBKfqjR9U0nzmF4576jEfo1FZG 7yJKCmtW0+ZuRi1rSRkY7pR7Vojb4OXeMyjCFrXQVBTSPbQgHQwiZWo7njMylgVKwEDe4v aXAyA15UX+pxaUOIJOcmwDk92sOWc+q2TWuG4LYaFumvuL40QckrfKwOEwee/xzKafz1TZ +yH8YrdiKkd4nQiYSQisdKeqryzizIdtCUWAN0YepgYuXNkjyOrWHpJ2x7EX2aaSuwzsRu vP8FYxAnr7RR6GRr+0tsPZlrKT+rjY7eSMbam/2CAjHpGRD8gFmtlFf4c4n4qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gR1f2hzxFD; Thu, 8 Feb 2024 16:36: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 418GaZ7c020819; Thu, 8 Feb 2024 16:36:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaZp8020816; Thu, 8 Feb 2024 16:36:35 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:35 GMT Message-Id: <202402081636.418GaZp8020816@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: 5fa4151e925c - main - arm64: Implement busdma bits for KMSAN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fa4151e925c39c4d788918badec2ec7b4cc8938 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5fa4151e925c39c4d788918badec2ec7b4cc8938 commit 5fa4151e925c39c4d788918badec2ec7b4cc8938 Author: Mark Johnston AuthorDate: 2024-02-08 16:01:55 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 arm64: Implement busdma bits for KMSAN This works identically to amd64. In particular, only the bus_dma_bounce_impl busdma implementation handles KMSAN at the moment. MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43157 --- sys/arm64/arm64/busdma_bounce.c | 23 +++++++++++++++++++++-- sys/arm64/include/bus_dma.h | 12 ++++++++++++ sys/arm64/include/bus_dma_impl.h | 3 +++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/busdma_bounce.c b/sys/arm64/arm64/busdma_bounce.c index a117e1041658..57551a2edb47 100644 --- a/sys/arm64/arm64/busdma_bounce.c +++ b/sys/arm64/arm64/busdma_bounce.c @@ -40,9 +40,10 @@ #include #include #include -#include #include +#include #include +#include #include #include @@ -104,6 +105,9 @@ struct bus_dmamap { #define DMAMAP_FROM_DMAMEM (1 << 1) #define DMAMAP_MBUF (1 << 2) int sync_count; +#ifdef KMSAN + struct memdesc kmsan_mem; +#endif struct sync_list slist[]; }; @@ -1149,7 +1153,19 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, */ dsb(sy); } + + kmsan_bus_dmamap_sync(&map->kmsan_mem, op); +} + +#ifdef KMSAN +static void +bounce_bus_dmamap_load_kmsan(bus_dmamap_t map, struct memdesc *mem) +{ + if (map == NULL) + return; + memcpy(&map->kmsan_mem, mem, sizeof(map->kmsan_mem)); } +#endif struct bus_dma_impl bus_dma_bounce_impl = { .tag_create = bounce_bus_dma_tag_create, @@ -1166,5 +1182,8 @@ struct bus_dma_impl bus_dma_bounce_impl = { .map_waitok = bounce_bus_dmamap_waitok, .map_complete = bounce_bus_dmamap_complete, .map_unload = bounce_bus_dmamap_unload, - .map_sync = bounce_bus_dmamap_sync + .map_sync = bounce_bus_dmamap_sync, +#ifdef KMSAN + .load_kmsan = bounce_bus_dmamap_load_kmsan, +#endif }; diff --git a/sys/arm64/include/bus_dma.h b/sys/arm64/include/bus_dma.h index 9e5a7124dcf5..fb494be0bdc4 100644 --- a/sys/arm64/include/bus_dma.h +++ b/sys/arm64/include/bus_dma.h @@ -149,4 +149,16 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map, return (tc->impl->map_complete(dmat, map, segs, nsegs, error)); } +#ifdef KMSAN +static inline void +_bus_dmamap_load_kmsan(bus_dma_tag_t dmat, bus_dmamap_t map, + struct memdesc *mem) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + return (tc->impl->load_kmsan(map, mem)); +} +#endif + #endif /* !_MACHINE_BUS_DMA_H_ */ diff --git a/sys/arm64/include/bus_dma_impl.h b/sys/arm64/include/bus_dma_impl.h index 9e5741758ef5..1fb5e10c92b0 100644 --- a/sys/arm64/include/bus_dma_impl.h +++ b/sys/arm64/include/bus_dma_impl.h @@ -75,6 +75,9 @@ struct bus_dma_impl { void (*map_unload)(bus_dma_tag_t dmat, bus_dmamap_t map); void (*map_sync)(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op); +#ifdef KMSAN + void (*load_kmsan)(bus_dmamap_t map, struct memdesc *mem); +#endif }; int common_bus_dma_tag_create(struct bus_dma_tag_common *parent, From nobody Thu Feb 8 16:36:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gQ3QVNz5B0VH; Thu, 8 Feb 2024 16:36: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 4TW2gQ1WGqz4N8T; Thu, 8 Feb 2024 16:36:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mptK5UCZfNvWV9XP8cxJStaKjc2tmrtwTn5UhISWywo=; b=mEK19BYSpFvU6VrZNLNHDOO5+Iv494lQEHOYupVBuo8ycDdzq3YnrE+PkU9ebvJuShi/xt RixDrgu7bETY3TjltJCtue8vBcP2qz5aJEpwLLTts0ZHL/vNs0ydQr5kYEAa/w696jPuu5 eb334CCi5IY+24qM+u4naO3nTA1p+8L6UwT+nv4lDy8Hw/EeELFVVOJO4ZvovxVsSpjCKR sGSveS/hV/UX1USp1DXwTAf8H4kDWNTUHy1bvkXa+dO3pNFVgO1Wn7VvSa4o5Cxbsl4vJ6 bBlb7HsJfvOSEGUnAX8/U/H+rTjzIuke3S/Ri9G6Lji4Rx6N+mPHYd355OD/lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mptK5UCZfNvWV9XP8cxJStaKjc2tmrtwTn5UhISWywo=; b=eVCQeAkN9Lc9pFK7Siy5UuSXrC62nrKKCImzEav+EFd8cfZYQy2Tqf0yorSWDmMhgSPOaV +LH7zTDYuexaIKMTYIKJFGKyd2+Z+nDP6j79iAMoGJivg9B0C7Ke0CjJkKk0Ejn0pIvn1H qk/Rfy4kNdjuxnEQZbLVPLaaPMICMCP8QRstK/mTw8N6vvqdNiey/mXsljseCtL66c/90l kLmdcR+XWjn+7DXBODDeKjkj0gUajByHCS3t1J2G5V7V6Bzs1tIGDrw0ixEXMqlyhk8Vgi ZZBW43g3eUrbS371+e+IS08hJ8GBo3eIzMPOUDDCYzaX0OIUIEKtuGthk/tNJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410194; a=rsa-sha256; cv=none; b=ZtaEx/awT6A5T+1DMdi0iAiLwPmmFLEP0mooUjtU85hlvg4s73wuSdtnRqN/riJZcK/p0/ FANZT/4Z28xuWOkxYdBa0dnQU6qKIyp9Do8GX4RXVPmWzcKg84ChBz/b9QhDhLcUq98+oB 0qd+bqkxMlPvdydL8wrVFIubEJax81xC29YJLxKdIyC6KMoJks+7snyLiEwsvlPyWgYMKn mIScLbkv4RA2Vr+gYFWEaJu/ar2XTr8g1t/9HSdDBEfkfoUzSakZmJD0MF3f8IElNS7crO jvySX622L7cUZYWGdwYSJKHiSK78+S6GaxMBiWNILwePb3eR57o/Y2OHTQDDww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gQ0dSczxFC; Thu, 8 Feb 2024 16:36: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 418GaXch020774; Thu, 8 Feb 2024 16:36:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaXmt020771; Thu, 8 Feb 2024 16:36:33 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:33 GMT Message-Id: <202402081636.418GaXmt020771@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: 90010126b03b - main - arm64: Add msan.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90010126b03b098edc70a5a0e63c1c0a65cd47fb Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=90010126b03b098edc70a5a0e63c1c0a65cd47fb commit 90010126b03b098edc70a5a0e63c1c0a65cd47fb Author: Mark Johnston AuthorDate: 2024-02-08 16:00:40 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 arm64: Add msan.h This is mostly a copy of amd64's msan.h, except that we currently do not avoid shadowing the kernel itself, and we need a more restrictive upper bound in kmsan_md_unsupported() to avoid probing non-existent shadow mappings of device mappings. Reviewed by: imp MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43156 --- sys/arm64/include/msan.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/sys/arm64/include/msan.h b/sys/arm64/include/msan.h new file mode 100644 index 000000000000..48be55af44b6 --- /dev/null +++ b/sys/arm64/include/msan.h @@ -0,0 +1,91 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2021 The FreeBSD Foundation + * Copyright (c) 2023 Juniper Networks, Inc. + * + * This software was developed by Mark Johnston 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. + */ + +#ifndef _MACHINE_MSAN_H_ +#define _MACHINE_MSAN_H_ + +#ifdef KMSAN + +#include +#include +#include +#include + +typedef uint32_t msan_orig_t; + +/* + * Our 32-bit origin cells encode a 2-bit type and 30-bit pointer to a kernel + * instruction. The pointer is compressed by making it a positive offset + * relative to KERNBASE. + */ +#define KMSAN_ORIG_TYPE_SHIFT 30u +#define KMSAN_ORIG_PTR_MASK ((1ul << KMSAN_ORIG_TYPE_SHIFT) - 1) + +static inline msan_orig_t +kmsan_md_orig_encode(int type, uintptr_t ptr) +{ + return ((type << KMSAN_ORIG_TYPE_SHIFT) | + ((ptr & KMSAN_ORIG_PTR_MASK))); +} + +static inline void +kmsan_md_orig_decode(msan_orig_t orig, int *type, uintptr_t *ptr) +{ + *type = orig >> KMSAN_ORIG_TYPE_SHIFT; + *ptr = (orig & KMSAN_ORIG_PTR_MASK) | KERNBASE; +} + +static inline vm_offset_t +kmsan_md_addr_to_shad(vm_offset_t addr) +{ + return (addr - VM_MIN_KERNEL_ADDRESS + KMSAN_SHAD_MIN_ADDRESS); +} + +static inline vm_offset_t +kmsan_md_addr_to_orig(vm_offset_t addr) +{ + return (addr - VM_MIN_KERNEL_ADDRESS + KMSAN_ORIG_MIN_ADDRESS); +} + +static inline bool +kmsan_md_unsupported(vm_offset_t addr) +{ + /* + * It would be cheaper to use VM_MAX_KERNEL_ADDRESS as the upper bound, + * but we need to exclude device mappings above kernel_vm_end but within + * the kernel map. + */ + return (addr < VM_MIN_KERNEL_ADDRESS || addr >= kernel_vm_end); +} + +#endif /* KMSAN */ + +#endif /* !_MACHINE_MSAN_H_ */ From nobody Thu Feb 8 16:36:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gT0477z5B0jr; Thu, 8 Feb 2024 16:36:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TW2gS3l9gz4N2F; Thu, 8 Feb 2024 16:36:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0bKEGp1M+Ggyv6omUDxcw4T6rSEIEBdDjUTO/ydpnGM=; b=LEaVe2jg6TurqesrhOlRrfI4zO+iLjO5mWxHskDDRqYfLJhLpj5HnJkTmpuYDJKCBJTj9K 5vhOfELRp74+lZ5C3F+C33GewPBH0/ywBKEHreTxX9OMPeNYEcctYsq9sCqCLQp8kRihBk WG+PYCT4I70m+3imbd2DP4YtM+ovWViI9or4jyun41ztdGejERFOt1+in3LCwS/I4Ixt44 O3A7ZL1ut7cs1qA7AUkoUfZv03UEHPUq414DiJs+MNEApRRHjmPKrNB88Dej4kfE41Tq6t KMi0ceXtPS0VlrZufhB01zFmM56X1Y86iznxAGDxSFYBxdWPTLYdjoqcPSgnaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0bKEGp1M+Ggyv6omUDxcw4T6rSEIEBdDjUTO/ydpnGM=; b=iw4PuQ/j1S2jrigLas40L9mOPibu8EtogcnmvrEZLOztaqOETXKaY7GBKIGHhSCW2007nJ B9o+TGFUvaad7OgH3f6LfA8OUyvDHc64eLqBDZTBHHXAJYtPOebw2tyVhhx5Ik8oFo1txC /oA2iU+BF/kvofYgy/eN5EAp5SwdIpjwAkTDb6CU1ba6aQbYkcaF8lLX/wHmulAFv1D0u/ Ccucu303qdhP2qhcwT6D+x/a3zSWk+18XHPhS5Xx3KALLn0v98e11tq+ZRxh8Wn9hfCL1a Cn+3vlcjdhUa+fY5zNK7urTcXAO9NMD1twgcbvtCeYyaKTVNCPJrAoSO+c9MDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410196; a=rsa-sha256; cv=none; b=C4FkIW9k76fOOKAMYnXfat80lZ2H3S4m5P61kHfBQrX0DRdZtkH/C367/LZGdMa4O4T4el fXgzq1g0plcX+fKbTf8qdBFDgeu5cG1JdKUFP5eokeAPnnhkQvi5hJgUwvAGk/6d1sQnrG +dlpYaIFzO2TUsLr4M6loVnqan/AKGo07BtIyidduAAX2BiugdthRr8arMGrvXjJ91wco0 JXgLdYSOjMhAhUjGDzHwgPosNwMiUqtewZk/XcCJkty9yM7usynlSjWQGVlZ9OReat8Yh6 DXdshI4aP+HI0yRyZw5And5USubLpkGBxdKiUp/yHUImQxczSn3/FMRGdbQ59g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gS2sHJzwtT; Thu, 8 Feb 2024 16:36:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 418GaaJ8020876; Thu, 8 Feb 2024 16:36:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaaV4020873; Thu, 8 Feb 2024 16:36:36 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:36 GMT Message-Id: <202402081636.418GaaV4020873@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: 01bb9a2a3557 - main - arm64: Disable kernel superpage promotion when KMSAN is configured List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01bb9a2a3557bc9389f628d301cd691e08266f1d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=01bb9a2a3557bc9389f628d301cd691e08266f1d commit 01bb9a2a3557bc9389f628d301cd691e08266f1d Author: Mark Johnston AuthorDate: 2024-02-08 16:02:48 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 arm64: Disable kernel superpage promotion when KMSAN is configured The break-before-make operation required to promote or demote a superpage leaves a window where the KMSAN runtime can trigger a fatal data abort. More specifically, the code in pmap_update_entry() which executes after ATTR_DESCR_VALID is cleared may implicitly attempt to access KMSAN context via curthread, but we may be promoting or demoting a 2MB page containing the curthread structure. Reviewed by: imp Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43158 --- sys/arm64/arm64/pmap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 7c7a9a08fd30..6a84b6bb80f8 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -728,6 +728,18 @@ pmap_ps_enabled(pmap_t pmap) if (pmap->pm_stage != PM_STAGE1) return (false); +#ifdef KMSAN + /* + * The break-before-make in pmap_update_entry() results in a situation + * where a CPU may call into the KMSAN runtime while the entry is + * invalid. If the entry is used to map the current thread structure, + * then the runtime will attempt to access unmapped memory. Avoid this + * by simply disabling superpage promotion for the kernel map. + */ + if (pmap == kernel_pmap) + return (false); +#endif + return (superpages_enabled != 0); } From nobody Thu Feb 8 16:36:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gV2cj0z5B0DF; Thu, 8 Feb 2024 16:36: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 4TW2gT4tyCz4N8s; Thu, 8 Feb 2024 16:36:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IvuDC4fXADuYfl5Q+vFHDYNfqWvPPQ/2AqLKBYntSIM=; b=Cw2iD3TkZUT9xnkYigBSVk2jspG/l3deprbX3Z9TRBcdaJn0oN+CjKrTPESILGEGq7hj1A 1+pYWQU/3AgCSXLijwCiXPksIjbBChDxwyIsb2CI5R0M5fJaJBf+yg+wCfCMXInHTn4amk 9RmPeLmSaK6er8mFUjuxngGTTVaMBm6S3a9XZu4He/UyimiXP3cZFKD6PdZCE458LkrhWe 3yBKYDEjqAm1v6Lm2DD7C9LQOBxrjTFoQtxroUkjI02uj6/TY3nj7h/cUIZ1E23OsmH+N8 DXZT7gDa2UJYBnlMANG2HUWlBIdU2d+DX3R5kBwkXZTr8Zhn3yPWNoepyTSQhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IvuDC4fXADuYfl5Q+vFHDYNfqWvPPQ/2AqLKBYntSIM=; b=CYVPazvNhjhR+2oxQ5JAQ3tlKcE/Wppa7VzjgTuOiBTwcZN/PIHR0Y467ebMBmItNdv9uy Y4940cJk5NAy0BWP7MB9weaQ99zize2BymoNaoxRzXlm0tt2yNX+6gwoo9MhhdYx8ELOpC +PtAWyRk41elsmYRk9G8vmLiXipHsmktOIra7CawfCpHnjPY8hahhYxuqsaodlID+vqNSA ULu++IgSq6pu+gH8NB5/D6MKMTcRNrvwqWPBDrNGudOPo+91/6m7OuumiDQZOU2ryBmbQd B1GtrDU83XdaL+XY8WY3ZsKv+5FZRqHmn/hlflWN5rRT7nZM0s8WTXsxqHhX2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410197; a=rsa-sha256; cv=none; b=bE1SB63tRuwnm9F6xnBF7+BaVPwjvZEIX6G63AwyslhOWlj9rNCc6XuoxJg3124+Nro8IP TOdX6YttwopHkeqBH0xgK0eGwvOkRbveFRi0oh9ig/zebX6KiCOMNfqnUa0zg77lF8if/5 Lrv0RERWt2ImrDhTwTIYQJ59tBXZ1fJx+iqFg+OsL4tbbVTOZU/sV9A/DApTijKlNC4gqu Jv4V/0yOhry40SqZHxWNrSGQMNOJ+b7TjZ6bx5yXB87WqUKecq1KlfaWeJbDymQBrQOW3W 0elhF8bs2jFl8XZrXHxs0wNIvNK5wn7QfSTAKdGGv9iRtOVksrO+5BF5T1uJTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gT40VjzxBD; Thu, 8 Feb 2024 16:36: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 418Gabac020924; Thu, 8 Feb 2024 16:36:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GabHZ020921; Thu, 8 Feb 2024 16:36:37 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:37 GMT Message-Id: <202402081636.418GabHZ020921@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: f5b549d09878 - main - kmsan: Update kmsan.9 to note arm64 support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5b549d09878c8dcd2382f3d3867f7b3671d908e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f5b549d09878c8dcd2382f3d3867f7b3671d908e commit f5b549d09878c8dcd2382f3d3867f7b3671d908e Author: Mark Johnston AuthorDate: 2024-02-08 16:04:08 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 kmsan: Update kmsan.9 to note arm64 support MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- share/man/man9/kmsan.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man9/kmsan.9 b/share/man/man9/kmsan.9 index 90faf8f82e5e..d9d279e12140 100644 --- a/share/man/man9/kmsan.9 +++ b/share/man/man9/kmsan.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 6, 2023 +.Dd January 11, 2024 .Dt KMSAN 9 .Os .Sh NAME @@ -62,7 +62,7 @@ kernel configuration file: .Nm is a subsystem which leverages compiler instrumentation to detect uses of uninitialized memory in the kernel. -Currently it is implemented only on the amd64 platform. +Currently it is implemented only on the amd64 and arm64 platforms. .Pp When .Nm From nobody Thu Feb 8 16:36:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gW0XXPz5B0VP; Thu, 8 Feb 2024 16:36:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TW2gV5qm3z4N98; Thu, 8 Feb 2024 16:36:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=maW0TfXlYOoVrHUVZiAza+sQ6rNKHwv9kzuLh8g4zUw=; b=IEdnaEG5LSV2YgMzLJkTgmtTc26SQ3dHbYJtc+QbSvKU/sK+EdqTnlV+RqutHlAoSa8yaK VfIJjLJrflQi7aB2nJXou9CnckgVG7IYKsDINJqGJ/wG8Leb+ACx2hKUqr0Utjp/UYYW09 CYtSFDUnPuz1xGbPlKTd1vi8dY7hMOsjanQ/vwodsjoqnvnwIckUBlF+W7iND9898bQ6a5 MwcI2NctqpQcbwgq9Gg2wzbLSLiBLAt9/IYfMinpKnVKm39oryX2m/Mj2Xtl3cGFI/6iCK Nnd1KB45rnY5Y0X6rTvtBxCBcMXRo11dfo+HQnhQzlSYlUUyxbi+PJy7ELq88Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=maW0TfXlYOoVrHUVZiAza+sQ6rNKHwv9kzuLh8g4zUw=; b=A6NW8sffvsxyOqNsqLwoooWxAAigaVeBawwdcRZRJXD9gIrpFY9fOKmBmf1ku7rNGA5awU ZE2lClPlOv93sRbLec/g453soMctbxAW/JRKmeiRrNAjbu2X2qRhrlTSIZ03xF0VyA04rP zF2uwOt3nAp5O0+qkrPiGwD2/y3SaAcuSrYGBROqGFNefNP0rYVnlgBMZFoC/HKP4GeUKz 1XnTzxN0uSSPROpu7Z6GmeFKATOxMFTXsWMIwKEJ/slFWBFrUydNlAO/lzsurzG1S0KXel h/Pg7c+LuFMIVAaWP2V6wv2xTs58eg4nR6l+dJFgDH0/3vS9GVUpMo7j0b0PxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410198; a=rsa-sha256; cv=none; b=A+ldDTPc2kcM26HbWpLsAk5rtwUTl17IIYpKv9XQ/bYi2PV6j98KUUK7ulqbW7oQq+eEDE dndu9pC2wQZoZYVM0ZTXWYgTxDQssQiypmJWX/XG8hAHbl367YclkeHNgw3aE2ZtqKtt+F E3/HIs57tEtEScN7wfrSYa1ZxbyLYbrblo6ew4bh2it4TCC0zoqu3gim4z9WfLsOA1T8KE TeoYWtUPj12bPnNuNm36FwIsC+gj5u0JcLWYp862pV89Q+jdvzXMO7TezLBtpjP46ecqyw LZuA2LmpJSHuVn4MbrjNnMEdJa1LAPjp+r/Csp+YYgHAS9tNP+PxEb8znfcPhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gV4xGQzwl3; Thu, 8 Feb 2024 16:36:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 418Gacv7020975; Thu, 8 Feb 2024 16:36:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GacaM020972; Thu, 8 Feb 2024 16:36:38 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:38 GMT Message-Id: <202402081636.418GacaM020972@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: c3f01d3e7b8f - main - arm64: Enable KMSAN when configured to do so List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3f01d3e7b8fdee4f78dad7e2e6fd4d05eb81003 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c3f01d3e7b8fdee4f78dad7e2e6fd4d05eb81003 commit c3f01d3e7b8fdee4f78dad7e2e6fd4d05eb81003 Author: Alexander Stetsenko AuthorDate: 2024-02-08 16:04:52 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 arm64: Enable KMSAN when configured to do so MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/arm64/arm64/machdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 9b324bb45c2f..c543f0764e3b 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -1019,6 +1020,7 @@ initarm(struct arm64_bootparams *abp) kcsan_cpu_init(0); kasan_init(); + kmsan_init(); env = kern_getenv("kernelname"); if (env != NULL) From nobody Thu Feb 8 16:36:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gX35Q4z5B0b1; Thu, 8 Feb 2024 16:36: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 4TW2gX09WPz4N2k; Thu, 8 Feb 2024 16:36:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mVxFxuz8vFOyzqX5WF7FVFLR/KTY4fMedAas4qmXzc0=; b=oMB5qlZEILK4FOULT5MpqIHIuhFka+k0ZK/GMYXrCZb4RkOjZZfiGn9FmHrnbwKTZk4Nn2 vEmRXqffoq6e3nb9gpd/IHhZGFhIqOgawR4nu9WPOKmirnL9SQjgiO9PPIn9KqYUzJcKhZ U4Xt5dsST6hzQHD4+23BGl/rGFerf8nQnRpBMp0yX9Wah5Ms1byyjqRLYPwSScx2rEoFAw gvdt9mrHidtqcnMrzGySXcJ7RJW5QMVt5t4Lvoq8E/3e5BqC1SW7LA2mXrxUsicsptZPWP +g/Jk5tl0PpyUCl6j61UWMdl+jU4od8NqWV1qf/uP3z6XphPrAG1QpjJfGg9fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mVxFxuz8vFOyzqX5WF7FVFLR/KTY4fMedAas4qmXzc0=; b=FOKKq42PF5IqbkM+2yFSt+bXdLrTGcVEXwoE55CzstNyQaTZrXuZXPXsshkxtc4/XxP97o N58CMt2Bq/vDi8Lo/8Z7RrJsM3ZvvuCOi8QYPbpLx+f9cNbcjdlVpDxPvBlNSFbEm3a78y QNl1G9R6cPLTr+rJmUA3MK4Dpt2g4pN9VkOMO84hBFtR7xSOPD9dgw8rG+utqhah/rLhmH Lvo4xPQDIFJ1VZCR9A2f95xgBT8fyEwrhTMoBNszcHQRsaZ1MZNW0hmEkF7CQW2yx5PXjn mrvzdtakYdmXOx5kIkb1l/HPOri5tnKNyRp8V/GhdvALF9cES5ZkoqajitI2HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410200; a=rsa-sha256; cv=none; b=grYKq60vBXp8ZEHNKhtaq4jTRJirz/WwaB99Mq/HWKccBKZfCxY9Sp4Ag4+wAOh2xSJA1G l3CIkEsmFTEaj3C4D0FlwdrD7txTiFzfkI4gnbGoQlXm8Wwirv4ydP1i+M6cGStZwjLqEj sNGTVnH40oowVyV28VbkhGIWz4UB435qLDbLUFbh67brP8VEhKKwkR5DYu3dF4LAKjYefN DDnC1F3xX1I/A1mXB/QX6i+jIr4u5gFWSVi6LNlBHYYHwFkxrDOeBP68wZOL0CBQ+lISEy rm+MaT/fhnRrgDLiMIYag8DfIcFJjzJx9t/BuOIktNYWdXCFArBvFYQyVi3Wyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gW66QZzxFF; Thu, 8 Feb 2024 16:36: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 418GadEZ021032; Thu, 8 Feb 2024 16:36:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418Gadq4021029; Thu, 8 Feb 2024 16:36:39 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:39 GMT Message-Id: <202402081636.418Gadq4021029@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: 6631b5894234 - main - arm64: Simplify and improve KASAN shadow map bootstrapping List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6631b589423407c3f05bfebc62ae230ae496e061 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6631b589423407c3f05bfebc62ae230ae496e061 commit 6631b589423407c3f05bfebc62ae230ae496e061 Author: Mark Johnston AuthorDate: 2024-02-08 16:10:43 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 arm64: Simplify and improve KASAN shadow map bootstrapping - Move pmap_bootstrap_allocate_kasan_l2() close to the place where it is actually used. - Simplify pmap_bootstrap_allocate_kasan_l2() a bit: eliminate some unneeded variables and zero and exclude each 2MB mapping as we go rather than doing that all at once. Excluded regions will be coalesced. - As a consequence of the previous point, ensure that we do not zero a preexisting 2MB mapping. - Simplify pmap_bootstrap_san() and prepare it to work with KMSAN. MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43404 --- sys/arm64/arm64/pmap.c | 112 +++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 64 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 6a84b6bb80f8..93f513832b97 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1224,53 +1224,6 @@ pmap_bootstrap_l3(vm_offset_t va) pmap_bootstrap_l2_table(&bs_state); } -#ifdef KASAN -static void -pmap_bootstrap_allocate_kasan_l2(vm_paddr_t start_pa, vm_paddr_t end_pa, - vm_offset_t *start_va, int *nkasan_l2) -{ - int i; - vm_paddr_t pa; - vm_offset_t va; - pd_entry_t *l2; - - va = *start_va; - pa = rounddown2(end_pa - L2_SIZE, L2_SIZE); - l2 = pmap_l2(kernel_pmap, va); - - for (i = 0; pa >= start_pa && i < *nkasan_l2; - i++, va += L2_SIZE, pa -= L2_SIZE, l2++) { - /* - * KASAN stack checking results in us having already allocated - * part of our shadow map, so we can just skip those segments. - */ - if ((pmap_load(l2) & ATTR_DESCR_VALID) != 0) { - pa += L2_SIZE; - continue; - } - - pmap_store(l2, PHYS_TO_PTE(pa) | PMAP_SAN_PTE_BITS | L2_BLOCK); - } - - /* - * Ended the allocation due to start_pa constraint, rather than because - * we allocated everything. Adjust back up to the start_pa and remove - * the invalid L2 block from our accounting. - */ - if (pa < start_pa) { - va += L2_SIZE; - i--; - pa = start_pa; - } - - bzero((void *)PHYS_TO_DMAP(pa), i * L2_SIZE); - physmem_exclude_region(pa, i * L2_SIZE, EXFLAG_NOALLOC); - - *nkasan_l2 -= i; - *start_va = va; -} -#endif - /* * Bootstrap the system enough to run with virtual memory. */ @@ -1368,19 +1321,48 @@ pmap_bootstrap(vm_size_t kernlen) cpu_tlb_flushID(); } -#if defined(KASAN) +#ifdef KASAN +static void +pmap_bootstrap_allocate_kasan_l2(vm_paddr_t start_pa, vm_paddr_t end_pa, + vm_offset_t *vap, vm_offset_t eva) +{ + vm_paddr_t pa; + vm_offset_t va; + pd_entry_t *l2; + + va = *vap; + pa = rounddown2(end_pa - L2_SIZE, L2_SIZE); + for (; pa >= start_pa && va < eva; va += L2_SIZE, pa -= L2_SIZE) { + l2 = pmap_l2(kernel_pmap, va); + + /* + * KASAN stack checking results in us having already allocated + * part of our shadow map, so we can just skip those segments. + */ + if ((pmap_load(l2) & ATTR_DESCR_VALID) != 0) { + pa += L2_SIZE; + continue; + } + + bzero((void *)PHYS_TO_DMAP(pa), L2_SIZE); + physmem_exclude_region(pa, L2_SIZE, EXFLAG_NOALLOC); + pmap_store(l2, PHYS_TO_PTE(pa) | PMAP_SAN_PTE_BITS | L2_BLOCK); + } + *vap = va; +} + /* * Finish constructing the initial shadow map: * - Count how many pages from KERNBASE to virtual_avail (scaled for * shadow map) * - Map that entire range using L2 superpages. */ -void -pmap_bootstrap_san(void) +static void +pmap_bootstrap_san1(vm_offset_t va, int scale) { - vm_offset_t va; + vm_offset_t eva; vm_paddr_t kernstart; - int i, shadow_npages, nkasan_l2; + int i; kernstart = pmap_early_vtophys(KERNBASE); @@ -1392,19 +1374,14 @@ pmap_bootstrap_san(void) physmap_idx = physmem_avail(physmap, nitems(physmap)); physmap_idx /= 2; - shadow_npages = (virtual_avail - VM_MIN_KERNEL_ADDRESS) / PAGE_SIZE; - shadow_npages = howmany(shadow_npages, KASAN_SHADOW_SCALE); - nkasan_l2 = howmany(shadow_npages, Ln_ENTRIES); - - /* Map the valid KVA up to this point. */ - va = KASAN_MIN_ADDRESS; + eva = va + (virtual_avail - VM_MIN_KERNEL_ADDRESS) / scale; /* * Find a slot in the physmap large enough for what we needed. We try to put * the shadow map as high up as we can to avoid depleting the lower 4GB in case * it's needed for, e.g., an xhci controller that can only do 32-bit DMA. */ - for (i = (physmap_idx * 2) - 2; i >= 0 && nkasan_l2 > 0; i -= 2) { + for (i = (physmap_idx * 2) - 2; i >= 0; i -= 2) { vm_paddr_t plow, phigh; /* L2 mappings must be backed by memory that is L2-aligned */ @@ -1414,12 +1391,13 @@ pmap_bootstrap_san(void) continue; if (kernstart >= plow && kernstart < phigh) phigh = kernstart; - if (phigh - plow >= L2_SIZE) - pmap_bootstrap_allocate_kasan_l2(plow, phigh, &va, - &nkasan_l2); + if (phigh - plow >= L2_SIZE) { + pmap_bootstrap_allocate_kasan_l2(plow, phigh, &va, eva); + if (va >= eva) + break; + } } - - if (nkasan_l2 != 0) + if (i < 0) panic("Could not find phys region for shadow map"); /* @@ -1431,6 +1409,12 @@ pmap_bootstrap_san(void) * is handled by pmap_san_enter(). */ } + +void +pmap_bootstrap_san(void) +{ + pmap_bootstrap_san1(KASAN_MIN_ADDRESS, KASAN_SHADOW_SCALE); +} #endif /* From nobody Thu Feb 8 16:36:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW2gY1cBfz5B0DJ; Thu, 8 Feb 2024 16:36: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 4TW2gY0yNxz4NDR; Thu, 8 Feb 2024 16:36:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fG3HDF3yVIisj3Qj1iWWwMPeAzFoFHLdUxFvZEoer4=; b=xzXeaLE5nLTSuue4rsDTEccucxz8nwu30+ZlSu0xKBG4ml51hGihqepWW21z4ZNV1CCfYz iIFSFz/yERUs91o2ainbtW8NrWWRiz8orNfzUc837JC6dLSQujsE0Y+5ZCZxe2rliyB3wu nfrpqKOPZo8+tGjqo8+gUFIMqEAHwCgWCUQnZ9ZQdtRQ36q0ynT5mKMRdf6cTtHY4G6raY xz0XAWnyaO5NT7zkOeNednD8zkCYTtL/GC1Y7stUbJhJAzHX/vsCExNHspot1cpRxyLsJS xzAb+TP+FBzaQWhnS0CGo1tMJeGo6BRM9BBYCIu/6Dg+df3veazCI6kpN1hbgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707410201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fG3HDF3yVIisj3Qj1iWWwMPeAzFoFHLdUxFvZEoer4=; b=SweHY9+DnCowBTBfSwFwP0LuncJ4MdKblWckvvCCF64xQcXR0c9aBhy4zx9DeIJdfRp1dS QtAj3oWIF4ce7JTbr8A0ub83bKW1hw3GmXfQwrGFQYv/1rM3vtN2LyamdDxr+Qjvlw7bcz d94Ipi6uihnVCXkAKOEy0/RmKgqMkxWWwq+n7k2JbMSsqolSQoB7YxfZMbm0J/9mSifNhN vWEsaTR0KTSS1cHZW0mFZZ9DDnGPdjzQTujZeuQukqEb5B+7x0WiNVDxEZL3Zer/an/jZP rXiOT4kzLgOq1omOTApOcfBJlFJfQ8RdD+YaYk8i8ip3VE7MEE6YAMsfD+b/2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707410201; a=rsa-sha256; cv=none; b=Z0+GzuI8OqGyDmdyqx66598jzlWrq7wYuwzmIJ5wQ5Ij0luHSfiwcRQ/MQGbUmVeJt33m/ yMFyX/IZiCjzkRIee6eGJosdkhmS4wnEhurKfqRv6UTQRZ3b7TumhMgZw1v6WnjZ6KYyxB D539Eo9/Bk3xEId+Oid/7nEP+CfWhn0g15qP4Ac6rFvOlkiG+Pkfq0vGnDhCsZIpkpxxfj JhDDKqjSNnQLVLB23q5b9YUz4AlwBeBHDwiHz3iz4zHDcHJK71LoYL36KUwxh8NWF9PH7E 3bpKHLexmUBNHme4xpixuQrX95zcRnHNdv1RkbKq+NPwYe1rRH1oqXtVlh6GaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW2gY04YFzxdY; Thu, 8 Feb 2024 16:36: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 418Gae4Y021077; Thu, 8 Feb 2024 16:36:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418GaeNW021074; Thu, 8 Feb 2024 16:36:40 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:36:40 GMT Message-Id: <202402081636.418GaeNW021074@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: fe05296fc3d0 - main - arm64: Add pmap integration for KMSAN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe05296fc3d0ec4079a51ecf1250fcde0f54fc5f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fe05296fc3d0ec4079a51ecf1250fcde0f54fc5f commit fe05296fc3d0ec4079a51ecf1250fcde0f54fc5f Author: Mark Johnston AuthorDate: 2024-02-08 16:11:02 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 16:35:11 +0000 arm64: Add pmap integration for KMSAN - In pmap_bootstrap_san(), allocate the root PTPs for the shadow maps. (For KASAN, this is done earlier since we need to do some special bootstrapping for the kernel stack.) - Adjust ifdefs to include KMSAN. - Expand the shadow maps when pmap_growkernel() is called. MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43405 --- sys/arm64/arm64/machdep.c | 2 +- sys/arm64/arm64/pmap.c | 44 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index c543f0764e3b..92f9e5692be4 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -972,7 +972,7 @@ initarm(struct arm64_bootparams *abp) * we'll end up searching for segments that we can safely use. Those * segments also get excluded from phys_avail. */ -#if defined(KASAN) +#if defined(KASAN) || defined(KMSAN) pmap_bootstrap_san(); #endif diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 93f513832b97..d9b6425cc20e 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -114,6 +114,7 @@ #include #include #include +#include #include #include #include @@ -1321,9 +1322,9 @@ pmap_bootstrap(vm_size_t kernlen) cpu_tlb_flushID(); } -#ifdef KASAN +#if defined(KASAN) || defined(KMSAN) static void -pmap_bootstrap_allocate_kasan_l2(vm_paddr_t start_pa, vm_paddr_t end_pa, +pmap_bootstrap_allocate_san_l2(vm_paddr_t start_pa, vm_paddr_t end_pa, vm_offset_t *vap, vm_offset_t eva) { vm_paddr_t pa; @@ -1392,7 +1393,7 @@ pmap_bootstrap_san1(vm_offset_t va, int scale) if (kernstart >= plow && kernstart < phigh) phigh = kernstart; if (phigh - plow >= L2_SIZE) { - pmap_bootstrap_allocate_kasan_l2(plow, phigh, &va, eva); + pmap_bootstrap_allocate_san_l2(plow, phigh, &va, eva); if (va >= eva) break; } @@ -1403,7 +1404,7 @@ pmap_bootstrap_san1(vm_offset_t va, int scale) /* * Done. We should now have a valid shadow address mapped for all KVA * that has been mapped so far, i.e., KERNBASE to virtual_avail. Thus, - * shadow accesses by the kasan(9) runtime will succeed for this range. + * shadow accesses by the sanitizer runtime will succeed for this range. * When the kernel virtual address range is later expanded, as will * happen in vm_mem_init(), the shadow map will be grown as well. This * is handled by pmap_san_enter(). @@ -1413,7 +1414,32 @@ pmap_bootstrap_san1(vm_offset_t va, int scale) void pmap_bootstrap_san(void) { +#ifdef KASAN pmap_bootstrap_san1(KASAN_MIN_ADDRESS, KASAN_SHADOW_SCALE); +#else + static uint8_t kmsan_shad_ptp[PAGE_SIZE * 2] __aligned(PAGE_SIZE); + static uint8_t kmsan_orig_ptp[PAGE_SIZE * 2] __aligned(PAGE_SIZE); + pd_entry_t *l0, *l1; + + if (virtual_avail - VM_MIN_KERNEL_ADDRESS > L1_SIZE) + panic("initial kernel map is too large"); + + l0 = pmap_l0(kernel_pmap, KMSAN_SHAD_MIN_ADDRESS); + pmap_store(l0, L0_TABLE | PHYS_TO_PTE( + pmap_early_vtophys((vm_offset_t)kmsan_shad_ptp))); + l1 = pmap_l0_to_l1(l0, KMSAN_SHAD_MIN_ADDRESS); + pmap_store(l1, L1_TABLE | PHYS_TO_PTE( + pmap_early_vtophys((vm_offset_t)kmsan_shad_ptp + PAGE_SIZE))); + pmap_bootstrap_san1(KMSAN_SHAD_MIN_ADDRESS, 1); + + l0 = pmap_l0(kernel_pmap, KMSAN_ORIG_MIN_ADDRESS); + pmap_store(l0, L0_TABLE | PHYS_TO_PTE( + pmap_early_vtophys((vm_offset_t)kmsan_orig_ptp))); + l1 = pmap_l0_to_l1(l0, KMSAN_ORIG_MIN_ADDRESS); + pmap_store(l1, L1_TABLE | PHYS_TO_PTE( + pmap_early_vtophys((vm_offset_t)kmsan_orig_ptp + PAGE_SIZE))); + pmap_bootstrap_san1(KMSAN_ORIG_MIN_ADDRESS, 1); +#endif } #endif @@ -2717,8 +2743,10 @@ pmap_growkernel(vm_offset_t addr) addr = roundup2(addr, L2_SIZE); if (addr - 1 >= vm_map_max(kernel_map)) addr = vm_map_max(kernel_map); - if (kernel_vm_end < addr) + if (kernel_vm_end < addr) { kasan_shadow_map(kernel_vm_end, addr - kernel_vm_end); + kmsan_shadow_map(kernel_vm_end, addr - kernel_vm_end); + } while (kernel_vm_end < addr) { l0 = pmap_l0(kernel_pmap, kernel_vm_end); KASSERT(pmap_load(l0) != 0, @@ -7856,7 +7884,7 @@ pmap_pte_bti(pmap_t pmap, vm_offset_t va __diagused) return (0); } -#if defined(KASAN) +#if defined(KASAN) || defined(KMSAN) static pd_entry_t *pmap_san_early_l2; #define SAN_BOOTSTRAP_L2_SIZE (1 * L2_SIZE) @@ -7930,7 +7958,7 @@ pmap_san_enter_alloc_l2(void) Ln_ENTRIES, 0, ~0ul, L2_SIZE, 0, VM_MEMATTR_DEFAULT)); } -void __nosanitizeaddress +void __nosanitizeaddress __nosanitizememory pmap_san_enter(vm_offset_t va) { pd_entry_t *l1, *l2; @@ -7992,7 +8020,7 @@ pmap_san_enter(vm_offset_t va) PMAP_SAN_PTE_BITS | L3_PAGE); dmb(ishst); } -#endif /* KASAN */ +#endif /* KASAN || KMSAN */ /* * Track a range of the kernel's virtual address space that is contiguous From nobody Thu Feb 8 16:55:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW34n21NMz5B205; Thu, 8 Feb 2024 16:55: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 4TW34n1hLMz4Sws; Thu, 8 Feb 2024 16:55:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rJ7PZopbaLb/ysulyz+AwlkwQFhMbyx51plMiVZ1rxs=; b=Ub/WcA5GvdyBgMy9AAaNicgmbFDu8QNLRABUWHZrGYJE7dDDByGwHyH3fbAK3FCmfnfkko BDtVDi2sFTNyE+Misovs7TRQhLKx/RnrrvN0nFJbh7wVNdOl8YpjYOnEvsOSbooeVaMUEP FeLWqsY++dIlK/I+ZgjcOTRyvq7MBlh7tLCXqVKayOWBdUFzHmuKcvtfbZdUgX4QjcXQ93 kHVMODPF0adq2by+7EcND45D3wWF2hghznweg8sgmtypyFmEAxTJNtIhglkjBbowNpDpnr sctX7if7cVaEhnJNNKLByxEHDE79VxSZng7Z4SyYWBzE9kzEW1MhzoVNqzmrPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rJ7PZopbaLb/ysulyz+AwlkwQFhMbyx51plMiVZ1rxs=; b=PB6BzlXqXWd+xCnw+SWGJc0VbU2zC1+4oU0Ux7EPXHTpfhW7zc08tdEZEuTwJG/nVP9eU8 no2j//4S+EqHVgiKSRpkg9FONGf+92IlDQii0aURMf9OBhBLMYujSi5kvtVaWzPA1gBZUu p1rGwHeSjURjBFsme5/myZGBS+ACM9fcd0CTBBQF9DqWHhxXrTHywxAqhKnPCeDd3+Sw9D 9a+aOvjql8aHIOMehJrSB59/0I+8phLSanCgw9MhYY9XhaQJepQC02S6zVKAT7WzRn2pJX Cr4IFIIfo6TK/N7B3THNMmYf+7W1D5tV87A8Y05Alf2xAjApz9jpIYVFLYqrXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707411305; a=rsa-sha256; cv=none; b=TmuzGf379Gr9io8w1NMRgMm0dd0bBJWZYtlm1wg6zqC/tXt0XARz5p/Kgmtjs6Ef95Evt2 Y0oJZx/aJlqmLwgEGHbEIGdvMbV/R+rwWmkgplnJUsvmOVeC2/2sbWlwcrEU9a3VecbwSu /fOWOPCrfujPRWOS5n2Cj6CQx3hDYn8at1FnAcaiTetBkXc5U5hprSIERPdoPouz0y8DsD V9OabijXUq2JVeCnzIqPbKgtBk7HQMsIjhIzsbDzlPINAAg1jMa2Zisi3POW+dF2WO0G8R hU5UlUkMpFxjOxDt3K3/s07EGzLEgnLgitkZbmV28UNOZoYZKB4w3UojzdPUyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW34n0mPNzyDs; Thu, 8 Feb 2024 16:55: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 418Gt5Xj054652; Thu, 8 Feb 2024 16:55:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418Gt5ke054649; Thu, 8 Feb 2024 16:55:05 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:55:05 GMT Message-Id: <202402081655.418Gt5ke054649@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: 9b7a920a12a9 - main - traceroute: move from contrib to usr.sbin List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b7a920a12a9377b9c8227f72748ab32fbbb4822 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9b7a920a12a9377b9c8227f72748ab32fbbb4822 commit 9b7a920a12a9377b9c8227f72748ab32fbbb4822 Author: Lexi Winter AuthorDate: 2024-02-03 13:10:09 +0000 Commit: Warner Losh CommitDate: 2024-02-08 16:52:42 +0000 traceroute: move from contrib to usr.sbin traceroute hasn't had a vendor import since 2002, while since then it's had several significant FreeBSD-specific commits. Since it's unlikely another vendor import will happen, and to make the merge of traceroute6 into traceroute easier, import traceroute into usr.sbin. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1100 --- contrib/traceroute/CHANGES | 148 --------------------- contrib/traceroute/FILES | 37 ------ contrib/traceroute/FREEBSD-upgrade | 36 ----- contrib/traceroute/INSTALL | 105 --------------- contrib/traceroute/README | 29 ---- contrib/traceroute/VERSION | 1 - contrib/traceroute/mean.awk | 12 -- contrib/traceroute/median.awk | 29 ---- contrib/traceroute/rip_output.c | 73 ---------- usr.sbin/traceroute/Makefile | 14 +- {contrib => usr.sbin}/traceroute/as.c | 0 {contrib => usr.sbin}/traceroute/as.h | 0 .../traceroute/findsaddr-socket.c | 0 {contrib => usr.sbin}/traceroute/findsaddr.h | 0 {contrib => usr.sbin}/traceroute/ifaddrlist.c | 0 {contrib => usr.sbin}/traceroute/ifaddrlist.h | 0 {contrib => usr.sbin}/traceroute/traceroute.8 | 0 {contrib => usr.sbin}/traceroute/traceroute.c | 3 - {contrib => usr.sbin}/traceroute/traceroute.h | 0 19 files changed, 1 insertion(+), 486 deletions(-) diff --git a/contrib/traceroute/CHANGES b/contrib/traceroute/CHANGES deleted file mode 100644 index 25ef7bedc43f..000000000000 --- a/contrib/traceroute/CHANGES +++ /dev/null @@ -1,148 +0,0 @@ -@(#) $Id: CHANGES,v 1.23 2000/12/14 06:53:11 leres Exp $ (LBL) - -v1.4 Wed Dec 13 22:50:35 PST 2000 - -- Add an option to use icmp echo instead of udp datagrams. - -- Add HPUX and Linux support. - -- Handle hex argument values as suggested by John Hawkinson - (jhawk@mit.edu) - -- Added flags to set the first ttl and to set the don't fragment bit. - -- Add a local autoconf macro to check for routines in libraries; the - autoconf version is broken (it only puts the library name in the - cache variable name). Thanks to John Hawkinson. - -- Add a local autoconf macro to check for types; the autoconf version - is broken (it uses grep instead of actually compiling a code fragment). - -- Attempt to detect "egcs" versions of gcc. - -- Fix problems caused by savestr(). - -- Detect when there are more interfaces than we can deal with. Thanks - to Guy Harris guy@netapp.com. - -- Accommodate changes made to FreeBSD 3.2-RELEASE network headers files. - -- The ip header offset needs to be byte swapped under Solaris on the - intel as well. Reported by John McDermott (jjm@jkintl.com) Also byte - ip length and offset for linux. - -- In wait_for_reply(), use passed socket instead of global one. Thanks - to Richard Kettlewell (richard.kettlewell@kewill.com) - -- Check for IFF_LOOPBACK as a define or an enum (concession to linux). - Reported by Robert Bihlmeyer (robbe@orcus.priv.at) - -- Increase size of SIOCGIFCONF buffer to accommodate systems with lots - of virtual interfaces. Ignore sun virtual interfaces. Suggested by - Ian Donaldson (iand@aone.com.au) - -- Always calculate icmp checksums when using -I. Reported by Soumen - (sbiswas@novell.com) - -- Documentation fix for description of -p. Thanks to Jeffrey C Honig - (jch@bsdi.com) - -- Enable ip checksums for Solaris 2.6 and higher (since they seem to - work correctly now). - -- Avoid problems when broken routers return 0.0.0.0 as their source - address. Thanks to John Hawkinson (jhawk@bbnplanet.com) - -- Canonicalize hostname if gethostname() doesn't return a domain. - -- Add -z flag (pause msecs) to allow optional pause between probes. - Suggested by Dave Morrison (drmorris@uplanet.com) - -- Fix max packet length test. - -- Use "/dev/null" instead of "." for file descriptor fodder. - Suggested by Tim Robbins (fyre@box3n.gumbynet.org) - -- Watch for a NULL argv[0]. Suggested by Tim Robbins. - -- Be careful with hostname legnths. - -- Print RFC1191 Path MTU Discovery value on "needfrag" unreachables. - -- Limit port size to 16 bits. Suggested by Tim Robbins. - -- Limit wait time to 24 hours. - -- Modified linux specific struct ipovly definition to avoid problems - with 64 bit systems. Problem reported by Uros Prestor - (uros@turbolinux.com) - -- Use kernel routing tables to determine correct source address. - Three styles are supported: bsd/socket, solaris/mib and linux. - -- Fix configure to recognize older versions of Solaris. - -v1.3.2 Thu Sep 26 18:06:16 PDT 1996 - -- Rewrite source routing code to eliminate a number of problems on - systems using raw ip options. Also pad options with a noop so gateway - addresses are aligned. - -- Don't call inet_ntoa() twice in the same printf(). Thanks to NetBSD - via Bill Fenner (fenner@parc.xerox.com) - -- Decode "administratively prohibited filter" icmp code and print - numeric value for unknown codes. Thanks to Bill Fenner. - -v1.3.1 Wed Sep 18 21:08:16 PDT 1996 - -- Some systems (e.g. AIX) need sys/select.h. Thanks to Brett Hogden - (hogden@rge.com) - -- Byte swap ip header length under Solaris. (This has no effect on the - sparc but is required on the i386.) - -- Made optional packet length control total size of packet. - -v1.3 Mon Sep 16 14:55:44 PDT 1996 - -- Overrun buffer security fixes. Thanks to Bill Fenner - (fenner@parc.xerox.com) - -- Wait for response packet relative to start of probe. Thanks to Bill - Fenner. - -- Fix bug that prevented changing the packet size. Thanks to Gregory - Decker (gdecker@nate.dcrt.nih.gov) - -- Add support for RAW_OPTIONS (e.g. 4.4 BSD systems such as BSD/OS and - FreeBSD) thanks to Jeffrey C Honig (jch@bsdi.com) - -- Remove ip header byte swap fix from v1.2; most kernels swap the ip - header length in the kernel (and it causes OSF3 to crash). - -- Fix to not exit when the number of probes is set to 1 (i.e. "-q 1") - -- Improve autoconf configuration. - -v1.2 Tue Oct 17 23:50:05 PDT 1995 - -- Convert to autoconf and ansify. - -- Byte swap ip header length for little endian machines. Fix thanks to - Y Badri (yb@greybox.demon.co.uk). - -v1.1 Thu Jun 15 02:32:55 PDT 1995 - -- Check for too many arguments. - -- Recode to make timing of packet's round trip more obvious and to - tighten up code. - -- Ifdef IP_OPTIONS code. - -- Display time in microseconds. - -v1.0 Tue Feb 28 23:50:05 PDT 1989 - -- Initial public release. diff --git a/contrib/traceroute/FILES b/contrib/traceroute/FILES deleted file mode 100644 index 7a585ba9cedc..000000000000 --- a/contrib/traceroute/FILES +++ /dev/null @@ -1,37 +0,0 @@ -CHANGES -FILES -INSTALL -Makefile.in -README -VERSION -aclocal.m4 -config.guess -config.sub -configure -configure.in -findsaddr-generic.c -findsaddr-linux.c -findsaddr-mib.c -findsaddr-socket.c -findsaddr.h -ifaddrlist.c -ifaddrlist.h -install-sh -lbl/gnuc.h -lbl/os-solaris2.h -lbl/os-sunos4.h -linux-include/netinet/in_systm.h -linux-include/netinet/ip.h -linux-include/netinet/ip_icmp.h -linux-include/netinet/ip_var.h -linux-include/netinet/udp.h -linux-include/netinet/udp_var.h -mean.awk -median.awk -mkdep -rip_output.c -strerror.c -traceroute.8 -traceroute.c -traceroute.h -usleep.c diff --git a/contrib/traceroute/FREEBSD-upgrade b/contrib/traceroute/FREEBSD-upgrade deleted file mode 100644 index 4ed42321d26e..000000000000 --- a/contrib/traceroute/FREEBSD-upgrade +++ /dev/null @@ -1,36 +0,0 @@ -This directory contains virgin copies of the original distribution files -on a "vendor" branch. Do not, under any circumstances, attempt to upgrade -the files in this directory via patches and a cvs commit. - -To upgrade to a newer version of traceroute, when it is available: - - 1. Unpack the new version into an empty directory. - [Do not make ANY changes to the files.] - - 2. Use the command: - cvs import -I linux-include \ - -m 'Virgin import of LBL traceroute v' \ - src/contrib/traceroute LBL v - - For example, to do the import of version 1.3.2, I might have typed: - cvs import -I linux-include \ - -m 'Virgin import of LBL traceroute v1.3.2' \ - src/contrib/traceroute LBL v1_3_2 - - 3. Follow the instructions printed out in step 2 to resolve any - conflicts between local FreeBSD changes and the newer version. - -Do not, under any circumstances, deviate from this procedure. - -To make local changes to traceroute, simply patch and commit to the main -branch (aka HEAD). Never make local changes on the LBL branch. - -All local changes should be submitted to "traceroute@ee.lbl.gov" for -inclusion in the next vendor release of traceroute. - -(The "SANE_PRECISION" patch has been submitted and rejected.) - -(The extensive modifications for TCP and GRE probes have not been -submitted.) - -fenner@freebsd.org - 30 Sep 1996 diff --git a/contrib/traceroute/INSTALL b/contrib/traceroute/INSTALL deleted file mode 100644 index 45d361dc4a0e..000000000000 --- a/contrib/traceroute/INSTALL +++ /dev/null @@ -1,105 +0,0 @@ -@(#) $Id: INSTALL,v 1.13 2000/11/23 20:07:29 leres Exp $ (LBL) - -Traceroute is known to build and run under SunOS 4.1.4 and Solaris 5.4. -If you are running a really old kernel, see the instructions under the -title "KERNEL MODIFICATIONS" further down. - -To build traceroute, first customize any paths in Makefile.in, then run -"./configure" (a shell script). The configure script will determine -your system attributes and generate an appropriate Makefile from -Makefile.in. Next run "make". If everything goes well you can su to -root and run "make install" and "make install-man". Note that traceroute -must be installed setuid to root or run as root. - -If configure fails for some reason and decide to submit a bug report to -traceroute@ee.lbl.gov, please include a copy of config.log. - -You will need an ANSI C compiler to build libpcap. The configure script -will abort if your compiler is not ANSI compliant. If this happens, use -the GNU C compiler, available via anonymous ftp: - - ftp://prep.ai.mit.edu/pub/gnu/gcc-*.tar.gz - -If you get the error message: - - traceroute: unknown protocol icmp - -it usually means you're missing the icmp line in /etc/protocols. - -If you are using Solaris 2.5.1 (and possibly higher), traceroute cannot -calculate checksums; configure automatically changes the default to -reflect this. The kernel updates the ip_id field with some unknown -value and the ip_off field with the IP_DF bit. Also, if the the udp -uh_sum field is non-zero, it gets updated with the value of the uh_ulen -field... This means that the icmp echo option (-I flag) is not as -useful. - -KERNEL MODIFICATIONS --------------------- -If yor have a really old system, it may be necessary to modify your -kernel before traceroute will work. If you want to hack on your kernel, -a modified version of the routine rip_output (normally found in the -file /sys/netinet/raw_ip.c) can be found in rip_output.c. This code may -or may not resemble the code in your kernel. It may offer you a place -to start but we make no promises. If you do hack your kernel, remember -to test everything that uses raw ip sockets (e.g., ping and -egpup/gated) & make sure they still work. We wish you the best of luck -and you're on your own. - -Some older kernels forward icmp packets that have a ttl of zero. If -your system has this bug, you might want to fix it while you're in the -kernel. (This bug appears in all releases of BSD up to but not -including 4.3tahoe. If your version of netinet/ip_icmp.c is any earlier -than 7.3 (April, '87), it has the bug.) The fix is just to add the -line: - - ip->ip_ttl = MAXTTL; - -after the line: - - ip->ip_src = t; - -(or anywhere before the call to icmp_send) in routine icmp_reflect. - -If you're running this on a pre-4.3bsd system (e.g., SunOS 3) that -strips ip headers from icmp messages, add -DARCHAIC to CFLAGS in the -Makefile. Also note that rip_output contains a conditional for a -4.2/4.3 change in the location of a raw socket's protocol number. I've -checked this under 4.3 & SunOS 3 but you should double-check your -system to make sure the appropriate branch of the #if is taken (check -the line that assigned to ip->ip_p in your system's original -rip_output). - - -FILES ------ -CHANGES - description of differences between releases -FILES - list of files exported as part of the distribution -INSTALL - this file -Makefile.in - compilation rules (input to the configure script) -README - description of distribution -VERSION - version of this release -aclocal.m4 - autoconf macros -config.guess - autoconf support -config.sub - autoconf support -configure - configure script (run this first) -configure.in - configure script source -findsaddr-generic.c - generic source address code -findsaddr-linux.c - linux source address code -findsaddr-socket.c - socket based soruce address code -findsaddr.h - source address prototypes -ifaddrlist.c - inet address routines -ifaddrlist.h - inet address prototypes -install-sh - BSD style install script -lbl/gnuc.h - gcc macros and defines -lbl/os-*.h - os dependent defines and prototypes -linux-include/* - network include files missing on Linux -mean.awk - awk script to print out the mean time along a route -median.awk - awk script to print out the median time along a route -mkdep - construct Makefile dependency list -rip_output.c - sample rip_output() from /sys/netinet/raw_ip.c -strerror.c - emulation routine -traceroute.8 - manual entry -traceroute.c - main program -traceroute.h - global prototypes -usleep.c - missing system call emulation diff --git a/contrib/traceroute/README b/contrib/traceroute/README deleted file mode 100644 index bd4df4cb8295..000000000000 --- a/contrib/traceroute/README +++ /dev/null @@ -1,29 +0,0 @@ -@(#) $Id: README,v 1.9 2000/09/16 05:32:01 leres Exp $ (LBL) - -TRACEROUTE 1.4 -Lawrence Berkeley National Laboratory -Network Research Group -traceroute@ee.lbl.gov -ftp://ftp.ee.lbl.gov/traceroute.tar.gz - -Traceroute is a system administrators utility to trace the route -ip packets from the current system take in getting to some -destination system. See the comments at the front of the -program for a description of its use. - -This program uses raw ip sockets and must be run as root (or installed -setuid to root). - -A couple of awk programs to massage the traceroute output are -included. "mean.awk" and "median.awk" compute the mean and median time -to each hop, respectively. I've found that something like - - traceroute -q 7 foo.somewhere >t - awk -f median.awk t | xgraph - -can give you a quick picture of the bad spots on a long path (median is -usually a better noise filter than mean). - -Problems, bugs, questions, desirable enhancements, source code -contributions, etc., should be sent to the email address -"traceroute@ee.lbl.gov". diff --git a/contrib/traceroute/VERSION b/contrib/traceroute/VERSION deleted file mode 100644 index 4044959ea471..000000000000 --- a/contrib/traceroute/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.4a12+FreeBSD diff --git a/contrib/traceroute/mean.awk b/contrib/traceroute/mean.awk deleted file mode 100644 index 2d5e37820694..000000000000 --- a/contrib/traceroute/mean.awk +++ /dev/null @@ -1,12 +0,0 @@ -/^ *[0-9]/ { - # print out the average time to each hop along a route. - tottime = 0; n = 0; - for (f = 5; f <= NF; ++f) { - if ($f == "ms") { - tottime += $(f - 1) - ++n - } - } - if (n > 0) - print $1, tottime/n, median -} diff --git a/contrib/traceroute/median.awk b/contrib/traceroute/median.awk deleted file mode 100644 index 5935bad4ff4b..000000000000 --- a/contrib/traceroute/median.awk +++ /dev/null @@ -1,29 +0,0 @@ -/^ *[0-9]/ { - # print out the median time to each hop along a route. - tottime = 0; n = 0; - for (f = 5; f <= NF; ++f) { - if ($f == "ms") { - ++n - time[n] = $(f - 1) - } - } - if (n > 0) { - # insertion sort the times to find the median - for (i = 2; i <= n; ++i) { - v = time[i]; j = i - 1; - while (time[j] > v) { - time[j+1] = time[j]; - j = j - 1; - if (j < 0) - break; - } - time[j+1] = v; - } - if (n > 1 && (n % 2) == 0) - median = (time[n/2] + time[(n/2) + 1]) / 2 - else - median = time[(n+1)/2] - - print $1, median - } -} diff --git a/contrib/traceroute/rip_output.c b/contrib/traceroute/rip_output.c deleted file mode 100644 index 0b092b1e8e2f..000000000000 --- a/contrib/traceroute/rip_output.c +++ /dev/null @@ -1,73 +0,0 @@ -/* A sample version of rip_output() from /sys/netinet/raw_ip.c */ - -rip_output(m, so) - register struct mbuf *m; - struct socket *so; -{ - register struct ip *ip; - int error; - struct rawcb *rp = sotorawcb(so); - struct sockaddr_in *sin; -#if BSD>=43 - short proto = rp->rcb_proto.sp_protocol; -#else - short proto = so->so_proto->pr_protocol; -#endif - /* - * if the protocol is IPPROTO_RAW, the user handed us a - * complete IP packet. Otherwise, allocate an mbuf for a - * header and fill it in as needed. - */ - if (proto != IPPROTO_RAW) { - /* - * Calculate data length and get an mbuf - * for IP header. - */ - int len = 0; - struct mbuf *m0; - - for (m0 = m; m; m = m->m_next) - len += m->m_len; - - m = m_get(M_DONTWAIT, MT_HEADER); - if (m == 0) { - m = m0; - error = ENOBUFS; - goto bad; - } - m->m_off = MMAXOFF - sizeof(struct ip); - m->m_len = sizeof(struct ip); - m->m_next = m0; - - ip = mtod(m, struct ip *); - ip->ip_tos = 0; - ip->ip_off = 0; - ip->ip_p = proto; - ip->ip_len = sizeof(struct ip) + len; - ip->ip_ttl = MAXTTL; - } else - ip = mtod(m, struct ip *); - - if (rp->rcb_flags & RAW_LADDR) { - sin = (struct sockaddr_in *)&rp->rcb_laddr; - if (sin->sin_family != AF_INET) { - error = EAFNOSUPPORT; - goto bad; - } - ip->ip_src.s_addr = sin->sin_addr.s_addr; - } else - ip->ip_src.s_addr = 0; - - ip->ip_dst = ((struct sockaddr_in *)&rp->rcb_faddr)->sin_addr; - -#if BSD>=43 - return (ip_output(m, rp->rcb_options, &rp->rcb_route, - (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST)); -#else - return (ip_output(m, (struct mbuf *)0, &rp->rcb_route, - (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST)); -#endif -bad: - m_freem(m); - return (error); -} diff --git a/usr.sbin/traceroute/Makefile b/usr.sbin/traceroute/Makefile index 8ea7ee22d19a..fd013be9ba9a 100644 --- a/usr.sbin/traceroute/Makefile +++ b/usr.sbin/traceroute/Makefile @@ -1,16 +1,12 @@ .include -TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute -.PATH: ${TRACEROUTE_DISTDIR} - PACKAGE= runtime PROG= traceroute MAN= traceroute.8 -SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-udp.c +SRCS= as.c traceroute.c ifaddrlist.c findsaddr-udp.c BINOWN= root BINMODE=4555 -CLEANFILES= version.c CFLAGS+= -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1 \ -DHAVE_NET_ROUTE_H=1 -DHAVE_NET_IF_DL_H=1 \ @@ -36,14 +32,6 @@ LIBADD+= cap_dns CFLAGS+=-DWITH_CASPER .endif -CFLAGS+= -I${TRACEROUTE_DISTDIR} - WARNS?= 3 -version.c: ${TRACEROUTE_DISTDIR}/VERSION - @rm -f ${.TARGET} - head -1 ${TRACEROUTE_DISTDIR}/VERSION | \ - sed -e 's/.*/char version[] = "&";/' \ - > ${.TARGET} - .include diff --git a/contrib/traceroute/as.c b/usr.sbin/traceroute/as.c similarity index 100% rename from contrib/traceroute/as.c rename to usr.sbin/traceroute/as.c diff --git a/contrib/traceroute/as.h b/usr.sbin/traceroute/as.h similarity index 100% rename from contrib/traceroute/as.h rename to usr.sbin/traceroute/as.h diff --git a/contrib/traceroute/findsaddr-socket.c b/usr.sbin/traceroute/findsaddr-socket.c similarity index 100% rename from contrib/traceroute/findsaddr-socket.c rename to usr.sbin/traceroute/findsaddr-socket.c diff --git a/contrib/traceroute/findsaddr.h b/usr.sbin/traceroute/findsaddr.h similarity index 100% rename from contrib/traceroute/findsaddr.h rename to usr.sbin/traceroute/findsaddr.h diff --git a/contrib/traceroute/ifaddrlist.c b/usr.sbin/traceroute/ifaddrlist.c similarity index 100% rename from contrib/traceroute/ifaddrlist.c rename to usr.sbin/traceroute/ifaddrlist.c diff --git a/contrib/traceroute/ifaddrlist.h b/usr.sbin/traceroute/ifaddrlist.h similarity index 100% rename from contrib/traceroute/ifaddrlist.h rename to usr.sbin/traceroute/ifaddrlist.h diff --git a/contrib/traceroute/traceroute.8 b/usr.sbin/traceroute/traceroute.8 similarity index 100% rename from contrib/traceroute/traceroute.8 rename to usr.sbin/traceroute/traceroute.8 diff --git a/contrib/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c similarity index 99% rename from contrib/traceroute/traceroute.c rename to usr.sbin/traceroute/traceroute.c index 643caedc4c34..b8dcc423ebde 100644 --- a/contrib/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -2146,9 +2146,6 @@ pkt_compare(const u_char *a, int la, const u_char *b, int lb) { void usage(void) { - extern char version[]; - - Fprintf(stderr, "Version %s\n", version); Fprintf(stderr, "Usage: %s [-adDeEFInrSvx] [-A as_server] [-f first_ttl] [-g gateway]\n" "\t[-i iface] [-m max_ttl] [-M first_ttl] [-p port] [-P proto]\n" diff --git a/contrib/traceroute/traceroute.h b/usr.sbin/traceroute/traceroute.h similarity index 100% rename from contrib/traceroute/traceroute.h rename to usr.sbin/traceroute/traceroute.h From nobody Thu Feb 8 16:55:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW34p3jXrz5B28d; Thu, 8 Feb 2024 16:55: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 4TW34p2hq1z4Swt; Thu, 8 Feb 2024 16:55:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhhEffa9dDsYblAMwx8PJtG3lzbZ4WvdenLqyQeZeDY=; b=o/QudMbQkmpYrQmL2FOWrVnTYqk8A3fWyj+CLGWAEjgr7WvfE2bCCdh8zkTTDDhxE00t+y i3nfArlJQZHzlkxLYROOFxeMZB71CMX3BVg2SSMo9eZyEg7wkZlqBTJ3cHhpHDsXCL63Wz 072Zqjq/tFZrEZ+6H3+2Jbm9vph3dVdMvt9Sf3x4CbhEIdli11hRepoDT30p8HI/8wwv5r rjPezWMNj2h1rdUVXt4bOCZXPXyH6mp9q/CN+IAl/YFDCRTtOh25uzbq+IKZiArE6h+1jX azM3v4xPgImjmTea1rbbF7rJJK242+draIbl+b5tCtm6tdXYV2OMZKppvVGj9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhhEffa9dDsYblAMwx8PJtG3lzbZ4WvdenLqyQeZeDY=; b=YmXU+Gn3WBhD0rW5wy13odSV+TRb9wWoCeXcZKaWq3+O+qdUF2Gbu11PEey+zrddA1RAm2 dsnFMeLvh10hZ0P14b0+7p5rY/e5hQ8ZjofDJJMXni0TatytBXhhDOYyDVhR6Uc+lH5G03 wK+9GHUHHl/LaHeFECoLPWXk7kntK6EMJEaifYTLTOIUVxIgqalYaV7EU1CVryPBhvjSW7 uP6qLlPhdA+2y47ueu3XA0lySiGGn1gQ7EgoLeqDduVjwTDArydXym/iacY7xV13dZffUL 1Q/T2kYnu0wqP1D095JyvbSKDGBtI0mdUF0gQPuOle4F/cgYUbn/ZUTPddfrZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707411306; a=rsa-sha256; cv=none; b=aZeLtUZ9wWxbgJwCDk7Jm4W/PfdWYCgZ/Y8l8WUpjX7x7y9xywlkp9GrXc9iB5FyGbpTjA ja3rnumYadEZl7M2naWF4Q2UdJ67rP3bXjcbSSJzfAL9WoFI+FCjAgdP7hDd/jSfBIWqVJ R1KbzIRI8i11nY5E18ZPQzSmuYQ2K19qeJjpaP7GaWslvgkYO1HX11MVF4y1uyRb8euWjU KNrgJftDbHfbjkIw5VO48JCKOLMWm9Hh2ojonaQvZ9+fwIDEBExYMPJWBAJUfdDbp+Lqje TrgCjakDiQM4gQER/zlh9Q99cC+/zcLBu02FJmjBtxCzqn7OpX+XcPKkspv/Nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW34p1mQJzyDt; Thu, 8 Feb 2024 16:55: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 418Gt6Tl054692; Thu, 8 Feb 2024 16:55:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418Gt6jK054689; Thu, 8 Feb 2024 16:55:06 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:55:06 GMT Message-Id: <202402081655.418Gt6jK054689@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: 6a6c5572c341 - main - traceroute: remove configuration #defines List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a6c5572c3411d3b4d5a423d3bb8d53026cb4355 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6a6c5572c3411d3b4d5a423d3bb8d53026cb4355 commit 6a6c5572c3411d3b4d5a423d3bb8d53026cb4355 Author: Lexi Winter AuthorDate: 2024-02-03 13:19:03 +0000 Commit: Warner Losh CommitDate: 2024-02-08 16:52:42 +0000 traceroute: remove configuration #defines traceroute used a series of #defines to specify what features are available on the host platform. As traceroute is now in source, these are unnecessary and complicate the code, so remove them. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1100 --- usr.sbin/traceroute/Makefile | 6 --- usr.sbin/traceroute/findsaddr-socket.c | 30 --------------- usr.sbin/traceroute/ifaddrlist.c | 8 ---- usr.sbin/traceroute/traceroute.c | 67 ---------------------------------- 4 files changed, 111 deletions(-) diff --git a/usr.sbin/traceroute/Makefile b/usr.sbin/traceroute/Makefile index fd013be9ba9a..45a80174f5ab 100644 --- a/usr.sbin/traceroute/Makefile +++ b/usr.sbin/traceroute/Makefile @@ -8,12 +8,6 @@ SRCS= as.c traceroute.c ifaddrlist.c findsaddr-udp.c BINOWN= root BINMODE=4555 -CFLAGS+= -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1 \ - -DHAVE_NET_ROUTE_H=1 -DHAVE_NET_IF_DL_H=1 \ - -DHAVE_STRERROR=1 -DHAVE_USLEEP=1 \ - -DHAVE_SYS_SYSCTL_H=1 -DBYTESWAP_IP_HDR=1 \ - -DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \ - -DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_ICMP_NEXTMTU=1 .if !defined(TRACEROUTE_NO_IPSEC) CFLAGS+= -DIPSEC .endif diff --git a/usr.sbin/traceroute/findsaddr-socket.c b/usr.sbin/traceroute/findsaddr-socket.c index b15c2e43a407..a3f830e6aab7 100644 --- a/usr.sbin/traceroute/findsaddr-socket.c +++ b/usr.sbin/traceroute/findsaddr-socket.c @@ -42,9 +42,7 @@ static const char rcsid[] = #include #include #include -#ifdef HAVE_SYS_SOCKIO_H #include -#endif #include /* concession to AIX */ #if __STDC__ @@ -64,17 +62,11 @@ struct rtentry; #include #include "gnuc.h" -#ifdef HAVE_OS_PROTO_H #include "os-proto.h" -#endif #include "findsaddr.h" -#ifdef HAVE_SOCKADDR_SA_LEN #define SALEN(sa) ((sa)->sa_len) -#else -#define SALEN(sa) salen(sa) -#endif #ifndef roundup #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ @@ -92,10 +84,6 @@ static struct rtmsg rtmsg = { { 0 } }; -#ifndef HAVE_SOCKADDR_SA_LEN -static int salen(struct sockaddr *); -#endif - /* * Return the source address for the given destination address */ @@ -199,21 +187,3 @@ findsaddr(register const struct sockaddr_in *to, return ("failed!"); } - -#ifndef HAVE_SOCKADDR_SA_LEN -static int -salen(struct sockaddr *sa) -{ - switch (sa->sa_family) { - - case AF_INET: - return (sizeof(struct sockaddr_in)); - - case AF_LINK: - return (sizeof(struct sockaddr_dl)); - - default: - return (sizeof(struct sockaddr)); - } -} -#endif diff --git a/usr.sbin/traceroute/ifaddrlist.c b/usr.sbin/traceroute/ifaddrlist.c index 0523a47ce61d..1b4b9db00c7f 100644 --- a/usr.sbin/traceroute/ifaddrlist.c +++ b/usr.sbin/traceroute/ifaddrlist.c @@ -40,9 +40,7 @@ static const char rcsid[] = #include #include #include -#ifdef HAVE_SYS_SOCKIO_H #include -#endif #include /* concession to AIX */ #if __STDC__ @@ -70,9 +68,7 @@ int ifaddrlist(register struct ifaddrlist **ipaddrp, register char *errbuf) { register int fd, nipaddr; -#ifdef HAVE_SOCKADDR_SA_LEN size_t n; -#endif register struct ifreq *ifrp, *ifend, *ifnext; register struct sockaddr_in *sin; register struct ifaddrlist *al; @@ -108,7 +104,6 @@ ifaddrlist(register struct ifaddrlist **ipaddrp, register char *errbuf) al = ifaddrlist; nipaddr = 0; for (; ifrp < ifend; ifrp = ifnext) { -#ifdef HAVE_SOCKADDR_SA_LEN n = ifrp->ifr_addr.sa_len + sizeof(ifrp->ifr_name); if (n < sizeof(*ifrp)) ifnext = ifrp + 1; @@ -116,9 +111,6 @@ ifaddrlist(register struct ifaddrlist **ipaddrp, register char *errbuf) ifnext = (struct ifreq *)((char *)ifrp + n); if (ifrp->ifr_addr.sa_family != AF_INET) continue; -#else - ifnext = ifrp + 1; -#endif /* * Need a template to preserve address info that is * used below to locate the next entry. (Otherwise, diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index b8dcc423ebde..594eedca8081 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -204,13 +204,9 @@ static const char rcsid[] = #include #include #include -#ifdef HAVE_SYS_SELECT_H #include -#endif #include -#ifdef HAVE_SYS_SYSCTL_H #include -#endif #include #include @@ -241,9 +237,7 @@ static const char rcsid[] = #include #include #include -#ifdef HAVE_MALLOC_H #include -#endif #include #include #include @@ -305,14 +299,6 @@ struct outdata { struct timeval tv; /* time packet left */ }; -#ifndef HAVE_ICMP_NEXTMTU -/* Path MTU Discovery (RFC1191) */ -struct my_pmtu { - u_short ipm_void; - u_short ipm_nextmtu; -}; -#endif - u_char packet[512]; /* last inbound (icmp) packet */ struct ip *outip; /* last output ip packet */ @@ -396,9 +382,6 @@ void tvsub(struct timeval *, struct timeval *); void usage(void); int wait_for_reply(int, struct sockaddr_in *, const struct timeval *); void pkt_compare(const u_char *, int, const u_char *, int); -#ifndef HAVE_USLEEP -int usleep(u_int); -#endif void udp_prep(struct outdata *); int udp_check(const u_char *, int); @@ -764,11 +747,7 @@ main(int argc, char **argv) usage(); } -#ifdef HAVE_SETLINEBUF setlinebuf(stdout); -#else - setvbuf(stdout, NULL, _IOLBF, 0); -#endif protlen = packlen - sizeof(*outip) - optlen; if ((proto->num == IPPROTO_SCTP) && (packlen & 3)) { @@ -791,16 +770,10 @@ main(int argc, char **argv) outip->ip_tos &= ~IPTOS_ECN_MASK; outip->ip_tos |= IPTOS_ECN_ECT1; } -#ifdef BYTESWAP_IP_HDR outip->ip_len = htons(packlen); outip->ip_off = htons(off); -#else - outip->ip_len = packlen; - outip->ip_off = off; -#endif outip->ip_p = proto->num; outp = (u_char *)(outip + 1); -#ifdef HAVE_RAW_OPTIONS if (lsrr > 0) { register u_char *optlist; @@ -822,7 +795,6 @@ main(int argc, char **argv) optlist[3] = IPOPT_MINOFF; memcpy(optlist + 4, gwlist + 1, i); } else -#endif outip->ip_dst = to->sin_addr; outip->ip_hl = (outp - (u_char *)outip) >> 2; @@ -858,39 +830,6 @@ main(int argc, char **argv) exit(1); } -#if defined(IP_OPTIONS) && !defined(HAVE_RAW_OPTIONS) - if (lsrr > 0) { - u_char optlist[MAX_IPOPTLEN]; - - cp = "ip"; - if ((pe = getprotobyname(cp)) == NULL) { - Fprintf(stderr, "%s: unknown protocol %s\n", prog, cp); - exit(1); - } - - /* final hop */ - gwlist[lsrr] = to->sin_addr.s_addr; - ++lsrr; - - /* force 4 byte alignment */ - optlist[0] = IPOPT_NOP; - /* loose source route option */ - optlist[1] = IPOPT_LSRR; - i = lsrr * sizeof(gwlist[0]); - optlist[2] = i + 3; - /* Pointer to LSRR addresses */ - optlist[3] = IPOPT_MINOFF; - memcpy(optlist + 4, gwlist, i); - - if ((setsockopt(sndsock, pe->p_proto, IP_OPTIONS, - (char *)optlist, i + sizeof(gwlist[0]))) < 0) { - Fprintf(stderr, "%s: IP_OPTIONS: %s\n", - prog, strerror(errno)); - exit(1); - } - } -#endif - #ifdef SO_SNDBUF if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, (char *)&packlen, sizeof(packlen)) < 0) { @@ -1449,11 +1388,7 @@ packet_ok(register u_char *buf, int cc, register struct sockaddr_in *from, if (code != ICMP_UNREACH_NEEDFRAG) pmtu = 0; else { -#ifdef HAVE_ICMP_NEXTMTU pmtu = ntohs(icp->icmp_nextmtu); -#else - pmtu = ntohs(((struct my_pmtu *)&icp->icmp_void)->ipm_nextmtu); -#endif } if (type == ICMP_ECHOREPLY && proto->num == IPPROTO_ICMP @@ -2055,9 +1990,7 @@ setsin(register struct sockaddr_in *sin, register u_int32_t addr) { memset(sin, 0, sizeof(*sin)); -#ifdef HAVE_SOCKADDR_SA_LEN sin->sin_len = sizeof(*sin); -#endif sin->sin_family = AF_INET; sin->sin_addr.s_addr = addr; } From nobody Thu Feb 8 16:55:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW34r4Zjfz5B207; Thu, 8 Feb 2024 16:55: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 4TW34r1wRFz4SxQ; Thu, 8 Feb 2024 16:55:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8gONkfoAADvigXR0aS7LBIaxZpdRuKf4spI/hvDJgLQ=; b=JuRuNhtpymwVTgVL5ctdPpkmfcYIU1MsH/LdCQc71FzUe61K811rdH8xz7u1bpvvyt+4s6 PFa+gyBTKaNQ2+ZbdhCYuWfLcOmZMoxCsCqUx3Z4cAd3v7wlRv2IghATTPa5pcv3ptfN4M RKfGKWSkIEojL0+e8yyj75jHdsUADccxtpSFRwv9xkrXFdSjcKMjFRcumbfqWwBvdPF1sf qoQNJvRSCFo4gx4Q5bC4ET/Gb7b72LfzU4T/ZYtRpp+ucC/Ojjv+fINxMy9OLVOnt8bPXG yrKKxV/TIIDQb2gGVZKc3KfDAzTugztw1i8CJQ526AAFtOjjscJQCQvWtOO5cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8gONkfoAADvigXR0aS7LBIaxZpdRuKf4spI/hvDJgLQ=; b=Ha3xTuTGVpGZf29vbkAAX6jyJ9a5GfjZuKvg0Lal+XEs52tjwukoroPfhI1VijJ8siNE9x YOlXPxnIRrX37RN3s9YUp2IzDiNkemy2dbUQO3E5gBPL2YiGimZ5ljv9IOVR6t+powMOgu EhaocXhQM7bdqK9TuSXbdWyFGWibBuG6XBinyC1Zsyg277Nl8fpvdfw+skKG56dz8vt0Y8 PIPwSn7NancD+AqcQneH6q6SFutF59Yc5+DfbnRQP5zS8RostGcIe4SqcgGu6s/21JlTQZ CFrohyQty+mCwv39zTIsprtLBFj3sAOkIzWKZmQE7RDCfFx4JFltJWHFz5I+Cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707411308; a=rsa-sha256; cv=none; b=LMxMIkq010l2rmuHDSDC26Xe0JVfGSjbZCcMhpRN6H+FD5p+rMYCMJ2s2wmHGzwrmrvrCu RUoVNzuDO7ks9Gg7PlYyzmO9SCosEawvDuVLQpydv+GSVH8wLRSYWjVXNC4T3XI37bSnM6 ZIpT722NsTaKxh54VUXdiQBku5eaIKNO1EHHkcol6/X5jXaqHNOVGK47WZKSOx6C792Jh4 JtGOYvoRgwz0rfBQ7XK+xLGjl8Hhs4Tx7ith9/rFoLHcvVwqu4VISjje9zn1R8kvZEeSLK Prg51USGLv+wT4hvrsQFHqbTzSSpzFMYKMWLO1z0aQ0XxugQ6rQ98b9wNpZyJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW34q2mhLzyBf; Thu, 8 Feb 2024 16:55: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 418Gt7FR054734; Thu, 8 Feb 2024 16:55:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418Gt7p9054731; Thu, 8 Feb 2024 16:55:07 GMT (envelope-from git) Date: Thu, 8 Feb 2024 16:55:07 GMT Message-Id: <202402081655.418Gt7p9054731@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: 3f0b10892442 - main - traceroute: remove rcsid tags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f0b108924428ff91f2640de5f01df0d0bf45253 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f0b108924428ff91f2640de5f01df0d0bf45253 commit 3f0b108924428ff91f2640de5f01df0d0bf45253 Author: Lexi Winter AuthorDate: 2024-02-03 13:24:26 +0000 Commit: Warner Losh CommitDate: 2024-02-08 16:52:42 +0000 traceroute: remove rcsid tags Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1100 --- usr.sbin/traceroute/findsaddr-socket.c | 5 ----- usr.sbin/traceroute/ifaddrlist.c | 5 ----- usr.sbin/traceroute/traceroute.c | 10 ---------- 3 files changed, 20 deletions(-) diff --git a/usr.sbin/traceroute/findsaddr-socket.c b/usr.sbin/traceroute/findsaddr-socket.c index a3f830e6aab7..48b0289f8e06 100644 --- a/usr.sbin/traceroute/findsaddr-socket.c +++ b/usr.sbin/traceroute/findsaddr-socket.c @@ -33,11 +33,6 @@ /* XXX Yes this is WAY too complicated */ -#ifndef lint -static const char rcsid[] = - "@(#) $Id: findsaddr-socket.c,v 1.1 2000/11/23 20:17:12 leres Exp $ (LBL)"; -#endif - #include #include #include diff --git a/usr.sbin/traceroute/ifaddrlist.c b/usr.sbin/traceroute/ifaddrlist.c index 1b4b9db00c7f..e2b49292fbe7 100644 --- a/usr.sbin/traceroute/ifaddrlist.c +++ b/usr.sbin/traceroute/ifaddrlist.c @@ -31,11 +31,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "@(#) $Id: ifaddrlist.c,v 1.9 2000/11/23 20:01:55 leres Exp $ (LBL)"; -#endif - #include #include #include diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index 594eedca8081..ec7a479afb7b 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -19,16 +19,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static const char copyright[] = - "@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000\n\ -The Regents of the University of California. All rights reserved.\n"; -#if 0 -static const char rcsid[] = - "@(#)$Id: traceroute.c,v 1.68 2000/12/14 08:04:33 leres Exp $ (LBL)"; -#endif -#endif - /* * traceroute host - trace the route ip packets follow going to "host". * From nobody Thu Feb 8 17:01:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW3Cg6Nghz5B2Rs; Thu, 8 Feb 2024 17:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TW3Cg4R0jz4VFl; Thu, 8 Feb 2024 17:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oOynqtPfiCdBSaDd/scTIEb8gCFLxh1/BSQUD8RBNUE=; b=pov8V3gv/16asPLKtF2rSDITWbriD9dgx/58SjU9fkKwxm46rVarcTjOBFIzAChg6gy1/h 5ycY9/Qb4U7pyQ1aoP2MYhQuDsOex7NeaFL7J4f8E0C7duzJSradicZbyRlzbNJnia+Zz2 Yk9uLFV2ud/wJog5pmvM1lda+kToZgOm8P3kKqPMnM71Mn2ruZB7f8Y0w7aTYIDw7ZFBRu iXmcyEk/gatGfNIj7IQEmkWTSIOM1u5gKmePph1BLM7BIQKX4Mi60w/bmB49phkxfSUq6x Lz3QLTQVWZE4QG2DeXqlUpDwsGgA3LVWcwMDjojZN7VpQXSDFXMk+tgDu7C8lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oOynqtPfiCdBSaDd/scTIEb8gCFLxh1/BSQUD8RBNUE=; b=AnBivWa8KK2JxqHCDFy0p7duGW9tHd0vQXY5IVs345+/uXZ8hKJq2Te1DoLoKgzpnzNduE 6U5DBCJaCwsRZEN6lgr8JoSS68eZ3ILkAgNIx/zep84R6Y3jbf0fwahRTFdpemXB8Dst/L 3kNdvFNOo4GBK1D4Zl6p4hbmhwx1qxEyfKyKbkaYAIluI5RHeBC+w7LtAn3TZ5flYW7cmg +CuunNbsF81Vr5zfDQSCe4j+D8T4w4aZRHXWpfpPV4pfZo6vuDqfZUMTV37IbgHOkwbJQp mWR7KW+DbBJKe6A/HWYe5I+IpYcGUtoITnZ9EhjrE7R6Z4FN5vpyeQ3qiPsMFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707411663; a=rsa-sha256; cv=none; b=SRJfiskEVasCL0qmEkcbhYjbqGOGiSbype8UL6uFFC4OByMosRTtEa+B6ahlx7MUHqG79Y CFiFeou0b7dwt19m27Q4vQ5vwanVTY6vXc3rEa3o82Rld18RwpheGqUfF9UPg9FJL9hdOB csGtN9/3PtFnJduhKMewRtugZz5uqgl7k1rD6R0jLtF4Ce1o/DlkTyOId9+QkYrVBrmT6h J0Pn9pligIwef0Zf5jLri6JoMZaCu9wZpGYxIiYTs+W3SsSN3EzP1BC3kZwclrmU1u/6kC +TS/l07FUm1l4sjKwi6WGAuCaY2N1DbA6dn3gL4J4w4LIhScQBiwWWFwPx69qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW3Cg3VtSzyFC; Thu, 8 Feb 2024 17:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 418H13iw065633; Thu, 8 Feb 2024 17:01:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418H136l065630; Thu, 8 Feb 2024 17:01:03 GMT (envelope-from git) Date: Thu, 8 Feb 2024 17:01:03 GMT Message-Id: <202402081701.418H136l065630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 541e6a989cae - main - unix/stream: do not put empty mbufs on the socket List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 541e6a989caec749aff7851a3dc8fb546a53dcba Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=541e6a989caec749aff7851a3dc8fb546a53dcba commit 541e6a989caec749aff7851a3dc8fb546a53dcba Author: Gleb Smirnoff AuthorDate: 2024-02-08 17:00:23 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-08 17:00:23 +0000 unix/stream: do not put empty mbufs on the socket It is a legitimate case to use sendmsg(2) to send control only, with zero bytes of data and then recvmsg(2) them with zero length iov, receiving control only. This sendmsg(2)+recmsg(2) would leave a zero length mbuf on the top of the socket buffer. If you now try to repeat this combo again, your recvmsg(2) would not return control data, because it sits behind an MT_DATA mbuf and you have provided zero length uio_resid. IMHO, best strategy to deal with zero length buffers in a chain is to not put them there in the first place. Thus, solve this right in uipc_send() instead of touching soreceive_generic(). Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43733 --- sys/kern/uipc_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index a9a7dd3a1189..80458cd6a4fe 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -999,8 +999,8 @@ uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, switch (so->so_type) { case SOCK_STREAM: if (control != NULL) { - sbappendcontrol_locked(&so2->so_rcv, m, - control, flags); + sbappendcontrol_locked(&so2->so_rcv, + m->m_len > 0 ? m : NULL, control, flags); control = NULL; } else sbappend_locked(&so2->so_rcv, m, flags); From nobody Thu Feb 8 17:01:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW3Ch6kspz5B2GT; Thu, 8 Feb 2024 17:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TW3Ch5gb6z4V2l; Thu, 8 Feb 2024 17:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mvYhd7D2h466hALEZpPmXcIjJBW5HRsu9Fi3NfRUh1s=; b=KVmlAPSP4F1nziGIAtHfZ9EauTjxvwCkr/LwY9BIM90Gi4ttaCWH06fzge9XPM1V28vLnF 5EREE25XB4h9MjMncB57Uxt33NUFUlV+VLQg+uwxSiu7tXj8+XG1OoPB98KiG5hR/Jyps4 fdJjWjFcALYu8eY2l8hhkhGnW6egH5n+ubO/KV2iVBlql27eHnNTzmWJHdcI40/7s7dJg9 9RCt3sYacHIxjf5bq2bn+TwyWznXA4in9ag7BG9Gb1Ur8hCGcgISmMeALfiusqjqNh2EpM /0pfgm5iMZJdfSZdvylf4tkytLgyVtwWA/vPzAL9R0uehmdlkd2r4bwvWxhpeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mvYhd7D2h466hALEZpPmXcIjJBW5HRsu9Fi3NfRUh1s=; b=umbAgva/8NdK+FLSlqtkNHpi071xIVZ7orSQoKnmVFaxHH0UpXYqQ4BM6D0+Fl9GX5YWK0 KHgDYHbDC2/Y7pv1oui01AMyyMXIsFh5WG4kYCKhlDnCTOFapNNuIE74vkRRypvS6CKyD0 H6yiDinXQbLCFDQe7mmOC/JR3nhOg+qKwl3HnpdBn83+pJBdxVuIEJxaF1N66qS/BB6EHh kxfBKGj2g+jwl48HJIvbcMxdLKItzJSs9VIaDe3fad6M3haQeBSUP4XZpsb1xyIIlgkhA9 z3RBRXKYExY/m7h8+onYd0AwBx30v2HcjSb6NOWV7p4IP6eTBDEvhK+2911pzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707411664; a=rsa-sha256; cv=none; b=lZvSQksf1LMYGwDByme/0aX+JqnnB1W0NkAtnkQXYbNrjNQb2eIQ7W8+coQllW+kVv21sD HuJfmsSU4+Zx+hwNudF+xAEYeWv08qLoqg5DWMU0Hhgbr8JmE/VIx1uiiTgfXUSpElBBse vx7bv9LdY/U4M+yp07+3+wRwoILDjA+XUjbWc/K94vdY+HgG70rjzLsHlFAPhpZnLeTwTT 5JNPYSh+yTSJVJa0teELNLavGHe/nIExOIa+qolnSo21v9CJIJO2WvLikHV0tt95XFj8Dv pqhoCM2CJe/Pkg/yhHwsbBcEVY7mr5D+C/6c5bBSknuvRfrowgE4fjsBPhOD5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW3Ch4m3fzyKg; Thu, 8 Feb 2024 17:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 418H14l3065684; Thu, 8 Feb 2024 17:01:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418H14q8065681; Thu, 8 Feb 2024 17:01:04 GMT (envelope-from git) Date: Thu, 8 Feb 2024 17:01:04 GMT Message-Id: <202402081701.418H14q8065681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 45eae45d91cb - main - tests/unix_passfd: fix typos - assignment instead of comparison List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45eae45d91cb308396e15d6dabc764fc4c701f9f Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=45eae45d91cb308396e15d6dabc764fc4c701f9f commit 45eae45d91cb308396e15d6dabc764fc4c701f9f Author: Gleb Smirnoff AuthorDate: 2024-02-08 17:00:23 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-08 17:00:37 +0000 tests/unix_passfd: fix typos - assignment instead of comparison This typos were actually hiding a kernel bug, see 541e6a989cae. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43734 --- tests/sys/kern/unix_passfd_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/kern/unix_passfd_test.c b/tests/sys/kern/unix_passfd_test.c index 9c9a6a175ceb..67171e62c963 100644 --- a/tests/sys/kern/unix_passfd_test.c +++ b/tests/sys/kern/unix_passfd_test.c @@ -912,7 +912,7 @@ ATF_TC_BODY(empty_rights_message, tc) /* Only the non-empty message should be received. */ len = recvmsg(fd[1], &msghdr, 0); ATF_REQUIRE_MSG(len == 0, "recvmsg failed: %s", strerror(errno)); - ATF_REQUIRE(msghdr.msg_controllen = CMSG_SPACE(sizeof(int))); + ATF_REQUIRE(msghdr.msg_controllen == CMSG_SPACE(sizeof(int))); error = close(*(int *)CMSG_DATA(msghdr.msg_control)); ATF_REQUIRE_MSG(error == 0, "close failed: %s", strerror(errno)); @@ -938,7 +938,7 @@ ATF_TC_BODY(empty_rights_message, tc) /* Only the non-empty message should be received. */ len = recvmsg(fd[1], &msghdr, 0); ATF_REQUIRE_MSG(len == 0, "recvmsg failed: %s", strerror(errno)); - ATF_REQUIRE(msghdr.msg_controllen = CMSG_SPACE(sizeof(int))); + ATF_REQUIRE(msghdr.msg_controllen == CMSG_SPACE(sizeof(int))); error = close(*(int *)CMSG_DATA(msghdr.msg_control)); ATF_REQUIRE_MSG(error == 0, "close failed: %s", strerror(errno)); From nobody Thu Feb 8 17:01:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW3Cl1Dnwz5B2Mb; Thu, 8 Feb 2024 17:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TW3Cl0DJhz4VCB; Thu, 8 Feb 2024 17:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4a9c6Le7LvQjkIWH+Z3QB7wjCsA2mMkCbMbgMrnQSRA=; b=vadP8DVmtLeAJVqkwLEQ3iSn/mypoARq6EIvTkFFZs1bcLUDySTXtRvm6MxzdWe2xoGcJo z2e9URziLo5vOKm8RgmzWfafJccSVKLTvFXkCDvuSWPFu1jQ7tPt16+25sIrUbFZ8pfTtx 4NlofK0q6UCKK2XmMpHTY8LlJgwLSALe6+T/mCQhv1yQ9PleOaoLWxC1qGy39nAIpHtdr0 nSqLmsApyFFRtgaUMQ1R8I7ku5aK9Pkilh24VuDjNA1DakvbXlrZHu6kIblAtAecz/5016 G0zVGedkyZo86o+FwDl7ocjKyihJO9ulPDag8i9FTnOHE4NfuPS/ykrw7+TdXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4a9c6Le7LvQjkIWH+Z3QB7wjCsA2mMkCbMbgMrnQSRA=; b=HXyceZtUxSp+FWHbyHWLQo/SKeY8gJB9XJGS69q7zKVmXtRcBQpX8K8aFrni5Peuo0hYw1 qbP9J9KQTK5bjsESl9sZ8ibKcUlY8o1DU7SY1uiscRD/ulWj9j8YDMuVpfbehloRMGSsor 7YvAosASPBJKTk/S6LPoLrisVxSgLyuP+AwoG5/LdT7RL5zVT6/XjubcRWlYcjyQXyH6gY qDljpXFeLF0/2h2tDN7JBBx9brDioo2rg1vhql8E13rW3qufvcKptaVqDJbL7krKmCM5/p mgP3Iquu10Qurv6hEAYkfO9iJ2DY5ipVKeRlm3lQsNiB4kiLDBsh62xdBEqKxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707411667; a=rsa-sha256; cv=none; b=ca03PO5OjtgMrpFgjM3ZmoOsBcVSVMouqRS/UoYAOgawQ4HUk1s1QfpzG0qVPC4epS/REK YxWLZiLz+WDkndlfH4SDdohi3BpAeTPtKpVi/UHYnkNfOSJLh88bZ/e3pjLcGu86SbTYpR jEaryYXdtBD5tQXYDp739xGNT3cxj4Y7E8fGI5h94QZuMPTqmbkkj7x1EM7S7qUmm5tLdc end+xa9jp6fkr2eWS9/2wmQU24uqGqSWqkmKb51vYvUXBU1PXXNkXhXIGnO3UfsvrC70p5 CfHn6kZUKtA0DW4SPSsZtnrwqVZDvkbEWyZHYtuHK2znP/P0fX1k6MqwsfzVxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW3Ck6RXvzxpF; Thu, 8 Feb 2024 17:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 418H16tk065789; Thu, 8 Feb 2024 17:01:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418H16XL065786; Thu, 8 Feb 2024 17:01:06 GMT (envelope-from git) Date: Thu, 8 Feb 2024 17:01:06 GMT Message-Id: <202402081701.418H16XL065786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 3ad0f9a58410 - main - tests/unix_passfd: add a comment for send_a_lot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ad0f9a584106b85569c6366ef8117a664fd55f8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3ad0f9a584106b85569c6366ef8117a664fd55f8 commit 3ad0f9a584106b85569c6366ef8117a664fd55f8 Author: Gleb Smirnoff AuthorDate: 2024-02-08 17:00:23 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-08 17:00:41 +0000 tests/unix_passfd: add a comment for send_a_lot Explain why SOCK_DGRAM and SOCK_STREAM differ in this edge case. While here improve output in case of a failure. --- tests/sys/kern/unix_passfd_test.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/sys/kern/unix_passfd_test.c b/tests/sys/kern/unix_passfd_test.c index 143ccd098583..74095859d899 100644 --- a/tests/sys/kern/unix_passfd_test.c +++ b/tests/sys/kern/unix_passfd_test.c @@ -657,11 +657,20 @@ ATF_TC_BODY(rights_creds_payload, tc) ATF_REQUIRE_MSG(len != -1 , "sendmsg failed: %s", strerror(errno)); #if TEST_PROTO == SOCK_STREAM ATF_REQUIRE_MSG((size_t)len < sendspace, - "sendmsg: %zd bytes sent", len); + "sendmsg: %zd bytes sent, expected < %lu", len, sendspace); #endif #if TEST_PROTO == SOCK_DGRAM + /* + * sendmsg(2) can't truncate datagrams, only recvmsg(2) can. There are + * two options for the kernel here: either accept the datagram with + * slight overcommit of the socket buffer space or return ENOBUFS for a + * datagram that is smaller or equal to the socket buffer space. Our + * implementation does overcommit. Explanation is simple: from our + * side we see space available, we have no idea that remote side has + * LOCAL_CREDS set. From our side we expect sendmsg(2) to succeed. + */ ATF_REQUIRE_MSG((size_t)len == sendspace, - "sendmsg: %zd bytes sent", len); + "sendmsg: %zd bytes sent, expected %lu", len, sendspace); #endif rlen = recvfd_payload(fd[1], &getfd, buf, len, CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + CMSG_SPACE(sizeof(int)), 0); From nobody Thu Feb 8 17:01:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW3Cm2lDdz5B2LB; Thu, 8 Feb 2024 17:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TW3Cm17GYz4V2s; Thu, 8 Feb 2024 17:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykXh9p2eWvsx9osWlqFzFHuRnWQnexiuFKYkQwgwFTE=; b=QV0GBoqnyTBejkwijchebLsYFqKQWf/YDbWmeSpSjOSnpm64z93SRYBw7wmJ2GzJImd01W PkhhPzGmN1DgEXn2RETWtCHsdBjnMxup9GtVn3qvoKPIW90FFZfafXCbYxkAvnJj2r1XYY wAGRx20T118UN/bZCwijNkXcmgW59TXFGaZ/PcEtTYhho6SXrtxKrUEnsTYukFBb87nqNt SqOxk/ksSrG7LPVASVSkXFveSVohDV/GdCTcQ3X46mKlGpDV2gDTod0S18wpZyvaoIaeP8 nYdyPSq2jwQ/rMsP3/F8PivlQx2nIToe9pA5FM0R2XZiMVjDH9rb0HEwgdI+Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707411668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykXh9p2eWvsx9osWlqFzFHuRnWQnexiuFKYkQwgwFTE=; b=GoITMA0ss8IyIaGTzUsu+QFSgGKxUm+h/PJDFAWkj1Zvp5cHAmkdDM9/C9VA5ySkFcUGAM MGrb2rBZAH9DsM/nXyTkDjLBnQDmCBOyRbgVGwJ1AhqBIp2fqhipggbXgPnXXrqfGJ9acy A9gPu6VSvPrgGxiAL/ncgIpOtf6YDZHtFWebpPUjQ7Kt8jsjQhi9OTpXG7DYecNHrQG4YD nAqoNybgVCEyJ5lEXBxqnLuKKMIVs+nzBpcoNtDTslXgqvy49lI+gddAhAVsFFYz2q/DYJ Gs1osbXWG8XturxFxDIkIZr4X6L02vX5OrREYfqy1umu4NyVSWVahBQ/x+i1pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707411668; a=rsa-sha256; cv=none; b=T4yIT1mLaGNwZRMNfikYLNANlbO7V27oP3WrPB97FK9eo9sM5fhhOsH2rMCSeXPvWV6Uy1 yhtcyHZ3LnC+zMbLNaeBzP5SXIqySI21/h0+4AXZk3ApXnrge1yGum6U3LA44LUeVWaZWN kvu4b4MJ7Dh8Jae4jMbF92Obpw7DOJAn1qBef0r9rA/Mp4Wf9QIXCopoCa0hH2TyOv9JY5 q+QXntIo8XMvbiqTdT3TuB4zQpJ0XcsS+apCLFjA/M96/RAJFsQtOa6naZZP2Ow6rCfpxo LlsLzPJMMNi6vXlySEpbnvI7UtkAU7kgzu2ae/flP6Muzhi4VVBWT3/7W2FsZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW3Cm0BV7zxHf; Thu, 8 Feb 2024 17:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 418H17ES065827; Thu, 8 Feb 2024 17:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418H170V065823; Thu, 8 Feb 2024 17:01:07 GMT (envelope-from git) Date: Thu, 8 Feb 2024 17:01:07 GMT Message-Id: <202402081701.418H170V065823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0bd8eb3e08d9 - main - unix: retire LOCAL_CONNWAIT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0bd8eb3e08d9720ee3814b29da16a9fd0044c83f Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0bd8eb3e08d9720ee3814b29da16a9fd0044c83f commit 0bd8eb3e08d9720ee3814b29da16a9fd0044c83f Author: Gleb Smirnoff AuthorDate: 2024-02-08 17:00:23 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-08 17:00:41 +0000 unix: retire LOCAL_CONNWAIT This socket option was added in 6a2989fd54a9 together with LOCAL_CREDS. Both options originate from NetBSD. The LOCAL_CREDS seems to be used by some software and is covered by our test suite. The main problem with LOCAL_CONNWAIT is that it doesn't work as documented. A basic test shows that connect(2) indeed blocks, but accept(2) on the other side does not wake it up. Indeed, I don't see what code in the accept(2) path would go into the peer socket of a unix/stream listener's child and would make wakeup(&so->so_timeo). I tried the test even on a FreeBSD 6.4-RELEASE and it produced the same results as on CURRENT. The other thing that puzzles me is why that option would be useful even if it worked? Because on unix/stream you can send(2) immediately after connect(2) and that would put data on the peer receive buffer even before listener had done accept(2). In other words, one side can do connect(2) then send(2), only after the remote side would make accept(2) and the remote would see the data sent before the accept(2). Again this undocumented feature of unix(4) is present on all versions from FreeBSD 6 to CURRENT. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43708 --- share/man/man4/unix.4 | 10 +--------- sys/kern/uipc_usrreq.c | 30 +++++------------------------- sys/sys/un.h | 1 - sys/sys/unpcb.h | 2 -- 4 files changed, 6 insertions(+), 37 deletions(-) diff --git a/share/man/man4/unix.4 b/share/man/man4/unix.4 index 24069ae4663c..5ac9ccd5514f 100644 --- a/share/man/man4/unix.4 +++ b/share/man/man4/unix.4 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 24, 2022 +.Dd February 1, 2022 .Dt UNIX 4 .Os .Sh NAME @@ -332,14 +332,6 @@ The and .Dv LOCAL_CREDS_PERSISTENT options are mutually exclusive. -.It Dv LOCAL_CONNWAIT -Used with -.Dv SOCK_STREAM -sockets, this option causes the -.Xr connect 2 -function to block until -.Xr accept 2 -has been called on the listening socket. .It Dv LOCAL_PEERCRED Requested via .Xr getsockopt 2 diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 80458cd6a4fe..db226a16674e 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -291,8 +291,7 @@ static int unp_connect(struct socket *, struct sockaddr *, struct thread *); static int unp_connectat(int, struct socket *, struct sockaddr *, struct thread *, bool); -typedef enum { PRU_CONNECT, PRU_CONNECT2 } conn2_how; -static void unp_connect2(struct socket *so, struct socket *so2, conn2_how); +static void unp_connect2(struct socket *so, struct socket *so2); static void unp_disconnect(struct unpcb *unp, struct unpcb *unp2); static void unp_dispose(struct socket *so); static void unp_shutdown(struct unpcb *); @@ -704,7 +703,7 @@ uipc_connect2(struct socket *so1, struct socket *so2) unp2 = so2->so_pcb; KASSERT(unp2 != NULL, ("uipc_connect2: unp2 == NULL")); unp_pcb_lock_pair(unp, unp2); - unp_connect2(so1, so2, PRU_CONNECT2); + unp_connect2(so1, so2); unp_pcb_unlock_pair(unp, unp2); return (0); @@ -1784,12 +1783,6 @@ uipc_ctloutput(struct socket *so, struct sockopt *sopt) error = sooptcopyout(sopt, &optval, sizeof(optval)); break; - case LOCAL_CONNWAIT: - /* Unlocked read. */ - optval = unp->unp_flags & UNP_CONNWAIT ? 1 : 0; - error = sooptcopyout(sopt, &optval, sizeof(optval)); - break; - default: error = EOPNOTSUPP; break; @@ -1800,7 +1793,6 @@ uipc_ctloutput(struct socket *so, struct sockopt *sopt) switch (sopt->sopt_name) { case LOCAL_CREDS: case LOCAL_CREDS_PERSISTENT: - case LOCAL_CONNWAIT: error = sooptcopyin(sopt, &optval, sizeof(optval), sizeof(optval)); if (error) @@ -1829,10 +1821,6 @@ uipc_ctloutput(struct socket *so, struct sockopt *sopt) OPTSET(UNP_WANTCRED_ALWAYS, UNP_WANTCRED_ONESHOT); break; - case LOCAL_CONNWAIT: - OPTSET(UNP_CONNWAIT, 0); - break; - default: break; } @@ -2006,7 +1994,7 @@ unp_connectat(int fd, struct socket *so, struct sockaddr *nam, KASSERT(unp2 != NULL && so2 != NULL && unp2->unp_socket == so2 && sotounpcb(so2) == unp2, ("%s: unp2 %p so2 %p", __func__, unp2, so2)); - unp_connect2(so, so2, PRU_CONNECT); + unp_connect2(so, so2); KASSERT((unp->unp_flags & UNP_CONNECTING) != 0, ("%s: unp %p has UNP_CONNECTING clear", __func__, unp)); unp->unp_flags &= ~UNP_CONNECTING; @@ -2057,7 +2045,7 @@ unp_copy_peercred(struct thread *td, struct unpcb *client_unp, } static void -unp_connect2(struct socket *so, struct socket *so2, conn2_how req) +unp_connect2(struct socket *so, struct socket *so2) { struct unpcb *unp; struct unpcb *unp2; @@ -2089,11 +2077,7 @@ unp_connect2(struct socket *so, struct socket *so2, conn2_how req) KASSERT(unp2->unp_conn == NULL, ("%s: socket %p is already connected", __func__, unp2)); unp2->unp_conn = unp; - if (req == PRU_CONNECT && - ((unp->unp_flags | unp2->unp_flags) & UNP_CONNWAIT)) - soisconnecting(so); - else - soisconnected(so); + soisconnected(so); soisconnected(so2); break; @@ -3493,10 +3477,6 @@ db_print_unpflags(int unp_flags) db_printf("%sUNP_WANTCRED_ONESHOT", comma ? ", " : ""); comma = 1; } - if (unp_flags & UNP_CONNWAIT) { - db_printf("%sUNP_CONNWAIT", comma ? ", " : ""); - comma = 1; - } if (unp_flags & UNP_CONNECTING) { db_printf("%sUNP_CONNECTING", comma ? ", " : ""); comma = 1; diff --git a/sys/sys/un.h b/sys/sys/un.h index 640bd254d579..41bde1701900 100644 --- a/sys/sys/un.h +++ b/sys/sys/un.h @@ -65,7 +65,6 @@ struct sockaddr_un { #define LOCAL_PEERCRED 1 /* retrieve peer credentials */ #define LOCAL_CREDS 2 /* pass credentials to receiver */ #define LOCAL_CREDS_PERSISTENT 3 /* pass credentials to receiver */ -#define LOCAL_CONNWAIT 4 /* connects block until accepted */ /* Start of reserved space for third-party socket options. */ #define LOCAL_VENDOR SO_VENDOR diff --git a/sys/sys/unpcb.h b/sys/sys/unpcb.h index fe701d5d38b1..d22662fe83e5 100644 --- a/sys/sys/unpcb.h +++ b/sys/sys/unpcb.h @@ -107,8 +107,6 @@ struct unpcb { #define UNP_HAVEPC 0x001 #define UNP_WANTCRED_ALWAYS 0x002 /* credentials wanted always */ #define UNP_WANTCRED_ONESHOT 0x004 /* credentials wanted once */ -#define UNP_CONNWAIT 0x008 /* connect blocks until accepted */ - #define UNP_WANTCRED_MASK (UNP_WANTCRED_ONESHOT | UNP_WANTCRED_ALWAYS) /* From nobody Thu Feb 8 17:39:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW43q3NvCz5B5YX; Thu, 8 Feb 2024 17:39: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 4TW43q2t2qz4c98; Thu, 8 Feb 2024 17:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707413959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VYqHY6oI/XMLlIu1/A8H+anTMujirqB0HGLR1vN85qg=; b=fUC3SJMhuj2kzL66KowNvoHGOfgVn6xgnSTS6ggKzSjjDh6XVImrAO8bpwQc6gyKFO8g26 cv7XOJwTyG2fjojHosVozoNcassCn55dFIkoiu40yUtHqYqCtcjkr4hdIVyfKIfUxcqr6O gKoGs3c3sysmR5CguceVBUDfkndJzAYFxOkk+/Ue7NodWNS3IK7JHJuO6oAmfLnIKcFjU/ +I/6UXATINUhyMietYJPmOmTj9LQoFaxq23eSP9Lv609Umi7Rn1Jxzvcw5EtjlCPPNmPig GTFgNC2yG/rcEfSPJOTlj2H1vjwZRAZI06KSauTJ7EMPbepZWsdJJtYghyw9Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707413959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VYqHY6oI/XMLlIu1/A8H+anTMujirqB0HGLR1vN85qg=; b=XcDmFfo/unvmnmeMCMsrF+LSEWrdlN5HRoh3UX5WWdqPg07HA41arNzZJZWpvGssQWTwJk wOa0Zs3zRSulXtuED4KOelqEuiyuAc6JYzFL3ksbd7zSyuiHG0/mWpnQDYdzn3UfGzEtQx ZbwLk5GZLZtViGys68wHpn7YfH1rPPXNwntS87HyY0WaE+uNhw3/aSEsPqKcODi2beSChU 7n++TNHwlFXEczuoIw0/HR9M4cwgOyAmCtdeij7zI/1vOuBJXS4QI3LVMJ8nIF7XVmiMn8 Y+SZzO0KBDot0LBh/26mErpfG/+gfpEDHeyQ2noY15npWs1rbXSJ12l/BkZMFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707413959; a=rsa-sha256; cv=none; b=POrWMR3iYnetgoGtlMUudRLxMc+GwCvg7MluuBJBp3f142WJAOVuUlTD7c3NFtJ2GkCXzV P00QR8lcsTH+IGOn0i8G7tCMWrpmD0KBcy4B00kq8IZ4t3B5+zD3qVUDBt5Rxe0FUCBhPz 8j8nVlUc+iaK+a/I6X+7M3eA0jdeNPyxYR8mgt23ISSC0w2HzGvBKdHuFtqMh0DFQEghMo AO85D9Dcgjwwxw/Av6OjEwO5vmSF+HStZFsn+4APd5irEtxvshNCYsrbLmkrpNMEkvvrV7 aV0w8rdYWbG08COfELq83zCKXwVhfLKfvOC/1i+PV0jURGZrk7qXkmAwDC1Dpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW43q1wz6zyrV; Thu, 8 Feb 2024 17:39: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 418HdJl8024151; Thu, 8 Feb 2024 17:39:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418HdJsK024148; Thu, 8 Feb 2024 17:39:19 GMT (envelope-from git) Date: Thu, 8 Feb 2024 17:39:19 GMT Message-Id: <202402081739.418HdJsK024148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 1adab814e813 - main - tcp: use tcp_fixed_maxseg instead of tcp_maxseg in cc modules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1adab814e8136ec26e8efbdb40e671d943d7fbf0 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=1adab814e8136ec26e8efbdb40e671d943d7fbf0 commit 1adab814e8136ec26e8efbdb40e671d943d7fbf0 Author: Richard Scheffenegger AuthorDate: 2024-02-08 16:56:29 +0000 Commit: Richard Scheffenegger CommitDate: 2024-02-08 17:36:59 +0000 tcp: use tcp_fixed_maxseg instead of tcp_maxseg in cc modules tcp_fixed_maxseg() is the streamlined calculation of typical tcp options and more suitable for heavy use in the congestion control modules on every received packet. No external functional change. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43779 --- sys/netinet/cc/cc.c | 2 +- sys/netinet/cc/cc_cubic.c | 2 +- sys/netinet/cc/cc_dctcp.c | 2 +- sys/netinet/cc/cc_htcp.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index ea8cb904c7aa..ff25b8368cc4 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -440,7 +440,7 @@ newreno_cc_after_idle(struct cc_var *ccv) * maximum of the former ssthresh or 3/4 of the old cwnd, to * not exit slow-start prematurely. */ - rw = tcp_compute_initwnd(tcp_maxseg(ccv->ccvc.tcp)); + rw = tcp_compute_initwnd(tcp_fixed_maxseg(ccv->ccvc.tcp)); CCV(ccv, snd_ssthresh) = max(CCV(ccv, snd_ssthresh), CCV(ccv, snd_cwnd)-(CCV(ccv, snd_cwnd)>>2)); diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c index 7a357e39182e..3f7ba630db5d 100644 --- a/sys/netinet/cc/cc_cubic.c +++ b/sys/netinet/cc/cc_cubic.c @@ -423,7 +423,7 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) u_int mss; cubic_data = ccv->cc_data; - mss = tcp_maxseg(ccv->ccvc.tcp); + mss = tcp_fixed_maxseg(ccv->ccvc.tcp); switch (type) { case CC_NDUPACK: diff --git a/sys/netinet/cc/cc_dctcp.c b/sys/netinet/cc/cc_dctcp.c index 8084439aafaa..efb8913ec36c 100644 --- a/sys/netinet/cc/cc_dctcp.c +++ b/sys/netinet/cc/cc_dctcp.c @@ -245,7 +245,7 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type) if (CCV(ccv, t_flags2) & TF2_ECN_PERMIT) { dctcp_data = ccv->cc_data; cwin = CCV(ccv, snd_cwnd); - mss = tcp_maxseg(ccv->ccvc.tcp); + mss = tcp_fixed_maxseg(ccv->ccvc.tcp); switch (type) { case CC_NDUPACK: diff --git a/sys/netinet/cc/cc_htcp.c b/sys/netinet/cc/cc_htcp.c index d31720d0099f..c9304fcfc8e5 100644 --- a/sys/netinet/cc/cc_htcp.c +++ b/sys/netinet/cc/cc_htcp.c @@ -284,7 +284,7 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type) u_int mss; htcp_data = ccv->cc_data; - mss = tcp_maxseg(ccv->ccvc.tcp); + mss = tcp_fixed_maxseg(ccv->ccvc.tcp); switch (type) { case CC_NDUPACK: From nobody Thu Feb 8 17:52:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW4MT5g1Nz5B6W8; Thu, 8 Feb 2024 17:52:53 +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 4TW4MT50x2z4dsL; Thu, 8 Feb 2024 17:52:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707414773; h=from:from:reply-to:subject: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=L4MMfVyAY1l/I2jrMTHtDD1yve+1bJwZtD1GlR1qFQk=; b=PaLUlKKBsox1b98nJfZzE7ITpvPIoMCUkp1k5mqeqs4R51tJKyRgzhMVUTTB3eSxbig+6m clUGlHwb2M3CyFgBlbOwN5rreIfyWRpj5zaW06LznQrt3CrOs7ido5oUhHVbUv+ASIFwPo VsWwCX5fQGeR4YUUeJH7qK4RiCaD0XTHDWWryTpraGin9wXGwY7+ywFklDgINXPRFWl8IS nFaijp5dh86NzLcd52FxiuwO1yMH1ayxaFLAsPV5OFRn1SxP9hFBKDieIrxeWA5awvInKe bIaaXH4vlSywj1fi4HvkvBeskfxa1kxlcbTCeC6Ysstg6mbwqzDZM2uB4p5zlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707414773; h=from:from:reply-to:subject: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=L4MMfVyAY1l/I2jrMTHtDD1yve+1bJwZtD1GlR1qFQk=; b=xrmcEmNsi2MmcQ16KdQja9kPMoGWSilp8ACSTNyLRgobAoVVGb49lhvP95F5zFuJae1NE2 rLa3I+Sb1wdeSMLo1yiJIwmklMYQO38i//DaPkXqgMtk2G5sAd06CCZqLVk7HPgsfALCu9 WXyugkz97R0XKT2T8KAnPMyF93JNTaHmnpOZZLbp80XHkezdnmlxqKdgqVK4Qp+ilQ/L+H Aul74tgJVcqXXiLTdHmOxOE6fHaZuDFAQzdcyNCa/cnGZoZvG7bQiKFAPt+nwQrvG++R9o Ffj5z/qvhAGkyg8/ggWL8nPEz0VfxFS1smNqEwO2tV3qSax2zf+xOuoYM2EBHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707414773; a=rsa-sha256; cv=none; b=ZV+r6OXMw6U9QqVXxMwDmlP5SHpm9FtcCuLTaUXb/B3JOscJbjnib6MDNCrVTw/9Zm1iiz mjTk+GERgaHb2EfPN7ixE6BH1KEY1pmFAL1mlx2goK6Fzx3gtb3alL1Fwm0DVyvqdVJxtJ 6i2m5OoIBN675y8BkiWCEU+HUjnGLXlVmr98Z2fdddwvj1Ms7sstibPyuxU5CUPt7DOrYn 4w6ESICbtZMt8mpxTGPfUrMSVesnxJVoHozMwncnbVD1Ctm/8Y8hy5lCDKSTGfVLTXrwRu S3LhbHJacFRDgBam7AcKlotdSTd2xl+HOw1AFZCWrXaNE+chOFmnA2lTsTemog== Received: from [IPV6:2601:644:937c:5920:4c63:23c7:5c22:d7ba] (unknown [IPv6:2601:644:937c:5920:4c63:23c7:5c22:d7ba]) (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 4TW4MT0y1PzY65; Thu, 8 Feb 2024 17:52:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <175dce9b-ee44-434c-b6b2-20717a04f6aa@FreeBSD.org> Date: Thu, 8 Feb 2024 09:52:50 -0800 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: e4ab361e5394 - main - fix poweroff regression from 9cdf326b4f by delaying shutdown_halt Content-Language: en-US To: Andriy Gapon , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <72def5a9-ffcc-4dcc-9b85-875ba7f46539@FreeBSD.org> From: John Baldwin In-Reply-To: <72def5a9-ffcc-4dcc-9b85-875ba7f46539@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/6/24 2:13 AM, Andriy Gapon wrote: > On 06/02/2024 11:41, Andriy Gapon wrote: >> The branch main has been updated by avg: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 >> >> commit e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 >> Author: Andriy Gapon >> AuthorDate: 2024-02-06 08:55:13 +0000 >> Commit: Andriy Gapon >> CommitDate: 2024-02-06 08:55:13 +0000 >> >> fix poweroff regression from 9cdf326b4f by delaying shutdown_halt >> >> The regression affected ACPI-based systems without EFI poweroff support >> (including VMs). >> >> The key reason for the regression is that I overlooked that poweroff is >> requested by RB_POWEROFF | RB_HALT combination of flags. In my opinion, >> that command is a bit bipolar, but since we've been doing that forever, >> then so be it. Because of that flag combination, the order of >> shutdown_final handlers that check for either flag does matter. >> >> Some additional complexity comes from platform-specific shutdown_final >> handlers that aim to handle multiple reboot options at once. E.g., >> acpi_shutdown_final handles both poweroff and reboot / reset. As >> explained in 9cdf326b4f, such a handler must run after shutdown_panic to >> give it a chance. But as the change revealed, the handler must also run >> before shutdown_halt, so that the system can actually power off before >> entering the halt limbo. >> >> Previously, shutdown_panic and shutdown_halt had the same priority which >> appears to be incompatible with handlers that can do both poweroff and >> reset. > > I want to add that having many handlers with priorities expressed like > SHUTDOWN_PRI_LAST ± N while some of those handlers have implicit > inter-dependencies (interactions, interference) also does not help to see a > clear picture. > > Perhaps it would be better to handle all (reasonable) RB flag combinations > centrally in kern_reboot and then dispatch events like shutdown_reset, > shutdown_poweroff, etc. Handlers for those events would have a single and > simple job of performing that one action (perhaps failing and letting another > handler try). I think having separate eventhandlers for shutdown, reset, and poweroff seems sensible. It also permits a given driver to use different priorities (maybe it wants to be first for poweroff but last for reset, etc.) > Also, I would split reboot howto into command and flag portions, so that only > one command can be specified at a time. E.g., I would consider RB_AUTOBOOT > ("RB_REBOOT"), RB_POWEROFF, RB_HALT to be distinct commands. Then, flags like > RB_NOSYNC or RB_DUMP could be optional flags. > > As an aside, some flags documented for reboot(2) do not seem to have much to do > with reboot. E.g., RB_DFLTROOT affects how a system boots up, but not how the > system goes for a reboot. Not surprisingly, that option is not handled by > anything kicked off with reboot(2). > Maybe, it would make more sense if we had fast reboot support and the running > kernel could instruct the next kernel directly. But, it's still a bit weird > that flags like RB_POWEROFF and RB_DFLTROOT belong in the same domain and can be > set together. I would suggest deprecating flags that are no-ops. In modern systems if you want to control the next boot you do it via other means (nextboot, efibootmgr, etc.) and reboot(2) is not a good API for that. It might be hard to fully cleanup some of the hackiness here, but if you can at least isolate the flag weirdness handling in kern_reboot by having the more specific eventhandlers then that might fix most of the ugliness. -- John Baldwin From nobody Thu Feb 8 17:59:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW4W232lGz5B72y; Thu, 8 Feb 2024 17:59: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 4TW4W22VQLz4fNV; Thu, 8 Feb 2024 17:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707415166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZkD/r4rarbRfqe4IAZqKKpqu1PSO3EgOyq3L9jGDbNc=; b=IDUHpqpjYPLpq4c09jwYJeVw+yacfXx7TfPFZVo8qvF8FqRXQWsZ7HEnD289PtkxL+OAnb dbJulKYLe2XmEYg5Okqr6DW9NhI0LnUKyszu0QsLChwe/jAB5fcPhMmraNU9tM1MSH3/mg 9eMWpnFdjY+4tZfpCOY+DeVz95mr9z2NNlepbro3Eo0v40LHGFaFzua4w8N5EO9aect+Lb 2mZaOyF8WBICUJMheQYdKNHV8Q8aQzL98fFTDR+9zNSzBCZ4AhKVbeANGEr42WdOuMAbOF SXbb4+B5A10/hCMtUyn/agTgZmPR59ylSQhnUzFkGDDgReAf/jvI+w5BvvIQBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707415166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZkD/r4rarbRfqe4IAZqKKpqu1PSO3EgOyq3L9jGDbNc=; b=y3QI9krn23w0Efw89p7ujinJMa+jy6R1KMYHaWJ+WG0J3nU+x2pGY709Qm45DYR4eSpvh0 RF93mKcYNM1ZgpGup3CrVNgS8V7ZmG0FUhhQI0oM6qhx6oVmzmyJbyXY/maU6sWGJurEUE LUWKFaRwiNV7kd4xwhbEQEfTR/1DTKdR4q02oG4b1l5CGoKuvqqPGZ1Ok+/MqDcpJvvqBK nol1G9T4GlBtH/CLK4LHVNKmLMozf+qQTSMuwSa3hWSsy32xib693sTllRqaDTUORBo+JY Muq49jZSKtngV5GQ+VO8sxeG1nSIoAponPPjvXWhuzBcUw6L3LwYfRSabrrvPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707415166; a=rsa-sha256; cv=none; b=b76NhUHYYjN4ckF1d8DlfiZi+imVYjBDJGTvp68kcOXMVgs4gTr661Pwiu+F0Hkj2XSquB 9EFgoAwHcBdx3Yx1UnS4kuQryv2MNwTlc2DdGcD6WRHhucqFj7fMHnJUSBwBAkHcBx8Fa9 DlX1Wb+4KZ/snHfJJvvtlz6SB3fIOdlireQR6kVQIfy3cvCJv6gajpNSdf/xV1ic43XYaf kaLtV3Pb7jaXbJ2CqL89zd+Y5JkWAoWYWBiDvdWziV0KYgHefh3YZld5zLDQ8als/bkIHa 8ZI62d88AnCNEjAOJyWPDZvGBwUmzmF7xWMDG9JQ4tJhiThdnebprYjrTRWlpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW4W21Y38zyv9; Thu, 8 Feb 2024 17:59: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 418HxQBW057277; Thu, 8 Feb 2024 17:59:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418HxQmA057275; Thu, 8 Feb 2024 17:59:26 GMT (envelope-from git) Date: Thu, 8 Feb 2024 17:59:26 GMT Message-Id: <202402081759.418HxQmA057275@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: 72c166696b78 - main - traceroute6: Update .PATH and include path after traceroute moved List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72c166696b78e3d878be17cf2b01555391b9c97e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=72c166696b78e3d878be17cf2b01555391b9c97e commit 72c166696b78e3d878be17cf2b01555391b9c97e Author: Mark Johnston AuthorDate: 2024-02-08 17:57:33 +0000 Commit: Mark Johnston CommitDate: 2024-02-08 17:57:33 +0000 traceroute6: Update .PATH and include path after traceroute moved Fixes: 9b7a920a12a9 ("traceroute: move from contrib to usr.sbin") --- usr.sbin/traceroute6/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/traceroute6/Makefile b/usr.sbin/traceroute6/Makefile index 5086b3c08706..d2b84296fe97 100644 --- a/usr.sbin/traceroute6/Makefile +++ b/usr.sbin/traceroute6/Makefile @@ -14,7 +14,7 @@ .include -TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute +TRACEROUTE_DISTDIR?= ${SRCTOP}/usr.sbin/traceroute .PATH: ${TRACEROUTE_DISTDIR} PACKAGE= runtime From nobody Thu Feb 8 18:20:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW4zS0Gv9z5B8hF for ; Thu, 8 Feb 2024 18:20:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 4TW4zR3qcBz4h2T for ; Thu, 8 Feb 2024 18:20:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5601eb97b29so328105a12.0 for ; Thu, 08 Feb 2024 10:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1707416434; x=1708021234; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PnjMT1LtGANngJhwhkLg6HqTeGvyYSAnqMlvXFstoeY=; b=JQj7UfLYOfv6aefy87SBnOZrwiQeZ/uYQuDXmekbeA/jPA5w3zlO1MrmCC7MPTSZBj +fZJ2iLguMZ8vZaUcUigb5EpshgL/ndzWNagVkzHzXTFppN9meBGn/5DjxeSN3P7hqjH ieCEEX7Xi+TEzFGT0vOa3KpIQ+DFrCTea5SkwCz0xe5KM9n5GLepAXZrUIOzoOXNqCz4 TRb/8Nbvj9/uFJgE07E/HKs7dOciYGupAsYhEYCNdBQNPXjEQ/BE5LEmZgw+6Qw+RsPZ NFVaMnIgl7dFJGM+uLrpuwGhfO/KBu0WVR9tEEwRlotuCsGfSFxa5Dkc3j99KmE79Iis 7Tng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707416434; x=1708021234; 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=PnjMT1LtGANngJhwhkLg6HqTeGvyYSAnqMlvXFstoeY=; b=w7WMnNrsj4y+vguq9t8UaIgzCRWWiZeXheHmOOECGxHyyuDk7dcU+3CX6Xw+kJuUok wWFlmSTkHzsbgopSyVmm1k+T1cHakeCgdLsjPW9M1Goh6Z0IVyWcEB3n6QPEBBmB2P1E 4pous73aCmn96ehmIdUc2MSu/xSYO5dRnJcgkkTYlyqLQMmA5E2XWLXr4eWvINyV+SdS 58rnWolyeN7fx0RFWC05uET4w8emO+gI/0q8kjGkwJ7BHPticjnVCLFffYuTmkymqbGn DikCfD6WAAJ9nV3rkxaGDOdcfQXLnMyeBErw1T7lnhVk7susKUPi3QYwUqx380ofjyLH zIrQ== X-Gm-Message-State: AOJu0Yw1qlPA7pg9Qm0OGUhROS1ZJL091OZ4c2j69VzBlro41/t2nQ7F Ny9IuP/W4qhFReKfKn2t52Parusuxm+zy8WRZS+oAF6nl4VsH0A8XqUgykHdcQQLAg2n0sdRY5T QTAGryUjgQaY8yMDS3gU6Nl9jD/b5JxJNGVVxFw== X-Google-Smtp-Source: AGHT+IGGVRKIVotgQ/dIHfmlVgcyj+KJXjG/+CSaapwYMe7tYXw1YMTFFG+9x7wav7EQHaVSjLugJ+zOiw2DxcRHsyE= X-Received: by 2002:a50:d795:0:b0:560:bb98:6b7d with SMTP id w21-20020a50d795000000b00560bb986b7dmr2785152edi.10.1707416434317; Thu, 08 Feb 2024 10:20:34 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <72def5a9-ffcc-4dcc-9b85-875ba7f46539@FreeBSD.org> <175dce9b-ee44-434c-b6b2-20717a04f6aa@FreeBSD.org> In-Reply-To: <175dce9b-ee44-434c-b6b2-20717a04f6aa@FreeBSD.org> From: Warner Losh Date: Thu, 8 Feb 2024 11:20:23 -0700 Message-ID: Subject: Re: git: e4ab361e5394 - main - fix poweroff regression from 9cdf326b4f by delaying shutdown_halt To: John Baldwin Cc: Andriy Gapon , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000000d2c090610e2de7c" X-Rspamd-Queue-Id: 4TW4zR3qcBz4h2T X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --0000000000000d2c090610e2de7c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey John, On Thu, Feb 8, 2024 at 10:52=E2=80=AFAM John Baldwin wrot= e: > On 2/6/24 2:13 AM, Andriy Gapon wrote: > > On 06/02/2024 11:41, Andriy Gapon wrote: > >> The branch main has been updated by avg: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3De4ab361e53945a6c3e9d68c5e5ffc11= de40a35f2 > >> > >> commit e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2 > >> Author: Andriy Gapon > >> AuthorDate: 2024-02-06 08:55:13 +0000 > >> Commit: Andriy Gapon > >> CommitDate: 2024-02-06 08:55:13 +0000 > >> > >> fix poweroff regression from 9cdf326b4f by delaying shutdown_hal= t > >> > >> The regression affected ACPI-based systems without EFI poweroff > support > >> (including VMs). > >> > >> The key reason for the regression is that I overlooked that > poweroff is > >> requested by RB_POWEROFF | RB_HALT combination of flags. In my > opinion, > >> that command is a bit bipolar, but since we've been doing that > forever, > >> then so be it. Because of that flag combination, the order of > >> shutdown_final handlers that check for either flag does matter. > >> > >> Some additional complexity comes from platform-specific > shutdown_final > >> handlers that aim to handle multiple reboot options at once. > E.g., > >> acpi_shutdown_final handles both poweroff and reboot / reset. A= s > >> explained in 9cdf326b4f, such a handler must run after > shutdown_panic to > >> give it a chance. But as the change revealed, the handler must > also run > >> before shutdown_halt, so that the system can actually power off > before > >> entering the halt limbo. > >> > >> Previously, shutdown_panic and shutdown_halt had the same > priority which > >> appears to be incompatible with handlers that can do both > poweroff and > >> reset. > > > > I want to add that having many handlers with priorities expressed like > > SHUTDOWN_PRI_LAST =C2=B1 N while some of those handlers have implicit > > inter-dependencies (interactions, interference) also does not help to > see a > > clear picture. > > > > Perhaps it would be better to handle all (reasonable) RB flag > combinations > > centrally in kern_reboot and then dispatch events like shutdown_reset, > > shutdown_poweroff, etc. Handlers for those events would have a single > and > > simple job of performing that one action (perhaps failing and letting > another > > handler try). > > I think having separate eventhandlers for shutdown, reset, and poweroff > seems > sensible. It also permits a given driver to use different priorities > (maybe it > wants to be first for poweroff but last for reset, etc.) > I'd come to this conclusion as well. The handlers shouldn't even look at the flags IMHO. We can create a hierarchy of power cycle > reset > power off > halt with power unchanged easily enough, and call the handlers in that order, letting individual drivers duke it out. > > Also, I would split reboot howto into command and flag portions, so tha= t > only > > one command can be specified at a time. E.g., I would consider > RB_AUTOBOOT > > ("RB_REBOOT"), RB_POWEROFF, RB_HALT to be distinct commands. Then, > flags like > > RB_NOSYNC or RB_DUMP could be optional flags. > > > > As an aside, some flags documented for reboot(2) do not seem to have > much to do > > with reboot. E.g., RB_DFLTROOT affects how a system boots up, but not > how the > > system goes for a reboot. Not surprisingly, that option is not handled > by > > anything kicked off with reboot(2). > > Maybe, it would make more sense if we had fast reboot support and the > running > > kernel could instruct the next kernel directly. But, it's still a bit > weird > > that flags like RB_POWEROFF and RB_DFLTROOT belong in the same domain > and can be > > set together. > > I would suggest deprecating flags that are no-ops. In modern systems if > you > want to control the next boot you do it via other means (nextboot, > efibootmgr, > etc.) and reboot(2) is not a good API for that. > Part of the problem is that they aren't NO-OPs. We use the same howto flags in the early boot that we use for reboot. There the flags mean something. This is passed in by the boot loader, and in this case, still does something. This dates as near as I can tell, to the VAX and other early Unix machines being able to pass a word (and maybe a little more) from one kernel to the next, a feature that's fallen out of fashion. > It might be hard to fully cleanup some of the hackiness here, but if you > can > at least isolate the flag weirdness handling in kern_reboot by having the > more > specific eventhandlers then that might fix most of the ugliness. > Yea, I think we should isolate the drivers from looking at 'howto' and have separate handlers for the following cases: power cycle, power off, reset and halt. I agree that some of the features that were hung on this word should be tor= n down and only done via boot next or possibly from the boot loader -> kernel handoff only. Now, what we do with the 'reboot' system call? It seems like we should mayb= e rework it in some way? Warner --0000000000000d2c090610e2de7c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey John,

On 2/6/24 2:13 AM, Andriy Gapon wrote:
> On 06/02/2024 11:41, Andriy Gapon wrote:
>> The branch main has been updated by avg:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3De4ab361e53945a6c3e9d68c5e5ffc11de40a3= 5f2
>>
>> commit e4ab361e53945a6c3e9d68c5e5ffc11de40a35f2
>> Author:=C2=A0 =C2=A0 =C2=A0Andriy Gapon <avg@FreeBSD.org> >> AuthorDate: 2024-02-06 08:55:13 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Andriy Gapon <avg@FreeBSD.org> >> CommitDate: 2024-02-06 08:55:13 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0fix poweroff regression from 9cdf326b4f = by delaying shutdown_halt
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0The regression affected ACPI-based syste= ms without EFI poweroff support
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0(including VMs).
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0The key reason for the regression is tha= t I overlooked that poweroff is
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0requested by RB_POWEROFF | RB_HALT combi= nation of flags.=C2=A0 In my opinion,
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0that command is a bit bipolar, but since= we've been doing that forever,
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0then so be it.=C2=A0 Because of that fla= g combination, the order of
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0shutdown_final handlers that check for e= ither flag does matter.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Some additional complexity comes from pl= atform-specific shutdown_final
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0handlers that aim to handle multiple reb= oot options at once.=C2=A0 E.g.,
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0acpi_shutdown_final handles both powerof= f and reboot / reset.=C2=A0 As
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0explained in 9cdf326b4f, such a handler = must run after shutdown_panic to
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0give it a chance.=C2=A0 But as the chang= e revealed, the handler must also run
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0before shutdown_halt, so that the system= can actually power off before
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0entering the halt limbo.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Previously, shutdown_panic and shutdown_= halt had the same priority which
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0appears to be incompatible with handlers= that can do both poweroff and
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0reset.
>
> I want to add that having many handlers with priorities expressed like=
> SHUTDOWN_PRI_LAST =C2=B1 N while some of those handlers have implicit<= br> > inter-dependencies (interactions, interference) also does not help to = see a
> clear picture.
>
> Perhaps it would be better to handle all (reasonable) RB flag combinat= ions
> centrally in kern_reboot and then dispatch events like shutdown_reset,=
> shutdown_poweroff, etc.=C2=A0 Handlers for those events would have a s= ingle and
> simple job of performing that one action (perhaps failing and letting = another
> handler try).

I think having separate eventhandlers for shutdown, reset, and poweroff see= ms
sensible.=C2=A0 It also permits a given driver to use different priorities = (maybe it
wants to be first for poweroff but last for reset, etc.)

I'd come to this conclusion as well. The handlers sho= uldn't even look at the flags
IMHO. We can create a hierarchy= of power cycle > reset > power off > halt with
power un= changed easily enough, and call the handlers in that order, letting individ= ual
drivers duke it out.=C2=A0
=C2=A0
> Also, I would split reboot howto into command and flag portions, so th= at only
> one command can be specified at a time.=C2=A0 E.g., I would consider R= B_AUTOBOOT
> ("RB_REBOOT"), RB_POWEROFF, RB_HALT to be distinct commands.= =C2=A0 Then, flags like
> RB_NOSYNC or RB_DUMP could be optional flags.
>
> As an aside, some flags documented for reboot(2) do not seem to have m= uch to do
> with reboot.=C2=A0 E.g., RB_DFLTROOT affects how a system boots up, bu= t not how the
> system goes for a reboot.=C2=A0 Not surprisingly, that option is not h= andled by
> anything kicked off with reboot(2).
> Maybe, it would make more sense if we had fast reboot support and the = running
> kernel could instruct the next kernel directly.=C2=A0 But, it's st= ill a bit weird
> that flags like RB_POWEROFF and RB_DFLTROOT belong in the same domain = and can be
> set together.

I would suggest deprecating flags that are no-ops.=C2=A0 In modern systems = if you
want to control the next boot you do it via other means (nextboot, efibootm= gr,
etc.) and reboot(2) is not a good API for that.

Part of the problem is that they aren't NO-OPs. We use the sam= e howto flags
in the early boot that we use for reboot. There the= flags mean something. This
is passed in by the boot loader, and = in this case, still does something. This dates
as near as I can t= ell, to the VAX and other early Unix machines being able to pass
= a word (and maybe a little more) from one kernel to the next, a feature tha= t's
fallen out of fashion.
=C2=A0
It might be hard to fully cleanup some of the hackiness here, but if you ca= n
at least isolate the flag weirdness handling in kern_reboot by having the m= ore
specific eventhandlers then that might fix most of the ugliness.

Yea, I think we should isolate the drivers from l= ooking at 'howto' and have
separate handlers for the foll= owing cases: power cycle, power off, reset and halt.=C2=A0
I agre= e that some of the features that were hung on this word should be torn
down and only done via boot next or possibly from the boot loader -&g= t; kernel
handoff only.

Now, what we do = with the 'reboot' system call? It seems like we should maybe
<= div>rework it in some way?

Warner
--0000000000000d2c090610e2de7c-- From nobody Thu Feb 8 18:21:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW5111DBHz5B8nn for ; Thu, 8 Feb 2024 18:21:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 4TW5104JkJz4hkC for ; Thu, 8 Feb 2024 18:21:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-560c696ccffso2215990a12.1 for ; Thu, 08 Feb 2024 10:21:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1707416515; x=1708021315; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IpvpYfRicGr2uG8qC2tuDM4/mPqKHSIDlPHRel1eZ+Q=; b=x7seSVUIPt0W17z5BudXy4NVEE5oBVfZJDMfc4y3PQ1ajdjaf+wzZSTLRX6+vkObM8 3cOKKgWWJVVETjNR59Sci44ZGMW9N/PQoXZ3Ld6tWtQmAbyt2OEct6bkxG8mM4cvuUQw AHuRLP92D862vce1kSt+bDBTe08ioYR14c/g/L5ex4byy0iidWQBgfltdgLr5ZHlzgqC q3CLu/cj5C+2eK1VJ7T50cChuCDtVglcUgy2ue9H+mwqITjll75pYlI0VuCUDoqPcNii E5pYswbbDISar/QLGg7C8dbwnIOrR1rRDP2OwsaBULyXVwXkPlYrBYj2vX/44KUkqg7y haeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707416515; x=1708021315; 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=IpvpYfRicGr2uG8qC2tuDM4/mPqKHSIDlPHRel1eZ+Q=; b=EFgQTjH4Y3oLW8/+rStvZoq95iJVIDoj7BGSQ4r0whe4bhQCH02fZTzAC7U2flZZk3 XGzIxUwlOO/gjy18sCx18e2eBprCl7sCBtCpWn/adeoKZ1k/gA2juWYP26Lysm9Fmutu 6CikgH4DDV8cZ0tiRvBC9XS5k+/MjrDEhsjrB2+6cjcPuj1eKHzfN2BkCqFZPzQJe9a/ XC6nwTwCX9B+WF5PGVcgBB2uVwU/1mpK0bMg9SbtttjlN6Unt5d+Rs9YWykwz7WuW0Lg J75PGU3hU94IEFFR7xPawgjlifG6Ynjwhbieq4rXSy3pUVL1neqMECccyXU9z3WU2vyk 4mWg== X-Gm-Message-State: AOJu0YytJTPat/MGxUMoDAoOBovfHlB/KlyTw04ys+Pq1bwegjcRlN/P GR1v2Kzw39h3brA+tWWnvpN3/K3NsaAJ+wxGSvP44nzm9vr5O20+twKnEkOo2ED534GF47hY1LD 1wXIFTSO5pEodP1L4wavy1f6wahR16YnqR602iA== X-Google-Smtp-Source: AGHT+IHr88nngiJfzZW0hDZQ1wOo34tRmBNOcs/lpofjqfs59R7jlxOrr41z75unHjwGmu2atY3XMHrs2hM+NTbZ5t8= X-Received: by 2002:a50:aa96:0:b0:55f:ccb4:ec84 with SMTP id q22-20020a50aa96000000b0055fccb4ec84mr3669296edc.1.1707416515521; Thu, 08 Feb 2024 10:21:55 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202402081759.418HxQmA057275@gitrepo.freebsd.org> In-Reply-To: <202402081759.418HxQmA057275@gitrepo.freebsd.org> From: Warner Losh Date: Thu, 8 Feb 2024 11:21:44 -0700 Message-ID: Subject: Re: git: 72c166696b78 - main - traceroute6: Update .PATH and include path after traceroute moved To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e43e990610e2e254" X-Rspamd-Queue-Id: 4TW5104JkJz4hkC X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --000000000000e43e990610e2e254 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah, beat me to the punch... Thanks! I was confirming it worked with a full rebuild before pushing... Warner On Thu, Feb 8, 2024 at 10:59=E2=80=AFAM Mark Johnston w= rote: > The branch main has been updated by markj: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D72c166696b78e3d878be17cf2b01555= 391b9c97e > > commit 72c166696b78e3d878be17cf2b01555391b9c97e > Author: Mark Johnston > AuthorDate: 2024-02-08 17:57:33 +0000 > Commit: Mark Johnston > CommitDate: 2024-02-08 17:57:33 +0000 > > traceroute6: Update .PATH and include path after traceroute moved > > Fixes: 9b7a920a12a9 ("traceroute: move from contrib to usr.sbin") > --- > usr.sbin/traceroute6/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/usr.sbin/traceroute6/Makefile b/usr.sbin/traceroute6/Makefil= e > index 5086b3c08706..d2b84296fe97 100644 > --- a/usr.sbin/traceroute6/Makefile > +++ b/usr.sbin/traceroute6/Makefile > @@ -14,7 +14,7 @@ > > .include > > -TRACEROUTE_DISTDIR?=3D ${SRCTOP}/contrib/traceroute > +TRACEROUTE_DISTDIR?=3D ${SRCTOP}/usr.sbin/traceroute > .PATH: ${TRACEROUTE_DISTDIR} > > PACKAGE=3D runtime > --000000000000e43e990610e2e254 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah, beat me to the punch... Thanks! I was confirming it wo= rked with a full rebuild before pushing...

Warner
<= /div>
O= n Thu, Feb 8, 2024 at 10:59=E2=80=AFAM Mark Johnston <markj@freebsd.org> wrote:
The branch main has been updated by mar= kj:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D72c166696b78e3d878be17cf2b01555391b9c97e
commit 72c166696b78e3d878be17cf2b01555391b9c97e
Author:=C2=A0 =C2=A0 =C2=A0Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-02-08 17:57:33 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-02-08 17:57:33 +0000

=C2=A0 =C2=A0 traceroute6: Update .PATH and include path after traceroute m= oved

=C2=A0 =C2=A0 Fixes:=C2=A0 9b7a920a12a9 ("traceroute: move from contri= b to usr.sbin")
---
=C2=A0usr.sbin/traceroute6/Makefile | 2 +-
=C2=A01 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/traceroute6/Makefile b/usr.sbin/traceroute6/Makefile<= br> index 5086b3c08706..d2b84296fe97 100644
--- a/usr.sbin/traceroute6/Makefile
+++ b/usr.sbin/traceroute6/Makefile
@@ -14,7 +14,7 @@

=C2=A0.include <src.opts.mk>

-TRACEROUTE_DISTDIR?=3D ${SRCTOP}/contrib/traceroute
+TRACEROUTE_DISTDIR?=3D ${SRCTOP}/usr.sbin/traceroute
=C2=A0.PATH: ${TRACEROUTE_DISTDIR}

=C2=A0PACKAGE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0runtime
--000000000000e43e990610e2e254-- From nobody Thu Feb 8 18:55:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW5lR05Qtz5BBxB; Thu, 8 Feb 2024 18:55: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 4TW5lQ6lbyz4lCj; Thu, 8 Feb 2024 18:55:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707418514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PAph2pcoCzMiUxGs1R7W9iRFwgH127CSvmc1uzMgcls=; b=eLtFjGHwvsJUT3MHpuBFOvsLH5FZ237Z2tBJYeRDTGq7LLiT5qWAM2bL+TFpBD0A8DLG6D W/DzLWzvijTCFMfeRFndwGSShH6/dM7z7DpUbhd1Yyv+GlQThqh7e8lP6Clp/OLt1N5e01 u/A+fUGeoGjWZbKfo7jbiW4bOoY/34435tDFMakPL+jY2Otcvyog3MOusGa4BWxH20lF99 W6YFWATI+RMVp2AOEJgxlV/3h95CXBzH8aJjUy0oQwYNCX4dHGRJl3gFFCrAVvkPKBDKhx VDv9LRN+XTV2QrMqHcLfI/0yEHnAcsrEAF9AI2rKyaYhjJSfTE/f8/sa34kaPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707418514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PAph2pcoCzMiUxGs1R7W9iRFwgH127CSvmc1uzMgcls=; b=JCLN4P+qLU2jpKS+5+Kthg3Rj4UmkINPUZR4kgTD+SSj5CpCt45P+5QlJf6r7LLlr49M4H q4vCmaP5alqaAjALfi2wcrgrcDf4e7f5vNzx4mhUlZoKNA2wG/5bztgML505ykxcz3ajeS GX08H1vMF0/Bv7DcZ/J4/2wP69HOGtYB5pMGu7G4tjPJ1OHsctLWNqXejNxbfjyNYiqMeV W/wC8ueexpjP6htqJoFRR1cbSE7LqHrj6PZANmEw9M+S/tu9EOsmbbaSTVz+Hx3++GESIX /oterxzKiJng/mdiRNQzHPimgr2+x5FuYP4skdvK+kTKKsKTCNKjp1nKmcCpNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707418514; a=rsa-sha256; cv=none; b=g6MN6diKkjYIX4V+acfsZ3ROHhRN+/AhH2HGYU5kzTTTG8AQjJEPqukwcmO2f35iVcN0h6 OJxQ/RcRRI1najutmze90x6XiXsS0ZadJgLCnbCrkQ/G2+B3EmNbWi2ywSRMEbC7cpKONJ 49xXht/iH1sT5zC963i52KIchhEgWBNmmj22Pq1hIRYKpyISGZ/RGL3cF0NlZDjY5Mrl/r dZWZoFTJqOGBp8ZIuTe3/5jEuX1ZIU0L7Z0MwPqP7uoJJuKaPg2yIOLyaY7GvDR+Qi9Xk8 KQMa4rJf5IASkHfbfJVFKo4UHiW1RH48WywoB87pGfAc6vlxEvowS76W7VdZDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW5lQ5pdjz129B; Thu, 8 Feb 2024 18:55:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 418ItEHb057486; Thu, 8 Feb 2024 18:55:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418ItEU2057483; Thu, 8 Feb 2024 18:55:14 GMT (envelope-from git) Date: Thu, 8 Feb 2024 18:55:14 GMT Message-Id: <202402081855.418ItEU2057483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 32a6df57df3e - main - tcp: calculate ssthresh on RTO according to RFC5681 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32a6df57df3ef5783bc4bb066cce9c476496e7a9 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=32a6df57df3ef5783bc4bb066cce9c476496e7a9 commit 32a6df57df3ef5783bc4bb066cce9c476496e7a9 Author: Richard Scheffenegger AuthorDate: 2024-02-08 18:12:19 +0000 Commit: Richard Scheffenegger CommitDate: 2024-02-08 18:18:26 +0000 tcp: calculate ssthresh on RTO according to RFC5681 per RFC5681, only adjust ssthresh on the initital retransmission timeout. Since RTO often happens during loss recovery, while cwnd no longer tracks all data in flight, calculcate pipe properly. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43768 --- sys/netinet/cc/cc.c | 17 ++++++++++++----- sys/netinet/cc/cc_cubic.c | 14 +++++++++++--- sys/netinet/cc/cc_dctcp.c | 16 ++++++++++++---- sys/netinet/cc/cc_htcp.c | 16 ++++++++++++---- sys/netinet/cc/cc_newreno.c | 19 ++++++++++++++----- sys/netinet/tcp_stacks/rack.c | 7 +++++-- 6 files changed, 66 insertions(+), 23 deletions(-) diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index ff25b8368cc4..a3d19e31d438 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -454,8 +454,7 @@ newreno_cc_after_idle(struct cc_var *ccv) void newreno_cc_cong_signal(struct cc_var *ccv, uint32_t type) { - uint32_t cwin, factor; - u_int mss; + uint32_t cwin, factor, mss, pipe; cwin = CCV(ccv, snd_cwnd); mss = tcp_fixed_maxseg(ccv->ccvc.tcp); @@ -489,9 +488,17 @@ newreno_cc_cong_signal(struct cc_var *ccv, uint32_t type) } break; case CC_RTO: - CCV(ccv, snd_ssthresh) = max(min(CCV(ccv, snd_wnd), - CCV(ccv, snd_cwnd)) / 2 / mss, - 2) * mss; + if (CCV(ccv, t_rxtshift) == 1) { + if (V_tcp_do_newsack) { + pipe = tcp_compute_pipe(ccv->ccvc.tcp); + } else { + pipe = CCV(ccv, snd_nxt) - + CCV(ccv, snd_fack) + + CCV(ccv, sackhint.sack_bytes_rexmit); + } + CCV(ccv, snd_ssthresh) = max(2, + min(CCV(ccv, snd_wnd), pipe) / 2 / mss) * mss; + } CCV(ccv, snd_cwnd) = mss; break; } diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c index 3f7ba630db5d..dcb096af6cbf 100644 --- a/sys/netinet/cc/cc_cubic.c +++ b/sys/netinet/cc/cc_cubic.c @@ -420,7 +420,7 @@ static void cubic_cong_signal(struct cc_var *ccv, uint32_t type) { struct cubic *cubic_data; - u_int mss; + uint32_t mss, pipe; cubic_data = ccv->cc_data; mss = tcp_fixed_maxseg(ccv->ccvc.tcp); @@ -476,12 +476,20 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) cubic_data->undo_cwnd_prior = cubic_data->cwnd_prior; cubic_data->undo_W_max = cubic_data->W_max; cubic_data->undo_K = cubic_data->K; + if (V_tcp_do_newsack) { + pipe = tcp_compute_pipe(ccv->ccvc.tcp); + } else { + pipe = CCV(ccv, snd_nxt) - + CCV(ccv, snd_fack) + + CCV(ccv, sackhint.sack_bytes_rexmit); + } + CCV(ccv, snd_ssthresh) = max(2, + (((uint64_t)min(CCV(ccv, snd_wnd), pipe) * + CUBIC_BETA) >> CUBIC_SHIFT) / mss) * mss; } cubic_data->flags |= CUBICFLAG_CONG_EVENT | CUBICFLAG_RTO_EVENT; cubic_data->undo_W_max = cubic_data->W_max; cubic_data->num_cong_events++; - CCV(ccv, snd_ssthresh) = ((uint64_t)CCV(ccv, snd_cwnd) * - CUBIC_BETA) >> CUBIC_SHIFT; CCV(ccv, snd_cwnd) = mss; break; diff --git a/sys/netinet/cc/cc_dctcp.c b/sys/netinet/cc/cc_dctcp.c index efb8913ec36c..41db7e0811aa 100644 --- a/sys/netinet/cc/cc_dctcp.c +++ b/sys/netinet/cc/cc_dctcp.c @@ -240,7 +240,7 @@ static void dctcp_cong_signal(struct cc_var *ccv, uint32_t type) { struct dctcp *dctcp_data; - u_int cwin, mss; + uint32_t cwin, mss, pipe; if (CCV(ccv, t_flags2) & TF2_ECN_PERMIT) { dctcp_data = ccv->cc_data; @@ -292,9 +292,17 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type) dctcp_data->ece_curr = 1; break; case CC_RTO: - CCV(ccv, snd_ssthresh) = max(min(CCV(ccv, snd_wnd), - CCV(ccv, snd_cwnd)) / 2 / mss, - 2) * mss; + if (CCV(ccv, t_rxtshift) == 1) { + if (V_tcp_do_newsack) { + pipe = tcp_compute_pipe(ccv->ccvc.tcp); + } else { + pipe = CCV(ccv, snd_nxt) - + CCV(ccv, snd_fack) + + CCV(ccv, sackhint.sack_bytes_rexmit); + } + CCV(ccv, snd_ssthresh) = max(2, + min(CCV(ccv, snd_wnd), pipe) / 2 / mss) * mss; + } CCV(ccv, snd_cwnd) = mss; dctcp_update_alpha(ccv); dctcp_data->save_sndnxt += CCV(ccv, t_maxseg); diff --git a/sys/netinet/cc/cc_htcp.c b/sys/netinet/cc/cc_htcp.c index c9304fcfc8e5..7500446d3051 100644 --- a/sys/netinet/cc/cc_htcp.c +++ b/sys/netinet/cc/cc_htcp.c @@ -281,7 +281,7 @@ static void htcp_cong_signal(struct cc_var *ccv, uint32_t type) { struct htcp *htcp_data; - u_int mss; + uint32_t mss, pipe; htcp_data = ccv->cc_data; mss = tcp_fixed_maxseg(ccv->ccvc.tcp); @@ -323,9 +323,17 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type) break; case CC_RTO: - CCV(ccv, snd_ssthresh) = max(min(CCV(ccv, snd_wnd), - CCV(ccv, snd_cwnd)) / 2 / mss, - 2) * mss; + if (CCV(ccv, t_rxtshift) == 1) { + if (V_tcp_do_newsack) { + pipe = tcp_compute_pipe(ccv->ccvc.tcp); + } else { + pipe = CCV(ccv, snd_nxt) - + CCV(ccv, snd_fack) + + CCV(ccv, sackhint.sack_bytes_rexmit); + } + CCV(ccv, snd_ssthresh) = max(2, + min(CCV(ccv, snd_wnd), pipe) / 2 / mss) * mss; + } CCV(ccv, snd_cwnd) = mss; /* * Grab the current time and record it so we know when the diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c index 53d066682a7d..4f55fb7e0f7a 100644 --- a/sys/netinet/cc/cc_newreno.c +++ b/sys/netinet/cc/cc_newreno.c @@ -366,8 +366,7 @@ static void newreno_cong_signal(struct cc_var *ccv, uint32_t type) { struct newreno *nreno; - uint32_t beta, beta_ecn, cwin, factor; - u_int mss; + uint32_t beta, beta_ecn, cwin, factor, mss, pipe; cwin = CCV(ccv, snd_cwnd); mss = tcp_fixed_maxseg(ccv->ccvc.tcp); @@ -428,9 +427,19 @@ newreno_cong_signal(struct cc_var *ccv, uint32_t type) } break; case CC_RTO: - CCV(ccv, snd_ssthresh) = max(min(CCV(ccv, snd_wnd), - CCV(ccv, snd_cwnd)) / 2 / mss, - 2) * mss; + if (CCV(ccv, t_rxtshift) == 1) { + if (V_tcp_do_newsack) { + pipe = tcp_compute_pipe(ccv->ccvc.tcp); + } else { + pipe = CCV(ccv, snd_nxt) - + CCV(ccv, snd_fack) + + CCV(ccv, sackhint.sack_bytes_rexmit); + } + CCV(ccv, snd_ssthresh) = max(2, + ((uint64_t)min(CCV(ccv, snd_wnd), pipe) * + (uint64_t)factor) / + (100ULL * (uint64_t)mss)) * mss; + } CCV(ccv, snd_cwnd) = mss; break; } diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 10ab20f00e26..0ec50bb5e5c5 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -5948,8 +5948,11 @@ rack_cong_signal(struct tcpcb *tp, uint32_t type, uint32_t ack, int line) tp->t_bytes_acked = 0; rack->r_fast_output = 0; EXIT_RECOVERY(tp->t_flags); - tp->snd_ssthresh = max(2, min(tp->snd_wnd, rack->r_ctl.cwnd_to_use) / 2 / - ctf_fixed_maxseg(tp)) * ctf_fixed_maxseg(tp); + if (tp->t_rxtshift == 1) { + tp->snd_ssthresh = max(2, + min(tp->snd_wnd, rack->r_ctl.cwnd_to_use) / 2 / + ctf_fixed_maxseg(tp)) * ctf_fixed_maxseg(tp); + } orig_cwnd = tp->snd_cwnd; tp->snd_cwnd = ctf_fixed_maxseg(tp); rack_log_to_prr(rack, 16, orig_cwnd, line); From nobody Thu Feb 8 19:20:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW6J220QQz5BDv4; Thu, 8 Feb 2024 19:20: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 4TW6J21P14z4nN1; Thu, 8 Feb 2024 19:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707420002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9sf5WZdAWRR+waHpCof+g5ywGN+qSNivGez3S8D6wa0=; b=h38EmgLlMaDyEYClIvDlG+lVm8mFGBL2Fa0bdQ6hM1if4e0OLfAblZOwl6FZhi8UPhRSv3 7SDFKSOymcGEXRKjLjohZMARCbQBgcarRjIWyo46SyacOW7QDR80EiJSZcBQT8q/upu5oy Io6yKhI5M1+LBI9zv9UWO5hVxruhvJqH9wSq3TrnH1fyvzm0Bh310Pd6a0XVcw/Q7Xy7me QZvRPQLLuFnlUO46787ghaTqytL91kzWKgBlYAXkl3oB0c9s2kQrkwaSKtosr5AUpMjiiT /x+W1fJz67iGHt28rw9w4s6HugLp71rpkgi5FvAkjzf1aJyEkPiOMxKEDDlpFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707420002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9sf5WZdAWRR+waHpCof+g5ywGN+qSNivGez3S8D6wa0=; b=P+EjQhctdWM6ek/2SUBEa0lRCLTM9uhl+H26qO8/0F0sXaJgoV7iToB77l6HEhCw/rU0bv 4FpXQbv69M246CQtqT3XTe5PazOQ5gBaVmmS3fe370iBugMry43lFCQ4e4RjgqtV0ZAa1e EWEUou8v488LLfN/JV15KfBGYSVLYfYBkgvmypzO4VMzLW6Sn2CAS7JfgVHhddvXl2Olg4 fTfeQEjdqr5EKkN7Z/eBlABTa3+4WC2cUTRCUtnS3QZVK24pvutOdExzRR5umGiX0cP7NW KgZ3Hbv/pGHw5XxraOfKVHUTvDVOBcuuzVFd4omL5PkuZ7DrCxNolLHyVzVbEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707420002; a=rsa-sha256; cv=none; b=hFNhNBwputJk7MmcXwToORHig+q7SDkoX/ZxW2MbSwF/SS6z6sym9hwFM8QAZbw+ItZtGo kEpg/qmqC972d+cAIPnaY21fIlPOjaw49n+jkMZ41a1GIryMpGGx0nch1mBXxkmkYdrcxV i7AcHsMrnq9yL52C5uzeLoceqOz/ID28iakCuhHI1AnLQaSaKSkdEa9HMe1Bx7Zy2I2z0o Z/K0tWdKYJJUCux0LZOhw1Qv1vIkq2r7/WQVHAVpDSb/PYik1ZUuaZpsXyXPB+UtEtMjwN faI5AiKnD6SvQ6OPgOxaX56aZbuujEzA2NuQUA33uzfn2mmFH5Nq14Z+UrZbow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW6J20TYjz12k5; Thu, 8 Feb 2024 19:20: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 418JK1pT094700; Thu, 8 Feb 2024 19:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418JK1NU094694; Thu, 8 Feb 2024 19:20:01 GMT (envelope-from git) Date: Thu, 8 Feb 2024 19:20:01 GMT Message-Id: <202402081920.418JK1NU094694@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: cf675768528f - main - Merge commit f577bfb99528 from llvm-project (by Alexander Potapenko): List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf675768528f22b4a9d8c70897b9ebf51da8061e Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cf675768528f22b4a9d8c70897b9ebf51da8061e commit cf675768528f22b4a9d8c70897b9ebf51da8061e Author: Dimitry Andric AuthorDate: 2024-02-08 19:19:27 +0000 Commit: Dimitry Andric CommitDate: 2024-02-08 19:19:27 +0000 Merge commit f577bfb99528 from llvm-project (by Alexander Potapenko): [sanitizer][msan] fix AArch64 vararg support for KMSAN (#70660) Cast StackSaveAreaPtr, GrRegSaveAreaPtr, VrRegSaveAreaPtr to pointers to fix assertions in getShadowOriginPtrKernel(). Fixes: https://github.com/llvm/llvm-project/issues/69738 Patch by Mark Johnston. Requested by: markj MFC after: 3 days --- .../lib/Transforms/Instrumentation/MemorySanitizer.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp index 83d90049abc3..de266590ad92 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -1718,6 +1718,12 @@ struct MemorySanitizerVisitor : public InstVisitor { std::pair getShadowOriginPtrUserspace(Value *Addr, IRBuilder<> &IRB, Type *ShadowTy, MaybeAlign Alignment) { + VectorType *VectTy = dyn_cast(Addr->getType()); + if (!VectTy) { + assert(Addr->getType()->isPointerTy()); + } else { + assert(VectTy->getElementType()->isPointerTy()); + } Type *IntptrTy = ptrToIntPtrType(Addr->getType()); Value *ShadowOffset = getShadowPtrOffset(Addr, IRB); Value *ShadowLong = ShadowOffset; @@ -5262,21 +5268,25 @@ struct VarArgAArch64Helper : public VarArgHelper { // we need to adjust the offset for both GR and VR fields based on // the __{gr,vr}_offs value (since they are stores based on incoming // named arguments). + Type *RegSaveAreaPtrTy = IRB.getInt8PtrTy(); // Read the stack pointer from the va_list. - Value *StackSaveAreaPtr = getVAField64(IRB, VAListTag, 0); + Value *StackSaveAreaPtr = + IRB.CreateIntToPtr(getVAField64(IRB, VAListTag, 0), RegSaveAreaPtrTy); // Read both the __gr_top and __gr_off and add them up. Value *GrTopSaveAreaPtr = getVAField64(IRB, VAListTag, 8); Value *GrOffSaveArea = getVAField32(IRB, VAListTag, 24); - Value *GrRegSaveAreaPtr = IRB.CreateAdd(GrTopSaveAreaPtr, GrOffSaveArea); + Value *GrRegSaveAreaPtr = IRB.CreateIntToPtr( + IRB.CreateAdd(GrTopSaveAreaPtr, GrOffSaveArea), RegSaveAreaPtrTy); // Read both the __vr_top and __vr_off and add them up. Value *VrTopSaveAreaPtr = getVAField64(IRB, VAListTag, 16); Value *VrOffSaveArea = getVAField32(IRB, VAListTag, 28); - Value *VrRegSaveAreaPtr = IRB.CreateAdd(VrTopSaveAreaPtr, VrOffSaveArea); + Value *VrRegSaveAreaPtr = IRB.CreateIntToPtr( + IRB.CreateAdd(VrTopSaveAreaPtr, VrOffSaveArea), RegSaveAreaPtrTy); // It does not know how many named arguments is being used and, on the // callsite all the arguments were saved. Since __gr_off is defined as From nobody Thu Feb 8 19:41:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW6mj4V7Hz5BGrK; Thu, 8 Feb 2024 19:41: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 4TW6mj43WQz4qqx; Thu, 8 Feb 2024 19:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707421285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GBH8t8t7+wjLP9XEZTgiOhxk1bm2dNfpDJaZ0rlNVKk=; b=KZbCTrUKHfYb0qz0gkZhT3ko2KuZPsD5WzA98OoLFN1o5jj7g99+HwPy0/dTiW/6FoEHbH IQ/PSmALvThhAyCids0s4EMxRkma0SaCpfhGDTtprfqcgnJdODsOkEo5TC6xyVKNtD3J2q o3V5khnrMybcd5Jp+e7Yjs066pU8L1UlJpCxi93kcV7aTwZXLheKLFdGPdmsuIoqwOXIt3 aJBudD7UKH/CsZ7Q4mko/4LHN4wbs19mjeG0eDdkoz7pOmsMF99OFpTvTnvrwlyd38smsh mNWnjbJsR5/JlfMl97E2EsOVeTlAgYmC+OerqAN4dN7G1DGAmJvG8BI9TTqVdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707421285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GBH8t8t7+wjLP9XEZTgiOhxk1bm2dNfpDJaZ0rlNVKk=; b=VhGOzLy6rjPVumvaTaoOOUyVtCDGb09NQnq3rhCbdGSQSSuclP1GH1l2X84+oBXbVK74MH QK8D0XnqXZH1QWzJBxArddh2o8NL0oK2qwImS2jAU0VtUTVqf+oNNko3iHKM77gBeLFlIy fnWC88FUdyaUQuo8iMH4pZl9E19CflX4nOszsFNEhgEXAS81v6DedzySgFTBIkmOvJA+nN IAIK+jQT9OEERkdHa3M6XFMwQWTn3zBta3fxhUKB8gC/+pRwNYBdO0g4NtNQ60uMoHzmM2 sOaqi1PEceysNvJGwwesmm9/sdQ9kOwuqKTuwhYlZzGUTUPvkTFATlBxYS5Tbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707421285; a=rsa-sha256; cv=none; b=ywfrB8WyU8tva7ReUiRddApNr4HgEeoxdgRLTnLQCnYkh1o9Rn6vyfTgqDSWROqxiR+ig1 XozjKqjZ/xIYmYm6vQNG5X3y8XbaM/kZvMthuc5K/N7jTySkRIktdxv2PtWdSWm6sbnuXd W3LarbV+HNdT+A3vVcs+5u6/ZV4gNgyynH8wkLfURnUi/4Hgqy1K245ekU2CY8GNwiP5cL aQjY+9DVP/Tmn+lXOr4VAg1NyPxqdatjmLuTxJiOaOyW0gegk11zLtnpD9C2TXVg9p8KX0 T4AAUSRYsAjLuaEmsD9YNt3SKIlwEnJGIdwL4Y5t1+i7bXb1b5K4+fPrgvUUNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW6mj37bTz12xp; Thu, 8 Feb 2024 19:41: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 418JfPrG036904; Thu, 8 Feb 2024 19:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418JfPkt036901; Thu, 8 Feb 2024 19:41:25 GMT (envelope-from git) Date: Thu, 8 Feb 2024 19:41:25 GMT Message-Id: <202402081941.418JfPkt036901@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 23c4f232478a - main - tcp: ensure tcp_sack_partialack does not inflate cwnd after RTO List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23c4f232478aa022cad45f2cde349ff56bb2a094 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=23c4f232478aa022cad45f2cde349ff56bb2a094 commit 23c4f232478aa022cad45f2cde349ff56bb2a094 Author: Richard Scheffenegger AuthorDate: 2024-02-08 18:56:27 +0000 Commit: Richard Scheffenegger CommitDate: 2024-02-08 19:40:25 +0000 tcp: ensure tcp_sack_partialack does not inflate cwnd after RTO The implicit assumption of snd_nxt always being larger than snd_recover is not true after RTO. In that case, cwnd would get inflated to ssthresh, which may be much larger than the current pipe (data in flight). Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43653 --- sys/netinet/tcp_sack.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 0c557dc4579d..f59cc5fe0d0b 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -953,8 +953,17 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th, u_int *maxsegp) /* Send one or 2 segments based on how much new data was acked. */ if ((BYTES_THIS_ACK(tp, th) / maxseg) >= 2) num_segs = 2; - tp->snd_cwnd = (tp->sackhint.sack_bytes_rexmit + - (tp->snd_nxt - tp->snd_recover) + num_segs * maxseg); + if (V_tcp_do_newsack) { + tp->snd_cwnd = imax(tp->snd_nxt - th->th_ack + + tp->sackhint.sack_bytes_rexmit - + tp->sackhint.sacked_bytes - + tp->sackhint.lost_bytes, maxseg) + + num_segs * maxseg; + } else { + tp->snd_cwnd = (tp->sackhint.sack_bytes_rexmit + + imax(0, tp->snd_nxt - tp->snd_recover) + + num_segs * maxseg); + } if (tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; tp->t_flags |= TF_ACKNOW; From nobody Thu Feb 8 19:54:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW73W0T2Bz5BHv9; Thu, 8 Feb 2024 19:54: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 4TW73V6ypwz4s8p; Thu, 8 Feb 2024 19:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707422055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f1RYxyumqP6iiDn1jUIp0na6C1qzphO+BRTdL2FxELU=; b=U6y9pYlXnxQpyIC6bK5LGHWyiEH0ypuFPGSvioajuIeuD9xQXXrM9LOQ87dtkFnAKl44vG sW95/961DdBouHgUrsRltT98x8MXIx6Hl1w2baWmw6/we7s5IES6kwhVpvC7x1WeYM3JP9 JRI+IWsnCncO4QLPXoGiaJuikhuqjlsjwF9RLYnxeVUknvR/5xCEJ1Cux7qRuJzbMjVtLQ jRtgwY4ESm+XMLfP6NKsrTMLsAk47Q1ksz9XV8rIcnZOjyU1cUUx1AOCih7TkBM7343fiU RGCC8TYdAMXrs5/J6XQn1HxK6nt+HOAQf2uXV7wKhlwvJ6fLWQZJ5hQfcJ874Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707422055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f1RYxyumqP6iiDn1jUIp0na6C1qzphO+BRTdL2FxELU=; b=HvM3cU3cYhbD6kScuVjvbOKp20nvVLO7sAO9lfEPJTfgqWwSB2lzSDwnUMqvzaBafRpd90 czViZLCs3dKWZOeDnQHx7b1pKaVniRsgsR4ECYYgmi1HIRFRZrMUfk15LA/1eEufel9SLD kaf3IeqOBWtxHbIHZSPYVMt/VjHhYXzXrq4/Eqd+Xtpclkc56dY82w7LqadfLBEyW6AaaP QrYZht3RWjZlCeubB1q2IXConBplG0PqNWMokX7deJeyU0UiNv89JKS2Bn1U+wi+CPVL9o 3978goz8pn0nzuaJb0Aa9HyFZLRXJ9NvvDG8syCVTvmCUQPx7OLO02KuldYMwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707422055; a=rsa-sha256; cv=none; b=FTucSbfP7V14YUkZ0J6pcT8KH0OdTBruV1Jy8Yu7YxxgqXpN1uYHuV46UeV5XnJB+kdxFF wdHT7nvf2iqJuszoIIR4lxP/KNv/c3c51BApzC+hy4nTxDFSalYhOBB3GEJ1D83BBEoEi+ imp68OcUZN3PZFKLWesJXMk403SzHjR6pS7HWhkWisZzpjOp2dGz5WkvPsKqI77CBGlok8 AOQySfaOBgA/MYamy2iTykzXKhPTp7yk0eHLu9+INeQtp5+6GOOu7PzQvEVX56/oo3VXMM MgfYlF3IrEhkG3W9l+4JL5OHC4Wl2OsLnWL3h8Ai5s9ipJb+90qgWPPjhOkTOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW73V62Cgz13TR; Thu, 8 Feb 2024 19:54: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 418JsE8O058715; Thu, 8 Feb 2024 19:54:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418JsEMu058712; Thu, 8 Feb 2024 19:54:14 GMT (envelope-from git) Date: Thu, 8 Feb 2024 19:54:14 GMT Message-Id: <202402081954.418JsEMu058712@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: cc697d22c4a4 - main - libsys: move some missed manpages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc697d22c4a43d6d40744799695a65a1076bf3e8 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=cc697d22c4a43d6d40744799695a65a1076bf3e8 commit cc697d22c4a43d6d40744799695a65a1076bf3e8 Author: Brooks Davis AuthorDate: 2024-02-08 19:41:11 +0000 Commit: Brooks Davis CommitDate: 2024-02-08 19:50:32 +0000 libsys: move some missed manpages Fixes: 29d079c96491 - libsys: move __libsys_interposer consumers --- lib/{libc/gen => libsys}/lockf.3 | 0 lib/{libc/gen => libsys}/sleep.3 | 0 lib/{libc/gen => libsys}/usleep.3 | 0 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/libc/gen/lockf.3 b/lib/libsys/lockf.3 similarity index 100% rename from lib/libc/gen/lockf.3 rename to lib/libsys/lockf.3 diff --git a/lib/libc/gen/sleep.3 b/lib/libsys/sleep.3 similarity index 100% rename from lib/libc/gen/sleep.3 rename to lib/libsys/sleep.3 diff --git a/lib/libc/gen/usleep.3 b/lib/libsys/usleep.3 similarity index 100% rename from lib/libc/gen/usleep.3 rename to lib/libsys/usleep.3 From nobody Thu Feb 8 19:54:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TW73X1lk2z5BHvB; Thu, 8 Feb 2024 19:54: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 4TW73X0Xpbz4rs8; Thu, 8 Feb 2024 19:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707422056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mcboSx4S5z9OtZISBp5zlAZLT4zjFDi042lXHLyOD3c=; b=TW0f3Q1qhXyEWZkgiHUZLJnz1G/jTiiu7hs3L7NB7j7lAUfnJtyvKynCUKO1hmZTr4Kuif VZJ7wOkE8B7R00l9hYwZViEwh1gy1M+IP0Dnab7OnurjqU4N+3V30x7w952EVuhoSkXyqC YfX94pqYb8myKTVh7HTtKZu6FzDobmXxECnE1I26pGECxXc+ozZbd99gntWzQ8mLJHsk2v U6QcVvVPuWzvBOYSWWHjNm9YdLzdhjcTELc6xc/CfaW7+a7ypl08rIDh5rmzah50J+x4dO Vv6seq/n4uhTLj10TudfvANUS8YUZHKqCF6w1B3BtAdjzzg8nrmproX1oBNyKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707422056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mcboSx4S5z9OtZISBp5zlAZLT4zjFDi042lXHLyOD3c=; b=ZJIxA2W/d9V3jROUI1GBdsM9vwn0oOqZxxgT9J32qeNKXO4MeGiMEV/w5vHCoQos216IIs cLFWJPyxWNAVgbllxN0NKWmtfUWoaDCAMXWwRuvA1Kl/Uu0fSUCYaCENU9sZECnTOGyvW1 c8ACJfaE5OoXsl0PX3EoNPfBDtdkupW9Ju8GLxAKOSP24Cc69nv55Ce6NyUe3OWNfBjUoH krM9x3CMIXtB4cNmsKAVaXtsjBJFYsEedE7WqC6i/bxqfETZqtnQ5GG0sc+/L2FvsdqCHm QnBKnozedfUmGJ3lzweX4bBjxDZlTUMy6/WtlViFV7sluwSAbVUmNRU+DmXZZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707422056; a=rsa-sha256; cv=none; b=YBDhjyQrUEBxpsknR6/VKFCjEa1MPcGMzuKuLxaN9FvwuYnvrQptoPJ6l3HudQqR1DuM29 bwvy6UQfMpRsKzvuJufT4D+jA+ELXHX0d5WL6k9BbitKU2Cs15B03VbnUAji/DWFWdGRUN hgh0+UBPe1UZPGL6hrW2PrcHIvyr3uwc80Uj479OKvirAVpyrCniyIie9Kz5yn1mC926wa dFV8Bnfaz5tRlk7KjF46oOMCk+60fZkCJ1JR0qHsGq/Zr8w7BoJkrpMlcN7CMxRF8pFQBH rhhpWDolqY4xeNVywrdVWWTpnICxHp94F93gOymwk1malywO65JvF2ld4Ou4/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 4TW73W6jX1z13TS; Thu, 8 Feb 2024 19:54: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 418JsFrh058756; Thu, 8 Feb 2024 19:54:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 418JsFdw058753; Thu, 8 Feb 2024 19:54:15 GMT (envelope-from git) Date: Thu, 8 Feb 2024 19:54:15 GMT Message-Id: <202402081954.418JsFdw058753@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: d5677b0b8b8a - main - libsys: actually install manpages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5677b0b8b8a1505edeaafab5606c4f890c1a42d Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d5677b0b8b8a1505edeaafab5606c4f890c1a42d commit d5677b0b8b8a1505edeaafab5606c4f890c1a42d Author: Brooks Davis AuthorDate: 2024-02-08 18:21:56 +0000 Commit: Brooks Davis CommitDate: 2024-02-08 19:53:29 +0000 libsys: actually install manpages In initial hacking I'd bluntly disabled manpage installation in libsys, then later disabled them for libc, but forgot to fix the former leading to no syscall manapages. PR: 276887 Reported by: Martin Birgmeier --- lib/libsys/Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile index b51f44025748..897e033267a4 100644 --- a/lib/libsys/Makefile +++ b/lib/libsys/Makefile @@ -69,12 +69,4 @@ SRCS+=_umtx_op_err.c VERSION_DEF=${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS=${SYM_MAPS} -# XXX: let libc install the manpages for now -MAN= -MLINKS= - -# XXX: move sys tests? -#HAS_TESTS= -#SUBDIR.${MK_TESTS}+= tests - .include From nobody Fri Feb 9 01:41:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWGmX2Lhqz58bty; Fri, 9 Feb 2024 01:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TWGmX0RVVz47GY; Fri, 9 Feb 2024 01:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707442908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RNA1hWlL0EHy+vNwpJPuMwcho9dV0qCqLi/9eyyAvmA=; b=co5KY4rTDIFzaAH9JmhcqZ29ayOo2gSlsnUrPHFr38jDSNcBJtP4DnPYdcLKaUZVzOACv1 Ho/ILWO97XLaRIA9gIuo731etjWEWKu11j9yTU9DtFRn0tXWIgETDNEBlt5FC4jHxD4Asn gG5zWCLTanBz+4b4/yAhvxq66OWmD3Uj8x9pUyNwFTrH6mnPW8/BXqt1hytDYMWxf6l+XV fBMNef5IoAkUu3dmTcRYBex4VP0er0VpHwbl1Io96YWBT6Y+vbjC4KfR9b98BsfXVC818f FAEbSXBpbyELUKzi1xFWIE/xzJTs9T6Jzuepp2giG7zr0MLj1wS/HcBbF+Ll1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707442908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RNA1hWlL0EHy+vNwpJPuMwcho9dV0qCqLi/9eyyAvmA=; b=go6fw6vEVQ/VJTluoyaLEjrQF6MEwI37aeroFrOfiULAPxCPHXyvGywZckSA2Y93rkDGjT pRhPWJNwg/UBwaUV9P0W7LBQsbE1Z8TKGSwXxusJfCwM9CHz5boWip+l1BktI7ovHy8cXd gxSaU6CKduK4aACsrHr6RJWR731XdjCEsyn1D2XMoKtB0vBh4zMJdK7fnX6/tdZ8Cck9Ix 9EeFM450J8iBdNA6n4bvBv/gqxSt0yHgBWM2p229LQN8/bYDT9L50Jx7kwNHkal2sbiFV8 lEOEfp/yi9sZfaLV08KRxz1xK8wyV7/onDd1vE9drdEv8tR2bK2RMQhGdm/nXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707442908; a=rsa-sha256; cv=none; b=nkU/Z97W5dDD6AvG9H+5HivHse11qpqNkSNoNRzs90VO1RXnS+sjZ6s+McDJa1WUaJXZyG PWn8ns8Q7It138XhGjXzypuFYClWIY0uMLWRC26rzj3i+j1wr3+32tUJyxaCrEvfa7UpES OiqgwYV+nfCpTyWP1h0Ye8qktP/0hbc0BN0yJmZoIOuoy4FPwXjJ/gufaaUVfEz3zeOJrG +VVK4vz1a/mQMbWWnsnvce6OfDruFpqQ4BQXMzadL87rX0WFFbruxxoDcWDb3Tf2bsqRvk mEtHvtXvGmn2mrv6rZ6KWj1NQcSIXKhYid4POMNTNzw36W8MxZqcWnu+zuQf2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWGmW6dKPz1Cj5; Fri, 9 Feb 2024 01:41: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 4191fl4p043809; Fri, 9 Feb 2024 01:41:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4191fl3F043806; Fri, 9 Feb 2024 01:41:47 GMT (envelope-from git) Date: Fri, 9 Feb 2024 01:41:47 GMT Message-Id: <202402090141.4191fl3F043806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 15cb9c0d9f0a - main - ifconfig: a typo fixed in the man page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15cb9c0d9f0a1ecf2cf26968c42e6212ccce8c26 Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=15cb9c0d9f0a1ecf2cf26968c42e6212ccce8c26 commit 15cb9c0d9f0a1ecf2cf26968c42e6212ccce8c26 Author: Maxim Konovalov AuthorDate: 2024-02-09 01:40:00 +0000 Commit: Maxim Konovalov CommitDate: 2024-02-09 01:40:00 +0000 ifconfig: a typo fixed in the man page PR: 276878 --- sbin/ifconfig/ifconfig.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 876b9b22ea56..1fe1b1876f81 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -711,7 +711,7 @@ buffers, enable them on the interface. .It Fl mextpg If the driver supports extended multi-page .Xr mbuf 9 -biffers, disable them on the interface. +buffers, disable them on the interface. .It Cm wol , wol_ucast , wol_mcast , wol_magic Enable Wake On Lan (WOL) support, if available. WOL is a facility whereby a machine in a low power state may be woken From nobody Fri Feb 9 03:13:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWJpX6jkzz58lQT; Fri, 9 Feb 2024 03:13: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 4TWJpX5sp9z4Gm3; Fri, 9 Feb 2024 03:13:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707448420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qJbkZt9EOtCz3aqWvZ7Y/6MpZ3d4uA3WEdV7rRRJOY=; b=EWz5uS5+v4gZltZoon0S49mTnn6MuVgYzXDBPiuO7K5OFlq9Q7mHZ72ATHxuCPL90OS1Jw 8CCtoM5nfp+A/pdTz2ohtrLDJrLzDDO+l1Rs942a8HckPXmDL3SxGFfNzajJsnlMlFNhe1 L85hYECUsKDYZed8w8X1RPpB/b8Dgx6fOcZAmCu6k5z3wW8tTXwqwx56eRr8LzHxz5fHQz vwRxAzrr2xiATmbx8t9TsM7nsl91ZeO4yewST+hlT8wODyeoyI8zY+VpbMSPmuqS/CtxRf g5B4V9Xuw3I9Kq5MjrzpRld3Ihh23XqHh9qE5r7l/5l+QWXOv8iuVTeVnihsGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707448420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qJbkZt9EOtCz3aqWvZ7Y/6MpZ3d4uA3WEdV7rRRJOY=; b=mmrmQM8Ima54m53oWFpb9r0LoeJs1lANVT2EEINookI2J/sEMjh28VegGvtVJIH0Q0VtLz RMUi6oowJk4TW55gR+qigFjFUJ5MBC9eMBnHSVXdqLN/lKJCJVYFtNr0VMnHvbD463eRhc 552os+14Yr/VpgfpNdYMBNCJPzIJHYQneeZiHX6uA+eBxi8uajThblccCLEaKBrHFyxcHP kYvjEkC8sshn04ZkyxjY6aUIAL5H1xmkiBgOhztwewZ9ty/rJREcN6qxgGu1Bbv3RQ834U PrQ3CwpymCrfC5FNtL6Pgy7z4pzJcCv3qwpao2HGT9uYgDivRJIdsiF3thQtLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707448420; a=rsa-sha256; cv=none; b=C2lmktAiKZ6+02nFk4QPuZPNqNP8C+3m3+TtFEa8HRWgkyhoqrSYHLxw/7vD0cvjnGHNwS fb4hwfRp7nVSfcveakj2TeiiMPKTetMfFFut7EPlUraW8Af43YVa2vwOEr9h4+SfX1CusW FtfhT+ijdKSVul1S1mLdfxHeKquwaFH+47yUxDgfoF+g+3j74EI7VikBFTcmmhoDoImau6 JrmR9y/QfGDo1/c1o51v78uZ57C0BZw38L526sta/EBHu6T2X72SjtDAwjrV6jR53P1gck /G5NXIbzMeLUYHUs/AJMJsWsPmSI4CxLWjW2hzrBfACy+sL7hr+vwYJGA+Ufew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWJpX4xJ8zGQq; Fri, 9 Feb 2024 03:13: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 4193Dehi096841; Fri, 9 Feb 2024 03:13:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4193DemE096838; Fri, 9 Feb 2024 03:13:40 GMT (envelope-from git) Date: Fri, 9 Feb 2024 03:13:40 GMT Message-Id: <202402090313.4193DemE096838@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: 8758bf0aaec1 - main - fusefs: only test for incoherency if FN_SIZECHANGE is set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8758bf0aaec1d4b2ebcb429e8cabc691c2c95461 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=8758bf0aaec1d4b2ebcb429e8cabc691c2c95461 commit 8758bf0aaec1d4b2ebcb429e8cabc691c2c95461 Author: Emil Tsalapatis AuthorDate: 2024-02-08 01:13:43 +0000 Commit: Alan Somers CommitDate: 2024-02-09 03:13:24 +0000 fusefs: only test for incoherency if FN_SIZECHANGE is set FUSE emits spurious incoherency warnings in writethrough mode. The warnings are triggered by setattr calls generated by vnode truncation turning the cached va_size vattr stale, causing comparisons with the fresh version provided by the server to fail. Only validate the vnode's va_size vattr if the FN_SIZECHANGE flag is set. This is a part of the research work at RCSLab, University of Waterloo. Reviewed by: asomers MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1110 --- sys/fs/fuse/fuse_internal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index ffbf1f9bcc40..29d88fc942f4 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -269,10 +269,10 @@ fuse_internal_cache_attrs(struct vnode *vp, struct fuse_attr *attr, if (vnode_isreg(vp) && fvdat->cached_attrs.va_size != VNOVAL && + fvdat->flag & FN_SIZECHANGE && attr->size != fvdat->cached_attrs.va_size) { - if ( data->cache_mode == FUSE_CACHE_WB && - fvdat->flag & FN_SIZECHANGE) + if (data->cache_mode == FUSE_CACHE_WB) { const char *msg; From nobody Fri Feb 9 14:57:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWcQJ71Xkz59q9P; Fri, 9 Feb 2024 14:57: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 4TWcQJ6Qjzz4F1G; Fri, 9 Feb 2024 14:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707490632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dZMVLS7dHJMGzrQcgz8dW1M7bkU99T6Wk/9Skel9EbY=; b=GAIbJnJvzatEXleMf9AT4Rf3f0OiNrhiaWzIfVSfBBU91w8s5xjvxRHlP/vlFq5BH2XDbY lXu1WKUgXDZazB03v06vcqSCSyFRGruko86G+d0vjcp2tqB13HChL6WgxuvDhijknSNl6o wEhdQBTSHN+xSguXKDTCvqRXayb6TCGZG/BRxOsEnwkOBxAJH+08Y1RetyMXNdcSGBozT2 GgAj8iFrmql4j2nWB0InkCCXjzTwLwV/bIeOVrLnipXkKc0FI9uU0NYj/wtcsCySIFz7fz doZp630gVCSfWEhRBZBdVbZBh2qK5/Y3CzGeL33WwevI9gqmz+2OfVT1W8bccQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707490632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dZMVLS7dHJMGzrQcgz8dW1M7bkU99T6Wk/9Skel9EbY=; b=rtk5R9e4Yb7buCobyOAerZti5GpDHg4ozB4qOH9QIji46g3M/mzLCDfoQcqBB6Am3HZsBh BgkvqBPmFlzO+UjtY3Rq56Izsv20Tr5T8/mNNhFadLLl2whQONinYCI9jh7QwLjwGurbyU wUmF0HMwYKOdMhDncE9mn5qaQKzL6FO+NYlzi8sr6esdQAXkmmhoITmzhiSFgYz9cxgRai w4A01swyPDyLjNo8v+R0XjAYIhkfPvGRmfV9z2f9HfTodUmpbLyYZGWFz7L0VE28wIbrcK BaatENEDqgDgYoeIDPDqEsXn3EC3otxIZpHMwS71QRGC3E0W00teYVvViFMB0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707490632; a=rsa-sha256; cv=none; b=hiaiUub/HvKB85BHGrhHk99QQ85rd18O5afWMBWb4xqtcsWi4W+LBtP1nk21VhdoF4X/HJ vL37ETNJQDdFjOK+bi6XoJIPWx5bpUNYTsAQQ0NiuqfQPlC/kVJ9ZOSP86E6PdyOX2uiE0 +OnrS1pXU1F/GgEvGDhf6k1s6+9C9r+TKnWEID26sm3hmkoU+frzsCfGTWJKKTCul1aOXp DNmPz0xJoryMBT0DNK13jb73VV/yuJdN5n98L2n5hEjlT8yt9ZrM7eSNFE161CsZZOtZT6 pjfjiA4EgYAxdqEq/AqjWbaMmrrfGqgPnOWaKyzQbZ9oiwlilQSInDR8rfxEiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWcQJ5VzlzdJ9; Fri, 9 Feb 2024 14:57: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 419EvCSc068230; Fri, 9 Feb 2024 14:57:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419EvC09068227; Fri, 9 Feb 2024 14:57:12 GMT (envelope-from git) Date: Fri, 9 Feb 2024 14:57:12 GMT Message-Id: <202402091457.419EvC09068227@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: 827d0e4b91f6 - main - arm64: Add a GENERIC-KMSAN kernel configuration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 827d0e4b91f601dce5a163458ff87296835a3508 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=827d0e4b91f601dce5a163458ff87296835a3508 commit 827d0e4b91f601dce5a163458ff87296835a3508 Author: Alexander Stetsenko AuthorDate: 2024-02-08 19:28:17 +0000 Commit: Mark Johnston CommitDate: 2024-02-09 14:56:55 +0000 arm64: Add a GENERIC-KMSAN kernel configuration Reviewed by: imp Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43153 --- sys/arm64/conf/GENERIC-KMSAN | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/arm64/conf/GENERIC-KMSAN b/sys/arm64/conf/GENERIC-KMSAN new file mode 100644 index 000000000000..a9ff46159f14 --- /dev/null +++ b/sys/arm64/conf/GENERIC-KMSAN @@ -0,0 +1,5 @@ +include GENERIC + +ident GENERIC-KMSAN + +options KMSAN From nobody Fri Feb 9 16:49:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWfwQ3B4Sz5B012; Fri, 9 Feb 2024 16:49: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 4TWfwQ2yVnz4Rgk; Fri, 9 Feb 2024 16:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707497398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+M+dBskH8mtcnBJ0OJ7+aP8dRCT2JDdhkIsAswYgHA=; b=vI9vGbAjJ4pjD2KKV/foiHCrTLN3p6pnhT4wCb2OtHKqfgJhXJJv0Lbxjufy0Hsh3b5sZ2 GUXa0cEc1JvG7vLaigiqKSqqmqb98ZsM7V2g791X+pX9aW0ONakiZfG6zkSo3AVp8Bc/a2 /QclwVqU4f1NoOxh7VQd9K/NSzTPFxPvLOj9wfW/OhC+XO16ij9yEF27HvK8RNX4GSRAjU 2d8uucJ2w1yFpMhVFPQysCDyOFoTGp4/Unc5ITtHePyHe8zrbnKjjusswwha7q1qnGcoo7 iTInsM9VqTfoW8NGMXn/dJsS5ij40H2t2GOB7+1AfwqjrLQfRrQd1ajM8oF5zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707497398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+M+dBskH8mtcnBJ0OJ7+aP8dRCT2JDdhkIsAswYgHA=; b=ADn65SUyXWslXUUaK5Cbpr/5fK19PmaH7ufXRMeswBplFGrQ9N0zRUao93Szvf75NzVug3 w3y7lG7tSeDl0EoE16fbmU+eD0fAUqOTVG94/+0hiZ5vWkF+DPqZffT66V6KSVOLycHZ7U db3FamJtSfYl7U543Y0csXlbZT1/HICTvpOYiCCOm5TRVcd0l992AaNbSvBJHhswgqW88J S/ntOaQ2hvzkEeKvzS+BidH2faw5tVlgKn8OPqVS/0LjEaHSw1vKB+m/ObG6c5FMhl0Nla VP/7HvHjZEwOYEmF9xpOAeqeeNNQLxBeqBawlZbwiMIv4SUQY4yY+zCbYRvJ8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707497398; a=rsa-sha256; cv=none; b=OWWaAGEfsgR3CsELuz5mCfyYjKp+ChSYIWKD+fUjX9WAljARtwOGLAWkmttrmwfBfhGNqu tYMLkGEXwurM9u7jf7DIoShQDB2C4D3VtqdNx5V2orGJ4JsO0xL/BnEgqT5Sf3dtSgLT2K K5C+9+bM+j2dgGiQhRQFYt1Mc9GrfS+DNdso+jitUq/zOWuQqg9iYbmnt3sTMasUvx7JsI iZOTLHD76gLOqeYd9uV0UWlFTlOSSkVK96egbllBDfZx3AP1oOGDkkj1ASWPWJinQA9sGr bvprstJQkK+TIhB1LE2U5/EvtBEdLVr1h6MNB5HLaaEN5aLMYFBQInI0doSyDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWfwQ22Pbzg4J; Fri, 9 Feb 2024 16:49: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 419GnwKe053144; Fri, 9 Feb 2024 16:49:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419GnwuF053141; Fri, 9 Feb 2024 16:49:58 GMT (envelope-from git) Date: Fri, 9 Feb 2024 16:49:58 GMT Message-Id: <202402091649.419GnwuF053141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: David Bright Subject: git: 70450ecd37fa - main - ntb: Add Intel Xeon Gen4 support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dab X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70450ecd37fa4ce06bd957195b00669dc3445e04 Auto-Submitted: auto-generated The branch main has been updated by dab: URL: https://cgit.FreeBSD.org/src/commit/?id=70450ecd37fa4ce06bd957195b00669dc3445e04 commit 70450ecd37fa4ce06bd957195b00669dc3445e04 Author: Austin Zhang AuthorDate: 2024-02-07 18:55:02 +0000 Commit: David Bright CommitDate: 2024-02-07 21:14:58 +0000 ntb: Add Intel Xeon Gen4 support The NTB hardware of XEON Ice lake and Sapphire Rapids has register mapping changes Add a new NTB_XEON_GEN4 device type and use it to conditionalize driver logic differs Reviewed by: vangyzen, dab Sponsored by: Dell Technologies Differential Revision: https://reviews.freebsd.org/D43291 --- sys/dev/ntb/ntb_hw/ntb_hw_intel.c | 462 +++++++++++++++++++++++++++++++++++--- sys/dev/ntb/ntb_hw/ntb_hw_intel.h | 115 ++++++++++ 2 files changed, 543 insertions(+), 34 deletions(-) diff --git a/sys/dev/ntb/ntb_hw/ntb_hw_intel.c b/sys/dev/ntb/ntb_hw/ntb_hw_intel.c index 5c07fb8d7e7d..d4852917085d 100644 --- a/sys/dev/ntb/ntb_hw/ntb_hw_intel.c +++ b/sys/dev/ntb/ntb_hw/ntb_hw_intel.c @@ -87,6 +87,7 @@ enum ntb_device_type { NTB_XEON_GEN1, NTB_XEON_GEN3, + NTB_XEON_GEN4, NTB_ATOM }; @@ -171,6 +172,7 @@ struct ntb_reg { struct ntb_alt_reg { uint32_t db_bell; uint32_t db_mask; + uint32_t db_clear; uint32_t spad; }; @@ -356,9 +358,12 @@ static struct ntb_hw_info *intel_ntb_get_device_info(uint32_t device_id); static void intel_ntb_detect_max_mw(struct ntb_softc *ntb); static int intel_ntb_detect_xeon(struct ntb_softc *ntb); static int intel_ntb_detect_xeon_gen3(struct ntb_softc *ntb); +static int intel_ntb_detect_xeon_gen4(struct ntb_softc *ntb); +static int intel_ntb_detect_xeon_gen4_cfg(struct ntb_softc *ntb); static int intel_ntb_detect_atom(struct ntb_softc *ntb); static int intel_ntb_xeon_init_dev(struct ntb_softc *ntb); static int intel_ntb_xeon_gen3_init_dev(struct ntb_softc *ntb); +static int intel_ntb_xeon_gen4_init_dev(struct ntb_softc *ntb); static int intel_ntb_atom_init_dev(struct ntb_softc *ntb); static void intel_ntb_teardown_xeon(struct ntb_softc *ntb); static void configure_atom_secondary_side_bars(struct ntb_softc *ntb); @@ -371,6 +376,7 @@ static void xeon_set_pbar_xlat(struct ntb_softc *, uint64_t base_addr, static int xeon_setup_b2b_mw(struct ntb_softc *, const struct ntb_b2b_addr *addr, const struct ntb_b2b_addr *peer_addr); static int xeon_gen3_setup_b2b_mw(struct ntb_softc *); +static int xeon_gen4_setup_b2b_mw(struct ntb_softc *); static int intel_ntb_mw_set_trans(device_t dev, unsigned idx, bus_addr_t addr, size_t size); static inline bool link_is_up(struct ntb_softc *ntb); @@ -482,12 +488,15 @@ SYSCTL_INT(_hw_ntb, OID_AUTO, b2b_mw_idx, CTLFLAG_RDTUN, &g_ntb_mw_idx, #define NTB_SDOORBELL_LOCKUP (1 << 1) #define NTB_SB01BASE_LOCKUP (1 << 2) #define NTB_B2BDOORBELL_BIT14 (1 << 3) +#define NTB_BAR_ALIGN (1 << 4) +#define NTB_LTR_BAD (1 << 5) /* Software/configuration owns the top 16 bits. */ #define NTB_SPLIT_BAR (1ull << 16) #define NTB_ONE_MSIX (1ull << 17) #define NTB_FEATURES_STR \ - "\20\21SPLIT_BAR4\04B2B_DOORBELL_BIT14\03SB01BASE_LOCKUP" \ + "\20\21SPLIT_BAR4\06LTR_BAD\05BAR_ALIGN" \ + "\04B2B_DOORBELL_BIT14\03SB01BASE_LOCKUP" \ "\02SDOORBELL_LOCKUP\01BAR_SIZE_4K" static struct ntb_hw_info pci_ids[] = { @@ -511,6 +520,9 @@ static struct ntb_hw_info pci_ids[] = { { 0x201C8086, "SKL Xeon E5 V5 Non-Transparent Bridge B2B", NTB_XEON_GEN3, 0 }, + + { 0x347e8086, "ICX/SPR Xeon Non-Transparent Bridge B2B", + NTB_XEON_GEN4, 0 }, }; static const struct ntb_reg atom_reg = { @@ -626,6 +638,32 @@ static const struct ntb_xlat_reg xeon_gen3_sec_xlat = { .bar4_xlat = XEON_GEN3_REG_IMBAR2XBASE, }; +static const struct ntb_reg xeon_gen4_reg = { + .ntb_ctl = XEON_GEN4_REG_IMNTB_CTL, + .lnk_sta = XEON_GEN4_REG_LINK_STATUS, /* mmio */ + .db_size = sizeof(uint32_t), + .mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2 }, +}; + +static const struct ntb_alt_reg xeon_gen4_pri_reg = { + .db_clear = XEON_GEN4_REG_IMINT_STATUS, + .db_mask = XEON_GEN4_REG_IMINT_DISABLE, + .spad = XEON_GEN4_REG_IMSPAD, +}; + +static const struct ntb_alt_reg xeon_gen4_b2b_reg = { + .db_bell = XEON_GEN4_REG_IMDOORBELL, + .spad = XEON_GEN4_REG_EMSPAD, +}; + +static const struct ntb_xlat_reg xeon_gen4_sec_xlat = { + .bar2_limit = XEON_GEN4_REG_IMBAR1XLIMIT, + .bar2_xlat = XEON_GEN4_REG_IMBAR1XBASE, + + .bar4_limit = XEON_GEN4_REG_IMBAR1XLIMIT, + .bar4_xlat = XEON_GEN4_REG_IMBAR2XBASE, +}; + SYSCTL_NODE(_hw_ntb, OID_AUTO, xeon_b2b, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "B2B MW segment overrides -- MUST be the same on both sides"); @@ -704,6 +742,8 @@ intel_ntb_attach(device_t device) error = intel_ntb_detect_atom(ntb); else if (ntb->type == NTB_XEON_GEN3) error = intel_ntb_detect_xeon_gen3(ntb); + else if (ntb->type == NTB_XEON_GEN4) + error = intel_ntb_detect_xeon_gen4(ntb); else error = intel_ntb_detect_xeon(ntb); if (error != 0) @@ -720,6 +760,8 @@ intel_ntb_attach(device_t device) error = intel_ntb_atom_init_dev(ntb); else if (ntb->type == NTB_XEON_GEN3) error = intel_ntb_xeon_gen3_init_dev(ntb); + else if (ntb->type == NTB_XEON_GEN4) + error = intel_ntb_xeon_gen4_init_dev(ntb); else error = intel_ntb_xeon_init_dev(ntb); if (error != 0) @@ -873,6 +915,10 @@ intel_ntb_map_pci_bars(struct ntb_softc *ntb) bar->psz_off = XEON_GEN3_INT_REG_IMBAR1SZ; bar->ssz_off = XEON_GEN3_INT_REG_EMBAR1SZ; bar->pbarxlat_off = XEON_GEN3_REG_EMBAR1XBASE; + } else if (ntb->type == NTB_XEON_GEN4) { + bar->psz_off = XEON_GEN4_CFG_REG_IMBAR1SZ; + bar->ssz_off = XEON_GEN4_CFG_REG_EMBAR1SZ; + bar->pbarxlat_off = XEON_GEN4_REG_EXT_BAR1BASE; } else { bar->psz_off = XEON_PBAR23SZ_OFFSET; bar->ssz_off = XEON_SBAR23SZ_OFFSET; @@ -888,6 +934,10 @@ intel_ntb_map_pci_bars(struct ntb_softc *ntb) bar->psz_off = XEON_GEN3_INT_REG_IMBAR2SZ; bar->ssz_off = XEON_GEN3_INT_REG_EMBAR2SZ; bar->pbarxlat_off = XEON_GEN3_REG_EMBAR2XBASE; + } else if (ntb->type == NTB_XEON_GEN4) { + bar->psz_off = XEON_GEN4_CFG_REG_IMBAR2SZ; + bar->ssz_off = XEON_GEN4_CFG_REG_EMBAR2SZ; + bar->pbarxlat_off = XEON_GEN4_REG_EXT_BAR2BASE; } else { bar->psz_off = XEON_PBAR4SZ_OFFSET; bar->ssz_off = XEON_SBAR4SZ_OFFSET; @@ -897,7 +947,8 @@ intel_ntb_map_pci_bars(struct ntb_softc *ntb) if (!HAS_FEATURE(ntb, NTB_SPLIT_BAR)) goto out; - if (ntb->type == NTB_XEON_GEN3) { + if (ntb->type == NTB_XEON_GEN3 || + ntb->type == NTB_XEON_GEN4) { device_printf(ntb->device, "no split bar support\n"); return (ENXIO); } @@ -1176,7 +1227,63 @@ intel_ntb_xeon_gen3_init_isr(struct ntb_softc *ntb) return (ENXIO); } - return (0); + return (rc); +} + +static int +intel_ntb_xeon_gen4_init_isr(struct ntb_softc *ntb) +{ + uint64_t i, reg; + uint32_t desired_vectors, num_vectors; + int rc; + + ntb->allocated_interrupts = 0; + ntb->last_ts = ticks; + + /* Mask all the interrupts, including hardware interrupt */ + intel_ntb_reg_write(8, XEON_GEN4_REG_IMINT_DISABLE, ~0ULL); + + /* Clear Interrupt Status */ + reg = intel_ntb_reg_read(8, XEON_GEN4_REG_IMINT_STATUS); + intel_ntb_reg_write(8, XEON_GEN4_REG_IMINT_STATUS, reg); + + num_vectors = desired_vectors = MIN(pci_msix_count(ntb->device), + XEON_GEN4_DB_MSIX_VECTOR_COUNT); + + rc = pci_alloc_msix(ntb->device, &num_vectors); + if (rc != 0) { + device_printf(ntb->device, + "Interrupt allocation failed %d\n", rc); + return (rc); + } + if (desired_vectors != num_vectors) { + device_printf(ntb->device, "Couldn't get %d vectors\n", + XEON_GEN4_DB_MSIX_VECTOR_COUNT); + return (ENXIO); + } + if (num_vectors != XEON_GEN4_DB_MSIX_VECTOR_COUNT) { + device_printf(ntb->device, + "Need to remap interrupts, giving up\n"); + return (ENXIO); + } + + /* + * The MSIX vectors and the interrupt status bits are not lined up + * on Gen3 (Skylake) and Gen4. By default the link status bit is bit + * 32, however it is by default MSIX vector0. We need to fixup to + * line them up. The vectors at reset is 1-32,0. We need to reprogram + * to 0-32. + */ + for (i = 0; i < XEON_GEN4_DB_MSIX_VECTOR_COUNT; i++) + intel_ntb_reg_write(1, XEON_GEN4_REG_INTVEC + i, i); + + intel_ntb_create_msix_vec(ntb, num_vectors); + rc = intel_ntb_setup_msix(ntb, num_vectors); + + /* enable all interrupts */ + intel_ntb_reg_write(8, XEON_GEN4_REG_IMINT_DISABLE, 0ULL); + + return (rc); } static int @@ -1304,6 +1411,7 @@ db_ioread(struct ntb_softc *ntb, uint64_t regoff) switch (ntb->type) { case NTB_ATOM: case NTB_XEON_GEN3: + case NTB_XEON_GEN4: return (intel_ntb_reg_read(8, regoff)); case NTB_XEON_GEN1: return (intel_ntb_reg_read(2, regoff)); @@ -1332,6 +1440,7 @@ db_iowrite_raw(struct ntb_softc *ntb, uint64_t regoff, uint64_t val) switch (ntb->type) { case NTB_ATOM: case NTB_XEON_GEN3: + case NTB_XEON_GEN4: intel_ntb_reg_write(8, regoff, val); break; case NTB_XEON_GEN1: @@ -1448,7 +1557,8 @@ intel_ntb_interrupt(struct ntb_softc *ntb, uint32_t vec) ntb->last_ts = ticks; vec_mask = intel_ntb_vec_mask(ntb, vec); - if (ntb->type == NTB_XEON_GEN3 && vec == XEON_GEN3_LINK_VECTOR_INDEX) + if ((ntb->type == NTB_XEON_GEN3 || ntb->type == NTB_XEON_GEN4) && + vec == XEON_GEN3_LINK_VECTOR_INDEX) vec_mask |= ntb->db_link_mask; if ((vec_mask & ntb->db_link_mask) != 0) { if (intel_ntb_poll_link(ntb)) @@ -1456,6 +1566,9 @@ intel_ntb_interrupt(struct ntb_softc *ntb, uint32_t vec) if (ntb->type == NTB_XEON_GEN3) intel_ntb_reg_write(8, XEON_GEN3_REG_IMINT_STATUS, intel_ntb_reg_read(8, XEON_GEN3_REG_IMINT_STATUS)); + if (ntb->type == NTB_XEON_GEN4) + intel_ntb_reg_write(8, XEON_GEN4_REG_IMINT_STATUS, + intel_ntb_reg_read(8, XEON_GEN4_REG_IMINT_STATUS)); } if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP) && @@ -1591,6 +1704,7 @@ intel_ntb_detect_max_mw(struct ntb_softc *ntb) ntb->mw_count = XEON_SNB_MW_COUNT; break; case NTB_XEON_GEN3: + case NTB_XEON_GEN4: if (HAS_FEATURE(ntb, NTB_SPLIT_BAR)) ntb->mw_count = XEON_GEN3_SPLIT_MW_COUNT; else @@ -1720,6 +1834,86 @@ intel_ntb_detect_xeon_gen3(struct ntb_softc *ntb) return (0); } +static int +intel_ntb_is_ICX(struct ntb_softc *ntb) +{ + uint8_t revision; + + revision = pci_get_revid(ntb->device); + if (ntb->type == NTB_XEON_GEN4 && + revision >= PCI_DEV_REV_ICX_MIN && + revision <= PCI_DEV_REV_ICX_MAX) + return (1); + + return (0); +} + +static int +intel_ntb_is_SPR(struct ntb_softc *ntb) +{ + uint8_t revision; + + revision = pci_get_revid(ntb->device); + if (ntb->type == NTB_XEON_GEN4 && + revision > PCI_DEV_REV_ICX_MAX) + return (1); + + return (0); +} + +static int +intel_ntb_detect_xeon_gen4(struct ntb_softc *ntb) +{ + if (intel_ntb_is_ICX(ntb)) { + ntb->features |= NTB_BAR_ALIGN; + ntb->features |= NTB_LTR_BAD; + } + return (0); +} + +static int +intel_ntb_detect_xeon_gen4_cfg(struct ntb_softc *ntb) +{ + uint32_t ppd1; + + ppd1 = intel_ntb_reg_read(4, XEON_GEN4_REG_PPD1); + ntb->ppd = ppd1; + if (intel_ntb_is_ICX(ntb)) { + if ((ppd1 & GEN4_PPD_TOPO_MASK) == GEN4_PPD_TOPO_B2B_USD) { + /* NTB Port is configured as USD/DSP */ + ntb->conn_type = NTB_CONN_B2B; + ntb->dev_type = NTB_DEV_USD; + } else if ((ppd1 & GEN4_PPD_TOPO_MASK) == GEN4_PPD_TOPO_B2B_DSD) { + /* NTB Port is configured as DSD/USP */ + ntb->conn_type = NTB_CONN_B2B; + ntb->dev_type = NTB_DEV_DSD; + } else { + device_printf(ntb->device, "Unsupported connection type: %u\n", + (ppd1 & GEN4_PPD_CONN_MASK)); + return (ENXIO); + } + } else if (intel_ntb_is_SPR(ntb)) { + if ((ppd1 & SPR_PPD_TOPO_MASK) == SPR_PPD_TOPO_B2B_USD) { + /* NTB Port is configured as USD/DSP */ + ntb->conn_type = NTB_CONN_B2B; + ntb->dev_type = NTB_DEV_USD; + } else if ((ppd1 & SPR_PPD_TOPO_MASK) == SPR_PPD_TOPO_B2B_DSD) { + /* NTB Port is configured as DSD/USP */ + ntb->conn_type = NTB_CONN_B2B; + ntb->dev_type = NTB_DEV_DSD; + } else { + device_printf(ntb->device, "Unsupported connection type: %u\n", + (ppd1 & SPR_PPD_CONN_MASK)); + return (ENXIO); + } + } + + device_printf(ntb->device, "conn type 0x%02x, dev type 0x%02x," + "features 0x%02x\n", ntb->conn_type, ntb->dev_type, ntb->features); + + return (0); +} + static int intel_ntb_xeon_init_dev(struct ntb_softc *ntb) { @@ -1840,6 +2034,39 @@ intel_ntb_xeon_gen3_init_dev(struct ntb_softc *ntb) return (rc); } +static int +intel_ntb_xeon_gen4_init_dev(struct ntb_softc *ntb) +{ + int rc; + uint16_t lnkctl; + + ntb->spad_count = XEON_GEN4_SPAD_COUNT; + ntb->db_count = XEON_GEN4_DB_COUNT; + ntb->db_link_mask = XEON_GEN4_DB_LINK_BIT; + ntb->db_vec_count = XEON_GEN4_DB_MSIX_VECTOR_COUNT; + ntb->db_vec_shift = XEON_GEN4_DB_MSIX_VECTOR_SHIFT; + + if (intel_ntb_detect_xeon_gen4_cfg(ntb) != 0) + return (ENXIO); + + ntb->reg = &xeon_gen4_reg; + ntb->self_reg = &xeon_gen4_pri_reg; + ntb->peer_reg = &xeon_gen4_b2b_reg; + ntb->xlat_reg = &xeon_gen4_sec_xlat; + + ntb->db_valid_mask = (1ULL << ntb->db_count) - 1; + xeon_gen4_setup_b2b_mw(ntb); + + /* init link setup */ + lnkctl = intel_ntb_reg_read(2, XEON_GEN4_REG_LINK_CTRL); + lnkctl |= GEN4_LINK_CTRL_LINK_DISABLE; + intel_ntb_reg_write(2, XEON_GEN4_REG_LINK_CTRL, lnkctl); + + /* Setup Interrupt */ + rc = intel_ntb_xeon_gen4_init_isr(ntb); + return (rc); +} + static int intel_ntb_atom_init_dev(struct ntb_softc *ntb) { @@ -2181,6 +2408,47 @@ xeon_gen3_setup_b2b_mw(struct ntb_softc *ntb) return (0); } +static int +xeon_gen4_setup_b2b_mw(struct ntb_softc *ntb) +{ + uint32_t embarsz, imbarsz; + + /* IMBAR23SZ should be equal to EMBAR23SZ */ + imbarsz = pci_read_config(ntb->device, XEON_GEN4_CFG_REG_IMBAR1SZ, 1); + embarsz = pci_read_config(ntb->device, XEON_GEN4_CFG_REG_EMBAR1SZ, 1); + if (embarsz != imbarsz) { + device_printf(ntb->device, + "IMBAR23SZ (%u) should be equal to EMBAR23SZ (%u)\n", + imbarsz, embarsz); + return (EIO); + } + /* IMBAR45SZ should be equal to EMBAR45SZ */ + imbarsz = pci_read_config(ntb->device, XEON_GEN4_CFG_REG_IMBAR2SZ, 1); + embarsz = pci_read_config(ntb->device, XEON_GEN4_CFG_REG_EMBAR2SZ, 1); + if (embarsz != imbarsz) { + device_printf(ntb->device, + "IMBAR45SZ (%u) should be equal to EMBAR45SZ (%u)\n", + imbarsz, embarsz); + return (EIO); + } + + /* Client will provide the incoming IMBARXBASE, zero it for now */ + intel_ntb_reg_write(8, XEON_GEN4_REG_IMBAR1XBASE, 0); + intel_ntb_reg_write(8, XEON_GEN4_REG_IMBAR2XBASE, 0); + + /* + * If the value in IMBARXLIMIT is set equal to the value in IMBARXBASE, + * the local memory window exposure from EMBAR is disabled. + * Note: It is needed to avoid malicious access. + */ + intel_ntb_reg_write(8, XEON_GEN4_REG_IMBAR1XLIMIT, 0); + intel_ntb_reg_write(8, XEON_GEN4_REG_IMBAR2XLIMIT, 0); + + /* EMBARXLIMIT & EMBARXBASE are gone for gen4, noop here */ + + return (0); +} + static inline bool _xeon_link_is_up(struct ntb_softc *ntb) { @@ -2194,7 +2462,9 @@ static inline bool link_is_up(struct ntb_softc *ntb) { - if (ntb->type == NTB_XEON_GEN1 || ntb->type == NTB_XEON_GEN3) + if (ntb->type == NTB_XEON_GEN1 || + ntb->type == NTB_XEON_GEN3 || + ntb->type == NTB_XEON_GEN4) return (_xeon_link_is_up(ntb) && (ntb->peer_msix_good || !HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP))); @@ -2326,6 +2596,52 @@ intel_ntb_peer_port_idx(device_t dev, int port) return (0); } +static int +intel_ntb4_link_enable(device_t dev, enum ntb_speed speed __unused, + enum ntb_width width __unused) +{ + struct ntb_softc *ntb = device_get_softc(dev); + uint32_t cntl, ppd0, ltr; + uint16_t lnkctl; + + if (!HAS_FEATURE(ntb, NTB_LTR_BAD)) { + /* Setup active snoop LTR values */ + ltr = NTB_LTR_ACTIVE_REQMNT | NTB_LTR_ACTIVE_VAL | NTB_LTR_ACTIVE_LATSCALE; + /* Setup active non-snoop values */ + ltr = (ltr << NTB_LTR_NS_SHIFT) | ltr; + intel_ntb_reg_write(4, XEON_GEN4_REG_EXT_LTR_ACTIVE, ltr); + + /* Setup idle snoop LTR values */ + ltr = NTB_LTR_IDLE_VAL | NTB_LTR_IDLE_LATSCALE | NTB_LTR_IDLE_REQMNT; + /* Setup idle non-snoop values */ + ltr = (ltr << NTB_LTR_NS_SHIFT) | ltr; + intel_ntb_reg_write(4, XEON_GEN4_REG_EXT_LTR_IDLE, ltr); + + /* setup PCIe LTR to active */ + intel_ntb_reg_write(4, XEON_GEN4_REG_EXT_LTR_SWSEL, NTB_LTR_SWSEL_ACTIVE); + } + + cntl = NTB_CTL_E2I_BAR23_SNOOP | NTB_CTL_I2E_BAR23_SNOOP; + cntl |= NTB_CTL_E2I_BAR45_SNOOP | NTB_CTL_I2E_BAR45_SNOOP; + intel_ntb_reg_write(4, ntb->reg->ntb_ctl, cntl); + + lnkctl = intel_ntb_reg_read(2, XEON_GEN4_REG_LINK_CTRL); + lnkctl &= ~GEN4_LINK_CTRL_LINK_DISABLE; + intel_ntb_reg_write(2, XEON_GEN4_REG_LINK_CTRL, lnkctl); + + /* start link training in PPD0 */ + ppd0 = intel_ntb_reg_read(4, XEON_GEN4_REG_PPD0); + ppd0 |= GEN4_PPD_LINKTRN; + intel_ntb_reg_write(4, XEON_GEN4_REG_PPD0, ppd0); + + /* make sure link training has started */ + ppd0 = intel_ntb_reg_read(4, XEON_GEN4_REG_PPD0); + if (!(ppd0 & GEN4_PPD_LINKTRN)) + intel_ntb_printf(2, "Link is not training\n"); + + return (0); +} + static int intel_ntb_link_enable(device_t dev, enum ntb_speed speed __unused, enum ntb_width width __unused) @@ -2335,6 +2651,9 @@ intel_ntb_link_enable(device_t dev, enum ntb_speed speed __unused, intel_ntb_printf(2, "%s\n", __func__); + if (ntb->type == NTB_XEON_GEN4) + return (intel_ntb4_link_enable(dev, speed, width)); + if (ntb->type == NTB_ATOM) { pci_write_config(ntb->device, NTB_PPD_OFFSET, ntb->ppd | ATOM_PPD_INIT_LINK, 4); @@ -2356,6 +2675,30 @@ intel_ntb_link_enable(device_t dev, enum ntb_speed speed __unused, return (0); } +static int +intel_ntb4_link_disable(device_t dev) +{ + struct ntb_softc *ntb = device_get_softc(dev); + uint32_t cntl; + uint16_t lnkctl; + + /* clear the snoop bits */ + cntl = intel_ntb_reg_read(4, ntb->reg->ntb_ctl); + cntl &= ~(NTB_CTL_E2I_BAR23_SNOOP | NTB_CTL_I2E_BAR23_SNOOP); + cntl &= ~(NTB_CTL_E2I_BAR45_SNOOP | NTB_CTL_I2E_BAR45_SNOOP); + intel_ntb_reg_write(4, ntb->reg->ntb_ctl, cntl); + + lnkctl = intel_ntb_reg_read(2, XEON_GEN4_REG_LINK_CTRL); + lnkctl |= GEN4_LINK_CTRL_LINK_DISABLE; + intel_ntb_reg_write(2, XEON_GEN4_REG_LINK_CTRL, lnkctl); + + /* set LTR to idle */ + if (!HAS_FEATURE(ntb, NTB_LTR_BAD)) + intel_ntb_reg_write(4, XEON_GEN4_REG_EXT_LTR_SWSEL, NTB_LTR_SWSEL_IDLE); + + return (0); +} + static int intel_ntb_link_disable(device_t dev) { @@ -2364,6 +2707,9 @@ intel_ntb_link_disable(device_t dev) intel_ntb_printf(2, "%s\n", __func__); + if (ntb->type == NTB_XEON_GEN4) + return (intel_ntb4_link_disable(dev)); + if (ntb->conn_type == NTB_CONN_TRANSPARENT) { ntb_link_event(dev); return (0); @@ -2393,6 +2739,11 @@ intel_ntb_link_enabled(device_t dev) if (ntb->conn_type == NTB_CONN_TRANSPARENT) return (true); + if (ntb->type == NTB_XEON_GEN4) { + cntl = intel_ntb_reg_read(2, XEON_GEN4_REG_LINK_CTRL); + return ((cntl & GEN4_LINK_CTRL_LINK_DISABLE) == 0); + } + cntl = intel_ntb_reg_read(4, ntb->reg->ntb_ctl); return ((cntl & NTB_CNTL_LINK_DISABLE) == 0); } @@ -2445,45 +2796,88 @@ retry: * Polls the HW link status register(s); returns true if something has changed. */ static bool -intel_ntb_poll_link(struct ntb_softc *ntb) +intel_ntb_atom_poll_link(struct ntb_softc *ntb) { uint32_t ntb_cntl; - uint16_t reg_val; - if (ntb->type == NTB_ATOM) { - ntb_cntl = intel_ntb_reg_read(4, ntb->reg->ntb_ctl); - if (ntb_cntl == ntb->ntb_ctl) - return (false); + ntb_cntl = intel_ntb_reg_read(4, ntb->reg->ntb_ctl); + if (ntb_cntl == ntb->ntb_ctl) + return (false); - ntb->ntb_ctl = ntb_cntl; - ntb->lnk_sta = intel_ntb_reg_read(4, ntb->reg->lnk_sta); - } else { - if (ntb->type == NTB_XEON_GEN1) - db_iowrite_raw(ntb, ntb->self_reg->db_bell, - ntb->db_link_mask); + ntb->ntb_ctl = ntb_cntl; + ntb->lnk_sta = intel_ntb_reg_read(4, ntb->reg->lnk_sta); + return (true); +} + +static bool +intel_ntb_xeon_gen1_poll_link(struct ntb_softc *ntb) +{ + uint16_t reg_val; - reg_val = pci_read_config(ntb->device, ntb->reg->lnk_sta, 2); - if (reg_val == ntb->lnk_sta) - return (false); + if (ntb->type == NTB_XEON_GEN1) + db_iowrite_raw(ntb, ntb->self_reg->db_bell, + ntb->db_link_mask); - ntb->lnk_sta = reg_val; + reg_val = pci_read_config(ntb->device, ntb->reg->lnk_sta, 2); + if (reg_val == ntb->lnk_sta) + return (false); - if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) { - if (_xeon_link_is_up(ntb)) { - if (!ntb->peer_msix_good) { - callout_reset(&ntb->peer_msix_work, 0, - intel_ntb_exchange_msix, ntb); - return (false); - } - } else { - ntb->peer_msix_good = false; - ntb->peer_msix_done = false; + ntb->lnk_sta = reg_val; + + if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP)) { + if (_xeon_link_is_up(ntb)) { + if (!ntb->peer_msix_good) { + callout_reset(&ntb->peer_msix_work, 0, + intel_ntb_exchange_msix, ntb); + return (false); } + } else { + ntb->peer_msix_good = false; + ntb->peer_msix_done = false; } } return (true); } +static bool +intel_ntb_xeon_gen4_poll_link(struct ntb_softc *ntb) +{ + uint16_t reg_val; + + /* + * We need to write to DLLSCS bit in the SLOTSTS before we + * can clear the hardware link interrupt on ICX NTB. + */ + intel_ntb_reg_write(2, XEON_GEN4_REG_SLOTSTS, GEN4_SLOTSTS_DLLSCS); + db_iowrite_raw(ntb, ntb->self_reg->db_clear, ntb->db_link_mask); + + reg_val = intel_ntb_reg_read(2, ntb->reg->lnk_sta); + if (reg_val == ntb->lnk_sta) + return (false); + + ntb->lnk_sta = reg_val; + return (true); +} + +static bool +intel_ntb_poll_link(struct ntb_softc *ntb) +{ + bool val; + + switch(ntb->type) { + case NTB_ATOM: + val = intel_ntb_atom_poll_link(ntb); + break; + case NTB_XEON_GEN4: + val = intel_ntb_xeon_gen4_poll_link(ntb); + break; + default: + val = intel_ntb_xeon_gen1_poll_link(ntb); + break; + } + return (val); +} + static inline enum ntb_speed intel_ntb_link_sta_speed(struct ntb_softc *ntb) { @@ -3231,7 +3625,7 @@ intel_ntb_mw_set_trans(device_t dev, unsigned idx, bus_addr_t addr, size_t size) limit = 0; if (bar_is_64bit(ntb, bar_num)) { - if (ntb->type == NTB_XEON_GEN3) + if (ntb->type == NTB_XEON_GEN3 || ntb->type == NTB_XEON_GEN4) base = addr; else base = intel_ntb_reg_read(8, base_reg) & BAR_HIGH_MASK; @@ -3259,7 +3653,7 @@ intel_ntb_mw_set_trans(device_t dev, unsigned idx, bus_addr_t addr, size_t size) } } else { /* Configure 32-bit (split) BAR MW */ - if (ntb->type == NTB_XEON_GEN3) + if (ntb->type == NTB_XEON_GEN3 || ntb->type == NTB_XEON_GEN4) return (EIO); if ((addr & UINT32_MAX) != addr) @@ -3376,7 +3770,7 @@ intel_ntb_peer_db_set(device_t dev, uint64_t bits) return; } - if (ntb->type == NTB_XEON_GEN3) { + if (ntb->type == NTB_XEON_GEN3 || ntb->type == NTB_XEON_GEN4) { while (bits != 0) { db = ffsll(bits); diff --git a/sys/dev/ntb/ntb_hw/ntb_hw_intel.h b/sys/dev/ntb/ntb_hw/ntb_hw_intel.h index c861b77743e3..9f9cadaa4d47 100644 --- a/sys/dev/ntb/ntb_hw/ntb_hw_intel.h +++ b/sys/dev/ntb/ntb_hw/ntb_hw_intel.h @@ -250,4 +250,119 @@ #define XEON_GEN3_REG_PPD_ONE_MSIX_F(X) M8_F(X, 5, 1) #define XEON_GEN3_REG_PPD_BAR45_SPL_F(X) M8_F(X, 6, 1) +/* Xeon ICX/SPR NTB register definitions */ + +/* CFG Space */ +#define XEON_GEN4_CFG_REG_BAR0BASE 0x0010 +#define XEON_GEN4_CFG_REG_BAR1BASE 0x0018 +#define XEON_GEN4_CFG_REG_BAR2BASE 0x0020 +#define XEON_GEN4_CFG_REG_IMBAR1SZ 0x00c4 +#define XEON_GEN4_CFG_REG_IMBAR2SZ 0x00c5 +#define XEON_GEN4_CFG_REG_EMBAR1SZ 0x00c6 +#define XEON_GEN4_CFG_REG_EMBAR2SZ 0x00c7 +#define XEON_GEN4_CFG_REG_DEVCTRL 0x0048 +#define XEON_GEN4_CFG_REG_DEVSTS 0x004a +#define XEON_GEN4_CFG_REG_UNCERRSTS 0x0104 +#define XEON_GEN4_CFG_REG_CORERRSTS 0x0110 + +/* BAR0 MMIO */ +#define XEON_GEN4_REG_IMNTB_CTL 0x0000 +#define XEON_GEN4_REG_IMBAR1XBASE 0x0010 +#define XEON_GEN4_REG_IMBAR1XLIMIT 0x0018 +#define XEON_GEN4_REG_IMBAR2XBASE 0x0020 +#define XEON_GEN4_REG_IMBAR2XLIMIT 0x0028 +#define XEON_GEN4_REG_IMINT_STATUS 0x0040 +#define XEON_GEN4_REG_IMINT_DISABLE 0x0048 +#define XEON_GEN4_REG_INTVEC 0x0050 /* 0-32 vecs */ +#define XEON_GEN4_REG_IMSPAD 0x0080 /* 0-15 SPADs */ +#define XEON_GEN4_REG_IMDOORBELL 0x0100 /* 0-31 doorbells */ + +/* + * External EndPoint Configuration Registers + * These are located within BAR0 of the internal endpoint. + */ +#define XEON_GEN4_REG_EXT_BAR1BASE 0x3018 +#define XEON_GEN4_REG_EXT_BAR2BASE 0x3020 +#define XEON_GEN4_REG_EXT_LTR_SWSEL 0x30ec +#define XEON_GEN4_REG_EXT_LTR_ACTIVE 0x30f0 +#define XEON_GEN4_REG_EXT_LTR_IDLE 0x30f4 + +#define XEON_GEN4_REG_EMSPAD 0x8080 /* 32K + SPAD_offset */ + +/* note, link status is now in MMIO and not config space for NTB */ +#define XEON_GEN4_REG_LINK_CTRL 0xb050 +#define XEON_GEN4_REG_LINK_STATUS 0xb052 +#define XEON_GEN4_REG_SLOTSTS 0xb05a +#define XEON_GEN4_REG_PPD0 0xb0d4 +#define XEON_GEN4_REG_PPD1 0xb4c0 +#define XEON_GEN4_REG_LTSSMSTATEJMP 0xf040 + +/* Supported PCI device revision range for ICX */ +#define PCI_DEV_REV_ICX_MIN 0x2 +#define PCI_DEV_REV_ICX_MAX 0xF + +#define XEON_GEN4_DB_COUNT 32 +#define XEON_GEN4_DB_LINK 32 +#define XEON_GEN4_DB_LINK_BIT (1ULL << XEON_GEN4_DB_LINK) +#define XEON_GEN4_DB_MSIX_VECTOR_COUNT 33 +#define XEON_GEN4_DB_MSIX_VECTOR_SHIFT 1 +#define XEON_GEN4_DB_TOTAL_SHIFT 33 +#define XEON_GEN4_SPAD_COUNT 16 + +/* NTBCTL field */ +#define NTB_CTL_E2I_BAR23_SNOOP 0x000004 +#define NTB_CTL_E2I_BAR23_NOSNOOP 0x000008 +#define NTB_CTL_I2E_BAR23_SNOOP 0x000010 +#define NTB_CTL_I2E_BAR23_NOSNOOP 0x000020 +#define NTB_CTL_E2I_BAR45_SNOOP 0x000040 +#define NTB_CTL_E2I_BAR45_NOSNOO 0x000080 +#define NTB_CTL_I2E_BAR45_SNOOP 0x000100 +#define NTB_CTL_I2E_BAR45_NOSNOOP 0x000200 +#define NTB_CTL_BUSNO_DIS_INC 0x000400 +#define NTB_CTL_LINK_DOWN 0x010000 + +#define NTB_SJC_FORCEDETECT 0x000004 + +/* PPD field */ +#define GEN4_PPD_CLEAR_TRN 0x0001 +#define GEN4_PPD_LINKTRN 0x0008 +#define GEN4_PPD_CONN_MASK 0x0300 +#define SPR_PPD_CONN_MASK 0x0700 +#define GEN4_PPD_CONN_B2B 0x0200 +#define GEN4_PPD_DEV_MASK 0x1000 +#define GEN4_PPD_DEV_DSD 0x1000 +#define GEN4_PPD_DEV_USD 0x0000 +#define SPR_PPD_DEV_MASK 0x4000 +#define SPR_PPD_DEV_DSD 0x4000 +#define SPR_PPD_DEV_USD 0x0000 + +#define GEN4_LINK_CTRL_LINK_DISABLE 0x0010 +#define GEN4_SLOTSTS_DLLSCS 0x100 + +#define GEN4_PPD_TOPO_MASK \ + (GEN4_PPD_CONN_MASK | GEN4_PPD_DEV_MASK) +#define GEN4_PPD_TOPO_B2B_USD \ + (GEN4_PPD_CONN_B2B | GEN4_PPD_DEV_USD) +#define GEN4_PPD_TOPO_B2B_DSD \ + (GEN4_PPD_CONN_B2B | GEN4_PPD_DEV_DSD) + +#define SPR_PPD_TOPO_MASK \ + (SPR_PPD_CONN_MASK | SPR_PPD_DEV_MASK) +#define SPR_PPD_TOPO_B2B_USD \ + (GEN4_PPD_CONN_B2B | SPR_PPD_DEV_USD) +#define SPR_PPD_TOPO_B2B_DSD \ + (GEN4_PPD_CONN_B2B | SPR_PPD_DEV_DSD) + +/* LTR field */ +#define NTB_LTR_SWSEL_ACTIVE 0x0 +#define NTB_LTR_SWSEL_IDLE 0x1 + +#define NTB_LTR_NS_SHIFT 16 +#define NTB_LTR_ACTIVE_VAL 0x0000 /* 0 us */ +#define NTB_LTR_ACTIVE_LATSCALE 0x0800 /* 1us scale */ +#define NTB_LTR_ACTIVE_REQMNT 0x8000 /* snoop req enable */ + +#define NTB_LTR_IDLE_VAL 0x0258 /* 600 us */ +#define NTB_LTR_IDLE_LATSCALE 0x0800 /* 1us scale */ +#define NTB_LTR_IDLE_REQMNT 0x8000 /* snoop req enable */ #endif /* _NTB_REGS_H_ */ From nobody Fri Feb 9 17:17:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWgX91TtGz5B24Z; Fri, 9 Feb 2024 17:17: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 4TWgX91Fjqz4Tvm; Fri, 9 Feb 2024 17:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707499049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Jq6ZP9QkmjUZ5FHMbZzE1LkT4kGrucm93TDTf3Q2hI=; b=oC/46PZh08vRysmvGAsF8Fx2eNfwZnXec9RrhzoQix04KhP8JY2Bp2SDRgfm11qlt1Tk+a GCK9hhaixxQll29Y7vJL6GGyHfgdc8z7nmQnSs8zkzIXbo9X227TUwwxq8LGoMAMxtiI5m fLFOW+LMCQ6xLh6AaKT4B+zBHuTbIzET9TgVmp8pqhNFeKj/0aMMT8mV6bSpjGIkBPcHNP mao9jCb6mijFTl/eF8No85moiycdindW1lBUiHngXEapkyeC7bpRh4oNPH31ZTdhhMVkmV shRK9SUzw3EYuB/JCTbwqobdnXipRlUEkO8QBZj91iv1paWrq4/Bh1xkhQMSGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707499049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Jq6ZP9QkmjUZ5FHMbZzE1LkT4kGrucm93TDTf3Q2hI=; b=JbXSsaem4W8+7QZJJZMtLGSVcvSJBUWrYeA32TAabEvJArsBvDGKcthAR60bfgLh+xPO1I /FlixIXLtCCWM9n8vaae1U/o0jH+Zi8XaWiwoiHEFp4BHwWz6KL8+13hX2FjINmEuczDL3 6CZVAnA3dbZYxP1I97hcosBCKuYa1qeNXScsFZw3eZqMinRTIOErj73FBMIwcTL9vKtsUm Hw9e2GOg7LhMV/wE2x4cBh59AuG1owVLow8g+RbfQSQMPVaJhQNriGy4gkkxWwk/oHOguq iAfzoHpGluWTwP2UVsOVp0XSwGLaHhRrpfMlPIz1c25ZKc3Z2z5u4TOyZnsj1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707499049; a=rsa-sha256; cv=none; b=Ev04QZu2AP9Vv+gxW/H4b+wtpLdQOeD2ud7w0M2yNkzzdptndk86sdRNP31B7p8pPDlekh EMf6QwbS+RLYewknBaJauZGOc8/QpNhfiq11kNReRiyBxqFC7sqYyvDCneonlcRjRN6Q7e C/zgHbj01HSQO069rZpxFOU7p2JBluGdgTBKlZ3PXNoDfpEaCCB7ES4rMRfzhvRXmwYnUp WaHDh8H5L7TbduIi8plLUnN9N6CaPqkvnRLMFTTd3iXCSQTJkJE1EJYlF1AttwLlej67UB 4vCIcGAMmsvPNEfWqaJjxGU9CSzDI8SElX6LbNNv6huKCwPJgZOG1F60HgI2Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWgX90B6czhbn; Fri, 9 Feb 2024 17:17: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 419HHSNo003263; Fri, 9 Feb 2024 17:17:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419HHS2K003260; Fri, 9 Feb 2024 17:17:28 GMT (envelope-from git) Date: Fri, 9 Feb 2024 17:17:28 GMT Message-Id: <202402091717.419HHS2K003260@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: aa3b7a2fbc46 - main - /etc/rc add trace debug and verify List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa3b7a2fbc4687c0a09b6166aa2c2d117989d8fa Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=aa3b7a2fbc4687c0a09b6166aa2c2d117989d8fa commit aa3b7a2fbc4687c0a09b6166aa2c2d117989d8fa Author: Simon J. Gerraty AuthorDate: 2024-02-09 17:15:58 +0000 Commit: Simon J. Gerraty CommitDate: 2024-02-09 17:15:58 +0000 /etc/rc add trace debug and verify Debugging boot issues can be helped by logging each rc.d script as it is run and being able to selectively enable/disable set -x debug.sh provides an elaborate framework for debugging shell scripts. For secure systems, we want to be paranoid about what we read during boot. dot() simply reads (.) arg file if it exists vdot() if mac_veriexec is active, ignore unverified files otherwise behaves much the same as dot() safe_dot() in safe_eval.sh allows reading an untrusted file; limiting the input to simple variable assignments. In load_rc_config allow caller to provide an option to indicate how to handle its arg: -v use vdot() -s use sdot() which will try to use vdot() and fallback to safe_dot() The default is to read using dot() rc_run_scripts() encapsulate the running of rc.d scripts so that we can easily call it more than twice. We vdot local.rc.subr to pick up extensions (like run_rc_scripts_final) and overrides. We also allow rc.subr.local or rc.conf to set rc_config_xtra eg (rc_config_xtra=XXX for historic compatibility) rc use set -o verify around the reading in of rc.subr This has no effect if mac_veriexec is not active, but if it is; ensures rc.subr has not been tampered with. Reviewed by: imp Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43671 --- libexec/rc/Makefile | 6 + libexec/rc/debug.sh | 278 ++++++++++++++++++++++++++++++++++++++++++++++ libexec/rc/rc | 28 ++--- libexec/rc/rc.subr | 233 +++++++++++++++++++++++++++++++++++++- libexec/rc/safe_eval.sh | 66 +++++++++++ share/man/man8/Makefile | 1 + share/man/man8/debug.sh.8 | 182 ++++++++++++++++++++++++++++++ share/man/man8/rc.8 | 18 ++- share/man/man8/rc.subr.8 | 220 +++++++++++++++++++++++++++++++++++- 9 files changed, 1001 insertions(+), 31 deletions(-) diff --git a/libexec/rc/Makefile b/libexec/rc/Makefile index 8e42c12e1163..48115d873fe3 100644 --- a/libexec/rc/Makefile +++ b/libexec/rc/Makefile @@ -18,6 +18,12 @@ CONFETCDEFAULTSDIR= /etc/defaults CONFETCDEFAULTS= rc.conf CONFETCDEFAULTSPACKAGE= rc +FILESGROUPS= LIBEXEC_SCRIPTS +LIBEXEC_SCRIPTS= debug.sh safe_eval.sh +LIBEXEC_SCRIPTSDIR= /libexec +LIBEXEC_SCRIPTSMODE= 755 +LIBEXEC_SCRIPTSPACKAGE= rc + SUBDIR+= rc.d HAS_TESTS= diff --git a/libexec/rc/debug.sh b/libexec/rc/debug.sh new file mode 100755 index 000000000000..7bbb500e2d22 --- /dev/null +++ b/libexec/rc/debug.sh @@ -0,0 +1,278 @@ +: +# SPDX-License-Identifier: BSD-2-Clause + +# NAME: +# debug.sh - selectively debug scripts +# +# SYNOPSIS: +# $_DEBUG_SH . debug.sh +# DebugOn [-eo] "tag" ... +# DebugOff [-eo] [rc="rc"] "tag" ... +# Debugging +# DebugEcho ... +# DebugLog ... +# DebugShell "tag" ... +# DebugTrace ... +# Debug "tag" ... +# +# $DEBUG_SKIP echo skipped when Debug "tag" is true. +# $DEBUG_DO echo only done when Debug "tag" is true. +# +# DESCRIPTION: +# debug.sh provides the following functions to facilitate +# flexible run-time tracing of complicated shell scripts. +# +# DebugOn turns tracing on if any "tag" is found in "DEBUG_SH". +# It turns tracing off if "!tag" is found in "DEBUG_SH". +# It also sets "DEBUG_ON" to the "tag" that caused tracing to be +# enabled, or "DEBUG_OFF" if we matched "!tag". +# If '-e' option given returns 1 if no "tag" matched. +# If the '-o' flag is given, tracing is turned off unless there +# was a matched "tag", useful for functions too noisy to tace. +# +# DebugOff turns tracing on if any "tag" matches "DEBUG_OFF" or +# off if any "tag" matches "DEBUG_ON". This allows nested +# functions to not interfere with each other. +# +# DebugOff accepts but ignores the '-e' and '-o' options. +# The optional "rc" value will be returned rather than the +# default of 0. Thus if DebugOff is the last operation in a +# function, "rc" will be the return code of that function. +# +# DebugEcho is just shorthand for: +#.nf +# $DEBUG_DO echo "$@" +#.fi +# +# Debugging returns true if tracing is enabled. +# It is useful for bounding complex debug actions, rather than +# using lots of "DEBUG_DO" lines. +# +# DebugShell runs an interactive shell if any "tag" is found in +# "DEBUG_INTERACTIVE", and there is a tty available. +# The shell used is defined by "DEBUG_SHELL" or "SHELL" and +# defaults to '/bin/sh'. +# +# Debug calls DebugOn and if that does not turn tracing on, it +# calls DebugOff to turn it off. +# +# The variables "DEBUG_SKIP" and "DEBUG_DO" are set so as to +# enable/disable code that should be skipped/run when debugging +# is turned on. "DEBUGGING" is the same as "DEBUG_SKIP" for +# backwards compatability. +# +# The use of $_DEBUG_SH is to prevent multiple inclusion, though +# it does no harm in this case. +# +# BUGS: +# Does not work with some versions of ksh. +# If a function turns tracing on, ksh turns it off when the +# function returns - useless. +# PD ksh works ok ;-) +# +# AUTHOR: +# Simon J. Gerraty + +# RCSid: +# $Id: debug.sh,v 1.35 2024/02/03 19:04:47 sjg Exp $ +# +# @(#) Copyright (c) 1994-2024 Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# + +_DEBUG_SH=: + +Myname=${Myname:-`basename $0 .sh`} + +DEBUGGING= +DEBUG_DO=: +DEBUG_SKIP= +export DEBUGGING DEBUG_DO DEBUG_SKIP + +_debugOn() { + DEBUG_OFF= + DEBUG_DO= + DEBUG_SKIP=: + DEBUG_X=-x + set -x + DEBUG_ON=$1 +} + +_debugOff() { + DEBUG_OFF=$1 + set +x + DEBUG_ON=$2 + DEBUG_DO=: + DEBUG_SKIP= + DEBUG_X= +} + +DebugEcho() { + $DEBUG_DO echo "$@" +} + +Debugging() { + test "$DEBUG_SKIP" +} + +DebugLog() { + $DEBUG_SKIP return 0 + echo `date '+@ %s [%Y-%m-%d %H:%M:%S %Z]'` "$@" +} + +# something hard to miss when wading through huge -x output +DebugTrace() { + $DEBUG_SKIP return 0 + set +x + echo "@ ==================== [ $DEBUG_ON ] ====================" + DebugLog "$@" + echo "@ ==================== [ $DEBUG_ON ] ====================" + set -x +} + +# Turn on debugging if appropriate +DebugOn() { + _rc=0 # avoid problems with set -e + _off=: + while : + do + case "$1" in + -e) _rc=1; shift;; # caller ok with return 1 + -o) _off=; shift;; # off unless we have a match + *) break;; + esac + done + case ",${DEBUG_SH:-$DEBUG}," in + ,,) return $_rc;; + *,[Dd]ebug,*) ;; + *) $DEBUG_DO set +x;; # reduce the noise + esac + _match= + # if debugging is off because of a !e + # don't add 'all' to the On list. + case "$_off$DEBUG_OFF" in + :) _e=all;; + *) _e=;; + esac + for _e in ${*:-$Myname} $_e + do + : $_e in ,${DEBUG_SH:-$DEBUG}, + case ",${DEBUG_SH:-$DEBUG}," in + *,!$_e,*|*,!$Myname:$_e,*) + # only turn it off if it was on + _rc=0 + $DEBUG_DO _debugOff $_e $DEBUG_ON + break + ;; + *,$_e,*|*,$Myname:$_e,*) + # only turn it on if it was off + _rc=0 + _match=$_e + $DEBUG_SKIP _debugOn $_e + break + ;; + esac + done + if test -z "$_off$_match"; then + # off unless explicit match, but + # only turn it off if it was on + $DEBUG_DO _debugOff $_e $DEBUG_ON + fi + DEBUGGING=$DEBUG_SKIP # backwards compatability + $DEBUG_DO set -x # back on if needed + $DEBUG_DO set -x # make sure we see it in trace + return $_rc +} + +# Only turn debugging off if one of our args was the reason it +# was turned on. +# We normally return 0, but caller can pass rc=$? as first arg +# so that we preserve the status of last statement. +DebugOff() { + case ",${DEBUG_SH:-$DEBUG}," in + *,[Dd]ebug,*) ;; + *) $DEBUG_DO set +x;; # reduce the noise + esac + _rc=0 # always happy + while : + do + case "$1" in + -[eo]) shift;; # ignore it + rc=*) eval "_$1"; shift;; + *) break;; + esac + done + for _e in $* + do + : $_e==$DEBUG_OFF DEBUG_OFF + case "$DEBUG_OFF" in + "") break;; + $_e) _debugOn $DEBUG_ON; return $_rc;; + esac + done + for _e in $* + do + : $_e==$DEBUG_ON DEBUG_ON + case "$DEBUG_ON" in + "") break;; + $_e) _debugOff; return $_rc;; + esac + done + DEBUGGING=$DEBUG_SKIP # backwards compatability + $DEBUG_DO set -x # back on if needed + $DEBUG_DO set -x # make sure we see it in trace + return $_rc +} + +_TTY=${_TTY:-`test -t 0 && tty`}; export _TTY + +# override this if you like +_debugShell() { + { + echo DebugShell "$@" + echo "Type 'exit' to continue..." + } > $_TTY + ${DEBUG_SHELL:-${SHELL:-/bin/sh}} < $_TTY > $_TTY 2>&1 +} + +# Run an interactive shell if appropriate +# Note: you can use $DEBUG_SKIP DebugShell ... to skip unless debugOn +DebugShell() { + case "$_TTY%${DEBUG_INTERACTIVE}" in + *%|%*) return 0;; # no tty or no spec + esac + for _e in ${*:-$Myname} all + do + case ",${DEBUG_INTERACTIVE}," in + *,!$_e,*|*,!$Myname:$_e,*) + return 0 + ;; + *,$_e,*|*,$Myname:$_e,*) + # Provide clues as to why/where + _debugShell "$_e: $@" + return $? + ;; + esac + done + return 0 +} + +# For backwards compatability +Debug() { + case "${DEBUG_SH:-$DEBUG}" in + "") ;; + *) DEBUG_ON=${DEBUG_ON:-_Debug} + DebugOn -e $* || DebugOff $DEBUG_LAST + DEBUGGING=$DEBUG_SKIP + ;; + esac +} diff --git a/libexec/rc/rc b/libexec/rc/rc index 0ea61a4b2c0a..b23b0f35f263 100644 --- a/libexec/rc/rc +++ b/libexec/rc/rc @@ -66,8 +66,11 @@ fi # to minimize the number of files that are needed on a diskless system, # and to make the configuration file variables available to rc itself. # +# -o verify has no effect if mac_veriexec is not active +set -o verify . /etc/rc.subr -load_rc_config +set +o verify +load_rc_config $rc_config_xtra # If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d # scripts to perform "boot-time configuration" including enabling and @@ -93,16 +96,7 @@ fi unset system_rc find_system_scripts files=`rcorder ${skip} ${skip_firstboot} ${system_rc} 2>/dev/null` - -_rc_elem_done=' ' -for _rc_elem in ${files}; do - run_rc_script ${_rc_elem} ${_boot} - _rc_elem_done="${_rc_elem_done}${_rc_elem} " - - case "$_rc_elem" in - */${early_late_divider}) break ;; - esac -done +run_rc_scripts --break ${early_late_divider} ${rc_early_flags} $files unset files local_rc system_rc @@ -122,13 +116,13 @@ fi find_system_scripts files=`rcorder ${skip} ${skip_firstboot} ${system_rc} ${local_rc} 2>/dev/null` -for _rc_elem in ${files}; do - case "$_rc_elem_done" in - *" $_rc_elem "*) continue ;; - esac +run_rc_scripts ${rc_late_flags} $files +unset files local_rc system_rc - run_rc_script ${_rc_elem} ${_boot} -done +# allow for more complicated setups +if have run_rc_scripts_final; then + run_rc_scripts_final +fi # Remove the firstboot sentinel, and reboot if it was requested. # Be a bit paranoid about removing it to handle the common failure diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 8cf812b06d45..19955fa83fbd 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -66,6 +66,122 @@ rc_service="$0" # functions # --------- +# is_verified file +# if VERIEXEC is active check that $file is verified +# +VERIEXEC="/sbin/veriexec" +if test -x $VERIEXEC && $VERIEXEC -i active > /dev/null 2>&1; then + is_verified() { $VERIEXEC -x $1; } +else + is_verified() { return 0; } +fi + +# indicate that we have vdot +_VDOT_SH=: + +# current state of O_VERIFY +o_verify() +{ + set -o | sed -n '/^verify/s,.*[[:space:]],,p' +} + +## +# o_verify_set want [save] +# +# record current state of verify in $save +# and set it to $want if different +# +o_verify_set() { + local x=$(o_verify) + + [ -z "$x" ] && return 0 + [ -z "$2" ] || eval $2=$x + [ "$x" = "$1" ] && return 0 + case "$1" in + on) + set -o verify + ;; + off) + set +o verify + ;; + esac +} + +# for unverified files +dotted= +dot() +{ + local f verify + + o_verify_set off verify + for f in "$@"; do + if [ -f $f -a -s $f ]; then + dotted="$dotted $f" + . $f + fi + done + o_verify_set $verify +} + +# try for verified, fallback to safe +sdot() +{ + local f + + for f in "$@"; do + [ -f $f -a -s $f ] || continue + vdot $f || safe_dot $f + done +} + +# convenience function - skip if not verified +vdot() +{ + local f rc=0 verify + + o_verify_set on verify + for f in "$@"; do + [ -f $f -a -s $f ] || continue + if is_verified $f 2> /dev/null; then + dotted="$dotted $f" + . $f + else + rc=80 # EAUTH + fi + done + o_verify_set $verify + return $rc +} + +# do we have $1 (could be a function) +have() +{ + type "$1" > /dev/null 2>&1 +} + +# provide consistent means of logging progress +rc_log() +{ + date "+@ %s [%Y-%m-%d %H:%M:%S %Z] $*" +} + +# only rc_log if tracing enabled +# and $level >= $RC_LEVEL +rc_trace() +{ + local level=$1; shift + local cf=/etc/rc.conf.d/rc_trace + + if [ -z "$RC_LEVEL" ]; then + [ -f $cf ] || return + [ -s $cf ] && \ + RC_LEVEL=$(sed -n '/^RC_LEVEL=/ { s/.*=//p;q; }' $cf) + RC_LEVEL=${RC_LEVEL:-0} + fi + [ ${RC_LEVEL:-0} -ge ${level:-0} ] || return + rc_log "$@" +} + # list_vars pattern # List variables matching glob pattern. # @@ -924,6 +1040,8 @@ run_rc_command() err 3 'run_rc_command: $name is not set.' fi + DebugOn rc:$name rc:$name:$rc_arg $name:$rc_arg + # Don't repeat the first argument when passing additional command- # line arguments to the command subroutines. # @@ -1077,6 +1195,7 @@ run_rc_command() _postcmd=\$${rc_arg}_postcmd if [ -n "$_cmd" ]; then + rc_trace 1 "$_cmd" if [ -n "$_env" ]; then eval "export -- $_env" fi @@ -1449,6 +1568,10 @@ run_rc_script() required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd + rc_trace 0 "$_file $_arg" + # don't use it if we don't trust it + is_verified $_file || return + rc_service="$_file" case "$_file" in /etc/rc.d/*.sh) # no longer allowed in the base @@ -1459,6 +1582,8 @@ run_rc_script() ;; *) # run in subshell if [ -x $_file ]; then + DebugOn $_file $_file:$_arg rc:${_file##*/} rc:${_file##*/}:$_arg ${_file##*/} ${_file##*/}:$_arg + if [ -n "$rc_boottrace" ]; then boottrace_fn "$_file" "$_arg" elif [ -n "$rc_fast_and_loose" ]; then @@ -1469,11 +1594,65 @@ run_rc_script() trap "echo Script $_file running >&2" 29 set $_arg; . $_file ) fi + DebugOff $_file $_file:$_arg rc:${_file##*/} rc:${_file##*/}:$_arg ${_file##*/} ${_file##*/}:$_arg fi ;; esac } +# +# run_rc_scripts [options] file [...] +# +# Call `run_rc_script' for each "file" unless already listed in +# $_rc_elem_done. +# +# Options: +# +# --arg "arg" +# Pass "arg" to `run_rc_script' default is $_boot. +# +# --break "marker" +# If any "file" matches "marker" stop processing. +# +_rc_elem_done= +run_rc_scripts() +{ + local _arg=${_boot} + local _rc_elem + local _rc_breaks= + + while :; do + case "$1" in + --arg) + _arg="$2" + shift 2 + ;; + --break) + _rc_breaks="$_rc_breaks $2" + shift 2 + ;; + *) + break + ;; + esac + done + for _rc_elem in "$@"; do + : _rc_elem=$_rc_elem + case " $_rc_elem_done " in + *" $_rc_elem "*) + continue + ;; + esac + run_rc_script ${_rc_elem} ${_arg} + _rc_elem_done="$_rc_elem_done $_rc_elem" + case " $_rc_breaks " in + *" ${_rc_elem##*/} "*) + break + ;; + esac + done +} + boottrace_fn() { local _file _arg @@ -1502,19 +1681,42 @@ boottrace_sysctl() # load_rc_config() { - local _name _rcvar_val _var _defval _v _msg _new _d + local _name _rcvar_val _var _defval _v _msg _new _d _dot _name=$1 + _dot=${load_rc_config_reader:-dot} + + case "$_dot" in + dot|[sv]dot) + ;; + *) warn "Ignoring invalid load_rc_config_reader" + _dot=dot + ;; + esac + case "$1" in + -s|--safe) + _dot=sdot + _name=$2 + shift + ;; + -v|--verify) + _dot=vdot + _name=$2 + shift + ;; + esac + + DebugOn rc:$_name $_name if ${_rc_conf_loaded:-false}; then : else if [ -r /etc/defaults/rc.conf ]; then debug "Sourcing /etc/defaults/rc.conf" - . /etc/defaults/rc.conf + $_dot /etc/defaults/rc.conf source_rc_confs elif [ -r /etc/rc.conf ]; then debug "Sourcing /etc/rc.conf (/etc/defaults/rc.conf doesn't exist)." - . /etc/rc.conf + $_dot /etc/rc.conf fi _rc_conf_loaded=true fi @@ -1526,13 +1728,13 @@ load_rc_config() _d=${_d%/rc.d} if [ -f ${_d}/rc.conf.d/"$_name" ]; then debug "Sourcing ${_d}/rc.conf.d/$_name" - . ${_d}/rc.conf.d/"$_name" + $_dot ${_d}/rc.conf.d/"$_name" elif [ -d ${_d}/rc.conf.d/"$_name" ] ; then local _rc for _rc in ${_d}/rc.conf.d/"$_name"/* ; do if [ -f "$_rc" ] ; then debug "Sourcing $_rc" - . "$_rc" + $_dot "$_rc" fi done fi @@ -2286,3 +2488,24 @@ boottrace_cmd=`command -v boottrace` if [ -n "$boottrace_cmd" ] && [ "`${SYSCTL_N} -q kern.boottrace.enabled`" = "1" ]; then rc_boottrace=YES fi + +# Allow for local additions and overrides. +# Use vdot to ensure the file has not been tampered with. +vdot /etc/local.rc.subr + +# safe_eval.sh provides safe_dot - for untrusted files +$_SAFE_EVAL_SH vdot /libexec/safe_eval.sh +$_DEBUG_SH vdot /libexec/debug.sh + +# Ensure we can still operate if debug.sh and +# safe_eval.sh are not found. +if have DebugOn; then + # allow DEBUG_SH to be set from loader prompt + DEBUG_SH=${DEBUG_SH:-$(kenv -q DEBUG_SH)} +else + DebugOn() { return 0; } + DebugOff() { return 0; } +fi +if ! have save_dot; then + safe_dot() { dot "$@"; } +fi diff --git a/libexec/rc/safe_eval.sh b/libexec/rc/safe_eval.sh new file mode 100644 index 000000000000..bd9bc9394814 --- /dev/null +++ b/libexec/rc/safe_eval.sh @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: BSD-2-Clause + +# RCSid: +# $Id: safe_eval.sh,v 1.12 2023/10/12 18:46:53 sjg Exp $ +# +# @(#) Copyright (c) 2023 Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net + +_SAFE_EVAL_SH=: + +## +# safe_set +# +# return a safe variable setting +# any non-alphanumeric chars are replaced with '_' +# +safe_set() { + sed 's/[ ]*#.*//;/^[A-Za-z_][A-Za-z0-9_]*=/!d;s;[^A-Za-z0-9_. "$,/=-];_;g' +} + +## +# safe_eval [file] +# +# eval variable assignments only from file +# taking care to eliminate any shell meta chars +# +safe_eval() { + eval `cat "$@" | safe_set` +} + +## +# safe_dot file [...] +# +# feed all "file" that exist to safe_eval +# +safe_dot() { + local ef= f + + for f in "$@" + do + test -s $f || continue + ef="${ef:+$ef }$f" + dotted="$dotted $f" + done + test -z "$ef" && return 1 + safe_eval $ef + return 0 +} + +case /$0 in +*/safe_eval*) + case "$1" in + dot|eval|set) op=safe_$1; shift; $op "$@";; + *) safe_dot "$@";; + esac + ;; +esac diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile index 1b942e275209..1e2c22e97d8e 100644 --- a/share/man/man8/Makefile +++ b/share/man/man8/Makefile @@ -4,6 +4,7 @@ MAN= \ beinstall.8 \ crash.8 \ + debug.sh.8 \ diskless.8 \ intro.8 \ nanobsd.8 \ diff --git a/share/man/man8/debug.sh.8 b/share/man/man8/debug.sh.8 new file mode 100644 index 000000000000..2c137ff3fd42 --- /dev/null +++ b/share/man/man8/debug.sh.8 @@ -0,0 +1,182 @@ +.\" Copyright (c) 1994-2021 Simon J. Gerraty +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" This file is provided in the hope that it will +.\" be of use. There is absolutely NO WARRANTY. +.\" Permission to copy, redistribute or otherwise +.\" use this file is hereby granted provided that +.\" the above copyright notice and this notice are +.\" left intact. +.\" +.\" Please send copies of changes and bug-fixes to: +.\" sjg@crufty.net +.\" +.Dd January 31, 2024 +.Dt DEBUG.SH 8 +.Os +.Sh NAME +.Nm debug.sh +.Nd selectively debug scripts +.Sh SYNOPSIS +.Bl -item -compact +.It +.Ic $_DEBUG_SH .\& Pa debug.sh +.Pp +.It +.Ic DebugOn Oo Fl eo Oc Ar tag ... +.It +.Ic DebugOff Oo Fl eo Oc Oo Cm rc= Ns Ar rc Oc Ar tag ... +.It +.Ic Debugging +.It +.Ic DebugEcho Op Ar message +.It +.Ic DebugLog Op Ar message +.It +.Ic DebugShell Ar tag ... +.It +.Ic DebugTrace Ar message +.It +.Ic Debug Ar tag ... +.El +.Sh DESCRIPTION +.Nm +provides the following functions to facilitate flexible +run-time tracing of complicated shell scripts. +.Bl -tag -width 4n +.It Ic DebugOn Oo Fl eo Oc Ar tag ... +turns tracing on if any +.Ar tag +is found in +.Va DEBUG_SH +(a comma separated list of tags). +.Pp +It turns tracing off if +.Ar !tag +is found in +.Va DEBUG_SH . +.Pp +It sets +.Va DEBUG_ON +to the +.Ar tag +that caused tracing to be enabled, or +.Va DEBUG_OFF +if we matched +.Ar !tag . +.Pp +If +.Fl e +option is present, returns 1 if no +.Ar tag +matched. +.Pp +If +.Fl o +option is present, tracing is turned off unless there +was a matched +.Ar tag , +useful for functions too noisy to tace. +.It Ic DebugOff Oo Fl eo Oc Oo Cm rc= Ns Ar rc Oc Ar tag ... +turns tracing on if any +.Ar tag +matches +.Va DEBUG_OFF +or off if any +.Ar tag +matches +.Va DEBUG_ON . +This allows nested functions to not interfere with each other. +.Pp +The flags +.Fl e +and +.Fl o +are ignored, they just allow for symmetry with calls to +.Fn DebugOn . +.Pp +The optional +.Ar rc +value will be returned rather than the default of 0. +Thus if +.Fn DebugOff +is the last operation in a function, +.Ar rc +will be the return code of the function. +.It Ic Debugging +returns true if tracing is enabled. +It is useful for bounding complex debug actions, rather than +using lots of +.Ic $DEBUG_DO +lines. +.It Ic DebugEcho +is just shorthand for: +.Bd -literal -offset indent +$DEBUG_DO echo "$@" +.Ed +.It Ic DebugLog Op Ar message +If debugging is enabled, output +.Ar message +prefixed with a time-stamp. +.It Ic DebugShell Ar tag ... +runs an interactive shell if any +.Ar tag +is found in +.Va DEBUG_INTERACTIVE , +and there is a tty available. +The shell used is defined by +.Va DEBUG_SHELL +or +.Va SHELL +and defaults to +.Pa /bin/sh . +.It Ic DebugTrace Ar message +Debug output can be very noisy, and it can be tricky +to align with the script. +This function outputs a very noticable banner indicating the value of +.Va DEBUG_ON , +and +.Ar message +is passed to +.Fn DebugLog , +finally the banner is repeated. +.It Ic Debug Ar tag ... +For backwards compatibility, calls +.Fn DebugOn +and if that does not turn tracing on, +it calls +.Fn DebugOff +to turn it off. +.El +.Pp +The variables +.Va DEBUG_SKIP +and +.Va DEBUG_DO +are set so as to enable/disable code that should be +skipped/run when debugging is turned on. +.Va DEBUGGING +is the same as +.Va DEBUG_SKIP +for backwards compatability and is only set by *** 396 LINES SKIPPED *** From nobody Fri Feb 9 17:22:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWgdt2ZjXz5B2FC; Fri, 9 Feb 2024 17:22: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 4TWgdt23THz4Vrm; Fri, 9 Feb 2024 17:22:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707499346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSylMtdtOVkZVQWXpBbYUk56Tjetym3SONgqDK6sEAM=; b=Bb6BNjna71KYF6QaIlbuQ8wkGMDPB5LQCw5d7crrfzzE7Zpd+ZXrzlE7qkRYDS/tRXW8jU zImMt909+kYOZRgWq48RRhYU7KfcY/uw6udZZQfFodco5lYNtrhWb1p7y24DrX9ZmctHwY pivCOsaenh5tMV1/LiIxhKMYozVsHpn0YbuI9L4RbkjZW3Xhcl33clqR5QS61F6JyV9hUa Dh26BLC2NORn5aer0Qw6/OHpKX9sPjF0liWahioGMX2MZM3yLf486pl9vfn2I7mcIzFL2f 1Lq3ewriIksHTP3ig5tU1WoFBvPOBKB4J5eYKgg+ZY0Js6TWVs5avMRyH5yQfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707499346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSylMtdtOVkZVQWXpBbYUk56Tjetym3SONgqDK6sEAM=; b=Aa1ZeYl8RXTQaHhRy1fN81gMUHPOEDxfmbGmS8MLb+2fsLh2BE5LW4HkbPli246yIn3iNg ZP5hZw5n0vkHHHyeHGSVZ+82W03LF6G/2hshCC+O0jFKQrLdmpPG1lZzAcLVfXeIxN4L+S PCUzEvLQ2T88ubpL1GgoPMauQZsV4iPs5Ha1hOJL7xXwANOY3E3hi6tVd+zSo5KvTQe0oz aHer3OjdmeV1MFOmtTDonHEo+5Yt5tudpdl24pmoz9JHfK3f9vUIooGBHuG2hLHdDv16hn RrWZyE9WZcQVsap1SGLks/Y62qJNjhVI/hlT4Mvg/mdfem21vOGJLPnJFDigzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707499346; a=rsa-sha256; cv=none; b=Hm6705ikyTFTHurR4+rEY3rfTReUzLyxWmY7LBRuISTt48RzPB8DtkAsIOS2ew3znAcDps 74I8zBxy3EVZ50XNeuuuGFLQiTLUR6vaf+pIHpB4XPetOphx34WpO3IzEap8b2TNJWUiHD 04QHiTGOtaOgKUAdGsgkDTuYXfUF2NRfi30S6hOgVRqE0Fy54eBrh5WZrer7wAGLR1bv7V XDkCbLijWqFN0B7UmpyZf+gD6GleV8RNiuxNGjWb9cod/hWpFtSVnyLNwMbgHqx9F9iC72 cu2p4V6+k4+B1iZEEyRlO5CLmHtlShyb2M3O7MXRo4EhYYNYmkh5IJOcps3s7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWgdt16Y4zhKt; Fri, 9 Feb 2024 17:22: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 419HMQlZ019902; Fri, 9 Feb 2024 17:22:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419HMQKE019899; Fri, 9 Feb 2024 17:22:26 GMT (envelope-from git) Date: Fri, 9 Feb 2024 17:22:26 GMT Message-Id: <202402091722.419HMQKE019899@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: 1995ea1ea265 - main - libsys: add guards to MD manpages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1995ea1ea2654d5c32ef17ddf651380ecc23c635 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1995ea1ea2654d5c32ef17ddf651380ecc23c635 commit 1995ea1ea2654d5c32ef17ddf651380ecc23c635 Author: Brooks Davis AuthorDate: 2024-02-09 17:21:15 +0000 Commit: Brooks Davis CommitDate: 2024-02-09 17:22:13 +0000 libsys: add guards to MD manpages This avoids duplicate installations which fail packaging tests. Reported by: emaste --- lib/libsys/i386/Makefile.sys | 2 ++ lib/libsys/x86/Makefile.sys | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/libsys/i386/Makefile.sys b/lib/libsys/i386/Makefile.sys index f42c5f7ec0ef..2957dc548cf8 100644 --- a/lib/libsys/i386/Makefile.sys +++ b/lib/libsys/i386/Makefile.sys @@ -5,9 +5,11 @@ SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \ MDASM= vfork.S cerror.S getcontext.S syscall.S +.if ${LIB} == "sys" MAN+= i386_get_ioperm.2 i386_get_ldt.2 i386_vm86.2 MAN+= i386_set_watch.3 MLINKS+=i386_get_ioperm.2 i386_set_ioperm.2 MLINKS+=i386_get_ldt.2 i386_set_ldt.2 MLINKS+=i386_set_watch.3 i386_clr_watch.3 +.endif # ${LIB} == "sys" diff --git a/lib/libsys/x86/Makefile.sys b/lib/libsys/x86/Makefile.sys index d5e4cd75e78b..483d1784bdc9 100644 --- a/lib/libsys/x86/Makefile.sys +++ b/lib/libsys/x86/Makefile.sys @@ -5,8 +5,10 @@ SRCS+= \ pkru.c \ sched_getcpu_x86.c +.if ${LIB} == "sys" MAN+= \ pkru.3 +.endif # ${LIB} == "sys" # Note: vdso support for hyperv only on amd64 .if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no" From nobody Fri Feb 9 18:25:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWj2k1M1mz5B6nr; Fri, 9 Feb 2024 18:25: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 4TWj2j6WWlz4cmK; Fri, 9 Feb 2024 18:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707503133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pdC0h2Dp26pPLmLKhzP/U6EkSuYTV0zFu5UU1h9hl8A=; b=lBbVZN1ZT2FMH9sjXeJy+muPIcrKg7Er8q/lChU9dr3kE/bZMYjqxiAgdetW7fdESQI3JC 2goPGDKJGD6T6cAgna7ucDC704bR+5mAz/AZnyGjR64m7XBAx4tDw9yDgSUQMpoXB3GUKD qf01r2p8qbe1VtUwxIWDmZMxnVRzj6B10AX3UjKu6IdQhuzg2zyvP4FK7DTCWRRrg76qMn 7Qw8CCcD0Vw5y8ZykDS+82I9bLaNir49SXp/i5OkJgUYkPWNIJkt0vghfDuRyuKbBe8lNO qYTrnp5782vCbY8aANbgVtuCs4bP+1HJiTyLNXNvmRxveAHibONbAknCrbtAbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707503133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pdC0h2Dp26pPLmLKhzP/U6EkSuYTV0zFu5UU1h9hl8A=; b=LE+LPqBjLwuUDGFmsxd3Qv67apZhdSPNEzKL1Y8X6E6Fayp3+OGz62HBZ38rwSpqCoQdRO C/RQCFOJyCgksWRiYdoqAgD0+Ox+rqP9h5Vh897zMDV0EB7cOpJhk3zBTZV1ZqYeZTuZ3y ZwxDS1g7gvq4TpQvXB2bnq80u9tu/jC/4UkXVCpT8iKg5mjn3R8eWJN/YQDQWdWfBaPaOz 32OYQaf7f1Uk2vNjvEkl7OFjdoXCMJ5P/9GQnjujhDOexp7huOAmJd7ztd6B/AvZgcCotv wh9CFwspvHTuMlUbN53O9TM+HMFiv5sUsTGxF8Z5JNh70h+dCcx3n63/eSVq5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707503133; a=rsa-sha256; cv=none; b=kCEWqrAV9zKx/o+DJDo+09ttCekBVKUT71Q353WXiOKY6DAGyEPDka1HUp0pYAgg8cRmJf S59218gN+QHc6L+joEw+K1T7zWyFoObilE2Wv5o4tjXnIdX5AFg0g6zhMP20S52OWPVin7 RVmN+qHMCgjMn2QAuHuuf/qn4iGGSvHcFahbQivuOmszPLmTn42XiKJLYrD871RNNZJnN3 N0DeRRi+5VQzAo4uXF2Ogmt2eQ9mjStd3PhcnDiOrJq9NIgORxCLfuHXr/q93cPWObQPz2 z7SjMoOqGdfNIR6yNdynX3pZflKr6rvbO7ht9M+jcPWz1BgZh2VYrDAkrLRwOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWj2j5ZM1zk91; Fri, 9 Feb 2024 18:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 419IPXcQ020780; Fri, 9 Feb 2024 18:25:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419IPXuR020777; Fri, 9 Feb 2024 18:25:33 GMT (envelope-from git) Date: Fri, 9 Feb 2024 18:25:33 GMT Message-Id: <202402091825.419IPXuR020777@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: c994f226bbd3 - main - bsdinstall: Add new Auto option to netconfig interface selection dialog List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c994f226bbd3c0762e3c642515fef5f9d5589493 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c994f226bbd3c0762e3c642515fef5f9d5589493 commit c994f226bbd3c0762e3c642515fef5f9d5589493 Author: Jessica Clarke AuthorDate: 2024-02-09 18:13:47 +0000 Commit: Jessica Clarke CommitDate: 2024-02-09 18:13:47 +0000 bsdinstall: Add new Auto option to netconfig interface selection dialog This changes the OK / Cancel buttons into Auto / Manual / Cancel, with Auto being the default. Manual behaves like OK used to, i.e. presents a series of dialogs asking exactly how to configure the interface, and Cancel is unchanged, exiting with exit code 1. Auto will attempt to configure IPv4+DHCP and IPv6+SLAAC with no interaction, failing only if neither can be configured, thereby supporting all of IPv4-only, IPv6-only and dual-stack environments. If at least one DNS server is provided, it will also skip asking for DNS settings, otherwise it will act like Manual mode for the purposes of DNS settings and prompt. For a standard dual-stack environment this cuts down the number of netconfig dialogs from 6 (interface, IPv4, DHCP, IPv6, SLAAC, DNS) to just the first one. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D43731 --- usr.sbin/bsdinstall/scripts/netconfig | 77 +++++++++++++++++++++++------- usr.sbin/bsdinstall/scripts/netconfig_ipv4 | 26 +++++++++- usr.sbin/bsdinstall/scripts/netconfig_ipv6 | 30 ++++++++++-- 3 files changed, 109 insertions(+), 24 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig index 77b71867eb4a..130db2937234 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -73,8 +73,21 @@ if [ -z "$INTERFACES" ]; then fi exec 5>&1 -INTERFACE=`echo $BSDDIALOG_ITEMS | xargs -o bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&5` -if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi +INTERFACE=$(echo $BSDDIALOG_ITEMS | xargs -o bsddialog \ + --backtitle "$OSNAME Installer" --title 'Network Configuration' \ + --ok-label 'Auto' --extra-button --extra-label 'Manual' \ + --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&5) +# xargs collapses exit codes to 0/1 (ignoring signals and 255), so exploit +# bsddialog output being empty when cancelling to distinguish Manual (Extra) +# from Cancel. +if [ $? -eq $BSDDIALOG_OK ]; then + AUTO=auto +else + if [ -z "$INTERFACE" ]; then + exit 1 + fi + AUTO= +fi exec 5>&- : > $BSDINSTALL_TMPETC/._rc.conf.net @@ -103,30 +116,46 @@ case $? in 0) IPV4_AVAIL=1 ;; esac -if [ ${IPV4_AVAIL} -eq 1 ]; then +AUTO_FAIL= +if [ ${IPV4_AVAIL} -eq 1 -a -z "$AUTO" ]; then bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ --yesno 'Would you like to configure IPv4 for this interface?' 0 0 - if [ $? -eq $BSDDIALOG_OK ]; then - bsdinstall netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" || \ - exec $0 - else + if [ $? -ne $BSDDIALOG_OK ]; then IPV4_AVAIL=0 fi fi +if [ ${IPV4_AVAIL} -eq 1 ]; then + bsdinstall netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" $AUTO + if [ $? -ne $BSDDIALOG_OK ]; then + if [ -z "$AUTO" ]; then + exec $0 + fi + IPV4_AVAIL=0 + AUTO_FAIL="$AUTO_FAIL${AUTO_FAIL:+, }IPv4" + fi +fi # In case wlanconfig left an option and we do not support IPv4 we need to write # it out on its own. We cannot write it out with IPv6 as that suffix. if [ ${IPV4_AVAIL} -eq 0 -a -n ${IFCONFIG_PREFIX} ]; then sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_$INTERFACE="${IFCONFIG_PREFIX}" fi -if [ ${IPV6_AVAIL} -eq 1 ]; then +if [ ${IPV6_AVAIL} -eq 1 -a -z "$AUTO" ]; then bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ --yesno 'Would you like to configure IPv6 for this interface?' 0 0 - if [ $? -eq $BSDDIALOG_OK ]; then - bsdinstall netconfig_ipv6 ${INTERFACE} || exec $0 - else + if [ $? -ne $BSDDIALOG_OK ]; then IPV6_AVAIL=0 fi fi +if [ ${IPV6_AVAIL} -eq 1 ]; then + bsdinstall netconfig_ipv6 ${INTERFACE} $AUTO + if [ $? -ne $BSDDIALOG_OK ]; then + if [ -z "$AUTO" ]; then + exec $0 + fi + IPV6_AVAIL=0 + AUTO_FAIL="$AUTO_FAIL${AUTO_FAIL:+, }IPv6" + fi +fi SEARCH="" IP4_1="" @@ -180,16 +209,28 @@ elif [ ${IPV4_AVAIL} -eq 1 ]; then 'IPv4 DNS #1' 2 1 \"${IP4_1}\" 2 16 16 16 0 'IPv4 DNS #2' 3 1 \"${IP4_2}\" 3 16 16 16 0" else + if [ -n "$AUTO_FAIL" ]; then + bsddialog --backtitle "$OSNAME Installer" \ + --msgbox "Failed to automatically configure interface (tried $AUTO_FAIL)." 0 0 + exec $0 + fi exit 0 fi -exec 5>&1 -RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle "$OSNAME Installer" \ - --title 'Network Configuration' \ - --mixedform 'Resolver Configuration' 0 0 0 \ -2>&1 1>&5) -if [ $? -eq $BSDDIALOG_CANCEL ]; then exec $0; fi -exec 5>&- +# Auto only guaranteed to have IPv4 and/or IPv6 address; may not have +# nameserver available +if [ -n "$AUTO" ] && [ -n "${IP4_1}" -o -n "${IP6_1}" ]; then + # Convert from bsddialog arguments to default output + RESOLV=$(echo "${RESOLV}" | xargs -n9 sh -c 'echo "$4"' '') +else + exec 5>&1 + RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle "$OSNAME Installer" \ + --title 'Network Configuration' \ + --mixedform 'Resolver Configuration' 0 0 0 \ + 2>&1 1>&5) + if [ $? -eq $BSDDIALOG_CANCEL ]; then exec $0; fi + exec 5>&- +fi echo ${RESOLV} | tr ' ' '\n' | \ awk ' diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 index 8f747a9d0162..7e3669f697d9 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 @@ -40,6 +40,7 @@ f_include $BSDCFG_SHARE/dialog.subr INTERFACE=$1 IFCONFIG_PREFIX="$2" +AUTO="${3:-}" test -z "$IFCONFIG_PREFIX" || IFCONFIG_PREFIX="$2 " case "${INTERFACE}" in "") bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ @@ -47,9 +48,27 @@ case "${INTERFACE}" in exit 1 ;; esac +case "$AUTO" in +""|auto) + ;; +*) + bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ + --msgbox "Bad auto option '$AUTO'." 0 0 + exit 1 + ;; +esac -bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 -if [ $? -eq $BSDDIALOG_OK ]; then +if [ -n "$AUTO" ]; then + DHCP=1 +else + bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 + if [ $? -eq $BSDDIALOG_OK ]; then + DHCP=1 + else + DHCP=0 + fi +fi +if [ $DHCP -eq 1 ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then # XXX: get interface down otherwise after installation restart # dhclient does not build a new resolv.conf (see PR262262). @@ -59,6 +78,9 @@ if [ $? -eq $BSDDIALOG_OK ]; then err=$( pkill -F /var/run/dhclient/dhclient.${INTERFACE}.pid; dhclient $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then f_dprintf "%s" "$err" + if [ -n "$AUTO" ]; then + exit 1 + fi bsddialog --backtitle "$OSNAME Installer" --msgbox "DHCP lease acquisition failed." 0 0 exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 index b851069eee14..d60a3014ccc4 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 @@ -48,19 +48,38 @@ f_include $BSDCFG_SHARE/dialog.subr # INTERFACE=$1 +AUTO="${2:-}" case "${INTERFACE}" in "") bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ --msgbox 'No interface specified for IPv6 configuration.' 0 0 exit 1 ;; esac +case "$AUTO" in +""|auto) + ;; +*) + bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ + --msgbox "Bad auto option '$AUTO'." 0 0 + exit 1 + ;; +esac AGAIN="" while : ; do - MSG="Would you like to try stateless address autoconfiguration (SLAAC)${AGAIN}?" - bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ - --yesno "${MSG}" 0 0 - if [ $? -eq $BSDDIALOG_OK ]; then + if [ -n "$AUTO" ]; then + SLAAC=1 + else + MSG="Would you like to try stateless address autoconfiguration (SLAAC)${AGAIN}?" + bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ + --yesno "${MSG}" 0 0 + if [ $? -eq $BSDDIALOG_OK ]; then + SLAAC=1 + else + SLAAC=0 + fi + fi + if [ $SLAAC -eq 1 ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then bsddialog --backtitle "$OSNAME Installer" \ --infobox "Sending Router Solicitation ..." 0 0 @@ -68,6 +87,9 @@ while : ; do err=$( rtsol -F $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then f_dprintf "%s" "$err" + if [ -n "$AUTO" ]; then + exit 1 + fi bsddialog --backtitle "$OSNAME Installer" --msgbox "SLAAC failed." 0 0 AGAIN=" again" continue From nobody Fri Feb 9 18:44:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWjSR22Hfz5B7tp; Fri, 9 Feb 2024 18:44: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 4TWjSR1HQPz4g6f; Fri, 9 Feb 2024 18:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZP29np5ptdoxnrW7MvnEDrpM/7IZsb0Mdg3R5fm5Idc=; b=DdUAY1cDUOksggV6jKP7ids4OX/xd8A/lLwciDsAitZ7LFkOGQinY3133cAO2X0FWtMWvS NqW0YdrOBZrcyENI91W6tQ2ehF5tegB0srCY22RTPceF3qMuHgd6f4UTjuNgKGjfKWfNtb fC5mB7BTkrxlyDkrWNo/cVn8NTWRl6SCAYjA2rk3VaIIx6kmQOifZWrROyMTtUQb5dvXph UW+Kmy+BKZlc6uNRTU6XFbUh3gIIkJjbfsBcFyMH+5TgUj75HaOwYRYzGU+4k/egkMrNNJ 5S1lhasyf1CfbzJeaoAbl8mS+naXTsNYuOXqZXYBWi+vl0VzgSkLHx/Ca/bo8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZP29np5ptdoxnrW7MvnEDrpM/7IZsb0Mdg3R5fm5Idc=; b=AfgJB5NR00BngngNDfSpGOrr21l4emgMMELxgh0CYMgs5S8jbGQ10agxXK0NW3xAZrHDM3 aEluCqASojCaNxvoxCJA2sp/iwpJ08r2yoP0qO4DK6YBgwQlOPUZARxvaQ/wo9mIMiiBfI rOZ3EugKGN102Ixxhc5aREDnkAFtA4q+rjracGZd/75f04fwVG03hlX00Q8iGJhJe26sRJ dhPu9oqyc5tr+xbcmXiMCjkd5ohDMcDSu41WPvEFR03Vsz/UG0BDhRmq0dL/jmoZ5Iv7qA dtaSEEKAtweVEb4EVs3gy+Xz1E+2iwdVa4mjkqTqdL+kUlOBrOzLOvN/mfb52g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707504263; a=rsa-sha256; cv=none; b=e+mvg29tzQEk/mqNeYqe3VC5613rRR1Y9BT92U46dEDaMccIs18wpyPrT2esefPKjwyPBf dvzwBBpbg4I/+6fz4S0bx2iz85IQ5UadDnqXA/auOFqUOTN+Y8UuKThnn8PBNw8WB8s4XW Bnpoxnc9GaenbHSHryFXU0XKarvogio9VRzd2EhJCyVGZmN4RBhRZ6dZJprS+pMNLiWnf/ oMnI3sF3CFzlIo42SVjhrHkGiEBrz8Yplbil9146Nhl+38dACABVjbEbbTpfSbyi4cOL6d 6DPEA9LnKoyIC/X28H59c3SIZXpdwppKh6f89+tLdgsXGBYbUYk0Ppi8pQMM6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWjSR0L2qzkPs; Fri, 9 Feb 2024 18:44: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 419IiMuS054720; Fri, 9 Feb 2024 18:44:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419IiM2K054717; Fri, 9 Feb 2024 18:44:22 GMT (envelope-from git) Date: Fri, 9 Feb 2024 18:44:22 GMT Message-Id: <202402091844.419IiM2K054717@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: 0e72b8d36562 - main - acpi: Use kobj typedefs for new-bus method prototypes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e72b8d36562cb7ecf610dbd7357af830820e4b4 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0e72b8d36562cb7ecf610dbd7357af830820e4b4 commit 0e72b8d36562cb7ecf610dbd7357af830820e4b4 Author: John Baldwin AuthorDate: 2024-02-09 18:27:44 +0000 Commit: John Baldwin CommitDate: 2024-02-09 18:27:44 +0000 acpi: Use kobj typedefs for new-bus method prototypes Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43685 --- sys/dev/acpica/acpi.c | 80 ++++++++++++++++++++---------------------------- sys/dev/acpica/acpivar.h | 8 ++--- 2 files changed, 36 insertions(+), 52 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 7d1fc10afb9e..b2a337b3487d 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -111,52 +111,46 @@ static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT]; static void acpi_lookup(void *arg, const char *name, device_t *dev); static int acpi_modevent(struct module *mod, int event, void *junk); -static int acpi_probe(device_t dev); -static int acpi_attach(device_t dev); -static int acpi_suspend(device_t dev); -static int acpi_resume(device_t dev); -static int acpi_shutdown(device_t dev); -static device_t acpi_add_child(device_t bus, u_int order, const char *name, - int unit); -static int acpi_print_child(device_t bus, device_t child); -static void acpi_probe_nomatch(device_t bus, device_t child); -static void acpi_driver_added(device_t dev, driver_t *driver); -static void acpi_child_deleted(device_t dev, device_t child); -static int acpi_read_ivar(device_t dev, device_t child, int index, - uintptr_t *result); -static int acpi_write_ivar(device_t dev, device_t child, int index, - uintptr_t value); -static struct resource_list *acpi_get_rlist(device_t dev, device_t child); + +static device_probe_t acpi_probe; +static device_attach_t acpi_attach; +static device_suspend_t acpi_suspend; +static device_resume_t acpi_resume; +static device_shutdown_t acpi_shutdown; + +static bus_add_child_t acpi_add_child; +static bus_print_child_t acpi_print_child; +static bus_probe_nomatch_t acpi_probe_nomatch; +static bus_driver_added_t acpi_driver_added; +static bus_child_deleted_t acpi_child_deleted; +static bus_read_ivar_t acpi_read_ivar; +static bus_write_ivar_t acpi_write_ivar; +static bus_get_resource_list_t acpi_get_rlist; +static bus_set_resource_t acpi_set_resource; +static bus_alloc_resource_t acpi_alloc_resource; +static bus_adjust_resource_t acpi_adjust_resource; +static bus_release_resource_t acpi_release_resource; +static bus_delete_resource_t acpi_delete_resource; +static bus_child_pnpinfo_t acpi_child_pnpinfo_method; +static bus_child_location_t acpi_child_location_method; +static bus_hint_device_unit_t acpi_hint_device_unit; +static bus_get_property_t acpi_bus_get_prop; +static bus_get_device_path_t acpi_get_device_path; + +static acpi_id_probe_t acpi_device_id_probe; +static acpi_evaluate_object_t acpi_device_eval_obj; +static acpi_get_property_t acpi_device_get_prop; +static acpi_scan_children_t acpi_device_scan_children; + +static isa_pnp_probe_t acpi_isa_pnp_probe; + static void acpi_reserve_resources(device_t dev); static int acpi_sysres_alloc(device_t dev); -static int acpi_set_resource(device_t dev, device_t child, int type, - int rid, rman_res_t start, rman_res_t count); -static struct resource *acpi_alloc_resource(device_t bus, device_t child, - int type, int *rid, rman_res_t start, rman_res_t end, - rman_res_t count, u_int flags); -static int acpi_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, rman_res_t start, rman_res_t end); -static int acpi_release_resource(device_t bus, device_t child, int type, - int rid, struct resource *r); -static void acpi_delete_resource(device_t bus, device_t child, int type, - int rid); static uint32_t acpi_isa_get_logicalid(device_t dev); static int acpi_isa_get_compatid(device_t dev, uint32_t *cids, int count); -static ssize_t acpi_bus_get_prop(device_t bus, device_t child, const char *propname, - void *propvalue, size_t size, device_property_type_t type); -static int acpi_device_id_probe(device_t bus, device_t dev, char **ids, char **match); -static ACPI_STATUS acpi_device_eval_obj(device_t bus, device_t dev, - ACPI_STRING pathname, ACPI_OBJECT_LIST *parameters, - ACPI_BUFFER *ret); -static ACPI_STATUS acpi_device_get_prop(device_t bus, device_t dev, - ACPI_STRING propname, const ACPI_OBJECT **value); static ACPI_STATUS acpi_device_scan_cb(ACPI_HANDLE h, UINT32 level, void *context, void **retval); -static ACPI_STATUS acpi_device_scan_children(device_t bus, device_t dev, - int max_depth, acpi_scan_cb_t user_fn, void *arg); static ACPI_STATUS acpi_find_dsd(struct acpi_device *ad); -static int acpi_isa_pnp_probe(device_t bus, device_t child, - struct isa_pnp_id *ids); static void acpi_platform_osc(device_t dev); static void acpi_probe_children(device_t bus); static void acpi_probe_order(ACPI_HANDLE handle, int *order); @@ -181,15 +175,7 @@ static int acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_debug_objects_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_pm_func(u_long cmd, void *arg, ...); -static int acpi_child_location_method(device_t acdev, device_t child, - struct sbuf *sb); -static int acpi_child_pnpinfo_method(device_t acdev, device_t child, - struct sbuf *sb); -static int acpi_get_device_path(device_t bus, device_t child, - const char *locator, struct sbuf *sb); static void acpi_enable_pcie(void); -static void acpi_hint_device_unit(device_t acdev, device_t child, - const char *name, int *unitp); static void acpi_reset_interfaces(device_t dev); static device_method_t acpi_methods[] = { diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 4d76a77cdbf8..bb969821b945 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -462,8 +462,7 @@ EVENTHANDLER_DECLARE(acpi_video_event, acpi_event_handler_t); /* Device power control. */ ACPI_STATUS acpi_pwr_wake_enable(ACPI_HANDLE consumer, int enable); ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state); -int acpi_device_pwr_for_sleep(device_t bus, device_t dev, - int *dstate); +acpi_pwr_for_sleep_t acpi_device_pwr_for_sleep; int acpi_set_powerstate(device_t child, int state); /* APM emulation */ @@ -578,9 +577,8 @@ int acpi_pxm_get_cpu_locality(int apic_id); * Returns the VM domain ID if found, or -1 if not found / invalid. */ int acpi_map_pxm_to_vm_domainid(int pxm); -int acpi_get_cpus(device_t dev, device_t child, enum cpu_sets op, - size_t setsize, cpuset_t *cpuset); -int acpi_get_domain(device_t dev, device_t child, int *domain); +bus_get_cpus_t acpi_get_cpus; +bus_get_domain_t acpi_get_domain; #ifdef __aarch64__ /* From nobody Fri Feb 9 18:44:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWjSS46kLz5B8G6; Fri, 9 Feb 2024 18:44: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 4TWjSS2Dczz4fhj; Fri, 9 Feb 2024 18:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4niZeUCMPk2NBXoc2Sid6ThTu13p55OrKg4Er6b2G7I=; b=n+xmC7psiKj/+JZWCBm0yOaOrWGEczBQmem3drsk0MwsYMieQDjlTAvf75MUxMm/MvWVXg HddiqVD+bqrDiGDQnBF7VOjlqmwB9JttxW/zdA0oNiXLKZP6+oBJZHfh4W5HIh72wSNGvp RREYjTtnLyL+8rMcklldza3FCCKvTCEROvg0FVwnYMZvY+8CVoB3diajBgXfQZKRn92FsV BFZptbWR231lKGmQt11pzwOxyPZKVQV9yGG2+S4vrqj2EwocmxKd9UiohmhjWPRoDT/U0a S9a+6eg/cifgu5pdPlMdviei//zXXULi5nYFgnrFEol1K++ZFfw8R/3i7oKjcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4niZeUCMPk2NBXoc2Sid6ThTu13p55OrKg4Er6b2G7I=; b=Cv6brSCU0qK5ySpaJA2Rfoohf+W7xTQv38e5qSwJ96sILrpPY5sKZcj58LANUdI5PVci+4 fs2DCISPWS009Ekf7iI13UoB68ZfbL1vZZIjBiN0wR1ik0LE9HmWeO3zo7lJHY0L9UqnT0 7A+DL3oePSwTCOJBfIakTjvlj0WMTBnexhxwRyeZ0zGzanxXPTHNgpP0QW4VvoYOYC8vyG /Sk2y8JXlHpx14fTQAPCvUerjVmFF5EKHDtJvJECnAZvAWEC5vKyRaENMTjuSyvv+TeO2e gj3h+zsrcrNVqA4jjH6Txbu0kIBL50lzNfwhH24px7NtWx634YOdlG7XGqH8/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707504264; a=rsa-sha256; cv=none; b=NdMJU2pnOMc6qiUUTpWFmb+qm5Ti1oXCyFjKHPc6G8737/trBkfonFD0HeVovJLF0hyZsd 1IsSjNXED8AllbNTjm58LoJsns7qGonCd4Jd3V8I+UgG+EgRTC1Prp1BEE4qfH/yUS3vvT igVHH3rzQnJgbyZrsLfMoWvDCxiAR+S+Bi74E8lVfXliAfsp7VxPctG2QmpcFJ1pK0JYn2 dPLOJ2mVKC4DFZ0cfWHwjUGniDvXDVwGgKJEC9pU/QgYjk+8Z4Tv7V7wjYC68Pn2gnqaVn BbaGILpbN1FUMTEkth+f6uwkf/b3G88SUThHX+ZTEuYDOrojQUR5yAbVkQBu9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWjSS1CWzzkwG; Fri, 9 Feb 2024 18:44: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 419IiOsS054775; Fri, 9 Feb 2024 18:44:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419IiOEP054772; Fri, 9 Feb 2024 18:44:24 GMT (envelope-from git) Date: Fri, 9 Feb 2024 18:44:24 GMT Message-Id: <202402091844.419IiOEP054772@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: 1fb5445206a5 - main - acpi: Use bus_generic_alloc_resource instead of duplicating it List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fb5445206a5ef2351c32f8bc6beb67605593caa Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1fb5445206a5ef2351c32f8bc6beb67605593caa commit 1fb5445206a5ef2351c32f8bc6beb67605593caa Author: John Baldwin AuthorDate: 2024-02-09 18:27:45 +0000 Commit: John Baldwin CommitDate: 2024-02-09 18:27:45 +0000 acpi: Use bus_generic_alloc_resource instead of duplicating it No functional change, but it is cleaner to use the existing generic wrappers rather than KOBJ methods directly. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43686 --- sys/dev/acpica/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index b2a337b3487d..2899929c8e6b 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1533,7 +1533,7 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, } } } else - res = BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, rid, + res = bus_generic_alloc_resource(bus, child, type, rid, start, end, count, flags); /* From nobody Fri Feb 9 18:44:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWjST6XV6z5B89s; Fri, 9 Feb 2024 18:44: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 4TWjST39kcz4g6w; Fri, 9 Feb 2024 18:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoaOJlHKBFHwwXF1z9uYJT/QLEfZTjEA6t7ge01BRIc=; b=yynXfHg1AuSgXzbrxzBzRII1Ts9NUDED+WXr1nL2PrDkU5EmH4BGOpo8gP7Hxxpz4veLd8 YwFKlGiAxvbVY1Yr3jxhAjKTbPrsgxJ1pS86hm70+NGN7w3n8+CctzY8dPeO7QJ9lsWV8L TBciQNunlpiXMLsI82i/JGuaqy3DSnkS739N0TQ1it6SROQpmxATDobK99M9l/dxujQQIm OYuvIw0NP/sIlQ87zMzKYkqbqSQCTWSN+1n06yhTwaFSoXwLDazY0dKUdbqQBSp+3OtUVp JcICY9kGJCDeu+mxkChBqpHnCoqWXOPwUMnOkUrFUsUCdP4LA9+MKL63m75HBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoaOJlHKBFHwwXF1z9uYJT/QLEfZTjEA6t7ge01BRIc=; b=o/EaJOH4TZXDQ48wTgqTMKCqzYMyPqur1uEgOWe1sOR+/DTPmp53VbApcAPiUIPd1P1iIl VPk+bshCoL/SPD/bBAj5v4vcSmZXnoU9edcPEIzwnV32EvkazsNMStyGoTdbqu+wnwtwiK gsmsJB8jP+a72TPeJ34LxItQS4a4wMZWOF/My/S8oGYtdaOgeY7izKUZrFjUd3SUoTUkyd +1+qeP3T40fS3PXA1uwQcwY+kDeC2vq4sFDDc1wAqWSPaxCeNEJ4IHlhTLq6sRzK/GRmg1 xnJ878rc2aYwUybUe3lcHsEYrGrWwJQroM/c6v3iqHZLjty919XPGxnAeS0PKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707504265; a=rsa-sha256; cv=none; b=ugHABkcRONXuLMqnpj+lYn1tcI0ch0OQQD398MBXJMfGrkKtypsd3uceLN4J6MzPIGUZw+ zY9hvTlBTEwyiCsSC4new90olZutc2L+NcVQJids8p4gH32ci3YBm6ZnSWqvvNunEUFPTB Rj8tdiulxvkI6nE8wEzUHAEZI1y7OHx11HK2HLHVV46OmlQwpw/hD5cbhdTLDpEyydX+as ajLdL0760Guwkw8iVncgK6AraG3JaSApdYfBtcmqmmJym7rdDHH1HSNhGYTLbOMQ5bvkik q5tMCLlzcSWCzSPxFDypApWT7CApT3pmbERrBiFuIRb3tafm/NsHla+CoNdYrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWjST2DPjzkwH; Fri, 9 Feb 2024 18:44: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 419IiPG4054824; Fri, 9 Feb 2024 18:44:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419IiPcQ054821; Fri, 9 Feb 2024 18:44:25 GMT (envelope-from git) Date: Fri, 9 Feb 2024 18:44:25 GMT Message-Id: <202402091844.419IiPcQ054821@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: 0e1246e33461 - main - acpi: Cleanup handling of suballocated resources List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e1246e3346107b56b52d605a10f763c307e0889 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0e1246e3346107b56b52d605a10f763c307e0889 commit 0e1246e3346107b56b52d605a10f763c307e0889 Author: John Baldwin AuthorDate: 2024-02-09 18:27:45 +0000 Commit: John Baldwin CommitDate: 2024-02-09 18:27:45 +0000 acpi: Cleanup handling of suballocated resources For resources suballocated from the system resource rmans, handle those in the ACPI bus driver without passing them up to the parent. This means using bus_generic_rman_* for several bus methods for operations on suballocated resources. For bus_map/unmap_resource, find the system resource allocated from the parent bus (nexus) that contains the range being mapped and request a mapping of that parent resource. This avoids a layering violation where nexus drivers were previously asked to manage the activation and mapping of resources created belonging to the ACPI resource managers. Note that this does require passing RF_ACTIVE (with RF_UNMAPPED) when allocating system resources from the parent. While here, don't assume that the parent bus (nexus) provides a resource list that sysres resources are placed on. Instead, create a dedicated resource_list in the ACPI bus driver's softc to hold sysres resources. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43687 --- sys/dev/acpica/acpi.c | 198 +++++++++++++++++++++++++---------------- sys/dev/acpica/acpi_resource.c | 8 +- sys/dev/acpica/acpivar.h | 6 +- 3 files changed, 130 insertions(+), 82 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 2899929c8e6b..9cd809761b8e 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -126,11 +126,16 @@ static bus_child_deleted_t acpi_child_deleted; static bus_read_ivar_t acpi_read_ivar; static bus_write_ivar_t acpi_write_ivar; static bus_get_resource_list_t acpi_get_rlist; +static bus_get_rman_t acpi_get_rman; static bus_set_resource_t acpi_set_resource; static bus_alloc_resource_t acpi_alloc_resource; static bus_adjust_resource_t acpi_adjust_resource; static bus_release_resource_t acpi_release_resource; static bus_delete_resource_t acpi_delete_resource; +static bus_activate_resource_t acpi_activate_resource; +static bus_deactivate_resource_t acpi_deactivate_resource; +static bus_map_resource_t acpi_map_resource; +static bus_unmap_resource_t acpi_unmap_resource; static bus_child_pnpinfo_t acpi_child_pnpinfo_method; static bus_child_location_t acpi_child_location_method; static bus_hint_device_unit_t acpi_hint_device_unit; @@ -196,16 +201,19 @@ static device_method_t acpi_methods[] = { DEVMETHOD(bus_read_ivar, acpi_read_ivar), DEVMETHOD(bus_write_ivar, acpi_write_ivar), DEVMETHOD(bus_get_resource_list, acpi_get_rlist), + DEVMETHOD(bus_get_rman, acpi_get_rman), DEVMETHOD(bus_set_resource, acpi_set_resource), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_alloc_resource, acpi_alloc_resource), DEVMETHOD(bus_adjust_resource, acpi_adjust_resource), DEVMETHOD(bus_release_resource, acpi_release_resource), DEVMETHOD(bus_delete_resource, acpi_delete_resource), + DEVMETHOD(bus_activate_resource, acpi_activate_resource), + DEVMETHOD(bus_deactivate_resource, acpi_deactivate_resource), + DEVMETHOD(bus_map_resource, acpi_map_resource), + DEVMETHOD(bus_unmap_resource, acpi_unmap_resource), DEVMETHOD(bus_child_pnpinfo, acpi_child_pnpinfo_method), DEVMETHOD(bus_child_location, acpi_child_location_method), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_hint_device_unit, acpi_hint_device_unit), @@ -479,6 +487,8 @@ acpi_attach(device_t dev) if (rman_init(&acpi_rman_mem) != 0) panic("acpi rman_init memory failed"); + resource_list_init(&sc->sysres_rl); + /* Initialise the ACPI mutex */ mtx_init(&acpi_mutex, "ACPI global lock", NULL, MTX_DEF); @@ -1294,6 +1304,20 @@ acpi_get_domain(device_t dev, device_t child, int *domain) return (bus_generic_get_domain(dev, child, domain)); } +static struct rman * +acpi_get_rman(device_t bus, int type, u_int flags) +{ + /* Only memory and IO resources are managed. */ + switch (type) { + case SYS_RES_IOPORT: + return (&acpi_rman_io); + case SYS_RES_MEMORY: + return (&acpi_rman_mem); + default: + return (NULL); + } +} + /* * Pre-allocate/manage all memory and IO resources. Since rman can't handle * duplicates, we merge any in the sysresource attach routine. @@ -1301,8 +1325,8 @@ acpi_get_domain(device_t dev, device_t child, int *domain) static int acpi_sysres_alloc(device_t dev) { + struct acpi_softc *sc = device_get_softc(dev); struct resource *res; - struct resource_list *rl; struct resource_list_entry *rle; struct rman *rm; device_t *children; @@ -1320,28 +1344,21 @@ acpi_sysres_alloc(device_t dev) } free(children, M_TEMP); - rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); - STAILQ_FOREACH(rle, rl, link) { + STAILQ_FOREACH(rle, &sc->sysres_rl, link) { if (rle->res != NULL) { device_printf(dev, "duplicate resource for %jx\n", rle->start); continue; } /* Only memory and IO resources are valid here. */ - switch (rle->type) { - case SYS_RES_IOPORT: - rm = &acpi_rman_io; - break; - case SYS_RES_MEMORY: - rm = &acpi_rman_mem; - break; - default: + rm = acpi_get_rman(dev, rle->type, 0); + if (rm == NULL) continue; - } /* Pre-allocate resource and add to our rman pool. */ - res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, rle->type, - &rle->rid, rle->start, rle->start + rle->count - 1, rle->count, 0); + res = bus_alloc_resource(dev, rle->type, + &rle->rid, rle->start, rle->start + rle->count - 1, rle->count, + RF_ACTIVE | RF_UNMAPPED); if (res != NULL) { rman_manage_region(rm, rman_get_start(res), rman_get_end(res)); rle->res = res; @@ -1542,63 +1559,39 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, * from our system resource regions. */ if (res == NULL && start + count - 1 == end) - res = acpi_alloc_sysres(child, type, rid, start, end, count, flags); + res = bus_generic_rman_alloc_resource(bus, child, type, rid, start, end, + count, flags); return (res); } -/* - * Attempt to allocate a specific resource range from the system - * resource ranges. Note that we only handle memory and I/O port - * system resources. - */ -struct resource * -acpi_alloc_sysres(device_t child, int type, int *rid, rman_res_t start, - rman_res_t end, rman_res_t count, u_int flags) +static bool +acpi_is_resource_managed(device_t bus, int type, struct resource *r) { - struct rman *rm; - struct resource *res; - - switch (type) { - case SYS_RES_IOPORT: - rm = &acpi_rman_io; - break; - case SYS_RES_MEMORY: - rm = &acpi_rman_mem; - break; - default: - return (NULL); - } + struct rman *rm; - KASSERT(start + count - 1 == end, ("wildcard resource range")); - res = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, - child); - if (res == NULL) - return (NULL); - - rman_set_rid(res, *rid); - - /* If requested, activate the resource using the parent's method. */ - if (flags & RF_ACTIVE) - if (bus_activate_resource(child, type, *rid, res) != 0) { - rman_release_resource(res); - return (NULL); - } - - return (res); + rm = acpi_get_rman(bus, type, 0); + if (rm == NULL) + return (false); + return (rman_is_region_manager(r, rm)); } -static int -acpi_is_resource_managed(int type, struct resource *r) +static struct resource * +acpi_managed_resource(device_t bus, int type, struct resource *r) { + struct acpi_softc *sc = device_get_softc(bus); + struct resource_list_entry *rle; - /* We only handle memory and IO resources through rman. */ - switch (type) { - case SYS_RES_IOPORT: - return (rman_is_region_manager(r, &acpi_rman_io)); - case SYS_RES_MEMORY: - return (rman_is_region_manager(r, &acpi_rman_mem)); - } - return (0); + KASSERT(acpi_is_resource_managed(bus, type, r), + ("resource %p is not suballocated", r)); + + STAILQ_FOREACH(rle, &sc->sysres_rl, link) { + if (rle->type != type || rle->res == NULL) + continue; + if (rman_get_start(r) >= rman_get_start(rle->res) && + rman_get_end(r) <= rman_get_end(rle->res)) + return (rle->res); + } + return (NULL); } static int @@ -1606,7 +1599,7 @@ acpi_adjust_resource(device_t bus, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end) { - if (acpi_is_resource_managed(type, r)) + if (acpi_is_resource_managed(bus, type, r)) return (rman_adjust_resource(r, start, end)); return (bus_generic_adjust_resource(bus, child, type, r, start, end)); } @@ -1615,20 +1608,12 @@ static int acpi_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - int ret; - /* * If this resource belongs to one of our internal managers, * deactivate it and release it to the local pool. */ - if (acpi_is_resource_managed(type, r)) { - if (rman_get_flags(r) & RF_ACTIVE) { - ret = bus_deactivate_resource(child, type, rid, r); - if (ret != 0) - return (ret); - } - return (rman_release_resource(r)); - } + if (acpi_is_resource_managed(bus, type, r)) + return (bus_generic_rman_release_resource(bus, child, type, rid, r)); return (bus_generic_rl_release_resource(bus, child, type, rid, r)); } @@ -1648,6 +1633,69 @@ acpi_delete_resource(device_t bus, device_t child, int type, int rid) resource_list_delete(rl, type, rid); } +static int +acpi_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + if (acpi_is_resource_managed(bus, type, r)) + return (bus_generic_rman_activate_resource(bus, child, type, + rid, r)); + return (bus_generic_activate_resource(bus, child, type, rid, r)); +} + +static int +acpi_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + if (acpi_is_resource_managed(bus, type, r)) + return (bus_generic_rman_deactivate_resource(bus, child, type, + rid, r)); + return (bus_generic_deactivate_resource(bus, child, type, rid, r)); +} + +static int +acpi_map_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map_request *argsp, struct resource_map *map) +{ + struct resource_map_request args; + struct resource *sysres; + rman_res_t length, start; + int error; + + if (!acpi_is_resource_managed(bus, type, r)) + return (bus_generic_map_resource(bus, child, type, r, argsp, + map)); + + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); + + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); + + sysres = acpi_managed_resource(bus, type, r); + if (sysres == NULL) + return (ENOENT); + + args.offset = start - rman_get_start(sysres); + args.length = length; + return (bus_generic_map_resource(bus, child, type, sysres, &args, map)); +} + +static int +acpi_unmap_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map *map) +{ + if (acpi_is_resource_managed(bus, type, r)) { + r = acpi_managed_resource(bus, type, r); + if (r == NULL) + return (ENOENT); + } + return (bus_generic_unmap_resource(bus, child, type, r, map)); +} + /* Allocate an IO port or memory resource, given its GAS. */ int acpi_bus_alloc_gas(device_t dev, int *type, int *rid, ACPI_GENERIC_ADDRESS *gas, diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index b845fd146f67..6b77e74d95f1 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -737,8 +737,6 @@ acpi_res_set_end_dependent(device_t dev, void *context) * private rman. */ -static int acpi_sysres_rid = 100; - static int acpi_sysres_probe(device_t dev); static int acpi_sysres_attach(device_t dev); @@ -780,6 +778,7 @@ static int acpi_sysres_attach(device_t dev) { device_t bus; + struct acpi_softc *bus_sc; struct resource_list_entry *bus_rle, *dev_rle; struct resource_list *bus_rl, *dev_rl; int done, type; @@ -794,7 +793,8 @@ acpi_sysres_attach(device_t dev) */ bus = device_get_parent(dev); dev_rl = BUS_GET_RESOURCE_LIST(bus, dev); - bus_rl = BUS_GET_RESOURCE_LIST(device_get_parent(bus), bus); + bus_sc = acpi_device_get_parent_softc(dev); + bus_rl = &bus_sc->sysres_rl; STAILQ_FOREACH(dev_rle, dev_rl, link) { if (dev_rle->type != SYS_RES_IOPORT && dev_rle->type != SYS_RES_MEMORY) continue; @@ -834,7 +834,7 @@ acpi_sysres_attach(device_t dev) /* If we didn't merge with anything, add this resource. */ if (bus_rle == NULL) - bus_set_resource(bus, type, acpi_sysres_rid++, start, count); + resource_list_add_next(bus_rl, type, start, end, count); } /* After merging/moving resources to the parent, free the list. */ diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index bb969821b945..2322ab96014b 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -78,6 +78,9 @@ struct acpi_softc { struct apm_clone_data *acpi_clone; /* Pseudo-dev for devd(8). */ STAILQ_HEAD(,apm_clone_data) apm_cdevs; /* All apm/apmctl/acpi cdevs. */ struct callout susp_force_to; /* Force suspend if no acks. */ + + /* System Resources */ + struct resource_list sysres_rl; }; struct acpi_device { @@ -438,9 +441,6 @@ ACPI_STATUS acpi_lookup_irq_resource(device_t dev, int rid, struct resource *res, ACPI_RESOURCE *acpi_res); ACPI_STATUS acpi_parse_resources(device_t dev, ACPI_HANDLE handle, struct acpi_parse_resource_set *set, void *arg); -struct resource *acpi_alloc_sysres(device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, - u_int flags); /* ACPI event handling */ UINT32 acpi_event_power_button_sleep(void *context); From nobody Fri Feb 9 18:44:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWjSV6Mfpz5B8G9; Fri, 9 Feb 2024 18:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TWjSV4BZbz4g78; Fri, 9 Feb 2024 18:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9E8f2Cm+nOKydaFd8xk3p5L/0RRsJK2VmMxjl//Kv7k=; b=J5QSQyFNVmzwdDHDQmHNXlDS+oalxVy+ybMZnX18Gh6L3fQO6kz8yWe1pNRGyJ62pOc4T7 h7D4uXa8pe+9nUfQ6aiUTn7IKxGqD7KJn8lJ85Nr/RRKjHrTXVAEpiGStsg5xFDL7bmiuy hhOi4FFM3Yc6ZsqoKHabBfpUv3h104hv3Y2rtxpthgImZPFsjZZRjn+/UsZKa3+x7U4Xd1 EQyKrz5AhVd4DaTYaphGoSmzAg3YL6RYwUFeSCcnr/ysiHoGn02zHops992WuVPQcxwc5q Apo6sZatJLcFsCMv7Yl4aZTNEsIwjzyGl0o18sG2wTJ0EJ/LsT7vl6/0Qf6MIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9E8f2Cm+nOKydaFd8xk3p5L/0RRsJK2VmMxjl//Kv7k=; b=J0ZtdbqfrQIowCarW7oNzIZS+ikdVRjxh902AvIWkm3jZCuQ7JomurdfUJJNd2oFyC4x9T lH27FVnLAfyaPNiYqDlg6fiXTizWw3lpraNAoIekjSKu7rIK0OHmyQgR7+WqooT87Gbsp9 xIkFo5r4XI5o0o1T+4RQgU5j+HDgouFz2zAZ+6j3OPf5vMaQDxRphnErBQv9ih1MjAnMmy BG9sajN7navY9ubXm3r+hSZwXn+jypwtsCixVHmbbFGB88ep4KfBFltGu9MxNlD5aU78Mr GqjTTiwoL2mgiMlEmYC/PgpvMS+Wffq+p/P2FvKVRYi7iSAngB/9EiMxBQCxBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707504266; a=rsa-sha256; cv=none; b=ZSXnB05UTXIY2aZH2hU2BBc9kopD2UJ46SKZ1v+pqtxdmlFR4Er1coXoCP1+nbOyaxNmLp zDJsBpfBf0seb8iIaS8te6kN5zEEZxloaqLFZwMthOwYaVtMYCGtLZypN9uH3p0yw+Xor6 DNEy0IhZzYvDq25tS+9+dSBwD/MsbYHeZLKl3D3YihujKYGyrNsw8cURXsalQH9gAQNBYu wdx/QvyNDxJA/G5Av2mPl3yJ762CDCm7fXcY+6bR+RHLu8b1mNB2NE26C27F4WZGp2ETj/ 19jsIMoIRD/xgkiTXfGaOtVMew7BHBMJTj71ir9Hj6Zuoe6O6d6TOWhGpAtVHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWjSV3G4rzkPt; Fri, 9 Feb 2024 18:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 419IiQ8q054875; Fri, 9 Feb 2024 18:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419IiQM5054872; Fri, 9 Feb 2024 18:44:26 GMT (envelope-from git) Date: Fri, 9 Feb 2024 18:44:26 GMT Message-Id: <202402091844.419IiQM5054872@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: 03719c651430 - main - pcib: Make various bus methods private to pci_pci.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03719c651430d46cd8aa95aead02a7f0c43dcb04 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=03719c651430d46cd8aa95aead02a7f0c43dcb04 commit 03719c651430d46cd8aa95aead02a7f0c43dcb04 Author: John Baldwin AuthorDate: 2024-02-09 18:27:45 +0000 Commit: John Baldwin CommitDate: 2024-02-09 18:27:45 +0000 pcib: Make various bus methods private to pci_pci.c These functions are not used by pcib subclasses so do not need to be exposed in pcib_private.h. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43688 --- sys/dev/pci/pci_pci.c | 18 +++++++++++++----- sys/dev/pci/pcib_private.h | 10 ---------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 6ef04251cd74..2659e64f364d 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -60,6 +60,15 @@ static int pcib_probe(device_t dev); static int pcib_suspend(device_t dev); static int pcib_resume(device_t dev); + +static bus_child_present_t pcib_child_present; +static bus_alloc_resource_t pcib_alloc_resource; +#ifdef NEW_PCIB +static bus_adjust_resource_t pcib_adjust_resource; +static bus_release_resource_t pcib_release_resource; +#endif +static int pcib_reset_child(device_t dev, device_t child, int flags); + static int pcib_power_for_sleep(device_t pcib, device_t dev, int *pstate); static int pcib_ari_get_id(device_t pcib, device_t dev, @@ -81,7 +90,6 @@ static void pcib_pcie_dll_timeout(void *arg, int pending); #endif static int pcib_request_feature_default(device_t pcib, device_t dev, enum pci_feature feature); -static int pcib_reset_child(device_t dev, device_t child, int flags); static device_method_t pcib_methods[] = { /* Device interface */ @@ -2269,7 +2277,7 @@ updatewin: * We have to trap resource allocation requests and ensure that the bridge * is set up to, or capable of handling them. */ -struct resource * +static struct resource * pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { @@ -2358,7 +2366,7 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, return (r); } -int +static int pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end) { @@ -2426,7 +2434,7 @@ pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, return (rman_adjust_resource(r, start, end)); } -int +static int pcib_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { @@ -2449,7 +2457,7 @@ pcib_release_resource(device_t dev, device_t child, int type, int rid, * We have to trap resource allocation requests and ensure that the bridge * is set up to, or capable of handling them. */ -struct resource * +static struct resource * pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h index d8a354c0e498..bc0b48d9f031 100644 --- a/sys/dev/pci/pcib_private.h +++ b/sys/dev/pci/pcib_private.h @@ -178,19 +178,9 @@ void pcib_bridge_init(device_t dev); #ifdef NEW_PCIB const char *pcib_child_name(device_t child); #endif -int pcib_child_present(device_t dev, device_t child); int pcib_detach(device_t dev); int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); int pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); -struct resource *pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, - rman_res_t count, u_int flags); -#ifdef NEW_PCIB -int pcib_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, rman_res_t start, rman_res_t end); -int pcib_release_resource(device_t dev, device_t child, int type, int rid, - struct resource *r); -#endif int pcib_maxslots(device_t dev); int pcib_maxfuncs(device_t dev); int pcib_route_interrupt(device_t pcib, device_t dev, int pin); From nobody Fri Feb 9 18:44:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWjSW6mCLz5B7ts; Fri, 9 Feb 2024 18:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TWjSW58XHz4ftC; Fri, 9 Feb 2024 18:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ybLcRL6IfQDD7eA6zA3ai4nCYgFRYPbw0d7OzXn1Odc=; b=IW1eb68mJFJJO6hX5cLUdnQdCOlk1ynXcOA199U+FdM0phaW5ejbLyKvRamspq7FvBj7Tz UYGF3Dx46iZnYDyfGR8XrbhQoJabvl18bIvqa5a7KDeKSclGvKZeBYKQq90V3r4WhhvIf3 0XDzqdVqvNDeS59hQRDnqP8ut6D9iy92TDnf+Y8idj4o4XphZVdk+kXut36r9loqTV9iQl jPtEhCIZ1S/jtztXQf2/1HoGrhtAwOAhlMS8Q+Q4gH9JLYUXAXiRYIfuVTXvwb7tMpAo63 SiKK7pBh5DCDjntkZlTD+FUo5uPJZL/n4Gjjd/F9m3UaqCFGREJ4yq1lvSguaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ybLcRL6IfQDD7eA6zA3ai4nCYgFRYPbw0d7OzXn1Odc=; b=GBOHRtxON/j7MyQ0GOa4NKwTskaXYVAxAaoxjbG7XLlQxM7U918OtatUZ7F4O7JVqiBwNv HrrVWou3CPesLhPBxOGesoZ2ehM7SojeVdfbNumxZKQ2sA7SpRo9vr63muyOGioJf1rfAn 85KeCKlVJcFhteyWgJkKihXbrCGKWoNGUB8nZjwb4NluGgZRHop/uESAHJg0NvzpNTC//U 8lp86c3TsQe7MWKNSrMo7ILMsx9L6l8JfASBvXVPY2+7yvv2o7kF40cZT/Mq0Nkk6QrEDW 8BTx/3SmfsHqtd3QOc0qgjWhEOmGp5NFV3Awn245ViO15vtTkB2uH/5ejkmuJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707504267; a=rsa-sha256; cv=none; b=UVpEReTLVVDfAVqfa4CYYrxrR7zMAMldBu1rLpG3p64wM3uewcddqB43pf3ijDHE7cXUB1 zCx1AMgp6O+7sc+Dvn8UZBGPgUwLq42fXCrTYhhbCCI7IM1LIlZifsm8Cjtx5Mp5xL39o7 nanbhDfGah1Kzu1nlow9PmdWvFmvwULqf8nfXT6sftxdn75Zo6e8AkI2BDX/ZWRFuuuHuk agYVolTaWerJvZ2ZRnGIkaHJMghTfPh+D2whCPZpdMvVyWjYejEt7vhOtPkJfbItACcc7N sMO8sDQAfQV3BgSYDlw4Xbh5S0wPc7xMh0Ey8kRFUBKhbPegEv3W5ZucwnoqHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWjSW4Ft5zkmM; Fri, 9 Feb 2024 18:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 419IiRUU054920; Fri, 9 Feb 2024 18:44:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419IiRZ6054917; Fri, 9 Feb 2024 18:44:27 GMT (envelope-from git) Date: Fri, 9 Feb 2024 18:44:27 GMT Message-Id: <202402091844.419IiRZ6054917@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: 36efc64a6bc6 - main - pcib: Allocate PCI_RES_BUS resources with RF_ACTIVE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36efc64a6bc6318eefd9baf88cbf511e91db80c8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=36efc64a6bc6318eefd9baf88cbf511e91db80c8 commit 36efc64a6bc6318eefd9baf88cbf511e91db80c8 Author: John Baldwin AuthorDate: 2024-02-09 18:27:45 +0000 Commit: John Baldwin CommitDate: 2024-02-09 18:27:45 +0000 pcib: Allocate PCI_RES_BUS resources with RF_ACTIVE The allocated bus numbers are in use so should be activated when allocated. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43689 --- sys/dev/pci/pci_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 2659e64f364d..5286d4e82e53 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -654,14 +654,14 @@ pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count) */ rid = 0; bus->res = bus_alloc_resource_anywhere(dev, PCI_RES_BUS, &rid, - min_count, 0); + min_count, RF_ACTIVE); if (bus->res == NULL) { /* * Fall back to just allocating a range of a single bus * number. */ bus->res = bus_alloc_resource_anywhere(dev, PCI_RES_BUS, &rid, - 1, 0); + 1, RF_ACTIVE); } else if (rman_get_size(bus->res) < min_count) /* * Attempt to grow the existing range to satisfy the From nobody Fri Feb 9 18:44:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWjSY2QJhz5B7tw; Fri, 9 Feb 2024 18:44:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TWjSX6JMXz4fmx; Fri, 9 Feb 2024 18:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nl36KhDMGuKLI/KZBct1eVMd1MCnECxRB14jITkgV08=; b=Y0Att4xqhrHK8DF/eWpqqPFB0ANZWWrrn4178XjCd7Kt0am1dl/pGVjbF5gpf+eyczk/P7 wrZ1FJL87cWdIkZq8xnSSd2SmLbH1rueZi7EcqFm0hK+dBMUkV2Sb7ZWsFnIe08IQK9pSI 0vFle7/moWivVtswpMsNPjX1sUSft7qqrS9l2jQud7Az377SHJqKLsyy+pEqcT9A9rL5B9 soMeuKqJPxpCp5F7JGLCA8dt4Bn8oicW95JunJTca4fUYECPfrDkTUt/JCFWOU02d1pGEN bHuSu+Yy5NBPchjPNLyE7s+i4VBnbNPcoGYpXsWSSuC4vJxa6Oo22cLXI9QlMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707504268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nl36KhDMGuKLI/KZBct1eVMd1MCnECxRB14jITkgV08=; b=O+31H/0SFn+YQAxlacpEcPp5zhBwn/D/C+4U8ThjDyInRPYqwD7sYDyxVdbPB9Da+kK0Ze mE8yED19exkhNRz2Ps7a9UehsBy04eetRanwHYzDwjM1ogkJK8V/5nLH1Wp2pEV4tbBaRx 5CTADPh+gik14c2yqJjnlMmf1SZtDWfpRw8VKKc+Yci5+MZEhsYFkuChsSrqkWWcziMkhb hZho2qdqxPTnoHrhpoqG0+2WYDfDl/7bKHO4xI7zq0E92FIieL3bEq7f0GOGbDvmrGdKBT YbInqvjw1RDPsoLYSqmwdVuIQG0r67Ap5S7wDKv6Awplexj4Oabqu1W0r2NeZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707504268; a=rsa-sha256; cv=none; b=fcKKR9HBC1///AH/4Xtwv0mAqQMRXPLQO4qTJQBpwHwhqia0H3kFXRh3whn49MtrBgvIU/ Lmgm6lN6VqLRhnH5PMBudcSD8KnMyZAMgEqiahxE19h/C+O9W891QIY9AegCR0UEoH7k+C Mw869t+lF4sXRdY89ncuvstlwRs4jAIYlxilv2wbiR6Og4AxpbACqCfQ0vXrKbnNe7EGyG /mNn9prdZMacMvQpKk/WTDratDc8aLDoIkpVb+nmmn6QwF3lq0Cq7sIduIGxdzH98nGh/E nnK2NzuDAwiR93NNSL5EoppktOLcHAOezQTRewT032uo5B1dOr1M1O9HVRMmgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWjSX5KRMzkgf; Fri, 9 Feb 2024 18:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 419IiSLF054974; Fri, 9 Feb 2024 18:44:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419IiS42054971; Fri, 9 Feb 2024 18:44:28 GMT (envelope-from git) Date: Fri, 9 Feb 2024 18:44:28 GMT Message-Id: <202402091844.419IiS42054971@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: b377ff8110e3 - main - pcib: Refine handling of resources allocated from bridge windows List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b377ff8110e3489eb6e6b920b51a2384dfc4eb0b Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b377ff8110e3489eb6e6b920b51a2384dfc4eb0b commit b377ff8110e3489eb6e6b920b51a2384dfc4eb0b Author: John Baldwin AuthorDate: 2024-02-09 18:27:45 +0000 Commit: John Baldwin CommitDate: 2024-02-09 18:27:45 +0000 pcib: Refine handling of resources allocated from bridge windows Fix a long-standing layering violation in the original NEW_PCIB code by not passing suballocated resources up to the parent bus for activation and mapping. Instead, handle activation and mapping of sub-allocated resources in this driver. When mapping resources, request a mapping from a suitable sub-region of the resource allocated from the parent bus for the associated bridge window. Note that this does require passing RF_ACTIVE (with RF_UNMAPPED) when allocating bridge window resources from the parent. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43690 --- sys/dev/pci/pci_pci.c | 130 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 126 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 5286d4e82e53..02fa8cf1fb9e 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -66,6 +66,10 @@ static bus_alloc_resource_t pcib_alloc_resource; #ifdef NEW_PCIB static bus_adjust_resource_t pcib_adjust_resource; static bus_release_resource_t pcib_release_resource; +static bus_activate_resource_t pcib_activate_resource; +static bus_deactivate_resource_t pcib_deactivate_resource; +static bus_map_resource_t pcib_map_resource; +static bus_unmap_resource_t pcib_unmap_resource; #endif static int pcib_reset_child(device_t dev, device_t child, int flags); @@ -108,12 +112,16 @@ static device_method_t pcib_methods[] = { #ifdef NEW_PCIB DEVMETHOD(bus_adjust_resource, pcib_adjust_resource), DEVMETHOD(bus_release_resource, pcib_release_resource), + DEVMETHOD(bus_activate_resource, pcib_activate_resource), + DEVMETHOD(bus_deactivate_resource, pcib_deactivate_resource), + DEVMETHOD(bus_map_resource, pcib_map_resource), + DEVMETHOD(bus_unmap_resource, pcib_unmap_resource), #else DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), -#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), +#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_reset_child, pcib_reset_child), @@ -381,7 +389,7 @@ alloc_ranges(rman_res_t start, rman_res_t end, void *arg) device_printf(as->sc->dev, "allocating non-ISA range %#jx-%#jx\n", start, end); as->res[as->count] = bus_alloc_resource(as->sc->dev, SYS_RES_IOPORT, - &rid, start, end, end - start + 1, 0); + &rid, start, end, end - start + 1, RF_ACTIVE | RF_UNMAPPED); if (as->res[as->count] == NULL) as->error = ENXIO; else @@ -454,7 +462,7 @@ pcib_alloc_window(struct pcib_softc *sc, struct pcib_window *w, int type, else { rid = w->reg; res = bus_alloc_resource(sc->dev, type, &rid, w->base, w->limit, - w->limit - w->base + 1, flags); + w->limit - w->base + 1, flags | RF_ACTIVE | RF_UNMAPPED); if (res != NULL) pcib_add_window_resources(w, &res, 1); } @@ -2001,7 +2009,7 @@ pcib_alloc_new_window(struct pcib_softc *sc, struct pcib_window *w, int type, count = roundup2(count, (rman_res_t)1 << w->step); rid = w->reg; res = bus_alloc_resource(sc->dev, type, &rid, start, end, count, - flags & ~RF_ACTIVE); + flags | RF_ACTIVE | RF_UNMAPPED); if (res == NULL) return (ENOSPC); pcib_add_window_resources(w, &res, 1); @@ -2452,6 +2460,120 @@ pcib_release_resource(device_t dev, device_t child, int type, int rid, } return (bus_generic_release_resource(dev, child, type, rid, r)); } + +static int +pcib_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct pcib_softc *sc = device_get_softc(dev); + struct resource_map map; + int error; + + if (!pcib_is_resource_managed(sc, type, r)) + return (bus_generic_activate_resource(dev, child, type, rid, + r)); + + error = rman_activate_resource(r); + if (error != 0) + return (error); + + if ((rman_get_flags(r) & RF_UNMAPPED) == 0 && + (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) { + error = BUS_MAP_RESOURCE(dev, child, type, r, NULL, &map); + if (error != 0) { + rman_deactivate_resource(r); + return (error); + } + + rman_set_mapping(r, &map); + } + return (0); +} + +static int +pcib_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct pcib_softc *sc = device_get_softc(dev); + struct resource_map map; + int error; + + if (!pcib_is_resource_managed(sc, type, r)) + return (bus_generic_deactivate_resource(dev, child, type, rid, + r)); + + error = rman_deactivate_resource(r); + if (error != 0) + return (error); + + if ((rman_get_flags(r) & RF_UNMAPPED) == 0 && + (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) { + rman_get_mapping(r, &map); + BUS_UNMAP_RESOURCE(dev, child, type, r, &map); + } + return (0); +} + +static struct resource * +pcib_find_parent_resource(struct pcib_window *w, struct resource *r) +{ + for (int i = 0; i < w->count; i++) { + if (rman_get_start(w->res[i]) <= rman_get_start(r) && + rman_get_end(w->res[i]) >= rman_get_end(r)) + return (w->res[i]); + } + return (NULL); +} + +static int +pcib_map_resource(device_t dev, device_t child, int type, struct resource *r, + struct resource_map_request *argsp, struct resource_map *map) +{ + struct pcib_softc *sc = device_get_softc(dev); + struct resource_map_request args; + struct pcib_window *w; + struct resource *pres; + rman_res_t length, start; + int error; + + w = pcib_get_resource_window(sc, type, r); + if (w == NULL) + return (bus_generic_map_resource(dev, child, type, r, argsp, + map)); + + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); + + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); + + pres = pcib_find_parent_resource(w, r); + if (pres == NULL) + return (ENOENT); + + args.offset = start - rman_get_start(pres); + args.length = length; + return (bus_generic_map_resource(dev, child, type, pres, &args, map)); +} + +static int +pcib_unmap_resource(device_t dev, device_t child, int type, struct resource *r, + struct resource_map *map) +{ + struct pcib_softc *sc = device_get_softc(dev); + struct pcib_window *w; + + w = pcib_get_resource_window(sc, type, r); + if (w != NULL) { + r = pcib_find_parent_resource(w, r); + if (r == NULL) + return (ENOENT); + } + return (bus_generic_unmap_resource(dev, child, type, r, map)); +} #else /* * We have to trap resource allocation requests and ensure that the bridge From nobody Fri Feb 9 19:57:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWl4M6T1zz5BFQT; Fri, 9 Feb 2024 19:57: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 4TWl4M5wPCz4tLT; Fri, 9 Feb 2024 19:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707508627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S99A87N8ch8RXnhMPOnvZcQm1LAFqiRcWd7GLiWpKcM=; b=PYXGkJvGJ/uSE1uN+mvS44zL0QBiujCzc5vHQGO2gKcMw93q3WJb4foreG16trz9xjlbmw PVtG+UFQNsDxsSmaLWwabJoQcNpcdkMVR+Bpaomv+W1HBtLGcsmqenkzRezSE9Wm5ox/nW dGWh4P0J4Ie9y0jBo/B/q+K0ODYE135VL3Pk5/bvJuCJyFVBluP834S9aLssFeFLWFdo4V iFr2KWew+TWLwHZRTpdCI1QdY5fMQvnwe8xndHiVIISe7LWFZbjdiE2ORWkQ9MZC8tvj6A H1gG572X8bCGK08GvG+ozeJWzX6LKncB4rOdj0ASP41AlL/hTMw+dRc928oLfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707508627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S99A87N8ch8RXnhMPOnvZcQm1LAFqiRcWd7GLiWpKcM=; b=uD+kvMvh9DDnX4H7qVOopZ8FOraD1cMXPB7nXAZD2hf1hDeGZFKJZSjAyIQZgEL0HSZqPp Z5aYUCgSBz0XklOdrHUZCF/CQS9BmdgRY0kC5BrzR1+QTmWa9f2wnaFPdde3bjVQgl31yw brq7tBMefO5gmH+hSfP0n3CmqAOCvE/QzxyPxXQ92uEbLeaDZR2ofYxYr3wbdjhjHzCL+L y8CsSoxU0/o0HNQNAO2ig8wdfvO39TfcSjmouL9ThpjKamKg/oxK0sHtQe8pCvL6Um+mNk cJqKr8JM8/QqO9WqAUs1G1L2DPHDpytQ5maj7QMj26lDAraeYXJ3J4wiXjYBWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707508627; a=rsa-sha256; cv=none; b=kzqbIRIUMCewDB3PISqvQyixz1ePAJU9bkUDCyscoQSKSb6/ptu4YGC4e5COW08aWzYDPU yksyo/VlRp7qsQ0sdGaiI0q2OiwJ76SBkZtZDiwmjVrSu+SMDaSE0THfGzBMKL5r4DcARR CP1coh9AZAOWSsYEojuISOy4nr1DYgHYbGGYHVi5MTXoHN5eDhH8U45e96sidZeCj7mhH1 sZ2vAfq5HsqujlmOys0sxg2w/ATjIRLj1JfnZLWeFxQeRI2KoOr2Tpn+mFJjgLCXTQH66n oYJvKGmL4VqFBxlFDMdbywxlCnnr+auQsAEOpvaapVzGKzY5yPq0NX/BlEqeJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWl4M4z60zmXq; Fri, 9 Feb 2024 19:57: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 419Jv71t072530; Fri, 9 Feb 2024 19:57:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 419Jv7tl072527; Fri, 9 Feb 2024 19:57:07 GMT (envelope-from git) Date: Fri, 9 Feb 2024 19:57:07 GMT Message-Id: <202402091957.419Jv7tl072527@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: eb86c6c5b462 - main - cam: Check if cam_simq_alloc fails for the xpt bus during module init List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb86c6c5b462c996e44c45ba496937b75ef22da3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eb86c6c5b462c996e44c45ba496937b75ef22da3 commit eb86c6c5b462c996e44c45ba496937b75ef22da3 Author: John Baldwin AuthorDate: 2024-02-09 19:53:43 +0000 Commit: John Baldwin CommitDate: 2024-02-09 19:53:43 +0000 cam: Check if cam_simq_alloc fails for the xpt bus during module init This is very unlikely to fail (and if it does, CAM isn't going to work regardless), but fail with an error rather than a gauranteed panic via NULL pointer dereference. PR: 276770 Reported by: Qiushi --- sys/cam/cam_xpt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 2acb106b087c..68aa6faae9a3 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -908,6 +908,8 @@ xpt_init(void *dummy) * perform other XPT functions. */ devq = cam_simq_alloc(16); + if (devq == NULL) + return (ENOMEM); xpt_sim = cam_sim_alloc(xptaction, xptpoll, "xpt", From nobody Sat Feb 10 01:15:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TWt7L3V97z58V6s; Sat, 10 Feb 2024 01:15: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 4TWt7L2BCFz4bq6; Sat, 10 Feb 2024 01:15:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707527710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2gfEOyclzj/mGrIe6tVOgfCBaI1VjVTpMc1YymaXaQ=; b=LXDnFY0ICTO580apc3A1JMLDZUIDVHky2Z+MH5QkWvdHijA52Da4rrm/ygZ1BsNP32SjZp 02eMhj/n3DSyPsDrlGgm7J/sQ+soAaKV7N2H7tLd4ZUY7EUqpHzxj456biASU67JHn2d3x +JBY72yEo1gXyblaVvHVMd2rFbJLpZadddA5BWo/sVDZUQuyTHLoGgBcPeSvEVpEfY9tNs TyUal1xsbaDy3W3Fheszoxeb/LMMHuTDliLZ5DR+QpmcT03jrtLEPs+uAe+wTHHVlw/h+r 1rtbzTto89olmaEkDxmJlBpICGYIwG5+jxAEtfluAv/dz18yWxEG3qGrva9UXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707527710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2gfEOyclzj/mGrIe6tVOgfCBaI1VjVTpMc1YymaXaQ=; b=f8xISqCXhVivN8SpY/wBG//4et4GaGJT6Y8peTqzy4E4338hQlHYDoMakLf8DNSpxzQH8t dm3d7tWc4Clsgjmta+Qd6l4J1JShZT/i5hxJrx0HLgrgUcSkcyikdm0oHRh/joKsv6YhEo Y2+ndNyWKVx61jSX32PD4Vngt14tkPDY9OeXWK42e7jFUC2bUhk7hoWblGAn9TfvWvHBMt EKmTp4EErJtSlLWpvQoN90TA81LI+0ncWeN9xPGm3+GgrSgUHW3ImL6t8nPd/rNmxIDnq+ DyJQMaBgYs+OIfXgbt+gWR0xts6DqRigLMUnbTOj6PgfIWyZ0kzcxMJUoog69w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707527710; a=rsa-sha256; cv=none; b=Ew8JPYn3Sul9uZ8zhg2fO/JdmBJtCwvusF5+SabjB5SDInDd5cIiiPXLo/1lN2K//53c/Z kcQJjbULd5txzevzyOzLmSSdaFJYqmIABpMp8JMVODfROJaz7R0fHGK6DIGFDqJAZG2P57 n/QeKVQlgUG50Fd4X6FlQkXrfUBmHufRDeDOwYlJKMJnUt3mrydvkxA5CLyqtt4fpreN2Y w6K/b9ynuaGMi7IrX8dCE/IjpEOQ1Qwyh8ywwmpLjLm6blDfNtIvUTSlGGnu4Znha7J46L liGfHjnoIp0Fqk7ZYPuL4yu+TZm/Eyg0WSwupBK3fZddHWcQPk3QKZf0K8HNnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TWt7L1FvzzwYk; Sat, 10 Feb 2024 01:15: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 41A1FA5W007279; Sat, 10 Feb 2024 01:15:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41A1FAXC007276; Sat, 10 Feb 2024 01:15:10 GMT (envelope-from git) Date: Sat, 10 Feb 2024 01:15:10 GMT Message-Id: <202402100115.41A1FAXC007276@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: 8ecb74942506 - main - ichsmb: add Cedar Fork PCI id List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ecb749425067c209b5e84812c66a88725281350 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8ecb749425067c209b5e84812c66a88725281350 commit 8ecb749425067c209b5e84812c66a88725281350 Author: Kristof Provost AuthorDate: 2024-02-09 16:52:41 +0000 Commit: Kristof Provost CommitDate: 2024-02-10 01:14:27 +0000 ichsmb: add Cedar Fork PCI id Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/ichsmb/ichsmb_pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c index 4d4cc9be70e5..675a15daaf1b 100644 --- a/sys/dev/ichsmb/ichsmb_pci.c +++ b/sys/dev/ichsmb/ichsmb_pci.c @@ -108,6 +108,7 @@ #define ID_TIGERLAKE 0xa0a3 #define ID_TIGERLAKE2 0x43a3 #define ID_GEMINILAKE 0x31d4 +#define ID_CEDARFORK 0x18df #define ID_ICELAKE 0x34a3 #define ID_ALDERLAKE 0x7aa3 #define ID_ALDERLAKE2 0x51a3 @@ -204,6 +205,8 @@ static const struct pci_device_table ichsmb_devices[] = { PCI_DESCR("Intel Tiger Lake SMBus controller") }, { PCI_DEV(PCI_VENDOR_INTEL, ID_GEMINILAKE), PCI_DESCR("Intel Gemini Lake SMBus controller") }, + { PCI_DEV(PCI_VENDOR_INTEL, ID_CEDARFORK), + PCI_DESCR("Intel Cedar Fork SMBus controller") }, { PCI_DEV(PCI_VENDOR_INTEL, ID_ICELAKE), PCI_DESCR("Intel Ice Lake SMBus controller") }, { PCI_DEV(PCI_VENDOR_INTEL, ID_ALDERLAKE), From nobody Sat Feb 10 06:07:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TX0cd2nWhz590tx; Sat, 10 Feb 2024 06:07: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 4TX0cd2G8Mz494C; Sat, 10 Feb 2024 06:07:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707545249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r/nt8rKeVQ4WkRDYrqA6dMaen5N0aTXC3EoZZVHGD8I=; b=b48PqZwFfOl0AOp/B0939046RtS3nRE7fxTfPq6ELI3DNVS14AdX4XKwE308+bl9QMMYF2 YBFSE3elLGufq3qoBHLG5dhzJ4sT70efrCZDdtlP14pgqIZPQt4j6HdD0R556g4QkeIkHg sIctxgZ0IVg/nJGH9J76FI0d41t6Y/QPp7QHbuQIRs1Bj1druQRdbsUBnApjOaPvxFmu3p QAFppQJZLJCmKIAvrB20hXIcIkwO7Kvjf7oPdEt/M0+kUhNFcuf14CNC1+EU8mrGtSw4rK ZI9Fl/hsP6Mc4ayfpaNrlwMzC6axBH8lNnYtCQL27YwW09T4vEX435O3dUH4gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707545249; a=rsa-sha256; cv=none; b=sXQ54rc4RZAe/awsT9iCjtStHnm6dOTiYpKKh4vdkJbvbra16v1OA13jDzn9b2ZfNfvJRw f5aKCFsGbsi3sPeFMTuct4tAaW05CUPa8/JtAna3mzEI1pVC/6HRYuSzNI6nA4aoqk9g7X PvcuO83FIR9AkYjE/0UswjaGmv59Tq2bddOTWxLtdhuHNtbOjNAkKEbmKPgzz05gp++ZXE gkzRzTnRXcie5bXgIiXB4h7sFm3VlExi8VtbXg88OJZtSnQYnO2UZOJzoM+hS8AjPeupRy PpTdTlW2WApRCG+uJG77j9HCtyuNw9LmZ0jB36anzccrnpSuWaPDAAj6z3+i/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707545249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r/nt8rKeVQ4WkRDYrqA6dMaen5N0aTXC3EoZZVHGD8I=; b=NRdSdghxlCglQOru/9IDMugbe7AOTQoGUdjOJdhSvyx528939ZUmJVxdncHQ+x6DZaMLnQ 1z3MK00idE/aDS8Lu9r+QA0RLRtpb6Iq3YQ7yZUC5G9NQsM0wFgieiLHaEjV6HA0AVS3z2 E+4T6BtWDj/Axd5jNkSGFIEkKHmhdPuS8cf3fuNhwGlx3e4Kh/qn1yGuXLsKSpPa7Y/JgY Kdh2/X9QsPXpqUN5Y9VCOIF0oqpovnCXE+np4YBnjTakxeWzmf2CMARxk5337zzPCdoeb/ Ac2WvYm1rG+IP8Noa8TjrLTyCOXqO7qbdE1fP46Ytp+okDI+kav4AyF9Jr571A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TX0cd1Jflz14xV; Sat, 10 Feb 2024 06:07: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 41A67T8Y094622; Sat, 10 Feb 2024 06:07:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41A67TEX094619; Sat, 10 Feb 2024 06:07:29 GMT (envelope-from git) Date: Sat, 10 Feb 2024 06:07:29 GMT Message-Id: <202402100607.41A67TEX094619@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: 89c3cc20d643 - main - committers-src: Extremely belatedly add myself List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89c3cc20d643d9c77537d7aa1ff10ba218e76568 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=89c3cc20d643d9c77537d7aa1ff10ba218e76568 commit 89c3cc20d643d9c77537d7aa1ff10ba218e76568 Author: Jessica Clarke AuthorDate: 2024-02-10 06:07:14 +0000 Commit: Jessica Clarke CommitDate: 2024-02-10 06:07:14 +0000 committers-src: Extremely belatedly add myself --- share/misc/committers-src.dot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 9de6a783f3c4..6201c0c69894 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -232,6 +232,7 @@ johalun [label="Johannes Lundberg\njohalun@FreeBSD.org\n2019/01/19"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2011/01/21"] +jrtc27 [label="Jessica Clarke\njrtc27@FreeBSD.org\n2020/01/23"] jtl [label="Jonathan T. Looney\njtl@FreeBSD.org\n2015/10/26"] julian [label="Julian Elischer\njulian@FreeBSD.org\n1993/04/19"] jwd [label="John De Boskey\njwd@FreeBSD.org\n2000/05/19"] @@ -468,6 +469,7 @@ brooks -> bushman brooks -> jamie brooks -> theraven brooks -> arichardson +brooks -> jrtc27 bz -> anchie bz -> jamie @@ -643,6 +645,7 @@ jhb -> rnoland jhb -> rpokala jhb -> arichardson jhb -> scottph +jhb -> jrtc27 jhibbits -> alfredo jhibbits -> bdragon From nobody Sat Feb 10 09:33:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TX5Bv47Jvz59L7h; Sat, 10 Feb 2024 09:33: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 4TX5Bv3YkJz4ZKY; Sat, 10 Feb 2024 09:33:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707557639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xLQHwI1wtS2oygDPmfVPSeKeJoks8ladn6BCwLUVQHE=; b=MQ4XMgWmRLJ1lIAgQ8voqYPZXImt+kyn6W+B+ueRSoA0hcJEeqxcsLz1x+NNriSlEHy6D2 D8M7z8fSeLyJT/CYVUskcIMqwknp4HXwmMW1/jboKXrI3LaQvDHQnLGZDpFsZ7pJG+NWQ8 VX0X8J/VwjNnyIAliT/vttaM64XdXd6w39aWGz4R8neJsbXBuUCAgKGf3M73vDESjSdky8 ST7PYp37d9vBz4QQ/OzPYJPmfO5JVskLppNmFsLPDOX9CsYwWoy9biTemMBI9m1BPDDRCv tTfVAWnEDtt8sq+VhRlNYRQ+RXnVZzqfSPqVd46gXAf19FsmeqM78NjXTGHOYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707557639; a=rsa-sha256; cv=none; b=mR7zEZ/mP9lQnINqGvMXHhxZFbs0ls7tFqi4DbLkz9NGjAoNB3zrCAPp+g45vdaxsQ4knd 2dHQiJWNjN1xg0kPyuj/PyJBkNrnCqYRrgyEH60y2O2tPnWNpawSbwls0X3omA4W+ziq3D Y1ICuvCtxRZGHSBwyHAirDFCcm+ok00wZ0UFMGa3+VvAbLq/fQ7FdI1nh9XI0NHmV4RQII HwFf5t/1BBsVP6g8K8bIHRphGWpeK/1K0FrXtBQBii0hcy/npagbmRt3PNkVZvMSOyDk04 jDqlUr70XTHup/nG5IS79csu0WIR2L3CjCj++56rxbAAWlDlhKOZ2vCDmqdqug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707557639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xLQHwI1wtS2oygDPmfVPSeKeJoks8ladn6BCwLUVQHE=; b=gu9fHCIL2I5AU3PRHrqD+QbBmMtl+NhO5zsQsuNatHJRP+plWFfTJdXsiKNjnAfbO3zO5n e5TUbux8CGqzElqkqHf9aFH9wcyYMqOp9RPlR1D5xA0tcHd1rJ7LOJlPxslV2Vhlq+oZuI Rnnj3t/tlfbulCDYg15TMbozzZt739ddRdj2nIeOVk4DLBLOpntqgqomITkqBoK0+A7HPu ZLeFhrbu9omYPcJSD7J2hgZvhHD05tp8ztMYhTEwK8isTcF/4Xv3UYOl2aG2eIHpHF/1It L8Im3T1Td4G+QF4O70UuudmJQmDfF64cO2HQ+9pjgZGpTbiI6RjVwZW7lz3bcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TX5Bv2bksz19vj; Sat, 10 Feb 2024 09:33: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 41A9Xx9a044108; Sat, 10 Feb 2024 09:33:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41A9Xxf9044105; Sat, 10 Feb 2024 09:33:59 GMT (envelope-from git) Date: Sat, 10 Feb 2024 09:33:59 GMT Message-Id: <202402100933.41A9Xxf9044105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 3eeb22cb8194 - main - tcp: clean scoreboard when releasing the socket buffer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3eeb22cb819409b49296ecb0acbd453671168313 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=3eeb22cb819409b49296ecb0acbd453671168313 commit 3eeb22cb819409b49296ecb0acbd453671168313 Author: Richard Scheffenegger AuthorDate: 2024-02-10 09:16:08 +0000 Commit: Richard Scheffenegger CommitDate: 2024-02-10 09:20:00 +0000 tcp: clean scoreboard when releasing the socket buffer The SACK scoreboard is conceptually an extention of the socket buffer. Remove it when the socket buffer goes away with soisdisconnected(). Verify that this is also the expected state in tcp_discardcb(). PR: 276761 Reviewed by: glebius, tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43805 --- sys/netinet/tcp_input.c | 1 + sys/netinet/tcp_subr.c | 5 ++--- sys/netinet/tcp_timewait.c | 1 + sys/netinet/tcp_usrreq.c | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index afcda60137ec..b3201750c1e6 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3022,6 +3022,7 @@ process_ACK: * we'll hang forever. */ if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { + tcp_free_sackholes(tp); soisdisconnected(so); tcp_timer_activate(tp, TT_2MSL, (tcp_fast_finwait2_recycle ? diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index be38280aef0a..6043a3d458e5 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2383,6 +2383,7 @@ tcp_discardcb(struct tcpcb *tp) #endif INP_WLOCK_ASSERT(inp); + MPASS(TAILQ_EMPTY(&tp->snd_holes)); tcp_timer_stop(tp); @@ -2394,9 +2395,6 @@ tcp_discardcb(struct tcpcb *tp) if (tp->t_flags & TF_TOE) tcp_offload_detach(tp); #endif - - tcp_free_sackholes(tp); - #ifdef TCPPCAP /* Free the TCP PCAP queues. */ tcp_pcap_drain(&(tp->t_inpkts)); @@ -2531,6 +2529,7 @@ tcp_close(struct tcpcb *tp) if (tp->t_state != TCPS_CLOSED) tcp_state_change(tp, TCPS_CLOSED); KASSERT(inp->inp_socket != NULL, ("tcp_close: inp_socket NULL")); + tcp_free_sackholes(tp); soisdisconnected(so); if (inp->inp_flags & INP_SOCKREF) { inp->inp_flags &= ~INP_SOCKREF; diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 328f8fe84a8c..266556274e18 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -119,6 +119,7 @@ tcp_twstart(struct tcpcb *tp) "(inp->inp_flags & INP_DROPPED) != 0")); tcp_state_change(tp, TCPS_TIME_WAIT); + tcp_free_sackholes(tp); soisdisconnected(inp->inp_socket); if (tp->t_flags & TF_ACKNOW) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index ccd6a6149dae..a283d308801f 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -2777,6 +2777,7 @@ tcp_usrclosed(struct tcpcb *tp) if (tp->t_acktime == 0) tp->t_acktime = ticks; if (tp->t_state >= TCPS_FIN_WAIT_2) { + tcp_free_sackholes(tp); soisdisconnected(tptosocket(tp)); /* Prevent the connection hanging in FIN_WAIT_2 forever. */ if (tp->t_state == TCPS_FIN_WAIT_2) { From nobody Sat Feb 10 09:34:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TX5Bw4whNz59KtV; Sat, 10 Feb 2024 09:34: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 4TX5Bw4F5mz4ZPH; Sat, 10 Feb 2024 09:34:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707557640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SHp4R6LrtHLtIbMDPNJW4cB2/apjs1srZkTEkuMdSfY=; b=arSqDf4iqiw94xMnuO3lc+IgJHthSYjaV6NfVu7JC67+p+c/RLfJXLlHmEX1d5Fhe8+xxV bAGo/rwusXJ3AjctKxDP50yBXtej9a502yQAcUW/no03ZmhIEjqxJoimyjqTNZzBJKSaYF BwbEOMSZ+OJ5cqvyKHLf/0jiHHZi04QFHlnRHBd9ijjXD0cqYV5VYNHry3T4NFE6E3AO/A CiBtGNsl3ccROACWiShnmUtoaUB5pej8Aa3ZBxIST/CN6Q4tCRQ1Vd9h/Zno3OFLExdVMD HiByxi8jNwOTSH86S6iXFbT7NfBiwWjGTrZOcpD6VCpibmpKAJcOlVvEv5Ii9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707557640; a=rsa-sha256; cv=none; b=eycLHT1rJWXXga+w3im3NswWzVrLTYZ2dkHZPM7wZpNwOupzzoXJq/LMS3RW8cZFNw4FZu vLaFAZViW8dqVMj+QJO7j/xWvLzkWM2IhO7WpHs09dSTexq1zv41+SI9NYN1Iy+RO1G5rK x86EO4RR1SIeeb/hg1RSwBaYPqT4eikvrcofNh8NU/fvTebv+LAbBoBvLVcgE/4d/PeK4/ tN66c9tzI8xsXcJ9LWNkn3Yq9iRmvHokygO5gHXN7nk6pzY48xrFLkTq47SemtcwirfYXE 1Hd4u6QvcIKlwsee8mMxU6s7Cblf5CLTlhAQXRijC/mCbWso9EnuhOqCISqbFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707557640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SHp4R6LrtHLtIbMDPNJW4cB2/apjs1srZkTEkuMdSfY=; b=WKIXbGOe78Tasta0n4Gxy6bHNH4o8bvo1F8S6jtK5DaRUvli8SI7jLeoE7rrVR0KQmRnch u/oZPqwrQ8BWXTcHyNuH6s13pRNoWfm2V3n676blRzeEKxxDyCqQpLoIzzKOTchUV8zWo3 MUV3A37NY5e5OdNkENV3vWdasTybbtvCXFEC34AQuJE5IfIXlT8CJGHpMtlFUHsGSiZjTE Tj7gNaSl5DJflVDxdfm0uYL4WVE61QHm8hfxriFrjIRhtExCZSLw1zTrJ4l2uLb6g20J+1 KKPjQUBfe3qjgOxf7bUkAjfrC6SMZOzXIM76w0q300Cobbn7vyfACL9bo7N0RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TX5Bw3KyMz19sY; Sat, 10 Feb 2024 09:34: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 41A9Y0na044165; Sat, 10 Feb 2024 09:34:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41A9Y0Ht044162; Sat, 10 Feb 2024 09:34:00 GMT (envelope-from git) Date: Sat, 10 Feb 2024 09:34:00 GMT Message-Id: <202402100934.41A9Y0Ht044162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: a8e817cf5c9c - main - tcp: stop doing superfluous work after sending RST List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8e817cf5c9c6e34357e0c078a256e2526b9da53 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=a8e817cf5c9c6e34357e0c078a256e2526b9da53 commit a8e817cf5c9c6e34357e0c078a256e2526b9da53 Author: Richard Scheffenegger AuthorDate: 2024-02-10 09:24:10 +0000 Commit: Richard Scheffenegger CommitDate: 2024-02-10 09:25:02 +0000 tcp: stop doing superfluous work after sending RST When sending a RST control segment in tcp_output() it means we are in TCPS_CLOSED state, called from tcp_drop(). Once the RST is sent, don't call tcp_timer_activate() or update anything in tcpcb, since that will go away shortly. PR: 276761 Provided by: glebius Reviewed By: glebius, tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43808 --- sys/netinet/tcp_output.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 50dc05e9c55a..26a8ed70ceff 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1516,9 +1516,13 @@ out: tcp_account_for_send(tp, len, (tp->snd_nxt != tp->snd_max), 0, hw_tls); /* * In transmit state, time the transmission and arrange for - * the retransmit. In persist state, just set snd_max. + * the retransmit. In persist state, just set snd_max. In a closed + * state just return. */ - if ((tp->t_flags & TF_FORCEDATA) == 0 || + if (flags & TH_RST) { + TCPSTAT_INC(tcps_sndtotal); + return (0); + } else if ((tp->t_flags & TF_FORCEDATA) == 0 || !tcp_timer_active(tp, TT_PERSIST)) { tcp_seq startseq = tp->snd_nxt; From nobody Sat Feb 10 09:34:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TX5By4NXMz59KpD; Sat, 10 Feb 2024 09:34: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 4TX5Bx5YK0z4ZH5; Sat, 10 Feb 2024 09:34:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707557641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0g1nkRBL76QuaFizVZ+fCCObTcPBahi9yMkQg3Liew=; b=rc26uhSJ3vuYLSX/6inAcy51+QfuTd3bU/VgOf02bfoc9ohqQoJGPMMe+CZD4inRYIaBYY AohQEGXAn2b3G/iFpc0311QI11odGJTw+hYeSw/JuIs3G6zv4J2HyFkK0KXyTF9361z4Vv OMRTSE1YeC0at/eFoTlqoqP8SfugANWPjRw3n39eU5axdRfjMQb+N+GCOM/7iGzCrkImbz zKxGDj5HZLNVasmFJPM9ALT5rvyT7yp03VptlDV3hSu0l2zUjrl9o45np/m/4wPL62W1k7 N5pRtulGfYMwRaLbet6d2pfCs/ROdkUteXB2ibFxtn8Oo/S11kH0yw26COgfVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707557641; a=rsa-sha256; cv=none; b=rVVQgWxgOe9Zftbwi2rHy/ApYIVjStY665GHhGamcbdbffXEz66qF5hiQMYPMiUjP0b8EM IuCdoQ9bx8M7nwHuYV6moivRhRRT0D6XsAwaEEgxPbs2NuWOayZk4KfJiq0pcu1zNV3nj0 OtCa6EGXw2jVSLW9iXXJsBerz4Vr3jxAUTCv4G6W4VSs2K0WFNbVENGd5kieKVe30jBZVK vrjkhYEPmy05cvC7jWdiboElvwXTNKPAbik6qSTaoGFfs4nFAlIc5gImqd1nNTqQM4m0i2 WyUoOKMQV9O7JdO37M+0GBXp4eEhR9fJDev/VUUhtbSsAaSRxEX/TwPRGFxqXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707557641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0g1nkRBL76QuaFizVZ+fCCObTcPBahi9yMkQg3Liew=; b=FpDLM6tjsqvyu0c7ze2yEu6QurTK5HdO+J/Kxni6McrDhg1yvpLkwJjbqmT090qvEaATZe 9WCfEyNR/3LhRUXe/r14pRJgCzJSjyYD7F/frf6leWx/gP126WNFqapxnctzQGImOT54yV 4E7d1yjqEotTfkeGIVxd3ualDj435Iq1eBUmteHpaq68fzw5tcmGM8KWoxrlX1y/hOwffX m3hhPlfM+SXyF2CRDV2N23DZjYTnZlrQLRZHPo4gKFejTGtPSVytG79QY6kQS1DC4ynBZP WwyFRGkK5ZFd1taEWLNNAVFGM7dIV9XOoxQLBTi9QzlwRBI7CcZjSBQAxP2wMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TX5Bx4fL3z1B9v; Sat, 10 Feb 2024 09:34: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 41A9Y1r6044216; Sat, 10 Feb 2024 09:34:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41A9Y11l044213; Sat, 10 Feb 2024 09:34:01 GMT (envelope-from git) Date: Sat, 10 Feb 2024 09:34:01 GMT Message-Id: <202402100934.41A9Y11l044213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 62d47d73b7eb - main - tcp: stop timers and clean scoreboard in tcp_close() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62d47d73b7eb01f3b0a37541df5e7aaa36f54335 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=62d47d73b7eb01f3b0a37541df5e7aaa36f54335 commit 62d47d73b7eb01f3b0a37541df5e7aaa36f54335 Author: Richard Scheffenegger AuthorDate: 2024-02-10 09:28:42 +0000 Commit: Richard Scheffenegger CommitDate: 2024-02-10 09:30:00 +0000 tcp: stop timers and clean scoreboard in tcp_close() Stop timers when in tcp_close() instead of doing that in tcp_discardcb(). A connection in CLOSED state shall not need any timers. Assert that no timer is rescheduled after that in tcp_timer_activate() and verfiy that this is also the expected state in tcp_discardcb(). PR: 276761 Reviewed By: glebius, tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43792 --- sys/netinet/tcp_subr.c | 4 ++-- sys/netinet/tcp_timer.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 6043a3d458e5..90e1496a822c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2383,10 +2383,9 @@ tcp_discardcb(struct tcpcb *tp) #endif INP_WLOCK_ASSERT(inp); + MPASS(!callout_active(&tp->t_callout)); MPASS(TAILQ_EMPTY(&tp->snd_holes)); - tcp_timer_stop(tp); - /* free the reassembly queue, if any */ tcp_reass_flush(tp); @@ -2522,6 +2521,7 @@ tcp_close(struct tcpcb *tp) tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; } + tcp_timer_stop(tp); if (tp->t_fb->tfb_tcp_timer_stop_all != NULL) tp->t_fb->tfb_tcp_timer_stop_all(tp); in_pcbdrop(inp); diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index f0eb3bad33cf..ed50659abf8e 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -907,6 +907,7 @@ tcp_timer_activate(struct tcpcb *tp, tt_which which, u_int delta) #endif INP_WLOCK_ASSERT(inp); + MPASS(tp->t_state > TCPS_CLOSED); if (delta > 0) { what = TT_STARTING; From nobody Sat Feb 10 09:43:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TX5Q01VSjz59LsW; Sat, 10 Feb 2024 09:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TX5Q010g8z4cqC; Sat, 10 Feb 2024 09:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707558216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BH2D7rWDBkpca7GTZLzTIIuoiKkTB/JOchn5cbjtxss=; b=G54moy4kVu1qp0dS2BXMs+uEf6RFIGHDJLXwxtqgjTQw7cxqTwrKDrVHfo/Fmx1PCxiwk3 Qkil/hVn9H5fWtZdW5wAt0r7YxS6wvzIwr1uRQ2TGKvr7jUrfnNketysZGrVHPATHWUBIX E4fh1Cmc10OPeWVXNyYJHIsHK7qcCDg0VE8b1uSTjICAUiIGeIP7gQmGdCKdzCn/IhEuaf WESHR1Z2n4iOptrNLt8n3cwMEifvKlmIPgiElzCnQeM+p9iCSIczJVR2/WHuOCnTpkT67l 4PZyS/fJSsrPlFmDZZo0q3IJ3u9zyT7MtiRPaKRmWUMCDiGMxb2J8mWExytA4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707558216; a=rsa-sha256; cv=none; b=J2X9xexdUDVC5DtgRmBwDqBOO6ySY4MvyUpa58V+wPsgSY5R5OcvqGkXuGCuKAPgGhyPoU p2W7p2TtlaTg16B5dB5kX8QonC3fbOTLYbAkSB49cDghoj5R37U88HgJNZ6+jaiLSXuA3j W1aKEHdr3GDyWDRJmBE8/zaCNF9dZ47Mr09MNUI10IP0HZ3Y38gnvFf9VB7NzlYX3U/Bgx g+Hi3RV197O4l+7STxrK4t6V2Vh2SJSbEbwdQ7KQmaOGYZkqxqOkBZkni2rzmwZh9b8xz9 vRAYWgefvI7p9t9HKMIK2id+YMqjqDVs7iFUE80PJVtGElrlmAhgs37i/4B2Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707558216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BH2D7rWDBkpca7GTZLzTIIuoiKkTB/JOchn5cbjtxss=; b=Uri3P7zDJk415COnG1dEs/L7G5e4p5DC+i5Ghqovv6p1KGEfXWUpIJZVXxY0uy7qIoUQPK klWLZwtjKcvqcdyThSLoQpWZIYT9LRultr3HOJltjo+ZWc0gkDxflznqBtcW+jxhIiZQj/ bu7MrhL+6CXxCjfx/T8Pwl4FZ7IMvLDwtZkmvtdpdiaPizoLoCXK3i4rDHEjXZsNJzI1WT 7NJoG89rWUjpZSGIlOa+aiaP0zdAU/KBOag/cVSX4wTIWJ6wl8uZmdCjCb9nqPmzExP0LM HxDvuBRlo5hOL5xULBJ7BW43325CAH8lTCzOu86W29XMEKq09Yf6/KAZoHSRQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TX5Q006bNz1BMQ; Sat, 10 Feb 2024 09:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41A9hZHG061122; Sat, 10 Feb 2024 09:43:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41A9hZln061119; Sat, 10 Feb 2024 09:43:35 GMT (envelope-from git) Date: Sat, 10 Feb 2024 09:43:35 GMT Message-Id: <202402100943.41A9hZln061119@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: 3e9515846f8c - main - read.2: Describe debug.iosize_max_clamp List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e9515846f8cbff0ecccaab65d9f70890d04429e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3e9515846f8cbff0ecccaab65d9f70890d04429e commit 3e9515846f8cbff0ecccaab65d9f70890d04429e Author: Konstantin Belousov AuthorDate: 2024-02-10 09:40:07 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-10 09:43:29 +0000 read.2: Describe debug.iosize_max_clamp same as it is done for write.2. PR: 276937 Reported by: bugs.freebsd.org@masklinn.net Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libsys/read.2 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/libsys/read.2 b/lib/libsys/read.2 index d18584a4fa55..94644045afc1 100644 --- a/lib/libsys/read.2 +++ b/lib/libsys/read.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 4, 2020 +.Dd February 10, 2024 .Dt READ 2 .Os .Sh NAME @@ -220,7 +220,12 @@ for this file system. The value .Fa nbytes is greater than -.Dv INT_MAX . +.Dv SSIZE_MAX +(or greater than +.Dv INT_MAX , +if the sysctl +.Va debug.iosize_max_clamp +is non-zero). .El .Pp In addition, @@ -246,7 +251,13 @@ The sum of the .Fa iov_len values in the .Fa iov -array overflowed a 32-bit integer. +array is greater than +.Dv SSIZE_MAX +(or greater than +.Dv INT_MAX , +if the sysctl +.Va debug.iosize_max_clamp +is non-zero). .It Bq Er EFAULT Part of the .Fa iov From nobody Sat Feb 10 16:38:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXGcc4bNCz59y69; Sat, 10 Feb 2024 16:38: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 4TXGcc3dKgz3xFY; Sat, 10 Feb 2024 16:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707583104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IY6ehb4gBwdGZgHdjbZ9c68u1q4najLkUmQo3VZl3iU=; b=W57aw12hTfYlt7m0SWN45+tmOZCuUiQJwbZ0L3ZnBcFaSl/3KZ25pg6cYfyUU5dylsOOr4 0L3gBWJixE/IHQ8+syHawoYBnHhraJgA8COvKisPxi0wEDsd7B0+lUmDYCmRipgHSONyLj edmOuqOXyrmfh9ZHbZErpMSm/qR3lpjWFPhMv7XaqIjTiVj5CCHhwxB5lBVHeJmkkrJBzD He0KbrlZ838E2bs2P8ixXI74NQs8QINfFPW0zS7xPEBkz+i4fyG4CYk6DRzkaRj7SL2oUM nMyRSR9kG25iqXBlM696mhafSVkYw0sTYZFM3aSFKGDssDb6M0Kl3KzYS0BoDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707583104; a=rsa-sha256; cv=none; b=IsXqKk5Dd3G99IRQBZrhVYqRDeHI95fsCXr/xPyB/9HKUJIKQnOf9iQwRBFgEaRl7szGQd kHzwP5PPWpO73bms+IyDzCeM18UejtOO4DwbVkDCRAqH1yuOeZPWuc2dC4epl/I6zkZZnS O7s8uAvbL3OD5L6brSFWxffv9ofUCh/4wvYmTsaJg3bExrNJcojqR8kZnHhLtpqt97JH+U 14yrBVvbYXDB4yD4D7Sr541Eh0P5yXuUtQZT76WHsTp6BRoaYHujEGmvDx8lm2dMSF9Cae rUXW0mrEzEb9oBOBA7VwBn/xiCHI5oVBvL+Hj5yw072UIvp95XVnlwDZVSwE0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707583104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IY6ehb4gBwdGZgHdjbZ9c68u1q4najLkUmQo3VZl3iU=; b=bo2yn0yAEPwFh/DHpERRGjy0HjrofxG1LS+fQKsu9K0I3a+06d3Kob3rBfw+fA+g9rPHoV +4y3nro0FpzqmAuSgmdtUuqV7DOUlF+Rbo6EDw2sirTACCNg8gWFS47ITQBsX99XDDGc2+ jsmCpwjR+H9uMNd6dtvHcHjIOmJYT8/Q5gGDdp93URvNDckDsAtXej6h+FeGt1GCgucOx/ KUKbJDMttAQNKz++Zk3uY9MyanUkMum2O/CoRFI769AAQiZ6hwLv7kwxk2PHadWI/v58c8 B4lipdAVQhy0LALtjljGOmNGEq2Lq/QoI9NRe9Z1/rms3TKpRZgluyjkKUpqAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXGcc2TnLzNvG; Sat, 10 Feb 2024 16:38: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 41AGcOfG050106; Sat, 10 Feb 2024 16:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AGcOaV050103; Sat, 10 Feb 2024 16:38:24 GMT (envelope-from git) Date: Sat, 10 Feb 2024 16:38:24 GMT Message-Id: <202402101638.41AGcOaV050103@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: f82e98237395 - main - Fix subr_uio.c style(9) with uses of sizeof. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f82e98237395693d1825243ff7b111aa321d383f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f82e98237395693d1825243ff7b111aa321d383f commit f82e98237395693d1825243ff7b111aa321d383f Author: Alfredo Mazzinghi AuthorDate: 2024-01-17 17:23:58 +0000 Commit: Mark Johnston CommitDate: 2024-02-10 16:37:57 +0000 Fix subr_uio.c style(9) with uses of sizeof. Obtained from: CheriBSD Reviewed by: jhb, kib, markj MFC after: 2 weeks Sponsored by: CHaOS, EPSRC grant EP/V000292/1 Differential Revision: https://reviews.freebsd.org/D43710 --- sys/kern/subr_uio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index 1badf4c48fe2..e7c7de406d47 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -351,7 +351,7 @@ copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error) *iov = NULL; if (iovcnt > UIO_MAXIOV) return (error); - iovlen = iovcnt * sizeof (struct iovec); + iovlen = iovcnt * sizeof(struct iovec); *iov = malloc(iovlen, M_IOV, M_WAITOK); error = copyin(iovp, *iov, iovlen); if (error) { @@ -372,8 +372,8 @@ copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop) *uiop = NULL; if (iovcnt > UIO_MAXIOV) return (EINVAL); - iovlen = iovcnt * sizeof (struct iovec); - uio = malloc(iovlen + sizeof *uio, M_IOV, M_WAITOK); + iovlen = iovcnt * sizeof(struct iovec); + uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); iov = (struct iovec *)(uio + 1); error = copyin(iovp, iov, iovlen); if (error) { @@ -403,8 +403,8 @@ cloneuio(struct uio *uiop) struct uio *uio; int iovlen; - iovlen = uiop->uio_iovcnt * sizeof (struct iovec); - uio = malloc(iovlen + sizeof *uio, M_IOV, M_WAITOK); + iovlen = uiop->uio_iovcnt * sizeof(struct iovec); + uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); *uio = *uiop; uio->uio_iov = (struct iovec *)(uio + 1); bcopy(uiop->uio_iov, uio->uio_iov, iovlen); From nobody Sat Feb 10 16:38:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXGcd4bVTz59y3t; Sat, 10 Feb 2024 16:38: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 4TXGcd47Frz3x98; Sat, 10 Feb 2024 16:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707583105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RVyZsxjMM8eUDr9VsQ1JBy/Y+OMcyeGPBH5TtGWDLHU=; b=CR0d7Jj2f0Djn0n+ACbQQkVIH+0laBQQ77pzFvI5YmTfu/gjKrgM1ic64NBBo91VIbyWjM 6rp5HDabFkhPHXzZHVXtcEGTXk6JhGEc54Rc1KCwn0mU/U/q+YmGY/9qSo+8LPEDjIdcar kT+WKlLvkHA8XMhs9dadR364izIh+zN+w8PHsEdDrk4XmqTz6qA+Y3kkr8ZcOAMNWrb7he s5Ngh3XsyiNx0ZJ5D4hFF4o8nUD5+KwfJrqCN3iwjhiqqXKookxBv8chP1eZ0Q3XCfKIT+ 6mCnh5fAa1EcYvO8RmVMAWbu2enHY4Rn2cScsKzdhuzquK41uJR+2OxjWPAEZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707583105; a=rsa-sha256; cv=none; b=jmLbGy5+oNiyRMyyYGr7WstuCDIpa5XU6q9aQU9AbbKflTwzGjflFvPBYrKMeUtj7d0A6x K9MC4pZNUqNYtBQB6CQuIjMWKv44Wa393Qx2yscuQla8ztLGCkukU+Qgx5lXPF0NwjXS8o 8J1pS7P5FusCLtZB3/8h5wfN+Tqd1K9rTPjPdf8dxlGxdN5HRZGPMTcAHa6JkCVoe2envS EmaCbUvqf9XH2zi5bCJr1fUhbnWkDIC6fK3bePlSAp7P83FzjYe8q4PDbbEfGDGT5Yu4IE eXKIiASbHTxQVWnGOStXKzyDBSQU6Vong8slWaBYeGsRYqPDHz1mts4X64DaRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707583105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RVyZsxjMM8eUDr9VsQ1JBy/Y+OMcyeGPBH5TtGWDLHU=; b=KnTR9MBcWvEdT48XmnDJsCfpCp8yQRjYJkIxyoJev4//mkpeecdHDo12B4X38G0kaEEoip f9JPAQS8td8+dwvhEJgy4zH6YaGWZxkuJTe7eMNMA0gcKlYrAaXrln+5++3Mh1UqRoWBS+ OPUkQ6c257FzTly6wPCYlBVlzfXRPHdaOt011zRQox0AGYSBMqMOy/qRmKPZ6sky/L7OiF YTT8y7nplD7ydNens+wohJPLWwlb8wPViuWMBEuNsVVwJRmS1t8KJPTAw1esmVsGveZ5VX 6/bqD7lFsEQ+M8VM364vxlbMXlC0dd06tsUiZuBlK3YQ/odxRFDQx+BrXXF/TQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXGcd3Cb2zN3y; Sat, 10 Feb 2024 16:38: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 41AGcPOG050153; Sat, 10 Feb 2024 16:38:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AGcPqR050149; Sat, 10 Feb 2024 16:38:25 GMT (envelope-from git) Date: Sat, 10 Feb 2024 16:38:25 GMT Message-Id: <202402101638.41AGcPqR050149@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: 61cc4830a7b1 - main - Abstract UIO allocation and deallocation. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61cc4830a7b16400efade3d884a59fda6d80d651 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=61cc4830a7b16400efade3d884a59fda6d80d651 commit 61cc4830a7b16400efade3d884a59fda6d80d651 Author: Alfredo Mazzinghi AuthorDate: 2024-01-18 13:04:41 +0000 Commit: Mark Johnston CommitDate: 2024-02-10 16:38:04 +0000 Abstract UIO allocation and deallocation. Introduce the allocuio() and freeuio() functions to allocate and deallocate struct uio. This hides the actual allocator interface, so it is easier to modify the sub-allocation layout of struct uio and the corresponding iovec array. Obtained from: CheriBSD Reviewed by: kib, markj MFC after: 2 weeks Sponsored by: CHaOS, EPSRC grant EP/V000292/1 Differential Revision: https://reviews.freebsd.org/D43711 --- sys/amd64/linux32/linux32_machdep.c | 2 +- sys/cddl/compat/opensolaris/kern/opensolaris_uio.c | 2 +- sys/compat/freebsd32/freebsd32_misc.c | 29 ++++++++--------- sys/compat/linux/linux_file.c | 6 ++-- sys/kern/kern_jail.c | 6 ++-- sys/kern/kern_ktrace.c | 4 +-- sys/kern/kern_sendfile.c | 4 +-- sys/kern/subr_prf.c | 2 +- sys/kern/subr_uio.c | 38 +++++++++++++++++----- sys/kern/sys_generic.c | 8 ++--- sys/kern/vfs_aio.c | 4 +-- sys/kern/vfs_mount.c | 2 +- sys/kern/vfs_vnops.c | 2 +- sys/sys/uio.h | 2 ++ 14 files changed, 66 insertions(+), 45 deletions(-) diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index ba4dcc61af76..7f1c85cee201 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -106,7 +106,7 @@ linux_readv(struct thread *td, struct linux_readv_args *uap) if (error) return (error); error = kern_readv(td, uap->fd, auio); - free(auio, M_IOV); + freeuio(auio); return (error); } diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c b/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c index e1cc8f802762..b2a08a55bba4 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c @@ -68,7 +68,7 @@ uiocopy(void *p, size_t n, enum uio_rw rw, struct uio *uio, size_t *cbytes) error = vn_io_fault_uiomove(p, n, uio_clone); *cbytes = uio->uio_resid - uio_clone->uio_resid; if (uio_clone != &small_uio_clone) - free(uio_clone, M_IOV); + freeuio(uio_clone); return (error); } diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index f2d66cf74b2b..facbf00a4c51 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1196,32 +1196,29 @@ freebsd32_copyinuio(struct iovec32 *iovp, u_int iovcnt, struct uio **uiop) struct iovec32 iov32; struct iovec *iov; struct uio *uio; - u_int iovlen; int error, i; *uiop = NULL; if (iovcnt > UIO_MAXIOV) return (EINVAL); - iovlen = iovcnt * sizeof(struct iovec); - uio = malloc(iovlen + sizeof *uio, M_IOV, M_WAITOK); - iov = (struct iovec *)(uio + 1); + uio = allocuio(iovcnt); + iov = uio->uio_iov; for (i = 0; i < iovcnt; i++) { error = copyin(&iovp[i], &iov32, sizeof(struct iovec32)); if (error) { - free(uio, M_IOV); + freeuio(uio); return (error); } iov[i].iov_base = PTRIN(iov32.iov_base); iov[i].iov_len = iov32.iov_len; } - uio->uio_iov = iov; uio->uio_iovcnt = iovcnt; uio->uio_segflg = UIO_USERSPACE; uio->uio_offset = -1; uio->uio_resid = 0; for (i = 0; i < iovcnt; i++) { if (iov->iov_len > INT_MAX - uio->uio_resid) { - free(uio, M_IOV); + freeuio(uio); return (EINVAL); } uio->uio_resid += iov->iov_len; @@ -1241,7 +1238,7 @@ freebsd32_readv(struct thread *td, struct freebsd32_readv_args *uap) if (error) return (error); error = kern_readv(td, uap->fd, auio); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -1255,7 +1252,7 @@ freebsd32_writev(struct thread *td, struct freebsd32_writev_args *uap) if (error) return (error); error = kern_writev(td, uap->fd, auio); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -1269,7 +1266,7 @@ freebsd32_preadv(struct thread *td, struct freebsd32_preadv_args *uap) if (error) return (error); error = kern_preadv(td, uap->fd, auio, PAIR32TO64(off_t,uap->offset)); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -1283,7 +1280,7 @@ freebsd32_pwritev(struct thread *td, struct freebsd32_pwritev_args *uap) if (error) return (error); error = kern_pwritev(td, uap->fd, auio, PAIR32TO64(off_t,uap->offset)); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -2199,9 +2196,9 @@ freebsd32_do_sendfile(struct thread *td, out: if (hdr_uio) - free(hdr_uio, M_IOV); + freeuio(hdr_uio); if (trl_uio) - free(trl_uio, M_IOV); + freeuio(trl_uio); return (error); } @@ -2780,7 +2777,7 @@ freebsd32_jail_set(struct thread *td, struct freebsd32_jail_set_args *uap) if (error) return (error); error = kern_jail_set(td, auio, uap->flags); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -2807,7 +2804,7 @@ freebsd32_jail_get(struct thread *td, struct freebsd32_jail_get_args *uap) if (error != 0) break; } - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -3540,7 +3537,7 @@ freebsd32_nmount(struct thread *td, return (error); error = vfs_donmount(td, flags, auio); - free(auio, M_IOV); + freeuio(auio); return error; } diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 6eab8980a5c5..1279490ae8be 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1038,7 +1038,7 @@ linux_preadv(struct thread *td, struct linux_preadv_args *uap) if (error != 0) return (error); error = kern_preadv(td, uap->fd, auio, offset); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -1065,7 +1065,7 @@ linux_pwritev(struct thread *td, struct linux_pwritev_args *uap) if (error != 0) return (error); error = kern_pwritev(td, uap->fd, auio, offset); - free(auio, M_IOV); + freeuio(auio); return (linux_enobufs2eagain(td, uap->fd, error)); } @@ -1872,6 +1872,6 @@ linux_writev(struct thread *td, struct linux_writev_args *args) if (error != 0) return (error); error = kern_writev(td, args->fd, auio); - free(auio, M_IOV); + freeuio(auio); return (linux_enobufs2eagain(td, args->fd, error)); } diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index fb674b991a73..90a043394792 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -537,7 +537,7 @@ sys_jail_set(struct thread *td, struct jail_set_args *uap) if (error) return (error); error = kern_jail_set(td, auio, uap->flags); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -2296,8 +2296,8 @@ sys_jail_get(struct thread *td, struct jail_get_args *uap) error = kern_jail_get(td, auio, uap->flags); if (error == 0) error = copyout(auio->uio_iov, uap->iovp, - uap->iovcnt * sizeof (struct iovec)); - free(auio, M_IOV); + uap->iovcnt * sizeof(struct iovec)); + freeuio(auio); return (error); } diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index eb14d60433dd..877a25ffa4cd 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -768,7 +768,7 @@ ktrgenio(int fd, enum uio_rw rw, struct uio *uio, int error) char *buf; if (error) { - free(uio, M_IOV); + freeuio(uio); return; } uio->uio_offset = 0; @@ -776,7 +776,7 @@ ktrgenio(int fd, enum uio_rw rw, struct uio *uio, int error) datalen = MIN(uio->uio_resid, ktr_geniosize); buf = malloc(datalen, M_KTRACE, M_WAITOK); error = uiomove(buf, datalen, uio); - free(uio, M_IOV); + freeuio(uio); if (error) { free(buf, M_KTRACE); return; diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index f6f6b57adfc7..323e7fcde07b 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -1331,8 +1331,8 @@ sendfile(struct thread *td, struct sendfile_args *uap, int compat) (void)copyout(&sbytes, uap->sbytes, sizeof(off_t)); out: - free(hdr_uio, M_IOV); - free(trl_uio, M_IOV); + freeuio(hdr_uio); + freeuio(trl_uio); return (error); } diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 57ca158c6315..e291a1fa00a6 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -386,7 +386,7 @@ log_console(struct uio *uio) msglogstr(consbuffer, pri, /*filter_cr*/ 1); } msgbuftrigger = 1; - free(uio, M_IOV); + freeuio(uio); free(consbuffer, M_TEMP); } diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index e7c7de406d47..cbc4b0c0ed8e 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -373,21 +373,20 @@ copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop) if (iovcnt > UIO_MAXIOV) return (EINVAL); iovlen = iovcnt * sizeof(struct iovec); - uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); - iov = (struct iovec *)(uio + 1); + uio = allocuio(iovcnt); + iov = uio->uio_iov; error = copyin(iovp, iov, iovlen); - if (error) { - free(uio, M_IOV); + if (error != 0) { + freeuio(uio); return (error); } - uio->uio_iov = iov; uio->uio_iovcnt = iovcnt; uio->uio_segflg = UIO_USERSPACE; uio->uio_offset = -1; uio->uio_resid = 0; for (i = 0; i < iovcnt; i++) { if (iov->iov_len > IOSIZE_MAX - uio->uio_resid) { - free(uio, M_IOV); + freeuio(uio); return (EINVAL); } uio->uio_resid += iov->iov_len; @@ -397,16 +396,39 @@ copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop) return (0); } +struct uio * +allocuio(u_int iovcnt) +{ + struct uio *uio; + int iovlen; + + KASSERT(iovcnt <= UIO_MAXIOV, + ("Requested %u iovecs exceed UIO_MAXIOV", iovcnt)); + iovlen = iovcnt * sizeof(struct iovec); + uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); + uio->uio_iov = (struct iovec *)(uio + 1); + + return (uio); +} + +void +freeuio(struct uio *uio) +{ + free(uio, M_IOV); +} + struct uio * cloneuio(struct uio *uiop) { + struct iovec *iov; struct uio *uio; int iovlen; iovlen = uiop->uio_iovcnt * sizeof(struct iovec); - uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); + uio = allocuio(uiop->uio_iovcnt); + iov = uio->uio_iov; *uio = *uiop; - uio->uio_iov = (struct iovec *)(uio + 1); + uio->uio_iov = iov; bcopy(uiop->uio_iov, uio->uio_iov, iovlen); return (uio); } diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index e185900b93be..9c0cb4e739e0 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -271,7 +271,7 @@ sys_readv(struct thread *td, struct readv_args *uap) if (error) return (error); error = kern_readv(td, uap->fd, auio); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -310,7 +310,7 @@ sys_preadv(struct thread *td, struct preadv_args *uap) if (error) return (error); error = kern_preadv(td, uap->fd, auio, uap->offset); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -473,7 +473,7 @@ sys_writev(struct thread *td, struct writev_args *uap) if (error) return (error); error = kern_writev(td, uap->fd, auio); - free(auio, M_IOV); + freeuio(auio); return (error); } @@ -512,7 +512,7 @@ sys_pwritev(struct thread *td, struct pwritev_args *uap) if (error) return (error); error = kern_pwritev(td, uap->fd, auio, uap->offset); - free(auio, M_IOV); + freeuio(auio); return (error); } diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 13f99a71ef04..1195d92d54ab 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -555,7 +555,7 @@ aio_free_entry(struct kaiocb *job) fdrop(job->fd_file, curthread); crfree(job->cred); if (job->uiop != &job->uio) - free(job->uiop, M_IOV); + freeuio(job->uiop); uma_zfree(aiocb_zone, job); AIO_LOCK(ki); @@ -1728,7 +1728,7 @@ err3: knlist_delete(&job->klist, curthread, 0); err2: if (job->uiop != &job->uio) - free(job->uiop, M_IOV); + freeuio(job->uiop); uma_zfree(aiocb_zone, job); err1: ops->store_error(ujob, error); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 347ec7f70aaf..2b235d398332 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -473,7 +473,7 @@ sys_nmount(struct thread *td, struct nmount_args *uap) } error = vfs_donmount(td, flags, auio); - free(auio, M_IOV); + freeuio(auio); return (error); } diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index dc2efee038bb..77e4dd21f276 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1442,7 +1442,7 @@ vn_io_fault1(struct vnode *vp, struct uio *uio, struct vn_io_fault_args *args, td->td_ma_cnt = prev_td_ma_cnt; curthread_pflags_restore(saveheld); out: - free(uio_clone, M_IOV); + freeuio(uio_clone); return (error); } diff --git a/sys/sys/uio.h b/sys/sys/uio.h index e7bb74c908d8..42ab0cda8e38 100644 --- a/sys/sys/uio.h +++ b/sys/sys/uio.h @@ -76,6 +76,8 @@ struct vm_object; struct vm_page; struct bus_dma_segment; +struct uio *allocuio(u_int iovcnt); +void freeuio(struct uio *uio); struct uio *cloneuio(struct uio *uiop); int copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error); From nobody Sat Feb 10 18:15:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXJmR4Gtdz5B724; Sat, 10 Feb 2024 18:15: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 4TXJmR3jvSz49Ny; Sat, 10 Feb 2024 18:15:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707588919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6xShfFjluC/T4XgkzHSerb2FxfFJVHHoAnJxA8JTF2E=; b=N8rivg30ZBXgcDogkLRt+krqB4j0kC+hybUHWzQDuDjzSFt1wZalI5HfwcbubAkkwVp+hm /tkG+IzjGEcNzPOqiWZMpRwfAMYjYiO/5lagypA2ow2mDGEIlzHKllkRz60cwrENyzgoW0 njzl6+jTltpBT8Uyhs7GqcWZFYu3kCuSVWjeNpsFFO0Sq502QSuLFeSI4SZr5HYw17LZO9 V07nCzkcesJhc3DM/iRk8zSVOwxajHsqagaVvR34ppNXdeLO0nVO1F9Y1cYkpNCnWoPai2 XO5epzp3/6T0wu8oq3K3D7PqOpv9+vHqK9HqvZJJ+9ljhJIN7/5+0PO1DvO2AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707588919; a=rsa-sha256; cv=none; b=hCExADoK7rwAfu2cJn81019qOMFKglmw9WMLaSc5ejwwhyZFIxobzlYiTo3Wdky0CbuC17 eEmu1vEFAPY7tpX1P97U7GM978TOFdIVv++KYtCXErcNmbqSpzixp4gn2+W0YePfZGBr9v fcAyTr/8J+VCtJrZktuOely5Ho9/8cWgwSiQREPS2x+Wt+CU2WUU0F2ilXF6z0yXMezqf2 z78nqu2Hd1MYOpgFHRZPVA7ECcvLPTp0ZxdBHln09Gc8u6TdZsd/28jI3IzUDWwhxm3ozi dBUKbigaQjzG8+BAmylT47dkrtHgAPs+WXzlACMt7rQu3Pa+gVXznYZ+eiWHvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707588919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6xShfFjluC/T4XgkzHSerb2FxfFJVHHoAnJxA8JTF2E=; b=QsdWwCc55Zkh4Esjr+jzTxqom5p/LXgr1W5aj2iTHDPFRAxAyzfImtHjoqrevsRb0+Db0O XDqF9/Sixgqww8wddZ4LCRCeOqT4aTNAOLsL7on/5jG4dMXaisOSPe1GCjZfzpJSdURuKX K/ZEZckWGyMD6oOq6YwTIiF33FI3doESaVLQYtVbP2ynMmYsRgYhU38Mqxm3JZlIYPJpY6 u8K1knBQK/sBmIKL0hEemGi/ZTABm+LfFMcTYPhOI/w18HDdGxMFsFW0ENZQT6P6Jcq1Ci ywIc9l+6Up1YTRB4kzRVupVGb8oyDOH+QwM61faZfiI7bJKF7jczCnWq58fHdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXJmR2mGczRGb; Sat, 10 Feb 2024 18:15:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41AIFJ7I017591; Sat, 10 Feb 2024 18:15:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AIFJKu017588; Sat, 10 Feb 2024 18:15:19 GMT (envelope-from git) Date: Sat, 10 Feb 2024 18:15:19 GMT Message-Id: <202402101815.41AIFJKu017588@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: 15483f96207d - main - rc.subr avoid noise if /usr not mounted List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15483f96207de354714fc61f20cdbf971706e6cb Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=15483f96207de354714fc61f20cdbf971706e6cb commit 15483f96207de354714fc61f20cdbf971706e6cb Author: Simon J. Gerraty AuthorDate: 2024-02-10 18:14:23 +0000 Commit: Simon J. Gerraty CommitDate: 2024-02-10 18:14:23 +0000 rc.subr avoid noise if /usr not mounted basename, sed and tty are all in /usr/bin and not available until /usr is mounted. basename and tty we can replace with a function, but sed is more important. Fix o_verify to just use shell builtins, and rc_trace should avoid trying to set RC_LEVEL until sed is available. --- libexec/rc/rc.subr | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 19955fa83fbd..d76f0ba4f9a7 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -82,7 +82,10 @@ _VDOT_SH=: # current state of O_VERIFY o_verify() { - set -o | sed -n '/^verify/s,.*[[:space:]],,p' + case $(echo $(set -o)) in + *verify" "off*) echo off;; + *verify" "on*) echo on;; + esac } ## @@ -174,9 +177,15 @@ rc_trace() if [ -z "$RC_LEVEL" ]; then [ -f $cf ] || return - [ -s $cf ] && \ - RC_LEVEL=$(sed -n '/^RC_LEVEL=/ { s/.*=//p;q; }' $cf) - RC_LEVEL=${RC_LEVEL:-0} + if [ -s $cf ]; then + # don't try to set RC_LEVEL without sed + if [ -x /usr/bin/sed ]; then + RC_LEVEL=$(sed -n '/^RC_LEVEL=/ { s/.*=//p;q; }' $cf) + RC_LEVEL=${RC_LEVEL:-0} + fi + else + RC_LEVEL=0 + fi fi [ ${RC_LEVEL:-0} -ge ${level:-0} ] || return rc_log "$@" @@ -2493,8 +2502,22 @@ fi # Use vdot to ensure the file has not been tampered with. vdot /etc/local.rc.subr -# safe_eval.sh provides safe_dot - for untrusted files -$_SAFE_EVAL_SH vdot /libexec/safe_eval.sh +# Avoid noise - when we do not have /usr mounted, +# and we cannot use safe_dot without sed. +if ! have basename; then + basename() + { + local b=${1%$2} + echo ${b##*/} + } + tty() + { + return 0 + } +else + # safe_eval.sh provides safe_dot - for untrusted files + $_SAFE_EVAL_SH vdot /libexec/safe_eval.sh +fi $_DEBUG_SH vdot /libexec/debug.sh # Ensure we can still operate if debug.sh and From nobody Sat Feb 10 18:50:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXKXn0F67z5B9H2; Sat, 10 Feb 2024 18:50: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 4TXKXm6rztz4HCx; Sat, 10 Feb 2024 18:50:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707591017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/nqoveuaFujGOwOsrA1LJcwWUpJhlLd41yUoy3wjDlQ=; b=WvaK0C7M4HrsxiRXxbaW7VRXN4xT9SZMKLPz/IW7LpsTMeg4hVEc8gRMh550FWIhuP8kvA VTTJQwK6Or7C2YMWRpiMhvf/lsMUX8MIRGWdOehNRKMI8oLzXnN/TFBTmLhUJJKAdsHWLC P6erPBsKD74+FIXfA6xci+UdMddknLboJIch08ymCF8GC+IwCW/f3MVlUeu+gMVWZO1eqi fYVMgD3pnXhfiuf4HQHxf0PDvpYqys0a7PtzPoo8qVSvWQFDiCw6+7k3H6Ym+papirrx64 XgZw+k1clQYOKCGM4uGm+FvqyBdpejfRvm5piGcTtQNywC/+7c+qHPphaV9giA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707591017; a=rsa-sha256; cv=none; b=FSJS3boJCZJmCFZZ3kKahKWcfTZATBy+II8RHiFI42T7j0UJaiGotME7CY1hpiwC4/hDR5 MlPONuajFWcoYyEp6a1TaMoZCUopnxB5Jgx9Wfw3e/1qBrEguzqcE4kZfB2KstDfTcwIcA pRQ1dXed3hwd++B9smQxiz9T3ywJ4ASHRam3svUaz2l1fcBCuDcHVnOjrNdXKf8+BYH5Vp k+fXy9MCr6y3nNsRouXOSk3kNzEkJMNsLcM4N3Vw+R9X617PoGJmPOH8i+A9ksmbguig2S U247vFGKzZwGX9YL4Jjv6EMHKGWWPdOXQoaLH9g4MJHySLtpxRGUlZy7tIPV2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707591017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/nqoveuaFujGOwOsrA1LJcwWUpJhlLd41yUoy3wjDlQ=; b=QHrzBSwvaoMDfvUnCBgvcS4r3j43I8ijEpcOdxG/rP8A1EiOfMJy11osCrc6FwTgDNKCZd Tb7oS0/ZqjJNEFTBHftQdpocWVI/9FLFFCJEW72+upLRYUS/PkGQ+GDOg94zjyF3zj41pB Pe+ZBAG1+2lcc/UDg9QyJgq16y++bz72jgBwR5oMN7qa6/XDu6t52QE0KVcBl+kUTfm9MZ 5h2YtZ4W3KJNo0Ni9IkUVuO4VOK7q5LbrtLnpqHshfM01zc2oc8hJ/bdevraH1/i/m0REA n/J/gDa1B2qF8wl68b2Z/MYJ3XctXjodq3k0p4wDqj3/oVaKvgPBDp3pKXqXEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXKXm5vxlzRs5; Sat, 10 Feb 2024 18:50: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 41AIoGlG075818; Sat, 10 Feb 2024 18:50:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AIoGih075810; Sat, 10 Feb 2024 18:50:16 GMT (envelope-from git) Date: Sat, 10 Feb 2024 18:50:16 GMT Message-Id: <202402101850.41AIoGih075810@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: 621dae89f3c7 - main - loader: Document the lua loader table. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 621dae89f3c70b86bef255a621a76bf553f733ff Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=621dae89f3c70b86bef255a621a76bf553f733ff commit 621dae89f3c70b86bef255a621a76bf553f733ff Author: Warner Losh AuthorDate: 2024-02-10 18:49:09 +0000 Commit: Warner Losh CommitDate: 2024-02-10 18:49:09 +0000 loader: Document the lua loader table. Document all the public functions from the "loader" table. Sponsored by: Netflix Reviewed by: pauamma_gundo.com, tsoome, kevans Differential Revision: https://reviews.freebsd.org/D43701 --- stand/lua/Makefile | 1 + stand/lua/loader.lua.8 | 247 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 248 insertions(+) diff --git a/stand/lua/Makefile b/stand/lua/Makefile index 6b1064dc1815..e8fa16e6b589 100644 --- a/stand/lua/Makefile +++ b/stand/lua/Makefile @@ -8,6 +8,7 @@ MAN= loader.conf.lua.5 \ core.lua.8 \ drawer.lua.8 \ hook.lua.8 \ + loader.lua.8 \ menu.lua.8 \ password.lua.8 \ screen.lua.8 diff --git a/stand/lua/loader.lua.8 b/stand/lua/loader.lua.8 new file mode 100644 index 000000000000..cd436255d4a5 --- /dev/null +++ b/stand/lua/loader.lua.8 @@ -0,0 +1,247 @@ +.\" +.\" Copyright (c) 2024 Netflix, Inc. +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd February 6, 2024 +.Dt LOADER.LUA 8 +.Os +.Sh NAME +.Nm loader.lua +.Nd Fx Lua loader module +.Sh DESCRIPTION +The built-in Lua bindings for the +.Fx +boot loaders using the Lua interpreter +are available via the +.Ic loader +table. +.Pp +The +.Ic loader +table is always available in Lua scripts. +There is no need to require it like other loader-specific modules. +.Ss Exported Variables +The following variables are provided by the Lua interpreter in the +.Nm loader +table: +.Bl -tag -width machine_arch +.It Ic machine +The target's +.Va hw.machine +.Xr sysctl 8 +value. +.It Ic machine_arch +The target's +.Va hw.machine_arch +.Xr sysctl 8 +value. +Some boot loaders are 32-bit applications that then load a 64-bit +kernel. +In these cases, +.Ic machine_arch +represents the 32-bit architecture, not the 64-bit architecture. +.It Ic lua_path +The current lua loading path. +.It Ic version +The version of the boot program. +.El +.Ss Exported Functions +The following functions are exported in the +.Nm loader +table. +.Bl -tag -width term_putimage +.It Fn delay usec +Delay for +.Va usec +microseconds. +.It Fn command_error +Returns the error string from the last command to fail. +.It Fn command argc argv +Like +.Fn perform +but the arguments are already parsed onto the stack. +.It Fn interpret str +Execute the loader builtin command +.Va str +as if it were typed by the user. +This will first try to execute +.Va str +as Lua. +If that fails, it will attempt to execute it as a cli command, +including those defined by the +.Xr cli.lua 8 +mechanism. +If that fails, it will attempt to execute it as a builtin command +and return the same values as +.Fn perform . +.It Fn parse str +Parses the command +.Va str +into its words and return those words on the stack. +.It Fn getenv name +Obtains the value of the environment variable +.Va name . +.It Fn has_command cmd +returns +.Va true +if +.Va commmand +is present in the interpreter as a builtin. +Otherwise it returns +.Va nil +and an error string. +It does not check the +.Dq cli +table to see if a user defined command has been created. +.It Fn has_feature feature +returns +.Va true +if the +.Va feature +is enabled. +Otherwise it returns +.Va nil +and an error string. +.It Fn perform str +Execute the loader builtin command +.Va str . +Returns the result of the command, one of the following values: +.Bl -tag -width loader -offset indent +.It loader.CMD_OK +The command completed successfully. +.It loader.CMD_WARN +The command was successful, but the user stopped its output +prematurely. +.It loader.CMD_ERROR +The command did not complete successfully. +Use +.Va command_error +to retrieve the error. +.It loader.CMD_CRIT +The command returned a critical error that was already printed. +.It loader.CMD_FATAL +The command determined continuation was not possible +and the loader panicked. +In practice, though, +.Fn panic +does not return. +.El +.It Fn printc str +Outputs the string using the loader's +.Fn putchar +function. +This function is also available globally as +.Fn printc . +.It Fn setenv name value +Insert or reset the environment variable +.Va name +into the loader's environment list. +If no environment variable with this name exists, one is created. +If one exists, its value is replaced. +.It Fn time +Returns the loader's notion of time, in seconds since 1970. +The value of loader's notion varies somewhat between different loading +environments. +.It Fn unsetenv name +Removes the environment variable +.Va name +from the loader's environment list. +.It Fn fb_bezier x0 y0 x1 y1 x2 y2 width +Draw a bezier curve through the points +.Pq Va x0 , Va y0 , +.Pq Va x1 , Va y1 , +and +.Pq Va x2 , Va y2 +of width +.Va width . +The units are in pixels and have an origin of +.Pq 0 , 0 . +.It Fn fb_drawrect x0 y0 x1 y1 fill +Fill in a rectangle with the pixel +.Va fill +with the corners +.Pq Va x0 , Va y0 +and +.Pq Va x1 , Va y1 . +The units are in pixels and have an origin of +.Pq 0 , 0 . +.It Fn fb_line x0 y0 x1 y1 width +Draw a line from +.Pq Va x0 , Va y0 +to +.Pq Va x1 , Va y1 +with a width of +.Va width . +The units are in pixels and have an origin of +.Pq 0 , 0 . +.It Fn fb_putimage name x0 y0 x1 y1 f +Load the PNG file +.Va name +and place it in the rectangle +with the corners +.Pq Va x0 , Va y0 +and +.Pq Va x1 , Va y1 +and fill with pixel +.Va f . +The units are in pixels and have an origin of +.Pq 0 , 0 . +.It Fn fb_set_pixel x y +Sets the pixel at +.Pq Va x , Va y . +The units are in pixels and have an origin of +.Pq 0 , 0 . +.It Fn term_drawrect x0 y0 x1 y1 +Draw the outline of a rectangle with the text coordinate corners of +.Pq Va x0 , Va y0 +and +.Pq Va x1 , Va y1 . +The units are in character cells and have an origin of +.Pq 1 , 1 . +.It Fn term_putimage name x0 y0 x1 y1 f +Load the PNG file +.Va name +and place it in the rectangle +with the text coordinate corners +.Pq Va x0 , Va y0 +and +.Pq Va x1 , Va y1 +and fill with pixel +.Va f . +The units are in character cells and have an origin of +.Pq 1 , 1 . +.El +.Pp +The functions starting with +.Fn fb_ +and +.Fn term_ +are optional. +They should only be used if they are non-nil and if +.Fn core.isFramebufferConsole +is true. +.Ss Default File +In addition, the Lua interpreters start with the file +.Pa /boot/lua/loader.lua +when they start to boot the system. +The default one will fixup the screen, load the configuration files, check for a +password, and then load the menu or load the kernel file and then return. +If autoboot is enabled, the loaded files will boot. +.Sh SEE ALSO +.Xr loader.conf 5 , +.Xr core.lua 8 , +.Xr loader 8 , +.Xr sysctl 8 +.Sh AUTHORS +The +.Nm +man page was written by +.An Warner Losh Aq Mt imp@FreeBSD.org . +.Sh BUGS +.Fn command +and +.Fn perform +should return a tuple when there's +.Va CMD_ERROR +or worse. From nobody Sat Feb 10 20:31:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXMnM3mg3z5BJyc; Sat, 10 Feb 2024 20:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TXMnM3H7Xz4Vf5; Sat, 10 Feb 2024 20:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707597079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O6bZGts1f0dDEFiAkeCuO/VXJn2AGnGEVq289b6Qg9A=; b=t5rvhzuEl2yXEnJyD6JrEZMB2vQ6DdyJxth3auJKFM4BENXBm+Lp0gHwuwo6BX0A+TMgAW eLLaZxrO//WAhJjMSKQpd/WcFnwYuoLgwvonpRsCZsKDuOE9tFqe1/mYir32yyTVDnMC74 JZfp0gT6pZh2rt3jXfcY13lzc7G0jdSi8C8DECN4NjlgbOKLSAVneiiqUCvHSX1umqlGgU +wPPISa9+MxxCoUC0cwmLTl3gL8+1LJxmY3WZ9NVKEP3602uKQddznEZo1n6KuiwnaBgrW aGljx9vs1Rhb9hDvhhyIa4EoLE82B2AyHOeMvG7PpqoN3b4yOtUuQ01SIbGfTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707597079; a=rsa-sha256; cv=none; b=pyUb8sCE6ou+fRKdremSBD09fOGjKHdqR/7odCdFHDwTiqEMhvsqYDnBfuoSu7gqAc5L1e sDjYtR7GoELAvlqdytOToATaYEYgCjXXizrH+HS0MhU11oRREetjH2FPiuvfNg8b6dcIrz o3rAhJEjzgvrpuCHs1geQZRse3SvDe37XvfGcwyrsfmnm+hR3LmC4in4IBSZkrzZh3oz7/ zeysqEE+6nFMUT729nwWs26m6Mspxq3H5UYOOEkgM4qyWu1tsPDK2PORxshcd9RPBAXoeU MYMEN8T1S3HsX7NrJ7t04D63tltGzNNfDrLZTHr/4UeAR+lhjIgTxAnCflRxoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707597079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O6bZGts1f0dDEFiAkeCuO/VXJn2AGnGEVq289b6Qg9A=; b=kwhaTrONUoImglAPSzh5XKiyKavGQHHXOMm3u3zWA0qDVJe9vV6+2jWIK4V9NYmnZ1gYRF fEl+AhFfw0+WKhdyaHxLwf77lb3uaUhNb+usv9DTdDHW2I6+hVCHCIqSO6WFMP3eq+boW5 vkpWYamP6PoTNMCLPEiBVFlxIbSmrudtCl777X0Bo2dhmLmGv+Aqhzs31cR1zMPsNfwfaU ctSQOxeMy3EjR75tvT/5Yvif6go4JqvaDpRxb7ph8MJrCjhAyrQPDPd16l2ry0fVHAfhEB kcGhaDe6HpF2P/Kd5AOq3aNO0msQ6fmp6N/jV51xEdhuY4FGGcUKkQtQ951tdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXMnM2KjCzW86; Sat, 10 Feb 2024 20:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41AKVJoq048361; Sat, 10 Feb 2024 20:31:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AKVJ5J048358; Sat, 10 Feb 2024 20:31:19 GMT (envelope-from git) Date: Sat, 10 Feb 2024 20:31:19 GMT Message-Id: <202402102031.41AKVJ5J048358@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: 41f9823eda94 - main - rc.subr.8 note when DebugOn will be called List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41f9823eda9424ebaa37ed00db4e8534f9e5561c Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=41f9823eda9424ebaa37ed00db4e8534f9e5561c commit 41f9823eda9424ebaa37ed00db4e8534f9e5561c Author: Simon J. Gerraty AuthorDate: 2024-02-10 20:30:53 +0000 Commit: Simon J. Gerraty CommitDate: 2024-02-10 20:31:10 +0000 rc.subr.8 note when DebugOn will be called --- share/man/man8/rc.subr.8 | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index 91ed5364bd6a..0906ecb2e787 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 31, 2024 +.Dd February 10, 2024 .Dt RC.SUBR 8 .Os .Sh NAME @@ -385,8 +385,10 @@ mechanism for an administrator to override the behaviour of a given .Xr rc.d 8 script without requiring the editing of that script. .Pp -The function -.Ic dot +The function named by +.Va load_rc_config_reader +(default is +.Ic dot ) is used to read configuration unless .Ar flag is: @@ -404,6 +406,12 @@ use .Ic vdot to read in configuration only if it is verified. .El +.Pp +.Ic DebugOn +will be called with tags derived from +.Ar name +to enable tracing if any appear in +.Va DEBUG_SH . .It Ic load_rc_config_var Ar name Ar var Read the .Xr rc.conf 5 @@ -441,7 +449,7 @@ If the file is empty or does not contain a value for .Va RC_LEVEL , set it to -Li 0 . +.Li 0 . .Pp If .Ar level @@ -993,6 +1001,14 @@ However, if .Ic is_verified Ar file fails, just return. .Pp +.Ic DebugOn +will be called with tags derrived from +.Va name +and +.Va rc_arg +to enable tracing if any of those tags appear in +.Va DEBUG_SH . +.Pp The startup behaviour of .Ar file depends upon the following checks: From nobody Sat Feb 10 21:03:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXNVf3qtrz5BM16; Sat, 10 Feb 2024 21:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TXNVf3FGvz4YPJ; Sat, 10 Feb 2024 21:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707599018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZQ/LYh0GI71sxjQsRNAISwuysHpdO5XPR2/KETz3iEQ=; b=URew8Ex6tWsudL2Y/hmkKuk8IaPIwR+yeY72cha5bpgDCrRkjGaJBfb9/y8zjhl4J/9ZN4 2K/CuFAs9+IxzQL5riWxyRl30gXh/0Dx/ZgTqmpiJOViR/eQxDBS6AKOxFDRpf/D20W1wb Umoksqzz5VmR+T9VVIZaM/LO023lDhaPhrTPvR1w9xqpxnTWHqtAgRMxWmjNe0WuTQ8TGZ 0G/p8/uLoJnQz0gF6FUJjthMfS1uEvuesg8mkI3+TWbVJW70o7v/IoGCkO0PwpDK/lJFjr IOK/67HLzEbiwskgY0g2nlv2glyDnIQIX08tvbOES/i5fLkvVJcTA5QyQw8YZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707599018; a=rsa-sha256; cv=none; b=MzZ4XVkGfJ5kesE72Ou3gIPB/opgp/SmLlyYGqN9ygAi9/SW4N85zbREHbHKVnuc4/cQ8h afolg+0TCL19j39yw1ohwtB817CzM/FFAgDMLfdDsjbK9+lGlnqimSR9e3J3tdcxR6hCKc jytDChvv0qsm05jWPd5SgMnWq4BwKrSN2I/UZTnpPUX31UL2hqvos250og+G1/JJHfnHOz uPXrR4hRj8LeZ1mVi0sdb/VvNBk9j202HgyXGwzvnoWXIT3EVwAXwQZwLPKgPi4Tg7hIhi 3D8XqoKv50DlZkanhStsR9k7zHwUvkm1xKKafFbhFUUuLTAF33B+lk+06IjoTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707599018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZQ/LYh0GI71sxjQsRNAISwuysHpdO5XPR2/KETz3iEQ=; b=jmQF2xIXeQ4qt9iMdG2NMx/L/GVrV4xZyXSemIBP+ZzgfKIE6cccf6Tyw7rLLDQ2JWuL3I C49oTjK090KpgHVyvGVrB18C0NQywmWvoJ9Ji5lqgiVAG7dnJ+NYwYCkjHjWamnbCsKewZ ZDaaKLOMDPGzB3O+p7PTUCyVh3OZzkuMTmRHI1uUlGf4yP/oBZ5iH6sjsI7MBQH3qZ+z60 bbws/52fYV0KtRBsVhvU15GQNE0t5BzOHm1p8t53asPJBLQlhXdWm74brJu9Gmp0NTZA4F Som/J1GwkITM3VSLJYqGgcr+BQ7mhsvJwBTrjZeSEAD6J+v5qbbnO0pUV/ZgnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXNVf2Hb9zXpm; Sat, 10 Feb 2024 21:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41AL3cGL003582; Sat, 10 Feb 2024 21:03:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AL3cdk003579; Sat, 10 Feb 2024 21:03:38 GMT (envelope-from git) Date: Sat, 10 Feb 2024 21:03:38 GMT Message-Id: <202402102103.41AL3cdk003579@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: 4015c064200e - main - Remove usr.bin/clang/llvm-ar/llvm-cxxfilt-driver.cpp file List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4015c064200e643ab110cdf831064c3c73f31b73 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4015c064200e643ab110cdf831064c3c73f31b73 commit 4015c064200e643ab110cdf831064c3c73f31b73 Author: Dimitry Andric AuthorDate: 2024-02-10 21:00:05 +0000 Commit: Dimitry Andric CommitDate: 2024-02-10 21:02:45 +0000 Remove usr.bin/clang/llvm-ar/llvm-cxxfilt-driver.cpp file I accidentally copied this to the wrong place, or by accident to two places, during the merge of llvmorg-17-init-19304-gd0b54bb50e51. Fixes: 06c3fb2749bd MFC after: 3 days --- usr.bin/clang/llvm-ar/llvm-cxxfilt-driver.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/usr.bin/clang/llvm-ar/llvm-cxxfilt-driver.cpp b/usr.bin/clang/llvm-ar/llvm-cxxfilt-driver.cpp deleted file mode 100644 index 3ed6f501327f..000000000000 --- a/usr.bin/clang/llvm-ar/llvm-cxxfilt-driver.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//===-- driver-template.cpp -----------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "llvm/Support/LLVMDriver.h" -#include "llvm/ADT/ArrayRef.h" - -int llvm_cxxfilt_main(int argc, char **, const llvm::ToolContext &); - -int main(int argc, char **argv) { - return llvm_cxxfilt_main(argc, argv, {argv[0], nullptr, false}); -} From nobody Sat Feb 10 21:36:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXPDS1Br4z5BPc5 for ; Sat, 10 Feb 2024 21:36:24 +0000 (UTC) (envelope-from truckman@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 4TXPDS0n9hz4bWn for ; Sat, 10 Feb 2024 21:36:24 +0000 (UTC) (envelope-from truckman@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707600984; 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: references:references; bh=LeaOqra0iF8ixVV0/ATPPu1LUtyn+uErxpwH+JUmXX8=; b=uRpjNAYtESIN+iwamF38qv8FM2N456ngoP+cgt2vEqg5OoYTfb49f+3UezPgNJXF1RNMpc /UpqjnhgPYWWRXPsR8r80NqrgfM985YkmBr/WrqnWuHoA84TMBbh1Ry8a2oQyjC5RGpjS/ tbLmeFISf2KB6VUzWi47gqzYOfIuu7MpwW4fnUY4Wn3MvDEC5bmzMN/jXXzcvI7RaTqPT8 srBp5LIP69YSGfbA5UIPug5kuPMOXa6nMvQlmpkD08lhtS7eBC881JbHqC3ReqGip4/qfa Rv3NfitJD2K9R7WkMG54JzfruHXVWgYFlrNWVisn+o5GXi9bqrwBQrRc1VGEwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707600984; a=rsa-sha256; cv=none; b=hsCktNliQQzaqN1/pgVQ8+sLRf4ykoRMRoteSjbh7x+fMqZ5y/twQT29p23HIk7P4FhXnK hFa8XDDtuHikOkFdMQIXPPi9FSPw/ltGODyBh3Fzn8DqMs7+f4BMgvAfLpwywAotVFwMMC WGE+5cuBCWZMC/b/UKtvioNT/7z2laP+OdppyuOzvWEblnwzyKJQQmaT+IRIWH2buelSNE iLM7lnh5D06x+7gtPbH/zqiekkCU7i1ppO+hU8lGjAUzAN0irIaxSUJGwLLa/sLMDQj0te pgNeOSS/BQm3y95KaJzgBN7RgwXxiOoQbAUTVvu3yMKnHImtfaj1oNsAQRIDHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707600984; 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: references:references; bh=LeaOqra0iF8ixVV0/ATPPu1LUtyn+uErxpwH+JUmXX8=; b=AJN1Ra8oS00mioJbj2EiPzZYWVWVUVf+C0yZM5LtlaDl0OD96UB140X9chZDpH3SC+tfrc GQyYg7Wrlfc6ElrNt2JCpgx0WKFGecoVubQ6k6RWLbk2d12R1xR0+Y7F7MtOFmy2B3XS1B YPKw9fNsWSVGfIOXvaCwvRyb9JayXnWGAjrecJHjHRvWGFzqEtxo9blxVLmhu5uzj7e7iG aKJbgBqTwvSakvFYbWLSxIjFPKxl2k28OPt7nxFMSPKShb2+HaNZ7BZHotiIOCG7LqSQJo X8t63n6GoB2KQreUpym/krTsYDTzOPZG++wAn7pwaaMa3QY+7xEGsLhIJVWGUg== Received: from gw.catspoiler.org (unknown [IPv6:2602:304:cd45:5b11::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: truckman) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TXPDR4fHvzbq8 for ; Sat, 10 Feb 2024 21:36:23 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from dl (uid 1001) (envelope-from truckman@FreeBSD.org) id 232f9f by gw.catspoiler.org (DragonFly Mail Agent v0.13 on mousie.catspoiler.org); Sat, 10 Feb 2024 13:36:20 -0800 Date: Sat, 10 Feb 2024 13:36:19 -0800 (PST) From: Don Lewis Subject: Re: git: 49d684369c66 - main - libthr: filter rather than link with libsys To: Brooks Davis cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: References: <202402071951.417JpRgf034979@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-Disposition: INLINE On 7 Feb, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=49d684369c6682eebca325c55a6c96b7c03f5aeb > > commit 49d684369c6682eebca325c55a6c96b7c03f5aeb > Author: Brooks Davis > AuthorDate: 2024-02-07 19:38:16 +0000 > Commit: Brooks Davis > CommitDate: 2024-02-07 19:50:47 +0000 > > libthr: filter rather than link with libsys > > The allows gcc + GNU ld to link programs with -m32 -pthread without > erroring out due to _umtx_op_err being undefined (unless -lsys is added > to the link command. > > We now always link _umtx_op_err into libthr (not just when it's static) > and filter it with libsys so we call that implementation. The dynamic > implementations (at least the assembly ones) should likely become stubs > as a further refinement. Thanks! I ran into this problem early this week when lang/gcc12 stopped bulding and I spent a bunch of time bisecting. From nobody Sat Feb 10 22:03:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXPqZ2XPmz5BS42; Sat, 10 Feb 2024 22:03: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 4TXPqY67KQz4gMd; Sat, 10 Feb 2024 22:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o5ANKSpjtdGqoDw+c1DXx/7exP9l2BkOf0ZX3qCeUb0=; b=Qj53yLOxWUSQNKydmltcxh8F06Dk6VSSfluXirI0F1GoZrXzWf6XuMMww56NWRduC3Gomp bwYr5vGGVeEFGE4wM2Eps80zFX2nj7qmzFdemxEqtYDoxwmsq250HaP3wdRDYJOsoGOJ88 MZm0GaNCtqprcZw5YArZ98QpscTqt5Jzezp6TzFwmJjEaTmNzmGE93XJ/DcF2sn3cucL2c oLsFolg6dSpkWMQEHSYttZ4yZhTN2zjK49Nqv+Oe2J+2eOJFZ35aVK/eiQ0+iFDjggVU3z B9wNrq8WuQUhcZ3Wb1HVeHudh3M/xn7H7I1CfZhI/29TIAn/j81XbpLaV8W9yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707602601; a=rsa-sha256; cv=none; b=t2pFQp+EOAtUTYcrfcWHcoqGscmUbzjnVMaiaPy3P4GgVPJ3jZ6FyHV2okz2vHexS1TiF7 i5sueBi5szQ4d0gJLbfp021ivvrNShViMRji5YYlZp/dieO4JJJ3C55s/hXdTMmpm0Mds6 u+PiVAC+KfZe/Daa/QTBzg0QswxkCsqcbdb4jkMhkpjIPVDli9P25uLPh+b2pYNOBsTv5z DC3b/gWmtS15O3ES93l03KM38eC3KDHePt9pNUoceGgU+MXdiC52PMSFcI5wrP3y6dumsa Ty2IlCqltHzr0W/RcN2nvuyho1MpVsQqFucAqtJEz1pfdLlpXprabLK0hOs4XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o5ANKSpjtdGqoDw+c1DXx/7exP9l2BkOf0ZX3qCeUb0=; b=IS1PlHfKxmBlLTVPd4wHwKyhZ4wWM7z66QlMXZNpJeuvh/4HcaxeNs7HdozYtSfCQSC7UX s0ifTVTA717/+63pib/AMU0RBbIjvWtcqgQLB2kRGcWt1kMB/aBdH4wVLbZIMMCv8KgG86 EH7KBLPW0XPqGSl8dHlqmDpTu6YkT+sOgEbCS+WGrz12gScMBxDM1mJrU1uQJb5Kd2ET1y aHxezP6NqT/j3CxPiBKBwgPDguVfSyy3vfN/hckXJYz/F6gn2iY+yGfeuTI7xAZz5hVVEO kDjUy1Xgc3M/onZQ7U7tw/0kjnAjBwmuNFHyAk6NnaTC1DzmzqHbJlVXJ/w8dA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXPqY5CLfzZ28; Sat, 10 Feb 2024 22:03: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 41AM3LMC005911; Sat, 10 Feb 2024 22:03:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AM3LLV005909; Sat, 10 Feb 2024 22:03:21 GMT (envelope-from git) Date: Sat, 10 Feb 2024 22:03:21 GMT Message-Id: <202402102203.41AM3LLV005909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 7f1a7506cbf7 - main - Revert "LinuxKPI: Do not use explicit context in FPU sections on powerpc64" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f1a7506cbf7f28698b50a5af56cdf4de9aaa8b0 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7f1a7506cbf7f28698b50a5af56cdf4de9aaa8b0 commit 7f1a7506cbf7f28698b50a5af56cdf4de9aaa8b0 Author: Vladimir Kondratyev AuthorDate: 2024-02-10 22:01:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-10 22:01:50 +0000 Revert "LinuxKPI: Do not use explicit context in FPU sections on powerpc64" kmalloc() support within FPU sections will be redone in other way. This reverts commit b4efc62776344a9aaada5a0866e453e528a0e977. Sponsored by: Serenity Cyber Security, LLC Requested by: jhb --- sys/compat/linuxkpi/common/include/linux/compat.h | 5 +++++ sys/compat/linuxkpi/common/src/linux_current.c | 9 +++------ sys/compat/linuxkpi/common/src/linux_fpu.c | 3 +-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compat.h b/sys/compat/linuxkpi/common/include/linux/compat.h index d357abce732b..7922e884beb1 100644 --- a/sys/compat/linuxkpi/common/include/linux/compat.h +++ b/sys/compat/linuxkpi/common/include/linux/compat.h @@ -33,6 +33,11 @@ #include #include +#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ + defined(__i386__) || defined(__powerpc64__) +#define LKPI_HAVE_FPU_CTX +#endif + struct domainset; struct thread; struct task_struct; diff --git a/sys/compat/linuxkpi/common/src/linux_current.c b/sys/compat/linuxkpi/common/src/linux_current.c index 64b5b8be4c6a..d269552c4ffa 100644 --- a/sys/compat/linuxkpi/common/src/linux_current.c +++ b/sys/compat/linuxkpi/common/src/linux_current.c @@ -43,8 +43,7 @@ #include #include -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) +#ifdef LKPI_HAVE_FPU_CTX #include #endif @@ -161,8 +160,7 @@ linux_alloc_current(struct thread *td, int flags) int linux_set_fpu_ctx(struct task_struct *task) { -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) +#ifdef LKPI_HAVE_FPU_CTX if (task->fpu_ctx == NULL && curthread->td_critnest == 0) task->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NOWAIT); #endif @@ -192,8 +190,7 @@ void linux_free_current(struct task_struct *ts) { mmput(ts->mm); -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) +#ifdef LKPI_HAVE_FPU_CTX if (ts->fpu_ctx != NULL) fpu_kern_free_ctx(ts->fpu_ctx); #endif diff --git a/sys/compat/linuxkpi/common/src/linux_fpu.c b/sys/compat/linuxkpi/common/src/linux_fpu.c index ef7f252cdd9e..d510bc208b88 100644 --- a/sys/compat/linuxkpi/common/src/linux_fpu.c +++ b/sys/compat/linuxkpi/common/src/linux_fpu.c @@ -35,8 +35,7 @@ #include -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) || defined(__powerpc64__) +#ifdef LKPI_HAVE_FPU_CTX #include From nobody Sat Feb 10 22:03:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXPqb1thZz5BRqT; Sat, 10 Feb 2024 22:03: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 4TXPqb03WFz4gPh; Sat, 10 Feb 2024 22:03:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dd3rieDMKCl6sm3tDL851RY6tAcDkIWAM0gq5qJgxJc=; b=GojTOQ21iF0O/Ho2yQPIwr7a9y+j4p+WMdWg+cKpE4Eu6EGHbBuvADN0KDFHDEO8Ql8LjJ sT3Nn1SnaTqJ0iUsrAOfmhm4UlmRfFgyqEV6S3AJpTRy6lFYMGkaOpnUJIFqH/2p+NcI7r RRP01ZNOLZxNT8kR8lTdmpkxG7k2rXtL7kntwXKC/7jU4F8SBlXK1pWjxpUeGAfhIUT5Xg 7OsE4+uikK07kq8bKp9dPJ4gqtNY3AknxVm4eDhBGciNxCHJo1vEICZZy4uKp3eBfPZjzo ro+E8wDnO6guvKx9+aQh2yjWSDh+axwzdhYE3DEvJJaXRCcKIxZDkNEJiffaNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707602603; a=rsa-sha256; cv=none; b=KV03HIqOFxgJB2sQJLe2MiREpxR6Ur5MDDGXTUYwUU1n5b/yXl4pHexR2DxJPr4d1kOlGm yk5hrTiGpSas/Md3ro+AYuNUHcIiMT3bGp62gvLUUCAvTeE5LhBGSPGJ54fSMYrEENHT6w iLnSwpq9r/YLmGQHptkGTXNplUe15/2z7sZlXjb15PPFbNZPjuvEfi6I0T7vu/fGV3NzfE 4gUb2hKI7X7b5fAgz6+JO0P0QWGJ4uTsTBu2O2PzHWHOnEPXlBvKajnY5SAcoDzM5pmY7T WDVWCV5ifk/aok7rvJed1C4mmOlwOnwgT6gZ/kdWI+71TOCdZRhqXhMaUDluRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dd3rieDMKCl6sm3tDL851RY6tAcDkIWAM0gq5qJgxJc=; b=bwaIMAtElfTOzeFT4pQptBv5zbBNGlOEWa+0v81t8glsAwQnNrQeEVMIQTLPuiiMtfxkJS 9U6Zb34tmNmAHsrOYmZDiqb7mmCUSQWHbIeDD8S42Nh0aoE5hxoVZ8o43ITcxWlXC4ittJ XSnGBd1pfynlCHnjKV2Mk91xCr+f9S3MzWsyIbF+yzYmYwXSyG1M7ylvzsMDOgBCA0tKWE Qsb5Lm1Ur1kuWEjmrjMxAdl67AEsfiCeRw0H4St/yWThNW9heHqhPvya7Htq4CnG2wXuB3 hb5hXSCKvPxBzFblH0OeM8KqLt/YDR9U88ChDHXZalHFmZTp4dyhxd/hEPZsUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXPqZ6FdLzZHF; Sat, 10 Feb 2024 22:03: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 41AM3MsL005965; Sat, 10 Feb 2024 22:03:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AM3Mo3005962; Sat, 10 Feb 2024 22:03:22 GMT (envelope-from git) Date: Sat, 10 Feb 2024 22:03:22 GMT Message-Id: <202402102203.41AM3Mo3005962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: db65db64fbf3 - main - Revert "LinuxKPI: Add explicit software context to FPU sections" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db65db64fbf36c7c3625d55b686201d962a7bc4b Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=db65db64fbf36c7c3625d55b686201d962a7bc4b commit db65db64fbf36c7c3625d55b686201d962a7bc4b Author: Vladimir Kondratyev AuthorDate: 2024-02-10 22:01:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-10 22:01:50 +0000 Revert "LinuxKPI: Add explicit software context to FPU sections" kmalloc() support within FPU sections will be redone in other way. This reverts commit 5a3bd281672bd6bd8e18081c3928dfe76d330a5f. Sponsored by: Serenity Cyber Security, LLC Requested by: jhb --- sys/compat/linuxkpi/common/include/linux/compat.h | 6 ------ sys/compat/linuxkpi/common/include/linux/sched.h | 2 -- sys/compat/linuxkpi/common/src/linux_current.c | 18 ------------------ sys/compat/linuxkpi/common/src/linux_fpu.c | 14 ++++---------- 4 files changed, 4 insertions(+), 36 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compat.h b/sys/compat/linuxkpi/common/include/linux/compat.h index 7922e884beb1..d1a02f612f42 100644 --- a/sys/compat/linuxkpi/common/include/linux/compat.h +++ b/sys/compat/linuxkpi/common/include/linux/compat.h @@ -33,11 +33,6 @@ #include #include -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) || defined(__powerpc64__) -#define LKPI_HAVE_FPU_CTX -#endif - struct domainset; struct thread; struct task_struct; @@ -45,7 +40,6 @@ struct task_struct; extern int linux_alloc_current(struct thread *, int flags); extern void linux_free_current(struct task_struct *); extern struct domainset *linux_get_vm_domain_set(int node); -extern int linux_set_fpu_ctx(struct task_struct *); static inline void linux_set_current(struct thread *td) diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h index 77c4f6d3f80f..8cb6b12100d5 100644 --- a/sys/compat/linuxkpi/common/include/linux/sched.h +++ b/sys/compat/linuxkpi/common/include/linux/sched.h @@ -64,7 +64,6 @@ #define TASK_COMM_LEN (MAXCOMLEN + 1) struct seq_file; -struct fpu_kern_ctx; struct work_struct; struct task_struct { @@ -90,7 +89,6 @@ struct task_struct { struct task_struct *group_leader; unsigned rcu_section[TS_RCU_TYPE_MAX]; unsigned int fpu_ctx_level; - struct fpu_kern_ctx *fpu_ctx; }; #define current ({ \ diff --git a/sys/compat/linuxkpi/common/src/linux_current.c b/sys/compat/linuxkpi/common/src/linux_current.c index d269552c4ffa..c342eb279caa 100644 --- a/sys/compat/linuxkpi/common/src/linux_current.c +++ b/sys/compat/linuxkpi/common/src/linux_current.c @@ -43,10 +43,6 @@ #include #include -#ifdef LKPI_HAVE_FPU_CTX -#include -#endif - #ifdef DEV_APIC extern u_int first_msi_irq, num_msi_irqs; #endif @@ -157,16 +153,6 @@ linux_alloc_current(struct thread *td, int flags) return (0); } -int -linux_set_fpu_ctx(struct task_struct *task) -{ -#ifdef LKPI_HAVE_FPU_CTX - if (task->fpu_ctx == NULL && curthread->td_critnest == 0) - task->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NOWAIT); -#endif - return (task->fpu_ctx != NULL ? 0 : ENOMEM); -} - struct mm_struct * linux_get_task_mm(struct task_struct *task) { @@ -190,10 +176,6 @@ void linux_free_current(struct task_struct *ts) { mmput(ts->mm); -#ifdef LKPI_HAVE_FPU_CTX - if (ts->fpu_ctx != NULL) - fpu_kern_free_ctx(ts->fpu_ctx); -#endif uma_zfree(linux_current_zone, ts); } diff --git a/sys/compat/linuxkpi/common/src/linux_fpu.c b/sys/compat/linuxkpi/common/src/linux_fpu.c index d510bc208b88..b26dce98774b 100644 --- a/sys/compat/linuxkpi/common/src/linux_fpu.c +++ b/sys/compat/linuxkpi/common/src/linux_fpu.c @@ -30,12 +30,11 @@ #include #include -#include #include #include -#ifdef LKPI_HAVE_FPU_CTX +#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) #include @@ -48,20 +47,15 @@ void lkpi_kernel_fpu_begin(void) { - int err; - - if ((current->fpu_ctx_level)++ == 0) { - err = linux_set_fpu_ctx(current); - fpu_kern_enter(curthread, current->fpu_ctx, - err == 0 ? FPU_KERN_KTHR : FPU_KERN_NOCTX); - } + if ((current->fpu_ctx_level)++ == 0) + fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); } void lkpi_kernel_fpu_end(void) { if (--(current->fpu_ctx_level) == 0) - fpu_kern_leave(curthread, current->fpu_ctx); + fpu_kern_leave(curthread, NULL); } #else From nobody Sat Feb 10 22:03:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXPqc2yTzz5BRmT; Sat, 10 Feb 2024 22:03: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 4TXPqc1864z4gJp; Sat, 10 Feb 2024 22:03:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t4VM4rR4WSRUrcJI1gJGPUvj1JaBhapW9efC960x1ko=; b=y1rsj87nbPDrZx5/hloPMXZzj63ZwYkOZHmurhs54kvazr/1jOgjyr1g62Kta9iUzfxKF8 SzxIpG9mNxlrnhujuA217i62rcYT4prebu6wsFMq3HHYaXMsZVcSuVPkJdUoamSZFmkfsY T0m7k52yC7flChMhspLpbQgv0pjpWc/qWfqAjXuKx48ohYX5ar636HdE7e75H7YzKi0ef1 EuT4B8yi+w4JVAKCOHkiMU9SnzG7fdzOOn/alt4mVrSdDBaoqUz2uWyOP5ND5BRLRXzaOE eEKUonxFNkzCUlAKw54EXcqNgsDs403XSjW7I8fliYa4DFETO7/rvsB3YSwSvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707602604; a=rsa-sha256; cv=none; b=KeKF8dk+DGBnQc1bi6Dicr9UZZ/Nrqa4LqIIws2xiQDxvYbGuFhTAFGcEkVupezZJCjPZU g17ihYanS0/NPh2N71qkw+0V/y2jRSG3Jnl32452rPEWjzJ+Q7UaVcZ2HJJWYmB4ObPtvJ jd9m7jHw15Hgv878ERZ48PUx/CO8VQ/XSsHI6oYQ11ACBIjQQTmHjHqSP+236wiy1/RE2Y ymZD60zzd7ZUGsQRyOufYXY0KwnViQtLsLJOL4m3bZzVc4675NnQmD23VIk+6Tb+3hZMJ4 nuQYceDrpjubVlM3fevvx1ZyKJR9yFpG8SpLSm4K+wxhvbg7vAQvZW8RdLaTRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t4VM4rR4WSRUrcJI1gJGPUvj1JaBhapW9efC960x1ko=; b=EZhfn/mvKK75Jem1i0vefePCQeuW0TpKBpPoYGbgoJeBfWQea+fldED40xsnQUXk6IQZgP 1ymlY+mITO3+GB4ea5TKoKhC+FGCi9CyWcbqQXGmhCkPkVf5T2VShaRwOJ8wg5QvC9jMvE +k5vrXGU7KwBaqlCPVOpFuC2nI+zlaHHOme+XObLYWss7duZ3FIhpHmDwVeqeBSiSHZrIn ldhV+Iji/hmRou4LB9ZSo/G7D7iI14KZ74zAifcRfStBsqbTf1x1V/08QCwrDUS3ydDSvO HQwv1mhuzRWKtXcDDp14CN2DNTiMrVl+V9JIxpoJZwFVF30BUM08tB8j7IqFJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXPqc0F9mzZHG; Sat, 10 Feb 2024 22:03: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 41AM3NRf006026; Sat, 10 Feb 2024 22:03:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AM3NGb006023; Sat, 10 Feb 2024 22:03:23 GMT (envelope-from git) Date: Sat, 10 Feb 2024 22:03:23 GMT Message-Id: <202402102203.41AM3NGb006023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: c0b8047bdc13 - main - LinuxKPI: Allow kmalloc to be called when FPU protection is enabled List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0b8047bdc13040eafb162c4b7b5dba11034ff4b Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c0b8047bdc13040eafb162c4b7b5dba11034ff4b commit c0b8047bdc13040eafb162c4b7b5dba11034ff4b Author: Vladimir Kondratyev AuthorDate: 2024-02-10 22:01:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-10 22:01:50 +0000 LinuxKPI: Allow kmalloc to be called when FPU protection is enabled Amdgpu driver does a lot of memory allocations in FPU-protected sections of code for certain display cores, e.g. for DCN30. This does not work on FreeBSD as its malloc function can not be run within a critical section. Check this condition and temporally exit from FPU-protected context to workaround issue and reduce source code patching. Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu (previous version) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42822 --- sys/compat/linuxkpi/common/include/linux/compat.h | 10 ++++++-- sys/compat/linuxkpi/common/include/linux/slab.h | 5 ++-- sys/compat/linuxkpi/common/src/linux_fpu.c | 28 ++++++++++++++++++++++- sys/compat/linuxkpi/common/src/linux_slab.c | 24 +++++++++++++++++++ 4 files changed, 62 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compat.h b/sys/compat/linuxkpi/common/include/linux/compat.h index d1a02f612f42..8a5a6918bb7c 100644 --- a/sys/compat/linuxkpi/common/include/linux/compat.h +++ b/sys/compat/linuxkpi/common/include/linux/compat.h @@ -41,17 +41,20 @@ extern int linux_alloc_current(struct thread *, int flags); extern void linux_free_current(struct task_struct *); extern struct domainset *linux_get_vm_domain_set(int node); +#define __current_unallocated(td) \ + __predict_false((td)->td_lkpi_task == NULL) + static inline void linux_set_current(struct thread *td) { - if (__predict_false(td->td_lkpi_task == NULL)) + if (__current_unallocated(td)) lkpi_alloc_current(td, M_WAITOK); } static inline int linux_set_current_flags(struct thread *td, int flags) { - if (__predict_false(td->td_lkpi_task == NULL)) + if (__current_unallocated(td)) return (lkpi_alloc_current(td, flags)); return (0); } @@ -59,4 +62,7 @@ linux_set_current_flags(struct thread *td, int flags) #define compat_ptr(x) ((void *)(uintptr_t)x) #define ptr_to_compat(x) ((uintptr_t)x) +typedef void fpu_safe_exec_cb_t(void *ctx); +void lkpi_fpu_safe_exec(fpu_safe_exec_cb_t func, void *ctx); + #endif /* _LINUXKPI_LINUX_COMPAT_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index 8557f831bb60..298306b6ea05 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -41,6 +41,7 @@ MALLOC_DECLARE(M_KMALLOC); +#define kmalloc(size, flags) lkpi_kmalloc(size, flags) #define kvmalloc(size, flags) kmalloc(size, flags) #define kvzalloc(size, flags) kmalloc(size, (flags) | __GFP_ZERO) #define kvcalloc(n, size, flags) kvmalloc_array(n, size, (flags) | __GFP_ZERO) @@ -53,7 +54,6 @@ MALLOC_DECLARE(M_KMALLOC); #define vmalloc_node(size, node) __vmalloc_node(size, GFP_KERNEL, node) #define vmalloc_user(size) __vmalloc(size, GFP_KERNEL | __GFP_ZERO, 0) #define vmalloc(size) __vmalloc(size, GFP_KERNEL, 0) -#define __kmalloc(...) kmalloc(__VA_ARGS__) /* * Prefix some functions with linux_ to avoid namespace conflict @@ -107,7 +107,7 @@ linux_check_m_flags(gfp_t flags) } static inline void * -kmalloc(size_t size, gfp_t flags) +__kmalloc(size_t size, gfp_t flags) { return (malloc(MAX(size, sizeof(struct llist_node)), M_KMALLOC, linux_check_m_flags(flags))); @@ -218,6 +218,7 @@ ksize(const void *ptr) return (malloc_usable_size(ptr)); } +extern void *lkpi_kmalloc(size_t size, gfp_t flags); extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name, size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor); extern void *lkpi_kmem_cache_alloc(struct linux_kmem_cache *, gfp_t); diff --git a/sys/compat/linuxkpi/common/src/linux_fpu.c b/sys/compat/linuxkpi/common/src/linux_fpu.c index b26dce98774b..4e40a2b004bb 100644 --- a/sys/compat/linuxkpi/common/src/linux_fpu.c +++ b/sys/compat/linuxkpi/common/src/linux_fpu.c @@ -30,11 +30,13 @@ #include #include +#include #include #include -#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) +#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ + defined(__i386__) || defined(__powerpc64__) #include @@ -58,6 +60,24 @@ lkpi_kernel_fpu_end(void) fpu_kern_leave(curthread, NULL); } +void +lkpi_fpu_safe_exec(fpu_safe_exec_cb_t func, void *ctx) +{ + unsigned int save_fpu_level; + + save_fpu_level = + __current_unallocated(curthread) ? 0 : current->fpu_ctx_level; + if (__predict_false(save_fpu_level != 0)) { + current->fpu_ctx_level = 1; + kernel_fpu_end(); + } + func(ctx); + if (__predict_false(save_fpu_level != 0)) { + kernel_fpu_begin(); + current->fpu_ctx_level = save_fpu_level; + } +} + #else void @@ -70,4 +90,10 @@ lkpi_kernel_fpu_end(void) { } +void +lkpi_fpu_safe_exec(fpu_safe_exec_cb_t func, void *ctx) +{ + func(ctx); +} + #endif diff --git a/sys/compat/linuxkpi/common/src/linux_slab.c b/sys/compat/linuxkpi/common/src/linux_slab.c index 72097c55f94c..68117d1c9fa7 100644 --- a/sys/compat/linuxkpi/common/src/linux_slab.c +++ b/sys/compat/linuxkpi/common/src/linux_slab.c @@ -25,6 +25,7 @@ */ #include +#include #include #include #include @@ -206,6 +207,29 @@ linux_kmem_cache_destroy(struct linux_kmem_cache *c) free(c, M_KMALLOC); } +struct lkpi_kmalloc_ctx { + size_t size; + gfp_t flags; + void *addr; +}; + +static void +lkpi_kmalloc_cb(void *ctx) +{ + struct lkpi_kmalloc_ctx *lmc = ctx; + + lmc->addr = __kmalloc(lmc->size, lmc->flags); +} + +void * +lkpi_kmalloc(size_t size, gfp_t flags) +{ + struct lkpi_kmalloc_ctx lmc = { .size = size, .flags = flags }; + + lkpi_fpu_safe_exec(&lkpi_kmalloc_cb, &lmc); + return(lmc.addr); +} + static void linux_kfree_async_fn(void *context, int pending) { From nobody Sat Feb 10 22:08:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXPxX5NWhz5BSBQ; Sat, 10 Feb 2024 22:08:32 +0000 (UTC) (envelope-from wulf@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 4TXPxX4ydMz4hBJ; Sat, 10 Feb 2024 22:08:32 +0000 (UTC) (envelope-from wulf@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602912; h=from:from:reply-to:subject: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=jGN9b7k4KJp7XDhN8RKSpjl0sl9A6b9YEWEvnka3LDs=; b=vfqfMW5FgmO7CnOeyqf5/VH9ahFoZirpkFjYR3VgpKWPiqK5C0YmfvAZtcrkgiEIoTqjQQ pjJhmdLCIqoHR+XP0tbEVegqvDGQzdvDdpa12guioKiEMPzZM2r8DqnY27hGaz1Sm5zvC7 TjYjDmJ+e/qBbe1NWmj8uc8g+OOcTtQhAnjbLpzpBb0Qz7OUl4uGsQ+MDhwhAtMT8h6TlD Z8InoFACMiDND3eyZU70adHeKUmKS6eQNv9NWd7dYKmPxRqaept0/dhpLEcc3fnTfijVW5 kYtvBKiAwJ77HncsccMku5aWp8upvmzcu/+OMp+yH8HQQB6hh1763GdgmCnwFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707602912; a=rsa-sha256; cv=none; b=fLKJQSpo+Aoe3tx5BcRW2uoJRQ2FQNAR2bQZr8jnsAYNnst1Rty50yS45J3w2v2OuaMwKN sbHnmn3YOy3XL5zZI3y2Of4CR6+d5xLVse8S/x2LmDUO9ZWBR0lfl0FFh1mmbgMMhUpxuT kE5HzDIaMuyms/xfKgK5IK4XuA2c5Dea7LohT3tadD/l8hmFwwZvwno6rHaoQgIzvpP3ut JLk+HVsh+irg7o6JRopF+ZjPjFYLYeY9dTQU6OG/3INhvNyTdmZbEgQe2l9NLwuB20EAiG 1WVohR7uOTT73baWk0BKC7gZcq1o5IMOiUyPMhuXpuEOV+5Tz1eFtsU88Qou/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602912; h=from:from:reply-to:subject: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=jGN9b7k4KJp7XDhN8RKSpjl0sl9A6b9YEWEvnka3LDs=; b=m9aG+8PqNmN/4LA/Z7DVId05oA71HNnJzLo7Kahqjk8Hg9My8uyBc3mJM2tY6A7SOdjxef FjYQsZrRMap1SkA5Ba7pzsXBLrYyWCcRfAXDB+5aYnVJAmOvqQMX/QMpP9tRBjqQWcD6Ok UW1IsHbtzO5UBwZLsW/zXOtf2nOvZsEdCg02wjMgLEwI6tM4fG+d3TlTLOOU5eUMXBsamn dCzI721H6FcQEswxK+o0p45xcBHoe0bpMRmcOoVjZ7fBQAoQ/WE0fRsHIFVQz1mC3W0qxr EfzciA+Xc2H7OmIP/WzK3ns1Sn7gizXme60Onvp6ZovXiOGJdqaUJDlW2o5BTQ== Received: from [192.168.0.30] (unknown [176.120.243.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 did not present a certificate) (Authenticated sender: wulf) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TXPxX0QH9zZXP; Sat, 10 Feb 2024 22:08:31 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Message-ID: <29f6dd5d-a3ea-446d-94f2-0bdf36ffee9e@FreeBSD.org> Date: Sun, 11 Feb 2024 01:08:07 +0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: db65db64fbf3 - main - Revert "LinuxKPI: Add explicit software context to FPU sections" From: Vladimir Kondratyev To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202402102203.41AM3Mo3005962@gitrepo.freebsd.org> Content-Language: en-US In-Reply-To: <202402102203.41AM3Mo3005962@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11.02.2024 01:03, Vladimir Kondratyev wrote: > kmalloc() support within FPU sections will be redone in other way. 'in other way' means 'not using explicit software context for FPU sections' -- WBR Vladimir Kondratyev From nobody Sun Feb 11 01:54:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXVyN47dMz596fX; Sun, 11 Feb 2024 01:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TXVyN28BPz49j2; Sun, 11 Feb 2024 01:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O+RbGJOY3vaZm50fnPrOOZfaQnsw+GJbiLJe1GRXFV0=; b=hbKV6gzJ7dLO5MHKVvl6RwmucieWeeW0OxLCpMwmNkJZu7T4lRT5pqOQNckLpdJb/x1r/w 7/LxI4UOqFFGTkwBRni5nX+e4XX8Je5/avCu4FWzXt1S9NyJoFB7uy0XNRSM4hS4wvSkZv LsAehgzGcO0zfRhbNv8aOKTL0TB6RL0lwZtsHOSZ6MqzYYfKjUd71tP7cJ99HNRAFS0ofP Yrdz9p8MDTxVS2fQT5M99VjWIPISkOKahY2MrLwtMYwD/uaRWmmQcYKJelaYb4Rto8FCEb fA76dD0GMbWwzL2FUfxJHwmf5ZQSTQUUxCBQeJAUjJ+Y3g28SmsRlxJNUrBF9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707616476; a=rsa-sha256; cv=none; b=UOOIkJAwhAY9MnL70VVrOUmkcy6EFYiELrM6lYfEHl05pF4ranPQxwz5RJ3LME4Fw8CDrb eIxxUww3CsHsLk+1cw6CBUSdTp7SO+ZizL2JsoNVr0zPb4vkAT9wDrhvAqoEC/x5BfQ3d3 7vVdpRfyM2QcZ/2LS0rrccet/Ui07u79NMwsuO8BiRvTpQbiDQ9kTzxYAYugHdkKi6CPBW ZHb8w5MXQ84pEf5WsGLxb37iza8hwxi2Was5dYLENRIK1hAcCsPh+EGTt2BorDW2FEdwph z+3byvD+cXWyTToHUoPW3Af+HdY2gfcZfzeR9VLWm7dZqDHRz/4v50thk9+vmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O+RbGJOY3vaZm50fnPrOOZfaQnsw+GJbiLJe1GRXFV0=; b=ILXbkGbCWz8ONaOb9mQZKPnr/r1CuIRZjHw2cFKwuXO6xkQHYJSBUE0ciEzOUSo5KZ71fT hvYt0acGf9DanVfs5XpWZ640Kq++sdflADrLBrV/kBURWHZGa/QhW8zJQEkZxGGqrkbZzH S0B2AhwIllLs7whLyCxPOgmwdh8/9AjIZBPH4Le8H4FoO0oZZEFN37bmDbbmZ8GCOzu2uX EXWMeaRgVr/Zo6ptNX179QhU4RGC2Ua2vPKgmJkpCXa1LJP2k46BPsbImg2oBhRXQOMHbR nnym7Bu7GMT5pehG+1dkP5VZ3Rl1TEe+HcLgYbBpOTPtql8Lhepi7u9Kt5giDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXVyN1BTlzgVQ; Sun, 11 Feb 2024 01:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41B1saMD090150; Sun, 11 Feb 2024 01:54:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B1sagF090147; Sun, 11 Feb 2024 01:54:36 GMT (envelope-from git) Date: Sun, 11 Feb 2024 01:54:36 GMT Message-Id: <202402110154.41B1sagF090147@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: e4b7bbd6ab77 - main - lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4b7bbd6ab77e908a60362aa29e518f224a117b0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e4b7bbd6ab77e908a60362aa29e518f224a117b0 commit e4b7bbd6ab77e908a60362aa29e518f224a117b0 Author: Konstantin Belousov AuthorDate: 2024-01-13 19:46:18 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 01:53:50 +0000 lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset and use the current file offset instead. Requested by: Vinícius dos Santos Oliveira Reviewed by: jhb Discussed with: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43448 --- lib/libsys/lio_listio.2 | 15 ++++++++++++++- sys/kern/vfs_aio.c | 17 ++++++++++++----- sys/sys/aio.h | 4 ++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/lib/libsys/lio_listio.2 b/lib/libsys/lio_listio.2 index 34d2490cca01..bda65c38b1ac 100644 --- a/lib/libsys/lio_listio.2 +++ b/lib/libsys/lio_listio.2 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 22, 2021 +.Dd January 13, 2024 .Dt LIO_LISTIO 2 .Os .Sh NAME @@ -78,6 +78,19 @@ Write data as if by a call to .El .Pp If the +.Dv LIO_READ , +.Dv LIO_READV , +.Dv LIO_WRITE , +.Dv LIO_WRITEV +opcodes are or-ed with the +.Dv LIO_FOFFSET +flag, the corresponding read or write operation uses the current file +descriptor offset instead of +.Va aio_offset +from +.Vt aiocb . +.Pp +If the .Fa mode argument is .Dv LIO_WAIT , diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 1195d92d54ab..e7302f4b7a9e 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -229,6 +229,9 @@ typedef struct oaiocb { #define KAIOCB_CLEARED 0x10 #define KAIOCB_FINISHED 0x20 +/* ioflags */ +#define KAIOCB_IO_FOFFSET 0x01 + /* * AIO process info */ @@ -789,12 +792,14 @@ aio_process_rw(struct kaiocb *job) if (job->uiop->uio_resid == 0) error = 0; else - error = fo_read(fp, job->uiop, fp->f_cred, FOF_OFFSET, - td); + error = fo_read(fp, job->uiop, fp->f_cred, + (job->ioflags & KAIOCB_IO_FOFFSET) != 0 ? 0 : + FOF_OFFSET, td); } else { if (fp->f_type == DTYPE_VNODE) bwillwrite(); - error = fo_write(fp, job->uiop, fp->f_cred, FOF_OFFSET, td); + error = fo_write(fp, job->uiop, fp->f_cred, (job->ioflags & + KAIOCB_IO_FOFFSET) != 0 ? 0 : FOF_OFFSET, td); } msgrcv_end = td->td_ru.ru_msgrcv; msgsnd_end = td->td_ru.ru_msgsnd; @@ -1549,13 +1554,15 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lj, /* Get the opcode. */ if (type == LIO_NOP) { - switch (job->uaiocb.aio_lio_opcode) { + switch (job->uaiocb.aio_lio_opcode & ~LIO_FOFFSET) { case LIO_WRITE: case LIO_WRITEV: case LIO_NOP: case LIO_READ: case LIO_READV: - opcode = job->uaiocb.aio_lio_opcode; + opcode = job->uaiocb.aio_lio_opcode & ~LIO_FOFFSET; + if ((job->uaiocb.aio_lio_opcode & LIO_FOFFSET) != 0) + job->ioflags |= KAIOCB_IO_FOFFSET; break; default: error = EINVAL; diff --git a/sys/sys/aio.h b/sys/sys/aio.h index a1aa96efed09..f987f1e1dbd4 100644 --- a/sys/sys/aio.h +++ b/sys/sys/aio.h @@ -51,6 +51,9 @@ #define LIO_DSYNC (0x10 | LIO_SYNC) #define LIO_MLOCK 0x20 #endif +#if __BSD_VISIBLE +#define LIO_FOFFSET 0x40 +#endif /* * LIO modes @@ -129,6 +132,7 @@ struct kaiocb { TAILQ_ENTRY(kaiocb) plist; /* (a) lists of pending / done jobs */ TAILQ_ENTRY(kaiocb) allist; /* (a) list of all jobs in proc */ int jobflags; /* (a) job flags */ + int ioflags; /* (*) io flags */ int inblock; /* (*) input blocks */ int outblock; /* (*) output blocks */ int msgsnd; /* (*) messages sent */ From nobody Sun Feb 11 01:54:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXVyP5HFxz596cl; Sun, 11 Feb 2024 01:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TXVyP32mJz49qm; Sun, 11 Feb 2024 01:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jD9BU3PosuoOwSwyyuZp3Haewe91719KDu5cMSGGvAY=; b=C5gzRBzNlw/URoBLv/2bbhin4EGTuBtyUjVpA6//PoJKXP3G4inEEopqPaBq7OdcNZO8v2 JMFP7NOwdKwZoXhdMrTCwwdNm4P9zdMQal8vjNnXFVfaTW7wtbUI3xO+EkJtyWUB0mQLtA qEJtzTIAfG4getCN951jBN/ztqjTlTEPXxqU7phmFBNRfMjkR35Z62Q/loaYFF4Wgk8pfM te9WcjRGo3H83VtGAqAfuuQQDmPa2pLE5Ug4oz8laxOs8MvsHKQ97J49jHip5x16BQkCpR KNn8Cxwjt03KthB1bTb1CDouIBBgfdZdhd4P71gwhDGF9kWP2xwJa69GwpC77Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707616477; a=rsa-sha256; cv=none; b=NYafue7q66NSuMg/49UbmL+x1HlpXzchPlRcvtNFqzC1CSggo5xNo+lNKIT6aB9eFgZt3/ qdF9IVzrxFzAOLXiSUljGYtDIp0guw1eEi2E1CIXZ9cO0/ptpOPhAz6XS9hmbTCK7lwVDN BtBrxtFqLLw5hEDuX79t4lyjbmqTeeUl5MchsUWsPoFAT6LPDnA92cGmrYGwbuk+pnZ5Tu EhFAjRdNnOLs9lAFI82FkJmLwQqyCVXLNVfaEeMHBH9XHFP3vIHn6e8e3Wa6OIx/ou9DVB PoK2pVjHBlA7C5Rthn+fuyfB7TxTGECX7MO2/BUSR3T9EQfpAsNuxBeVclQsqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jD9BU3PosuoOwSwyyuZp3Haewe91719KDu5cMSGGvAY=; b=wQDVGJgp+c/op0ArWacyqnTZu1NasopdXBWbnqQbbhC3DKJUroVgJDdRZRAV2UXzx1m8FS qjvwo5jTVSH7jSI9/NbqJvAABB95U2FVs6dot0hc9X4QEpH+UrSQcGttPGaYZo8MgGPShk +X8qHnL2o6cNsKQm23SvGX9KmSpfdaHkfPn5IuvsHFP3TQQvA9BCfW5T8aFsw+5l8Kc2NX bX2ZexPl+tf8FUpyl6wnfMapuG/KJ0c20umz5xgchRNTHCZh5GoEunP8pgjBsWnYz3rVLv qAJV7LS7eZEKv1SMfmBrOnQk3lvv8afgGuQcHNMf95Ri8N3YcuboUJz2JjvQwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXVyP26HWzgy0; Sun, 11 Feb 2024 01: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 41B1sb4w090195; Sun, 11 Feb 2024 01: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 41B1sbql090192; Sun, 11 Feb 2024 01:54:37 GMT (envelope-from git) Date: Sun, 11 Feb 2024 01:54:37 GMT Message-Id: <202402110154.41B1sbql090192@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: 06cb1c3f9528 - main - libc: add aio_read2() and aio_write2() functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06cb1c3f9528f088bdaf10d28dcfe7eeaad726d3 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=06cb1c3f9528f088bdaf10d28dcfe7eeaad726d3 commit 06cb1c3f9528f088bdaf10d28dcfe7eeaad726d3 Author: Konstantin Belousov AuthorDate: 2024-02-01 02:39:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 01:54:00 +0000 libc: add aio_read2() and aio_write2() functions as wrappers around lio_listio(LIO_READ/WRITE | LIO_FOFFSET, &iocb, 1); Suggested and reviewed by: jhb Discussed with: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D43448 --- lib/libc/gen/Makefile.inc | 2 ++ lib/libc/gen/Symbol.map | 2 ++ lib/libc/gen/aio_read2.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ lib/libc/gen/aio_write2.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/aio.h | 7 ++++++ 5 files changed, 123 insertions(+) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index bbd090e46b27..8d30e06cfed9 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -13,6 +13,8 @@ SRCS+= \ _rand48.c \ _spinlock_stub.c \ _thread_init.c \ + aio_read2.c \ + aio_write2.c \ alarm.c \ arc4random.c \ arc4random-compat.c \ diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 7d1fe00284fd..0821563e0c9f 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -455,6 +455,8 @@ FBSD_1.7 { }; FBSD_1.8 { + aio_read2; + aio_write2; execvpe; }; diff --git a/lib/libc/gen/aio_read2.c b/lib/libc/gen/aio_read2.c new file mode 100644 index 000000000000..3a783e1b1b15 --- /dev/null +++ b/lib/libc/gen/aio_read2.c @@ -0,0 +1,56 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software were developed by Konstantin Belousov + * 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 + +int +aio_read2(struct aiocb *iocb, int flags) +{ + int error; + + if ((flags & ~(AIO_OP2_FOFFSET)) != 0) { + errno = EINVAL; + return (-1); + } + iocb->aio_lio_opcode = LIO_READ; + if ((flags & AIO_OP2_FOFFSET) != 0) + iocb->aio_lio_opcode |= LIO_FOFFSET; + + error = lio_listio(LIO_NOWAIT, &iocb, 1, NULL); + if (error == -1 && errno == EIO) { + error = aio_error(iocb); + if (error != -1 && error != 0) + errno = error; + error = -1; + } + return (error); +} diff --git a/lib/libc/gen/aio_write2.c b/lib/libc/gen/aio_write2.c new file mode 100644 index 000000000000..8b5d4a38a6c5 --- /dev/null +++ b/lib/libc/gen/aio_write2.c @@ -0,0 +1,56 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software were developed by Konstantin Belousov + * 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 + +int +aio_write2(struct aiocb *iocb, int flags) +{ + int error; + + if ((flags & ~(AIO_OP2_FOFFSET)) != 0) { + errno = EINVAL; + return (-1); + } + iocb->aio_lio_opcode = LIO_WRITE; + if ((flags & AIO_OP2_FOFFSET) != 0) + iocb->aio_lio_opcode |= LIO_FOFFSET; + + error = lio_listio(LIO_NOWAIT, &iocb, 1, NULL); + if (error == -1 && errno == EIO) { + error = aio_error(iocb); + if (error != -1 && error != 0) + errno = error; + error = -1; + } + return (error); +} diff --git a/sys/sys/aio.h b/sys/sys/aio.h index f987f1e1dbd4..6680f9fed3fa 100644 --- a/sys/sys/aio.h +++ b/sys/sys/aio.h @@ -55,6 +55,11 @@ #define LIO_FOFFSET 0x40 #endif +/* aio_read2/aio_write2 flags */ +#if __BSD_VISIBLE +#define AIO_OP2_FOFFSET 0x00000001 +#endif + /* * LIO modes */ @@ -275,6 +280,8 @@ int aio_mlock(struct aiocb *); #if __BSD_VISIBLE ssize_t aio_waitcomplete(struct aiocb **, struct timespec *); +int aio_read2(struct aiocb *, int); +int aio_write2(struct aiocb *, int); #endif int aio_fsync(int op, struct aiocb *aiocbp); From nobody Sun Feb 11 01:54:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXVyQ6MZXz596gV; Sun, 11 Feb 2024 01: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 4TXVyQ47lPz4B1k; Sun, 11 Feb 2024 01: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=1707616478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yz1DzPh7DlxAg4wGPRVE/s8oAvoi0SbkXSQryzmJbBg=; b=dSKZWMrQovPS11fXJxNt4yk5HVyIChrh1xnkZXgVOvoqqjgQ/JeeuMTnPgfBn20YkXbFMN /g5TUP+Z9gnW9R0Rq2t354PoOpb83EFn0Ey5JmNWCNk1dju6WSHob24C9lSCXwBqCNsKvj ESOYnCsBeVRHHwl09qxVkG+cObrwAnXkIW3ElHaT4UNAE76WqhjUoeVozsftg2oUpJoIsE oj4HJENWsSgp/NeoeX1+lNpScQ+Wl4CcQnvuLi8y3TYP6uVk1X+RymrHAefJXckb0osK38 03g4Fmi9W/3jHImRkLYQIweJWZJo9rVVoEsAC/Xjvl3P21AZSswwqLqI1Um84Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707616478; a=rsa-sha256; cv=none; b=j9mo9fB4Q8KgdVhApq0GVqA3UsI6lHOTdTogg+niWZnzpSAleLOQoqzeesik6KnSymu3fm H5eudQnKMI0xk3NhoL864KdOLZgPirLl6sx/6J+VgVFTCoDmvdvbS3DhlDtFVcrlNf60RP QciNTmJfKjtzRo57GQhWaTA1ADgVM6gzgyANp0zsBnoiV3LyLK3tRBTMuI0A+7zxIZyQUi wHT34rppvNLv0nCKD+tkrNBnyTnMsPLPO/2N0h+TKmbOEtXby+6keFCuN0Sd81Z23/w8w8 QYj/c4SNO5JfbQ/o0Sg5hB5tN2HwiybtJtTkUqWjnpOeqCQuiUw1hsVH27vwPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yz1DzPh7DlxAg4wGPRVE/s8oAvoi0SbkXSQryzmJbBg=; b=Nh/tp5lKdjSexeUOXWZsT51QxcSnMzc1z7fHcBHDa7vn2d40WabcrHV0Z3X8i37PBEYgax 0veqNfQJEj7n5MNw5JQDBTN0rmC80wABzWMPupgoXbt33E4b9i0N93zLKvRgj3eCKNRDaO gm94xCiiPWKFf2bFEdTGZZHLzqEA2Eaf0BaYNN14Le9HdvzcNvuRu+t6IXdTiG7ywnww6q M9qBechv2+BTodXREGYnrTV6I2yGmqT4Mh5tb5V1lJxcsGDkb/WyvQREYEWJD4vgdN+rdE 0J7nM7WYZmRtYGljkyHMN45hA0yZt6uBvB4+MldZJK3XVi2UiO2G37PdMs1KvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXVyQ32gfzgjw; Sun, 11 Feb 2024 01:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41B1scAk090231; Sun, 11 Feb 2024 01:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B1scZ9090228; Sun, 11 Feb 2024 01:54:38 GMT (envelope-from git) Date: Sun, 11 Feb 2024 01:54:38 GMT Message-Id: <202402110154.41B1scZ9090228@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: 8dfc788b8480 - main - aio_read2/aio_write2: add AIO_OP2_VECTORED List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8dfc788b8480a13f1f945f0a94d8b1e327af5c6f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8dfc788b8480a13f1f945f0a94d8b1e327af5c6f commit 8dfc788b8480a13f1f945f0a94d8b1e327af5c6f Author: Konstantin Belousov AuthorDate: 2024-02-03 18:09:36 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 01:54:11 +0000 aio_read2/aio_write2: add AIO_OP2_VECTORED Suggested by: Vinícius dos Santos Oliveira Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43448 --- lib/libc/gen/aio_read2.c | 4 +++- lib/libc/gen/aio_write2.c | 4 +++- sys/sys/aio.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/aio_read2.c b/lib/libc/gen/aio_read2.c index 3a783e1b1b15..a5186d509b26 100644 --- a/lib/libc/gen/aio_read2.c +++ b/lib/libc/gen/aio_read2.c @@ -37,13 +37,15 @@ aio_read2(struct aiocb *iocb, int flags) { int error; - if ((flags & ~(AIO_OP2_FOFFSET)) != 0) { + if ((flags & ~(AIO_OP2_FOFFSET | AIO_OP2_VECTORED)) != 0) { errno = EINVAL; return (-1); } iocb->aio_lio_opcode = LIO_READ; if ((flags & AIO_OP2_FOFFSET) != 0) iocb->aio_lio_opcode |= LIO_FOFFSET; + if ((flags & AIO_OP2_VECTORED) != 0) + iocb->aio_lio_opcode |= LIO_VECTORED; error = lio_listio(LIO_NOWAIT, &iocb, 1, NULL); if (error == -1 && errno == EIO) { diff --git a/lib/libc/gen/aio_write2.c b/lib/libc/gen/aio_write2.c index 8b5d4a38a6c5..8f4f6a35fd4d 100644 --- a/lib/libc/gen/aio_write2.c +++ b/lib/libc/gen/aio_write2.c @@ -37,13 +37,15 @@ aio_write2(struct aiocb *iocb, int flags) { int error; - if ((flags & ~(AIO_OP2_FOFFSET)) != 0) { + if ((flags & ~(AIO_OP2_FOFFSET | AIO_OP2_VECTORED)) != 0) { errno = EINVAL; return (-1); } iocb->aio_lio_opcode = LIO_WRITE; if ((flags & AIO_OP2_FOFFSET) != 0) iocb->aio_lio_opcode |= LIO_FOFFSET; + if ((flags & AIO_OP2_VECTORED) != 0) + iocb->aio_lio_opcode |= LIO_VECTORED; error = lio_listio(LIO_NOWAIT, &iocb, 1, NULL); if (error == -1 && errno == EIO) { diff --git a/sys/sys/aio.h b/sys/sys/aio.h index 6680f9fed3fa..919a6180b130 100644 --- a/sys/sys/aio.h +++ b/sys/sys/aio.h @@ -58,6 +58,7 @@ /* aio_read2/aio_write2 flags */ #if __BSD_VISIBLE #define AIO_OP2_FOFFSET 0x00000001 +#define AIO_OP2_VECTORED 0x00000002 #endif /* From nobody Sun Feb 11 01:54:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXVyS5TKGz5966w; Sun, 11 Feb 2024 01:54: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 4TXVyR54xTz4B3s; Sun, 11 Feb 2024 01:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhiAc4Sk51DTmTvnNpMToi8v+Z2goWMzG6gYmhJXcbc=; b=i21GYUcIjp3S4ojCHJYa+SW6yQxOYhqNY8fgB6AVHpoc50G8fwkbkkHddpI/7dQnYEzvK6 To9B7qMjLuhkKh8Da1f1HtDqmV2xVn8+Gc7fIfQBIx04ThsCFPjLktg2AUGpMIuD0IHb6T kSa0Glw1kvXdbGsGBH9sTkclegpDnvqoqVdwjUe2va4Q8tw78Fu8z7s0qLfk8C/CDtpo8K rAGb99JTAodgqRYDWH/x6SJSw+JRkKMtKor8+UdyOOTfPpZnUuilgjUFPP7GnF8gLdN8tC u+3VM4nrdFUguDS8JlDDzFgWF+aMOHBEVJgi4D3Juq7cFPIAdjoqib8xUfTY+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707616479; a=rsa-sha256; cv=none; b=YMLldG2Yc9ShFyFkKJvM/09JDBUnAgTR5kXJPsDjqG5wlbnCf8Xm1VWMNwSo/rTU/v6Gq1 GeSBuqppehEqlMkUXMleOwZxtApUZ9VneMKurL/zZn7L3vFBSraEBhcnFWJTyxvfHiT9nO m/mmQOLYG1V6nGOUDUixkZ7lNswzrF6nZvmZg03w8DME4cvF8Tp9CL4drJRR+kQB8A2Uqj 5YbLovZbaJ0/VWlVgAWtf65FnB19UeGsSVSdo3KEtf/Z0WYHY+5mjM/FJLX0BIOjkHAYlO QI3ySMDzdLNmCHBrEY/DHlhh8o/0fCmpeyZTpxQ9sVmT6+8xYQGMZ6zFF7XJ5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhiAc4Sk51DTmTvnNpMToi8v+Z2goWMzG6gYmhJXcbc=; b=KpH0leMXVCYZWBuW0/ncdXYd6YAQ8f7yieO3tD2m9FvBVdiGo3Wj1NcCNxuiy8/QNVT9gC IjRbjLnAAPLY8+/4h5zwAVZrO4Q1cAJBq4/vISFeKlYYaKKWwiOenwqAdzk+CGMigsCWM2 18cVKdOtPlwacEy4tIsK/11M2OF3iFn2ngvotHe9amMAzJQrH6swMZdgxjQPhItaSV+Y5b 9RYdjxNu0Ll3unpXvDVyC0BbROxQEZe2YbZG92Azifaze1fQjsTnGPZArEC+xwCiyFzu6s Yzd5rScOxHeoa59dstO/1Y/+iVsalMKjUO23jU9RbFW/mSEE5YIi6nYK51J0EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXVyR3pYSzgNw; Sun, 11 Feb 2024 01:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41B1sdYf090264; Sun, 11 Feb 2024 01:54:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B1sdiY090261; Sun, 11 Feb 2024 01:54:39 GMT (envelope-from git) Date: Sun, 11 Feb 2024 01:54:39 GMT Message-Id: <202402110154.41B1sdiY090261@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: a52cb4c480f2 - main - Document aio_read2/aio_write2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a52cb4c480f270fc7158a0f58179f7b80d8a5b3c Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a52cb4c480f270fc7158a0f58179f7b80d8a5b3c commit a52cb4c480f270fc7158a0f58179f7b80d8a5b3c Author: Konstantin Belousov AuthorDate: 2024-02-03 18:12:59 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 01:54:16 +0000 Document aio_read2/aio_write2 Reviewed by: jhb Discussed with: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43448 --- lib/libsys/Makefile.sys | 6 ++-- lib/libsys/aio_read.2 | 79 +++++++++++++++++++++++++++++++++++++------------ lib/libsys/aio_write.2 | 78 ++++++++++++++++++++++++++++++++++++------------ 3 files changed, 123 insertions(+), 40 deletions(-) diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index f88a107f9eb8..b45aa3cf1aaf 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -383,8 +383,10 @@ MAN+= \ sleep.3 \ usleep.3 -MLINKS+=aio_read.2 aio_readv.2 -MLINKS+=aio_write.2 aio_writev.2 +MLINKS+=aio_read.2 aio_readv.2 \ + aio_read.2 aio_read2.2 +MLINKS+=aio_write.2 aio_writev.2 \ + aio_write.2 aio_write2.2 MLINKS+=accept.2 accept4.2 MLINKS+=access.2 eaccess.2 \ access.2 faccessat.2 diff --git a/lib/libsys/aio_read.2 b/lib/libsys/aio_read.2 index 092315e70c91..3a9601754c06 100644 --- a/lib/libsys/aio_read.2 +++ b/lib/libsys/aio_read.2 @@ -22,11 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 15, 2023 +.Dd February 1, 2024 .Dt AIO_READ 2 .Os .Sh NAME .Nm aio_read , +.Nm aio_read2 , .Nm aio_readv .Nd asynchronous read from a file (REALTIME) .Sh LIBRARY @@ -35,21 +36,34 @@ .In aio.h .Ft int .Fn aio_read "struct aiocb *iocb" +.Ft int +.Fn aio_read2 "struct aiocb *iocb" "int flags" .In sys/uio.h .Ft int .Fn aio_readv "struct aiocb *iocb" .Sh DESCRIPTION The -.Fn aio_read +.Fn aio_read , +.Fn aio_read2 and .Fn aio_readv system calls allow the calling process to read from the descriptor -.Fa iocb->aio_fildes -beginning at the offset +.Fa iocb->aio_fildes . +The syscalls return immediately after the read request has +been enqueued to the descriptor; the read may or may not have +completed at the time the call returns. +.Pp +For the +.Fn aio_read +and +.Fn aio_readv +calls, the read begins at the offset .Fa iocb->aio_offset . +.Pp +The .Fn aio_read -will read +call will read .Fa iocb->aio_nbytes into the buffer pointed to by .Fa iocb->aio_buf , @@ -60,10 +74,6 @@ reads the data into the buffers specified by the members of the .Fa iocb->aio_iov array. -Both syscalls return immediately after the read request has -been enqueued to the descriptor; the read may or may not have -completed at the time the call returns. -.Pp For .Fn aio_readv the @@ -72,6 +82,33 @@ structure is defined in .Xr readv 2 . .Pp The +.Fn aio_read2 +call takes the +.Fa flags +argument. +If +.Fa flags +is passed as zero, the call behaves identically to +.Fn aio_read . +The following flags can be specified by logical or: +.Bl -tag -width AIO_OP2_VECTORED +.It AIO_OP2_FOFFSET +The read occurs at the file descriptor offset, +which is advanced by the operation as done by the +.Xr read 2 +syscall. +The +.Fa iocb->aio_offset +field is ignored. +.It AIO_OP2_VECTORED +Similar to +.Fn aio_readv , +the read buffers are specified by the +.Fa aiocb->aio_iov +array. +.El +.Pp +The .Fa iocb pointer may be subsequently used as an argument to .Fn aio_return @@ -103,9 +140,8 @@ operation has completed. .Pp The asynchronous I/O control buffer .Fa iocb -should be zeroed before the -.Fn aio_read -call to avoid passing bogus context information to the kernel. +should be zeroed before the system +calls to avoid passing bogus context information to the kernel. .Pp Modifications of the Asynchronous I/O Control Block structure or the buffer contents are not allowed while the request is queued. @@ -116,12 +152,13 @@ is past the offset maximum for .Fa iocb->aio_fildes , no I/O will occur. .Sh RETURN VALUES -.Rv -std aio_read aio_readv +.Rv -std aio_read aio_read2 aio_readv .Sh DIAGNOSTICS None. .Sh ERRORS The -.Fn aio_read +.Fn aio_read , +.Fn aio_read2 , and .Fn aio_readv system calls will fail if: @@ -149,10 +186,7 @@ or system call is made, or asynchronously, at any time thereafter. If they are detected at call time, -.Fn aio_read -or -.Fn aio_readv -returns -1 and sets +The calls return -1 and set .Va errno appropriately; otherwise the .Fn aio_return @@ -226,8 +260,11 @@ system call is expected to conform to the .St -p1003.1 standard. The +.Fn aio_read2 +and .Fn aio_readv -system call is a FreeBSD extension, and should not be used in portable code. +system calls are FreeBSD extensions, +and should not be used in portable code. .Sh HISTORY The .Fn aio_read @@ -237,6 +274,10 @@ The .Fn aio_readv system call first appeared in .Fx 13.0 . +The +.Fn aio_read2 +system call first appeared in +.Fx 14.1 . .Sh AUTHORS This manual page was written by diff --git a/lib/libsys/aio_write.2 b/lib/libsys/aio_write.2 index 32ad53019ed2..f59406b8ab36 100644 --- a/lib/libsys/aio_write.2 +++ b/lib/libsys/aio_write.2 @@ -22,11 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 15, 2023 +.Dd February 1, 2024 .Dt AIO_WRITE 2 .Os .Sh NAME .Nm aio_write , +.Nm aio_write2 , .Nm aio_writev .Nd asynchronous write to a file (REALTIME) .Sh LIBRARY @@ -35,19 +36,27 @@ .In aio.h .Ft int .Fn aio_write "struct aiocb *iocb" +.Ft int +.Fn aio_write2 "struct aiocb *iocb" "int flags" .In sys/uio.h .Ft int .Fn aio_writev "struct aiocb *iocb" .Sh DESCRIPTION The -.Fn aio_write +.Fn aio_write , +.Fn aio_write2 , and .Fn aio_writev system calls allow the calling process to write to the descriptor .Fa iocb->aio_fildes . +The syscalls return immediately after the write request has been enqueued +to the descriptor; the write may or may not have completed at the time +the call returns. +.Pp +The .Fn aio_write -will write +call will write .Fa iocb->aio_nbytes from the buffer pointed to by .Fa iocb->aio_buf , @@ -58,9 +67,7 @@ gathers the data from the buffers specified by the members of the .Fa iocb->aio_iov array. -Both syscalls return immediately after the write request has been enqueued -to the descriptor; the write may or may not have completed at the time -the call returns. +.Pp If the request could not be enqueued, generally due to invalid arguments, the call returns without having enqueued the request. @@ -80,11 +87,42 @@ write operations append to the file in the same order as the calls were made. If .Dv O_APPEND -is not set for the file descriptor, the write operation will occur at +is not set for the file descriptor, the write operation for +.Fn aio_write +will occur at the absolute position from the beginning of the file plus .Fa iocb->aio_offset . .Pp The +.Fn aio_write2 +call takes the +.Fa flags +argument. +If +.Fa flags +is passed as zero, the call behaves identically to +.Fn aio_write . +The following flags can be specified by logical or: +.Bl -tag -width AIO_OP2_VECTORED +.It AIO_OP2_FOFFSET +The write for non +.Dv O_APPEND +file descriptors occurs at the file descriptor offset, +which is advanced by the operation as done by the +.Xr write 2 +syscall. +The +.Fa iocb->aio_offset +field is ignored. +.It AIO_OP2_VECTORED +Similar to +.Fn aio_writev , +the write buffers are specified by the +.Fa aiocb->aio_iov +array. +.El +.Pp +The .Fa iocb pointer may be subsequently used as an argument to .Fn aio_return @@ -114,10 +152,7 @@ operation has completed. The asynchronous I/O control buffer .Fa iocb should be zeroed before the -.Fn aio_write -or -.Fn aio_writev -system call to avoid passing bogus context information to the kernel. +system calls to avoid passing bogus context information to the kernel. .Pp Modifications of the Asynchronous I/O Control Block structure or the buffer contents are not allowed while the request is queued. @@ -131,7 +166,8 @@ no I/O will occur. .Rv -std aio_write aio_writev .Sh ERRORS The -.Fn aio_write +.Fn aio_write , +.Fn aio_write2 , and .Fn aio_writev system calls will fail if: @@ -153,16 +189,13 @@ are unsafe and unsafe asynchronous I/O operations are disabled. .El .Pp The following conditions may be synchronously detected when the -.Fn aio_write +.Fn aio_write , +.Fn aio_write2 , or .Fn aio_writev system call is made, or asynchronously, at any time thereafter. If they -are detected at call time, -.Fn aio_write -or -.Fn aio_writev -returns -1 and sets +are detected at call time, the calls return -1 and set .Va errno appropriately; otherwise the .Fn aio_return @@ -229,8 +262,11 @@ is expected to conform to the standard. .Pp The +.Fn aio_write2 +and .Fn aio_writev -system call is a FreeBSD extension, and should not be used in portable code. +system calls are FreeBSD extensions, +and should not be used in portable code. .Sh HISTORY The .Fn aio_write @@ -240,6 +276,10 @@ The .Fn aio_writev system call first appeared in .Fx 13.0 . +The +.Fn aio_write2 +system call first appeared in +.Fx 14.1 . .Sh AUTHORS This manual page was written by .An Wes Peters Aq Mt wes@softweyr.com . From nobody Sun Feb 11 03:39:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXYHB4LmTz59HTd; Sun, 11 Feb 2024 03:39: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 4TXYHB27SFz4LcN; Sun, 11 Feb 2024 03:39:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LI1IZEkEdfLVQ8sTYxDFWRdWpF8TCqOZJL84ape14Gg=; b=cGcntRXZDKN1swOIqV6QE0Txshl120EARXP5pCN60MOXHnVeEuPH7N7U6NW/Geh6HY4IU1 WtZzKMOZE7mHhfai2C115wBG4d7cjiX1jmw4OzEAntlDdiU7Txt1MhvGhaSxCpZgVSKQwT 8GIW1QAZ3NyRhB4L4lVCqxCP2Ir4kN4ajsRiisQxgtGK9gDxJoJ+YZ5E6FA3VqldPSPLYT 8NDs8uSUAJU/R3zdOhm4HLLGZi4KzLFemvtAZbCZ/CkLp5tH2Cz5PMTd8m5OQo9u6Hac09 Xw9RSVFSxs/Ox9uQKjh2zRSFMbwhog3YgCobNAdE7t89frfbLYmL4IhedCju0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707622758; a=rsa-sha256; cv=none; b=pBqLmeHg2Nu+IgSNNS9F0gYHmjq762I1O7RVgNuCVVC5+7xLbouQWmx3/tqtpeTN10vX3i 7veV+Mi0wuasNPFyGUFpvffqoorME0+rIBVmBAixNcSZC3kSuiaTeeOcHLouKLm2kwnRqF fpOQUhkhVwWy7SaVmFC7783EGyfkKfFz0Fe+/vII2Sbfz9cl2qzKDiomXuFEA1huqqjlG/ MlskPJmN52EjKi/u45HJJfb/XZLQH3Dn5978vGuHDF+F+povSPsmsX9hOnZVPVrgu8mOrn otJJeasuB2u0XbO6o1jfJSeuTusBOqzVdxh9QWvnXQ8cNmCn6HaKA4L1wv4JNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LI1IZEkEdfLVQ8sTYxDFWRdWpF8TCqOZJL84ape14Gg=; b=IscRulWdDus/tDu88Y1DXbAAUF/XIeYJKOHbGsAfu9QXk78eqJUF0JeVLIdJg2RoGyDf0+ g640iFeOcNKaeZRDTE8POmgn3pVRRF99ClnlGM0eG4IvoGvM9Q95WKGDPEFruco1Refd0d gSa1jhjRwKxBGx2TvuRhxj1TTGz6SdxQSsgiYTpgV/szRcMSt6kfwHP3LCerWF86K+CSsj pamYZ97hS4mEdTXS7BC3Ru81ud7MQJ8q0GWoJj0SNnNVaHB0VpwvaXW594cTJR2cqbeiTN Pqmobhc1YO7sMwcpPXvQhsclmIUYPe3S8YyHvQflsL8hgDnWMTmhUPuuRNLFpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXYHB0gVMzkQL; Sun, 11 Feb 2024 03:39: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 41B3dH2O060084; Sun, 11 Feb 2024 03:39:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B3dHa6060081; Sun, 11 Feb 2024 03:39:17 GMT (envelope-from git) Date: Sun, 11 Feb 2024 03:39:17 GMT Message-Id: <202402110339.41B3dHa6060081@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: 130bad217bd8 - main - amd64 uprintf_signal: add space between %rax value and code bytes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 130bad217bd8bbd7531539e4f5eb83d3c284e991 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=130bad217bd8bbd7531539e4f5eb83d3c284e991 commit 130bad217bd8bbd7531539e4f5eb83d3c284e991 Author: Konstantin Belousov AuthorDate: 2024-02-10 05:06:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 03:36:39 +0000 amd64 uprintf_signal: add space between %rax value and code bytes Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/amd64/amd64/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 8616f3d27e9d..67146240ba58 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -624,7 +624,7 @@ trap(struct trapframe *frame) ksi.ksi_addr = (void *)addr; if (uprintf_signal) { uprintf("pid %d comm %s: signal %d err %#lx code %d type %d " - "addr %#lx rsp %#lx rip %#lx rax %#lx" + "addr %#lx rsp %#lx rip %#lx rax %#lx " "<%02x %02x %02x %02x %02x %02x %02x %02x>\n", p->p_pid, p->p_comm, signo, frame->tf_err, ucode, type, addr, frame->tf_rsp, frame->tf_rip, frame->tf_rax, From nobody Sun Feb 11 03:39:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXYHC3QyNz59HTh; Sun, 11 Feb 2024 03:39: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 4TXYHC2Yv8z4LRC; Sun, 11 Feb 2024 03:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FJD5B6dlbXK7SzY7DPXsvRHVhRaSftVYIYYKTCKbJHk=; b=EU2p+jVZWmhPTyIHUAGX9Z/7Jant4PkCTgEf68kgpP9jAuBnSnHVvCABEFl1mxYeRH8K6D FUb6m5QLNMKnZF4DZo7lKSkXhB+cjE/cGch2VcYTwMERxCxcPNxD9Rw5oqyHhfhvdO4r5F iQqZWVIE/NuHsZlPAw6zrr+rodQl9TUs3BOJQXjzr2li0VEfA/Ju81/JCPECWxKqY3ZTyq R5Lg/l8VGyQvX4E1nclwqKRc9H1ZCAuxLvrqCRl7l4xsdVOT4QCBSozhs38Yl3+kjRJAZd 0l6Eybi2vdIvq2Hmyy/9Gx10FF4lAHFes2Q/T/oorR+uBVAcV5Qu6EPMByl6YQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707622759; a=rsa-sha256; cv=none; b=c3VCaLZauZ29VfwY9mnRyav0ZH5FBTlo71UHHU+eMskT0eWjzGI10qIZLvAtncG7QCEa6N nVtT7J61H2ixUBnVwT0+e0I7riXg9UDsRq0zZ+DffML2Qxa32WhX9MAtiL6qTGiNEiVeQD a1qVFj0cMZYVaDcVerW7175Mi6Dl1ZoHkGAcerr8q5FXwSDtTWHKTudMcRAQYxTLkjiq51 /8B5cdZK5Y5YiaRLX9aHyIh0OR9HqKiBKnwLV+dPvv9Sw7+Qe7sTH5mtOnsMoC6REH/ozI 8MWdFjysLBB6eU6ljWUF4NpL8uVN5yLSNwBFWMiHF67fu4LDlGXtQ2x0sn9axg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FJD5B6dlbXK7SzY7DPXsvRHVhRaSftVYIYYKTCKbJHk=; b=Un32jTDx/553Pv/Z9lhiaLvkm38tgk3biiPfTtpNL4rNoY01+Qoxw0TqSC0/BRk6zU0GRc DJDti1UohxO0O8UB1UM1dggpnD8m/G6PrE8gkzmIKjW4VUwD8rK7IEWYHiS/PYvI03Q63K iEefyDmN/bYeQ/RkfOaCsbb80DZTdm/eSNFSWuQVNkIjhmlZQhREkP/Z9J6wsUiLwlL5vM AwIT0tlrwv7ozfc4TYExn+IldSTVrnFOiAlz69d2Yi8vvjeVtA9v7MxHsPJPUE4TCU971e mu4wGk2p8UAB5e+Du7yWzwVg5YMjr2r3259CU+D5cEbgLGQOXvCbnmurro4+IA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXYHC1dBLzkLw; Sun, 11 Feb 2024 03:39: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 41B3dJa6060125; Sun, 11 Feb 2024 03:39:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B3dJI8060122; Sun, 11 Feb 2024 03:39:19 GMT (envelope-from git) Date: Sun, 11 Feb 2024 03:39:19 GMT Message-Id: <202402110339.41B3dJI8060122@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: a67edb5616c1 - main - imgact_elf.c: remove sys/cdefs.h include List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a67edb5616c1514726ac1c8596ce0ddc2771e2fa Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a67edb5616c1514726ac1c8596ce0ddc2771e2fa commit a67edb5616c1514726ac1c8596ce0ddc2771e2fa Author: Konstantin Belousov AuthorDate: 2024-02-10 01:02:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 03:36:59 +0000 imgact_elf.c: remove sys/cdefs.h include Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/kern/imgact_elf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 047bde3c250b..49dcae050d76 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -31,7 +31,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "opt_capsicum.h" #include From nobody Sun Feb 11 03:39:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXYHD55m7z59Hf6; Sun, 11 Feb 2024 03:39: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 4TXYHD3chFz4LcP; Sun, 11 Feb 2024 03:39:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=erm0njCYmV616crsOYGyT6PfSl2gAf5atBpLcAR8Q8g=; b=qDYK/U4WvTN2YIUAp78ZGTLvrA9u4ROqR5pDsR8C4iW38fP6KESXkkXgnrBe0YOc8LN85N 3ZpBiAT+DShpc3MSKZXsximzwOo2kGBccCMOSxP6NbEtfmExJjrnVv0wSRH9Uq6Gnp5Uv8 PUF9VSrpw4UDUK/l5QM0pWicW9wKGIEKlFIEI9ewn7VT3ZCSE4voN6WGV+wRG9XyLzL7DL LZDRwgoEIULxL6P+ooVt5QwJgIa0ZRInFJObR+XEDDBJ4jycd+N9Ker+ip4JmN/b6Bwuw4 WPyveGPMROM9bHmxpSquDnxmpK9VoBtW6wA6ZBNTM5eVdMgfzxmucu9VQJgs0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707622760; a=rsa-sha256; cv=none; b=CMrwlWEctiG77u1rNNcXWcAekABcVmxvS2qRP65DKnlhdXGTgCVBNPIuuw7kRLM/Kl2tUp yoIoShep4GsFcQ8R6kMjoQ3mln/NtMhAcIOOwSuBZtJ9raThyejl1IF8R1mx3vaYTcVE+J YriM5M1HZXKNqQDvHEfMyczNEQKLKISGvRDGQ1BPpVJDVaDlU1TBrJNG+NpK28+6My0nDi /lot/bDhkvJBV03sxRUtqlvWERs0nBXxsle3w295ervwNNIa2EpTnhhF759QTU+pZzYMus Z0e8cAWeQEQRJnDqvLCcmetql87L+fPSE3IvSgYgf05w86F9Vew48by6y9DeDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=erm0njCYmV616crsOYGyT6PfSl2gAf5atBpLcAR8Q8g=; b=JULHKdoacfzxdznwswbrzuY8BHyjtSBQQI2gbrot6WKrGxGrqmtPnKY8PZYHrtABcmeJax 6+R+5zl7q9izsVyoApqlKicDbYpN1fVBZVTeVpoiwdhqul5Jf8qGCXpEuP3o/nWJW3/evV /Bp9RaiHE4qtEKFY68HrN1oy1KZaDKBTrxfW9P0BgeDYmAB1k9TLfzy8rdehtP5ijNVIGa kZDAOwreJIQ6/Elao9+8Hbd39pxVNJmg6+ohTaFypH2CM9EqqwLZ09XN7RtspOQVOa10ok C+vngW2/8EU8Ix73UdrDIOX6VESPS+KQdkN2SOLe1DPDcz847SbDb9ojeLK6UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXYHD2gPszkLx; Sun, 11 Feb 2024 03:39: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 41B3dKup060176; Sun, 11 Feb 2024 03:39:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B3dKCj060173; Sun, 11 Feb 2024 03:39:20 GMT (envelope-from git) Date: Sun, 11 Feb 2024 03:39:20 GMT Message-Id: <202402110339.41B3dKCj060173@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: 29d4f8bfc642 - main - ELF note parser: provide more info on failure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29d4f8bfc642f0196c27eb469ea7eb326ff529d1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=29d4f8bfc642f0196c27eb469ea7eb326ff529d1 commit 29d4f8bfc642f0196c27eb469ea7eb326ff529d1 Author: Konstantin Belousov AuthorDate: 2024-02-10 01:36:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 03:37:12 +0000 ELF note parser: provide more info on failure Print reasons when parser declined to parse notes, due to mis-alignment, invalid length, or too many notes (the later typically means that there is a loop). Also increase the loop limit to 4096, which gives enough iterations for notes to fill whole notes' page. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/kern/imgact_elf.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 49dcae050d76..8f85a4f5e18a 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2709,6 +2709,7 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) } } +#define MAX_NOTES_LOOP 4096 bool __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, const char *note_vendor, const Elf_Phdr *pnote, @@ -2748,9 +2749,15 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, pnote->p_offset + pnote->p_filesz); buf = NULL; } - for (i = 0; i < 100 && note >= note0 && note < note_end; i++) { - if (!aligned(note, Elf32_Addr) || (const char *)note_end - - (const char *)note < sizeof(Elf_Note)) { + for (i = 0; i < MAX_NOTES_LOOP && note >= note0 && note < note_end; + i++) { + if (!aligned(note, Elf32_Addr)) { + uprintf("Unaligned ELF note\n"); + goto retf; + } + if ((const char *)note_end - (const char *)note < + sizeof(Elf_Note)) { + uprintf("ELF note to short\n"); goto retf; } if (note->n_namesz != checknote->n_namesz || @@ -2770,6 +2777,8 @@ nextnote: roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE)); } + if (i >= MAX_NOTES_LOOP) + uprintf("ELF note parser reached %d notes\n", i); retf: res = false; ret: From nobody Sun Feb 11 03:39:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXYHH1HWSz59Hf9; Sun, 11 Feb 2024 03:39: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 4TXYHG5b5nz4LRZ; Sun, 11 Feb 2024 03:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=atydKz0gqcx6DtTqXTLM0ZL0w658f8UQssH9RMrGyQc=; b=I7dJc+Ieq1teA4BAioyngf8fqkWyVG7IgcCwON5dfcn+cCcQWMa+2RhLLMTGMbbQnb1ajA Q0u8doaKJZyKeDw2e98zGv1gRXCNyAemLNPWFVjTCL8oWLydx094J866ximE4pqItG4gsg 6ww2CzQRAgKxxRCs+PP7KLE+eQHn7Zo0DrXRkusqY7TeagyMMD+0tj/AEv6sOqgvSfGacR 8smXMjHu5xMWkD81Ra2Yja0wOU1sWXkiz3GNxnpY5fmJhtPEBWRZsiPfXP7uGsFhvluCUG Gx1WhLAGtC065zB5s7Oldm+AsXFG+z3tjQthPALxMgL7IcBbqAUmOEOkoI3Lkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707622762; a=rsa-sha256; cv=none; b=XlIuTS+Ijubxl/vON8dcbLH18BjJFIOQFqld3dk814eWZOlZie2h9fheU/fivE956MZuwX tQ3eVEEfysCcCGFytxkRU9a/fgDJjaJiuNrxTBPw5+lOuHS9ZZ8QAftHjNFlDpqHfPsanK qDab5XLl4T6IWdWNBljyyssGAzKWz4m/pQNnBjjyY3TMsAN/T2BC1eAp0S281tPQRGk0xU 2oBlK7d8Iq86yRYTf4FRzUP1XIRPSzpAOyMxjZpvu75Xun1S1Zp1PLhnxXO7q00wyg/mPJ hG1kr6tHIS9fJZuyyuXtLqoM+CZdn1hIzb6mA289U0J75pNG3tZgWWTnqAvDEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=atydKz0gqcx6DtTqXTLM0ZL0w658f8UQssH9RMrGyQc=; b=wMinBPJ/FJ2xOkVLC02gEfx1zcoYllf5iP/Q2akQXYLuACTtR991HPzHs0Ux9w+Duefp8h iuJnuuEqQTbkQyg6BVpmFsJLOBc+13G9JTSGg6qd6o1Va3HFQBANbVLV3LFFm4Z9tWon6t CPETd1GwuHhtVh949jn3mUSozQLDF39EDTRrgg/nCvH1bQc1EcVU7CtT2qjpibzKgsOHzV nOvBxYxKYasBxXtl4hdNZRSDIVsa6TAbrPBLpwRXYThYcDc6/ya0/Bd08wChnQhl91s7uL TFML86gHcRImc4Ymxr0841ZWUGtuJVwzzLOcj6tuLhiihf3Qiq+KzmYTrDTDWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXYHG4gLmzjm4; Sun, 11 Feb 2024 03:39: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 41B3dM7R060260; Sun, 11 Feb 2024 03:39:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B3dMOp060257; Sun, 11 Feb 2024 03:39:22 GMT (envelope-from git) Date: Sun, 11 Feb 2024 03:39:22 GMT Message-Id: <202402110339.41B3dMOp060257@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: 1d6230b07ff2 - main - amd64 gdt_segs: use designated initializers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d6230b07ff29b4d3ae527dbc0fc3f9775a7542a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1d6230b07ff29b4d3ae527dbc0fc3f9775a7542a commit 1d6230b07ff29b4d3ae527dbc0fc3f9775a7542a Author: Konstantin Belousov AuthorDate: 2024-02-09 04:59:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 03:38:23 +0000 amd64 gdt_segs: use designated initializers Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/amd64/amd64/machdep.c | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index b2120af8e856..c8539b7b189d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -354,8 +354,8 @@ CTASSERT(sizeof(struct nmi_pcpu) == 16); * slots as corresponding segments for i386 kernel. */ struct soft_segment_descriptor gdt_segs[] = { -/* GNULL_SEL 0 Null Descriptor */ -{ .ssd_base = 0x0, +[GNULL_SEL] = { /* 0 Null Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -363,8 +363,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GNULL2_SEL 1 Null Descriptor */ -{ .ssd_base = 0x0, +[GNULL2_SEL] = { /* 1 Null Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -372,8 +372,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUFS32_SEL 2 32 bit %gs Descriptor for user */ -{ .ssd_base = 0x0, +[GUFS32_SEL] = { /* 2 32 bit %gs Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -381,8 +381,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUGS32_SEL 3 32 bit %fs Descriptor for user */ -{ .ssd_base = 0x0, +[GUGS32_SEL] = { /* 3 32 bit %fs Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -390,8 +390,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GCODE_SEL 4 Code Descriptor for kernel */ -{ .ssd_base = 0x0, +[GCODE_SEL] = { /* 4 Code Descriptor for kernel */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_KPL, @@ -399,8 +399,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GDATA_SEL 5 Data Descriptor for kernel */ -{ .ssd_base = 0x0, +[GDATA_SEL] = { /* 5 Data Descriptor for kernel */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_KPL, @@ -408,8 +408,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GUCODE32_SEL 6 32 bit Code Descriptor for user */ -{ .ssd_base = 0x0, +[GUCODE32_SEL] = { /* 6 32 bit Code Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_UPL, @@ -417,8 +417,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUDATA_SEL 7 32/64 bit Data Descriptor for user */ -{ .ssd_base = 0x0, +[GUDATA_SEL] = { /* 7 32/64 bit Data Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -426,8 +426,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUCODE_SEL 8 64 bit Code Descriptor for user */ -{ .ssd_base = 0x0, +[GUCODE_SEL] = { /* 8 64 bit Code Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_UPL, @@ -435,8 +435,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GPROC0_SEL 9 Proc 0 Tss Descriptor */ -{ .ssd_base = 0x0, +[GPROC0_SEL] = { /* 9 Proc 0 TSS Descriptor */ + .ssd_base = 0x0, .ssd_limit = sizeof(struct amd64tss) + IOPERM_BITMAP_SIZE - 1, .ssd_type = SDT_SYSTSS, .ssd_dpl = SEL_KPL, @@ -444,8 +444,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* Actually, the TSS is a system descriptor which is double size */ -{ .ssd_base = 0x0, +[GPROC0_SEL + 1] = { /* 10 Proc 0 TSS descriptor, double size */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -453,8 +453,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUSERLDT_SEL 11 LDT Descriptor */ -{ .ssd_base = 0x0, +[GUSERLDT_SEL] = { /* 11 LDT Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -462,8 +462,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUSERLDT_SEL 12 LDT Descriptor, double size */ -{ .ssd_base = 0x0, +[GUSERLDT_SEL + 1] = { /* 12 LDT Descriptor, double size */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, From nobody Sun Feb 11 03:39:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXYHG0KxXz59HTx; Sun, 11 Feb 2024 03:39: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 4TXYHF4chlz4LcS; Sun, 11 Feb 2024 03:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h3gr4Bt+lHgJOABqq29Z4Iu/eJoqGbhePOBTxRZmOe0=; b=HMMqwTFq7PaLFnRe2tdYWdJqt07B6HYR6VGMzdEju06NZQicPpN9m/pkLbC3+fckqFeA+E r8qjlg2egAgOIFndcvHMxx7czlDWRXH3ndfN5zv1QdM3eL4XINMUAxVOnJGEEx8f2Kb4y6 dIvQADLXLPpYdflim8Nt5/2+l3eZhszDe+4n3dvT20E2yqh+d8XOV40JTygPTyaP2c65wZ RYP4Ljab5Mex0RVWjQI9K5ZAg+4Hc7B/JXiBkcHUikkAe+oGvCYjTvvkHkeR9opvAMyBIr +UY7kzoP4lVay8FYR9xq+emy3CjAsWJOkE3nsaoKev3ZrWTrZtpekrVIlulaqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707622761; a=rsa-sha256; cv=none; b=N/cWyeX1O811W3yYImDN5KM/tRCS70FkHPqjR6HdOrHaoQq+XnOqUPohP7rEgWpFlnC9eR jpdMPiZzb7Ck+SI9BSguW8BNfPB4biOzOJlctnczLQw1d1eFNZ2i4RBkpWfp4ZArCcisgm upyubDQh4nbchr+cANY1r01TWme1cOnK01EcKMFHUpynGbJOek6JLgj+NY5FFoUbXmRtX+ cQftlNFAAd3o/SdSNz090kghmUsKFgQOl/iJWy7n1yKDklrd8+lBrl/fm0EXFnIWxy8fOK y/hfvy1+K0denmxWue9sa690m2hmsPIkuMx+SL0VMbSaJtP10bVSz5bGsQzong== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h3gr4Bt+lHgJOABqq29Z4Iu/eJoqGbhePOBTxRZmOe0=; b=k2phQs7pPVVL6cdqP0EMLoR2NqkxXIRYxs6qI8EZC9km5PNUY1kZrkSccq0PuD50zv6jKq ldssudbuX/Cego2sDbpKqBwsdHWVLYoHpFXcCdt27+ICeLpZ5qICj/K4hfWoS6zcfY0CHH 6bGqFWOw+2TAR2feRG0O0UUq616doOfGg33gDxU5Luq42f2I2YZN0N0HezqPnn1EtHWmeF BsePV7syKbytUHZMt6OfFCm9LMyV37c5Jl9HqIhBiirjd3dKcCl+3HaVI9AN0PKpI/cPwq U3KycrcZZmw23adLnFqod8375gVmjQ8IoqA3COKR905+Ccq9uvCAo29prQ0YRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXYHF3h27zkNZ; Sun, 11 Feb 2024 03:39: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 41B3dLsa060218; Sun, 11 Feb 2024 03:39:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B3dLH6060215; Sun, 11 Feb 2024 03:39:21 GMT (envelope-from git) Date: Sun, 11 Feb 2024 03:39:21 GMT Message-Id: <202402110339.41B3dLH6060215@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: be707ee09556 - main - amd64/linux*: mark brandlists as static List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be707ee09556a3fa345bc30c04aeeaa2a5d2efa2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=be707ee09556a3fa345bc30c04aeeaa2a5d2efa2 commit be707ee09556a3fa345bc30c04aeeaa2a5d2efa2 Author: Konstantin Belousov AuthorDate: 2024-02-10 01:01:38 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 03:37:27 +0000 amd64/linux*: mark brandlists as static Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/amd64/linux/linux_sysvec.c | 2 +- sys/amd64/linux32/linux32_sysvec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 757986f94ae1..9c3d7e6405c1 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -898,7 +898,7 @@ static Elf64_Brandinfo linux_muslbrand = { LINUX_BI_FUTEX_REQUEUE }; -Elf64_Brandinfo *linux_brandlist[] = { +static Elf64_Brandinfo *linux_brandlist[] = { &linux_glibc2brand, &linux_glibc2brandshort, &linux_muslbrand, diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 1002648c3df8..19b4af7661f0 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -994,7 +994,7 @@ static Elf32_Brandinfo linux_muslbrand = { LINUX_BI_FUTEX_REQUEUE }; -Elf32_Brandinfo *linux_brandlist[] = { +static Elf32_Brandinfo *linux_brandlist[] = { &linux_brand, &linux_glibc2brand, &linux_muslbrand, From nobody Sun Feb 11 03:39:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXYHJ3hf8z59HcB; Sun, 11 Feb 2024 03:39: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 4TXYHJ1KqPz4LS5; Sun, 11 Feb 2024 03:39:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2p1bRz1uA1QfcjoeXWAy0moweWjEkbHmNQgSTMFyBzg=; b=gzPSxU/7DuWZekqwtOEja6lHzxqmUWIYGE6IRV2IdRnjrFVeSOJmX/VHMd06PU203am7Xx 8qEXNzfq1GkaILRjp9aDuh0/FVq7DlBwTsSFjSSeZ8Tcp6HveQocxINfB5uW5xFVYewpGy AvczVD/ZHF1kSZFF5chfrVCva5d5FkGFVpmgmjM+jsbwskzzgfS3neiz7779SZqQap04ii o2r+CB0owHHWkL0Rjq0VARbRfqXBM/Z8NzJmMNG5IvQX+SH5Cl8ev3b7USzeRDb1BN20YF Zv1y18Q7d470hoWvBu0ocfDuHGHM33BkfP9ytkLuLtU3T/O//5STSj/GmwW8oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707622764; a=rsa-sha256; cv=none; b=WOMoYPCM9b224620QkaGlgd6SC81SE+gBhaA8uPar308MQJJ39274SIeIP0NlUGKzmGnvn y/Tj1qJBP6RSosJOw913RV0ugpcGY7tCVbsSy46WkGlNqfK9zbPWjdJp9z+H49RzjBX7Xq gy45Qf8VIH8bpjEACZ9HOm7otX+KQL+ozWF0i3251kQxacbw5TK0EOKDgCjiVJsMyYsbD2 xbCl9NogwY7IvRMB3O2urD83SOqvleNZZkW5INa+HiOFrf4nzemVqjoD1hQKINPf8mfm+w gG1hRM1SJHredagaGwnsphWs73uqxW58Du9IfQwJDcFk4JpwqLhC9Lo8MG5Kxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2p1bRz1uA1QfcjoeXWAy0moweWjEkbHmNQgSTMFyBzg=; b=vGY84Rlzw7lEQaJPc4oiImUGK2VgZNk+gcEgCm813t3wJs9Jw7AFDkkJ5FEJNiC86dzhoB 1zE3IxOxf8mD9run/4ghDOqLOifj+ppF5r0i+MRombrTFxg4O+nUhgLT+RTLiYIMytxszE mO3x/osrki54jBBgI1vn5OTJwrYwc/6KSC+Cwt3DC+yuBJUmPNpInbA5wzEiDcDrmowhVr 0shQzqUrlURgWy6HMglDtTq1a9BzgCSC04jD/vB6WrpbQe9iHymw49Zm6Q4/TC2AJx255U iFYUxqUwsaSMaCgBFmRNBU/qC2eUx+4pStS8RtKb6nhm9UvEWRxeLyuSThu2zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXYHH6Ml7zjQp; Sun, 11 Feb 2024 03:39: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 41B3dNPj060318; Sun, 11 Feb 2024 03:39:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B3dNKF060315; Sun, 11 Feb 2024 03:39:23 GMT (envelope-from git) Date: Sun, 11 Feb 2024 03:39:23 GMT Message-Id: <202402110339.41B3dNKF060315@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: 5f7ac491eef4 - main - amd64 pcb.h: use 4 hex digits for pcb flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f7ac491eef4994b23b4de250927a85c69a64a31 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5f7ac491eef4994b23b4de250927a85c69a64a31 commit 5f7ac491eef4994b23b4de250927a85c69a64a31 Author: Konstantin Belousov AuthorDate: 2024-02-09 05:05:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 03:38:41 +0000 amd64 pcb.h: use 4 hex digits for pcb flags Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/amd64/include/pcb.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h index 3b28e97db40c..1caa33ac0019 100644 --- a/sys/amd64/include/pcb.h +++ b/sys/amd64/include/pcb.h @@ -76,14 +76,14 @@ struct pcb { uint16_t pcb_tr; u_int pcb_flags; -#define PCB_FULL_IRET 0x01 /* full iret is required */ -#define PCB_DBREGS 0x02 /* process using debug registers */ -#define PCB_KERNFPU 0x04 /* kernel uses fpu */ -#define PCB_FPUINITDONE 0x08 /* fpu state is initialized */ -#define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */ -#define PCB_KERNFPU_THR 0x20 /* fpu_kern_thread() */ -#define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */ -#define PCB_FPUNOSAVE 0x80 /* no save area for current FPU ctx */ +#define PCB_FULL_IRET 0x0001 /* full iret is required */ +#define PCB_DBREGS 0x0002 /* process using debug registers */ +#define PCB_KERNFPU 0x0004 /* kernel uses fpu */ +#define PCB_FPUINITDONE 0x0008 /* fpu state is initialized */ +#define PCB_USERFPUINITDONE 0x0010 /* fpu user state is initialized */ +#define PCB_KERNFPU_THR 0x0020 /* fpu_kern_thread() */ +#define PCB_32BIT 0x0040 /* process has 32 bit context (segs etc) */ +#define PCB_FPUNOSAVE 0x0080 /* no save area for current FPU ctx */ uint16_t pcb_initial_fpucw; From nobody Sun Feb 11 06:36:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXdCH19Y4z59Yl9; Sun, 11 Feb 2024 06:36: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 4TXdCH0tlrz4bxF; Sun, 11 Feb 2024 06:36:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707633371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r8b0rVR5JasDLuoWdbLlMe2/B+USCMncQ2hSkTB8YI8=; b=EGB8FHmn6gAQkt+knMucvdT+FU0lokLkXZYJdqS5BXWN2IlmouxLidjBrJzqowvovroGNm tBArMhbI0JVlYT/zxcyhmw/thR//MMG3w0/vA2I9xv+QnNPDMXKhpu/M+9FYjwjg0NPT9r rn4eLFR9AFIHJySFcK1gNiTciRx22biNx2X0LuGQwI6vpXWF4mClDJEdGJypIdW99CG85K BJVMAjGGsUfMHhqkHI1amCKEn0dwMD2d8Kl29X7zVo50kuMalsNiO6yhKxLew6FNkW+adH bKFGWWgRfjqsjt7b23tTZ7aqdA3X60amtWCf9vw3oBmuoDsg2ZMJ5prIgId5Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707633371; a=rsa-sha256; cv=none; b=aUaa/aKlh7fEvGptW09J/d6yrwI590dZnfHw9MnJqe80Z69cqpFeTk5zk0qk+1STCCBVXv bqbEotDmX+zMT3gBULtHKr4cSFQoTKuLuoLPqtU7WoOZMZI/MZ4EqkxGZcho1DNcUJCmNd ocLgZtufJIDKkHWtwVtWlT+KSR2+yZjfesTwstMGHZldt6nZqwMo39/xj6K5vB/XeR75N5 np1eJwiwzdTLVg56JihrAv3sb19AqiBnrE8KkQQRFGJ7Lpo92aLBxbRFkUy2nO2CyKvkXr swGBmwDRDyU+Tvb1JdBdGqA7Kao1C0uy3lVNRmxL8Onh1fkrqXNe+m+JN7g2ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707633371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r8b0rVR5JasDLuoWdbLlMe2/B+USCMncQ2hSkTB8YI8=; b=JHB5VaFGYhxcUkiPKDmnvKAEkkcldlmyclShiAwOMakMpGWIgp+3yaJEPfLFMZ/N4QwZyZ 7zMoEkmI4aBojllGJNxDg2olzOfJX6mo1sYP4ZanDzgWpwsz5Kcpw+U4U88r0SYK39fwGi TI3GgXdPC2umgtD0QnZcUUcfbphJMbsXVg0O9SbtDDCp+4vjSzkGScqxPlv4Y8pZkfLwFs 5uDt3jN72cPXpuE5A4edngEPWVz8gRFVpkqEpSoGCq/YGufYA7LTbVNB6j7MIENM1XeNAl scz6d43WaIUFUpTq/vSPp4mFbwRwur2enRrmL3YHQvIiR9rJBeoiaawmH74DGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXdCG72pgzprd; Sun, 11 Feb 2024 06:36: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 41B6aAnt060989; Sun, 11 Feb 2024 06:36:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B6aAQ7060986; Sun, 11 Feb 2024 06:36:10 GMT (envelope-from git) Date: Sun, 11 Feb 2024 06:36:10 GMT Message-Id: <202402110636.41B6aAQ7060986@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: 0d3b2bdbf719 - main - caroot: routine update List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d3b2bdbf719ac6b5719a47387558ca9c34a4b2c Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0d3b2bdbf719ac6b5719a47387558ca9c34a4b2c commit 0d3b2bdbf719ac6b5719a47387558ca9c34a4b2c Author: Kyle Evans AuthorDate: 2024-02-11 06:33:12 +0000 Commit: Kyle Evans CommitDate: 2024-02-11 06:35:16 +0000 caroot: routine update Changes: - One (1) modified - Eight (8) added - One (1) expired, now untrusted MFC after: 3 days --- ObsoleteFiles.inc | 3 + ...ertificacion_Firmaprofesional_CIF_A62634068.pem | 118 +++++++++--------- .../trusted/CommScope_Public_Trust_ECC_Root-01.pem | 67 ++++++++++ .../trusted/CommScope_Public_Trust_ECC_Root-02.pem | 67 ++++++++++ .../trusted/CommScope_Public_Trust_RSA_Root-01.pem | 134 ++++++++++++++++++++ .../trusted/CommScope_Public_Trust_RSA_Root-02.pem | 134 ++++++++++++++++++++ .../trusted/Telekom_Security_TLS_ECC_Root_2020.pem | 68 ++++++++++ .../trusted/Telekom_Security_TLS_RSA_Root_2023.pem | 138 +++++++++++++++++++++ .../caroot/trusted/TrustAsia_Global_Root_CA_G3.pem | 138 +++++++++++++++++++++ .../caroot/trusted/TrustAsia_Global_Root_CA_G4.pem | 70 +++++++++++ .../Security_Communication_Root_CA.pem | 0 11 files changed, 878 insertions(+), 59 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 2ba4e487ad0b..7aa9cc4f036a 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240211: caroot bundle updated +OLD_FILES+=usr/share/certs/trusted/Security_Communication_Root_CA.pem + # 20240122: callout_async_drain() removed OLD_FILES+=usr/share/man/man9/callout_async_drain.9.gz diff --git a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem index 7eeb715ac674..ceae80a3e6d8 100644 --- a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem +++ b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem @@ -14,12 +14,12 @@ Certificate: Data: Version: 3 (0x2) - Serial Number: 6047274297262753887 (0x53ec3beefbb2485f) - Signature Algorithm: sha1WithRSAEncryption + Serial Number: 1977337328857672817 (0x1b70e9d2ffae6c71) + Signature Algorithm: sha256WithRSAEncryption Issuer: C = ES, CN = Autoridad de Certificacion Firmaprofesional CIF A62634068 Validity - Not Before: May 20 08:38:15 2009 GMT - Not After : Dec 31 08:38:15 2030 GMT + Not Before: Sep 23 15:22:07 2014 GMT + Not After : May 5 15:22:07 2036 GMT Subject: C = ES, CN = Autoridad de Certificacion Firmaprofesional CIF A62634068 Subject Public Key Info: Public Key Algorithm: rsaEncryption @@ -62,54 +62,54 @@ Certificate: 92:30:bb Exponent: 65537 (0x10001) X509v3 extensions: - X509v3 Basic Constraints: critical - CA:TRUE, pathlen:1 - X509v3 Key Usage: critical - Certificate Sign, CRL Sign X509v3 Subject Key Identifier: 65:CD:EB:AB:35:1E:00:3E:7E:D5:74:C0:1C:B4:73:47:0E:1A:64:2F + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:1 X509v3 Certificate Policies: Policy: X509v3 Any Policy CPS: http://www.firmaprofesional.com/cps User Notice: Explicit Text: - Signature Algorithm: sha1WithRSAEncryption + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha256WithRSAEncryption Signature Value: - 17:7d:a0:f9:b4:dd:c5:c5:eb:ad:4b:24:b5:a1:02:ab:dd:a5: - 88:4a:b2:0f:55:4b:2b:57:8c:3b:e5:31:dd:fe:c4:32:f1:e7: - 5b:64:96:36:32:18:ec:a5:32:77:d7:e3:44:b6:c0:11:2a:80: - b9:3d:6a:6e:7c:9b:d3:ad:fc:c3:d6:a3:e6:64:29:7c:d1:e1: - 38:1e:82:2b:ff:27:65:af:fb:16:15:c4:2e:71:84:e5:b5:ff: - fa:a4:47:bd:64:32:bb:f6:25:84:a2:27:42:f5:20:b0:c2:13: - 10:11:cd:10:15:ba:42:90:2a:d2:44:e1:96:26:eb:31:48:12: - fd:2a:da:c9:06:cf:74:1e:a9:4b:d5:87:28:f9:79:34:92:3e: - 2e:44:e8:f6:8f:4f:8f:35:3f:25:b3:39:dc:63:2a:90:6b:20: - 5f:c4:52:12:4e:97:2c:2a:ac:9d:97:de:48:f2:a3:66:db:c2: - d2:83:95:a6:66:a7:9e:25:0f:e9:0b:33:91:65:0a:5a:c3:d9: - 54:12:dd:af:c3:4e:0e:1f:26:5e:0d:dc:b3:8d:ec:d5:81:70: - de:d2:4f:24:05:f3:6c:4e:f5:4c:49:66:8d:d1:ff:d2:0b:25: - 41:48:fe:51:84:c6:42:af:80:04:cf:d0:7e:64:49:e4:f2:df: - a2:ec:b1:4c:c0:2a:1d:e7:b4:b1:65:a2:c4:bc:f1:98:f4:aa: - 70:07:63:b4:b8:da:3b:4c:fa:40:22:30:5b:11:a6:f0:05:0e: - c6:02:03:48:ab:86:9b:85:dd:db:dd:ea:a2:76:80:73:7d:f5: - 9c:04:c4:45:8d:e7:b9:1c:8b:9e:ea:d7:75:d1:72:b1:de:75: - 44:e7:42:7d:e2:57:6b:7d:dc:99:bc:3d:83:28:ea:80:93:8d: - c5:4c:65:c1:70:81:b8:38:fc:43:31:b2:f6:03:34:47:b2:ac: - fb:22:06:cb:1e:dd:17:47:1c:5f:66:b9:d3:1a:a2:da:11:b1: - a4:bc:23:c9:e4:be:87:ff:b9:94:b6:f8:5d:20:4a:d4:5f:e7: - bd:68:7b:65:f2:15:1e:d2:3a:a9:2d:e9:d8:6b:24:ac:97:58: - 44:47:ad:59:18:f1:21:65:70:de:ce:34:60:a8:40:f1:f3:3c: - a4:c3:28:23:8c:fe:27:33:43:40:a0:17:3c:eb:ea:3b:b0:72: - a6:a3:b9:4a:4b:5e:16:48:f4:b2:bc:c8:8c:92:c5:9d:9f:ac: - 72:36:bc:34:80:34:6b:a9:8b:92:c0:b8:17:ed:ec:76:53:f5: - 24:01:8c:b3:22:e8:4b:7c:55:c6:9d:fa:a3:14:bb:65:85:6e: - 6e:4f:12:7e:0a:3c:9d:95 -SHA1 Fingerprint=AE:C5:FB:3F:C8:E1:BF:C4:E5:4F:03:07:5A:9A:E8:00:B7:F7:B6:FA + 74:87:28:02:2b:77:1f:66:89:64:ed:8f:74:2e:46:1c:bb:a8: + f8:f8:0b:1d:83:b6:3a:a7:e8:45:8a:07:b7:e0:3e:20:cb:e1: + 08:db:13:08:f8:28:a1:35:b2:80:b3:0b:51:c0:d3:56:9a:8d: + 33:45:49:af:49:f0:e0:3d:07:7a:45:13:5a:ff:c8:97:d8:d3: + 18:2c:7d:96:f8:dd:a2:65:43:70:93:90:15:ba:90:df:e8:19: + b0:db:2c:8a:60:0f:b7:6f:94:07:1e:1d:a6:c9:85:f6:bd:34: + f8:40:78:62:10:70:3a:be:7d:4b:39:81:a9:10:d4:96:41:bb: + f8:5f:1c:0b:1d:08:f2:b1:b0:89:7a:f2:f7:a0:e0:c4:8f:8b: + 78:b5:3b:58:a5:23:8e:4f:55:fe:36:3b:e0:0c:b7:ca:2a:30: + 41:20:b4:80:cd:ae:fc:76:66:73:a8:ae:6e:e1:7c:da:03:e8: + 94:20:e6:22:a3:d0:1f:90:5d:20:53:14:26:57:da:54:97:df: + 16:44:10:01:1e:88:66:8f:72:38:93:dd:20:b7:34:be:d7:f1: + ee:63:8e:47:79:28:06:fc:f3:59:45:25:60:22:33:1b:a3:5f: + a8:ba:2a:da:1a:3d:cd:40:ea:8c:ee:05:15:95:d5:a5:2c:20: + 2f:a7:98:28:ee:45:fc:f1:b8:88:00:2c:8f:42:da:51:d5:9c: + e5:13:68:71:45:43:8b:9e:0b:21:3c:4b:5c:05:dc:1a:9f:98: + 8e:da:bd:22:9e:72:cd:ad:0a:cb:cc:a3:67:9b:28:74:c4:9b: + d7:1a:3c:04:58:a6:82:9d:ad:c7:7b:6f:ff:80:96:e9:f8:8d: + 6a:bd:18:90:1d:ff:49:1a:90:52:37:93:2f:3c:02:5d:82:76: + 0b:51:e7:16:c7:57:f8:38:f9:a7:cd:9b:22:54:ef:63:b0:15: + 6d:53:65:03:4a:5e:4a:a0:b2:a7:8e:49:00:59:38:d5:c7:f4: + 80:64:f5:6e:95:50:b8:11:7e:15:70:38:4a:b0:7f:d0:c4:32: + 70:c0:19:ff:c9:38:2d:14:2c:66:f4:42:44:e6:55:76:1b:80: + 15:57:ff:c0:a7:a7:aa:39:aa:d8:d3:70:d0:2e:ba:eb:94:6a: + fa:5f:34:86:e7:62:b5:fd:8a:f0:30:85:94:c9:af:24:02:2f: + 6f:d6:dd:67:fe:e3:b0:55:4f:04:98:4f:a4:41:56:e2:93:d0: + 6a:e8:d6:f3:fb:65:e0:ce:75:c4:31:59:0c:ee:82:c8:0c:60: + 33:4a:19:ba:84:67:27:0f:bc:42:5d:bd:24:54:0d:ec:1d:70: + 06:5f:a4:bc:fa:20:7c:55 +SHA1 Fingerprint=0B:BE:C2:27:22:49:CB:39:AA:DB:35:5C:53:E3:8C:AE:78:FF:B6:FE -----BEGIN CERTIFICATE----- -MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UE +MIIGFDCCA/ygAwIBAgIIG3Dp0v+ubHEwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UE BhMCRVMxQjBABgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1h -cHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEy -MzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUg +cHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODAeFw0xNDA5MjMxNTIyMDdaFw0zNjA1 +MDUxNTIyMDdaMFExCzAJBgNVBAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUg Q2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBBNjI2MzQwNjgwggIi MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDDUtd9 thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQM @@ -122,21 +122,21 @@ Z/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirja EbsXLZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/T KI8xWVvTyQKmtFLKbpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF 6NkBiDkal4ZkQdU7hwxu+g/GvUgUvzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVh -OSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYD -VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNHDhpkLzCBpgYD -VR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp -cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBv -ACAAZABlACAAbABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBl -AGwAbwBuAGEAIAAwADgAMAAxADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF -661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx51tkljYyGOylMnfX40S2wBEqgLk9 -am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qkR71kMrv2JYSiJ0L1 -ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaPT481 -PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS -3a/DTg4fJl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5k -SeTy36LssUzAKh3ntLFlosS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF -3dvd6qJ2gHN99ZwExEWN57kci57q13XRcrHedUTnQn3iV2t93Jm8PYMo6oCTjcVM -ZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoRsaS8I8nkvof/uZS2+F0g -StRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTDKCOM/icz -Q0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQB -jLMi6Et8Vcad+qMUu2WFbm5PEn4KPJ2V +OSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMB0GA1UdDgQWBBRlzeurNR4APn7VdMAc +tHNHDhpkLzASBgNVHRMBAf8ECDAGAQH/AgEBMIGmBgNVHSAEgZ4wgZswgZgGBFUd +IAAwgY8wLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuZmlybWFwcm9mZXNpb25hbC5j +b20vY3BzMFwGCCsGAQUFBwICMFAeTgBQAGEAcwBlAG8AIABkAGUAIABsAGEAIABC +AG8AbgBhAG4AbwB2AGEAIAA0ADcAIABCAGEAcgBjAGUAbABvAG4AYQAgADAAOAAw +ADEANzAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQELBQADggIBAHSHKAIrdx9m +iWTtj3QuRhy7qPj4Cx2Dtjqn6EWKB7fgPiDL4QjbEwj4KKE1soCzC1HA01aajTNF +Sa9J8OA9B3pFE1r/yJfY0xgsfZb43aJlQ3CTkBW6kN/oGbDbLIpgD7dvlAceHabJ +hfa9NPhAeGIQcDq+fUs5gakQ1JZBu/hfHAsdCPKxsIl68veg4MSPi3i1O1ilI45P +Vf42O+AMt8oqMEEgtIDNrvx2ZnOorm7hfNoD6JQg5iKj0B+QXSBTFCZX2lSX3xZE +EAEeiGaPcjiT3SC3NL7X8e5jjkd5KAb881lFJWAiMxujX6i6KtoaPc1A6ozuBRWV +1aUsIC+nmCjuRfzxuIgALI9C2lHVnOUTaHFFQ4ueCyE8S1wF3BqfmI7avSKecs2t +CsvMo2ebKHTEm9caPARYpoKdrcd7b/+Alun4jWq9GJAd/0kakFI3ky88Al2CdgtR +5xbHV/g4+afNmyJU72OwFW1TZQNKXkqgsqeOSQBZONXH9IBk9W6VULgRfhVwOEqw +f9DEMnDAGf/JOC0ULGb0QkTmVXYbgBVX/8Cnp6o5qtjTcNAuuuuUavpfNIbnYrX9 +ivAwhZTJryQCL2/W3Wf+47BVTwSYT6RBVuKT0Gro1vP7ZeDOdcQxWQzugsgMYDNK +GbqEZycPvEJdvSRUDewdcAZfpLz6IHxV -----END CERTIFICATE----- diff --git a/secure/caroot/trusted/CommScope_Public_Trust_ECC_Root-01.pem b/secure/caroot/trusted/CommScope_Public_Trust_ECC_Root-01.pem new file mode 100644 index 000000000000..41e8a409ac3c --- /dev/null +++ b/secure/caroot/trusted/CommScope_Public_Trust_ECC_Root-01.pem @@ -0,0 +1,67 @@ +## +## CommScope Public Trust ECC Root-01 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 43:70:82:77:cf:4d:5d:34:f1:ca:ae:32:2f:37:f7:f4:7f:75:a0:9e + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = US, O = CommScope, CN = CommScope Public Trust ECC Root-01 + Validity + Not Before: Apr 28 17:35:43 2021 GMT + Not After : Apr 28 17:35:42 2046 GMT + Subject: C = US, O = CommScope, CN = CommScope Public Trust ECC Root-01 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:4b:36:e9:ae:57:5e:a8:70:d7:d0:8f:74:62:77: + c3:5e:7a:aa:e5:b6:a2:f1:78:fd:02:7e:57:dd:91: + 79:9c:6c:b9:52:88:54:bc:2f:04:be:b8:cd:f6:10: + d1:29:ec:b5:d0:a0:c3:f0:89:70:19:bb:51:65:c5: + 43:9c:c3:9b:63:9d:20:83:3e:06:0b:a6:42:44:85: + 11:a7:4a:3a:2d:e9:d6:68:2f:48:4e:53:2b:07:3f: + 4d:bd:b9:ac:77:39:57 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 8E:07:62:C0:50:DD:C6:19:06:00:46:74:04:F7:F3:AE:7D:75:4D:30 + Signature Algorithm: ecdsa-with-SHA384 + Signature Value: + 30:65:02:31:00:9c:33:df:41:e3:23:a8:42:36:26:97:35:5c: + 7b:eb:db:4b:f8:aa:8b:73:55:15:5c:ac:78:29:0f:ba:21:d8: + c4:a0:d8:d1:03:dd:6d:d1:39:3d:c4:93:60:d2:e3:72:b2:02: + 30:7c:c5:7e:88:d3:50:f5:1e:25:e8:fa:4e:75:e6:58:96:a4: + 35:5f:1b:65:ea:61:9a:70:23:b5:0d:a3:9b:92:52:6f:69:a0: + 8c:8d:4a:d0:ee:8b:0e:cb:47:8e:d0:8d:11 +SHA1 Fingerprint=07:86:C0:D8:DD:8E:C0:80:98:06:98:D0:58:7A:EF:DE:A6:CC:A2:5D +-----BEGIN CERTIFICATE----- +MIICHTCCAaOgAwIBAgIUQ3CCd89NXTTxyq4yLzf39H91oJ4wCgYIKoZIzj0EAwMw +TjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29t +bVNjb3BlIFB1YmxpYyBUcnVzdCBFQ0MgUm9vdC0wMTAeFw0yMTA0MjgxNzM1NDNa +Fw00NjA0MjgxNzM1NDJaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2Nv +cGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgRUNDIFJvb3QtMDEw +djAQBgcqhkjOPQIBBgUrgQQAIgNiAARLNumuV16ocNfQj3Rid8NeeqrltqLxeP0C +flfdkXmcbLlSiFS8LwS+uM32ENEp7LXQoMPwiXAZu1FlxUOcw5tjnSCDPgYLpkJE +hRGnSjot6dZoL0hOUysHP029uax3OVejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSOB2LAUN3GGQYARnQE9/OufXVNMDAKBggq +hkjOPQQDAwNoADBlAjEAnDPfQeMjqEI2Jpc1XHvr20v4qotzVRVcrHgpD7oh2MSg +2NED3W3ROT3Ek2DS43KyAjB8xX6I01D1HiXo+k515liWpDVfG2XqYZpwI7UNo5uS +Um9poIyNStDuiw7LR47QjRE= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/CommScope_Public_Trust_ECC_Root-02.pem b/secure/caroot/trusted/CommScope_Public_Trust_ECC_Root-02.pem new file mode 100644 index 000000000000..f547954704be --- /dev/null +++ b/secure/caroot/trusted/CommScope_Public_Trust_ECC_Root-02.pem @@ -0,0 +1,67 @@ +## +## CommScope Public Trust ECC Root-02 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 28:fd:99:60:41:47:a6:01:3a:ca:14:7b:1f:ef:f9:68:08:83:5d:7d + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = US, O = CommScope, CN = CommScope Public Trust ECC Root-02 + Validity + Not Before: Apr 28 17:44:54 2021 GMT + Not After : Apr 28 17:44:53 2046 GMT + Subject: C = US, O = CommScope, CN = CommScope Public Trust ECC Root-02 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:78:30:81:e8:63:1e:e5:eb:71:51:0f:f7:07:07: + ca:39:99:7c:4e:d5:0f:cc:30:30:0b:8f:66:93:3e: + cf:bd:c5:86:bd:f9:b1:b7:b4:3e:b4:07:c8:f3:96: + 31:f3:ed:a4:4f:f8:a3:4e:8d:29:15:58:b8:d5:6f: + 7f:ee:6c:22:b5:b0:af:48:45:0a:bd:a8:49:94:bf: + 84:43:b0:db:84:4a:03:23:19:67:6a:6f:c1:6e:bc: + 06:39:37:d1:88:22:f7 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + E6:18:75:FF:EF:60:DE:84:A4:F5:46:C7:DE:4A:55:E3:32:36:79:F5 + Signature Algorithm: ecdsa-with-SHA384 + Signature Value: + 30:64:02:30:26:73:49:7a:b6:ab:e6:49:f4:7d:52:3f:d4:41: + 04:ae:80:43:83:65:75:b9:85:80:38:3b:d6:6f:e4:93:86:ab: + 8f:e7:89:c8:7f:9b:7e:6b:0a:12:55:61:aa:11:e0:79:02:30: + 77:e8:31:71:ac:3c:71:03:d6:84:26:1e:14:b8:f3:3b:3b:de: + ed:59:fc:6b:4c:30:7f:59:ce:45:e9:73:60:15:9a:4c:f0:e6: + 5e:25:22:15:6d:c2:87:59:d0:b2:8e:6a +SHA1 Fingerprint=3C:3F:EF:57:0F:FE:65:93:86:9E:A0:FE:B0:F6:ED:8E:D1:13:C7:E5 +-----BEGIN CERTIFICATE----- +MIICHDCCAaOgAwIBAgIUKP2ZYEFHpgE6yhR7H+/5aAiDXX0wCgYIKoZIzj0EAwMw +TjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29t +bVNjb3BlIFB1YmxpYyBUcnVzdCBFQ0MgUm9vdC0wMjAeFw0yMTA0MjgxNzQ0NTRa +Fw00NjA0MjgxNzQ0NTNaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2Nv +cGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgRUNDIFJvb3QtMDIw +djAQBgcqhkjOPQIBBgUrgQQAIgNiAAR4MIHoYx7l63FRD/cHB8o5mXxO1Q/MMDAL +j2aTPs+9xYa9+bG3tD60B8jzljHz7aRP+KNOjSkVWLjVb3/ubCK1sK9IRQq9qEmU +v4RDsNuESgMjGWdqb8FuvAY5N9GIIvejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTmGHX/72DehKT1RsfeSlXjMjZ59TAKBggq +hkjOPQQDAwNnADBkAjAmc0l6tqvmSfR9Uj/UQQSugEODZXW5hYA4O9Zv5JOGq4/n +ich/m35rChJVYaoR4HkCMHfoMXGsPHED1oQmHhS48zs73u1Z/GtMMH9ZzkXpc2AV +mkzw5l4lIhVtwodZ0LKOag== +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/CommScope_Public_Trust_RSA_Root-01.pem b/secure/caroot/trusted/CommScope_Public_Trust_RSA_Root-01.pem new file mode 100644 index 000000000000..2f144760f93c --- /dev/null +++ b/secure/caroot/trusted/CommScope_Public_Trust_RSA_Root-01.pem @@ -0,0 +1,134 @@ +## +## CommScope Public Trust RSA Root-01 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 3e:03:49:81:75:16:74:31:8e:4c:ab:d5:c5:90:29:96:c5:39:10:dd + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = US, O = CommScope, CN = CommScope Public Trust RSA Root-01 + Validity + Not Before: Apr 28 16:45:54 2021 GMT + Not After : Apr 28 16:45:53 2046 GMT + Subject: C = US, O = CommScope, CN = CommScope Public Trust RSA Root-01 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (4096 bit) + Modulus: + 00:b0:48:65:a3:0d:1d:42:e3:91:6d:9d:84:a4:61: + 96:12:c2:ed:c3:da:23:34:19:76:f6:ea:fd:55:5a: + f6:55:01:53:0f:f2:cc:8c:97:4f:b9:50:cb:b3:01: + 44:56:96:fd:9b:28:ec:7b:74:0b:e7:42:6b:55:ce: + c9:61:b2:e8:ad:40:3c:ba:b9:41:0a:05:4f:1b:26: + 85:8f:43:b5:40:b5:85:d1:d4:71:dc:83:41:f3:f6: + 45:c7:80:a2:84:50:97:46:ce:a0:0c:c4:60:56:04: + 1d:07:5b:46:a5:0e:b2:4b:a4:0e:a5:7c:ee:f8:d4: + 62:03:b9:93:6a:8a:14:b8:70:f8:2e:82:46:38:23: + 0e:74:c7:6b:41:b7:d0:29:a3:9d:80:b0:7e:77:93: + 63:42:fb:34:83:3b:73:a3:5a:21:36:eb:47:fa:18: + 17:d9:ba:66:c2:93:a4:8f:fc:5d:a4:ad:fc:50:6a: + 95:ac:bc:24:33:d1:bd:88:7f:86:f5:f5:b2:73:2a: + 8f:7c:af:08:f2:1a:98:3f:a9:81:65:3f:c1:8c:89: + c5:96:30:9a:0a:cf:f4:d4:c8:34:ed:9d:2f:bc:8d: + 38:86:53:ee:97:9f:a9:b2:63:94:17:8d:0f:dc:66: + 2a:7c:52:51:75:cb:99:8e:e8:3d:5c:bf:9e:3b:28: + 8d:83:02:0f:a9:9f:72:e2:2c:2b:b3:dc:66:97:00: + 40:d0:a4:54:8e:9b:5d:7b:45:36:26:d6:72:43:eb: + cf:c0:ea:0d:dc:ce:12:e6:7d:38:9f:05:27:a8:97: + 3e:e9:51:c6:6c:05:28:c1:02:0f:e9:18:6d:ec:bd: + 9c:06:d4:a7:49:f4:54:05:6b:6c:30:f1:eb:03:d5: + ea:3d:6a:76:c2:cb:1a:28:49:4d:7f:64:e0:fa:2b: + da:73:83:81:ff:91:03:bd:94:bb:e4:b8:8e:9c:32: + 63:cd:9f:bb:68:81:b1:84:5b:af:36:bf:77:ee:1d: + 7f:f7:49:9b:52:ec:d2:77:5a:7d:91:9d:4d:c2:39: + 2d:e4:ba:82:f8:6f:f2:4e:1e:0f:4e:e6:3f:59:a5: + 23:dc:3d:87:a8:28:58:28:d1:f1:1b:36:db:4f:c4: + ff:e1:8c:5b:72:8c:c7:26:03:27:a3:39:0a:01:aa: + c0:b2:31:60:83:22:a1:4f:12:09:01:11:af:34:d4: + cf:d7:ae:62:d3:05:07:b4:31:75:e0:0d:6d:57:4f: + 69:87:f9:57:a9:ba:15:f6:c8:52:6d:a1:cb:9c:1f: + e5:fc:78:a8:35:9a:9f:41:14:ce:a5:b4:ce:94:08: + 1c:09:ad:56:e5:da:b6:49:9a:4a:ea:63:18:53:9c: + 2c:2e:c3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 37:5D:A6:9A:74:32:C2:C2:F9:C7:A6:15:10:59:B8:E4:FD:E5:B8:6D + Signature Algorithm: sha256WithRSAEncryption + Signature Value: + af:a7:cf:de:ff:e0:bd:42:8d:4d:e5:22:96:df:68:ea:7d:4d: + 2a:7d:d0:ad:3d:16:5c:43:e7:7d:c0:86:e8:7a:35:63:f1:cc: + 81:c8:c6:0b:e8:2e:52:35:a4:a6:49:90:63:51:ac:34:ac:05: + 3b:57:00:e9:d3:62:d3:d9:29:d5:54:be:1c:10:91:9c:b2:6d: + fe:59:fd:79:f7:ea:56:d0:9e:68:54:42:8f:26:52:e2:4c:df: + 2f:97:a6:2f:d2:07:98:a8:f3:60:5d:4b:9a:58:57:88:ef:82: + e5:fa:af:6c:81:4b:92:8f:40:9a:93:46:59:cb:5f:78:16:b1: + 67:3e:42:0b:df:28:d9:b0:ad:98:20:be:43:7c:d1:5e:1a:09: + 17:24:8d:7b:5d:95:e9:ab:c1:60:ab:5b:18:64:80:fb:ad:e0: + 06:7d:1d:ca:59:b8:f3:78:29:67:c6:56:1d:af:b6:b5:74:2a: + 76:a1:3f:fb:75:30:9f:94:5e:3b:a5:60:f3:cb:5c:0c:e2:0e: + c9:60:f8:c9:1f:16:8a:26:dd:e7:27:7f:eb:25:a6:8a:bd:b8: + 2d:36:10:9a:b1:58:4d:9a:68:4f:60:54:e5:f6:46:13:8e:88: + ac:bc:21:42:12:ad:c6:4a:89:7d:9b:c1:d8:2d:e9:96:03:f4: + a2:74:0c:bc:00:1d:bf:d6:37:25:67:b4:72:8b:af:85:bd:ea: + 2a:03:8f:cc:fb:3c:44:24:82:e2:01:a5:0b:59:b6:34:8d:32: + 0b:12:0d:eb:27:c2:fd:41:d7:40:3c:72:46:29:c0:8c:ea:ba: + 0f:f1:06:93:2e:f7:9c:a8:f4:60:3e:a3:f1:38:5e:8e:13:c1: + b3:3a:97:87:3f:92:ca:78:a9:1c:af:d0:b0:1b:26:1e:be:70: + ec:7a:f5:33:98:ea:5c:ff:2b:0b:04:4e:43:dd:63:7e:0e:a7: + 4e:78:03:95:3e:d4:2d:30:95:11:10:28:2e:bf:a0:02:3e:ff: + 5e:59:d3:05:0e:95:5f:53:45:ef:6b:87:d5:48:cd:16:a6:96: + 83:e1:df:b3:06:f3:c1:14:db:a7:ec:1c:8b:5d:90:90:0d:72: + 51:e7:61:f9:14:ca:af:83:8f:bf:af:b1:0a:59:5d:dc:5c:d7: + e4:96:ad:5b:60:1d:da:ae:97:b2:39:d9:06:f5:76:00:13:f8: + 68:4c:21:b0:35:c4:dc:55:b2:c9:c1:41:5a:1c:89:c0:8c:6f: + 74:a0:6b:33:4d:b5:01:28:fd:ad:ad:89:17:3b:a6:9a:84:bc: + eb:8c:ea:c4:71:24:a8:ba:29:f9:08:b2:27:56:35:32:5f:ea: + 39:fb:31:9a:d5:19:cc:f0 +SHA1 Fingerprint=6D:0A:5F:F7:B4:23:06:B4:85:B3:B7:97:64:FC:AC:75:F5:33:F2:93 +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIUPgNJgXUWdDGOTKvVxZAplsU5EN0wDQYJKoZIhvcNAQEL +BQAwTjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwi +Q29tbVNjb3BlIFB1YmxpYyBUcnVzdCBSU0EgUm9vdC0wMTAeFw0yMTA0MjgxNjQ1 +NTRaFw00NjA0MjgxNjQ1NTNaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21t +U2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgUlNBIFJvb3Qt +MDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwSGWjDR1C45FtnYSk +YZYSwu3D2iM0GXb26v1VWvZVAVMP8syMl0+5UMuzAURWlv2bKOx7dAvnQmtVzslh +suitQDy6uUEKBU8bJoWPQ7VAtYXR1HHcg0Hz9kXHgKKEUJdGzqAMxGBWBB0HW0al +DrJLpA6lfO741GIDuZNqihS4cPgugkY4Iw50x2tBt9Apo52AsH53k2NC+zSDO3Oj +WiE260f6GBfZumbCk6SP/F2krfxQapWsvCQz0b2If4b19bJzKo98rwjyGpg/qYFl +P8GMicWWMJoKz/TUyDTtnS+8jTiGU+6Xn6myY5QXjQ/cZip8UlF1y5mO6D1cv547 +KI2DAg+pn3LiLCuz3GaXAEDQpFSOm117RTYm1nJD68/A6g3czhLmfTifBSeolz7p +UcZsBSjBAg/pGG3svZwG1KdJ9FQFa2ww8esD1eo9anbCyxooSU1/ZOD6K9pzg4H/ +kQO9lLvkuI6cMmPNn7togbGEW682v3fuHX/3SZtS7NJ3Wn2RnU3COS3kuoL4b/JO +Hg9O5j9ZpSPcPYeoKFgo0fEbNttPxP/hjFtyjMcmAyejOQoBqsCyMWCDIqFPEgkB +Ea801M/XrmLTBQe0MXXgDW1XT2mH+VepuhX2yFJtocucH+X8eKg1mp9BFM6ltM6U +CBwJrVbl2rZJmkrqYxhTnCwuwwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G +A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUN12mmnQywsL5x6YVEFm45P3luG0wDQYJ +KoZIhvcNAQELBQADggIBAK+nz97/4L1CjU3lIpbfaOp9TSp90K09FlxD533Ahuh6 +NWPxzIHIxgvoLlI1pKZJkGNRrDSsBTtXAOnTYtPZKdVUvhwQkZyybf5Z/Xn36lbQ +nmhUQo8mUuJM3y+Xpi/SB5io82BdS5pYV4jvguX6r2yBS5KPQJqTRlnLX3gWsWc+ +QgvfKNmwrZggvkN80V4aCRckjXtdlemrwWCrWxhkgPut4AZ9HcpZuPN4KWfGVh2v +trV0KnahP/t1MJ+UXjulYPPLXAziDslg+MkfFoom3ecnf+slpoq9uC02EJqxWE2a +aE9gVOX2RhOOiKy8IUISrcZKiX2bwdgt6ZYD9KJ0DLwAHb/WNyVntHKLr4W96ioD +j8z7PEQkguIBpQtZtjSNMgsSDesnwv1B10A8ckYpwIzqug/xBpMu95yo9GA+o/E4 +Xo4TwbM6l4c/ksp4qRyv0LAbJh6+cOx69TOY6lz/KwsETkPdY34Op054A5U+1C0w +lREQKC6/oAI+/15Z0wUOlV9TRe9rh9VIzRamloPh37MG88EU26fsHItdkJANclHn +YfkUyq+Dj7+vsQpZXdxc1+SWrVtgHdqul7I52Qb1dgAT+GhMIbA1xNxVssnBQVoc +icCMb3SgazNNtQEo/a2tiRc7ppqEvOuM6sRxJKi6KfkIsidWNTJf6jn7MZrVGczw +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/CommScope_Public_Trust_RSA_Root-02.pem b/secure/caroot/trusted/CommScope_Public_Trust_RSA_Root-02.pem new file mode 100644 index 000000000000..b343c7765878 --- /dev/null +++ b/secure/caroot/trusted/CommScope_Public_Trust_RSA_Root-02.pem @@ -0,0 +1,134 @@ +## +## CommScope Public Trust RSA Root-02 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 54:16:bf:3b:7e:39:95:71:8d:d1:aa:00:a5:86:0d:2b:8f:7a:05:4e + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = US, O = CommScope, CN = CommScope Public Trust RSA Root-02 + Validity + Not Before: Apr 28 17:16:43 2021 GMT + Not After : Apr 28 17:16:42 2046 GMT + Subject: C = US, O = CommScope, CN = CommScope Public Trust RSA Root-02 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (4096 bit) + Modulus: + 00:e1:fa:0e:fb:68:00:12:c8:4d:d5:ac:22:c4:35: + 01:3b:c5:54:e5:59:76:63:a5:7f:eb:c1:c4:6a:98: + bd:32:8d:17:80:eb:5d:ba:d1:62:3d:25:23:19:35: + 14:e9:7f:89:a7:1b:62:3c:d6:50:e7:34:95:03:32: + b1:b4:93:22:3d:a7:e2:b1:ed:e6:7b:4e:2e:87:9b: + 0d:33:75:0a:de:aa:35:e7:7e:e5:36:98:a2:ae:25: + 9e:95:b3:32:96:a4:2b:58:1e:ef:3f:fe:62:34:48: + 51:d1:b4:8d:42:ad:60:da:49:6a:95:70:dd:d2:00: + e2:cc:57:63:02:7b:96:dd:49:97:5b:92:4e:95:d3: + f9:cb:29:1f:18:4a:f8:01:2a:d2:63:09:6e:24:e9: + 89:d2:e5:c7:22:4c:dc:73:86:47:00:aa:0d:88:8e: + ae:85:7d:4a:e9:bb:33:4f:0e:52:70:9d:95:e3:7c: + 6d:96:5b:2d:3d:5f:a1:83:46:5d:b6:e3:25:b8:7c: + a7:19:80:1c:ea:65:43:dc:91:79:36:2c:74:7c:f2: + 67:06:c9:89:c9:db:bf:da:68:bf:23:ed:dc:6b:ad: + 28:83:79:2f:ec:38:a5:0d:37:01:67:27:9a:e9:33: + d9:33:5f:37:a1:c5:f0:ab:3d:fa:78:b0:e7:2c:9f: + f6:3e:9f:60:e0:ef:48:e9:90:45:1e:05:51:78:1a: + 2c:12:2c:5c:28:ac:0d:a2:23:9e:34:8f:05:e6:a2: + 33:ce:11:77:13:d4:0e:a4:1e:42:1f:86:cd:70:fe: + d9:2e:15:3d:1d:bb:b8:f2:53:57:db:cc:c6:74:29: + 9c:18:b3:36:75:38:2e:0f:54:a1:f8:92:1f:89:96: + 4f:bb:d4:ee:9d:e9:3b:36:42:b5:0a:3b:2a:d4:64: + 79:36:10:e1:f9:91:03:2b:7b:20:54:cd:0d:19:1a: + c8:41:32:34:d1:b0:99:e1:90:1e:01:40:36:b5:b7: + fa:a9:e5:77:75:a4:22:81:5d:b0:8b:e4:27:12:0f: + 54:88:c6:db:85:74:e6:b7:c0:d7:a6:29:fa:db:de: + f3:93:97:27:04:55:2f:0a:6f:37:c5:3d:13:af:0a: + 00:a9:2c:8b:1c:81:28:d7:ef:86:31:a9:ae:f2:6e: + b8:ca:6a:2c:54:47:d8:2a:88:2e:af:c1:07:10:78: + ac:11:a2:2f:42:f0:37:c5:f2:b8:56:dd:0e:62:2d: + ce:2d:56:7e:55:f2:a7:44:f6:2b:32:f4:23:a8:47: + e8:d4:2a:01:78:cf:6a:c3:37:a8:9e:65:d2:2c:e5: + fa:ba:33:c1:06:44:f6:e6:cf:a5:0d:a7:66:08:34: + 8a:2c:f3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 47:D0:E7:B1:22:FF:9D:2C:F5:D9:57:60:B3:B1:B1:70:95:EF:61:7A + Signature Algorithm: sha256WithRSAEncryption + Signature Value: + 86:69:b1:4d:2f:e9:9f:4f:22:93:68:8e:e4:21:99:a3:ce:45: + 53:1b:73:44:53:00:81:61:cd:31:e3:08:ba:81:28:28:7a:92: + b9:b6:a8:c8:43:9e:c7:13:26:4d:c2:d8:e5:55:9c:92:5d:50: + d8:c2:2b:db:fe:e6:a8:97:cf:52:3a:24:c3:65:64:5c:47:31: + a3:65:35:13:c3:93:b9:f7:f9:51:97:bb:a4:f0:62:87:c5:d6: + 06:d3:97:83:20:a9:7e:bb:b6:21:c2:a5:0d:84:00:e1:f2:27: + 10:83:ba:dd:03:81:d5:dd:68:c3:66:10:c8:d1:76:b4:b3:6f: + 29:9e:00:f9:c2:29:f5:b1:93:19:52:69:1a:2c:4c:a0:8b:e0: + 15:9a:31:2f:d3:88:95:59:6e:e5:c4:b3:50:c8:14:08:4a:9b: + 8b:13:83:b1:a4:72:b2:3b:76:33:41:dc:dc:aa:a6:07:6f:1d: + 24:12:9f:c8:76:bd:2f:d9:8e:f4:2c:ee:b7:d2:38:10:24:36: + 51:2f:e3:5c:5d:81:21:a7:da:bb:4e:ff:e6:07:a8:fe:b9:0d: + 27:6c:bb:70:5a:55:7a:13:e9:f1:2a:49:69:c7:5f:87:57:4c: + 43:79:6d:3a:65:e9:30:5c:41:ee:eb:77:a5:73:12:88:e8:bf: + 7d:ae:e5:c4:a8:1f:0d:8e:1c:6d:50:02:4f:26:18:43:de:8f: + 55:85:b1:0b:37:05:60:c9:55:39:12:04:a1:2a:cf:71:16:9f: + 36:51:49:bf:70:3b:9e:67:9c:fb:7b:79:c9:39:1c:78:ac:77: + 91:54:9a:b8:75:0a:81:52:97:e3:66:61:6b:ed:3e:38:1e:96: + 61:55:e1:91:54:8c:ed:8c:24:1f:81:c9:10:9a:73:99:2b:16: + 4e:72:00:3f:54:1b:f8:8d:ba:8b:e7:14:d6:b6:45:4f:60:ec: + 96:ae:c3:2f:02:4e:5d:9d:96:49:72:00:b2:ab:75:5c:0f:68: + 5b:1d:65:c2:5f:33:0f:1e:0f:f0:3b:86:f5:b0:4e:bb:9c:f7: + ea:25:05:dc:ad:a2:9b:4b:17:01:be:42:df:35:21:1d:ad:ab: + ae:f4:bf:ae:1f:1b:d3:e2:3b:fc:b3:72:73:1c:9b:28:90:89: + 13:3d:1d:c1:00:47:09:96:9a:38:1b:dd:b1:cf:0d:c2:b4:44: + f3:96:95:ce:32:3a:8f:34:9c:e0:17:c7:5e:ce:ae:0d:db:87: + 38:e5:3f:5b:fd:9b:19:e1:31:41:7a:70:aa:23:6b:01:e1:45: + 4c:cd:94:ce:3b:9e:2d:e7:88:02:22:f4:6e:e8:c8:ec:d6:3c: + f3:b9:b2:d7:77:7a:ac:7b +SHA1 Fingerprint=EA:B0:E2:52:1B:89:93:4C:11:68:F2:D8:9A:AC:22:4C:A3:8A:57:AE +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIUVBa/O345lXGN0aoApYYNK496BU4wDQYJKoZIhvcNAQEL +BQAwTjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwi +Q29tbVNjb3BlIFB1YmxpYyBUcnVzdCBSU0EgUm9vdC0wMjAeFw0yMTA0MjgxNzE2 +NDNaFw00NjA0MjgxNzE2NDJaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21t +U2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgUlNBIFJvb3Qt +MDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDh+g77aAASyE3VrCLE +NQE7xVTlWXZjpX/rwcRqmL0yjReA61260WI9JSMZNRTpf4mnG2I81lDnNJUDMrG0 +kyI9p+Kx7eZ7Ti6Hmw0zdQreqjXnfuU2mKKuJZ6VszKWpCtYHu8//mI0SFHRtI1C +rWDaSWqVcN3SAOLMV2MCe5bdSZdbkk6V0/nLKR8YSvgBKtJjCW4k6YnS5cciTNxz +hkcAqg2Ijq6FfUrpuzNPDlJwnZXjfG2WWy09X6GDRl224yW4fKcZgBzqZUPckXk2 +LHR88mcGyYnJ27/aaL8j7dxrrSiDeS/sOKUNNwFnJ5rpM9kzXzehxfCrPfp4sOcs +n/Y+n2Dg70jpkEUeBVF4GiwSLFworA2iI540jwXmojPOEXcT1A6kHkIfhs1w/tku +FT0du7jyU1fbzMZ0KZwYszZ1OC4PVKH4kh+Jlk+71O6d6Ts2QrUKOyrUZHk2EOH5 +kQMreyBUzQ0ZGshBMjTRsJnhkB4BQDa1t/qp5Xd1pCKBXbCL5CcSD1SIxtuFdOa3 +wNemKfrb3vOTlycEVS8KbzfFPROvCgCpLIscgSjX74Yxqa7ybrjKaixUR9gqiC6v +wQcQeKwRoi9C8DfF8rhW3Q5iLc4tVn5V8qdE9isy9COoR+jUKgF4z2rDN6ieZdIs +5fq6M8EGRPbmz6UNp2YINIos8wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G +A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUR9DnsSL/nSz12Vdgs7GxcJXvYXowDQYJ +KoZIhvcNAQELBQADggIBAIZpsU0v6Z9PIpNojuQhmaPORVMbc0RTAIFhzTHjCLqB +KCh6krm2qMhDnscTJk3C2OVVnJJdUNjCK9v+5qiXz1I6JMNlZFxHMaNlNRPDk7n3 ++VGXu6TwYofF1gbTl4MgqX67tiHCpQ2EAOHyJxCDut0DgdXdaMNmEMjRdrSzbyme +APnCKfWxkxlSaRosTKCL4BWaMS/TiJVZbuXEs1DIFAhKm4sTg7GkcrI7djNB3Nyq +pgdvHSQSn8h2vS/ZjvQs7rfSOBAkNlEv41xdgSGn2rtO/+YHqP65DSdsu3BaVXoT +6fEqSWnHX4dXTEN5bTpl6TBcQe7rd6VzEojov32u5cSoHw2OHG1QAk8mGEPej1WF +sQs3BWDJVTkSBKEqz3EWnzZRSb9wO55nnPt7eck5HHisd5FUmrh1CoFSl+NmYWvt +PjgelmFV4ZFUjO2MJB+ByRCac5krFk5yAD9UG/iNuovnFNa2RU9g7Jauwy8CTl2d +lklyALKrdVwPaFsdZcJfMw8eD/A7hvWwTruc9+olBdytoptLFwG+Qt81IR2tq670 +v64fG9PiO/yzcnMcmyiQiRM9HcEARwmWmjgb3bHPDcK0RPOWlc4yOo80nOAXx17O +rg3bhzjlP1v9mxnhMUF6cKojawHhRUzNlM47ni3niAIi9G7oyOzWPPO5std3eqx7 +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Telekom_Security_TLS_ECC_Root_2020.pem b/secure/caroot/trusted/Telekom_Security_TLS_ECC_Root_2020.pem new file mode 100644 index 000000000000..da5285d26633 --- /dev/null +++ b/secure/caroot/trusted/Telekom_Security_TLS_ECC_Root_2020.pem @@ -0,0 +1,68 @@ +## +## Telekom Security TLS ECC Root 2020 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 36:3a:96:8c:c9:5c:b2:58:cd:d0:01:5d:c5:e5:57:00 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = DE, O = Deutsche Telekom Security GmbH, CN = Telekom Security TLS ECC Root 2020 + Validity + Not Before: Aug 25 07:48:20 2020 GMT + Not After : Aug 25 23:59:59 2045 GMT + Subject: C = DE, O = Deutsche Telekom Security GmbH, CN = Telekom Security TLS ECC Root 2020 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:ce:bf:fe:57:a8:bf:d5:aa:f7:10:9a:cd:bc:d1: + 11:a2:bd:67:42:cc:90:eb:15:18:90:d9:a2:cd:0c: + 2a:25:eb:3e:4f:ce:b5:d2:8f:0f:f3:35:da:43:8b: + 02:80:be:6f:51:24:1d:0f:6b:2b:ca:9f:c2:6f:50: + 32:e5:37:20:b6:20:ff:88:0d:0f:6d:49:bb:db:06: + a4:87:90:92:94:f4:09:d0:cf:7f:c8:80:0b:c1:97: + b3:bb:35:27:c9:c2:1b + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Subject Key Identifier: + E3:72:CC:6E:95:99:47:B1:E6:B3:61:4C:D1:CB:AB:E3:BA:CD:DE:9F + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA384 + Signature Value: + 30:64:02:30:75:52:8b:b7:a4:10:4f:ae:4a:10:8b:b2:84:5b: + 42:e1:e6:2a:36:02:da:a0:6e:19:3f:25:bf:da:59:32:8e:e4: + fb:90:dc:93:64:ce:ad:b4:41:47:60:e2:cf:a7:cb:1e:02:30: + 37:41:8c:66:df:41:6b:d6:83:00:41:fd:2f:5a:f7:50:b4:67: + d1:2c:a8:71:d7:43:ca:9c:27:24:91:83:48:0d:cf:cd:f7:54: + 81:af:ec:7f:e4:67:db:b8:90:ee:dd:25 +SHA1 Fingerprint=C0:F8:96:C5:A9:3B:01:06:21:07:DA:18:42:48:BC:E9:9D:88:D5:EC +-----BEGIN CERTIFICATE----- +MIICQjCCAcmgAwIBAgIQNjqWjMlcsljN0AFdxeVXADAKBggqhkjOPQQDAzBjMQsw +CQYDVQQGEwJERTEnMCUGA1UECgweRGV1dHNjaGUgVGVsZWtvbSBTZWN1cml0eSBH +bWJIMSswKQYDVQQDDCJUZWxla29tIFNlY3VyaXR5IFRMUyBFQ0MgUm9vdCAyMDIw +MB4XDTIwMDgyNTA3NDgyMFoXDTQ1MDgyNTIzNTk1OVowYzELMAkGA1UEBhMCREUx +JzAlBgNVBAoMHkRldXRzY2hlIFRlbGVrb20gU2VjdXJpdHkgR21iSDErMCkGA1UE +AwwiVGVsZWtvbSBTZWN1cml0eSBUTFMgRUNDIFJvb3QgMjAyMDB2MBAGByqGSM49 +AgEGBSuBBAAiA2IABM6//leov9Wq9xCazbzREaK9Z0LMkOsVGJDZos0MKiXrPk/O +tdKPD/M12kOLAoC+b1EkHQ9rK8qfwm9QMuU3ILYg/4gND21Ju9sGpIeQkpT0CdDP +f8iAC8GXs7s1J8nCG6NCMEAwHQYDVR0OBBYEFONyzG6VmUex5rNhTNHLq+O6zd6f +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2cA +MGQCMHVSi7ekEE+uShCLsoRbQuHmKjYC2qBuGT8lv9pZMo7k+5Dck2TOrbRBR2Di +z6fLHgIwN0GMZt9Ba9aDAEH9L1r3ULRn0SyocddDypwnJJGDSA3PzfdUga/sf+Rn +27iQ7t0l +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Telekom_Security_TLS_RSA_Root_2023.pem b/secure/caroot/trusted/Telekom_Security_TLS_RSA_Root_2023.pem new file mode 100644 index 000000000000..69bbcdd0e322 --- /dev/null +++ b/secure/caroot/trusted/Telekom_Security_TLS_RSA_Root_2023.pem @@ -0,0 +1,138 @@ +## +## Telekom Security TLS RSA Root 2023 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 21:9c:54:2d:e8:f6:ec:71:77:fa:4e:e8:c3:70:57:97 + Signature Algorithm: sha384WithRSAEncryption + Issuer: C = DE, O = Deutsche Telekom Security GmbH, CN = Telekom Security TLS RSA Root 2023 + Validity + Not Before: Mar 28 12:16:45 2023 GMT + Not After : Mar 27 23:59:59 2048 GMT + Subject: C = DE, O = Deutsche Telekom Security GmbH, CN = Telekom Security TLS RSA Root 2023 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (4096 bit) + Modulus: + 00:ed:35:a1:81:80:f3:cb:4a:69:5b:c2:fb:51:83: + ae:26:fd:e1:6e:f3:81:12:7d:71:40:ff:87:75:42: + 29:21:ed:81:52:2c:df:12:c1:19:84:89:c1:bd:c5: + 28:d5:d5:4b:6c:44:d6:4c:db:07:96:4a:55:7a:ca: + 36:82:04:36:a8:a5:fc:27:f6:49:f1:d5:72:9e:91: + f9:23:d6:70:7b:bb:f5:9b:c1:ec:93:cf:19:ea:65: + 7e:88:70:a0:73:fc:f6:ff:b5:56:62:e1:73:6a:34: + 98:3e:82:b8:ac:95:53:f4:01:a0:27:07:72:a3:00: + 53:a0:e4:b2:ab:83:38:57:33:25:94:9f:be:48:1d: + 98:e1:a3:ba:9e:5c:cd:04:71:51:7d:75:78:ab:f3: + 59:aa:c4:e0:60:be:8f:83:52:b8:75:1a:41:35:ed: + bc:f3:3a:63:e9:a9:14:45:d7:e6:52:d1:6e:d2:de: + bc:e3:f5:0b:3b:e6:e0:c4:bd:43:64:13:a6:ce:f4: + 98:37:6c:8a:95:a8:97:c8:47:0f:f0:5e:10:8b:e7: + 1d:1c:fe:b1:3b:a0:05:33:68:05:41:82:c1:03:2b: + 01:c8:e7:8f:4d:ab:e8:b5:f6:cd:6b:44:b5:e7:dd: + 8b:ec:ea:25:b4:00:22:57:4d:b0:b1:b2:31:c1:16: + ce:ff:fd:14:84:b7:47:fa:b2:f1:70:de:db:8b:6c: + 36:58:a4:7c:b3:11:d1:c3:77:7f:5f:b6:25:e0:0d: + c5:d2:b3:f9:b8:b8:77:db:37:71:71:47:e3:60:18: + 4f:24:b6:75:37:78:b9:a3:62:af:bd:c9:72:8e:2f: + cc:bb:ae:db:e4:15:52:19:07:33:fb:6a:b7:2d:4b: + 90:28:82:73:fe:18:8b:35:8d:db:a7:04:6a:be:ea: + c1:4d:36:3b:16:36:91:32:ef:b6:40:89:91:43:e0: + f2:a2:ab:04:2e:e6:f2:4c:0e:16:34:20:ac:87:c1: + 2d:7e:c9:66:47:17:14:11:a4:f3:f7:a1:24:89:ab: + d8:1a:c8:a1:5c:b1:a3:f7:8c:6d:c8:01:c9:4f:c9: + ec:c4:fc:ac:51:33:d1:c8:83:d1:c9:9f:1d:d4:47: + 34:29:3e:cb:b0:0e:fa:83:0b:28:58:e5:29:dc:3f: + 7c:a8:9f:c9:b6:0a:bb:a6:e8:46:16:0f:96:e5:7b: + e4:6a:7a:48:6d:76:98:05:a5:dc:6d:1e:42:1e:42: + da:1a:e0:52:f7:b5:83:c0:1a:7b:78:35:2c:38:f5: + 1f:fd:49:a3:2e:d2:59:63:bf:80:b0:8c:93:73:cb: + 35:a6:99:95:22:61:65:03:60:fb:2f:93:4b:fa:9a: + 9c:80:3b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + B6:A7:97:82:3D:74:85:9B:F7:3C:9F:93:9A:95:79:75:52:8C:6D:47 + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + B6:A7:97:82:3D:74:85:9B:F7:3C:9F:93:9A:95:79:75:52:8C:6D:47 + Signature Algorithm: sha384WithRSAEncryption + Signature Value: + a8:cc:61:a6:be:75:9e:15:50:a4:6b:fb:a8:70:45:7c:ba:7e: + b1:5a:fc:5b:23:fa:0a:77:f8:98:71:82:0c:6d:e0:5e:46:aa: + 93:f4:1e:a0:c3:e1:93:db:4b:ad:b2:a6:5d:ab:b0:d4:62:cb: + 5e:bb:66:f5:2d:ee:97:40:3c:62:eb:5e:d6:14:d6:8c:e2:96: + 8b:41:69:93:35:e6:b9:99:6b:62:b4:a1:17:66:34:a6:6b:63: + c6:b9:4e:f2:22:e9:58:0d:56:41:d1:fa:0c:4a:f0:33:cd:3b: + bb:6d:21:3a:ae:8e:72:b5:c3:4a:fb:e9:7d:e5:b1:9b:86:ee: + e2:e0:7d:b4:f7:32:fd:22:84:f1:85:c9:37:79:e9:b5:3f:bf: + 5c:e4:74:b2:8f:11:62:00:dd:18:66:a1:d9:7b:23:5f:f1:8e: + d5:67:e8:54:da:5b:3a:6b:36:6f:f9:81:b1:33:47:33:77:40: + f9:52:aa:dd:d4:83:cf:85:78:99:9a:93:b9:73:67:42:46:11: + 21:ea:fe:0a:a9:1b:1a:65:69:b3:8f:ae:16:b6:f6:4b:56:b2: + 2d:f9:a5:c8:ec:3b:62:a3:ed:6b:d0:4e:d5:40:09:a4:1f:98: + d7:3a:a5:92:59:20:e4:b0:7d:cd:5b:73:68:bd:6d:c4:a2:13: + 0e:67:19:b8:8d:42:7e:6c:0c:9a:6e:a0:24:2d:d5:45:1b:dc: + c4:02:14:fe:85:5b:65:97:ca:4e:90:50:08:7a:42:35:f9:ea: + c2:66:d4:f8:01:ae:1e:b4:be:c3:a8:ef:fe:76:9a:a2:a6:1f: + 46:f6:84:ed:fc:db:ce:c4:02:ce:77:48:2c:8c:b2:ec:c3:00: + a3:ec:2c:55:18:c1:7e:19:ee:e1:2f:f2:ad:83:9b:9e:ab:19: + df:c6:8a:2f:8c:77:e5:b7:05:ec:3b:c1:ec:be:86:b3:86:bc: + c0:f7:dc:e7:ea:5b:ae:b2:cc:b5:35:86:4b:d0:e2:3f:b6:d8: + f8:0e:00:ee:5d:e3:f7:8d:58:ff:cf:8b:37:e9:63:5f:6e:f7: + 09:71:36:c2:12:5d:57:f2:c8:b4:cd:f3:ee:02:df:11:dc:6a: + b9:57:84:1d:59:4d:8c:ce:c8:0e:23:c2:b7:26:9a:10:14:71: + fe:93:b2:8a:b8:80:f0:0e:10:9e:d3:a8:50:0c:37:82:2f:ea: + e0:8a:9d:e1:2c:39:ff:b5:b4:73:00:e4:f7:48:a6:73:ac:bf: + b2:de:77:04:87:b4:a3:cd:9b:35:24:37:fa:90:93:13:81:42: + c6:98:26:75:37:66:41:10:ac:bb:f5:94:e3:c2:31:2b:ad:e7: + 23:56:cc:35:25:92:b3:50 +SHA1 Fingerprint=54:D3:AC:B3:BD:57:56:F6:85:9D:CE:E5:C3:21:E2:D4:AD:83:D0:93 +-----BEGIN CERTIFICATE----- +MIIFszCCA5ugAwIBAgIQIZxULej27HF3+k7ow3BXlzANBgkqhkiG9w0BAQwFADBj +MQswCQYDVQQGEwJERTEnMCUGA1UECgweRGV1dHNjaGUgVGVsZWtvbSBTZWN1cml0 +eSBHbWJIMSswKQYDVQQDDCJUZWxla29tIFNlY3VyaXR5IFRMUyBSU0EgUm9vdCAy +MDIzMB4XDTIzMDMyODEyMTY0NVoXDTQ4MDMyNzIzNTk1OVowYzELMAkGA1UEBhMC +REUxJzAlBgNVBAoMHkRldXRzY2hlIFRlbGVrb20gU2VjdXJpdHkgR21iSDErMCkG +A1UEAwwiVGVsZWtvbSBTZWN1cml0eSBUTFMgUlNBIFJvb3QgMjAyMzCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAO01oYGA88tKaVvC+1GDrib94W7zgRJ9 +cUD/h3VCKSHtgVIs3xLBGYSJwb3FKNXVS2xE1kzbB5ZKVXrKNoIENqil/Cf2SfHV +cp6R+SPWcHu79ZvB7JPPGeplfohwoHP89v+1VmLhc2o0mD6CuKyVU/QBoCcHcqMA +U6DksquDOFczJZSfvkgdmOGjup5czQRxUX11eKvzWarE4GC+j4NSuHUaQTXtvPM6 +Y+mpFEXX5lLRbtLevOP1Czvm4MS9Q2QTps70mDdsipWol8hHD/BeEIvnHRz+sTug +BTNoBUGCwQMrAcjnj02r6LX2zWtEtefdi+zqJbQAIldNsLGyMcEWzv/9FIS3R/qy +8XDe24tsNlikfLMR0cN3f1+2JeANxdKz+bi4d9s3cXFH42AYTyS2dTd4uaNir73J +co4vzLuu2+QVUhkHM/tqty1LkCiCc/4YizWN26cEar7qwU02OxY2kTLvtkCJkUPg +8qKrBC7m8kwOFjQgrIfBLX7JZkcXFBGk8/ehJImr2BrIoVyxo/eMbcgByU/J7MT8 +rFEz0ciD0cmfHdRHNCk+y7AO+oMLKFjlKdw/fKifybYKu6boRhYPluV75Gp6SG12 +mAWl3G0eQh5C2hrgUve1g8Aae3g1LDj1H/1Joy7SWWO/gLCMk3PLNaaZlSJhZQNg ++y+TS/qanIA7AgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtqeX +gj10hZv3PJ+TmpV5dVKMbUcwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS2 +p5eCPXSFm/c8n5OalXl1UoxtRzANBgkqhkiG9w0BAQwFAAOCAgEAqMxhpr51nhVQ +pGv7qHBFfLp+sVr8WyP6Cnf4mHGCDG3gXkaqk/QeoMPhk9tLrbKmXauw1GLLXrtm +9S3ul0A8Yute1hTWjOKWi0FpkzXmuZlrYrShF2Y0pmtjxrlO8iLpWA1WQdH6DErw +M807u20hOq6OcrXDSvvpfeWxm4bu4uB9tPcy/SKE8YXJN3nptT+/XOR0so8RYgDd +GGah2XsjX/GO1WfoVNpbOms2b/mBsTNHM3dA+VKq3dSDz4V4mZqTuXNnQkYRIer+ +CqkbGmVps4+uFrb2S1ayLfmlyOw7YqPta9BO1UAJpB+Y1zqlklkg5LB9zVtzaL1t +xKITDmcZuI1CfmwMmm6gJC3VRRvcxAIU/oVbZZfKTpBQCHpCNfnqwmbU+AGuHrS+ +w6jv/naaoqYfRvaE7fzbzsQCzndILIyy7MMAo+wsVRjBfhnu4S/yrYObnqsZ38aK +L4x35bcF7DvB7L6Gs4a8wPfc5+pbrrLMtTWGS9DiP7bY+A4A7l3j941Y/8+LN+lj +X273CXE2whJdV/LItM3z7gLfEdxquVeEHVlNjM7IDiPCtyaaEBRx/pOyiriA8A4Q +ntOoUAw3gi/q4Iqd4Sw5/7W0cwDk90imc6y/st53BIe0o82bNSQ3+pCTE4FCxpgm +dTdmQRCsu/WU48IxK63nI1bMNSWSs1A= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/TrustAsia_Global_Root_CA_G3.pem b/secure/caroot/trusted/TrustAsia_Global_Root_CA_G3.pem new file mode 100644 index 000000000000..72e8d614f96a --- /dev/null +++ b/secure/caroot/trusted/TrustAsia_Global_Root_CA_G3.pem @@ -0,0 +1,138 @@ +## +## TrustAsia Global Root CA G3 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 64:f6:0e:65:77:61:6a:ab:3b:b4:ea:85:84:bb:b1:89:b8:71:93:0f + Signature Algorithm: sha384WithRSAEncryption + Issuer: C = CN, O = "TrustAsia Technologies, Inc.", CN = TrustAsia Global Root CA G3 + Validity + Not Before: May 20 02:10:19 2021 GMT + Not After : May 19 02:10:19 2046 GMT + Subject: C = CN, O = "TrustAsia Technologies, Inc.", CN = TrustAsia Global Root CA G3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (4096 bit) + Modulus: + 00:c0:31:82:61:92:e4:94:1b:0a:2a:65:d0:be:06: + a9:87:3b:51:12:ea:70:41:ae:e2:fb:74:ea:0a:8d: + b9:b3:4c:dc:8f:b7:13:52:4f:54:18:e1:2c:73:95: + 91:c5:66:3b:6a:cf:ac:63:6d:87:53:f0:f7:f1:39: + b7:a0:43:63:b0:c4:03:5d:57:a9:e7:44:ce:c4:a1: + 83:65:f6:50:3e:b1:7e:16:b8:3a:8a:02:d0:96:1f: + 00:cd:05:21:ef:06:6d:dd:21:9c:19:43:45:a1:c5: + e8:80:ca:c2:ad:40:62:17:06:c6:aa:bc:f3:d6:e6: + fc:50:7e:66:42:1f:3c:8b:a6:79:79:86:40:35:9f: + 20:ef:3f:eb:8b:47:1f:8f:8e:c5:d4:8e:b6:2c:c9: + 44:04:e3:d4:43:75:3f:d5:3f:af:1c:cc:7e:46:5f: + ac:df:64:10:8a:ef:46:f0:90:f0:0f:2d:f4:88:0b: + b1:29:aa:af:85:aa:49:58:a8:bf:63:a0:38:91:e6: + b3:e6:77:68:c4:f9:2a:19:84:bb:0e:e1:f5:af:89: + ec:a5:2f:50:20:74:1e:12:41:73:1e:24:d9:ca:ce: + 2c:a1:59:35:c0:c8:1d:46:27:61:5a:8f:f9:4d:d3: + 72:79:66:1e:9f:15:90:21:2d:fd:ed:8b:56:70:03: + 4a:49:3e:7f:69:31:12:69:c7:1e:5c:ca:7a:13:8b: + e8:e6:f5:60:0f:cc:93:2c:84:7f:f1:fc:6a:fc:9b: + 47:9d:db:ad:88:3d:f3:76:75:33:d7:4b:a4:c8:8b: + f9:f5:43:58:4f:cb:c8:03:54:8f:a5:85:78:04:1a: + f3:73:f2:d7:87:1d:41:9f:e7:d8:17:ce:1a:9c:0f: + 4a:fc:dc:44:68:54:68:e2:41:3c:fe:2c:84:86:37: + 3c:cd:3f:2f:a2:db:e7:f7:54:03:5f:59:d3:f7:91: + 78:c7:8b:77:6a:16:e5:49:85:90:45:72:70:2f:91: + 5d:f8:3e:65:40:0b:19:99:c9:26:20:5a:68:c1:35: + bf:4f:a7:51:f1:d8:11:2b:5b:e0:9a:9e:28:3b:0a: + 3a:0a:1f:c1:81:e5:2e:f0:a6:b9:69:a5:88:94:e6: + 6b:13:7f:d1:64:3f:3d:9c:70:46:e5:a2:85:7b:58: + 84:27:dc:c4:80:3e:67:9a:9a:c7:9a:31:0e:30:ec: + e6:17:40:95:d9:45:ed:01:96:aa:bf:0c:f3:4b:d1: + 63:f7:13:58:c0:b8:f3:fa:67:dd:9b:7d:6d:4a:ff: + 32:4c:b5:25:3b:ff:1c:67:0f:85:22:59:05:91:91: + 41:77:81:d0:85:4c:87:10:71:ff:9e:43:1b:ae:95: + 75:2d:81 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + 40:E4:E4:F2:23:EF:38:CA:B0:AE:57:7F:F2:21:30:16:34:DB:BC:92 + X509v3 Subject Key Identifier: + 40:E4:E4:F2:23:EF:38:CA:B0:AE:57:7F:F2:21:30:16:34:DB:BC:92 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha384WithRSAEncryption + Signature Value: + 26:3b:51:e1:4d:38:f3:32:18:b4:b4:5e:e1:65:5e:c4:94:4f: + d4:a7:61:a3:f8:c0:cf:33:01:02:e9:c3:aa:35:0f:f1:94:13: + 77:77:35:9e:2d:56:51:44:6e:e1:c6:2e:28:1e:ff:da:ec:47: + cd:97:44:17:f7:e0:4c:c2:e1:7c:7c:32:7a:66:c8:5a:b6:5c: + 53:45:57:5a:45:d4:05:99:2f:2e:23:55:ee:63:68:df:d3:1b: + 78:a7:12:94:06:00:75:0d:72:84:e9:2e:bc:5a:6a:d5:de:2f: + 59:c7:a3:ec:d2:87:66:db:b7:54:b5:24:ab:f4:43:78:db:4b: + 04:c4:6f:dd:e6:3e:66:3e:29:f2:4b:68:71:22:87:a0:f8:b1: + 33:63:76:e3:0d:85:72:44:22:55:3f:1c:7c:e9:fc:b8:15:e8: + 52:fa:aa:3e:a3:21:39:35:74:89:a6:6a:c2:39:fa:78:cf:b6: + ac:e7:e7:d6:56:ff:23:92:2e:50:0b:a9:b5:07:33:f4:38:5f: + a4:49:a6:cb:65:70:76:e8:0a:85:80:4b:36:3d:33:f7:95:54: + 75:25:da:ac:c4:73:82:65:e9:52:f5:5c:fd:38:95:02:6a:69: + 30:c5:1c:0a:57:07:ae:22:a4:2c:f9:c5:41:b7:b8:ec:9f:4f: + 48:00:f9:01:04:55:cc:ac:f9:32:31:c4:75:95:06:a0:7f:d1: + 8d:27:dd:b3:a9:a4:72:87:fe:59:8b:9a:7a:74:16:dd:16:a5: + 62:29:eb:3a:96:dc:8b:a7:68:59:d3:eb:77:91:39:f8:d7:cb: + d9:8f:5f:5a:27:01:7d:5d:68:19:62:d8:c8:cd:f4:b7:72:47: + be:5b:97:ce:f2:ad:a2:99:93:ad:94:cb:93:f6:12:09:95:b6: + ab:d7:3b:d0:3f:11:cb:30:16:2e:79:80:e4:67:81:2d:5d:ed: + 70:78:b6:60:59:ac:e1:5d:45:63:8f:c8:df:72:68:5b:ea:1d: + b8:01:f1:7e:fb:e7:8a:b3:e3:54:a0:38:09:e0:3c:de:42:f2: + c2:ed:2e:9b:f3:1f:35:b6:36:d8:e3:80:a1:8b:cd:99:64:0f: + c2:aa:ab:b1:ca:f5:6f:9e:43:8d:84:54:99:b3:6e:c0:12:66: + d8:70:10:f1:06:35:33:43:a8:9c:2e:ba:14:31:ce:10:7f:1c: + 86:e3:8f:d2:d5:f8:77:ec:9b:ab:f1:2f:63:d9:42:5f:e0:67: + 81:64:91:f1:97:2f:fc:6e:26:f6:33:f8:d3:b5:f8:c4:62:ab: + 31:51:25:02:7a:f8:dd:6b:65:d5:6d:4d:30:c8:65:ba:68:14: + 65:ac:27:0b:74:8a:f2:87 +SHA1 Fingerprint=63:CF:B6:C1:27:2B:56:E4:88:8E:1C:23:9A:B6:2E:81:47:24:C3:C7 +-----BEGIN CERTIFICATE----- +MIIFpTCCA42gAwIBAgIUZPYOZXdhaqs7tOqFhLuxibhxkw8wDQYJKoZIhvcNAQEM +BQAwWjELMAkGA1UEBhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dp +ZXMsIEluYy4xJDAiBgNVBAMMG1RydXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHMzAe +Fw0yMTA1MjAwMjEwMTlaFw00NjA1MTkwMjEwMTlaMFoxCzAJBgNVBAYTAkNOMSUw +IwYDVQQKDBxUcnVzdEFzaWEgVGVjaG5vbG9naWVzLCBJbmMuMSQwIgYDVQQDDBtU +cnVzdEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDAMYJhkuSUGwoqZdC+BqmHO1ES6nBBruL7dOoKjbmzTNyPtxNS +T1QY4SxzlZHFZjtqz6xjbYdT8PfxObegQ2OwxANdV6nnRM7EoYNl9lA+sX4WuDqK +AtCWHwDNBSHvBm3dIZwZQ0WhxeiAysKtQGIXBsaqvPPW5vxQfmZCHzyLpnl5hkA1 +nyDvP+uLRx+PjsXUjrYsyUQE49RDdT/VP68czH5GX6zfZBCK70bwkPAPLfSIC7Ep +qq+FqklYqL9joDiR5rPmd2jE+SoZhLsO4fWvieylL1AgdB4SQXMeJNnKziyhWTXA +yB1GJ2Faj/lN03J5Zh6fFZAhLf3ti1ZwA0pJPn9pMRJpxx5cynoTi+jm9WAPzJMs +hH/x/Gr8m0ed262IPfN2dTPXS6TIi/n1Q1hPy8gDVI+lhXgEGvNz8teHHUGf59gX +zhqcD0r83ERoVGjiQTz+LISGNzzNPy+i2+f3VANfWdP3kXjHi3dqFuVJhZBFcnAv +kV34PmVACxmZySYgWmjBNb9Pp1Hx2BErW+Canig7CjoKH8GB5S7wprlppYiU5msT +f9FkPz2ccEblooV7WIQn3MSAPmeamseaMQ4w7OYXQJXZRe0Blqq/DPNL0WP3E1jA +uPP6Z92bfW1K/zJMtSU7/xxnD4UiWQWRkUF3gdCFTIcQcf+eQxuulXUtgQIDAQAB +o2MwYTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEDk5PIj7zjKsK5Xf/Ih +MBY027ySMB0GA1UdDgQWBBRA5OTyI+84yrCuV3/yITAWNNu8kjAOBgNVHQ8BAf8E +BAMCAQYwDQYJKoZIhvcNAQEMBQADggIBACY7UeFNOPMyGLS0XuFlXsSUT9SnYaP4 +wM8zAQLpw6o1D/GUE3d3NZ4tVlFEbuHGLige/9rsR82XRBf34EzC4Xx8MnpmyFq2 +XFNFV1pF1AWZLy4jVe5jaN/TG3inEpQGAHUNcoTpLrxaatXeL1nHo+zSh2bbt1S1 +JKv0Q3jbSwTEb93mPmY+KfJLaHEih6D4sTNjduMNhXJEIlU/HHzp/LgV6FL6qj6j +ITk1dImmasI5+njPtqzn59ZW/yOSLlALqbUHM/Q4X6RJpstlcHboCoWASzY9M/eV +VHUl2qzEc4Jl6VL1XP04lQJqaTDFHApXB64ipCz5xUG3uOyfT0gA+QEEVcys+TIx +xHWVBqB/0Y0n3bOppHKH/lmLmnp0Ft0WpWIp6zqW3IunaFnT63eROfjXy9mPX1on +AX1daBli2MjN9LdyR75bl87yraKZk62Uy5P2EgmVtqvXO9A/EcswFi55gORngS1d +7XB4tmBZrOFdRWOPyN9yaFvqHbgB8X7754qz41SgOAngPN5C8sLtLpvzHzW2Ntjj +gKGLzZlkD8Kqq7HK9W+eQ42EVJmzbsASZthwEPEGNTNDqJwuuhQxzhB/HIbjj9LV ++Hfsm6vxL2PZQl/gZ4FkkfGXL/xuJvYz+NO1+MRiqzFRJQJ6+N1rZdVtTTDIZbpo +FGWsJwt0ivKH +-----END CERTIFICATE----- *** 80 LINES SKIPPED *** From nobody Sun Feb 11 14:28:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXqhJ088Dz59pxp; Sun, 11 Feb 2024 14:28:32 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (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 4TXqhH4P5mz4VLZ; Sun, 11 Feb 2024 14:28:31 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-363ad0203c8so8761595ab.2; Sun, 11 Feb 2024 06:28:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707661709; x=1708266509; 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=mnK1Tlw46RpWr59jVqzTFhmndBgyxuEAclfcDhGaIPE=; b=pawTIHn7PJQy4ooVO8dntwxxUvDryKcsHn+3sRUreVDP+VqWxIG/+n2A8f+AD4l/DW B35MtcL3163Pf8b4+C83BjLUZfNMAHpa6QMgaf49m4XtJE7R1HhV0Tee1o8Fpnn5wHDm 8e6oehAJAJCtuXDZ/5nwIS/qbN0/SigTtzDfZo2gQb/iPbSlccxqb8qrB6i11CytTADT ahdOQR0vsUtcCfbSTQf6qwx+uq7L/3npIFmbmDOnYZ/NcRT+5YOK3/fq4MRp7b4Qsu4z 8F+lhUt5DimxgIW09Fjmf8qEZIyIpW2DCeyZ4r04kuJOWprVM+WdjO4iOCKDRsO7xcL7 LDpQ== X-Gm-Message-State: AOJu0Yw1UtYZe6HeJd9Kv7XwYlRhm6txIQTxSZVwrYEYCeqhwOw5OEdt RYcGT6dPT7Ria+4XlhwqRRmvFfsIPRAq7IpOKfvgkl6nX3xGf1ppvr59C5ipSr9raXCkhRlvB4q rfammS6U7/bLB5R14ojA92Z99EkWY0wh2XE4= X-Google-Smtp-Source: AGHT+IGwl8NB8kzmphziZr+QAkf3mJNT9+2HWF1CBQ247sy6xOrT3M9Am54Wln9neQpk87Fdc3b7EC+7cWhSNKfZVfo= X-Received: by 2002:a92:d9c5:0:b0:363:cbb8:53c7 with SMTP id n5-20020a92d9c5000000b00363cbb853c7mr4864401ilq.23.1707661709337; Sun, 11 Feb 2024 06:28:29 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202402110154.41B1scZ9090228@gitrepo.freebsd.org> In-Reply-To: <202402110154.41B1scZ9090228@gitrepo.freebsd.org> From: Alan Somers Date: Sun, 11 Feb 2024 07:28:17 -0700 Message-ID: Subject: Re: git: 8dfc788b8480 - main - aio_read2/aio_write2: add AIO_OP2_VECTORED To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4TXqhH4P5mz4VLZ X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated What's the difference between this symbol and the existing LIO_VECTORED symbol ? They seem redundant to me. On Sat, Feb 10, 2024 at 6:54=E2=80=AFPM Konstantin Belousov wrote: > > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8dfc788b8480a13f1f945f0a94= d8b1e327af5c6f > > commit 8dfc788b8480a13f1f945f0a94d8b1e327af5c6f > Author: Konstantin Belousov > AuthorDate: 2024-02-03 18:09:36 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-02-11 01:54:11 +0000 > > aio_read2/aio_write2: add AIO_OP2_VECTORED > > Suggested by: Vin=C3=ADcius dos Santos Oliveira > Reviewed by: jhb > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D43448 > --- > lib/libc/gen/aio_read2.c | 4 +++- > lib/libc/gen/aio_write2.c | 4 +++- > sys/sys/aio.h | 1 + > 3 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/lib/libc/gen/aio_read2.c b/lib/libc/gen/aio_read2.c > index 3a783e1b1b15..a5186d509b26 100644 > --- a/lib/libc/gen/aio_read2.c > +++ b/lib/libc/gen/aio_read2.c > @@ -37,13 +37,15 @@ aio_read2(struct aiocb *iocb, int flags) > { > int error; > > - if ((flags & ~(AIO_OP2_FOFFSET)) !=3D 0) { > + if ((flags & ~(AIO_OP2_FOFFSET | AIO_OP2_VECTORED)) !=3D 0) { > errno =3D EINVAL; > return (-1); > } > iocb->aio_lio_opcode =3D LIO_READ; > if ((flags & AIO_OP2_FOFFSET) !=3D 0) > iocb->aio_lio_opcode |=3D LIO_FOFFSET; > + if ((flags & AIO_OP2_VECTORED) !=3D 0) > + iocb->aio_lio_opcode |=3D LIO_VECTORED; > > error =3D lio_listio(LIO_NOWAIT, &iocb, 1, NULL); > if (error =3D=3D -1 && errno =3D=3D EIO) { > diff --git a/lib/libc/gen/aio_write2.c b/lib/libc/gen/aio_write2.c > index 8b5d4a38a6c5..8f4f6a35fd4d 100644 > --- a/lib/libc/gen/aio_write2.c > +++ b/lib/libc/gen/aio_write2.c > @@ -37,13 +37,15 @@ aio_write2(struct aiocb *iocb, int flags) > { > int error; > > - if ((flags & ~(AIO_OP2_FOFFSET)) !=3D 0) { > + if ((flags & ~(AIO_OP2_FOFFSET | AIO_OP2_VECTORED)) !=3D 0) { > errno =3D EINVAL; > return (-1); > } > iocb->aio_lio_opcode =3D LIO_WRITE; > if ((flags & AIO_OP2_FOFFSET) !=3D 0) > iocb->aio_lio_opcode |=3D LIO_FOFFSET; > + if ((flags & AIO_OP2_VECTORED) !=3D 0) > + iocb->aio_lio_opcode |=3D LIO_VECTORED; > > error =3D lio_listio(LIO_NOWAIT, &iocb, 1, NULL); > if (error =3D=3D -1 && errno =3D=3D EIO) { > diff --git a/sys/sys/aio.h b/sys/sys/aio.h > index 6680f9fed3fa..919a6180b130 100644 > --- a/sys/sys/aio.h > +++ b/sys/sys/aio.h > @@ -58,6 +58,7 @@ > /* aio_read2/aio_write2 flags */ > #if __BSD_VISIBLE > #define AIO_OP2_FOFFSET 0x00000001 > +#define AIO_OP2_VECTORED 0x00000002 > #endif > > /* From nobody Sun Feb 11 18:45:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXxP44WtGz5BClP; Sun, 11 Feb 2024 18:45: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 4TXxP440Kqz4vv3; Sun, 11 Feb 2024 18:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707677144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U/TQje91tKThaPzpIIEcxyO3vGuhbKyWABxk1fbmsIg=; b=jJThHcrdEgbPYJ0M6r8l7EhJreRgMxAfaYgtg+yXOjm2Ra3FnHbsrA2hPNxKl+oSlN1SQm VtjEVK2JHgbtpBj0eWdAwgNdGoK6jOET1/nQ5YmnN6AE9HjeOwpZkiUJGwm0dgxIXwG7bD DgIICk+tQ2hdak2QN99OI6KZ12VlZSpxCDbnal4G7VFRoAaL804MMqm+wOZn6Z4p2PEnMa Dm6YB1gvAiLGtZgMu2WUY/In6kX93FJUru1uFHIFgS4T8wsPvb+5/BvdscnGUq12nqR1NY L/Ep26qLtEw9Nf1TJO9uBI5HsM4xEa+ik8l4sKTPbHLvR/KxUPFeGlrpR4RK6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707677144; a=rsa-sha256; cv=none; b=rIawdkWnjGyoQ2FM036ld8cdtKOZCpDVdw1VPF2Pz0M4oUJGhsPiadgf/vqM0tp8jZK6cF NO8ZPVR/pTqJYLxt/diGCVxARIdb5BS+GHsDiOFu8AIrXh6YhsK7bgqstbROK19LeyRoaI nl1UCISGqI1Qvh2oLVAeL4IcPdPi1cYXiMJ2Vefbxa/H6Empd8t/ejXOvhUc0tO7eNBdn2 OANO+6mCCZ8E5k+9MrSLwUDmBXhGxcPy+2zKtNFsHH6uI85dBvMZTwQdGrWPjAXvDg2iPB jsEgqAmpWZFgmGhTPCB6vCB/YD0JVuGT1xgo9ce7pQnb/3g8KOdffomNWrx9kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707677144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U/TQje91tKThaPzpIIEcxyO3vGuhbKyWABxk1fbmsIg=; b=dym08Mjuj8UguNepMa6LZun/9xnSFRGUGhWZ0IQ6nZGXF/qB2BNfnz2JWZHT628MTTt57c K567FMX3VX9tmonyOkI3igQOVLE0rYXNuutUPYWS2Mg65DyUH5YKjcV2XTAytNU0FZc+7h JHHG8ijVTsoY9utTyLAGa/0CkaKOno0LdNzM+50tkfankBGh24LO+qFMXpOWD0dGqlprnt 2NDzr3Gqf2/wy3Ia65tnpO5+2mIa0A2wuslpEs0zKBaY1I+nJGydrZ9AVb0z1pFBoKaPWt MggojbSjbT5pnMGQvTOrxe5nE6NGzR8w4Ie+0E4R8bW1+ZDJd8pk+D3N3Nz4GQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXxP433m8z19F5; Sun, 11 Feb 2024 18:45: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 41BIji5q092482; Sun, 11 Feb 2024 18:45:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41BIjiYF092479; Sun, 11 Feb 2024 18:45:44 GMT (envelope-from git) Date: Sun, 11 Feb 2024 18:45:44 GMT Message-Id: <202402111845.41BIjiYF092479@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: 470f9f13de10 - main - Build clang and other llvm executables as PIE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 470f9f13de10e47e6d45721c15af6b4abe7aad55 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=470f9f13de10e47e6d45721c15af6b4abe7aad55 commit 470f9f13de10e47e6d45721c15af6b4abe7aad55 Author: Dimitry Andric AuthorDate: 2024-02-11 18:01:56 +0000 Commit: Dimitry Andric CommitDate: 2024-02-11 18:01:56 +0000 Build clang and other llvm executables as PIE There is no reason anymore to not build these as PIE. Unfortunately bsd.lib.mk does not allow for building _only_ PIE static libraries, so lib/clang/Makefile.inc needs a kludge to work around that issue. MFC after: 1 week --- lib/clang/Makefile.inc | 6 +++++- usr.bin/clang/Makefile.inc | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc index 2dfc966726b0..5a8ead5292c6 100644 --- a/lib/clang/Makefile.inc +++ b/lib/clang/Makefile.inc @@ -2,7 +2,11 @@ .include PACKAGE= clang -MK_PIE:= no # Explicit libXXX.a references + +# Build only PIE static libraries; bsd.lib.mk does support this directly. +MK_PIE:= no +CFLAGS+= ${PIEFLAG} ${SHARED_CFLAGS} +CXXFLAGS+= ${PIEFLAG} ${SHARED_CXXFLAGS} .if ${COMPILER_TYPE} == "clang" DEBUG_FILES_CFLAGS= -gline-tables-only diff --git a/usr.bin/clang/Makefile.inc b/usr.bin/clang/Makefile.inc index 831cd56a8c25..8f812e24fcdb 100644 --- a/usr.bin/clang/Makefile.inc +++ b/usr.bin/clang/Makefile.inc @@ -3,8 +3,6 @@ WARNS?= 0 .include -MK_PIE:= no # Explicit libXXX.a references - .if ${COMPILER_TYPE} == "clang" DEBUG_FILES_CFLAGS= -gline-tables-only .else From nobody Sun Feb 11 22:47:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TY2lW64FKz58rT7; Sun, 11 Feb 2024 22:47: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 4TY2lW4GNRz4blm; Sun, 11 Feb 2024 22:47:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707691623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YMqvsR2YDe6wHYuyhBm+Mr+pLlnjPjV0t5k1liVi/FM=; b=ImKmpqLhmxMqlveHsIbRltRFdkeoHOfAU8X0OEuBQaGoGGSpccxc1TpFHAcsbHAYAzaP3x /NoD+Q4EuxKHZvFO1AIRDPYEhNgWM7yZlnspmzPqRTrj82SBTvhtoUfpbkFfcqKGUx4flh YHVOZInVSzAYjnan44W/yP/QwthjJuQDG7Qf4Fv9Ft8upphPYNXxsMoiq2VzuwJwiA50r8 MZrZ9v4dMl4hMRMSFAAnhDGGuWnyAw96GZfqKj8kyfXMa/ABQM2QOWRyq0r1Lp8g4KakKF 8Mt9IXgnBoe/pXEWBpAhc1a5TCCSKIpTZRLCB1ry+ImyYuwQxRNy4RXTPOifvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707691623; a=rsa-sha256; cv=none; b=U6YaIXgE+eZuwnSuI5xVqLnALwPeVLXF2IsYJ86d2cX7B9qKtZ6ITyfcs+E0sX04DybuPT APYVguXFvRSbC/ReOzdNX5HG3vjSjYde+i8UFXfdzS+sdPqyL+R5nAqb8p/C0U0kj527DT 14FMEh1o7pfAdXyaa5ldL0qkqzVHpHqQiTjUQ6CPMNmVVSyiYJ+YPf4WqAvlHQGcPaSLnU v9VP2Bd5iH6sYTJ+uqrhtsCewaIVxBo8mCudXZWpCuDZRGStog11KpLtBa+SynRwftRRGf M9AER0ncCk447nyOipbo5Tz9Fr7HmOdpZOnQLcsrRu+kWQ96ww6NXbnDzZZOHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707691623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YMqvsR2YDe6wHYuyhBm+Mr+pLlnjPjV0t5k1liVi/FM=; b=s0YC3e/n4Bf0Fmbs8NR3CPb9JtT2rEu8os/oQNY++f2OX7MuQmWL9cYERyqzyoLM4Cv/G8 o1XrMpMnyQUtDUCvCQdZ3nUcl1Wcvrc4N47ET+dY4hlOSfNKpU3f9QfKvSbkfq/rU53b1w z6I9lkJVuPKtihNZ1GK4AGO6k5csc/dJBiHVj7jpPHWLuDHQtSbUmqsINVn+2XSUD51Xc6 byBmT6tFmoBq9oCNy2+SWI0ew72lDx31N5EVO3tBubL/i7HCGMg0W8smgqGwv1uMOvdVOp cEZRse3tILXMwrEdqlJEm+eYaMOFjF06cLDvpm9dj/Ft7WP65ZJQdtxMETXaLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TY2lW3Jd2z1HBQ; Sun, 11 Feb 2024 22:47: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 41BMl3qw096697; Sun, 11 Feb 2024 22:47:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41BMl3Xl096694; Sun, 11 Feb 2024 22:47:03 GMT (envelope-from git) Date: Sun, 11 Feb 2024 22:47:03 GMT Message-Id: <202402112247.41BMl3Xl096694@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: ed27ae8df4b1 - main - Bump __FreeBSD_version after clang/llvm PIE change List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed27ae8df4b10f67289a32458d89d143e758f6d4 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ed27ae8df4b10f67289a32458d89d143e758f6d4 commit ed27ae8df4b10f67289a32458d89d143e758f6d4 Author: Dimitry Andric AuthorDate: 2024-02-11 22:45:51 +0000 Commit: Dimitry Andric CommitDate: 2024-02-11 22:45:51 +0000 Bump __FreeBSD_version after clang/llvm PIE change Otherwise, incremental builds might fail with various interesting errors. This is a bit of a big hammer, but I don't know of any other way to force rebuilds of all these libraries. Reported by: bapt Fixes: 470f9f13de10 MFC after: 1 week --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 8740d37facc3..ff932e6c60dd 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500013 +#define __FreeBSD_version 1500014 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,