From nobody Sun Dec 10 08:37:26 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SnytG67pKz53PHk; Sun, 10 Dec 2023 08:37: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 4SnytG5GXCz3dsN; Sun, 10 Dec 2023 08:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702197446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4ozU5DK/gbvfnYIbDrBM6XptLB44f8Vwm2Yl8vudgY=; b=ni8BUKYLDc7vrDIQCXnSpqzC7KRu+yiJGtKOXdb8mFtOW40Mys/MfCFHb9Y9o4RpEb8eNb lsE15H+d6r92hpyW06xBW3yprksihlvjAWpaR7DCcb0A5WSM9bJZOS+DzoydWTwD8pbFeX gyN3QpkTZ1DRgBPPpvCGi4VynguSY6yQhZVAZ/4KS/iTtG0v712GcQPYh1q3o0eHYpODoT UeB6sEyQuVB5huwGVFIzRORaXC58/FrJeNAu5kRn+jCeb/oddbYmUphHfn6yG5WkTfJa4z hdNAz2RXZrLHvBxFevZnOLcGu63IrOeejU92B1X0b3A04KNxjygZogpNb/CiCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702197446; a=rsa-sha256; cv=none; b=kCVSbbCwwdWNcVbPhDFNXIOYIv66L14ZS0qRafhi2OIrTL3pvchF0IrYkZE99OD/M3jbnL UQcLg0uWwdto486YSBVvwIkA41O0ItpsQJe0CGGxMWDk0pc6zzrx/Ao4weZUaaT67Jub+r BU/DITndL2UGAFddY75t7zYDlU+adUzToGyXHDhxfDh0ymxRXf7e8IEb14g9d39hBVcn7r esN+ZogIuWcolSWN8IjY9i+CWNn6nc9E4NgqgrNV3mKRNYPxcjFWkWBiOK2rcu84igBJ7z SIzFekU82Y26uRb8COAiuLtrauw4djZC3O/fcIxtcyPniMMP3ddwWkPDvePA+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702197446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4ozU5DK/gbvfnYIbDrBM6XptLB44f8Vwm2Yl8vudgY=; b=MHMPtnU3U6IuFB4dRdi+vZ9QezV2kyU6ScoRooSi/DD9fxA9lwQ6UPH5D/6B906oCmofeQ pshf61wQY7BMFfwDmutzkZBfq8yDlRWMSBFIu0ImrceF47xj1mGNA/7Ji4lH5kXLp0RkgK AR+2W+e3iX9E22WBqWvcpm6jzb7S8QzQ26solWMchz4cM5UdLzHfagjYzIhberB9T7p/pg 75Erxx1oIacyWFaNK0JmnrH6s3zWzxz2oD+cTtRjGBZi7bK62DDAW6QDeQ63aAOE36COf7 m+RSDnhJtAgwA/v/kl/B6tF5YAwMrhT6xwIc/Gh1iwd7aT3aw76DKu3Ki6Dl4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SnytG4KdnzhJJ; Sun, 10 Dec 2023 08:37: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 3BA8bQZY087197; Sun, 10 Dec 2023 08:37:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BA8bQBc087195; Sun, 10 Dec 2023 08:37:26 GMT (envelope-from git) Date: Sun, 10 Dec 2023 08:37:26 GMT Message-Id: <202312100837.3BA8bQBc087195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 41667b04e5d5 - main - stress2: Only extract the allocation with the exact name "pts" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41667b04e5d56888e90ad80b39930aa5fb66aad2 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=41667b04e5d56888e90ad80b39930aa5fb66aad2 commit 41667b04e5d56888e90ad80b39930aa5fb66aad2 Author: Peter Holm AuthorDate: 2023-12-10 08:34:38 +0000 Commit: Peter Holm CommitDate: 2023-12-10 08:34:38 +0000 stress2: Only extract the allocation with the exact name "pts" --- tools/test/stress2/misc/pts2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/pts2.sh b/tools/test/stress2/misc/pts2.sh index 84f7bbd78255..32adb98f2cfe 100755 --- a/tools/test/stress2/misc/pts2.sh +++ b/tools/test/stress2/misc/pts2.sh @@ -40,11 +40,11 @@ sed '1,/^EOF/d' < $here/$0 > pts2.c mycc -o pts2 -Wall -Wextra -O2 pts2.c || exit 1 rm -f pts2.c -pts=`vmstat -m | grep pts | awk '{print $2}'` +pts=`vmstat -m | awk '/ pts / {print $2}'` for i in `jot 10`; do /tmp/pts2 done -new=`vmstat -m | grep pts | awk '{print $2}'` +new=`vmstat -m | awk '/ pts / {print $2}'` s=0 [ $((new - pts)) -gt 1 ] && { s=1; echo "Leaked $((new - pts)) pts."; } From nobody Sun Dec 10 17:41:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpBxg6Rchz548XR; Sun, 10 Dec 2023 17:41: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 4SpBxg608jz3WVJ; Sun, 10 Dec 2023 17:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702230071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oy6vbm9n2k6uWsyCEGqodFJJwL1mPcjqNzNpSomTjbc=; b=WdeuZ8Huf5sqKdzpT1ys17/GyFQcSGk5VM06osLtcEbFwa8fkOWdyH3Zu4fKrtGrQ9ssfG VlwnVP3f2sCNi6DynLzg0daZFVJfEIxaVEDTsiXJF8ahorOIbnr/pQ5ul05PohX6F0xuLu Q9SHB7yq21LtHh8oOhpBDWWBy+1J4EpDskZVgNGj336cjqW01V4vuYQS5+ce2lwPmzR+Kl MHarIPfrcfvWKZB5AsVz37T+fnjSh0Le/TdQZzRj+NrGcIvRisWnkNrTSvGbjW6ZZdcADa 2IWmvx0SYzCcai/X8NnQHrpFBURl7zDRs29YKucKTVRDalsuhT5KapLquo4TpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702230071; a=rsa-sha256; cv=none; b=Si81XAaVgqq6lYl/73JIT5GUrqiZl4DCxLOYNJ6mXdbBPCBrnPc9F6Y4qIjmbmLumGN8YA gZnvjk81kY1RZstjimCMXQBhGuIEsTapS2QWKBa5osWDKK5SY5mT6adS2TwQzSMkoOYRV+ ZUOsRjqiubzIbZbOnZpPIYUCuYis5LclegrcMCArYErdUw68Amwy5ZvtvbIpzK2/qkmrSs Owr2REw2IKIzxlH7pSzoLZrYSp/ap6h9ik2/mV5i4CQNq0tEYdME8OX4mGFRBPVpb5lR3h sVkkXRlg4FPzNmWNAu2R1qE+4BbC8wVsydiIaFJ6RgYpe6TiZIgNXV9dwkKTzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702230071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oy6vbm9n2k6uWsyCEGqodFJJwL1mPcjqNzNpSomTjbc=; b=wrvZAL2rM0fSAG+n6aN8vPa74XlFC/9/Qs7+Sc87bhMi7ApKs4uvC3Jyu85VLPS6qbS5JP TPxpMUwSEusTs3v8M2rT+gXWKgVF965ucHCU/M2NBHwT+MMdcmI3gkGjwKwUYzQoTcEfIj 5XVEnMFUTMfKpKvbvnu0Yyhpkoo+vyxIjJxEUOfvBWTpYQ4SB2uNq6ype/wVtsJqBHmf4Y Ab/TcNQqwuB3dVjZqKmZCPaHIvKIpgUmU+z3rOVZBwJ2jQuHGkOGxD1Mc1fQr5QpEp4wrB IZ89wwjJjm6eRpn8kadjY7Mbq/AywjSD85tySvp9IT3Jjas78/W6iI3KVNBR3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpBxg52gZzxLg; Sun, 10 Dec 2023 17:41: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 3BAHfBRW005021; Sun, 10 Dec 2023 17:41:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAHfBEQ005018; Sun, 10 Dec 2023 17:41:11 GMT (envelope-from git) Date: Sun, 10 Dec 2023 17:41:11 GMT Message-Id: <202312101741.3BAHfBEQ005018@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: dff3a80f6dfe - main - endian.h: Remove duplicate words List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: dff3a80f6dfe88c52326ceb2c154668f132fdb52 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dff3a80f6dfe88c52326ceb2c154668f132fdb52 commit dff3a80f6dfe88c52326ceb2c154668f132fdb52 Author: Jose Luis Duran AuthorDate: 2023-12-10 16:35:56 +0000 Commit: Ed Maste CommitDate: 2023-12-10 17:40:57 +0000 endian.h: Remove duplicate words Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/920 --- include/endian.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/endian.h b/include/endian.h index c7b78217cedd..eb25cedf0bef 100644 --- a/include/endian.h +++ b/include/endian.h @@ -35,9 +35,9 @@ /* * We don't define BIG_ENDI, LITTLE_ENDI, HIGH_HALF and LOW_HALF macros that - * glibc's endian.h defines since those appear to be internal to internal to - * glibc. We also don't try to emulate the various helper macros that glibc - * uses to limit namespace visibility. + * glibc's endian.h defines since those appear to be internal to glibc. + * We also don't try to emulate the various helper macros that glibc uses to + * limit namespace visibility. */ #endif /* _ENDIAN_H_ */ From nobody Sun Dec 10 20:14:28 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpGLX36K8z54LgW; Sun, 10 Dec 2023 20:14: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 4SpGLX2WwRz4Hfg; Sun, 10 Dec 2023 20:14:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702239268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=345AZnCuKY9lPETI/m4JadtRPTVSdPKq0gHJn689EeI=; b=F2Mn63dS0ZrQ+JYml1r253PL6mM0EYMyyCGMRe4uCqvCowRnsAJFCanC+lKkZjaGtIe205 MfQNHrssfoOBQq4qJX4j75zNtPxILtyJgTyxg7lBISgd5b8k2YCgKnmY1cdEHxRjv9HxP4 OmjRUmpp8M/kcky0wDB91/+m7MexxQ+Hc9hTKWxXP5wUF4THrydsGFcU4VLOjXC04c3RqV +Lss2X3RY6ZgT5oLP14llOF7GiJeivhsxqE3wnxi4k4A25mxR3b9Rk38pjanXoOSmXQlwE TINYds1sqKnEUzHuITvltvr4eo2vOOrFo6lJ03kSVXraQdtE6h3rJXM6gtOwUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702239268; a=rsa-sha256; cv=none; b=tbPAmJSk35yxpZxpFQhy7I/tvQV32FT+eXBU1gUahRhzScMRp9tdlKEXRgu9jwz4lcxnkj vLq1Znq8viVJap19juTFPrAx+8n++hkN0QbPZCMYF5erW0Z6wpCPpdgHgAUPvO2AidZflD soBGybZSn187wImjAjoqZNsoXF3pvzxG5lDfrDwPDx6renEzG/AHeAAOVt9kQ8wFoMapme UHY8RntvqERxOFsAOU7qlVfx8UcD0vSq9/bhSv/m02awBSABw+MJxVZY2uRzEuefSTvzv1 uawrHDyp7DfMnZx0IWHcDygh9dJBD9+3uLPMHzfC/M7ppi0WBan1vuly2G3psw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702239268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=345AZnCuKY9lPETI/m4JadtRPTVSdPKq0gHJn689EeI=; b=dqAsPTVgtrUnY6X9yT9HUOtkk83UxGwiPQMzd+NvtJGb44IBJOxOX+Njk0v+xenWp4c3N1 sKoTuQHZFQjAMY4PzupPNqbTs/03Dc0vBzlZKFxxEgs2tIQVFP9J51J6EneTaEhhNMg52S zhgsVPjTjH3OB9U+GtvN4Mzlz4S+WbuotOuy3aIUhBHrpefvcUmgbDIX4lps4CgRxg5LbW MNitHS5WGJXlScvB3zKJ4fxEkTew8G/dqR8WHFBjSFEGVkFfokPjILYkpBlFsaFICeH7j8 RvO2CES6QYyjwicEJNNA9ARbEKWIo/zhoUbMxAoy17T9KHBg7aCAmwAXv9u77g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpGLX1Y5Qz12NC; Sun, 10 Dec 2023 20:14: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 3BAKESg3060392; Sun, 10 Dec 2023 20:14:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAKESjE060389; Sun, 10 Dec 2023 20:14:28 GMT (envelope-from git) Date: Sun, 10 Dec 2023 20:14:28 GMT Message-Id: <202312102014.3BAKESjE060389@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: 4b9d605768ac - main - libsecureboot: be more verbose about validation failures List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 4b9d605768acabc460aa6dcfe8a1f8db35b16794 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4b9d605768acabc460aa6dcfe8a1f8db35b16794 commit 4b9d605768acabc460aa6dcfe8a1f8db35b16794 Author: Stéphane Rochoy AuthorDate: 2023-12-04 09:57:43 +0000 Commit: Ed Maste CommitDate: 2023-12-10 20:13:56 +0000 libsecureboot: be more verbose about validation failures Reviewed by: imp, sjg Pull Request: https://github.com/freebsd/freebsd-src/pull/916 --- lib/libbearssl/Makefile.inc | 1 + lib/libbearssl/Makefile.libsa.inc | 3 +++ lib/libsecureboot/vets.c | 14 +++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/libbearssl/Makefile.inc b/lib/libbearssl/Makefile.inc index 764984de9067..453630d038cd 100644 --- a/lib/libbearssl/Makefile.inc +++ b/lib/libbearssl/Makefile.inc @@ -1,6 +1,7 @@ BEARSSL?= ${SRCTOP}/contrib/bearssl BEARSSL_SRC= ${BEARSSL}/src +BEARSSL_TOOLS= ${BEARSSL}/tools CFLAGS+= -I${BEARSSL}/inc CFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/lib/libbearssl/Makefile.libsa.inc b/lib/libbearssl/Makefile.libsa.inc index c31d3f85975a..c171e141f0db 100644 --- a/lib/libbearssl/Makefile.libsa.inc +++ b/lib/libbearssl/Makefile.libsa.inc @@ -83,3 +83,6 @@ SRCS+= \ x509/x509_decoder.c \ x509/x509_minimal.c \ +# We want find_error_name(). +SRCS+= \ + ${BEARSSL_TOOLS}/errors.c \ diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c index 4a2aba433191..c86b198c45c5 100644 --- a/lib/libsecureboot/vets.c +++ b/lib/libsecureboot/vets.c @@ -568,9 +568,17 @@ verify_signer_xcs(br_x509_certificate *xcs, ve_error_set("Validation failed, certificate not valid as of %s", gdate(date, sizeof(date), ve_utc)); break; - default: - ve_error_set("Validation failed, err = %d", err); - break; + default: { + const char *err_desc = NULL; + const char *err_name = find_error_name(err, &err_desc); + + if (err_name == NULL) + ve_error_set("Validation failed, err = %d", + err); + else + ve_error_set("Validation failed, %s (%s)", + err_desc, err_name); + break; } } } else { tpk = mc.vtable->get_pkey(&mc.vtable, &usages); From nobody Sun Dec 10 21:29:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpJ1c2fXXz53DSw; Sun, 10 Dec 2023 21:29: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 4SpJ1c28nsz4MtP; Sun, 10 Dec 2023 21:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702243796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aKioYMDIw0a6EFZnjbK693xo/+srrSqP4RQrFkJgk4=; b=Gpm6chMiVH/F+C5/NuCAd+yUG9jg+80nAzWLQbjivi8YBcfjkPX+/2GMqq2K7kymX1iQJx Mo8mLfkB6Y3EeGuMMaR4jBW4z8Fyk+7gk8gEBIEItqvsQghBLBfATzkz3E5pjF2y9x1mBc iw4Bm1J7vSmEFawVeq9yvq9w1HKOuMB3GhHRe81zTeeSxg+cEP8YXv59ZgAOE5peINhxcD xLuwXxgrzglUTmmhKWijETxCx7e+8l3x0vDyJ/78BhAE9aR5OH8BDcAv+OfFNDolq5MpDp bBAhRMIZZZZOg/gt3T7z/aSNvpaftO3ktvyDIemy64EwxTxTE68slyBrzwu0TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702243796; a=rsa-sha256; cv=none; b=i/HsslGMy9X8uMCtUnuzEXOU8k0t1/JgBEhrOltYveWGGPmfV9M7X70oQnIdeRU7yVmWB/ kGQDgOc7lwb6YQ3ICMfNp15+zJS6Hu+Z9UufCZ9B5JGzNyuVUWGlQaS+0UqFFfaq7BkZAZ uvZNW92rq6/8r2YkrTYu6+0SkH6J9dp+LXXTgh+alUGf1PqGLf0yIyJEIVBks5ZhFGW7lr fHvy9t2EDgKrJe1SJtjq0F+N8NficpH8ehD8n0H5C9lefpBkxi92w30W9ocDw5rKDq1Yq4 a2TfUXTU8xZUaM/255R0i/QN7/4PbTVPGbPVZP+SuAjmeFqYntvv+wNIFZbvmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702243796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aKioYMDIw0a6EFZnjbK693xo/+srrSqP4RQrFkJgk4=; b=YCkDsYhxHv+6e1Xk9/wCKzks7oKh3U0Oo0KmU1xSxqnLfrxnhA9Yz+FR8AGJsekcm0jaNp q7qvxMqd2EEh7h9cReNetVxS1JHbRHWpYZpx2tuscAhLpK2Mki/+MgpNkfbGLUDC0h1TMG o1QrXlghLPTA/sNSI8j+ggZ+X1/D0XmmbPMHakwY24X5r/RkYIt3LqVqkiEXg0wFrXiGwN g0lje9G6qkzc1BD28uLFtPwnmOroW3X7BEGIyOsLfsDUht/qR+UYUyOo7deuIaHGW0IuG7 EOmLc7O0bHJProcZAC6drnBljaIcQ98z7G/Ftz5Djst8KLzHe88U359SvSWSWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpJ1c1CWfz13rt; Sun, 10 Dec 2023 21:29: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 3BALTuvf079114; Sun, 10 Dec 2023 21:29:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BALTuKJ079111; Sun, 10 Dec 2023 21:29:56 GMT (envelope-from git) Date: Sun, 10 Dec 2023 21:29:56 GMT Message-Id: <202312102129.3BALTuKJ079111@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: 56a0d5444d6f - main - strfmon: style fixes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56a0d5444d6f39302f3476b61c1b81ed39abe589 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=56a0d5444d6f39302f3476b61c1b81ed39abe589 commit 56a0d5444d6f39302f3476b61c1b81ed39abe589 Author: Jose Luis Duran AuthorDate: 2023-11-30 23:28:21 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-10 21:28:16 +0000 strfmon: style fixes Check style(9) with checkstyle9.pl and clang-format. No functional change intended. MFC after: 1 week --- lib/libc/stdlib/strfmon.c | 197 +++++++++++++++++++++++----------------------- 1 file changed, 99 insertions(+), 98 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index ade1deaffca9..4b0389345eb6 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -33,6 +33,7 @@ */ #include + #include #include #include @@ -57,7 +58,7 @@ /* internal macros */ #define PRINT(CH) do { \ - if (dst >= s + maxsize) \ + if (dst >= s + maxsize) \ goto e2big_error; \ *dst++ = CH; \ } while (0) @@ -68,9 +69,9 @@ PRINT(*tmps++); \ } while (0) -#define GET_NUMBER(VAR, LOC) do { \ +#define GET_NUMBER(VAR, LOC) do { \ VAR = 0; \ - while (isdigit_l((unsigned char)*fmt, LOC)) { \ + while (isdigit_l((unsigned char)*fmt, LOC)) { \ if (VAR > INT_MAX / 10) \ goto e2big_error; \ VAR *= 10; \ @@ -101,22 +102,22 @@ static char *__format_grouped_double(double, int *, int, int, int, struct lconv *, locale_t); static ssize_t -vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, - const char * __restrict format, va_list ap) +vstrfmon_l(char *__restrict s, size_t maxsize, locale_t loc, + const char *__restrict format, va_list ap) { char *dst; /* output destination pointer */ const char *fmt; /* current format poistion pointer */ struct lconv *lc; /* pointer to lconv structure */ char *asciivalue; /* formatted double pointer */ - int flags; /* formatting options */ - int pad_char; /* padding character */ - int pad_size; /* pad size */ - int width; /* field width */ - int left_prec; /* left precision */ - int right_prec; /* right precision */ - double value; /* just value */ - char space_char = ' '; /* space after currency */ + int flags; /* formatting options */ + int pad_char; /* padding character */ + int pad_size; /* pad size */ + int width; /* field width */ + int left_prec; /* left precision */ + int right_prec; /* right precision */ + double value; /* just value */ + char space_char = ' '; /* space after currency */ char cs_precedes, /* values gathered from struct lconv */ sep_by_space, @@ -126,6 +127,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, char *tmpptr; /* temporary vars */ int sverrno; + FIX_LOCALE(loc); lc = localeconv_l(loc); @@ -134,7 +136,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, asciivalue = NULL; currency_symbol = NULL; - while (*fmt) { + while (*fmt != 0) { /* pass nonformating characters AS IS */ if (*fmt != '%') goto literal; @@ -144,13 +146,13 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* "%%" mean just '%' */ if (*(fmt + 1) == '%') { fmt++; - literal: +literal: PRINT(*fmt++); continue; } /* set up initial values */ - flags = (NEED_GROUPING|LOCALE_POSN); + flags = NEED_GROUPING | LOCALE_POSN; pad_char = ' '; /* padding character is "space" */ pad_size = 0; /* no padding initially */ left_prec = -1; /* no left precision specified */ @@ -160,32 +162,32 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* Flags */ while (1) { switch (*++fmt) { - case '=': /* fill character */ - pad_char = *++fmt; - if (pad_char == '\0') - goto format_error; - continue; - case '^': /* not group currency */ - flags &= ~(NEED_GROUPING); - continue; - case '+': /* use locale defined signs */ - if (flags & SIGN_POSN_USED) - goto format_error; - flags |= (SIGN_POSN_USED|LOCALE_POSN); - continue; - case '(': /* enclose negatives with () */ - if (flags & SIGN_POSN_USED) - goto format_error; - flags |= (SIGN_POSN_USED|PARENTH_POSN); - continue; - case '!': /* suppress currency symbol */ - flags |= SUPPRESS_CURR_SYMBOL; - continue; - case '-': /* alignment (left) */ - flags |= LEFT_JUSTIFY; - continue; - default: - break; + case '=': /* fill character */ + pad_char = *++fmt; + if (pad_char == '\0') + goto format_error; + continue; + case '^': /* not group currency */ + flags &= ~(NEED_GROUPING); + continue; + case '+': /* use locale defined signs */ + if (flags & SIGN_POSN_USED) + goto format_error; + flags |= (SIGN_POSN_USED | LOCALE_POSN); + continue; + case '(': /* enclose negatives with () */ + if (flags & SIGN_POSN_USED) + goto format_error; + flags |= (SIGN_POSN_USED | PARENTH_POSN); + continue; + case '!': /* suppress currency symbol */ + flags |= SUPPRESS_CURR_SYMBOL; + continue; + case '-': /* alignment (left) */ + flags |= LEFT_JUSTIFY; + continue; + default: + break; } break; } @@ -193,7 +195,8 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* field Width */ if (isdigit_l((unsigned char)*fmt, loc)) { GET_NUMBER(width, loc); - /* Do we have enough space to put number with + /* + * Do we have enough space to put number with * required width ? */ if ((unsigned int)width >= maxsize - (dst - s)) @@ -214,22 +217,24 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, if (!isdigit_l((unsigned char)*++fmt, loc)) goto format_error; GET_NUMBER(right_prec, loc); - if ((unsigned int)right_prec >= maxsize - (dst - s) - - left_prec) + if ((unsigned int)right_prec >= + maxsize - (dst - s) - left_prec) goto e2big_error; } /* Conversion Characters */ switch (*fmt++) { - case 'i': /* use international currency format */ - flags |= USE_INTL_CURRENCY; - break; - case 'n': /* use national currency format */ - flags &= ~(USE_INTL_CURRENCY); - break; - default: /* required character is missing or - premature EOS */ - goto format_error; + case 'i': /* use international currency format */ + flags |= USE_INTL_CURRENCY; + break; + case 'n': /* use national currency format */ + flags &= ~(USE_INTL_CURRENCY); + break; + default: /* + * required character is missing or + * premature EOS + */ + goto format_error; } if (currency_symbol != NULL) @@ -245,7 +250,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, currency_symbol = strdup(lc->currency_symbol); if (currency_symbol == NULL) - goto end_error; /* ENOMEM. */ + goto end_error; /* ENOMEM. */ /* value itself */ value = va_arg(ap, double); @@ -267,15 +272,17 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, if (asciivalue != NULL) free(asciivalue); - asciivalue = __format_grouped_double(value, &flags, - left_prec, right_prec, pad_char, lc, loc); + asciivalue = __format_grouped_double(value, &flags, left_prec, + right_prec, pad_char, lc, loc); if (asciivalue == NULL) - goto end_error; /* errno already set */ - /* to ENOMEM by malloc() */ + goto end_error; /* + * errno already set to ENOMEM by + * malloc() + */ /* set some variables for later use */ - __setup_vars(flags, &cs_precedes, &sep_by_space, - &sign_posn, &signstr, lc); + __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, + &signstr, lc); /* * Description of some LC_MONETARY's values: @@ -306,7 +313,6 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, * $currency_symbol * = 3 - the sign string precedes the $currency_symbol * = 4 - the sign string succeeds the $currency_symbol - * */ tmpptr = dst; @@ -352,12 +358,10 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, } if (!(flags & SUPPRESS_CURR_SYMBOL)) { - if ((sign_posn == 3 && sep_by_space == 2) - || (sep_by_space == 1 - && (sign_posn == 0 - || sign_posn == 1 - || sign_posn == 2 - || sign_posn == 4))) + if ((sign_posn == 3 && sep_by_space == 2) || + (sep_by_space == 1 && + (sign_posn == 0 || sign_posn == 1 || + sign_posn == 2 || sign_posn == 4))) PRINT(space_char); PRINTS(currency_symbol); if (sign_posn == 4) { @@ -398,7 +402,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, PRINT('\0'); free(asciivalue); free(currency_symbol); - return (dst - s - 1); /* return size of put data except trailing '\0' */ + return (dst - s - 1); /* size of put data except trailing '\0' */ e2big_error: errno = E2BIG; @@ -418,15 +422,15 @@ end_error: } static void -__setup_vars(int flags, char *cs_precedes, char *sep_by_space, - char *sign_posn, char **signstr, struct lconv *lc) +__setup_vars(int flags, char *cs_precedes, char *sep_by_space, char *sign_posn, + char **signstr, struct lconv *lc) { if ((flags & IS_NEGATIVE) && (flags & USE_INTL_CURRENCY)) { *cs_precedes = lc->int_n_cs_precedes; *sep_by_space = lc->int_n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn; - *signstr = (lc->negative_sign[0] == '\0') ? "-" - : lc->negative_sign; + *signstr = (lc->negative_sign[0] == '\0') ? "-" : + lc->negative_sign; } else if (flags & USE_INTL_CURRENCY) { *cs_precedes = lc->int_p_cs_precedes; *sep_by_space = lc->int_p_sep_by_space; @@ -436,8 +440,8 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, *cs_precedes = lc->n_cs_precedes; *sep_by_space = lc->n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn; - *signstr = (lc->negative_sign[0] == '\0') ? "-" - : lc->negative_sign; + *signstr = (lc->negative_sign[0] == '\0') ? "-" : + lc->negative_sign; } else { *cs_precedes = lc->p_cs_precedes; *sep_by_space = lc->p_sep_by_space; @@ -460,8 +464,8 @@ __calc_left_pad(int flags, char *cur_symb, struct lconv *lc) char cs_precedes, sep_by_space, sign_posn, *signstr; int left_chars = 0; - __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, - &signstr, lc); + __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, &signstr, + lc); if (cs_precedes != 0) { left_chars += strlen(cur_symb); @@ -470,17 +474,17 @@ __calc_left_pad(int flags, char *cur_symb, struct lconv *lc) } switch (sign_posn) { - case 0: - if (flags & IS_NEGATIVE) - left_chars++; - break; - case 1: + case 0: + if (flags & IS_NEGATIVE) + left_chars++; + break; + case 1: + left_chars += strlen(signstr); + break; + case 3: + case 4: + if (cs_precedes != 0) left_chars += strlen(signstr); - break; - case 3: - case 4: - if (cs_precedes != 0) - left_chars += strlen(signstr); } return (left_chars); } @@ -510,8 +514,8 @@ get_groups(int size, char *grouping) /* convert double to locale-encoded string */ static char * -__format_grouped_double(double value, int *flags, - int left_prec, int right_prec, int pad_char, struct lconv *lc, locale_t loc) +__format_grouped_double(double value, int *flags, int left_prec, int right_prec, + int pad_char, struct lconv *lc, locale_t loc) { char *rslt; @@ -529,7 +533,7 @@ __format_grouped_double(double value, int *flags, size_t decimal_point_size; size_t thousands_sep_size; - int groups = 0; + int groups = 0; grouping = lc->mon_grouping; decimal_point = lc->mon_decimal_point; @@ -592,10 +596,8 @@ __format_grouped_double(double value, int *flags, avalue_size -= (right_prec + 1); } - if ((*flags & NEED_GROUPING) && - thousands_sep_size > 0 && - *grouping != CHAR_MAX && - *grouping > 0) { + if ((*flags & NEED_GROUPING) && thousands_sep_size > 0 && + *grouping != CHAR_MAX && *grouping > 0) { while (avalue_size > (int)*grouping) { GRPCPY(*grouping); GRPSEP; @@ -638,8 +640,7 @@ __format_grouped_double(double value, int *flags, } ssize_t -strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, - ...) +strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) { ssize_t ret; va_list ap; @@ -652,8 +653,8 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, } ssize_t -strfmon_l(char * __restrict s, size_t maxsize, locale_t loc, - const char * __restrict format, ...) +strfmon_l(char *__restrict s, size_t maxsize, locale_t loc, + const char *__restrict format, ...) { ssize_t ret; va_list ap; From nobody Sun Dec 10 21:29:57 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpJ1d4Qrjz53DQy; Sun, 10 Dec 2023 21:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SpJ1d3Gptz4NLS; Sun, 10 Dec 2023 21:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702243797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4dxKddJEW2k7bPQ1auz3VIABMWvXHtVrd27Z4Zsyak=; b=ujugJZbt1zNW9WbiOfgANVJDYfUW3yA8p2q79PSRaeYYvFvkc1J9InRcde+fQtQaTLunkK kgHOQuVvrUO5k99urPze4JQeSolBGxyYshPXxE0vPO40gMI3nTf5ktwsqvPM2v/uoW7n6J bY5btGHlClZP+KdTH4EJ13iz1PQTX6D6b9qu/mvkPFDhLUDiwr2VS+U503C8uKKBd+AHW1 lb5qEq2FP+D7y5NBU+AmaDGT1cq0WdKr4421nXftMXDVPp3ysF84kR1znEI6BQi8QGRX/N feTbFpNCl6fE3X7XF6vdqCAajSUQhYdmQLCNtcXxIXedzaH4pRalMryCy5ShHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702243797; a=rsa-sha256; cv=none; b=qyOUE40AeQwWOICktEIK0jiqXbkA7o4u8vHlWTNgJRk+xBIGZkDsyyPqlKvag/JkxTDdvL tA3n2U5S3qdRxlFwiKm3X6yGVhHCDLQwwN8n+3SrNw0T9MHERWa/Zjvdl9Rviv/6+6hX2f 7LMWxiwa2t0jk91zzJRM88ipysz4cnZ7BgfJKsT4vkPQ6S9NjWUQh5vxzzVXobzmkwj8fz SIt0yprlcYVRbFw9UEVyzDIlzhZiC0tMveA8rCXalC0VjNVbxoHJcGrItefMILBsUROOOn 94T9JoTaKxFg94IFPTN/dtV13fDUq242UYdYLK0R+n92KnvDmlFuOkwZqnwhVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702243797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4dxKddJEW2k7bPQ1auz3VIABMWvXHtVrd27Z4Zsyak=; b=O7QJXWI5AK/B6qjx/jHYSnEIlXQo/68hbG8QoEdOtoj4k1g3e7dmYu3OaemJpXEzrCRhBF Ad7sxYlnGlBUHTzYbnbqBAgeBkxGSuf1lWKNPZ/2+0I029+Hng8MU2HxE5PcZEAURaEwW4 oGSaZK815bZse27lVkf4fKR80RAWB29oM5/ILFGwfQdMcONpz66jIJ/l4i4SDSnjor4dR6 aPGRLXVE6QTvz9weHFIkrpFU23SNmE5gUH7yYDJGvWv49HJWtMJ8jHklYn+oUpRXGYWj79 Y3XPaAzjdqbQZB9CbsUjPanaZfBkAWUrp2LtIdyLz+HBU9JVzspgFeE9PJFevQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpJ1d2C2Nz13n6; Sun, 10 Dec 2023 21:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BALTvNR079159; Sun, 10 Dec 2023 21:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BALTvXo079156; Sun, 10 Dec 2023 21:29:57 GMT (envelope-from git) Date: Sun, 10 Dec 2023 21:29:57 GMT Message-Id: <202312102129.3BALTvXo079156@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: 86e2bcbf47fb - main - strfmon.c: Use the restrict keyword 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b commit 86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b Author: Konstantin Belousov AuthorDate: 2023-12-09 01:21:02 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-10 21:28:25 +0000 strfmon.c: Use the restrict keyword directly libc sources assume C99 or even C11 compiler already, unlike headers. There is no reason to obfuscate the basic C constructs. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/stdlib/strfmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index 4b0389345eb6..68a36a6d5567 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -640,7 +640,7 @@ __format_grouped_double(double value, int *flags, int left_prec, int right_prec, } ssize_t -strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) +strfmon(char *restrict s, size_t maxsize, const char *restrict format, ...) { ssize_t ret; va_list ap; @@ -653,8 +653,8 @@ strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) } ssize_t -strfmon_l(char *__restrict s, size_t maxsize, locale_t loc, - const char *__restrict format, ...) +strfmon_l(char *restrict s, size_t maxsize, locale_t loc, + const char *restrict format, ...) { ssize_t ret; va_list ap; From nobody Mon Dec 11 10:41:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpdZc65v7z53QJT; Mon, 11 Dec 2023 10:41: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 4SpdZc5dRpz4g3S; Mon, 11 Dec 2023 10:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g3767aCmtowJdwN+p0SgC5m5qP2XDUPBO0Appo1Rtsc=; b=r+n7lT281yhbVv/OboMu879GidGYUBOaRlLMaaCWlwBT/iZs53GmNPqIkil0HKGThxSjM6 +8TmvgF9rvCzp3q4NXneIoBmajkL2QlvkWheXhEF2oJECjGNx+sBayOlyouYfIOktw6+ED 9w6DDwO6552e88Scp3IBivMW9L3A30JT8z8MnnbOrZGl37kEmrsHiZS5nNJQde/BUjLUOM cUIbcp2kSlOOcou7yrHbkZzre6w1u8uTRZv4R0AzHfCk2+MZUZ56aeJ072gJmYGZsmss7l zRpOTU57WLfOsZEb/ryni2FRU+gLKXV3KfvwSZkl02r5rBr9M5GW6Xb/mtpa0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702291272; a=rsa-sha256; cv=none; b=xmyaq6POP+fE4NOcHmYZaenrjOsvuCxRNdQshb81hBNidJiMDRqNP7D4gp/EpA/1db5Hil VmgnZmL3vBGIXePHlOILv99FP8ClTI3jyAm+oUn9TPMPbUxO55FHS+ZevpqdHkECu8PYy6 xPcUPD4NrhG7A4LxoFqZyA6KZ9bQLVwE1rBj9SD5vPMM2SZ0U52TkApC8KvSQUG5o6/nm1 n9b5gG910kSvp+MjqkVk6YEG3zOkVzzzSIvhsK+j6MZJNe0AvGuSf0QBqQnR3rCCV3QnIP G4frmM1nxplGauimKd6447R1LSgTRkeA9Bgfp3TFEsslUDNG8w43dzjjd5QQcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g3767aCmtowJdwN+p0SgC5m5qP2XDUPBO0Appo1Rtsc=; b=p20nFRIM836Fq6B4JofaAuxTpj07CDQEYUjiH7Gp74kr3Ft0pIFkXygsTBM6yOuYRRsB9w ywCVjwjurGazXpLIhaX2ZA9GSnVn/rmtnhLhYJhCFexaKJpgvl4lf99LZ5M+7sqKielZuC cYTafEKXfZ7mRY0f6oW6OqZst4qHcRh3dD3hsO9teTMwgIapwCgFrqWqwkOQpyWcNF9Luv fhtTaCyKPPrC6sU8+J/h+FWzDoJed9G6XnMz8pIwty7BJNWqdzwvbMHNEMDkTnzrbWODZV Am3T3Rb3lrFzid112W+4c+pZ7P5XlukSOKRt8+enPr3rEGANHz0kzuKZczMvqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpdZc4jNYzD9N; Mon, 11 Dec 2023 10:41: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 3BBAfCRr013141; Mon, 11 Dec 2023 10:41:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBAfCbA013138; Mon, 11 Dec 2023 10:41:12 GMT (envelope-from git) Date: Mon, 11 Dec 2023 10:41:12 GMT Message-Id: <202312111041.3BBAfCbA013138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 96812bd10b42 - main - eqos: Remove extra x in printf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96812bd10b42294dbcd5ebe6dc006569ba85887c Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=96812bd10b42294dbcd5ebe6dc006569ba85887c commit 96812bd10b42294dbcd5ebe6dc006569ba85887c Author: Emmanuel Vadot AuthorDate: 2023-12-11 10:28:33 +0000 Commit: Emmanuel Vadot CommitDate: 2023-12-11 10:31:24 +0000 eqos: Remove extra x in printf No functional changes intended. --- sys/dev/eqos/if_eqos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index 88a9261ca5c3..0dc476acd520 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -1126,7 +1126,7 @@ eqos_attach(device_t dev) snpsver = ver & GMAC_MAC_VERSION_SNPSVER_MASK; if (snpsver != 0x51) { - device_printf(dev, "EQOS version 0x%02xx not supported\n", + device_printf(dev, "EQOS version 0x%02x not supported\n", snpsver); return (ENXIO); } From nobody Mon Dec 11 10:41:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpdZf0btZz53Q2W; Mon, 11 Dec 2023 10:41: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 4SpdZf01QRz3Bln; Mon, 11 Dec 2023 10:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKSIJeFKjT2FcgE0i7slof5LxUAY7xLUKl17AItsjj4=; b=lzkWsqxzCyn680ryWZvxoH+zM2gQc+EDzPEOLfgwj8dI/oU9xCI79b97JNrzyKZB887FAJ lizrdv3RpcsUPXs8R6VssSYWBXUS5TkDL47dHZQtPfKaTItzaZQsFCOK6kgkol8YMzzRFg c7K0b35sFTL4un9d9zlsD5KEJkfDLxVBwEhs2n+8dLugwx2ndXyKsXwWE0BLwVbY3HcYu3 eOd72U0ByQud072WPoY18A7JTxV7hIaQfBJ/EqEYaRgrQu6GOAhouLa6CycwgqAD5HXSgF ySz8wetPO1yLsiq6eQRJtwTLWQwyzlbISI8D/NGAlqoqLjNo3+NMBsJ0JuIUnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702291274; a=rsa-sha256; cv=none; b=PsaL74r4hZu3FeBe53m6FK0jOyTalanQ0zTCeG6w818EUV+YgiEC8oovK0woxCMhgaIcnJ /buYnwlITIqnRImDfKQtU4k0XzYOSvPH1GZWnprEctBHzDOlxpWDH2URIpqLmnqBwaVVfe +6eGMvOPHtZvRt+vuT+zvnzBkbw0VVy1zl0iaCnu35t5lJ4CIRfpXBVFZYQJpWugJr9gzi QFS9TW3gH0sEk5RoYsHo++LMGqTTFK2pSsHKblmMkXm9vYZ1fi/W0JUpyAbGl1QauuLVHr zUUSfi7D7YkndnCFg4AqEnB3BfETO76GtVBgUuw5DkskmuRj965BWyy3o2I2YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKSIJeFKjT2FcgE0i7slof5LxUAY7xLUKl17AItsjj4=; b=KahtxpkxEuznvHnFQZJSdPQiv2kxBkp6eM/GGiT8mh/RVjBEjeUwLN4dcCSvIfSS7lYo6T TT/q8Efo6tErWkpHcVx7IFF1miEBE0LUj5xgRjuMAm/Jt3iFrZs0UKCtk0GNum6jGOSXY/ 2Hs1nSmJoRTRbLrsXSa6UVbdBQR+6vS4wErhZ9tVZB9IxPuvSV2Q8clj7dF9s2feSCRkbj tmEZxbW/ci7Xc9/gGHs7q9ua0zZvIKzSmGb0JkYYNRz1F3AvV1v2NHXnq2ywVhe9K4SjwA fx5/gf5nqEA+8ardMOCUC913iPVWFwFeJpCTpu4zhqUY2EcUsqjINnTMBrA2FQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpdZd5xnbzD5h; Mon, 11 Dec 2023 10:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BBAfDe7013180; Mon, 11 Dec 2023 10:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBAfDjh013177; Mon, 11 Dec 2023 10:41:13 GMT (envelope-from git) Date: Mon, 11 Dec 2023 10:41:13 GMT Message-Id: <202312111041.3BBAfDjh013177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 22029445cbef - main - eqos: Unbreak fdt 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22029445cbef0ffc71196a6f38cee4738e9a6d0f Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=22029445cbef0ffc71196a6f38cee4738e9a6d0f commit 22029445cbef0ffc71196a6f38cee4738e9a6d0f Author: Emmanuel Vadot AuthorDate: 2023-12-11 10:29:16 +0000 Commit: Emmanuel Vadot CommitDate: 2023-12-11 10:31:26 +0000 eqos: Unbreak fdt support We need to enable the clocks and deassert the resets for eqos to work correctly. --- sys/dev/eqos/if_eqos_fdt.c | 56 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/sys/dev/eqos/if_eqos_fdt.c b/sys/dev/eqos/if_eqos_fdt.c index 17241b1c560b..68fcbc1ea706 100644 --- a/sys/dev/eqos/if_eqos_fdt.c +++ b/sys/dev/eqos/if_eqos_fdt.c @@ -50,6 +50,7 @@ #include #include +#include #include #include #include @@ -148,6 +149,9 @@ eqos_fdt_init(device_t dev) regulator_t eqos_supply; uint32_t rx_delay, tx_delay; uint8_t buffer[16]; + clk_t stmmaceth, mac_clk_rx, mac_clk_tx, aclk_mac, pclk_mac; + uint64_t freq; + int error; if (OF_hasprop(node, "rockchip,grf") && syscon_get_by_ofw_property(dev, node, "rockchip,grf", &sc->grf)) { @@ -174,8 +178,56 @@ eqos_fdt_init(device_t dev) device_printf(dev, "cannot get reset\n"); return (ENXIO); } - else - hwreset_assert(eqos_reset); + hwreset_assert(eqos_reset); + + error = clk_set_assigned(dev, ofw_bus_get_node(dev)); + if (error != 0) { + device_printf(dev, "clk_set_assigned failed\n"); + return (error); + } + + if (clk_get_by_ofw_name(dev, 0, "stmmaceth", &stmmaceth) == 0) { + error = clk_enable(stmmaceth); + if (error != 0) { + device_printf(dev, "could not enable main clock\n"); + return (error); + } + if (bootverbose) { + clk_get_freq(stmmaceth, &freq); + device_printf(dev, "MAC clock(%s) freq: %jd\n", + clk_get_name(stmmaceth), (intmax_t)freq); + } + } + else { + device_printf(dev, "could not find clock stmmaceth\n"); + } + + if (clk_get_by_ofw_name(dev, 0, "mac_clk_rx", &mac_clk_rx) != 0) { + device_printf(dev, "could not get mac_clk_rx clock\n"); + mac_clk_rx = NULL; + } + + if (clk_get_by_ofw_name(dev, 0, "mac_clk_tx", &mac_clk_tx) != 0) { + device_printf(dev, "could not get mac_clk_tx clock\n"); + mac_clk_tx = NULL; + } + + if (clk_get_by_ofw_name(dev, 0, "aclk_mac", &aclk_mac) != 0) { + device_printf(dev, "could not get aclk_mac clock\n"); + aclk_mac = NULL; + } + + if (clk_get_by_ofw_name(dev, 0, "pclk_mac", &pclk_mac) != 0) { + device_printf(dev, "could not get pclk_mac clock\n"); + pclk_mac = NULL; + } + + if (aclk_mac) + clk_enable(aclk_mac); + if (pclk_mac) + clk_enable(pclk_mac); + if (mac_clk_tx) + clk_enable(mac_clk_tx); sc->csr_clock = 125000000; sc->csr_clock_range = GMAC_MAC_MDIO_ADDRESS_CR_100_150; From nobody Mon Dec 11 10:41:14 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpdZg0nSzz53Q4S; Mon, 11 Dec 2023 10:41: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 4SpdZg0J1Sz3BvJ; Mon, 11 Dec 2023 10:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUFm2mgth91f0et1zqB6K+Wvj3/eKxw4y19BwxYKbiw=; b=TJBbC8idTC1hFxI/0wEo72dqFh4QiZC3gZfOX8F9t9UdNTlpTR7HqL3O7az95yI9D1J9ul 0DBmUoozbcfSetFd6db48wq/t+d7rlGhjfdqy9ByqImAbO6krP1WjMaekBMzfXVA/JN4+o Z/j8W5pbc/qLOeaPZA2jdZ3uFOdb6mkd3ox54ZwO5TQvsnheoVohmKV9W00DNUvb4izRIB t0wrIGWgZwSXoylI83alujclvqTz5j6U5Io3W7yRLUW0l3Y5dulejanv/GSWP+0pi+N500 4kVp8/+HEcoTDXBYwVrUzQo09fdZBp9dSW8rxXE4iHAkoqsteCDR5sJRpK4jNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702291275; a=rsa-sha256; cv=none; b=mi9auiuTKS1QXsWrCg0MsD6nxHJokJQhTlc/BZ90iGB966OZ+80zZiBzmIcLxHNz1B4zqx qVoNRZ6ybSSEnQNVvJp2MQKhnE9H64dzOPzqN5TtbamshJ1mdrfiXG7LmZcP+428o3C0ee lBYFAi1o5n066iYRUg3BYowUTQtX6JFbPSyifV2OyCDJbNpEerfQQ4ZM+7+7mYPQriRRQr Z27Ih4Ksy6LPOMZemZUU+ntP9M+PsLEnbWBzJBuBGbAb25MCXL6ApFRsP93sySnks/Vy78 eZ8vMxY/udG7Vk40g6gSYQowh8RfZ+VY7XCbV5kQVuReAcI7iM+BHFmYIx9DUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUFm2mgth91f0et1zqB6K+Wvj3/eKxw4y19BwxYKbiw=; b=pfsfjz7OVhZWF7wUhLxbQ2Wt1xX8MxjT7kadOyAdMD5fbJPYGRAct4fCuSU3vKc3/l4PJ+ MuSc4F5Tky7I2rasETQZz8fQvvSqrT5ShvjSWw3i04PBow6sOR28JjFj/IpWduGKlTuGJt rVTxPxAQMttgnqa7+0q3b5ZxkkSPjoT0c6vW8/qlUI2s22bO6bXOuqtb4tq46+SQ5RPfRZ uxTm7rEKQJmjLfGKmXwqOuQdgyFeKs7RoAVetCEck1AWqjTufyEKvN7UU751Xmx0I6HwJI Izms4pJ1b1xiJSOrn1y7Rn4wFyPaD4TuNPDdQTJJCOV0x1e3UvugHAo31kOpkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpdZf6WWvzD9Q; Mon, 11 Dec 2023 10:41: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 3BBAfEx0013625; Mon, 11 Dec 2023 10:41:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBAfE0o013611; Mon, 11 Dec 2023 10:41:14 GMT (envelope-from git) Date: Mon, 11 Dec 2023 10:41:14 GMT Message-Id: <202312111041.3BBAfE0o013611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: bd0771390ef5 - main - eqos: Call init earlier List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd0771390ef532ce0ae3f39350acd540125e5620 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=bd0771390ef532ce0ae3f39350acd540125e5620 commit bd0771390ef532ce0ae3f39350acd540125e5620 Author: Emmanuel Vadot AuthorDate: 2023-12-11 10:29:51 +0000 Commit: Emmanuel Vadot CommitDate: 2023-12-11 10:31:28 +0000 eqos: Call init earlier Call the subclassed IF_EQOS_INIT before trying to read the mac, clocks and reset needs to dealt with before we can read the registers. --- sys/dev/eqos/if_eqos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index 0dc476acd520..75e3ca957b48 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -1119,6 +1119,9 @@ eqos_attach(device_t dev) return (ENXIO); } + if ((error = IF_EQOS_INIT(dev))) + return (error); + sc->dev = dev; ver = RD4(sc, GMAC_MAC_VERSION); userver = (ver & GMAC_MAC_VERSION_USERVER_MASK) >> @@ -1142,10 +1145,6 @@ eqos_attach(device_t dev) sc->hw_feature[2], sc->hw_feature[3]); } - - if ((error = IF_EQOS_INIT(dev))) - return (error); - mtx_init(&sc->lock, "eqos lock", MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->callout, &sc->lock, 0); From nobody Mon Dec 11 11:17:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpfNp0Fxyz53SNP; Mon, 11 Dec 2023 11:17: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 4SpfNn6jWMz3HXK; Mon, 11 Dec 2023 11:17:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702293465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7vUCDPObkuc/Lws66jd3GovN82r7rvOv+l4MVUvNfI4=; b=JoEEfp3c6qKsTLv2G2mU5/Z7H08de4KOKkdq/dw6sKPMkbgD+4Magq+ZW62H8yxx6F56EC BpsJeuv9iu5S9skmQallMkAYhJFmp0PJ5XVJSPf36/tWoi2NXFR0ksF/Ctd7DPRtKbqr9V ouHtFDjagtLPkmHWkdreiiowiXPBAT7YT46tK/MAr0j9xHgxHPY5wQdxRHSgw/KwOaes8s K7oHUy5Ez8tpACDYPAL5DlDiPTCiO9VDeF59e2ACNFqS8tuI+EoEuw4UHKtjyjXuL8pQAw xm4lRdOdXhaz8lHDcJDc0EiDDu2zhXQHbyNy9JcHzw7eunFuCMyet/1b+KU0Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702293465; a=rsa-sha256; cv=none; b=dBtgzrudwtAR9D30tsuJqLxTbfo/vMWJXzj6aCZqfTpbTfxBg8ZcvYnbXTihm28OtwPQLb d91ebxODosLBe33lqvlHWpR668vdpkh+n2sV138l49wjJ73dB3JuwF+PM0jVBbVhu49iqn h0tE5t7rQLZR3MwCVxjkz5iiXLHCv8b5C7aOhlU0R6CXYR9LW8eCu7sPEVmE8RLc12GFmd bTgEhFJWKux78srYodrvExbrQnjVQd31reOJNlvHr/0MU68141le6/uLdHLTb1dHI0T9Ai PqMXbxYNNW5fcj4vxi2q1hTsk/G0Nubkoeo9MipW1x2VHXGW0Igio4Vno6vPuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702293465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7vUCDPObkuc/Lws66jd3GovN82r7rvOv+l4MVUvNfI4=; b=brRAMj5Cbttucj2tG92vsVWIg0OKNKqKdAsZ5oC8qRpnPcbpvbH7xFkNWjyrirDF1NgLig JbCzMNs0kkgF7HQGci4lDytsdh2beSVHc4NLf6IieWm5xRjhQdJxKDqqv+4gTa00gBacmj zsRKlUYcEYMVpEk9MMYNo6W2HF7YLNvoQQ12mALTn5vyWl/dIzUGlnmAL+FhBbYAvbyQLV FxSQ8j7B9PGph8pxTJeR1yGf2ZZY2fM2Lzs+TxBHSmbGZINHfmzq/KaM8jyZl1fbPu+tpd unxkfqmAiR8rtsBf3UxExf7MsBvOGsZq1/ts2TAbpINQPpYe1VSchA06Avqslg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpfNn5jp1zTms; Mon, 11 Dec 2023 11:17: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 3BBBHjgQ071256; Mon, 11 Dec 2023 11:17:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBBHjso071253; Mon, 11 Dec 2023 11:17:45 GMT (envelope-from git) Date: Mon, 11 Dec 2023 11:17:45 GMT Message-Id: <202312111117.3BBBHjso071253@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: a7100ae23aca - main - capsicum: introduce cap_rights_is_empty Function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7100ae23aca07976926bd8d50223c45149f65d6 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=a7100ae23aca07976926bd8d50223c45149f65d6 commit a7100ae23aca07976926bd8d50223c45149f65d6 Author: Mariusz Zaborski AuthorDate: 2023-12-11 11:09:31 +0000 Commit: Mariusz Zaborski CommitDate: 2023-12-11 11:15:46 +0000 capsicum: introduce cap_rights_is_empty Function Before this commit, we only had the capability to check if a specific capability was set (using cap_rights_is_set function). However, there was no efficient method to determine if a cap_rights_t structure doesn't contain any capability. The cap_rights_is_empty function addresses this gap. PR: 275330 Reported by: vini.ipsmaker@gmail.com Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D42780 --- contrib/capsicum-test/capability-fd.cc | 15 +++++++++++++++ lib/libc/capability/Symbol.map | 4 ++++ lib/libc/capability/cap_rights_init.3 | 19 ++++++++++++++++++- sys/kern/subr_capability.c | 19 +++++++++++++++++++ sys/sys/capsicum.h | 2 ++ 5 files changed, 58 insertions(+), 1 deletion(-) diff --git a/contrib/capsicum-test/capability-fd.cc b/contrib/capsicum-test/capability-fd.cc index f255c6425cdd..0551d9bd81ef 100644 --- a/contrib/capsicum-test/capability-fd.cc +++ b/contrib/capsicum-test/capability-fd.cc @@ -1342,3 +1342,18 @@ TEST(Capability, NoBypassDACIfRoot) { close(fd); unlink(TmpFile("cap_root_owned")); } + +TEST(Capability, CheckIsEmpty) { + cap_rights_t rights; + + cap_rights_init(&rights); + EXPECT_TRUE(cap_rights_is_empty(&rights)); + + size_t num_known = (sizeof(known_rights)/sizeof(known_rights[0])); + for (size_t ii = 0; ii < num_known; ii++) { + cap_rights_init(&rights, known_rights[ii].right); + EXPECT_FALSE(cap_rights_is_empty(&rights)); + cap_rights_clear(&rights, known_rights[ii].right); + EXPECT_TRUE(cap_rights_is_empty(&rights)); + } +} diff --git a/lib/libc/capability/Symbol.map b/lib/libc/capability/Symbol.map index 0deff024a046..8bf11670a5a8 100644 --- a/lib/libc/capability/Symbol.map +++ b/lib/libc/capability/Symbol.map @@ -8,3 +8,7 @@ FBSD_1.3 { cap_rights_remove; __cap_rights_set; }; + +FBSD_1.8 { + cap_rights_is_empty; +}; diff --git a/lib/libc/capability/cap_rights_init.3 b/lib/libc/capability/cap_rights_init.3 index 80b522820097..98b50f653f2c 100644 --- a/lib/libc/capability/cap_rights_init.3 +++ b/lib/libc/capability/cap_rights_init.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 5, 2020 +.Dd November 25, 2023 .Dt CAP_RIGHTS_INIT 3 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nm cap_rights_set , .Nm cap_rights_clear , .Nm cap_rights_is_set , +.Nm cap_rights_is_empty , .Nm cap_rights_is_valid , .Nm cap_rights_merge , .Nm cap_rights_remove , @@ -51,6 +52,8 @@ .Ft bool .Fn cap_rights_is_set "const cap_rights_t *rights" "..." .Ft bool +.Fn cap_rights_is_empty "const cap_rights_t *rights" +.Ft bool .Fn cap_rights_is_valid "const cap_rights_t *rights" .Ft cap_rights_t * .Fn cap_rights_merge "cap_rights_t *dst" "const cap_rights_t *src" @@ -118,6 +121,12 @@ function checks if all the given capability rights are set for the given structure. .Pp The +.Fn cap_rights_is_empty +function checks if the +.Fa rights +structure is empty. +.Pp +The .Fn cap_rights_is_valid function verifies if the given .Vt cap_rights_t @@ -182,6 +191,14 @@ if all the given capability rights are set in the argument. .Pp The +.Fn cap_rights_is_empty +function returns +.Va true +if none of the capability rights are set in the +.Fa rights +structure. +.Pp +The .Fn cap_rights_is_valid function performs various checks to see if the given .Vt cap_rights_t diff --git a/sys/kern/subr_capability.c b/sys/kern/subr_capability.c index e40c57c5307d..1f3a181a91cb 100644 --- a/sys/kern/subr_capability.c +++ b/sys/kern/subr_capability.c @@ -306,6 +306,25 @@ __cap_rights_is_set(const cap_rights_t *rights, ...) return (ret); } +bool +cap_rights_is_empty(const cap_rights_t *rights) +{ +#ifndef _KERNEL + cap_rights_t cap_no_rights; + cap_rights_init(&cap_no_rights); +#endif + + assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); + assert(CAPVER(&cap_no_rights) == CAP_RIGHTS_VERSION_00); + + for (int i = 0; i < CAPARSIZE(rights); i++) { + if (rights->cr_rights[i] != cap_no_rights.cr_rights[i]) + return (false); + } + + return (true); +} + bool cap_rights_is_valid(const cap_rights_t *rights) { diff --git a/sys/sys/capsicum.h b/sys/sys/capsicum.h index b9eb61409613..3979fd718909 100644 --- a/sys/sys/capsicum.h +++ b/sys/sys/capsicum.h @@ -336,6 +336,8 @@ cap_rights_t *__cap_rights_clear(cap_rights_t *rights, ...); __cap_rights_is_set(__VA_ARGS__, 0ULL) bool __cap_rights_is_set(const cap_rights_t *rights, ...); +bool cap_rights_is_empty(const cap_rights_t *rights); + bool cap_rights_is_valid(const cap_rights_t *rights); cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); From nobody Mon Dec 11 14:16:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpkM65RBkz53f4T; Mon, 11 Dec 2023 14:16: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 4SpkM64tlNz3YWy; Mon, 11 Dec 2023 14:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUk91oIjJXlbh5a2VBcU9N/7qt4B7aFu1VjZ/f1bNSw=; b=nWtcLhiB05Qx707Vt8vQ4a2egLE9UL49fjSw3JfKDROcTzqS46zxBHBXG+2MW4AmzrmZWA v7zRUAoGVTljbct4ZidVX1TCFdw2pCwZExUE+BnDx6cSBtkBmY7BkuEggLCIhFI2ZOF+HJ DjVdFkkuWQIb2T12ufW1m5SWSQeldl5nPQayL3MGpsMBevkTzPe0XdelyKCndx+LkUv+p2 jZcsZFfwoeueaA/I2aZsWw61v3O66Mg3XlEkffV0nV20dEzOuF4VI93sfj5e9IHwYWeu0x 7WzaHqnfubn+6H7WRA2ccaJ9t+/jGpipZHaLiAgewqqAACFtCGCycp+feh05gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304194; a=rsa-sha256; cv=none; b=FvIYaVBmljmhzWzexXDN2qpgdkBEvtaGRi7SbLJFkIqvfg7zdgmVpQy6q1XN62Oja0NI2P zU+7xiiJi61aioonkqdZJKBzir9Wa95/gMeCwyXmU/WYF+c9QFDbgjclLZLrArcgsLUvvC y7ZWH/NAOGzcvV8lzxtRFksjPOz00r8hL/eNBgOrDFQErLInvWxFl1Y2GvBYI1AA4fdVdP MRgJDbVlSmbc37Tz4AZqTN4PPkmmPvg+gfD7Y8I0ENinKAp/C4xnjXOuvWlIi2yzNyUizB To2K5gygMrkRtgOiS/AHybTPIeo0/1mbwXerZ5k7dmrWBbGaJnkzpCzOUIyzNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUk91oIjJXlbh5a2VBcU9N/7qt4B7aFu1VjZ/f1bNSw=; b=f8PZAck/7gGVGxbu5DbP/LH4P40m3pDzGgQU0AtZDsv3aKCcjDoekX/WNa5NvPlG9KKaHh nnzrNV3ox5GZxew29HptjqzFBmDWrkYivYWHxAs1EfVA8itcYhQccf9h1TjsrVnjBGacrh eHn5sLM31ZD9W6rSsf4mBW+oql87vaVT31Z853hmWPszH5LvG4yNPSWwSn0SRjU5eWGIOq 4X1xMSs72GvrSF6RjExn/Tkw9h+ymPvI8r5FJiNuUtQ2rYl4ik4cUDGclNhU2mF+IYZhLG b+ygK5hBHRZfZyS3b92KNTBHvTNAiUiQeEQqAPG4fgt/DPoAD5EbCp/Z2K8BhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpkM63sYXzZfB; Mon, 11 Dec 2023 14:16: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 3BBEGYqX071886; Mon, 11 Dec 2023 14:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGYMM071883; Mon, 11 Dec 2023 14:16:34 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:34 GMT Message-Id: <202312111416.3BBEGYMM071883@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: 96465c789a5f - main - arm: Compile vfp.c conditionally rather than using an ifdef List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 96465c789a5ff2619c5d49305517b35db9754ffb Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=96465c789a5ff2619c5d49305517b35db9754ffb commit 96465c789a5ff2619c5d49305517b35db9754ffb Author: Mark Johnston AuthorDate: 2023-12-11 14:07:40 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:07:40 +0000 arm: Compile vfp.c conditionally rather than using an ifdef No functional change intended. MFC after: 1 week --- sys/arm/arm/vfp.c | 4 ---- sys/conf/files.arm | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index 40a3491c1cf9..a4be235e1e01 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -28,8 +28,6 @@ * SUCH DAMAGE. */ -#include -#ifdef VFP #include #include #include @@ -524,5 +522,3 @@ is_fpu_kern_thread(u_int flags __unused) curpcb = curthread->td_pcb; return ((curpcb->pcb_fpflags & PCB_FP_KERN) != 0); } - -#endif diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 8b5674b839df..075b05e36d78 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -75,7 +75,7 @@ arm/arm/uio_machdep.c standard arm/arm/undefined.c standard arm/arm/unwind.c optional ddb | kdtrace_hooks | stack arm/arm/vm_machdep.c standard -arm/arm/vfp.c standard +arm/arm/vfp.c optional vfp cddl/dev/dtrace/arm/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/arm/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/arm/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" From nobody Mon Dec 11 14:16:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpkM81vLmz53f4X; Mon, 11 Dec 2023 14:16: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 4SpkM75X1zz3YX4; Mon, 11 Dec 2023 14:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wwGjN03YBYB0FcDCawv8YyxGT4Z+cI04fNn56+rVtVw=; b=gT7/24EwDepsdrUIjPtZIQaj/uRapXu8/l+NjQIGZOJAp5jktzDiRpV0WdcohAdLg0UTgn Rf68v7te8NE9pP2jkbBMb0r1PdIwggyt3JUah0Pt/dxfPOKwVZRrMQk0UKwQ+Zu7C37FOS 3FRZ8oGKstkvhYORLWGp7S1bjwoLjMaIOanoeI1nU7hbUGKVJXT9O3UgqUB67rXl15QHl7 u793KyLrNiC3Y896YSSe8yju55xDK4tuNSHK0R3PyppWTY4xxI3Yi7VFSXMlqn5/hifqvG 4p7sKHLNFJBQ7yY26fLyF2SEyFhV9xpzyO9NkPlbrXxEcSCbZoXgOq5braYLPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304195; a=rsa-sha256; cv=none; b=jlVEf6t9sAB+lTM8ShhdC5pjzRpQ9W8kz8rbNB0cEjWmLYnFzOjL+6KBAvWn7Kzi+qNPmo jRjrynpTGKSjS/eOYIHIz1Zotd81iCZnJZrJ8pS06/IPqOi3l3NNOUfslUlEGbWhHbT5WN w8HEyR41aYmt35drR5YEArX9k6PYH+5SmW9CWEbKTUxEm4HmCxEjXHp37omDneQ87kp5SY 5IB94TJi1n/s0ebjq59ZpUM2LPOrmE/c7AcfOVpvjzWvlFIb5S/m7RismyYWssSU1PazR2 jh8PPCPcx6NGuJheR8rNlUdc7i2ERPRSHPl135lccHEkl+u6g2eksNw7gAAzZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wwGjN03YBYB0FcDCawv8YyxGT4Z+cI04fNn56+rVtVw=; b=XEvklOC1fTtfrCxhpbiP6caKlqAKRSAn68J5z18w8t2gCQX4LGMJISXM71GabgETvKEdLe Cld4JmUqX2czTE50YDTnsvOPhx/gPLzDsECqpbW782/Mdy2V3lLtoBr3dCF4VvosLzfM9f +Mik0/8RF+tiUTvAD63eVBszTgcRg9KUazCq16zokYIY/ZGxACov5WOETQcQxdRUEEF1T4 /4jsGcpnSK1HriXfnSDuPd7ub3iFRLx5WhZY4KoOOD6RPtNvtVRQ8vRNtWS5SIiKYkY58r 6jw9vyEawL83tAPHUKdmYUHFcVLnHtUe3tHUJ1Av5MLxtPrZUb8f3Z9jhQPEiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpkM74cFRzZhS; Mon, 11 Dec 2023 14:16: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 3BBEGZMl071925; Mon, 11 Dec 2023 14:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGZ10071922; Mon, 11 Dec 2023 14:16:35 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:35 GMT Message-Id: <202312111416.3BBEGZ10071922@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: a6a481eaa2e0 - main - arm: Add fpu_kern_alloc_ctx() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: a6a481eaa2e0f02e24b874f1a08bb494a68972c0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a6a481eaa2e0f02e24b874f1a08bb494a68972c0 commit a6a481eaa2e0f02e24b874f1a08bb494a68972c0 Author: Mark Johnston AuthorDate: 2023-12-11 14:07:55 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:07:55 +0000 arm: Add fpu_kern_alloc_ctx() This enables the use of some out-of-tree crypto libraries on arm. No functional change intended, there are no callers of this function in the tree currently. Reviewed by: andrew MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D42969 --- sys/arm/arm/vfp.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index a4be235e1e01..f2979d4a2b27 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -30,10 +30,10 @@ #include #include +#include #include +#include #include -#include -#include #include #include @@ -52,6 +52,9 @@ static struct undefined_handler vfp10_uh, vfp11_uh; /* If true the VFP unit has 32 double registers, otherwise it has 16 */ static int is_d32; +static MALLOC_DEFINE(M_FPUKERN_CTX, "fpukern_ctx", + "Kernel contexts for VFP state"); + struct fpu_kern_ctx { struct vfp_state *prev; #define FPU_KERN_CTX_DUMMY 0x01 /* avoided save for the kern thread */ @@ -407,6 +410,21 @@ vfp_save_state(struct thread *td, struct pcb *pcb) critical_exit(); } +struct fpu_kern_ctx * +fpu_kern_alloc_ctx(u_int flags) +{ + return (malloc(sizeof(struct fpu_kern_ctx), M_FPUKERN_CTX, + ((flags & FPU_KERN_NOWAIT) ? M_NOWAIT : M_WAITOK) | M_ZERO)); +} + +void +fpu_kern_free_ctx(struct fpu_kern_ctx *ctx) +{ + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) == 0, ("freeing in-use ctx")); + + free(ctx, M_FPUKERN_CTX); +} + void fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags) { From nobody Mon Dec 11 14:16:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpkMB17F3z53f3D; Mon, 11 Dec 2023 14:16: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 4SpkM86dvBz3YXC; Mon, 11 Dec 2023 14:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=biwKtdyXgEWdc5jg6ENThT5i5AvaEKtUkbUOGDafvBU=; b=X3QLsgvDELdoChxbwZ0IvRMrLF3F3yRtARpzB86dkvX9px9SrdvMutDQsG70loRpfTt6yG aOtMZxZ76jmQH9zaVg/gSuck0zws20+Nwjm/HiAjNii9j+eRthGxT3as/mf5gqBgMm2sNv im58U56HcWOg7CJMAvo61ugOmbnUcjJENPTS1twx25YlMGrMgykAxdU3Wbpo9egIRqdn2c OjcMdffRvfHeHyORZR1iK02aS/m/xkVWOU7ySMuAce/q7XgDjXLIXy9pTCxPTB/7h+9ZAP rKQRmJAOVcNe+ixB7xoZY2oOX2FFoEf3YGTwGTx6fICTMnyfKdl0LNpCJhDevQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304196; a=rsa-sha256; cv=none; b=DGTZ7CL+GdiWTTkdaJ4nzJuis8FuaB6AbMemKpH/W88VU4hDyvGVQfKXxtgyOtD0hC/7hg P33IY04K4yqkQVvItGyxtPal4IyRVpSudTELg7ya2xkcPRBkeYK0ELzladmtXtHEN991M7 PlBrKOmcbymoJoH4jAKkA2yBg9Ys3qjv2osF95w4ssF/Inpwcg5pSMnX2XVOE3lHwWaUzj 8UORzVT6Pj/gdMRCH+2XMDgxcr2GP22cb2k+idBHYLLVTRFqO/Mvhig8gdPjT+eEmFSjIx migs4NVXJj5mD54bvcPmUfbztPC1AeIRR5a+w91faEFJVTUq+/ayK5PpFUiCVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=biwKtdyXgEWdc5jg6ENThT5i5AvaEKtUkbUOGDafvBU=; b=FIKFUjSjNc0/mP+5n8a7uf/st104yxHOlugoWB6eM3eGsXKRtNpyoJUgrLlZS1e4QJSoTR RaUtF+sKhL7K/hq54BdWalE5ht8rGIJHqnpxekE1TOz+F3NlWJLZTuBO5gAaUWDmsKIMHq AeF6Yx0vGoFPwMN4qIhbvJ2YA55NV3ozMfTYSio7uW2+bAaVqpRV27hBPih2qgwV3X78Y7 Xjtz1JTU9S5jckbb04p6CMS7CzDxZaUUSjRSmq2UuInR2vNv6wNYV6EXzy5OHuJVcv/jMu OA3RxhxR82iL5XkGZ+zhC3bok1dwo4d55oDJ28ZV/WEHAMTTOs7c+CqZQNvHgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpkM85gdszZrZ; Mon, 11 Dec 2023 14:16: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 3BBEGaUr071982; Mon, 11 Dec 2023 14:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGapE071979; Mon, 11 Dec 2023 14:16:36 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:36 GMT Message-Id: <202312111416.3BBEGapE071979@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: ecc2e6deae71 - main - arm: Fix handling of undefined instructions in kernel mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ecc2e6deae71b69a30bf3b7e3354aba002a37d69 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ecc2e6deae71b69a30bf3b7e3354aba002a37d69 commit ecc2e6deae71b69a30bf3b7e3354aba002a37d69 Author: Mark Johnston AuthorDate: 2023-12-11 14:08:08 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:08:08 +0000 arm: Fix handling of undefined instructions in kernel mode Only panic if no undefined instruction handler matched the exception. This can arise in practice if the VFP is enabled lazily. While here, fix the panic string to not include a newline. Reviewed by: andrew Obtained from: Stormshield Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D42970 --- sys/arm/arm/undefined.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c index 706033f5d570..dc29b55ae596 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -342,11 +342,11 @@ undefinedinstruction(struct trapframe *frame) #else printf("No debugger in kernel.\n"); #endif - return; - } - else - panic("Undefined instruction in kernel (0x%08x).\n", + } else if (uh == NULL) { + panic("Undefined instruction in kernel (0x%08x)", fault_instruction); + } + return; } userret(td, frame); From nobody Mon Dec 11 14:16:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpkMB73KLz53f3G; Mon, 11 Dec 2023 14:16: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 4SpkMB0W74z3YcV; Mon, 11 Dec 2023 14:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6HTAINyJuBF4+RsPiz1OACG41ea1pwsZ6dtS8qmjvs=; b=hYYDp8BLLY5MZhxxbWpx1HzCOidjrzZbOpe/3F5IEjTmZzA6HZ0ZjQGvVNHIoxI2/+pog6 v6xwb5pNOCVMkC1P0iClC/AAoVYGsYBD7//VVeUqpdV+R3t9SDodQVar03Rqz/eZsxuLWA Zkf3KIzhlbOayXK8z3/kbF641k2ZY5hlcHLhmShfjo+0m/YKbKDrPS2wPNnoCVeRasbyRs lWQR4x8EiIwtVsbBLOPqcuaKA2OZAwvnXcGYC2uZuM3AT5eJa5a+AjtpHWizlEx55fh57W QxSbSmz8GyMc7FZcALK4XOUOHBWoWL8ZdOyXJnhM65HfqnxzW4K9s2TTr8jc2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304198; a=rsa-sha256; cv=none; b=ezz2gXzSKsXTU/z6E6ZKQ+jAaE5JMFpFkzZKhHFBJhBKl62goH7+H0MyBEz1kwH+3CB8IH 7Oz1miZjgIsyAeouejkqCGYaI5V3Z/s8G4TylHiMPj8bYYQpqEh6PDYnoQd7TVdoS6elkf ZloHa9qtild33Q29Hh8XKy5ziMPjYFkopjq1sp7hLCkY3X3Jsgh16hW1vj0ZDgq5Azf6ob OQ7wAG56rhcbd5mevfHHPRsmksGyFqzwKA7cdQyaxvSmhAVVu9KkrZlFJ70B7xBQZsICTJ BqOLEWgfEC1GKS33/qiDmy2Ixj6aCXTMYo1ZWbs97prCGYYf9FkbE8vrJq5UAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6HTAINyJuBF4+RsPiz1OACG41ea1pwsZ6dtS8qmjvs=; b=Ia2brGu1Z0evQshszx/tQ7l0fy/NFXr94k6XD4/2UW3Z9411TgszcLaJtczXE/94/G179T ucok9cqG2oquKbdXsNhknqr9iutyAB6baO1/ptZxjyrAs3HS5zbVUblXv0HUMiU6iL972j roMcnCeCp7/aV13mGfV6XR+HvMCqu8jRW/p/MUYukE2UDWLVpRZQcydC4cjoFy9q8hBj61 IPTTykIub6APBQgw1jVvMNijzCAMlpNzQuZGKnj21aCSEFPoRx2L+pmAKAg9IF2uyPnkJE +c5LCy5oQQjgwulc7qTPxemVQL82xNwD26EMVajSna9JqCbSm3HCNULy0XHDmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpkM96hB1zZBh; Mon, 11 Dec 2023 14:16: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 3BBEGb7S072034; Mon, 11 Dec 2023 14:16:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGbHX072031; Mon, 11 Dec 2023 14:16:37 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:37 GMT Message-Id: <202312111416.3BBEGbHX072031@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: 03a07de0d5ee - main - arm: Handle VFP exceptions from the 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03a07de0d5ee7d58069152070c42d55f7ec32b7c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=03a07de0d5ee7d58069152070c42d55f7ec32b7c commit 03a07de0d5ee7d58069152070c42d55f7ec32b7c Author: Mark Johnston AuthorDate: 2023-12-11 14:08:34 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:08:34 +0000 arm: Handle VFP exceptions from the kernel vfp_bounce() is called when handling an undefined instruction exception, to see if we need to enable the VFP. Previously it would unconditionally panic if the exception came from the kernel, which was simply wrong, and it did not permit lazy initialization of VFP state in the kernel. However, this functionality can be useful and is supported by arm's fpu_kern_enter() implementation. Thus, relax assertions and consume the exception if the thread was in an FPU section. Based on a patch from Stormshield. Reviewed by: andrew MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D42971 --- sys/arm/arm/vfp.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index f2979d4a2b27..bbcb468391b6 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -196,8 +196,9 @@ vfp_init(void) SYSINIT(vfp, SI_SUB_CPU, SI_ORDER_ANY, vfp_init, NULL); -/* start VFP unit, restore the vfp registers from the PCB and retry - * the instruction +/* + * Start the VFP unit, restore the VFP registers from the PCB and retry + * the instruction. */ static int vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) @@ -206,9 +207,6 @@ vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) struct pcb *curpcb; ksiginfo_t ksi; - if ((code & FAULT_USER) == 0) - panic("undefined floating point instruction in supervisor mode"); - critical_enter(); /* @@ -242,13 +240,19 @@ vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) return 1; } + curpcb = curthread->td_pcb; + if ((code & FAULT_USER) == 0 && + (curpcb->pcb_fpflags & PCB_FP_KERN) == 0) { + critical_exit(); + return (1); + } + /* * If the last time this thread used the VFP it was on this core, and * the last thread to use the VFP on this core was this thread, then the * VFP state is valid, otherwise restore this thread's state to the VFP. */ fmxr(fpexc, fpexc | VFPEXC_EN); - curpcb = curthread->td_pcb; cpu = PCPU_GET(cpuid); if (curpcb->pcb_vfpcpu != cpu || curthread != PCPU_GET(fpcurthread)) { vfp_restore(curpcb->pcb_vfpsaved); @@ -258,7 +262,8 @@ vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) critical_exit(); - KASSERT(curpcb->pcb_vfpsaved == &curpcb->pcb_vfpstate, + KASSERT((code & FAULT_USER) == 0 || + curpcb->pcb_vfpsaved == &curpcb->pcb_vfpstate, ("Kernel VFP state in use when entering userspace")); return (0); From nobody Mon Dec 11 14:16:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpkMC2SV1z53fVH; Mon, 11 Dec 2023 14:16: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 4SpkMC1Jyhz3YZf; Mon, 11 Dec 2023 14:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=72ODTM17f+ITStBBUbP0as2G1HZT4aHzvdTUNUa06jQ=; b=gK4OctfD4+w9UQSmTx23tNYkFwEndiGWmjXffrm75lNmWTS4vlq/72Ew8N07pUj+gUKru+ NI71z/jXPXysZNZtZivydDUEnjVouUlOa/7ouqL1dOEWfRcFWbJQagUgdDTErZHiAWey6M CyHZPMJ7/9CGXPSatiUVSEQ4KlSB1EpBiZvUA0xx0fy92USFy73YFXnGc4Ky84oq0buwvV 7dP+bZzyae5j3ckDTeZcqUXrJyLbbEdmy1RE4nM+1wkTjg2ba/vJXzLhieWf5Xzd98olfp w4KaDAp0c1aryuL7O8PVGvM3uKvPKqpI7dfbZj3YRqM4/1bcH/n6xZTW9VH1UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304199; a=rsa-sha256; cv=none; b=v6gafVq1CYnX25Rj/nperI244hXe/vlWjy3quH44s5vC2S4ctN6dy02k747GlIn3Lc7vk2 cLAfn4gQTCO6sJF0Yv0DzzyXPwaenHmoqAfyDuoJLP3Kv792q32KlOgXwaQMw1F+9o4Nep XEKxhIlf3X3WzU4D7o5kWNQIHhidxrfERy92Et3i0FJ8VbjIf8V83oPeD4MZbz5M/delHP JMVAo9h/7voipGSBDAZWQwvcga01pCnCrN0MgNyp7upLpKf91mwTiDVTqWG/YfA7zSv61y lvWhLgYMdO08zxgKjZIMF39RIYkBkV+BX3+uB78vQ9x0U2CcdAgtoPjFVdYDGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=72ODTM17f+ITStBBUbP0as2G1HZT4aHzvdTUNUa06jQ=; b=nDWkcD1oLufnNIKskFx2cj0EuyX5LwzFTW/c6DWkHLEU6kCFyf1UU7MPl9b1WpZ6sNg02G 3Qz2X4utDMfD3nBchFlZ8GcB9I7npSWy3yrCudoq+TFFegZBk4X2Txp1pwprnsMJ+Kyuic Fc9iRATMtMOcz4sawfmOMgz/1Cl1qELTlM/4FACLotqojKrBwMI2LfldombMQpo+OZZfwh Ldm5S2PP7KR7O/QtcC2+RwloEM54fVoSnCJ4C+kXkrZO/5ExQpHxmh8sJTm55gvE+dAOgd F3BoIYz9zlnglmBZoSCPTK73E1uIyGe3e5yDavk5/E1pCjO5vnaa6ID6iZ8MkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpkMC0NhZzZcD; Mon, 11 Dec 2023 14:16: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 3BBEGc9X072082; Mon, 11 Dec 2023 14:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGcrP072079; Mon, 11 Dec 2023 14:16:38 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:38 GMT Message-Id: <202312111416.3BBEGcrP072079@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: ce2f34ade8b7 - main - arm: Disable the VFP during boot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ce2f34ade8b787b068085fa8a8ddd295b06c2737 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ce2f34ade8b787b068085fa8a8ddd295b06c2737 commit ce2f34ade8b787b068085fa8a8ddd295b06c2737 Author: Mark Johnston AuthorDate: 2023-12-11 14:08:49 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:08:49 +0000 arm: Disable the VFP during boot The VFP code expects the kernel to boot with VFP disabled, but some boards will boot with it enabled. Make sure that vfp_init() disables the VFP on each CPU during boot. PR: 273752 Reviewed by: andrew Diagnosed by: Thomas Skibo MFC after: 1 week --- sys/arm/arm/vfp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index bbcb468391b6..6c398a7a3eaa 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -181,6 +181,8 @@ vfp_init(void) elf_hwcap |= HWCAP_VFPv4; } + vfp_disable(); + /* initialize the coprocess 10 and 11 calls * These are called to restore the registers and enable * the VFP hardware. From nobody Mon Dec 11 14:24:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpkXY1rjNz53gLn; Mon, 11 Dec 2023 14:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SpkXX703sz3bST; Mon, 11 Dec 2023 14:24:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rEmXZb8waSTlu4fw7X+JdTXAKkbOHos2B3a+3biOoc=; b=Uf/B5a5rw/9VKSvArB0AYhsSeclXQWXyAXFLW8o3PV9yPRUDH5sWx7+7M5KyIc03decZSE TBssM5Ker6ObuqoPDZUX31T1f3c9w2qvionrVHAiOB2ojBwf166mCrI0GRnsKaxstWj33K benBDS0jkjJM2qcTTQCSvHPzBqBBg1qVFFH1npk+QRTobKTJyiGNWI4C2quh9HUPu001FV 8HMBdUtzfrhFajzDgZsRfPWQkcMzhNusRWkZgU5M43B1bpRsZEBL6rjX+9ap5sAPfIpsxn 7Cxj2zauzXuZW116Vk3O6zFrPrZAKxyBRBVbYAOBjY8pzezzJThM2YKzaOkRNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304685; a=rsa-sha256; cv=none; b=ev+KnQ5r7B6NgdW4/zIwdpwhIDEYnlpQZI0zfrXhsrgblZnKvXMNGqQmBZGGXuKA5eIR8H HDzUK9tFSr13Hxvsa7Oaz9AUdmAUQQXWFOahOJuslRAAmwNt6hVJIassnCMRPpEKknre9k HcnvBKuMKpoW9k48kmi0qBbjmOBVIFM8XizO1USogIej8GGHMLPYHCdS8wTrP33tWxHVFW 3Dq6hoH5xXdBnz+h6YOwN1wghz4D0cjMHoWK+7EGPdTeIYkBdLLdQ3CjlGPYSYud1QZ0W/ z20ex7EzNpy0X6upOydpNjGoUWD/FvAfMKZ+UTct1xtGNv6PsIlp8A9TD42KTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rEmXZb8waSTlu4fw7X+JdTXAKkbOHos2B3a+3biOoc=; b=nttBgWmpJ7EyDZ+E49yGuxqhefED/+T0x9WmNc6xM1JuILb6sYl/IBR+fg33FSYmsQjzT6 eLWxaJo0sxCzNJiGw8AZbMbxelI+nDkN3fPK0h7PN37ydyPPzZvSt0Khi5tYSpoU/HYM7o R/tMLEh1tRsyd9YqAcqch/WyLiiZNyCd2ueVSLVj9m0m+NHrr8QUiXHRm6thC3katnBeFT 9neEswrDQcaYBsAOqzTv1JCh/8wOTY+vGu8IryKEqB26ucyFsh5p3cqE3P4zv8twYuLJvB GoPYy2CByzJbA5ozomuvTul/JnySkefFKOBVmpHzM92xqelL0sRqHhIjhIi/Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpkXX65Hmzb4Z; Mon, 11 Dec 2023 14:24: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 3BBEOiNd088398; Mon, 11 Dec 2023 14:24:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEOiXQ088395; Mon, 11 Dec 2023 14:24:44 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:24:44 GMT Message-Id: <202312111424.3BBEOiXQ088395@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: 3c0fb026b2fc - main - tty: Avoid a kernel memory discloure via kern.ttys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 3c0fb026b2fc998fa9bea8aed76e96c58671aee3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3c0fb026b2fc998fa9bea8aed76e96c58671aee3 commit 3c0fb026b2fc998fa9bea8aed76e96c58671aee3 Author: Mark Johnston AuthorDate: 2023-12-11 14:19:09 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:19:09 +0000 tty: Avoid a kernel memory discloure via kern.ttys Four pad bytes at the end of each xtty structure were not being cleared before being copied out. Fix this by clearing the whole structure before populating fields. MFC after: 3 days Reported by: KMSAN --- sys/kern/tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 620233947410..e051c66ab0c9 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1288,6 +1288,7 @@ tty_to_xtty(struct tty *tp, struct xtty *xt) tty_assert_locked(tp); + memset(xt, 0, sizeof(*xt)); xt->xt_size = sizeof(struct xtty); xt->xt_insize = ttyinq_getsize(&tp->t_inq); xt->xt_incc = ttyinq_bytescanonicalized(&tp->t_inq); From nobody Mon Dec 11 15:03:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SplNx2rD2z53jH0; Mon, 11 Dec 2023 15:03:13 +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 4SplNx2MMLz3gP5; Mon, 11 Dec 2023 15:03:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702306993; 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=5b96qI2AHSNC62t86ZKipdbqPQcUEM8MPKP46pKcIvE=; b=AZamCc073Mt5fX4jyJyed4cVmkAdAl+VmaVxlTahzyuYU41t3LCnPRm2MbS1V6Dwj0ZUIe kELsq+Pg4vbkuDQFHbngpEDTWceuwgYPEkY9pMVjcZajIc1tpcYIJry5S1fR3bGuyoozvU Mbruol6d9zpumvfWQ5DKc+6gxf8eTZxQCWV4OFF6ddm8cDa9eKk9o8AQbQBxzjsQIRL8U+ mpB2P2Nz6899Hhown6j8fPA2ElPpYNC4gVQvRsgSJ3v4S9DjVz1euIxKPvM/8dTn9VxomW QtM2K0BAxVkyshQP/WlJSSGOu02TnMDTTTfGZn6MiNC++dcmHPyWolKFzMzzZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702306993; a=rsa-sha256; cv=none; b=RMSXTzAM7uank0ULVtpI0Kg1ptFw7+MFftRgx1DYTFvqrW5CU26bESdgKOYlUUmzImrzNH 9lvbYr55g5mGwwk8plkvFI+OndnIjCpb+9rZSSK+CiORm/ir2ecQ7J1CY4wxIVy7Gn81Oa wS8MIoWkocM8JbTkpNc/+dyvBnhNn+XrXiAdhU2xdozJ57veMzySI+zFAQmz/rDH2kRpFO 9bWFO8tGJpX8ptVffp37blIudK+eIowqvoEbVblLY0IQUj8YPMBMAsB/QLQ1ZGx5p3bY/j 68O5y8o7u6tHT35i3535ywlnAhdOPt8BEweCswx425NlKozOAnDHpKBmLpyDjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702306993; 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=5b96qI2AHSNC62t86ZKipdbqPQcUEM8MPKP46pKcIvE=; b=wR0ShoeKOlOyK4JVEOxBxGVJfL70KFRMYilQJYFNfCEdGDgMsHdEpCrjtvXL+JHSM/rSkQ lmzPmB1PVZNmbeTk8hl0zDBmVr/xtJqgD+95mzl6LcG0dkmSHOuKzXbYg63GfkUEWNPBdB 6f2bdiBAeATnGSVnaxn4RP4NPAQOF0hh10k/ua7o/NmFVhG23+DznzSTfThSSn/8gxWjzk TnpNKf6fONOEB2pp2Mu8X6J1Bpu8VLGqkluGTT/eGfR5wtCPXOkI9Cn5dEO0Yu2EO7ctKT 1Jpo8U/M3Zm1lWUDu+BcerMFpT4UNo2YACyJl8cwHtUBc8cSpkzRuGsbrp/y1w== 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 4SplNx04W1z1YqQ; Mon, 11 Dec 2023 15:03:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 8A4721ECAE; Mon, 11 Dec 2023 16:03:10 +0100 (CET) From: Kristof Provost To: Dimitry Andric Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Date: Mon, 11 Dec 2023 16:03:09 +0100 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> References: <202312081739.3B8HdJYC068067@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_3A3E899A-1A08-45A1-8DA9-E72DA079425D_=" --=_MailMate_3A3E899A-1A08-45A1-8DA9-E72DA079425D_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 8 Dec 2023, at 18:39, Dimitry Andric wrote: > The branch main has been updated by dim: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388dd43b217de10a3c= cb4b0219d0d > > commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d > Merge: b121cb0095c8 703029dbba78 > Author: Dimitry Andric > AuthorDate: 2023-11-30 20:06:52 +0000 > Commit: Dimitry Andric > CommitDate: 2023-12-08 17:35:59 +0000 > > Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 > > This updates llvm, clang, compiler-rt, libc++, libunwind, lld, = > lldb and > openmp to llvmorg-17.0.6-0-g6009708b4367. > > PR: 273753 > MFC after: 1 month > There appears to be some fallout in some ports. For example, devel/ivykis (but also sysutils/flashrom and = databases/rrdtool) fails like this: /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O2 -pipe = -fstack-protector-strong -fno-strict-aliasing -Wall -version-info = 5:6:5 -Wl,--version-script,../libivykis.posix.ver = -fstack-protector-strong -o libivykis.la -rpath /usr/local/lib iv_avl.lo = iv_event.lo iv_fatal.lo iv_task.lo iv_timer.lo iv_tls.lo iv_work.lo = iv_event_raw_posix.lo iv_fd.lo iv_fd_poll.lo iv_fd_pump.lo = iv_main_posix.lo iv_popen.lo iv_signal.lo iv_thread_posix.lo = iv_tid_posix.lo iv_time_posix.lo iv_wait.lo iv_fd_kqueue.lo libtool: link: cc -shared -fPIC -DPIC .libs/iv_avl.o .libs/iv_event.o = =2Elibs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o .libs/iv_tls.o = =2Elibs/iv_work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o = =2Elibs/iv_fd_poll.o .libs/iv_fd_pump.o .libs/iv_main_posix.o = =2Elibs/iv_popen.o .libs/iv_signal.o .libs/iv_thread_posix.o = =2Elibs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_wait.o = =2Elibs/iv_fd_kqueue.o -O2 -fstack-protector-strong = -Wl,--version-script -Wl,../libivykis.posix.ver -fstack-protector-strong = -Wl,-soname -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6 ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_register' failed: symbol not defined ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_unregister' failed: symbol not defined ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_register' failed: symbol not defined ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_unregister' failed: symbol not defined cc: error: linker command failed with exit code 1 (use -v to see = invocation) I believe the issue is that it doesn=E2=80=99t build inotify code on Free= BSD, = but still mentions the relevant functions in the linker script. The = other affected ports I=E2=80=99ve run into appear to have similar issues.= There=E2=80=99s likely to be a fair amount of fallout from that, e.g. = https://github.com/llvm/llvm-project/issues/75056 I=E2=80=99m not sure what the best path forward is. Should we try to make= ld = warn but not fail on issues like that, or fix each affected port or ? Best regards, Kristof --=_MailMate_3A3E899A-1A08-45A1-8DA9-E72DA079425D_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 8 Dec 2023, at 18:39, Dimitry Andric wrote:

The branch main has been updated by= dim:

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

commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d
Merge: b121cb0095c8 703029dbba78
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-11-30 20:06:52 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-12-08 17:35:59 +0000

Merge llvm-project release/17.x llvmorg-17.0.6-0-g600= 9708b4367

This updates llvm, clang, compiler-rt, libc++, libunw= ind, lld, lldb and
openmp to llvmorg-17.0.6-0-g6009708b4367.

PR: 273753
MFC after: 1 month


There appears to be some fallout in some ports.

For example, devel/ivykis (but also sysutils/flashrom and= databases/rrdtool) fails like this:

/b=
in/sh ../libtool  --tag=3DCC    --mode=3Dlink cc  -O2 -pipe  -fstack-prot=
ector-strong -fno-strict-aliasing  -Wall  -version-info 5:6:5 -Wl,--versi=
on-script,../libivykis.posix.ver -fstack-protector-strong -o libivykis.la=
 -rpath /usr/local/lib iv_avl.lo iv_event.lo iv_fatal.lo iv_task.lo  iv_t=
imer.lo iv_tls.lo iv_work.lo iv_event_raw_posix.lo iv_fd.lo  iv_fd_poll.l=
o iv_fd_pump.lo iv_main_posix.lo  iv_popen.lo iv_signal.lo iv_thread_posi=
x.lo  iv_tid_posix.lo iv_time_posix.lo iv_wait.lo    iv_fd_kqueue.lo
libtool: link: cc -shared  -fPIC -DPIC  .libs/iv_avl.o .libs/iv_event.o .=
libs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o .libs/iv_tls.o .libs/iv_=
work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o .libs/iv_fd_poll.o .libs/=
iv_fd_pump.o .libs/iv_main_posix.o .libs/iv_popen.o .libs/iv_signal.o .li=
bs/iv_thread_posix.o .libs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_=
wait.o .libs/iv_fd_kqueue.o    -O2 -fstack-protector-strong -Wl,--version=
-script -Wl,../libivykis.posix.ver -fstack-protector-strong   -Wl,-soname=
 -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6
ld: error: version script assignment of 'IVYKIS_0.29' to symbol 'iv_inoti=
fy_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol 'iv_inoti=
fy_unregister' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol 'iv_inoti=
fy_watch_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol 'iv_inoti=
fy_watch_unregister' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocati=
on)

I believe the issue is that it doesn=E2=80=99t build inot= ify code on FreeBSD, but still mentions the relevant functions in the lin= ker script. The other affected ports I=E2=80=99ve run into appear to have= similar issues.

There=E2=80=99s likely to be a fair amount of fallout fro= m that, e.g. https://github.com/llvm/llvm-project/issues/75056

I=E2=80=99m not sure what the best path forward is. Shoul= d we try to make ld warn but not fail on issues like that, or fix each af= fected port or ?

Best regards,
Kristof

--=_MailMate_3A3E899A-1A08-45A1-8DA9-E72DA079425D_=-- From nobody Mon Dec 11 15:15:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Splgq5JB4z53jnh; Mon, 11 Dec 2023 15:16:07 +0000 (UTC) (envelope-from dim@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 4Splgq12ktz4DPD; Mon, 11 Dec 2023 15:16:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702307767; 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=kvur7s7dTjXJsiD6Df25oQXRF+ccbtGoFIvaHd8h+ZU=; b=GdK53MX8cc7iXqHF7fQNBGNXyKcvIqZR6sIsYhC8wPNgkl8K/UQLtnf9aGdISQ0SAQ/47D //KLg7th54qrjvJzGMD8AEl832SXJbCcTodwrgSCpJwdwLhW15KwkYBll+R+EFK3FHbmyB jvEVlZq3+5lZVV14WWHl9Y6Or8rvGy1CamlBEl/LGkKfkxoq5wIoXxp9rovRq8S7yc7zCb glAUCbyZwoIvJjedFwwf2UkvhOPWCzR9hMvDhrXaq438tJcYqf6Mk4RGR6vBTpv4nLVSz9 atSxNDMm2KiHITi3QJAcysK+Ltx9X/uqx5R4o+MjziRKIedeNqCobICiNGXZaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702307767; a=rsa-sha256; cv=none; b=q1iJRz48Nz+FCgXQ6O00Ca+KNX7I1VQNsfAqQ3MpD9KKfozSGWBE3nibovUoOe1lu7h9Ei KFXPtpApxB9rpYErY0Z7bYapUlilyFSWrmDiIwc3NYGvakZTjjpEA6bBVuYTOD3lVb6uY2 Dy21AQdk19jZxpsTsf3fhqUCATthEXN1pP0MuoAiDfzCI5l9+jzFwvQ3tL4EEC9KgXnrW1 6UYs27CkzC/rewB19z/CJg7hd8gj5i0qFp76Cr0WVhDUCiA4W+bDcJjfxR68qmPpnuAo1Y jeiZildzAVJBB+f9qIL8G32hC4yKDHQI4M5H0pu2JMIIHpMX5x4A5yLVOx1e3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702307767; 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=kvur7s7dTjXJsiD6Df25oQXRF+ccbtGoFIvaHd8h+ZU=; b=te5Xg36CE++yicD4OfskT/uS+BgUqmf6xlLqb+7BeOkFSaNeV0+mhSOy3Jv9mOaW1tXFuX /lCJQPQN9pCqAio/JNcb3NyO4Ybx02nzdMDqOyU6wt6+TEI8a/Qzd+j27L4WjCaLbrTETB z9UTWEUjhUeYfGlI3/sB66u7bR9k0Rat1I1XBXWTjIeDw51xREoWTgQLBbDv44tB9VP2yg gd/+DuFQouosz/PgrSSXJX8tw43dE8vxuRO8Pc5KeBXq+4CE2RUa5m+xg3TrWZyeAicvI6 Duk4onNFV9N/jjaxeYJ12otGh9Mcpe4smviZs4NBG2LR5DUdOiL3cPHrOPQxgA== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher 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 "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Splgp6Wpjz1Zw9; Mon, 11 Dec 2023 15:16:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D5BFC34B7C; Mon, 11 Dec 2023 16:16:05 +0100 (CET) From: Dimitry Andric Message-Id: <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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 \(3731.700.6\)) Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Date: Mon, 11 Dec 2023 16:15:48 +0100 In-Reply-To: Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Kristof Provost References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45 Content-Type: multipart/alternative; boundary="Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0" --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 11 Dec 2023, at 16:03, Kristof Provost wrote: > On 8 Dec 2023, at 18:39, Dimitry Andric wrote: > The branch main has been updated by dim: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388dd43b217de10a3ccb4= b0219d0d = > commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d > Merge: b121cb0095c8 703029dbba78 > Author: Dimitry Andric > AuthorDate: 2023-11-30 20:06:52 +0000 > Commit: Dimitry Andric > CommitDate: 2023-12-08 17:35:59 +0000 >=20 > Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 >=20 > This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb = and > openmp to llvmorg-17.0.6-0-g6009708b4367. >=20 > PR: 273753 > MFC after: 1 month >=20 >=20 > There appears to be some fallout in some ports. >=20 > For example, devel/ivykis (but also sysutils/flashrom and = databases/rrdtool) fails like this: >=20 > /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O2 -pipe = -fstack-protector-strong -fno-strict-aliasing -Wall -version-info = 5:6:5 -Wl,--version-script,../libivykis.posix.ver = -fstack-protector-strong -o libivykis.la -rpath /usr/local/lib iv_avl.lo = iv_event.lo iv_fatal.lo iv_task.lo iv_timer.lo iv_tls.lo iv_work.lo = iv_event_raw_posix.lo iv_fd.lo iv_fd_poll.lo iv_fd_pump.lo = iv_main_posix.lo iv_popen.lo iv_signal.lo iv_thread_posix.lo = iv_tid_posix.lo iv_time_posix.lo iv_wait.lo iv_fd_kqueue.lo > libtool: link: cc -shared -fPIC -DPIC .libs/iv_avl.o = .libs/iv_event.o .libs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o = .libs/iv_tls.o .libs/iv_work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o = .libs/iv_fd_poll.o .libs/iv_fd_pump.o .libs/iv_main_posix.o = .libs/iv_popen.o .libs/iv_signal.o .libs/iv_thread_posix.o = .libs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_wait.o = .libs/iv_fd_kqueue.o -O2 -fstack-protector-strong = -Wl,--version-script -Wl,../libivykis.posix.ver -fstack-protector-strong = -Wl,-soname -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6 > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_register' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_unregister' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_register' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_unregister' failed: symbol not defined > cc: error: linker command failed with exit code 1 (use -v to see = invocation) > I believe the issue is that it doesn=E2=80=99t build inotify code on = FreeBSD, but still mentions the relevant functions in the linker script. = The other affected ports I=E2=80=99ve run into appear to have similar = issues. >=20 In this case, if it never builds the inotify code, you can safely delete = those symbols from the linker version script. > There=E2=80=99s likely to be a fair amount of fallout from that, e.g. = https://github.com/llvm/llvm-project/issues/75056 >=20 > I=E2=80=99m not sure what the best path forward is. Should we try to = make ld warn but not fail on issues like that, or fix each affected port = or ? >=20 I fixed dozens of ports for this in https://bugs.freebsd.org/273753, but = I haven't gone over all of them, since I have limited resources. That said, there are generally two ways to fix this: either add = -Wl,--undefined-version to the linker flags, or actually remove the = undefined symbols from the linker version scripts. Example of the former: = https://cgit.freebsd.org/ports/commit/?id=3De0c21e404ed0f04c06c3bce7dd093c= 6e5ffea188 : --- a/java/openjfx14/Makefile +++ b/java/openjfx14/Makefile @@ -95,6 +95,9 @@ _INSTALLDIR=3D ${PREFIX}/${PKGBASE} CFLAGS+=3D -Wno-error=3Dincompatible-function-pointer-types .endif +# Suppress errors with lld >=3D 17 due to undefined symbols. +LDFLAGS+=3D -Wl,--undefined-version + post-extract: ${MKDIR} ${WRKDIR}/jars .for f in core grouping queries queryparser sandbox Example of the latter: = https://cgit.freebsd.org/ports/commit/?id=3Daef056cf0fe1852a7b708d090310a6= eb4853b269 : --- = a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym= +++ = b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym= @@ -1,5 +1,5 @@ ---- ext/pg_query/pg_query_ruby.sym.orig 2023-06-25 07:13:00 UTC +--- ext/pg_query/pg_query_ruby.sym.orig 2023-11-19 20:29:16 UTC +++ ext/pg_query/pg_query_ruby.sym -@@ -1 +1,2 @@ - _Init_pg_query +@@ -1 +1 @@ +-_Init_pg_query +Init_pg_query -Dimitry --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 On 11 Dec = 2023, at 16:03, Kristof Provost <kp@FreeBSD.org> = wrote:
On 8 Dec 2023, at 18:39, Dimitry Andric = wrote:

The branch main has been = updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388= dd43b217de10a3ccb4b0219d0d

commit = 5c16e71d30c388dd43b217de10a3ccb4b0219d0d
Merge: b121cb0095c8 703029dbba78
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-11-30 20:06:52 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-12-08 17:35:59 +0000

Merge = llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367

This updates llvm, clang, compiler-rt, libc++, = libunwind, lld, lldb and
openmp to llvmorg-17.0.6-0-g6009708b4367.

PR: = 273753
MFC after: 1 month


There appears to be some fallout in some ports.

For example, devel/ivykis (but also sysutils/flashrom and = databases/rrdtool) fails like this:

/bin/sh ../libtool  --tag=3DCC    =
--mode=3Dlink cc  -O2 -pipe  -fstack-protector-strong =
-fno-strict-aliasing  -Wall  -version-info 5:6:5 =
-Wl,--version-script,../libivykis.posix.ver -fstack-protector-strong -o =
libivykis.la -rpath /usr/local/lib iv_avl.lo iv_event.lo iv_fatal.lo =
iv_task.lo  iv_timer.lo iv_tls.lo iv_work.lo iv_event_raw_posix.lo =
iv_fd.lo  iv_fd_poll.lo iv_fd_pump.lo iv_main_posix.lo  iv_popen.lo =
iv_signal.lo iv_thread_posix.lo  iv_tid_posix.lo iv_time_posix.lo =
iv_wait.lo    iv_fd_kqueue.lo
libtool: link: cc -shared  -fPIC -DPIC  .libs/iv_avl.o .libs/iv_event.o =
.libs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o .libs/iv_tls.o =
.libs/iv_work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o =
.libs/iv_fd_poll.o .libs/iv_fd_pump.o .libs/iv_main_posix.o =
.libs/iv_popen.o .libs/iv_signal.o .libs/iv_thread_posix.o =
.libs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_wait.o =
.libs/iv_fd_kqueue.o    -O2 -fstack-protector-strong =
-Wl,--version-script -Wl,../libivykis.posix.ver -fstack-protector-strong =
  -Wl,-soname -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_unregister' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_watch_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_watch_unregister' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see =
invocation)

I believe the issue is that it doesn=E2=80=99= t build inotify code on FreeBSD, but still mentions the relevant = functions in the linker script. The other affected ports I=E2=80=99ve = run into appear to have similar = issues.

In this case, if it = never builds the inotify code, you can safely delete those symbols from = the linker version script.

There=E2=80=99s likely to be a fair amount of fallout from = that, e.g. https://github.= com/llvm/llvm-project/issues/75056

I=E2=80=99m = not sure what the best path forward is. Should we try to make ld warn = but not fail on issues like that, or fix each affected port or = ?




--- a/java/openjfx14/Makefile
+++ b/java/openjfx14/Makefile
@@ -95,6 +95,9 @@ _INSTALLDIR=3D =  ${PREFIX}/${PKGBASE}
 CFLAGS+=3D       = -Wno-error=3Dincompatible-function-pointer-types
 .endif

+# Suppress = errors with lld >=3D 17 due to undefined = symbols.
+LDFLAGS+=3D   =    -Wl,--undefined-version
+
 post-extract:
        ${MKDIR} = ${WRKDIR}/jars
 .for f in = core grouping queries queryparser = sandbox


--- = a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym=
+++ = b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym=
@@ -1,5 +1,5 = @@
---- = ext/pg_query/pg_query_ruby.sym.orig       =  2023-06-25 07:13:00 UTC
+--- = ext/pg_query/pg_query_ruby.sym.orig       =  2023-11-19 20:29:16 UTC
 +++ = ext/pg_query/pg_query_ruby.sym
-@@ = -1 +1,2 @@
- = _Init_pg_query
+@@ -1 +1 = @@
+-_Init_pg_query
 +Init_pg_query

-Dimit= ry

= --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0-- --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXcnpAAKCRCwXqMKLiCW o2wvAKDRVumoSrgNKyR3a8ZAyvXl9FgtQACgtG+38ivaq2zYKtAHDifxS7kwCJY= =N/rs -----END PGP SIGNATURE----- --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45-- From nobody Mon Dec 11 16:37:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpnTS2W4Tz53pGP; Mon, 11 Dec 2023 16:37: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 4SpnTS1zF9z4L37; Mon, 11 Dec 2023 16:37:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702312636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdsCzoyNwbNixhoTdKYZhPL0HXlPNhR34wnpEIuShM0=; b=igf9L7zKDhS5PsolXA9uEiDPhJ2EtqPf7B/HqHXHwTYEc26wBd+GfjXi055NCx5ZgFghvM lMrx6aKfbI7RsO/fTJzK7IXtGANWmpb8216TRL72/VObMDyEzzqNQ/G4+MUEl6wbGbsgRj 1P/lEniA8DyPf7+QjhNTZgwSUZD7hHYuvr61P+Cc9kpvrxD6A9Fy97Mn+ebb5ULwMXVzKj tKMM6j0qBHWFme3YHnzTbj5M8TDlUS4N5JLuGsv6q/NfLNZ2QyiP03fu8pk/9uIRnJS/sg 0aheNY581ipINRdpzg0aAniOxyEUZD9QnY1jNBPYlsGpZfsAsEDOBHKWLwFMVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702312636; a=rsa-sha256; cv=none; b=LN1NU7IT2xj3fjh67zkYgkIYpOHgeey2IZ4O8H4qy68hzqNREXoSJUENyeKiUPwvqWO963 Rgequn3DAZdgzixx+xUmrYwV0WT9/lNc6l81kwrynwnF3rcFpuwQXLJFdWYzHp6bQLdVuK CMxwqVZBWhn+Pshfsawka67K+5tcd1ApJjEdSS+aQ/t2Lft/rQvJ6Qb6oD8Dfj+RVjZlaN H6U60+JmsnDd0QB87pApA06lLVRUVHjOcK5FfmxYUWfWiyR9WILEHKIY7Mw7fINwWeNIeg MC73f5bEP8XfjPNq21JLD2OsNT6h2zMf2WNDDOt8m8lGjT4/fPGQM2njoGkG8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702312636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdsCzoyNwbNixhoTdKYZhPL0HXlPNhR34wnpEIuShM0=; b=uP8H9tWPD8x8mJ7qVjV45gcb9k8cA6WPvb7KH6hJLF9HYR033trEbKnXR3f6GnUBLJ5dQ8 LBMQXBh6T3jAVIVxCTjEhk7z97o6yNhbE+idw70kzOfx5+6OEn4aUABAxDHb/mA8oXlZtv wecBQdHP/r6Wo74TmGl2+uomNcIayJ7nbkhIjNWgI/RoKl8NXXczg0XXE2y9LNklLVzNIb 6Ktezy7SPbyEqyaolX4Gj901C4wbaEHQA5bkGHLdelmCmehT8O50mwkgVBp5UotxudEPW6 xNJqNu/dyS+ISC5T2pZWvUBVteSvAp/bWA3c9Pg5Z/hwbTBj/R5WNumUCGZNqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpnTS11bszdqc; Mon, 11 Dec 2023 16:37: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 3BBGbGpK005712; Mon, 11 Dec 2023 16:37:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBGbGa5005709; Mon, 11 Dec 2023 16:37:16 GMT (envelope-from git) Date: Mon, 11 Dec 2023 16:37:16 GMT Message-Id: <202312111637.3BBGbGa5005709@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: 99bcbef25a7a - main - libpfctl: remove stray debug printf() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 99bcbef25a7a96f3d4525cc48bf9f0a177194694 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=99bcbef25a7a96f3d4525cc48bf9f0a177194694 commit 99bcbef25a7a96f3d4525cc48bf9f0a177194694 Author: Kristof Provost AuthorDate: 2023-12-11 13:35:42 +0000 Commit: Kristof Provost CommitDate: 2023-12-11 15:53:38 +0000 libpfctl: remove stray debug printf() Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 513d2d0f01be..10a63f15e2f8 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1108,10 +1108,8 @@ pfctl_add_rule(int dev __unused, const struct pfctl_rule *r, const char *anchor, seq_id = hdr->nlmsg_seq; - if (! snl_send_message(&ss, hdr)) { - printf("Send failed\n"); + if (! snl_send_message(&ss, hdr)) return (ENXIO); - } while ((hdr = snl_read_reply_multi(&ss, seq_id, &e)) != NULL) { } From nobody Mon Dec 11 18:10:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpqYc2QbFz53vj7; Mon, 11 Dec 2023 18:11:00 +0000 (UTC) (envelope-from fluffy@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 4SpqYc209Bz4Vfc; Mon, 11 Dec 2023 18:11:00 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702318260; 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=v4P6aDC9NaDKsUzjy8kX61jqWK4rG2TAATuCkpxsoVM=; b=ZN9uYfqvRShvXW7zCX3vJ4ZmPjb2g8/Hi9iuXRdIUr7+6A4ZVCSeWHGE37p2D/TZz9EDfB 3lpP631KyLxr7TH1fkX7TcXzfAKGDfOxGq/LzIgCuZziFk4RPw8pZZbKZlVZJJpCPq22b/ bVeyxLjl8HgdOz23dccYPIC6k8YWZeWau+3+fskghqKjREwyRDHBpOxl3Qrx/G3lnfPxCx fCRRxTqcBMVtofWrIZ7zL3jr8gd+hsJmOBK+24soyMXFJPtMqNW4YF5DMNF6OeBl7plkbd RVjYnSWyd+0nBjP9bYyek8elxOAI6IroY94gHQMEHCR+LksAUijqhy26qmwJGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702318260; a=rsa-sha256; cv=none; b=BPDK6uQOqkquyvEhjSTdVhDy2HrausxxgjKH52dnirbm7hV8CqdgfX+NmlL6HR9o/ljA2G 2mu/ZEqEPOlHIqcQtLGQWWkKAmCWWuHa9u0LR3SpDgOqO4Adu/RYBOFp9Y2kPgxc/vC18i hbpNDpthvx6KSzsCrU7yrrz5m18RazCl8kSAU1uF2hAgEc/UsNVw4N+PCTtHJJ19FVFL7W Rwhd7OgeNm/AwnrSl0Q2xpthn6Hmi89Jo/HKYftwOLDNDPSBOfhl/9Dki0PJrV8NoT4VR4 H6lk7xws2ivLPJWBNloyM6wnEDFTZplZSu3dQtXXPncMdR0HWW/TYwGolV21iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702318260; 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=v4P6aDC9NaDKsUzjy8kX61jqWK4rG2TAATuCkpxsoVM=; b=R3PsU7uqeoZ8CkDYT5sQm2IVEgVxF83tuSYajvp17z3P0TKfGseQZsOafkWAhG6Cgfb1O5 yrY2KtRitrmxCyWIbfC3gG/+jrXlZMgY67gmFmMuJk7Vkfe2VUtLxnUtsiDye1lYbXHHy+ ik3g7q+MwNFDAm1TSy19pnYaxV/Jx3Z7tFEn/POa9ix0EZdTFe3fuLk5cSMwi8zQ+ChZmQ 9ecG4H10tR4FNGryb8mvIxPTRyRrMXQvxnJwzy609KDjQcWTwcc3C//Pj14lPc03UYH5Bn ZoYys7f6z1AKDtMFP1ud/uMTCqKNL0Wk+FSDFKC/R0LvbZZNma3Mw4gc9jpqLQ== Received: from [10.216.0.102] (unknown [188.243.165.67]) (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: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SpqYY5wd7z1dD7; Mon, 11 Dec 2023 18:10:56 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> Date: Mon, 11 Dec 2023 21:10:51 +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: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Content-Language: ru, en-GB, en-US To: Dimitry Andric , Kristof Provost Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> From: Dima Panov Organization: FreeBSD.org In-Reply-To: <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------VQ5g0I7KPfBim1yvqjVDdAKY" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------VQ5g0I7KPfBim1yvqjVDdAKY Content-Type: multipart/mixed; boundary="------------iqvY3ZYJohnKQr4Ap86XTs14"; protected-headers="v1" From: Dima Panov To: Dimitry Andric , Kristof Provost Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-ID: <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> In-Reply-To: <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> --------------iqvY3ZYJohnKQr4Ap86XTs14 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 DQoNCk9uIDExLjEyLjIwMjMgMTg6MTUsIERpbWl0cnkgQW5kcmljIHdyb3RlOg0KPiBPbiAx MSBEZWMgMjAyMywgYXQgMTY6MDMsIEtyaXN0b2YgUHJvdm9zdCA8a3BARnJlZUJTRC5vcmc+ IHdyb3RlOg0KPj4gT24gOCBEZWMgMjAyMywgYXQgMTg6MzksIERpbWl0cnkgQW5kcmljIHdy b3RlOg0KPj4NCj4+ICAgICBUaGUgYnJhbmNoIG1haW4gaGFzIGJlZW4gdXBkYXRlZCBieSBk aW06DQo+Pg0KPj4gICAgIFVSTDogaHR0cHM6Ly9jZ2l0LkZyZWVCU0Qub3JnL3NyYy9jb21t aXQvP2lkPTVjMTZlNzFkMzBjMzg4ZGQ0M2IyMTdkZTEwYTNjY2I0YjAyMTlkMGQgPGh0dHBz Oi8vY2dpdC5mcmVlYnNkLm9yZy9zcmMvY29tbWl0Lz9pZD01YzE2ZTcxZDMwYzM4OGRkNDNi MjE3ZGUxMGEzY2NiNGIwMjE5ZDBkPg0KPj4NCj4+ICAgICBjb21taXQgNWMxNmU3MWQzMGMz ODhkZDQzYjIxN2RlMTBhM2NjYjRiMDIxOWQwZA0KPj4gICAgIE1lcmdlOiBiMTIxY2IwMDk1 YzggNzAzMDI5ZGJiYTc4DQo+PiAgICAgQXV0aG9yOiBEaW1pdHJ5IEFuZHJpYyA8ZGltQEZy ZWVCU0Qub3JnPg0KPj4gICAgIEF1dGhvckRhdGU6IDIwMjMtMTEtMzAgMjA6MDY6NTIgKzAw MDANCj4+ICAgICBDb21taXQ6IERpbWl0cnkgQW5kcmljIDxkaW1ARnJlZUJTRC5vcmc+DQo+ PiAgICAgQ29tbWl0RGF0ZTogMjAyMy0xMi0wOCAxNzozNTo1OSArMDAwMA0KPj4NCj4+ICAg ICBNZXJnZSBsbHZtLXByb2plY3QgcmVsZWFzZS8xNy54IGxsdm1vcmctMTcuMC42LTAtZzYw MDk3MDhiNDM2Nw0KPj4NCj4+ICAgICBUaGlzIHVwZGF0ZXMgbGx2bSwgY2xhbmcsIGNvbXBp bGVyLXJ0LCBsaWJjKyssIGxpYnVud2luZCwgbGxkLCBsbGRiIGFuZA0KPj4gICAgIG9wZW5t cCB0byBsbHZtb3JnLTE3LjAuNi0wLWc2MDA5NzA4YjQzNjcuDQo+Pg0KPj4gICAgIFBSOiAy NzM3NTMNCj4+ICAgICBNRkMgYWZ0ZXI6IDEgbW9udGgNCj4+DQo+Pg0KPj4gVGhlcmUgYXBw ZWFycyB0byBiZSBzb21lIGZhbGxvdXQgaW4gc29tZSBwb3J0cy4NCj4NCltza2lwXQ0KPiBJ IGZpeGVkIGRvemVucyBvZiBwb3J0cyBmb3IgdGhpcyBpbiBodHRwczovL2J1Z3MuZnJlZWJz ZC5vcmcvMjczNzUzIDxodHRwczovL2J1Z3MuZnJlZWJzZC5vcmcvMjczNzUzPiwgYnV0IEkg aGF2ZW4ndCBnb25lIG92ZXIgYWxsIG9mIHRoZW0sIHNpbmNlIEkgaGF2ZSBsaW1pdGVkIHJl c291cmNlcy4NCj4gDQo+IFRoYXQgc2FpZCwgdGhlcmUgYXJlIGdlbmVyYWxseSB0d28gd2F5 cyB0byBmaXggdGhpczogZWl0aGVyIGFkZCAtV2wsLS11bmRlZmluZWQtdmVyc2lvbiB0byB0 aGUgbGlua2VyIGZsYWdzLCBvciBhY3R1YWxseSByZW1vdmUgdGhlIHVuZGVmaW5lZCBzeW1i b2xzIGZyb20gdGhlIGxpbmtlciB2ZXJzaW9uIHNjcmlwdHMuDQo+IA0KDQpCVFcsIGxhbmcv Z2NjMTMgZmFpbHMgdG8gYnVpbGQgb24gMTUvYWFyY2g2NCBhZnRlciB0aGlzIGltcG9ydCB3 aXRoIGxvdHMgb2YNCg0KL3Vzci9pbmNsdWRlL2MrKy92MS9sb2NhbGU6MzQzNDozMTogZXJy b3I6IGF0dGVtcHQgdG8gdXNlIGEgcG9pc29uZWQgaWRlbnRpZmllcg0KICAzNDM0IHwgICAg ICAgICBfX2gucmVzZXQoKGNoYXJfdHlwZSopbWFsbG9jKF9fZXhuICogc2l6ZW9mKGNoYXJf dHlwZSkpKTsNCiAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF4NCg0K DQpGdWxsIGxvZzogaHR0cHM6Ly9wZW9wbGUuZnJlZWJzZC5vcmcvfmZsdWZmeS8tbG9nLzE1 MGFhcmNoNjQvZ2NjMTMtMTMuMi4wXzEubG9nDQoNCg0KSnVzdCBjdXJpb3VzIGJ1dCBnY2Mx MiBpcyBmaW5lIG5vdw0KDQotLSANClNpbmNlcmVseSwNCkRpbWEgKGZsdWZmeUBGcmVlQlNE Lm9yZywgaHR0cHM6Ly90Lm1lL0ZsdWZmeUJTRCkNCihkZXNrdG9wLCBrZGUsIHgxMSwgb2Zm aWNlLCBwb3J0cy1zZWN0ZWFtKUBGcmVlQlNEIHRlYW0NCg== --------------iqvY3ZYJohnKQr4Ap86XTs14-- --------------VQ5g0I7KPfBim1yvqjVDdAKY Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmV3UKsFAwAAAAAACgkQ+4ugndU5jylT hw/+Ib84n3D+wtK73qPIvN4r+K4AINHz18VJlhdqBEIgjbczOgRO3bMiaHgYG+Tk1TBtj+AkNaUn qnX95whtD+u/7oo0uUVAioRJ+eMW/8/Kl2NCU7XHPFtAR67pf5MOyWjQVj+CY9Nl8oTxHmzCEQUx XCeBpZS8PbrGVk2O4sMLKHyRLTeKfpf3wP7wbh/2VH1cKKj1FWEbVHglOrPdVkOIbuCIeZxF/Fg0 /vE3UxKYFWevRxZEODmi8I4lxJpVBHpc37Z0kHR2/ZWsCpN6VTaqU/NA+2VhUP/MBO3WPY1dQ0+V KfVlMdqVoMamhWAz3zxga6Ia50fxMxCQOQjwlGs9ow10GiErokaTLpbWKSTyQz2fuV3cqWtAUt0Z jJcSLqDzMM3B7P7KpKwLddnZTaST+MRi+o+IolRD0RkVE9VDhN8ua2iLFP+uLvpSIRqFRGG0ikHp 1ZZxnJTqH2kWwoP99TbbiVLwvXLWu0Jr4xdRl0qc+230XTFQL4eQCApvd9AfjklbL65KBKkI/g6T Mi7duw/oY6BIxWkslajJalToPlzq3AEffGAhDNsCDGZSXFu9yPqgPWSxlgIQFqlA73hCbFPdGsqZ kutI8+ldTvLyCbIAllJaCvx+KvymrfZlOgvdbKcdG/rDZtjA3NMRyxcmW1B6BKdRmopK8pMt06Ep W7E= =rNuc -----END PGP SIGNATURE----- --------------VQ5g0I7KPfBim1yvqjVDdAKY-- From nobody Mon Dec 11 18:21:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpqpG6RCjz53w6l; Mon, 11 Dec 2023 18:21: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 4SpqpG603Xz4Whl; Mon, 11 Dec 2023 18:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702318918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfmEFtDI3dlfU22gQ82krJ0V0WC1/I3q0y4h89GklDk=; b=QJY3hu7fqjLwvp5U2/SePJf3rQ8Gn9LuJCp9uUeEW18UGSnGBOFsvfBGGRXDGAoBk3JBzf /+vhvT5hRN49GC/DC5YziVNHG6xC28jez5y3zSyouV4agwbIYhLmd84Tu1jv8IsXrdi4OA /8jdtEk+KmMfNumO3xsgyMIHznI0lBppCmWhPbfv8sgnQhWLe8hQ8hLNDDkZogV8p681vy UIp6w8L1Xguc+w9cgY15kRLNASYCjQNy7l6r7I1yvLV+YljqqWBcUGa/djRccMhGIjhtVX eK4zDKcVtEw8BoHQQ2fhMH77jlEBevxMwes1ko/tMbGBRt0F1dHi86rTzFRaMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702318918; a=rsa-sha256; cv=none; b=C+Dn3PzOmh0TIpFvcZyKHOuocDNF9reVtRwT8qHf57oSfuyjeSPGf2Kjaw55g9FVWzoin9 2N+fDR8Idir9Fj2dDFPTRD4mtUTxL8urtgyLqxBmBkUv6VUL9Imij0YG6H2g0FNJ4/fBLq a8OXqz4l6Ajbt4joI5wS5N1950RcDGKhLhVW2qKp1/hJrQPEsWB+5odgShoN6RyXZdukw1 X8205EPPav7tBrgAi+JYzo7aQrepaMw8TmnOVuzoCENAf2A9K1V1xricxzXiyGjuEjZFlU bxHbcvsgKo8RewAHv5ZLZ8PgzjUnfhTpEyoIbTOmFY9rK9/ZTsBYWRL17TAFbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702318918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfmEFtDI3dlfU22gQ82krJ0V0WC1/I3q0y4h89GklDk=; b=SjPI+owh6dtap7XwOhG3yP0s97MAQBWxxST4NXjwRH6+j94BKJWFUIYDPxBpufkJXwvdCH MkKi/8HS3HXTQjb+OpTVTpcNwnarFUus7jcpH8WXH+o2Vd6ormGufQ/vvXNQ4wKQ0/WXj/ 9mF5VbrCVdjKThN0Mqtct5H1XWOMCxFYVL1kwIp7MuSB/akGNe6O/r4QnLM/tMKM42en/t nbBh8UY6KR68YMPVSFUyHtFofdePNAXMwaKEIBoqXhQWedpstVqMd+3uzL4he5J3vaxh3r AeuvJzM1+bO1N9INmYF7xGQTA5h43UoZg1JlciI/H5Ihe/LCOhsBjVKwGxJXUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpqpG53wPzj5R; Mon, 11 Dec 2023 18:21: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 3BBILw85087719; Mon, 11 Dec 2023 18:21:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBILwSh087716; Mon, 11 Dec 2023 18:21:58 GMT (envelope-from git) Date: Mon, 11 Dec 2023 18:21:58 GMT Message-Id: <202312111821.3BBILwSh087716@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: 7df526eb10c9 - main - look(1): Correct the example's description List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 7df526eb10c9095e4988e77900f60ba00c42b095 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=7df526eb10c9095e4988e77900f60ba00c42b095 commit 7df526eb10c9095e4988e77900f60ba00c42b095 Author: Raghu Ranganathan AuthorDate: 2023-11-30 12:57:35 +0000 Commit: Li-Wen Hsu CommitDate: 2023-12-11 18:19:21 +0000 look(1): Correct the example's description Remove an extra 'e' in the example command. It is a prefix, not a typo. This is from the Advanced UNIX Programming Course (Fall’23) at NTHU. MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/913 --- usr.bin/look/look.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/look/look.1 b/usr.bin/look/look.1 index ff868d129a84..7d0b74b43486 100644 --- a/usr.bin/look/look.1 +++ b/usr.bin/look/look.1 @@ -95,7 +95,7 @@ utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred. .Sh EXAMPLES Look for lines starting with -.Ql xylene +.Ql xylen in the file .Pa /usr/share/dict/words : .Bd -literal -offset indent From nobody Mon Dec 11 18:26:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpqwC2TDYz53wR5; Mon, 11 Dec 2023 18:27:07 +0000 (UTC) (envelope-from dim@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 4SpqwC1zmGz4XSX; Mon, 11 Dec 2023 18:27:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702319227; 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=2i+D81Lk3N9lkHkAVtWafQ4gFgXELLm3duKNpr2GLEQ=; b=QwgTcp3c79K3n8/zdMrmfuojdSDSpjInyinCt85k4L4k9R0D/GNPTE2oaqzIhCl1FfFV+P /kPN0vvoSKIgqKwIktjVMGBEV5ezyKwDjVjsYIrHZ4KrJUCgJjD6u1jvfzqOKkwZM99Yh1 D9NP2CT8BUrMLNe6LB45AcLWtvn8zDklxhN2JpyOnwJxu1Vb5Mt+QnnP5xvmYEBVAVequ2 Jq3aMEPFFRPfEhURE0OrUVDfSnGt8/KM35HEYYA27TOxRwRkp/w+MBFzMGtjjBP6lSKpZQ LfqqamSw6bPYwpdHe0eDK60xTHg/9YL/+pLVjK1d4I7ZnmWCep9bs3GMJTKhvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702319227; a=rsa-sha256; cv=none; b=bDVqWnVXJytbs1zASesFunU45As/DzJKmM4ZSpxdEG/vxezx9ogVOizUS7PttS9EshBL8G za8rNiFgYsuKjnphgpH8BxsISEH7fQdeqGtrRJJj2/qYR6J298satPSWh3zSVbaV0XilFD ezBhjb9Ff/BvTj1d2cXmSFNLXwSkLlAu28r4+jEXRPkm2r8enUfD/q8S05b4Q4UZxot8Al xW8DawUqF/PgPiYvzMIZ/fdWtsL39prrFOyuR6zPG3r+Whz9DjRWYTAVTyji8leBR1K5Yj xRQESMzkMzB26plg5DB97Yi1dj0GmYDDVn8M2fH9736/Ubb1hGunPF7y9EnmEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702319227; 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=2i+D81Lk3N9lkHkAVtWafQ4gFgXELLm3duKNpr2GLEQ=; b=tPEOPN4L6LrJAPvT3qpU+jk11sco9pKwiqopSZxFmtOnHE6285yK5dm0/cjJS8Qxjsj9Wi OZm56RGMX19UYE+HhoK1CcqLGRgV4dz5MNQRLtV3IPm0va75OS5e4sod16PVLPRXbJfcoN HvEepKALNDbI6I0/F88hsDXv4kftOWgeZ/zbQYbpRSd9kq00xs9fJv4YR25ZwreP1LlIN0 ac6xfI67UYedFQhUmn8GYSHORJ2nWyMnjjTR4VV5KOk1jB7TFD+fq22KMnMSkJwLAC4Bmy yPsRNBmh/OMO8rLyk03dpkcVKrU+SJYaVq1eWgYkYapCgeNrhBYE6+C3wTAkFw== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher 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 "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SpqwC0Kkvz1dMK; Mon, 11 Dec 2023 18:27:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B08FC34FD1; Mon, 11 Dec 2023 19:27:05 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_82D86BE6-86AA-4791-B21D-82FA2BAEB562"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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 \(3731.700.6\)) Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 From: Dimitry Andric In-Reply-To: <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> Date: Mon, 11 Dec 2023 19:26:47 +0100 Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> To: Dima Panov X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_82D86BE6-86AA-4791-B21D-82FA2BAEB562 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 11 Dec 2023, at 19:10, Dima Panov wrote: >=20 > On 11.12.2023 18:15, Dimitry Andric wrote: >> On 11 Dec 2023, at 16:03, Kristof Provost wrote: >>> On 8 Dec 2023, at 18:39, Dimitry Andric wrote: >>>=20 >>> The branch main has been updated by dim: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388dd43b217de10a3ccb4= b0219d0d = >>>=20 >>> commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d >>> Merge: b121cb0095c8 703029dbba78 >>> Author: Dimitry Andric >>> AuthorDate: 2023-11-30 20:06:52 +0000 >>> Commit: Dimitry Andric >>> CommitDate: 2023-12-08 17:35:59 +0000 >>>=20 >>> Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 >>>=20 >>> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, = lldb and >>> openmp to llvmorg-17.0.6-0-g6009708b4367. >>>=20 >>> PR: 273753 >>> MFC after: 1 month >>>=20 >>>=20 >>> There appears to be some fallout in some ports. >>=20 > [skip] >> I fixed dozens of ports for this in https://bugs.freebsd.org/273753 = , but I haven't gone over all of them, = since I have limited resources. >> That said, there are generally two ways to fix this: either add = -Wl,--undefined-version to the linker flags, or actually remove the = undefined symbols from the linker version scripts. >=20 > BTW, lang/gcc13 fails to build on 15/aarch64 after this import with = lots of >=20 > /usr/include/c++/v1/locale:3434:31: error: attempt to use a poisoned = identifier > 3434 | __h.reset((char_type*)malloc(__exn * = sizeof(char_type))); > | ^ >=20 >=20 > Full log: = https://people.freebsd.org/~fluffy/-log/150aarch64/gcc13-13.2.0_1.log >=20 >=20 > Just curious but gcc12 is fine now I have seen this error too, but could only reproduce it outside of = poudriere, so I didn't take it too seriously. It is easy to fix; I have = a patch, shall I commit it? :) -Dimitry --Apple-Mail=_82D86BE6-86AA-4791-B21D-82FA2BAEB562 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXdUaAAKCRCwXqMKLiCW ozQmAKCGhMB+/s1rQRp+aaVpJeB+KeYltwCbB67VHzOsUF5N/2DkdQVdL65knCQ= =CiAA -----END PGP SIGNATURE----- --Apple-Mail=_82D86BE6-86AA-4791-B21D-82FA2BAEB562-- From nobody Mon Dec 11 19:27:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpsFw3Dxxz540Ln; Mon, 11 Dec 2023 19:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SpsFw2dwVz4djF; Mon, 11 Dec 2023 19:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702322852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CzgUtuqeVm542QXKbkVCw8+PcBpCNNOm0f5g3YOZ9iM=; b=rVo1Gw7eGRKbb3J9AkI3iIgBc+DyitbGAvzWuYsV3LDZ5txiKdTXmd1pwD1SK/Pzej/3vp MaWt8YuoYBSLoRerUtusoEd4FjARMJwOqPs6VrqBr3pxeleE+Di2En7Qdy2yEfn2jKIpUf FDejf0xYYhlwk6scdsfeJRWMRLTzFoUu1sHN4nfjknfv4lFdJBbm2uavg8S8W99xPReNXC O8rgjQJ1lsFwCbBk8uBbk1T/iphC/h8pAeZb+dh4riWLWoLJXDNDOEa78Tjwuowhab5YnL oQ2ttWDUtQxYmyMG8wRXpM0sj3U9TcjhRkBYsnFUiYYDfxuAAkt3srar15NC4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702322852; a=rsa-sha256; cv=none; b=WiaHcX9Kw9+6p+6VwZayq/27Jt6V2dOhBoalnsazyTii5f0sLA146LrWZPGhXiqkpvwjxp gFa5pnH5m+fnL+Hret3VLfnFKT4I5z5JHKKxvF9Uqw0V1nAFTrQ0zG37SzePaCy0sndIct rlnFHv2tUx+ZRgrSnfR6o0f/88afjIJUD/ZeYSb8Hm1KwrXhi/bTcnPYTcasBUdLKtMdrH jbDEzpwZlp1tuYhztMfQDgiaqWzdo7pAfubhCYoP4mggidYcAMuN4TPQMhFxJznNlL5aWh GvdzUBCGjIC3oFfH6LDFa5GccPAe6xaARxMmF9BV2zXFcKmvU9ldXpWJYvjRkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702322852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CzgUtuqeVm542QXKbkVCw8+PcBpCNNOm0f5g3YOZ9iM=; b=bX3Ny7R8u3VRqgnPh2Gdu7cf8YcbtiMMGzwHdquTjbIEzhaaqTPG7y/qQ9kOveBLU4Kv4b PzK5pxVETS1HKNpIdn5CwuCdeSasqPrXT02p+SKdtULXn8eofS84Qz3+H7ydyu3oJtot1l r97cd19tBJ6jynb+laBxv/R23T+Roa2/zeY1WjdVLlKoWftRBHqO1q6d5m36t/VUVt3k65 Ih62ale5xkJ/6z1B3b27836tj2Sy/qqp+xkVqiPqS+PRqJa1C7tYLGlVQj7/3a+Zrn+2Qz kEC8m21pJbLOKl6IV+qJe6GzsXFLSLcTuF3DuylHqlM7k8vJoU7yUA91xr7WQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpsFw1ftDzkHx; Mon, 11 Dec 2023 19:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BBJRW3V091355; Mon, 11 Dec 2023 19:27:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBJRWon091352; Mon, 11 Dec 2023 19:27:32 GMT (envelope-from git) Date: Mon, 11 Dec 2023 19:27:32 GMT Message-Id: <202312111927.3BBJRWon091352@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: 8ccd0b876e67 - main - libc: expose execvpe for Linux compat List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ccd0b876e67fda6249f294ff484798cc1e1569f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8ccd0b876e67fda6249f294ff484798cc1e1569f commit 8ccd0b876e67fda6249f294ff484798cc1e1569f Author: Brooks Davis AuthorDate: 2023-12-11 19:24:53 +0000 Commit: Brooks Davis CommitDate: 2023-12-11 19:24:53 +0000 libc: expose execvpe for Linux compat We already implemented execvpe internally with an _ prefix in libc so go ahead and expose it for compatibility with Linux. This reverts c605eea952146348e5e1ad5cab6c127d7a1bd164. Bump __FreeBSD_version for the addition and add definitions to supress compat shims in libzfs (zfs changes were merged from upstream). PR: 275370 (request and exp-run (thanks antoine!)) Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42846 --- cddl/lib/libzfs/Makefile | 1 + cddl/usr.sbin/zfsd/Makefile.common | 2 +- include/unistd.h | 1 + lib/libc/gen/Symbol.map | 4 ++++ lib/libc/gen/exec.3 | 24 ++++++++++++++++++++---- lib/libc/gen/exec.c | 4 ++-- lib/libc/gen/posix_spawn.c | 4 ++-- lib/libc/include/libc_private.h | 3 --- sys/sys/param.h | 2 +- 9 files changed, 32 insertions(+), 13 deletions(-) diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index ee57c30cc6ca..c05fe0c1c12b 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -99,6 +99,7 @@ CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -DHAVE_EXECVPE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h CFLAGS+= -DSYSCONFDIR=\"/etc\" CFLAGS+= -DPKGDATADIR=\"/usr/share/zfs\" diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index 1755031fee72..c1ed4bba9289 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -22,8 +22,8 @@ CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -I${SRCTOP}/cddl/usr.sbin -# use issetugid(2) CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -DHAVE_EXECVPE LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl uutil zutil diff --git a/include/unistd.h b/include/unistd.h index e3e5675b3da0..8a01d563fe99 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -501,6 +501,7 @@ int eaccess(const char *, int); void endusershell(void); int exect(const char *, char * const *, char * const *); int execvP(const char *, const char *, char * const *); +int execvpe(const char *, char * const *, char * const *); int feature_present(const char *); char *fflagstostr(u_long); int getdomainname(char *, int); diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index b68d63b279f3..51c7348c5cc4 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -457,6 +457,10 @@ FBSD_1.7 { __cpuset_free; }; +FBSD_1.8 { + execvpe; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3 index 539a4b2ba42d..8f866e5ab321 100644 --- a/lib/libc/gen/exec.3 +++ b/lib/libc/gen/exec.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 22, 2020 +.Dd December 11, 2023 .Dt EXEC 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm exect , .Nm execv , .Nm execvp , +.Nm execvpe , .Nm execvP .Nd execute a file .Sh LIBRARY @@ -56,6 +57,8 @@ .Ft int .Fn execvp "const char *file" "char *const argv[]" .Ft int +.Fn execvpe "const char *file" "char *const argv[]" "char *const envp[]" +.Ft int .Fn execvP "const char *file" "const char *search_path" "char *const argv[]" .Sh DESCRIPTION The @@ -97,6 +100,7 @@ The .Fn exect , .Fn execv , .Fn execvp , +.Fn execvpe , and .Fn execvP functions provide an array of pointers to null-terminated strings that @@ -110,9 +114,10 @@ be terminated by a pointer. .Pp The -.Fn execle +.Fn execle , +.Fn exect , and -.Fn exect +.Fn execvpe functions also specify the environment of the executed process by following the .Dv NULL @@ -134,6 +139,7 @@ Some of these functions have special semantics. The functions .Fn execlp , .Fn execvp , +.Fn execvpe , and .Fn execvP will duplicate the actions of the shell in searching for an executable file @@ -144,6 +150,7 @@ For .Fn execlp and .Fn execvp , +.Fn execvpe , search path is the path specified in the environment by .Dq Ev PATH variable. @@ -269,7 +276,8 @@ The .Fn execl , .Fn execle , .Fn execlp , -.Fn execvp +.Fn execvp , +.Fn execvpe , and .Fn execvP functions @@ -307,6 +315,9 @@ and functions conform to .St -p1003.1-88 . +The +.Fn execvpe +function is a GNU extension. .Sh HISTORY The .Fn exec @@ -330,6 +341,10 @@ The .Fn execvP function first appeared in .Fx 5.2 . +The +.Fn execvpe +function first appeared in +.Fx 15.0 . .Sh BUGS The type of the .Fa argv @@ -340,6 +355,7 @@ parameters to .Fn exect , .Fn execv , .Fn execvp , +.Fn execvpe , and .Fn execvP is a historical accident and no sane implementation should modify the provided diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index d2181c6e2b91..d9285733e965 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -136,7 +136,7 @@ execv(const char *name, char * const *argv) int execvp(const char *name, char * const *argv) { - return (_execvpe(name, argv, environ)); + return (execvpe(name, argv, environ)); } static int @@ -288,7 +288,7 @@ execvP(const char *name, const char *path, char * const argv[]) } int -_execvpe(const char *name, char * const argv[], char * const envp[]) +execvpe(const char *name, char * const argv[], char * const envp[]) { const char *path; diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index b1bb49d63ffd..a067d1f68ea5 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -226,7 +226,7 @@ struct posix_spawn_args { #if defined(__i386__) || defined(__amd64__) /* * Below we'll assume that _RFORK_THREAD_STACK_SIZE is appropriately aligned for - * the posix_spawn() case where we do not end up calling _execvpe and won't ever + * the posix_spawn() case where we do not end up calling execvpe and won't ever * try to allocate space on the stack for argv[]. */ #define _RFORK_THREAD_STACK_SIZE 4096 @@ -253,7 +253,7 @@ _posix_spawn_thr(void *data) } envp = psa->envp != NULL ? psa->envp : environ; if (psa->use_env_path) - _execvpe(psa->path, psa->argv, envp); + execvpe(psa->path, psa->argv, envp); else _execve(psa->path, psa->argv, envp); psa->error = errno; diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index a9ad2ef21b0b..bfeada696538 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -422,9 +422,6 @@ int __sys_futimens(int fd, const struct timespec *times) __hidden; int __sys_utimensat(int fd, const char *path, const struct timespec *times, int flag) __hidden; -/* execve() with PATH processing to implement posix_spawnp() */ -int _execvpe(const char *, char * const *, char * const *); - int _elf_aux_info(int aux, void *buf, int buflen); struct dl_phdr_info; int __elf_phdr_match_addr(struct dl_phdr_info *, void *); diff --git a/sys/sys/param.h b/sys/sys/param.h index c79c46ab4342..20f0af949110 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 1500006 +#define __FreeBSD_version 1500007 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Mon Dec 11 21:02:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SpvMx71NZz545Bb; Mon, 11 Dec 2023 21:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SpvMx6CsDz4p5l; Mon, 11 Dec 2023 21:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702328573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aaF3hxDsvbLmTBev2TLRlIXHQuAVx+TIvz9WFUKxGRc=; b=HP8JoKFk46z8CtpYEqRwNAf7NhbmA0Xcrdmiyh2HrizwBL124IX8YUzKJM4ufC3dWgkJXT vTZD8xXdwdiZgTCroTFF7FS9ZNMJFVxarGC/+icLnuMR3zp1OhXEphQ11u+8/4qLzhfcgh Q0TEQHPTYLZCFwrUqvoRG/2o9/GqLOWMaYkoDRGH9SEhTOZgf0UCdn0UN029eh7MahQ24W +HYK5/9p7y4ADeXaLUI9Da0fe3UpWfowlPw31OrR2G9h6lWI3gcqoz2P6F35LIxqaDN4K0 MS2E6B/mbm3JslVg1YSbjt6S/sBOPPfs6pvY+WlfdWQleyROvCtqm8bSgx5nww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702328573; a=rsa-sha256; cv=none; b=wuvq+xOE4hpVMdVZIg9POkrk3aieNxAu/kkDpwjrBz5WWbUxpVpmFpYZ3lheTD/D3Jibzi /CXnD+W/kFVkRzYOLtdxFs6kZZOIJS8kPKH80tBdYf9cFm76dsvYaykuNHBZx3pccIX7nB aS6TJS1FzEf/MY40hFT52UzVqeW6YbbsT0Jm+slkwQSmOya9bAVB5Z0+7zhI+Abk59ZmDI TG9AhZMkz3858sWnwj/RQmvyZDrBpB9KvncJE2NO7fKsX9qCmZMCRdQUWX6hOh0m7x8hC8 iiUtjoMd9ZI7gjz18Y8VX22WltGsYcIxfkdpSKdMw4IwtF0qEDL9ds92z4pAyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702328573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aaF3hxDsvbLmTBev2TLRlIXHQuAVx+TIvz9WFUKxGRc=; b=VJA3ItTOOFfa2BFrmHuks0/jJ7rPBpAlV+7/lLMupQireQJjgQc6OWD703ZaKnJ0M9jDAB Qq771rPZws3r6ewJn2ZF4HAd1CMBCfpAsYwlGhCxQQV58JE7487GgjQgkTW4ouBIdx3jTA 5D+GH5JsfzWzB87N5jiJPpIOfjkdD2BmPFr+bu5AnpAl+h30EvrYQGoZiEEXulWs9rutG+ UIg+1ai3OwxFkUjU5ioRyX3kO0mxcrgp7JHkKgoQ4UkuDUamvUFwsLUuWpfnAxB9rQiSTF 1YnfDPA1Jx97ZDtUR9e0g2G9HVzQPzooA/nNKTlDq0ch1rpX7NXpX//BTU05Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SpvMx5KyZzmnL; Mon, 11 Dec 2023 21:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BBL2r6G057796; Mon, 11 Dec 2023 21:02:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBL2rdU057793; Mon, 11 Dec 2023 21:02:53 GMT (envelope-from git) Date: Mon, 11 Dec 2023 21:02:53 GMT Message-Id: <202312112102.3BBL2rdU057793@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: e249f5daa41f - main - pf: fix memory leak on rule add parse 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e249f5daa41f73eb293490ed93d06d1fefa08d82 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e249f5daa41f73eb293490ed93d06d1fefa08d82 commit e249f5daa41f73eb293490ed93d06d1fefa08d82 Author: Kristof Provost AuthorDate: 2023-12-11 19:43:20 +0000 Commit: Kristof Provost CommitDate: 2023-12-11 19:53:00 +0000 pf: fix memory leak on rule add parse failure Reported by: Igor Ostapenko Reviewed by: Igor Ostapenko Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_nl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 86cc5ba9cc91..67a7392ae448 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -625,8 +625,10 @@ pf_handle_addrule(struct nlmsghdr *hdr, struct nl_pstate *npt) attrs.rule = pf_krule_alloc(); error = nl_parse_nlmsg(hdr, &addrule_parser, npt, &attrs); - if (error != 0) + if (error != 0) { + pf_free_rule(attrs.rule); return (error); + } error = pf_ioctl_addrule(attrs.rule, attrs.ticket, attrs.pool_ticket, attrs.anchor, attrs.anchor_call, nlp_get_cred(npt->nlp)->cr_uid, From nobody Mon Dec 11 22:16:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Spx0N3vqhz549R4; Mon, 11 Dec 2023 22:16: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 4Spx0N3PmLz4v4X; Mon, 11 Dec 2023 22:16:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702332964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUa435suj2XUrTiEQrKZN6uhRE8yP6vrIYD299xaQsg=; b=AmuG5EvT0fYq7q1YqcEPbgB1MnYZcdPGU1owDrNoEN4lLm4EuTSeq1qb4VEykVCo+uiQ5q ZQOq799jhvSM/wSwgTTW06STLY19qlAOf0+3fBNE9xy6AF784AW2jDZTxQ8/3Bh+bRQjV2 DUZ3Enzlu/AgCm4r8OWTcy8SNpTStHNAgpROQp9wJ/SvMRIs6z9CGqVQBvSkx4hSjoz0NZ emsxBCB403DiOKpcXmAQmlj8sAacIAqR7lHeH5KeptIJZ7wArNSXXprlkZGYM4S9VOOX+P jzh9JXpZnk1N5Ns73r8TvXjilxNFVjwjevvxV16PhrHBiKkwRhaVX5g5wwa8tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702332964; a=rsa-sha256; cv=none; b=mXX0e0tNnaFdl580xS8KWEbYIC8tyUIFcNDAeyRLhkdUxoiI8nUC03B6iU2yzoA2/exzW1 EQYDJ04MeVpmTeKYFpSW3ZwXcW1Ck5KDpjwooqibYzknUuWIc53Hck0cFghVzC3UOTpMFV qaZy14FMOP2MSDg0tECu2RzRlSoe6U2YysVBCvasHtNpOItcQwHKEnVgVY1imf7x2GQaYk sC1nPXMbGIBR176Lw1r3GsHXrcvgeFF9As60nJssWmUrkG5ZlQuxE7UMWM/xOddLXDOePs wMS/1KjX8vA7tjnV+aRxzQLgipDg26LUFpdqTgXMXB1IGKP0u2O8tmZYAhByJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702332964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUa435suj2XUrTiEQrKZN6uhRE8yP6vrIYD299xaQsg=; b=eXMJ2BiBn42u6RuBq8UN27yI54WUoob46BmYjtws+27jq6vKJZ7tG2VHkdkdI1FYlAjseS O8bVS+yJN/wviXykb4AogANuBBo12HZQjg+Genn5wuvEa76moHdDXuhem6sX+Cov+uOoWd N4LBv6e5z+HwelHpJdw3l7wKf57e15diRnrNVHrs0jH79irMhBm/GGPfZd/mSYg/RnieMi upX1UES1tJZni/D45hJywM1g7HVSp+AZ+2OEpROB+OpSwqtr3oDLfGnAdZgqrHO3uzv3OH 0e+o1EvgNjM6yz4OKJQVs5tRcucNaclD+5WICqVWDviETvKBgAX3eIFGVRj+NQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Spx0N2RxKzpW2; Mon, 11 Dec 2023 22:16: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 3BBMG4N2076215; Mon, 11 Dec 2023 22:16:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBMG440076212; Mon, 11 Dec 2023 22:16:04 GMT (envelope-from git) Date: Mon, 11 Dec 2023 22:16:04 GMT Message-Id: <202312112216.3BBMG440076212@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: d5c6b32a31ac - main - socket.9: Catch up with commit cfb1e92912b4c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: d5c6b32a31ac36faea7091d55c8b8c2ee38a7d79 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d5c6b32a31ac36faea7091d55c8b8c2ee38a7d79 commit d5c6b32a31ac36faea7091d55c8b8c2ee38a7d79 Author: Mark Johnston AuthorDate: 2023-12-11 22:13:21 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 22:15:54 +0000 socket.9: Catch up with commit cfb1e92912b4c Fixes: cfb1e92912b4 ("sockets: don't malloc/free sockaddr memory on accept(2)") Reported by: Mina Galić --- share/man/man9/socket.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/socket.9 b/share/man/man9/socket.9 index 7eb55fd205e0..fb0ead0e20e1 100644 --- a/share/man/man9/socket.9 +++ b/share/man/man9/socket.9 @@ -36,7 +36,7 @@ .Ft void .Fn soabort "struct socket *so" .Ft int -.Fn soaccept "struct socket *so" "struct sockaddr **nam" +.Fn soaccept "struct socket *so" "struct sockaddr *nam" .Ft int .Fn socheckuid "struct socket *so" "uid_t uid" .Ft int From nobody Tue Dec 12 04:02:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sq4hF6mPNz53K18; Tue, 12 Dec 2023 04:02: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 4Sq4hF64JQz4CwZ; Tue, 12 Dec 2023 04:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702353757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekLSbFB7qIpw6KKAjWNw5ohK6FmCLqe/f67NHrWrh7o=; b=dP25VJKwpIoqr4vV37YYgJfzutInzlda+pPLQIDhlfKhPae/kRktnfV83H+xZkxDdjOlOn EQlq4/Fbvz+vcEULFph4ldzxethN+o8h2Puisg/ROcDiDMFbKbt9vlERtsukg+8441Qq/X Grdg5VAFNj25B7VZxi6XlJuTC+kXOLyawVcP5JYP3QoBAHH+0t89p7xoOOmiqyiyC7JwPT K6t+1KRkbkG8Im8cnC38w99FRzm/pCl+UqrhdLA6kuGwHQZln1xb+XIg0Rqe9uCLgm57VP H1AuDm0xkeLHLGmt4eX6VyEBOCgUjgRE0KwOVUY7OsO5HYBEwtzJPvzjQl3m2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702353757; a=rsa-sha256; cv=none; b=P5fFj2218hxREC4FMQ04L9anvN12Iq26TVbd7ckRcP+y1kySu44PBncDSt2GeF3RESFGBn X7g5WlNSt/jCp8L82eU3ihL0OlYI2lceevW7gaIdZqnAb1PKTSL4KRxz4RqFtUDwScVX/H GQoWm+wWjqP2QBvhmdneUr5ybetbnFeVYlRGZWsikzCQ+cEYf2m5ClXgT6en77hzdfoKjm Yj2CDK/bcjErMYJwfpQYEPXtW36CE4njEyhktJFvrOFsSfWEK/fwuE7nO26Uy0k38ADfnb DWWMh2VVMpSfIQOUSvFnyUyjGb4Czx9mC4Ekx3MrXI9HnS61N/jFH1Iysdyikg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702353757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekLSbFB7qIpw6KKAjWNw5ohK6FmCLqe/f67NHrWrh7o=; b=OVC6ulUVkRyZkWuRycDBOlvLXtU3LjdOTE+qDuRBhwAMShS2nzOIzyqDBlIWiWsRU3Mm65 9w8KcL9TksKjinloeyV63stgR/9AgueIuNLKWhbVjilDje+EvXd5Y2zFmUoms32HdXn0o/ W1VZFz2KQveZW5QtgpEWVl7rEFHj5H/HI49XZnCCO+Hprt2dPNSSi6KDs6jD6KsOTae6sD 2gT7LGZXWgdgzJKjSZbdL4ElqhZT+pfOvsBUz5HUG86VMpbjSTry0QW9Qqq4Z5l+y2Wr1R 9OAfOze9OdHC2DFNVLHTI02rhlTtGF8G/f+D4gFABcrrF/Pgs8MJ4AVjtzmL8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sq4hF58bWz10Jc; Tue, 12 Dec 2023 04:02: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 3BC42bSf062405; Tue, 12 Dec 2023 04:02:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC42bE0062403; Tue, 12 Dec 2023 04:02:37 GMT (envelope-from git) Date: Tue, 12 Dec 2023 04:02:37 GMT Message-Id: <202312120402.3BC42bE0062403@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: 0365e5fc905b - main - if_tun: check device name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0365e5fc905b425313a0a2d89f0d8e2566924df2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0365e5fc905b425313a0a2d89f0d8e2566924df2 commit 0365e5fc905b425313a0a2d89f0d8e2566924df2 Author: Konstantin Belousov AuthorDate: 2023-12-12 00:13:59 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-12 04:02:11 +0000 if_tun: check device name to avoid panic if the name already exists, which is possible with the interface renaming. PR: 266999 Reviewed by: kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43001 --- sys/net/if_tuntap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index fccc666e2a00..4cb219dc92b6 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -820,7 +820,7 @@ tun_create_device(struct tuntap_driver *drv, int unit, struct ucred *cr, make_dev_args_init(&args); if (cr != NULL) - args.mda_flags = MAKEDEV_REF; + args.mda_flags = MAKEDEV_REF | MAKEDEV_CHECKNAME; args.mda_devsw = &drv->cdevsw; args.mda_cr = cr; args.mda_uid = UID_UUCP; From nobody Tue Dec 12 05:14:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sq6H04h9Dz53PNw; Tue, 12 Dec 2023 05:14: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 4Sq6H048XNz4L96; Tue, 12 Dec 2023 05:14:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=chQz0xv/hQlsaCtZCv+V6YcBrYzQsqiCxgW30fKxGAo=; b=UMVevyAk1p+a68GzeNr7x1bQAOU3K5sejmaF3uv2hRIFD0kJB4YBz731knmwqiriQep8/r 7pYRHle3Snx6XLo8RdJNIjcb/CzAOyoIdZLUMz3Rx7eDK9MpdyVp5PLKsNXYu/x561qkOa x1yFlA9xLyJXmAgZSNuZOpcxjMos2JdfaxOLIKL9PoKcc4ff8UMkOPCKjqeBxwV5WEoKKC jt6lu3KnBaA3+Qr5TlKAAaWGzKuLEB/0lHREGeMW3K/jSGQZFjiLZnpmIo0B2OQ4BVsyf4 IpFuNtHrzJ+nUGhZ4kiCi5nstDEtrt5JHFqHqRuoyr8WsqDDMYfAoKKuhraCvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702358060; a=rsa-sha256; cv=none; b=WAJ+CRp4emkDOwRwC+8F8KB7eDe8SGFLyuswWY5OqqkL1SecfMltkFJxBgz2nhVoZSaDML qyFq6q0Jy6ze1r1uZaMyszYDEaxtlern+QslY/W71HkM7aOXp6Ftjw+lqiY+WlHxZeJPMn kBioszs7tlVFx/e0iM0W35N2oW3KXwS6uCYfANu4TW9l6AyK3B63Tx52fkLdO3UgdDmh7V ewTrBrmrPeSPfRgtIiCi8mz+0huK1hPOYYtM7AAMplw8bnCAnVgRdnXd/UxnWA5gDIKhqA DBBiRfS5zKarcTlQf8WtRimjgEEoWeV5zE59cGLnIywi1+6HhMqFGk+fnQ3IMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=chQz0xv/hQlsaCtZCv+V6YcBrYzQsqiCxgW30fKxGAo=; b=qfqbMWs1fIsMxswZeRaGwBUJZMlXxbRKhVyZlY+COwwW12UwmzUfy2SJZbEJC/J5gKu3um GktimmQUfYKBImdA1rgRI/UNoArlsrtM5PNuHkc2Pz/wiyS7p5o5CjMHCI0rVCcj+utwhX W0aXZCO1enYJm4ChD13kC8QQAICpdImhmPbcBsRTpqjTMx8DDpenCfcDx5VUiP2fW/0eFB aId3HkKijuxtby0TfzfpC4flE6sHboDzvptbuSwamF0nhIWN1KV1pykGg3YwvPUscLpDj8 FQnRv/PB41sDGj5UrjJI33SleGT9knUbR0ZZnUsyxPCE8ItlW0p/IePtPp+1lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sq6H039CYz12F0; Tue, 12 Dec 2023 05:14: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 3BC5EKoW079296; Tue, 12 Dec 2023 05:14:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC5EKLF079293; Tue, 12 Dec 2023 05:14:20 GMT (envelope-from git) Date: Tue, 12 Dec 2023 05:14:20 GMT Message-Id: <202312120514.3BC5EKLF079293@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: 9ab58f9784c5 - main - cam: Virtual SIMs communicate via the network too List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 9ab58f9784c5f2c9d0cd46c7ac107bf35f8c2dff Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9ab58f9784c5f2c9d0cd46c7ac107bf35f8c2dff commit 9ab58f9784c5f2c9d0cd46c7ac107bf35f8c2dff Author: Warner Losh AuthorDate: 2023-12-12 04:50:26 +0000 Commit: Warner Losh CommitDate: 2023-12-12 05:12:13 +0000 cam: Virtual SIMs communicate via the network too A virutal SIM can also be connected via the network for iSCSI or NVM over fabrics. Sponsored by: Netflix --- share/man/man4/scsi.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/scsi.4 b/share/man/man4/scsi.4 index 7cf6dc00cf58..0e349ba60f0d 100644 --- a/share/man/man4/scsi.4 +++ b/share/man/man4/scsi.4 @@ -22,7 +22,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd September 15, 2023 +.Dd December 11, 2023 .Dt CAM 4 .Os .Sh NAME @@ -367,7 +367,7 @@ SIM used to stand for SCSI Interface Module. Now it is just SIM because it understands protocols other than SCSI. There are two types of SIM drivers: virtual and physical. Physical SIMs are typically called host bus adapters (HBA), but not universally. -Virtual SIM drivers are for communicating with virtual machine hosts. +Virtual SIM drivers are for communicating with network or virtual machine hosts. .Sh FILES see other .Nm From nobody Tue Dec 12 05:14:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sq6H20RxDz53PbV; Tue, 12 Dec 2023 05:14: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 4Sq6H157WVz4L9S; Tue, 12 Dec 2023 05:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=guBrzWoxkG8vUHANeWFmmL9B/DWbzo5rwQvxVKjJ4Z0=; b=XGKZBQK6+Wh9Lq9gw97ohkgU2c/qmzTDGPXBzKwJze1wx9knCwqZGjDqLWYik4ljq7WPmn 8j3XYiixj2STJ4o6+lhTxsrtjfTwkL04M95gckRr8bdPPjfV1xuEWJ80B0h23z0LvggN/7 shaleb3/59z5A5bnPrkPexWYmGkpn0HpK/pEdoPciSnxVhVVNcq1eRfWvW9rNHwdwQ5Xws Ph+uBwsuWqKso6lqqDKcutUi/nKx3vRGAK1grZOmqbDeGrb8x+UynwRgliertTQ9XaSuVA xsphdr1GIExYrlJuyqq4I2Xtku5ieXaLz0TTY269vcj0jkLQUcwuWHRt4pi6tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702358061; a=rsa-sha256; cv=none; b=XM7sWdI/mBy+e88K+2PjbGMLoBpQBWt+F9c7lp6fGbu+Qfvj9ikGK+XUU9kkQNVGyAzZ4h PcU+JtbaSvRxXyhHRZkjbPZS9/QbGf2oGn2LeC4E5R8cs0JL6P5j7YSDVroa0bNDvqkZVH 1HIzyPPuzRWB4QLgZ+5DNrZ5c51qCbiRh54iQ5gjOQTPMW5EqvjJKHYcBjgWyrpctiOmNC 1MvNE9gWwHLCWM+B0aP3mAQE+KJG9/8i8nUzxOlsWsnaQlNLfYf/91tl1vdNkiU1i5brGe gljYOY1vLRgWFHM+RkpyEajRLrTSARA2BEpoo5VttNziJof4PriuNu6IhgHZbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=guBrzWoxkG8vUHANeWFmmL9B/DWbzo5rwQvxVKjJ4Z0=; b=H9TB38l3pGl1m6WDuFzooXgVva6BC7yfacHA/py3BfctQnIozZZC5MPNIp84a+oePVZ4CV 7ywvnfcRLQ+lyOSitkYT3Hp4QPc50bNFcWTo2vzYIbxCFqe2zmJo0QqUsHbSGQPHd8a49+ /qPha6vkRx2SCH85TAa/8zp6NPRP9uUc2/SexuAAjBdvvGfV0//tsJqeS9UTZNFW0vDp9c VMgma9oxKEkF+ChVDH+0e8a0t00ver8XnNfCctJE1sLk8xT1aHXmw5dkd1UG2kgOK/GPn/ MZiO/9JZRfTi8Ky/UklAvmH8GrhJ6eLdZJ0gg5Shb/aBMaTIw4BG00Amn3x05A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sq6H141d6z11cp; Tue, 12 Dec 2023 05:14: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 3BC5ELNW079341; Tue, 12 Dec 2023 05:14:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC5ELAx079337; Tue, 12 Dec 2023 05:14:21 GMT (envelope-from git) Date: Tue, 12 Dec 2023 05:14:21 GMT Message-Id: <202312120514.3BC5ELAx079337@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: 3fbed93203cb - main - cam.4: Modernize examples List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 3fbed93203cb6347c02cd8e4f1e21fa93f42c44d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3fbed93203cb6347c02cd8e4f1e21fa93f42c44d commit 3fbed93203cb6347c02cd8e4f1e21fa93f42c44d Author: Warner Losh AuthorDate: 2023-12-12 05:08:55 +0000 Commit: Warner Losh CommitDate: 2023-12-12 05:12:13 +0000 cam.4: Modernize examples Use mpr1 instead of ahd1 and ahci1 instead of ahc1. ahc and ahd haven't been relevant for a while. Also update the transfer size HBAs can do from from 64k to 1MB. Sponsored by: Netflix --- share/man/man4/scsi.4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man4/scsi.4 b/share/man/man4/scsi.4 index 0e349ba60f0d..380768c2d7c1 100644 --- a/share/man/man4/scsi.4 +++ b/share/man/man4/scsi.4 @@ -190,25 +190,25 @@ Individual bus numbers can be wired down to specific controllers with a config line similar to the following: .Bd -literal -offset indent -hint.scbus.0.at="ahd1" +hint.scbus.0.at="mpr1" .Ed .Pp This assigns .Nm bus number 0 to the -.Em ahd1 +.Em mpr1 driver instance. For controllers supporting more than one bus, a particular bus can be assigned as follows: .Bd -literal -offset indent -hint.scbus.0.at="ahc1" +hint.scbus.0.at="ahci1" hint.scbus.0.bus="1" .Ed .Pp This assigns .Nm bus 0 to the bus 1 instance on -.Em ahc1 . +.Em ahci1 . Peripheral drivers can be wired to a specific bus, target, and lun as so: .Bd -literal -offset indent hint.da.0.at="scbus0" @@ -279,7 +279,7 @@ or bus and the system. The maximum size of a transfer is governed by the adapter. -Most adapters can transfer 64KB in a single operation, however +Most adapters can transfer 1MB in a single operation, however many can transfer larger amounts. .Sh TARGET MODE Some adapters support From nobody Tue Dec 12 05:15:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sq6J51SYpz53Pnk; Tue, 12 Dec 2023 05:15: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 4Sq6J50wW7z4M2w; Tue, 12 Dec 2023 05:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kx9oW4wqQihhxvHgoqEp6Rf8IH1f5KDXQqoIn+8BGLM=; b=IBg8za2Ar8WEFf4Hyx42uszSVHGfU+wJfXJ8QDgcg3Tw6UVlC9mD+KD6iVp1rHPix/Lvt2 OUWByD3nlYYAMAwOkL3cg1FXV/B85YUnYb8OWVnY1dSJC0goZ4UhWSIahTxzVw5UQE7tfq tjSJKDVN9jn/pDWMajaKK9hjCk8I28Z4J76ckEST02i+WvHQl03Uf4yaZDv2/c7QlZHmfw IJpirIuCX9vh8HHZTnP+QtwN8B9RCTziaLB09nSmj6kdcrRsvgt5iNNiynKS5PUpPWznTl AFT32hejyBAW19aVIDDcBpgdGWG970MyYNXzAW/fWub6XvpSH4X4wPLOnlCxpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702358117; a=rsa-sha256; cv=none; b=ZSuMiWRaN1beY0qcC02CU62vN/t/SXWnAZEJr8YLsqJDlx+J88H4171DwzxMBCk/MQEaNs WeXIcGzm0tmGE5WH4AK8OgrrgYKIFFNi1xSxsUMEC9P7kV3w4HTvICK7VD+RCrPV+UBlgu GyVVNV4M7tPEFsVlNA7dTkW8v8m9jZFjsdpcs4jErMx/yf7RDPWXtHSLScIVXh9IXagp/2 npsxlSa54VstQ4G96rrUZQXXQHtpfJ2aWvl97o7WReEk2TDJgBOg5q338zP229wbjkLtJg l+7/U29nwD8QHwf6wvCBPbpDhtYF/Xk8iDORXunRjscBXFnrm0KWEO23Il8QTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kx9oW4wqQihhxvHgoqEp6Rf8IH1f5KDXQqoIn+8BGLM=; b=qy0j77MDKxCG1NglIseJdSmwDkTQ3y32+QsLS9zPlho7ndiNye63Z3i/ki6FFB5wvBaBCp uZW8B6tgxwuMxzyifikGW1uaHUkmPWvqFaBZvom4mbQZ6JTlZrJW4PkvP0QY3MuovYLkYW Q9NPKGEnpQTBew457yoiKnsKF5rUBBZg3kqj2ZDNqpK9tdiheAVj3RONC71iwhrU9KkGg2 HX9gJGkMMLmckxoDaGnAJFK4SpexeJBiJjA/vEZE98cHPJFWrMLd7ZgKQVIima0j1Yj7ld jF8aC3iCGuXqH+UCbHJHBhoQYZrmBI7FOGAkw6oiLYUNcZ03uLiKZvJtffmLtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sq6J4755Qz12HQ; Tue, 12 Dec 2023 05:15: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 3BC5FGfV079629; Tue, 12 Dec 2023 05:15:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC5FG9j079626; Tue, 12 Dec 2023 05:15:16 GMT (envelope-from git) Date: Tue, 12 Dec 2023 05:15:16 GMT Message-Id: <202312120515.3BC5FG9j079626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 0156465c6d11 - main - mandoc: fix bootstrapping on Linux with Clang 16 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0156465c6d11e1ef064d104443047e4146e5b925 Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=0156465c6d11e1ef064d104443047e4146e5b925 commit 0156465c6d11e1ef064d104443047e4146e5b925 Author: Alex Richardson AuthorDate: 2023-12-12 05:08:38 +0000 Commit: Alex Richardson CommitDate: 2023-12-12 05:14:56 +0000 mandoc: fix bootstrapping on Linux with Clang 16 It appears that Clang 16 errors by default for the mismatched function pointer types that are triggered by the fts callback (since glibc has a callback type without the second const qualifier). Fortunately, there is already code to handle glibc inside mandoc, we just have to edit the checked-in config.h. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D42999 --- contrib/mandoc/config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/mandoc/config.h b/contrib/mandoc/config.h index 553c4c8b7400..213513f1c87e 100644 --- a/contrib/mandoc/config.h +++ b/contrib/mandoc/config.h @@ -13,7 +13,11 @@ #define HAVE_ENDIAN 0 #define HAVE_ERR 1 #define HAVE_FTS 1 +#ifdef __GLIBC__ +#define HAVE_FTS_COMPARE_CONST 0 +#else #define HAVE_FTS_COMPARE_CONST 1 +#endif #define HAVE_GETLINE 1 #define HAVE_GETSUBOPT 1 #define HAVE_ISBLANK 1 From nobody Tue Dec 12 05:15:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sq6J625cLz53PPG; Tue, 12 Dec 2023 05:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sq6J61fm3z4MCj; Tue, 12 Dec 2023 05:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KqSd+08dOIa4GI6+D9SgGkcDdrzc2jLgEIXlPQuZ7Bc=; b=nb5jzld037bBbDN00sIbxLSUc9KBOCmE2UWzWVaB6/MbvdhQb54VRy6OVYaoMVHcgiapAd lDx/czPrxKBQu2Kdr2wHgrB2epZLr8hZ4tEFYljMgtNbW9KtsA3uz7cvsg+iLWh/6/5Gwm 3sKE6GGq9UDBdk83peIEUlfGC9+9ZYfj5UkRi4JBhCXAS+imOnputOyfdbtZ3iAb64Vj92 Ajh32B24+qzwzOAee/1Trx90WVxAxch/bFxAUZUQEpYlrfDvupgM0UqU+fG5up2qRCjRwH 5R9Q/Sgv5NUT2dmEtJowKCXQNEqMKZbIytZkjddRcHqmev/ufB9ryz7c+3sQTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702358118; a=rsa-sha256; cv=none; b=LzahxR5dJNiYgdrLrBtNTaIwUNpBeKFZg3qQsadxeUIsCh43z5pmbQuiMi4A1O4ujjFv2Z gmAjqyZEtRp3jcMYga4PAObqclnRrdn5hyz/NbRmkD/qVN/XYZo+IF81vhFJsGTtn0f6T0 hWgW2BeqJNPH8X6oHlbBsQq4S8/+3xlvhrxI1ykvv2kn2Q5F+uQGJnuPtHPhbWuCIwsq95 QL7vMuzCz8JqLu3CQD5/Sl6327uV6UuXTyVh8OA38PWPGGdEkj6o/Pn0SMtZMmBmcjI3je ZxbScpkoeubKH++vjvg48RX4tIQToQt9p4ddfRHVblCZwEeCVb20MjWHayFx+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=1702358118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KqSd+08dOIa4GI6+D9SgGkcDdrzc2jLgEIXlPQuZ7Bc=; b=Ax99KSD4NYwYszgP6rTY6xSRDCyrgR1XXkkHvme8JUZDyhalmcfuCpnCtw0iwgKk3Kh5rq TnNfhy76A9kpKmGKUU8HsrOEkN4OpWqPUAHeorZ20KDUr8hYvqrPayQnVso7tYH7rjQZT5 73OCjBwdG8u3xmMZk189+mYASnB5HU9AZDSjDiDCLd4LqPXRbI7BmmbUsa9W+ahttXW+aS hzoYJ786Y8S/YrmcNuZ6NNF36ZtX78LNiiMBO0M1fkKzODbEBkAuiY8wDIalND8qOvk5W5 w25ln5T5pOmOUT1289+m5Ai8Y01kzKGGWtsx/mn5M3rqCRrRBkpdIael9WDN0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sq6J60jz6z12F1; Tue, 12 Dec 2023 05:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BC5FIx5079688; Tue, 12 Dec 2023 05:15:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC5FIdk079684; Tue, 12 Dec 2023 05:15:18 GMT (envelope-from git) Date: Tue, 12 Dec 2023 05:15:18 GMT Message-Id: <202312120515.3BC5FIdk079684@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 60e845ceef25 - main - jevents: fix bootstrapping on Linux with Clang 16 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60e845ceef25533bfb60450549bea56a17b1e467 Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=60e845ceef25533bfb60450549bea56a17b1e467 commit 60e845ceef25533bfb60450549bea56a17b1e467 Author: Alex Richardson AuthorDate: 2023-12-12 05:10:14 +0000 Commit: Alex Richardson CommitDate: 2023-12-12 05:14:56 +0000 jevents: fix bootstrapping on Linux with Clang 16 The glibc fts_open() callback type does not have the second const qualifier and it appears that Clang 16 errors by default for mismatched function pointer types. Add an ifdef to handle this case. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D43000 --- lib/libpmc/pmu-events/jevents.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c index ff7d3b226932..590b465af400 100644 --- a/lib/libpmc/pmu-events/jevents.c +++ b/lib/libpmc/pmu-events/jevents.c @@ -1355,7 +1355,11 @@ err_out: #include static int +#ifdef __GLIBC__ +fts_compare(const FTSENT **a, const FTSENT **b) +#else fts_compare(const FTSENT * const *a, const FTSENT * const *b) +#endif { return (strcmp((*a)->fts_name, (*b)->fts_name)); } From nobody Tue Dec 12 08:37:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqBnB3FRKz53dFN; Tue, 12 Dec 2023 08:37:18 +0000 (UTC) (envelope-from fluffy@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 4SqBnB2k59z4c7N; Tue, 12 Dec 2023 08:37:18 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702370238; 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=d3qgXQtO5VUvpDCkw3rbkv7eamTtQzGt5g56Ki5CkGs=; b=S9ayL0MHAfjNPBxvRk/hO/Ifn7DPTnqCnN7jICe+9DHxQIb6MPNhYd0wE5gtYwocA6YzgZ wPIvdGDwakoslF1GFHQxSrUhv/nWTdpVOZiEwNAcIU8ImFIpacYRjiNv3nucXZFMXppiGn k+rNtd/Qa7wUjbyuY5xGXy8pGG6hZuSQ+IKvWoNry5iM8mmXXzbzwZ+yoXn9wC/PqOtkX5 nMFL57R0wbRVwqwLfG3pHEvekLpRt3oAe99rHDqamKd9I/a9Wd5Dzf+E+suGdfdq47IgN6 Q7ebqf5UaOd7lXbz2DwmAKwq5pAn/MGVsH2FfnfdXNRAhnGAmL6ZtTmrkdg71g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702370238; a=rsa-sha256; cv=none; b=tIuVKSc16t/W/8EhjBJpfoJOq7REhm2wv4KnvuDCh6Ng226JVowAirEF5QqMVIV+eOhFwg tao+B94megm98Ri0d7uh5fVi/UryV4zL/A/zWOTYqJPa+3nELsGI3+3wNsxzEBarbWkDjF JQSPpAnqUpT5XC+U3DkN4uE8f6Ut389Jb25gzXQ/3B8rqpm4y4S4c27/CdSpi/0ZpLB9Ya qxMEIyqyhnypcvYJdyjMivqFKVYND7A4vvVGQVAaOmwhyBOt9bib44dcgGYfgeFA/aT79V xzhaO4fGsFqjxDLxojWjOlnYCBOGbfac3a42xkVqknPiUW4ldTALwy7q850RJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702370238; 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=d3qgXQtO5VUvpDCkw3rbkv7eamTtQzGt5g56Ki5CkGs=; b=XqHu4zjUyyEhhiS4Vv2wQf4ZYkqzGKQLDdaHEB/0U3w3gcnee7+7g4Nx6jM8Hop8PFLftx 1tnDXPf8Wr++lgmu7tzTVOon6qRR5cNp4e/tQD6minocfgNINFVjXPRbczYmq4LoaSpicI unYMO1VTVCfZa1UmcCQLRvNq7kXy69M4KAFmwhdBdqwxmLRnoTQBoAKofkEI4CCqv4ZBPp 84lUKVj6nuofJ5rt45FSRpg5TUbj92iwoaHWo73NcdP/Ir09ZlZVmO4JGGS/om4RFnthUF /r2ly5rAQy4H0f4/0X1H3WeYGbOJFNoO/kjagNYptCoooBEAlig8HQ1GFSK0pw== Received: from [10.216.0.102] (unknown [188.243.165.67]) (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: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SqBn92fK6zBgr; Tue, 12 Dec 2023 08:37:17 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: Date: Tue, 12 Dec 2023 11:37:13 +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: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Content-Language: ru, en-GB, en-US To: Dimitry Andric Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> From: Dima Panov Organization: FreeBSD.org In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------5TfJ2GCpe4nfLWMeUs5ME0BJ" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------5TfJ2GCpe4nfLWMeUs5ME0BJ Content-Type: multipart/mixed; boundary="------------lmH2YrVW1sPHMRP0rAgcjwmh"; protected-headers="v1" From: Dima Panov To: Dimitry Andric Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-ID: Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> In-Reply-To: --------------lmH2YrVW1sPHMRP0rAgcjwmh Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 DQoNCk9uIDExLjEyLjIwMjMgMjE6MjYsIERpbWl0cnkgQW5kcmljIHdyb3RlOg0KPiBPbiAx MSBEZWMgMjAyMywgYXQgMTk6MTAsIERpbWEgUGFub3YgPGZsdWZmeUBmcmVlYnNkLm9yZz4g d3JvdGU6DQo+Pg0KPj4gT24gMTEuMTIuMjAyMyAxODoxNSwgRGltaXRyeSBBbmRyaWMgd3Jv dGU6DQo+Pj4gT24gMTEgRGVjIDIwMjMsIGF0IDE2OjAzLCBLcmlzdG9mIFByb3Zvc3QgPGtw QEZyZWVCU0Qub3JnPiB3cm90ZToNCj4+Pj4gT24gOCBEZWMgMjAyMywgYXQgMTg6MzksIERp bWl0cnkgQW5kcmljIHdyb3RlOg0KPj4+Pg0KPj4+PiAgICAgVGhlIGJyYW5jaCBtYWluIGhh cyBiZWVuIHVwZGF0ZWQgYnkgZGltOg0KPj4+Pg0KPj4+PiAgICAgVVJMOiBodHRwczovL2Nn aXQuRnJlZUJTRC5vcmcvc3JjL2NvbW1pdC8/aWQ9NWMxNmU3MWQzMGMzODhkZDQzYjIxN2Rl MTBhM2NjYjRiMDIxOWQwZCA8aHR0cHM6Ly9jZ2l0LmZyZWVic2Qub3JnL3NyYy9jb21taXQv P2lkPTVjMTZlNzFkMzBjMzg4ZGQ0M2IyMTdkZTEwYTNjY2I0YjAyMTlkMGQ+DQo+Pj4+DQo+ Pj4+ICAgICBjb21taXQgNWMxNmU3MWQzMGMzODhkZDQzYjIxN2RlMTBhM2NjYjRiMDIxOWQw ZA0KPj4+PiAgICAgTWVyZ2U6IGIxMjFjYjAwOTVjOCA3MDMwMjlkYmJhNzgNCj4+Pj4gICAg IEF1dGhvcjogRGltaXRyeSBBbmRyaWMgPGRpbUBGcmVlQlNELm9yZz4NCj4+Pj4gICAgIEF1 dGhvckRhdGU6IDIwMjMtMTEtMzAgMjA6MDY6NTIgKzAwMDANCj4+Pj4gICAgIENvbW1pdDog RGltaXRyeSBBbmRyaWMgPGRpbUBGcmVlQlNELm9yZz4NCj4+Pj4gICAgIENvbW1pdERhdGU6 IDIwMjMtMTItMDggMTc6MzU6NTkgKzAwMDANCj4+Pj4NCj4+Pj4gICAgIE1lcmdlIGxsdm0t cHJvamVjdCByZWxlYXNlLzE3LnggbGx2bW9yZy0xNy4wLjYtMC1nNjAwOTcwOGI0MzY3DQo+ Pj4+DQo+Pj4+ICAgICBUaGlzIHVwZGF0ZXMgbGx2bSwgY2xhbmcsIGNvbXBpbGVyLXJ0LCBs aWJjKyssIGxpYnVud2luZCwgbGxkLCBsbGRiIGFuZA0KPj4+PiAgICAgb3Blbm1wIHRvIGxs dm1vcmctMTcuMC42LTAtZzYwMDk3MDhiNDM2Ny4NCj4+Pj4NCj4+Pj4gICAgIFBSOiAyNzM3 NTMNCj4+Pj4gICAgIE1GQyBhZnRlcjogMSBtb250aA0KPj4+Pg0KPj4+Pg0KPj4+PiBUaGVy ZSBhcHBlYXJzIHRvIGJlIHNvbWUgZmFsbG91dCBpbiBzb21lIHBvcnRzLg0KPj4+DQo+PiBb c2tpcF0NCj4+PiBJIGZpeGVkIGRvemVucyBvZiBwb3J0cyBmb3IgdGhpcyBpbiBodHRwczov L2J1Z3MuZnJlZWJzZC5vcmcvMjczNzUzIDxodHRwczovL2J1Z3MuZnJlZWJzZC5vcmcvMjcz NzUzPiwgYnV0IEkgaGF2ZW4ndCBnb25lIG92ZXIgYWxsIG9mIHRoZW0sIHNpbmNlIEkgaGF2 ZSBsaW1pdGVkIHJlc291cmNlcy4NCj4+PiBUaGF0IHNhaWQsIHRoZXJlIGFyZSBnZW5lcmFs bHkgdHdvIHdheXMgdG8gZml4IHRoaXM6IGVpdGhlciBhZGQgLVdsLC0tdW5kZWZpbmVkLXZl cnNpb24gdG8gdGhlIGxpbmtlciBmbGFncywgb3IgYWN0dWFsbHkgcmVtb3ZlIHRoZSB1bmRl ZmluZWQgc3ltYm9scyBmcm9tIHRoZSBsaW5rZXIgdmVyc2lvbiBzY3JpcHRzLg0KPj4NCj4+ IEJUVywgbGFuZy9nY2MxMyBmYWlscyB0byBidWlsZCBvbiAxNS9hYXJjaDY0IGFmdGVyIHRo aXMgaW1wb3J0IHdpdGggbG90cyBvZg0KPj4NCj4+IC91c3IvaW5jbHVkZS9jKysvdjEvbG9j YWxlOjM0MzQ6MzE6IGVycm9yOiBhdHRlbXB0IHRvIHVzZSBhIHBvaXNvbmVkIGlkZW50aWZp ZXINCj4+IDM0MzQgfCAgICAgICAgIF9faC5yZXNldCgoY2hhcl90eXBlKiltYWxsb2MoX19l eG4gKiBzaXplb2YoY2hhcl90eXBlKSkpOw0KPj4gICAgICAgfCAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBeDQo+Pg0KPj4NCj4+IEZ1bGwgbG9nOiBodHRwczovL3Blb3BsZS5m cmVlYnNkLm9yZy9+Zmx1ZmZ5Ly1sb2cvMTUwYWFyY2g2NC9nY2MxMy0xMy4yLjBfMS5sb2cN Cj4+DQo+Pg0KPj4gSnVzdCBjdXJpb3VzIGJ1dCBnY2MxMiBpcyBmaW5lIG5vdw0KPiANCj4g SSBoYXZlIHNlZW4gdGhpcyBlcnJvciB0b28sIGJ1dCBjb3VsZCBvbmx5IHJlcHJvZHVjZSBp dCBvdXRzaWRlIG9mIHBvdWRyaWVyZSwgc28gSSBkaWRuJ3QgdGFrZSBpdCB0b28gc2VyaW91 c2x5LiBJdCBpcyBlYXN5IHRvIGZpeDsgSSBoYXZlIGEgcGF0Y2gsIHNoYWxsIEkgY29tbWl0 IGl0PyA6KQ0KPiANCg0KWWVzIHBsZWFzZSA6KQ0KDQoNCi0tIA0KU2luY2VyZWx5LA0KRGlt YSAoZmx1ZmZ5QEZyZWVCU0Qub3JnLCBodHRwczovL3QubWUvRmx1ZmZ5QlNEKQ0KKGRlc2t0 b3AsIGtkZSwgeDExLCBvZmZpY2UsIHBvcnRzLXNlY3RlYW0pQEZyZWVCU0QgdGVhbQ0K --------------lmH2YrVW1sPHMRP0rAgcjwmh-- --------------5TfJ2GCpe4nfLWMeUs5ME0BJ Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmV4G7kFAwAAAAAACgkQ+4ugndU5jynF Eg/9GBB01TIx57VIhZzUHCAaxlXODzI572njpwGbYBgknuNf0ZaNC1ikyt/A6FnAfzgQ5h/aQeff FLLALiPnh+cXN2fowPFTj9YYSs9XIFGhv4AT7EYeye9IDtB3E3UKpNDpYaV0SLfJaZaBM66lcyHb vIVHVOGqcPzXXRt7HUsgeJsm2sgcMvCPwApM/AxyD2RXNkWch+UH47dsZfF234tYLCDE1nqutqGj 4fu15U3Pm/dA6pbVf8E5Wtdds41jVrBYIcP45rrNUYUxCvdTFWiydqVXzWqZ76IRpBg9ELmRaniZ 1XMc12H7h3v3mE1oG1dTgIclAUgA1Fr/+pArUksCiUN7bhpksEDQuz8HtUZWGTmCBekmivnu1Wfe 6VgmbR2tT9ohD03Ifk+NToHT56AoVOUJa7wevZfZ6d7OeZVuzMwwPmaXjMncXYkVx0Vb04ACVSlg WgxOVqD7RExb5tE8DxcLf6HX0S9umEG7hpkEEHArr3VsrAma7llx0/3YqIWsPPyPj782yAc40W4f cXyRsNuK8vBbhdd1URlDb6EbyG5lAA8qYOKkWOjJyjXZZhxkVEbmyYdz0UPicuJ/3mrbwBehKIPg T5mSFtBTcjC5G4525pducVzyCcZhWE6wvhSMVrnI2pKAoHOSuelb2LPbjFLJgFaUHWPUNEgSLrcZ rJc= =2mZJ -----END PGP SIGNATURE----- --------------5TfJ2GCpe4nfLWMeUs5ME0BJ-- From nobody Tue Dec 12 11:04:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqG3Z2yfnz53njb; Tue, 12 Dec 2023 11:04: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 4SqG3Z25xDz3QSf; Tue, 12 Dec 2023 11:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702379098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EK+xt+Htg/9z4/g79WwPOobkVYQP5cMPU9PPVGE4ktI=; b=CQzOUmHcaUp8SicpGDW4zmoSPnMYiEM9gdWr14RaHwFf4GPUuG9UD9abSVMB8jsrrxyp7+ UkR2wOAe2dDUjTnNa1hXkmPvq9eAHILJ/H2M2hIgG084Qj73PbXsUjqt+cV3jGKJuC32ie UVnRYmtUPVtgmuBrZpVUok6+bGhNGI+O3DbWTmQfq8yt6QTRBOl7GLdUSb+xQThjwYM0ok esJmMd1HyqGwYzNM4LY1xIzjlBRY0NbX7nWIZyWdH9MxIpCqiKiaPQDxJKqeQVSzEq0vcD FoFtumQbtrAzlrjIn0NeELM5RTfdF10DnlGxJ2rHs98V7SuS5caxfdtHG1ppOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702379098; a=rsa-sha256; cv=none; b=ruoWdNKw+Wcoc7Ms615s958jlCBu1GB4U2xTQHl4AHdIQ2cs3atWjOWd60KZ0lURy2wXoG cA7oHv95xAZV4kVzHiucqMzA/XR5z7VEhWJSjZdhg3iMnOCdQPSqDNjU7qOlZEWY4FfB1S JUgyOqsN09ANsf304VBeuHARPgD1hTWQ28Cbm7omxII9IJatA0cK2kquKs3RRlnP4iASTq 6Wgcw9euQq1WRuaqNgqFE4RTCKwswpc2nBT0UVQmHbxMMY1aBNv+p/VkfJq6T6s9bguujZ iqOtyccJOyiU9rB7lxiPWCkHxx4Tiyi8gEQsokfrdVU/mZ7bqvqkl9sPD8oLYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702379098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EK+xt+Htg/9z4/g79WwPOobkVYQP5cMPU9PPVGE4ktI=; b=uzSqxICK1Vwh+3n9k3HM/P4fwpb04mJjGUOCxOFkKMkak/kKYPH1sxb56p41xTsqpDVNdg +cSjk8eUeTxScgsmxnCGpdNhOBli/zLkYl11CMFV3Kmp/dUwbyHlPaAWCzvEb5BoT5yivl SXakR2KXsevm/j2U1OxSXjnJVzRclGVyMuebUasTIT+aNNefhHoD2BpSZK4/RmKT/FMi25 5xI1n25BOlY468gFespI4PmVq24pvPK+kn24h6UzNKFaH5Swy4P093QSPC8aH514ObVqLl U00S5pJlonijQ14y5cO5CLM475zO/pap72cpc2IQIEWGiyLcAj2U53ZBHUrdwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqG3Z1CfWz1Bnw; Tue, 12 Dec 2023 11:04: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 3BCB4wko066470; Tue, 12 Dec 2023 11:04:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCB4wW1066467; Tue, 12 Dec 2023 11:04:58 GMT (envelope-from git) Date: Tue, 12 Dec 2023 11:04:58 GMT Message-Id: <202312121104.3BCB4wW1066467@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: 793e4aca9e70 - main - tcp stacks: in kernel BBR and RACK require in kernel HPTS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 793e4aca9e70f2441f0f4e1688d0a727d602ed81 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=793e4aca9e70f2441f0f4e1688d0a727d602ed81 commit 793e4aca9e70f2441f0f4e1688d0a727d602ed81 Author: Michael Tuexen AuthorDate: 2023-12-12 11:01:37 +0000 Commit: Michael Tuexen CommitDate: 2023-12-12 11:01:37 +0000 tcp stacks: in kernel BBR and RACK require in kernel HPTS Compiling the BBR or RACK stack into the kernel requires HPTS to be compiled into the kernel. Reviewed by: glebius, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42998 --- sys/conf/files | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index e37764d3dc6f..377d65926462 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4363,13 +4363,13 @@ netinet/tcp_pcap.c optional inet tcppcap | inet6 tcppcap \ compile-with "${NORMAL_C} ${NO_WNONNULL}" netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 -netinet/tcp_stacks/bbr.c optional inet tcp_bbr | inet6 tcp_bbr \ +netinet/tcp_stacks/bbr.c optional inet tcphpts tcp_bbr | inet6 tcphpts tcp_bbr \ compile-with "${NORMAL_C} -DMODNAME=tcp_bbr -DSTACKNAME=bbr" -netinet/tcp_stacks/rack.c optional inet tcp_rack | inet6 tcp_rack \ +netinet/tcp_stacks/rack.c optional inet tcphpts tcp_rack | inet6 tcphpts tcp_rack \ compile-with "${NORMAL_C} -DMODNAME=tcp_rack -DSTACKNAME=rack" -netinet/tcp_stacks/rack_bbr_common.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack -netinet/tcp_stacks/sack_filter.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack -netinet/tcp_stacks/tailq_hash.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack +netinet/tcp_stacks/rack_bbr_common.c optional inet tcphpts tcp_bbr | inet tcphpts tcp_rack | inet6 tcphpts tcp_bbr | inet6 tcphpts tcp_rack +netinet/tcp_stacks/sack_filter.c optional inet tcphpts tcp_bbr | inet tcphpts tcp_rack | inet6 tcphpts tcp_bbr | inet6 tcphpts tcp_rack +netinet/tcp_stacks/tailq_hash.c optional inet tcphpts tcp_bbr | inet tcphpts tcp_rack | inet6 tcphpts tcp_bbr | inet6 tcphpts tcp_rack netinet/tcp_stats.c optional stats inet | stats inet6 netinet/tcp_subr.c optional inet | inet6 netinet/tcp_syncache.c optional inet | inet6 From nobody Tue Dec 12 15:32:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqMzt2s0dz5462s; Tue, 12 Dec 2023 15:32: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 4SqMzt2fScz4VJm; Tue, 12 Dec 2023 15:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702395130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5KKH21HSY4NnX8XgPza8ZnFTkRwgJMm9Pq3rRp4Wfic=; b=pjrEQ1otLLdBlfLGUQsTa5mLUwfLm7Q5VgL3kkLjOMQ6X6K7/p/7uqV5N3G1G7aqX+Khjz 5RXS2/urK0lmIoIe3Gx2NEPnkHZ7AmcnUVegquNTXl3ShSdzTZPfW6KSQp/QKsY6NJzCPs rKVG5ap93AuBAhC2UEaTcheuwUKEI/y/VMO3+fhlnBAQzI96TYqmFK6gHcI125+wQxs9S0 CuBNeihWZkWieQKY6rNdRwpQw0BFZYo6TF9g9v/g27lrf1CMYOqRpcd+0aZHxPNEzvQB4s JKlxiMnzbz7/QzU5Wh/RfRJnbzsL8L9oubnsQN9xJpETxHViFQxm5mBuxEn1AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702395130; a=rsa-sha256; cv=none; b=UWdOGKb/JcaqlfnfvcKHeD3jv/T1HI+Czk9Z5tCIQFq9Yt0fdGhOfRkqJsleqh8JtLhNu1 1PwvgzzcINrov9o2N+MTC5lA7qfnhQw3PYka1hgZMSVXspLjmiBRX0K2mA47+A6VtZhsi2 ZGM1fahLGPWrNK8/ejOKX8FGU4zxPlk6T8gnf03WnRqMltwIUdfqglHAsX4DuKxbMXmgEp DitJFGeIgGD+Ig1gI0jSM6VSic/uVrxWyDHK0Lip860+FTS0dCpHz8xwkJ//lrW8QEY8rX PVO/TQ3WrnQT8R8Mz+7VbotjS3Xd4lgcXPnFiM8pTwIwF66iirj/uI9sVwVC9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702395130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5KKH21HSY4NnX8XgPza8ZnFTkRwgJMm9Pq3rRp4Wfic=; b=vmGhU2kZvzzMwYWr7wWEEg2Z4qsfialvZPGHJBYyU1a72+mXRb+SC9JksKQHrT8vrE9POP ASCtxBOq1gJzmImW0IOAQGftIM0H3MXofjxT7Gol9WGyitZ90q9BQEZ2H6aVOZT1ZPzmH0 IVMI5ERX5Pwf2xD32bZ7c0qzq6dk464Idsdjjt+uQLQ+ysYETCLDcqJgQP3UaOlTDCeSZ7 xp1WhcodTriAN91Y8DhZt1P1p6mOMidpVq93YxANTLjO3IkhigyRoyWu7Pt+LgAF73Xud7 FTqNcly0lMwfID88kIRfdgMkX++QYbzfYkC0bntIseanVglUMVcoteMq0vCoZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqMzt1ksGz4wn; Tue, 12 Dec 2023 15:32: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 3BCFWAGP016625; Tue, 12 Dec 2023 15:32:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCFWA57016590; Tue, 12 Dec 2023 15:32:10 GMT (envelope-from git) Date: Tue, 12 Dec 2023 15:32:10 GMT Message-Id: <202312121532.3BCFWA57016590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 70547544ce93 - main - ocs_fc: IO timeout handling and error reporting fix. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70547544ce931357c980be47d937e5b57a2d7f49 Auto-Submitted: auto-generated The branch main has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=70547544ce931357c980be47d937e5b57a2d7f49 commit 70547544ce931357c980be47d937e5b57a2d7f49 Author: Ram Kishore Vegesna AuthorDate: 2023-12-12 15:22:58 +0000 Commit: Kenneth D. Merry CommitDate: 2023-12-12 15:22:58 +0000 ocs_fc: IO timeout handling and error reporting fix. Hardware timeout uses a 8-bit timeout value and expects the timeout to be less than 255 seconds. Added software timer implemetation to timeout and abort the IOs with timeout more than 255 seconds. Fix the timeout problem by dividing CAM timeouts by 1000 as hardware expects timeout value in seconds. Before this change, CAM timeouts in milliseconds were getting truncated to 8 bits and converted to seconds. So the actual timeout used when going down to the card would depend on the bottom 8 bits of the timeout used. Add the mapping of ocs_fc error status to CAM status. Reported by: ken Reviewed by: ken Tested by: ken, ram Approved by: ken MFC after: 1 week --- sys/dev/ocs_fc/ocs_cam.c | 87 ++++++++++++++++++++++++++++++++++++++++++++-- sys/dev/ocs_fc/ocs_hw.c | 70 +++++++++++++++++++++++-------------- sys/dev/ocs_fc/ocs_hw.h | 10 +++--- sys/dev/ocs_fc/ocs_scsi.c | 6 +++- sys/dev/ocs_fc/ocs_xport.c | 8 +++-- sys/dev/ocs_fc/sli4.h | 2 +- 6 files changed, 144 insertions(+), 39 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_cam.c b/sys/dev/ocs_fc/ocs_cam.c index 4da1b6669047..0fa94083e898 100644 --- a/sys/dev/ocs_fc/ocs_cam.c +++ b/sys/dev/ocs_fc/ocs_cam.c @@ -44,6 +44,7 @@ #include "ocs.h" #include "ocs_scsi.h" #include "ocs_device.h" +#include /* Default IO timeout value for initiators is 30 seconds */ #define OCS_CAM_IO_TIMEOUT 30 @@ -55,6 +56,27 @@ typedef struct { int32_t rc; } ocs_dmamap_load_arg_t; +struct ocs_scsi_status_desc { + ocs_scsi_io_status_e status; + const char *desc; +} ocs_status_desc[] = { + { OCS_SCSI_STATUS_GOOD, "Good" }, + { OCS_SCSI_STATUS_ABORTED, "Aborted" }, + { OCS_SCSI_STATUS_ERROR, "Error" }, + { OCS_SCSI_STATUS_DIF_GUARD_ERROR, "DIF Guard Error" }, + { OCS_SCSI_STATUS_DIF_REF_TAG_ERROR, "DIF REF Tag Error" }, + { OCS_SCSI_STATUS_DIF_APP_TAG_ERROR, "DIF App Tag Error" }, + { OCS_SCSI_STATUS_DIF_UNKNOWN_ERROR, "DIF Unknown Error" }, + { OCS_SCSI_STATUS_PROTOCOL_CRC_ERROR, "Proto CRC Error" }, + { OCS_SCSI_STATUS_NO_IO, "No IO" }, + { OCS_SCSI_STATUS_ABORT_IN_PROGRESS, "Abort in Progress" }, + { OCS_SCSI_STATUS_CHECK_RESPONSE, "Check Response" }, + { OCS_SCSI_STATUS_COMMAND_TIMEOUT, "Command Timeout" }, + { OCS_SCSI_STATUS_TIMEDOUT_AND_ABORTED, "Timed out and Aborted" }, + { OCS_SCSI_STATUS_SHUTDOWN, "Shutdown" }, + { OCS_SCSI_STATUS_NEXUS_LOST, "Nexus Lost" } +}; + static void ocs_action(struct cam_sim *, union ccb *); static void ocs_poll(struct cam_sim *); @@ -1497,7 +1519,7 @@ static int32_t ocs_scsi_initiator_io_cb(ocs_io_t *io, * If we've already got a SCSI error, prefer that because it * will have more detail. */ - if ((rsp->residual < 0) && (ccb_status == CAM_REQ_CMP)) { + if ((rsp->residual < 0) && (ccb_status == CAM_REQ_CMP)) { ccb_status = CAM_DATA_RUN_ERR; } @@ -1517,7 +1539,62 @@ static int32_t ocs_scsi_initiator_io_cb(ocs_io_t *io, ocs_memcpy(&csio->sense_data, rsp->sense_data, sense_len); } } else if (scsi_status != OCS_SCSI_STATUS_GOOD) { - ccb_status = CAM_REQ_CMP_ERR; + const char *err_desc = NULL; + char path_str[64]; + char err_str[224]; + struct sbuf sb; + size_t i; + + sbuf_new(&sb, err_str, sizeof(err_str), 0); + + xpt_path_string(ccb->ccb_h.path, path_str, sizeof(path_str)); + sbuf_cat(&sb, path_str); + + for (i = 0; i < (sizeof(ocs_status_desc) / + sizeof(ocs_status_desc[0])); i++) { + if (scsi_status == ocs_status_desc[i].status) { + err_desc = ocs_status_desc[i].desc; + break; + } + } + if (ccb->ccb_h.func_code == XPT_SCSI_IO) { + scsi_command_string(&ccb->csio, &sb); + sbuf_printf(&sb, "length %d ", ccb->csio.dxfer_len); + } + sbuf_printf(&sb, "error status %d (%s)\n", scsi_status, + (err_desc != NULL) ? err_desc : "Unknown"); + sbuf_finish(&sb); + printf("%s", sbuf_data(&sb)); + + switch (scsi_status) { + case OCS_SCSI_STATUS_ABORTED: + case OCS_SCSI_STATUS_ABORT_IN_PROGRESS: + ccb_status = CAM_REQ_ABORTED; + break; + case OCS_SCSI_STATUS_DIF_GUARD_ERROR: + case OCS_SCSI_STATUS_DIF_REF_TAG_ERROR: + case OCS_SCSI_STATUS_DIF_APP_TAG_ERROR: + case OCS_SCSI_STATUS_DIF_UNKNOWN_ERROR: + case OCS_SCSI_STATUS_PROTOCOL_CRC_ERROR: + ccb_status = CAM_IDE; + break; + case OCS_SCSI_STATUS_ERROR: + case OCS_SCSI_STATUS_NO_IO: + ccb_status = CAM_REQ_CMP_ERR; + break; + case OCS_SCSI_STATUS_COMMAND_TIMEOUT: + case OCS_SCSI_STATUS_TIMEDOUT_AND_ABORTED: + ccb_status = CAM_CMD_TIMEOUT; + break; + case OCS_SCSI_STATUS_SHUTDOWN: + case OCS_SCSI_STATUS_NEXUS_LOST: + ccb_status = CAM_SCSI_IT_NEXUS_LOST; + break; + default: + ccb_status = CAM_REQ_CMP_ERR; + break; + } + } else { ccb_status = CAM_REQ_CMP; } @@ -1842,7 +1919,11 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb) } else if (ccb->ccb_h.timeout == CAM_TIME_DEFAULT) { io->timeout = OCS_CAM_IO_TIMEOUT; } else { - io->timeout = ccb->ccb_h.timeout; + if (ccb->ccb_h.timeout < 1000) + io->timeout = 1; + else { + io->timeout = ccb->ccb_h.timeout / 1000; + } } switch (csio->tag_action) { diff --git a/sys/dev/ocs_fc/ocs_hw.c b/sys/dev/ocs_fc/ocs_hw.c index 4db6634d3d90..cfb9d4f8f536 100644 --- a/sys/dev/ocs_fc/ocs_hw.c +++ b/sys/dev/ocs_fc/ocs_hw.c @@ -148,17 +148,29 @@ static void ocs_hw_check_sec_hio_list(ocs_hw_t *hw); static void target_wqe_timer_cb(void *arg); static void shutdown_target_wqe_timer(ocs_hw_t *hw); +/* WQE timeout for initiator IOs */ +static inline uint8_t +ocs_hw_set_io_wqe_timeout(ocs_hw_io_t *io, uint32_t timeout) +{ + if (timeout > 255) { + io->wqe_timeout = timeout; + return 0; + } else { + return timeout; + } +} + static inline void ocs_hw_add_io_timed_wqe(ocs_hw_t *hw, ocs_hw_io_t *io) { - if (hw->config.emulate_tgt_wqe_timeout && io->tgt_wqe_timeout) { + if (hw->config.emulate_wqe_timeout && io->wqe_timeout) { /* * Active WQE list currently only used for * target WQE timeouts. */ ocs_lock(&hw->io_lock); ocs_list_add_tail(&hw->io_timed_wqe, io); - io->submit_ticks = ocs_get_os_ticks(); + getmicrouptime(&io->submit_time); ocs_unlock(&hw->io_lock); } } @@ -166,7 +178,7 @@ ocs_hw_add_io_timed_wqe(ocs_hw_t *hw, ocs_hw_io_t *io) static inline void ocs_hw_remove_io_timed_wqe(ocs_hw_t *hw, ocs_hw_io_t *io) { - if (hw->config.emulate_tgt_wqe_timeout) { + if (hw->config.emulate_wqe_timeout) { /* * If target wqe timeouts are enabled, * remove from active wqe list. @@ -965,7 +977,7 @@ ocs_hw_init(ocs_hw_t *hw) } /* finally kick off periodic timer to check for timed out target WQEs */ - if (hw->config.emulate_tgt_wqe_timeout) { + if (hw->config.emulate_wqe_timeout) { ocs_setup_timer(hw->os, &hw->wqe_timer, target_wqe_timer_cb, hw, OCS_HW_WQ_TIMER_PERIOD_MS); } @@ -1695,8 +1707,8 @@ ocs_hw_get(ocs_hw_t *hw, ocs_hw_property_e prop, uint32_t *value) case OCS_HW_EMULATE_I_ONLY_AAB: *value = hw->config.i_only_aab; break; - case OCS_HW_EMULATE_TARGET_WQE_TIMEOUT: - *value = hw->config.emulate_tgt_wqe_timeout; + case OCS_HW_EMULATE_WQE_TIMEOUT: + *value = hw->config.emulate_wqe_timeout; break; case OCS_HW_VPD_LEN: *value = sli_get_vpd_len(&hw->sli); @@ -1996,8 +2008,8 @@ ocs_hw_set(ocs_hw_t *hw, ocs_hw_property_e prop, uint32_t value) case OCS_HW_EMULATE_I_ONLY_AAB: hw->config.i_only_aab = value; break; - case OCS_HW_EMULATE_TARGET_WQE_TIMEOUT: - hw->config.emulate_tgt_wqe_timeout = value; + case OCS_HW_EMULATE_WQE_TIMEOUT: + hw->config.emulate_wqe_timeout = value; break; case OCS_HW_BOUNCE: hw->config.bounce = value; @@ -3324,7 +3336,7 @@ ocs_hw_init_free_io(ocs_hw_io_t *io) io->type = 0xFFFF; io->wq = NULL; io->ul_io = NULL; - io->tgt_wqe_timeout = 0; + io->wqe_timeout = 0; } /** @@ -3738,7 +3750,7 @@ ocs_hw_check_sec_hio_list(ocs_hw_t *hw) flags &= ~SLI4_IO_CONTINUATION; } - io->tgt_wqe_timeout = io->sec_iparam.fcp_tgt.timeout; + io->wqe_timeout = io->sec_iparam.fcp_tgt.timeout; /* Complete (continue) TRECV IO */ if (io->xbusy) { @@ -4041,6 +4053,7 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, ocs_hw_rtn_e rc = OCS_HW_RTN_SUCCESS; uint32_t rpi; uint8_t send_wqe = TRUE; + uint8_t timeout = 0; CPUTRACE(""); @@ -4075,6 +4088,8 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, */ switch (type) { case OCS_HW_IO_INITIATOR_READ: + timeout = ocs_hw_set_io_wqe_timeout(io, iparam->fcp_ini.timeout); + /* * If use_dif_quarantine workaround is in effect, and dif_separates then mark the * initiator read IO for quarantine @@ -4090,12 +4105,14 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, if (sli_fcp_iread64_wqe(&hw->sli, io->wqe.wqebuf, hw->sli.config.wqe_size, &io->def_sgl, io->first_data_sge, len, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, rpi, rnode, iparam->fcp_ini.dif_oper, iparam->fcp_ini.blk_size, - iparam->fcp_ini.timeout)) { + timeout)) { ocs_log_err(hw->os, "IREAD WQE error\n"); rc = OCS_HW_RTN_ERROR; } break; case OCS_HW_IO_INITIATOR_WRITE: + timeout = ocs_hw_set_io_wqe_timeout(io, iparam->fcp_ini.timeout); + ocs_hw_io_ini_sge(hw, io, iparam->fcp_ini.cmnd, iparam->fcp_ini.cmnd_size, iparam->fcp_ini.rsp); @@ -4104,18 +4121,20 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, rpi, rnode, iparam->fcp_ini.dif_oper, iparam->fcp_ini.blk_size, - iparam->fcp_ini.timeout)) { + timeout)) { ocs_log_err(hw->os, "IWRITE WQE error\n"); rc = OCS_HW_RTN_ERROR; } break; case OCS_HW_IO_INITIATOR_NODATA: + timeout = ocs_hw_set_io_wqe_timeout(io, iparam->fcp_ini.timeout); + ocs_hw_io_ini_sge(hw, io, iparam->fcp_ini.cmnd, iparam->fcp_ini.cmnd_size, iparam->fcp_ini.rsp); if (sli_fcp_icmnd64_wqe(&hw->sli, io->wqe.wqebuf, hw->sli.config.wqe_size, &io->def_sgl, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, - rpi, rnode, iparam->fcp_ini.timeout)) { + rpi, rnode, timeout)) { ocs_log_err(hw->os, "ICMND WQE error\n"); rc = OCS_HW_RTN_ERROR; } @@ -4137,7 +4156,7 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, flags &= ~SLI4_IO_CONTINUATION; } - io->tgt_wqe_timeout = iparam->fcp_tgt.timeout; + io->wqe_timeout = iparam->fcp_tgt.timeout; /* * If use_dif_quarantine workaround is in effect, and this is a DIF enabled IO @@ -4227,7 +4246,7 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, flags &= ~SLI4_IO_CONTINUATION; } - io->tgt_wqe_timeout = iparam->fcp_tgt.timeout; + io->wqe_timeout = iparam->fcp_tgt.timeout; if (sli_fcp_tsend64_wqe(&hw->sli, io->wqe.wqebuf, hw->sli.config.wqe_size, &io->def_sgl, io->first_data_sge, iparam->fcp_tgt.offset, len, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, @@ -4260,7 +4279,7 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, } } - io->tgt_wqe_timeout = iparam->fcp_tgt.timeout; + io->wqe_timeout = iparam->fcp_tgt.timeout; if (sli_fcp_trsp64_wqe(&hw->sli, io->wqe.wqebuf, hw->sli.config.wqe_size, &io->def_sgl, len, @@ -11173,9 +11192,8 @@ target_wqe_timer_nop_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) { ocs_hw_io_t *io = NULL; ocs_hw_io_t *io_next = NULL; - uint64_t ticks_current = ocs_get_os_ticks(); - uint32_t sec_elapsed; ocs_hw_rtn_e rc; + struct timeval cur_time; sli4_mbox_command_header_t *hdr = (sli4_mbox_command_header_t *)mqe; @@ -11188,27 +11206,28 @@ target_wqe_timer_nop_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) /* loop through active WQE list and check for timeouts */ ocs_lock(&hw->io_lock); ocs_list_foreach_safe(&hw->io_timed_wqe, io, io_next) { - sec_elapsed = ((ticks_current - io->submit_ticks) / ocs_get_os_tick_freq()); /* * If elapsed time > timeout, abort it. No need to check type since * it wouldn't be on this list unless it was a target WQE */ - if (sec_elapsed > io->tgt_wqe_timeout) { - ocs_log_test(hw->os, "IO timeout xri=0x%x tag=0x%x type=%d\n", - io->indicator, io->reqtag, io->type); + getmicrouptime(&cur_time); + timevalsub(&cur_time, &io->submit_time); + if (cur_time.tv_sec > io->wqe_timeout) { + ocs_log_info(hw->os, "IO timeout xri=0x%x tag=0x%x type=%d elasped time:%u\n", + io->indicator, io->reqtag, io->type, cur_time.tv_sec); /* remove from active_wqe list so won't try to abort again */ ocs_list_remove(&hw->io_timed_wqe, io); /* save status of "timed out" for when abort completes */ io->status_saved = 1; - io->saved_status = SLI4_FC_WCQE_STATUS_TARGET_WQE_TIMEOUT; + io->saved_status = SLI4_FC_WCQE_STATUS_WQE_TIMEOUT; io->saved_ext = 0; io->saved_len = 0; /* now abort outstanding IO */ - rc = ocs_hw_io_abort(hw, io, FALSE, NULL, NULL); + rc = ocs_hw_io_abort(hw, io, TRUE, NULL, NULL); if (rc) { ocs_log_test(hw->os, "abort failed xri=%#x tag=%#x rc=%d\n", @@ -11237,7 +11256,6 @@ target_wqe_timer_cb(void *arg) /* delete existing timer; will kick off new timer after checking wqe timeouts */ hw->in_active_wqe_timer = TRUE; - ocs_del_timer(&hw->wqe_timer); /* Forward timer callback to execute in the mailbox completion processing context */ if (ocs_hw_async_call(hw, target_wqe_timer_nop_cb, hw)) { @@ -11250,7 +11268,7 @@ shutdown_target_wqe_timer(ocs_hw_t *hw) { uint32_t iters = 100; - if (hw->config.emulate_tgt_wqe_timeout) { + if (hw->config.emulate_wqe_timeout) { /* request active wqe timer shutdown, then wait for it to complete */ hw->active_wqe_timer_shutdown = TRUE; diff --git a/sys/dev/ocs_fc/ocs_hw.h b/sys/dev/ocs_fc/ocs_hw.h index d4ee85c3f52a..671aa40871f2 100644 --- a/sys/dev/ocs_fc/ocs_hw.h +++ b/sys/dev/ocs_fc/ocs_hw.h @@ -211,7 +211,7 @@ typedef enum { OCS_HW_WAR_VERSION, OCS_HW_DISABLE_AR_TGT_DIF, OCS_HW_EMULATE_I_ONLY_AAB, /**< emulate IAAB=0 for initiator-commands only */ - OCS_HW_EMULATE_TARGET_WQE_TIMEOUT, /**< enable driver timeouts for target WQEs */ + OCS_HW_EMULATE_WQE_TIMEOUT, /**< enable driver timeouts for WQEs */ OCS_HW_LINK_CONFIG_SPEED, OCS_HW_CONFIG_TOPOLOGY, OCS_HW_BOUNCE, @@ -520,7 +520,7 @@ typedef union ocs_hw_io_param_u { ocs_hw_dif_blk_size_e blk_size; uint32_t cmnd_size; uint16_t flags; - uint8_t timeout; + uint32_t timeout; uint32_t first_burst; } fcp_ini; } ocs_hw_io_param_t; @@ -576,8 +576,8 @@ struct ocs_hw_io_s { void *abort_arg; /**< argument passed to "abort done" callback */ ocs_ref_t ref; /**< refcount object */ size_t length; /**< needed for bug O127585: length of IO */ - uint8_t tgt_wqe_timeout; /**< timeout value for target WQEs */ - uint64_t submit_ticks; /**< timestamp when current WQE was submitted */ + uint32_t wqe_timeout; /**< timeout value for WQEs */ + struct timeval submit_time; /**< timestamp when current WQE was submitted */ uint32_t status_saved:1, /**< if TRUE, latched status should be returned */ abort_in_progress:1, /**< if TRUE, abort is in progress */ @@ -915,7 +915,7 @@ struct ocs_hw_s { uint16_t auto_xfer_rdy_app_tag_value; uint8_t dif_mode; /**< DIF mode to use */ uint8_t i_only_aab; /** Enable initiator-only auto-abort */ - uint8_t emulate_tgt_wqe_timeout; /** Enable driver target wqe timeouts */ + uint8_t emulate_wqe_timeout; /** Enable driver wqe timeouts */ uint32_t bounce:1; const char *queue_topology; /**< Queue topology string */ uint8_t auto_xfer_rdy_t10_enable; /** Enable t10 PI for auto xfer ready */ diff --git a/sys/dev/ocs_fc/ocs_scsi.c b/sys/dev/ocs_fc/ocs_scsi.c index 0e87cc0bed4b..af9fc798b01c 100644 --- a/sys/dev/ocs_fc/ocs_scsi.c +++ b/sys/dev/ocs_fc/ocs_scsi.c @@ -413,7 +413,7 @@ ocs_target_io_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, } break; - case SLI4_FC_WCQE_STATUS_TARGET_WQE_TIMEOUT: + case SLI4_FC_WCQE_STATUS_WQE_TIMEOUT: /* target IO timed out */ scsi_status = OCS_SCSI_STATUS_TIMEDOUT_AND_ABORTED; break; @@ -2209,6 +2209,10 @@ ocs_initiator_io_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, scsi_status = OCS_SCSI_STATUS_ERROR; } break; + case SLI4_FC_WCQE_STATUS_WQE_TIMEOUT: + /* IO timed out */ + scsi_status = OCS_SCSI_STATUS_TIMEDOUT_AND_ABORTED; + break; case SLI4_FC_WCQE_STATUS_DI_ERROR: if (ext_status & 0x01) { scsi_status = OCS_SCSI_STATUS_DIF_GUARD_ERROR; diff --git a/sys/dev/ocs_fc/ocs_xport.c b/sys/dev/ocs_fc/ocs_xport.c index d6b0d8740906..d997ea245132 100644 --- a/sys/dev/ocs_fc/ocs_xport.c +++ b/sys/dev/ocs_fc/ocs_xport.c @@ -524,9 +524,11 @@ ocs_xport_initialize(ocs_xport_t *xport) } } - if (ocs->target_io_timer_sec) { - ocs_log_debug(ocs, "setting target io timer=%d\n", ocs->target_io_timer_sec); - ocs_hw_set(&ocs->hw, OCS_HW_EMULATE_TARGET_WQE_TIMEOUT, TRUE); + if (ocs->target_io_timer_sec || ocs->enable_ini) { + if (ocs->target_io_timer_sec) + ocs_log_debug(ocs, "setting target io timer=%d\n", ocs->target_io_timer_sec); + + ocs_hw_set(&ocs->hw, OCS_HW_EMULATE_WQE_TIMEOUT, TRUE); } ocs_hw_callback(&ocs->hw, OCS_HW_CB_DOMAIN, ocs_domain_cb, ocs); diff --git a/sys/dev/ocs_fc/sli4.h b/sys/dev/ocs_fc/sli4.h index 4d8686ce8841..e9271df1530f 100644 --- a/sys/dev/ocs_fc/sli4.h +++ b/sys/dev/ocs_fc/sli4.h @@ -5345,7 +5345,7 @@ typedef struct sli4_fc_wqec_s { #define SLI4_FC_WCQE_STATUS_RX_ABORT_REQUEST 0x1b /* driver generated status codes; better not overlap with chip's status codes! */ -#define SLI4_FC_WCQE_STATUS_TARGET_WQE_TIMEOUT 0xff +#define SLI4_FC_WCQE_STATUS_WQE_TIMEOUT 0xff #define SLI4_FC_WCQE_STATUS_SHUTDOWN 0xfe #define SLI4_FC_WCQE_STATUS_DISPATCH_ERROR 0xfd From nobody Tue Dec 12 16:01:42 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqNf06RFxz547Tg; Tue, 12 Dec 2023 16:01:44 +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 4SqNf05FNtz4Z3p; Tue, 12 Dec 2023 16:01:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702396904; h=from:from:reply-to:subject: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=Q6sSLg13Hi13m3/sUTfOBPIs0R0Xk7Ws+PJ0moneXuM=; b=WLU1GxMk0bdZ6Ugdvq8zKuuZNLhbILeo5uTVA/jFmV9koJC7rzbAEwnGFo3eNLX01HZ+LB md/4DJRexIIbtItJGH1Fp37I0va+dbHE5MvkPAX2jTXWhcYQeILjvUiyXSXM9/nOxzWVLO gYX0lRTEKKTukf8lnxRukRcNVvA1lqhVcY1eboB13rYeyRNR97uW12TDZ7KYCX+E/wgnIu dMp+YzLz1nDKA4QaRCTEVDmCi8na90ZKGdLt+lac9RTPoTG/KnOfpDFtLNRbhgmxzHX80I s1fRySeJISbFv3e2h6QrhLWud2VeO21FRWPiBRsw5R1meqkoAOWNMJWpwSV0Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702396904; a=rsa-sha256; cv=none; b=rMlRRtGCBdswK2gqqQ5u0+0gBiO4/RP4tRmOmU8jH0e/puFTdOCroq1xxQtBPaM/vH3dWn QGLZynR9uq9+2JdE355yMVt4WueubSaUnyojN6Rit6oRNH0yZ8KeBZgQSXi5AVPa6souJb YjvtvlAf5xjlIwjaCigJ5c5hMKIcb0hEzqSQWDwbt+zvBUJ1fhfuWWUxFTak+zgBNiNod9 +rQgBIWxWLZ1qCOOD+CnahiinHos+7PlEa+wcQ4qe5dKHMrC/lkjYmyIuWr5jLTf49rwLS 3itq6bHb/qVBMFi4EznEwho8e8epvxO2nRFyreIThREbUIPJIMJrtEOY3NA0LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702396904; h=from:from:reply-to:subject: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=Q6sSLg13Hi13m3/sUTfOBPIs0R0Xk7Ws+PJ0moneXuM=; b=s3O2M29MFEZcw+CboZ+qpKotnUbWT145os/XUnXomqKd6DtRpO8JGyYNQEp4bWsqv4h2ij /O4bRATUcrECOUjdQ/Qu+smgFvb81qFmd6Tni/reWMtIsdAluevK0Z1KF7rf1WkawnB5Iu KBBO0ui6fblXNu7G83bMY0f0s1BNQvTqE0WKzo7FnkQft8OGvcAly1o9Tf+6G+7xJtpCNH JJC5PegR/0XcO8mkjDTh3pchgcdTbfTqYQS5zfYA8yKdeWkov2UYU8PNUlb70HODhVciWe SD4qG+zOxVUy7T0avTiQM5hqxvWhpRU2TvVHJpGZh6tlJXiXoC5O6EpUJA2i8w== Received: from [IPV6:2601:648:8384:fd00:35e0:5001:6a3c:b8e6] (unknown [IPv6:2601:648:8384:fd00:35e0:5001:6a3c:b8e6]) (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 4SqNf01Hg8zqnd; Tue, 12 Dec 2023 16:01:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <098c85ab-4210-455c-a3b9-773bf0ce87b7@FreeBSD.org> Date: Tue, 12 Dec 2023 08:01:42 -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: fb17dfa0c83c - main - libicp: unbreak for armv6 after recent OpenZFS import Content-Language: en-US To: Dimitry Andric , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202312082310.3B8NA5cI026712@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202312082310.3B8NA5cI026712@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/8/23 3:10 PM, Dimitry Andric wrote: > The branch main has been updated by dim: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa > > commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa > Author: Dimitry Andric > AuthorDate: 2023-12-08 23:09:36 +0000 > Commit: Dimitry Andric > CommitDate: 2023-12-08 23:09:50 +0000 > > libicp: unbreak for armv6 after recent OpenZFS import > > The following upstream commit: > 727497ccdfcc module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6 > > does indeed enable sha2 asm for earlier arm CPUs, but since libicp's > Makefile was not updated, this leads to: > > ld: error: undefined reference due to --no-allow-shlib-undefined: zfs_sha256_block_armv7 > > Fix it by compiling sha256-armv7.S and sha512-armv7.S for armv6 too. > > Fixes: 3494f7c019fc > --- > cddl/lib/libicp/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile > index 2d9bb3c67cb4..085818f2371a 100644 > --- a/cddl/lib/libicp/Makefile > +++ b/cddl/lib/libicp/Makefile > @@ -21,7 +21,7 @@ ASM_SOURCES_AS = \ > asm-x86_64/blake3/blake3_sse41.S > > CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES > -.elif ${MACHINE_ARCH} == "armv7" > +.elif ${MACHINE_ARCH} == "armv6" || ${MACHINE_ARCH} == "armv7" Since this applies to all 32-bit arm flavors, should this be using ${MACHINE_CPUARCH} == "arm" instead? -- John Baldwin From nobody Tue Dec 12 17:14:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqQGg4wcnz54C0t; Tue, 12 Dec 2023 17:15:07 +0000 (UTC) (envelope-from dim@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 4SqQGg42Msz3HHK; Tue, 12 Dec 2023 17:15:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702401307; 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=InhrZwUPnMQur0CHnDeFFa6lcRSkJMAwpvMom7J9m4g=; b=R+N67oB2YCD61l41K7zzz9+bjrA4vXCjnMimeGzdgc9hFbDDFqUgopb3i+HBFaIONa3IHJ QLs9dxeEU0oKW9vqj1d7PM6snF0T1HMYB/B2SJdzrVm1tA3LGksEMDFuNsQcSj0rKnjHEd 9nJO8+cUtcDM/st8b3vKCo0fddvWqUk8UUDMcAjzOT7yvIAipGNgGsxg897wuLgpAzByt/ glCnlsh08ORhcS+n9a/Hz3OuKTkW/uPt8CRPg+DxNr2mrskfGUKviIUPpNfrvxoJoJNv1W JsjQCfoUERxThgHDTUrdTE6M0XJoAKI3/MKBsGv0bnBtYl1bYkgPFrZoSCJGjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702401307; a=rsa-sha256; cv=none; b=OAXXSDlMso8b0LRL1xKrtgNymn7fO1c4AX07wEftP6WRqUx6RFfWdBAxb32JqyV2iOY+sO X68bc7gq6Px1qaMThhueLOOp+xodwjNLniNdxJS+Z7fkCJM3jJGN2zVa1CxOH4hb5t0Eaj pS6XCxtffShghID8/sOdcNDhFogiGbWiwxklpdqhaN8ykaGd1TIX+jEldSgsD73dUyNY/G jppxsKoARDlLqRtJtK5q1KUTuDSzjnqWu/HRJjeyxXjreGiximZORQk8dUQ4CqB9dE/Yc9 XnsiTIM+KVRhCqnZH7RhSK2+P1dRzGn18+kfShf8R/vc/d5/oDhTHxs3RIdzbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702401307; 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=InhrZwUPnMQur0CHnDeFFa6lcRSkJMAwpvMom7J9m4g=; b=ra4X4rwZr7zfPj5RTcKzsu/B9X7AkOmlxiuSKl0QlmA/43VzyTWUhFaCYCXaMPePHgQbhN XCYBBa7NhIT/ZhT875BhValyv8OwpuMP4QhMthk9/8jVUQO28aOAokgA4NJRvJViGNXFTm uIln74PYscjWRHRjats7O1ZJaMDsVesmb02yzgojzAQCH5bd0S/3/fsl4/Y+DblukbF8Qq B1a6zOny4d33qXSRbBus2peDUERPQw6KQLSaBtfuOYpgu8Q3hFWNL0jW6sKo8H9/WSRYie hkGVoEyzsr0DuTRPSTuctuDYu/orO/AvFb8cAJqJOwAsDO5JqLCdcrqm05YNkw== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher 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 "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SqQGg2Nhtzs72; Tue, 12 Dec 2023 17:15:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.wg.andric.com [10.69.1.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 27A6C3849E; Tue, 12 Dec 2023 18:15:06 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_54F359DF-2321-45A5-A23F-3405194A80EB"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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 \(3731.700.6\)) Subject: Re: git: fb17dfa0c83c - main - libicp: unbreak for armv6 after recent OpenZFS import From: Dimitry Andric In-Reply-To: <098c85ab-4210-455c-a3b9-773bf0ce87b7@FreeBSD.org> Date: Tue, 12 Dec 2023 18:14:47 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <202312082310.3B8NA5cI026712@gitrepo.freebsd.org> <098c85ab-4210-455c-a3b9-773bf0ce87b7@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_54F359DF-2321-45A5-A23F-3405194A80EB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 12 Dec 2023, at 17:01, John Baldwin wrote: >=20 > On 12/8/23 3:10 PM, Dimitry Andric wrote: >> The branch main has been updated by dim: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dfb17dfa0c83cc213400fe7e1ed7a3925= 3a4fcefa >> commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa >> Author: Dimitry Andric >> AuthorDate: 2023-12-08 23:09:36 +0000 >> Commit: Dimitry Andric >> CommitDate: 2023-12-08 23:09:50 +0000 >> libicp: unbreak for armv6 after recent OpenZFS import >> The following upstream commit: >> 727497ccdfcc module/icp/asm-arm/sha2: enable non-SIMD asm kernels = on armv5/6 >> does indeed enable sha2 asm for earlier arm CPUs, but since = libicp's >> Makefile was not updated, this leads to: >> ld: error: undefined reference due to = --no-allow-shlib-undefined: zfs_sha256_block_armv7 >> Fix it by compiling sha256-armv7.S and sha512-armv7.S for = armv6 too. >> Fixes: 3494f7c019fc >> --- >> cddl/lib/libicp/Makefile | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile >> index 2d9bb3c67cb4..085818f2371a 100644 >> --- a/cddl/lib/libicp/Makefile >> +++ b/cddl/lib/libicp/Makefile >> @@ -21,7 +21,7 @@ ASM_SOURCES_AS =3D \ >> asm-x86_64/blake3/blake3_sse41.S >> CFLAGS+=3D -D__amd64 -D_SYS_STACK_H -UHAVE_AES >> -.elif ${MACHINE_ARCH} =3D=3D "armv7" >> +.elif ${MACHINE_ARCH} =3D=3D "armv6" || ${MACHINE_ARCH} =3D=3D = "armv7" >=20 > Since this applies to all 32-bit arm flavors, should this be using > ${MACHINE_CPUARCH} =3D=3D "arm" instead? You may be right; if I read https://github.com/openzfs/zfs/commit/727497ccdfcc correctly: > module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6 > My merged pull request #15557 fixes compilation of sha2 kernels on arm > v5/6. However, the compiler guards only allows sha256/512_armv7_impl = to > be used when __ARM_ARCH > 6. This patch enables these ASM kernels on = all > arm architectures. Some compiler guards are adjusted accordingly to > avoid the unnecessary compilation of SIMD (e.g., neon, armv8ce) = kernels > on old architectures. > > Reviewed-by: Brian Behlendorf > Signed-off-by: Shengqi Chen > Closes #15623 It's talking about "all arm architectures", but I'm not sure if this means all arm architectures supported by OpenZFS, or in general. I would assume the latter. -Dimitry --Apple-Mail=_54F359DF-2321-45A5-A23F-3405194A80EB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXiVBwAKCRCwXqMKLiCW o2d+AJ41TMrVnxeOArpfC5oU1at8GEZchACgqdeibOgIK7/0EJ0GjAh+3K6nvMA= =kEcF -----END PGP SIGNATURE----- --Apple-Mail=_54F359DF-2321-45A5-A23F-3405194A80EB-- From nobody Tue Dec 12 17:35:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqQkM4Jldz54DJK for ; Tue, 12 Dec 2023 17:35:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 4SqQkM2fq3z3L3h for ; Tue, 12 Dec 2023 17:35:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50c02628291so6279485e87.0 for ; Tue, 12 Dec 2023 09:35:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1702402537; x=1703007337; 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=pffR6Gi0A+wl+KvwnjXRujz7wVIrcOsnXSoJdUnIQsE=; b=RESm14U7z+7mTMq+m81jE2Ywsy7/fIRTrcywduOSe/cXBkXpJhuNShbZJBrvjFe+Pm XYDyA7SYdgd2TctUxrUc2nJPuClBAMPihjy0aYY2u/wDl2W0RmGSiqHXT1cKB01lo/jW 2ifain0ODBnwEB/05dku+hyyv3YKhKae/D1axEn7Q0iy7sD+2+zKCVu81Hq82kMnSvvj +reipOPv2QPiloZwsV3r8GgU5so2iLDHyCTS6t1EU4Si5C2Ad/zkh6kB1MwIbPGLlFEr 8rAr1pUOiYZ8jex3Q1xd2ITDwa9IFtlpYhuDCZj84Ley0jPbkvQlidgm8bXs89KVMkM3 HY/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702402537; x=1703007337; 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=pffR6Gi0A+wl+KvwnjXRujz7wVIrcOsnXSoJdUnIQsE=; b=aIMq1Vc7i/cCYIC9SAuoNMAuL0M1BnDh1kCWyFs5VykQzUpIrb8RqtUMBYbd1JqrPC BZz9Zz8lhy3HOGj08aT+L7mmi6dCvrhwKz+GsRPZZQd4MvNJUyEO82SE8/Je+X5AZ480 dkUQbiZlynnnt2629NkoFjEOcoG9M6LSRtzUdduZ0Ew4GmfwBoJuZStXcsa4zdqaT2lQ i3U2gMJkHLwTDjc/CD7hjiqv/bs8sGBZa5aP/tel0SQloPzfJkzxS0bdH+fpN4MRyYTM ff4Fv0BWG8qhwk80fLgctHmfhcrEWjTR5992mazqGF7C6p7dXqkgGV27ZLMo4aJLpVRO xk+g== X-Gm-Message-State: AOJu0YzTKDC+wUUPcCG7LoM9LUzgIGwL2m5k1lSfZQKRIbmpkK4ogFw5 7H2c2X6L5K7dKsockjM66pkNRtB5ATY102W0CXeLBg== X-Google-Smtp-Source: AGHT+IESRmEsYqgDe2GVwGEWVxu1OYovlybMJy/xb+GJLc2+1jgpZVRpmsNTvdWd3/so/LKq+rwzNR8OQMblTTm+mL0= X-Received: by 2002:a19:5f55:0:b0:50b:f37f:f394 with SMTP id a21-20020a195f55000000b0050bf37ff394mr2943497lfj.14.1702402537067; Tue, 12 Dec 2023 09:35:37 -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: <202312082310.3B8NA5cI026712@gitrepo.freebsd.org> <098c85ab-4210-455c-a3b9-773bf0ce87b7@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Tue, 12 Dec 2023 10:35:25 -0700 Message-ID: Subject: Re: git: fb17dfa0c83c - main - libicp: unbreak for armv6 after recent OpenZFS import To: Dimitry Andric Cc: John Baldwin , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000007cb2aa060c537a1c" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4SqQkM2fq3z3L3h --0000000000007cb2aa060c537a1c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 12, 2023 at 10:15=E2=80=AFAM Dimitry Andric w= rote: > On 12 Dec 2023, at 17:01, John Baldwin wrote: > > > > On 12/8/23 3:10 PM, Dimitry Andric wrote: > >> The branch main has been updated by dim: > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dfb17dfa0c83cc213400fe7e1ed7a392= 53a4fcefa > >> commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa > >> Author: Dimitry Andric > >> AuthorDate: 2023-12-08 23:09:36 +0000 > >> Commit: Dimitry Andric > >> CommitDate: 2023-12-08 23:09:50 +0000 > >> libicp: unbreak for armv6 after recent OpenZFS import > >> The following upstream commit: > >> 727497ccdfcc module/icp/asm-arm/sha2: enable non-SIMD asm kernels > on armv5/6 > >> does indeed enable sha2 asm for earlier arm CPUs, but since > libicp's > >> Makefile was not updated, this leads to: > >> ld: error: undefined reference due to > --no-allow-shlib-undefined: zfs_sha256_block_armv7 > >> Fix it by compiling sha256-armv7.S and sha512-armv7.S for > armv6 too. > >> Fixes: 3494f7c019fc > >> --- > >> cddl/lib/libicp/Makefile | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile > >> index 2d9bb3c67cb4..085818f2371a 100644 > >> --- a/cddl/lib/libicp/Makefile > >> +++ b/cddl/lib/libicp/Makefile > >> @@ -21,7 +21,7 @@ ASM_SOURCES_AS =3D \ > >> asm-x86_64/blake3/blake3_sse41.S > >> CFLAGS+=3D -D__amd64 -D_SYS_STACK_H -UHAVE_AES > >> -.elif ${MACHINE_ARCH} =3D=3D "armv7" > >> +.elif ${MACHINE_ARCH} =3D=3D "armv6" || ${MACHINE_ARCH} =3D=3D "armv7= " > > > > Since this applies to all 32-bit arm flavors, should this be using > > ${MACHINE_CPUARCH} =3D=3D "arm" instead? > > You may be right; if I read > https://github.com/openzfs/zfs/commit/727497ccdfcc correctly: > > > module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6 > > My merged pull request #15557 fixes compilation of sha2 kernels on arm > > v5/6. However, the compiler guards only allows sha256/512_armv7_impl to > > be used when __ARM_ARCH > 6. This patch enables these ASM kernels on al= l > > arm architectures. Some compiler guards are adjusted accordingly to > > avoid the unnecessary compilation of SIMD (e.g., neon, armv8ce) kernels > > on old architectures. > > > > Reviewed-by: Brian Behlendorf > > Signed-off-by: Shengqi Chen > > Closes #15623 > > It's talking about "all arm architectures", but I'm not sure if this > means all arm architectures supported by OpenZFS, or in general. I would > assume the latter. > Yea, John's comments are correct. The OpenZFS code expects this interface to be there and guards appropriately against the use of features only on armv7. Warner --0000000000007cb2aa060c537a1c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Dec 12, 2023 at 10:15=E2=80= =AFAM Dimitry Andric <dim@freebsd.org= > wrote:
= On 12 Dec 2023, at 17:01, John Baldwin <jhb@freebsd.org> wrote:
>
> On 12/8/23 3:10 PM, Dimitry Andric wrote:
>> The branch main has been updated by dim:
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3Dfb17dfa0c83cc213400fe7e1ed7a39253a4fc= efa
>> commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa
>> Author:=C2=A0 =C2=A0 =C2=A0Dimitry Andric <dim@FreeBSD.org><= br> >> AuthorDate: 2023-12-08 23:09:36 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Dimitry Andric <dim@FreeBSD.org><= br> >> CommitDate: 2023-12-08 23:09:50 +0000
>>=C2=A0 =C2=A0 =C2=A0libicp: unbreak for armv6 after recent OpenZFS = import
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The following upstream commit: >>=C2=A0 =C2=A0 =C2=A0727497ccdfcc module/icp/asm-arm/sha2: enable no= n-SIMD asm kernels on armv5/6
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 does indeed enable sha2 asm for = earlier arm CPUs, but since libicp's
>>=C2=A0 =C2=A0 =C2=A0Makefile was not updated, this leads to:
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ld: error: undefined refe= rence due to --no-allow-shlib-undefined: zfs_sha256_block_armv7
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fix it by compiling sha256-armv7= .S and sha512-armv7.S for armv6 too.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 3494f7c019fc
>> ---
>>=C2=A0 cddl/lib/libicp/Makefile | 2 +-
>>=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile >> index 2d9bb3c67cb4..085818f2371a 100644
>> --- a/cddl/lib/libicp/Makefile
>> +++ b/cddl/lib/libicp/Makefile
>> @@ -21,7 +21,7 @@ ASM_SOURCES_AS =3D \
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 asm-x86_64/blake3/blake3_sse41.S=
>>=C2=A0 =C2=A0 CFLAGS+=3D -D__amd64 -D_SYS_STACK_H -UHAVE_AES
>> -.elif ${MACHINE_ARCH} =3D=3D "armv7"
>> +.elif ${MACHINE_ARCH} =3D=3D "armv6" || ${MACHINE_ARCH}= =3D=3D "armv7"
>
> Since this applies to all 32-bit arm flavors, should this be using
> ${MACHINE_CPUARCH} =3D=3D "arm" instead?

You may be right; if I read
https://github.com/openzfs/zfs/commit/727497ccdfcc= correctly:

> module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6
> My merged pull request #15557 fixes compilation of sha2 kernels on arm=
> v5/6. However, the compiler guards only allows sha256/512_armv7_impl t= o
> be used when __ARM_ARCH > 6. This patch enables these ASM kernels o= n all
> arm architectures. Some compiler guards are adjusted accordingly to > avoid the unnecessary compilation of SIMD (e.g., neon, armv8ce) kernel= s
> on old architectures.
>
> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
> Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
> Closes #15623

It's talking about "all arm architectures", but I'm not s= ure if this
means all arm architectures supported by OpenZFS, or in general. I would assume the latter.

Yea, John's comm= ents are correct. The OpenZFS code expects this interface
to be t= here and guards appropriately against the use of features only on armv7.

Warner=C2=A0
--0000000000007cb2aa060c537a1c-- From nobody Tue Dec 12 19:11:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqSs614Kwz54KWv; Tue, 12 Dec 2023 19:11: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 4SqSs60d3Wz3YMD; Tue, 12 Dec 2023 19:11:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRHK8t1UNtbwU7rE30j2Y/y1naZ6HO6VDFt/ZFLGd+A=; b=xfN63YnRLXgyg6I+O8aY7G9iecJn+NJ/Kh5IuaXMUB75CXsY6Gr9/6Nbm2yBSVzjfNlFq/ fElRCfugoEjiHcFALGOQ0Hs/WCOSM7aCwicymJkn4RK4EmqTuh8iM0U6kLLdVH4fHRM85V RqK9MFvkP9I5tXR89l2KTeLoOzvHztbJy7ivvoC96Uu5FCRdu9/xWG8h560q2gD48lBCth NEsQXc2DP9NDI+d5wzwzwSHKcpL3/LXvkNXv540/WtVc4vWWPR83NRCLW862qdP5ov4OkM 1ir0eVbo4+5N7T6xbZwmJcmiL8RDWmZOtd3D9pgdkysJW6QOZbrvxJXUOAb/9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702408298; a=rsa-sha256; cv=none; b=lpH794IIa634JjGYTC+0cQnd+isrftYMe2VXrqoiboxt9d8xBEljU1snk4t/s0bclgmAMr Ts6SvO6dPvmQmI5xSFI1TXATdugq4vRkOQFpa0Vzy5CmvpCXN5YwS0RpMOaKPkt9AHgwUv x1sUNGUGZkogzIQJZmgekKCtysoxYB9GgaQt4Eh0a2g6QA5GGl3QO+UC7CWK6Vi9Yz2uLv Q2q48UJIbts2tP4SEj3nVULR38f+9jOWNzpCiQG40S2BU+uXbrtdfJx1wQOHhMjzM651GC y/AtTp1OaOplyD4QHSMg4QUEau7MLfuoMWtRy4Bqz5IPETq3l0rL1XBmvV2HEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRHK8t1UNtbwU7rE30j2Y/y1naZ6HO6VDFt/ZFLGd+A=; b=RyMc1jdJut8mNXlu69JoOFXFn96/yxpZt27AP162VH/4KX77CYCQhyOOyFD+l44mRtRlen j68G9RuUWAoMl06XlqpQLeNgzp21HDiNOr38d85ViiY4HYQ3g78mfTVdx6o3mSqTde0095 cpK6F3EteSoHr9bEtGlou+9V8FGBQcsvWg9xjPDP9L8049R1eoS/mOvNoTIvTF8mlEk+G9 CAYqXAW73PDPSCXfFpuAMq2eZni/tGyXpwIySTdi8Pog3///evVr43s6d6yN09p9xOtGT9 vqtRsLHTJiQ+MY0Oty1xdm06lqrACIW5BR8Ud1LjFxOzvF8TGq6kftwvenvB5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqSs56nQCzCQ9; Tue, 12 Dec 2023 19:11: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 3BCJBbnI084751; Tue, 12 Dec 2023 19:11:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCJBbQS084748; Tue, 12 Dec 2023 19:11:37 GMT (envelope-from git) Date: Tue, 12 Dec 2023 19:11:37 GMT Message-Id: <202312121911.3BCJBbQS084748@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: 6fa843f6e647 - main - nfsclient: Propagate copyin() errors from nfsm_uiombuf() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 6fa843f6e647a1a1e0e42af1e7abc9e903699f31 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa843f6e647a1a1e0e42af1e7abc9e903699f31 commit 6fa843f6e647a1a1e0e42af1e7abc9e903699f31 Author: Mark Johnston AuthorDate: 2023-12-12 01:04:56 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 19:05:24 +0000 nfsclient: Propagate copyin() errors from nfsm_uiombuf() Approved by: so Security: SA-23:18.nfsclient Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clcomsubs.c | 23 ++++++++++++++++------- sys/fs/nfsclient/nfs_clrpcops.c | 23 ++++++++++++++++++++--- sys/fs/nfsclient/nfs_clvnops.c | 4 ++-- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 133850dcde0e..578fb3ce1340 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -370,7 +370,7 @@ int nfsrpc_destroysession(struct nfsmount *, struct nfsclsession *, struct ucred *, NFSPROC_T *); /* nfs_clcomsubs.c */ -void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); +int nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); struct mbuf *nfsm_uiombuflist(struct uio *, int, u_int); u_int8_t *nfscl_getmyip(struct nfsmount *, struct in6_addr *, int *); int nfsm_getfh(struct nfsrv_descript *, struct nfsfh **); diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index 7912ab56140f..270f39d03c90 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -51,12 +51,12 @@ NFSCLSTATEMUTEX; * copies a uio scatter/gather list to an mbuf chain. * NOTE: can only handle iovcnt == 1 */ -void +int nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) { char *uiocp; struct mbuf *mp, *mp2; - int xfer, left, mlen; + int error, xfer, left, mlen; int uiosiz, clflg, rem; char *mcp, *tcp; @@ -104,8 +104,11 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) + return (error); + } mp->m_len += xfer; left -= xfer; uiocp += xfer; @@ -148,6 +151,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) } nd->nd_bpos = mcp; nd->nd_mb = mp; + return (0); } /* @@ -160,7 +164,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) { char *uiocp; struct mbuf *mp, *mp2, *firstmp; - int extpg, extpgsiz = 0, i, left, mlen, rem, xfer; + int error, extpg, extpgsiz = 0, i, left, mlen, rem, xfer; int uiosiz, clflg; char *mcp, *tcp; @@ -218,8 +222,13 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) { + m_freem(firstmp); + return (NULL); + } + } mp->m_len += xfer; mcp += xfer; if (maxext > 0) { diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 86c2959b1209..e9acedfb6473 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2104,7 +2104,12 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, *tl++ = x; /* total to this offset */ *tl = x; /* size of this write */ } - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + free(nd, M_TEMP); + return (error); + } /* * Although it is tempting to do a normal Getattr Op in the * NFSv4 compound, the result can be a nearly hung client @@ -6361,6 +6366,10 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, iovlen = uiop->uio_iov->iov_len; m = nfsm_uiombuflist(uiop, len, 0); + if (m == NULL) { + error = EFAULT; + break; + } } tdrpc = drpc = malloc(sizeof(*drpc) * (mirrorcnt - 1), M_TEMP, M_WAITOK | @@ -6933,7 +6942,11 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, *tl++ = txdr_unsigned(len); *tl++ = txdr_unsigned(*iomode); *tl = txdr_unsigned(len); - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } nrp = dsp->nfsclds_sockp; if (nrp == NULL) /* If NULL, use the MDS socket. */ @@ -9057,7 +9070,11 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct uio *uiop, nfsm_strtom(nd, name, strlen(name)); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(uiop->uio_resid); - nfsm_uiombuf(nd, uiop, uiop->uio_resid); + error = nfsm_uiombuf(nd, uiop, uiop->uio_resid); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 5c9ca69b5d51..a690e988b4b3 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1587,7 +1587,7 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred) error = nfscl_doiods(vp, uiop, NULL, NULL, NFSV4OPEN_ACCESSREAD, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva, &attrflag); if (attrflag) { @@ -1618,7 +1618,7 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, error = nfscl_doiods(vp, uiop, iomode, must_commit, NFSV4OPEN_ACCESSWRITE, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "writerpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, uiop->uio_td, &nfsva, &attrflag, called_from_strategy, ioflag); From nobody Tue Dec 12 21:04:30 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqWML4w1Xz53GVw; Tue, 12 Dec 2023 21:04: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 4SqWML4QD4z3Jg5; Tue, 12 Dec 2023 21:04:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702415070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fmYm6LJ3pl13d0SkqtOyy74/S45DSqQxaMhAb2TgDDA=; b=chkjZkRNLopz/CUupCQiI+XHDjqyRtwOHX5ERIIaN5m/0wNHQGbwi66trNNT9Q5Lp2KLkG 9ofYGE4ZT3HqiLQ8kXGFH9KwQjKLkmIoaPCFZykSJDVnpQ/Wg296jlf+nWx/vvA/KA2FOM 1DqB4KlI7Vvujnxs7NHclwJNhrc3g3Rwk8EWr80WkbpJE4WSvjwXVVps+LaKD/TOtKSuFf DVQY8/3xeOxEFnVf2l5xfUPhP0J9egjeznB3hVmX7Dh87Z2WcThf6FhZBQViF6qRRM1TBJ u66S1TnUxhrnRdovktyfWgVZfm48AjTu//ddzSy0i1H6J4Btm4btADQCUt44aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702415070; a=rsa-sha256; cv=none; b=ZTjAYIulUOj4oet88Ayw7OJHCTaJmVfUqAe4A0lGuLoDeyGh4FXMZl+PDpfXJ9pD55cNB7 125LU+MwHy/WPf3+c/8jsYrAfPjDcWFs6K3JPyrxQqS0oYoqxpYMSIZNXvBr19hcj7pySj uLpWe4zMC13Fgq5NCWjE4kTYeqLBaoFAX6EJr/k2EjHtTFTTHBuldT3A+2rfEWT8TfTFAl cNe1yZNI/iEVnSxxyD/9ahYEld8ozZCkol621bmM6OiEp2YsgV6AGItcN3zAqHcBzadT+4 63H5w5525Sjjn+k1463gG5cxIXbC/92jkqEPXozWsE4UQojSp5jEAl4QyLMDYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702415070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fmYm6LJ3pl13d0SkqtOyy74/S45DSqQxaMhAb2TgDDA=; b=WjZaVF/qJWw4TXnT8XQL5G2/ZXCYd3VNgpkpDOk4KZwvFGR++xVYBsgqFg+1BGnOGw6Dtj C6ux2d1BSCZWBYSzxMS8VZDaz4im/jYQZMYgkB7Rki0dmuVeefxyt3NkuQPKJvSvX4dkXO jTfB1SAnrWu95uFGhq7kwTxEYkz7tyzr9wuLAWJ+0YJQ7zmV1gFBUUqLsZfuOhQ/Hx3aC6 QPg5wmkmKixV3DQ1GJWYVt1Y7OZGwXqlRqN3Yw1JiPUn2DrXKwfDSEMDnrW1DYnJdGHPuD JT4Tmeo/9VsKK2ZXqDu86sFAZVicmrYTdyUfGa3tN5UCXFMiAAwCCCWYIzt9hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqWML3MY2zWH4; Tue, 12 Dec 2023 21:04: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 3BCL4U5Z072184; Tue, 12 Dec 2023 21:04:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCL4Ujo072181; Tue, 12 Dec 2023 21:04:30 GMT (envelope-from git) Date: Tue, 12 Dec 2023 21:04:30 GMT Message-Id: <202312122104.3BCL4Ujo072181@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: 0c511bafdd5b - main - netlink: fix snl_writer and linear_buffer re-allocation logic List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0c511bafdd5b309505c13c8dc7c6816686d1e103 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c511bafdd5b309505c13c8dc7c6816686d1e103 commit 0c511bafdd5b309505c13c8dc7c6816686d1e103 Author: Igor Ostapenko AuthorDate: 2023-12-12 18:26:21 +0000 Commit: Kristof Provost CommitDate: 2023-12-12 20:49:14 +0000 netlink: fix snl_writer and linear_buffer re-allocation logic - Use the correct base pointer after re-allocation to avoid buffer overflows. - Maintain correct snl_writer.size, which avoids redundant memory allocation, e.g. a need for ~1k bytes may end up with ~32k linear_buffer actually allocated. This fixes a pfctl regression at least for armv7 after the addrule logic migration to netlink: ffbf25951e7b ("pf: convert rule addition to netlink") The add rule command creates a bigger than default size netlink requests which triggers the re-allocation logic. Reviewed by: kp MFC after: 2 weeks Differnetial Revision: https://reviews.freebsd.org/D43003 --- sys/netlink/netlink_snl.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 8bb7b076b7b7..7bdf5424ddf3 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -1036,19 +1036,23 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) if (nw->error) return (false); - void *new_base = snl_allocz(nw->ss, new_size); - if (new_base == NULL) { + if (snl_allocz(nw->ss, new_size) == NULL) { nw->error = true; return (false); } + nw->size = new_size; - memcpy(new_base, nw->base, nw->offset); - if (nw->hdr != NULL) { - int hdr_off = (char *)(nw->hdr) - nw->base; + void *new_base = nw->ss->lb->base; + if (new_base != nw->base) { + memcpy(new_base, nw->base, nw->offset); + if (nw->hdr != NULL) { + int hdr_off = (char *)(nw->hdr) - nw->base; - nw->hdr = (struct nlmsghdr *)(void *)((char *)new_base + hdr_off); + nw->hdr = (struct nlmsghdr *) + (void *)((char *)new_base + hdr_off); + } + nw->base = new_base; } - nw->base = new_base; return (true); } From nobody Tue Dec 12 22:55:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqYqT4Nvfz53QnY; Tue, 12 Dec 2023 22:55: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 4SqYqT3xZYz3bMB; Tue, 12 Dec 2023 22:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702421733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3Y+PHu/6s9yt/5jfopJ1/OzEyQpixpPGUtlfa2cMeA=; b=L19x2/HWhvJGVimRNvRU6NEuo7h45KbLIZlfySoxc4Z/U1AZEVgSzXts8wyrjpBb95puvq bykq4FN0AtHeQdvReb44wjXk16f3h0Dcnm1i43iekb+PibwXI5Eajyc4MZQYmvnW4IpQ3F eH7onOR71QmqRZ9gQrQJwP5mG/y0vPNCT4HCreYeIVMKKvWGEXAc/1kI7fV+wWrbKLuWQj WsjYxNrp9Vpw097UlBtJrUbX1bFXxplEIiSGB7T6esgUYFYYPsUXiw+L6CKRCxXpO62wHY Hpm7n/til5ObZLM0cHwi84t57qN7hXAXDBJjw4wVbkSVJdKUaBkMPXQAl+l8Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702421733; a=rsa-sha256; cv=none; b=juv9Cjvhj2qt8GtJ4Or7AT6uIbxb5Dqb3uJI1kFR+Ud1M5fmTSstJSJ00rwpdLG6Zrlrh4 ENkEWdl/z/4FI60HB/DooAW9oRPkPmZUZwDOPJwdVPzs4dRVmU1dwQPC/EU/CemizTBTzq QlLJwXSZxcz0O9VtGKTYD2P4g6jt0S47jrlPIAdbQFlikCjvrFlunOiKVHCnFm+axno7nt HLa2V8pj5fHu5EMPNzJo2N7rVahOcLWEbCwUgVwoGiXm5lec/DrpsLQUwlqUfR4twI34V2 ZQdDT4BpQ/zusYeNEuVDUufwgt4Z6z8OFszi6ta9I7pcO+m2OB0VvNuot/9vHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702421733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3Y+PHu/6s9yt/5jfopJ1/OzEyQpixpPGUtlfa2cMeA=; b=X8aK6GY22Pr0qjzdIBqn/b2HwjgVCPWzry9ATW/9rwCafcAs+JATDeySGsGqFkbSZqU1a7 2kAP9Z5/mO8tNSGxl2fdxMlBhXccrJEore6PNYG+keJSk7zA4LUxMBQ7roRtFYmisE2cRu bhO7LdubvhA31WxiNueaVZIPi4kRLL0/fUcSbfHgNr0ieAOWlqwwMW78QIPHC11M5sYyu4 jgytYGiiwo3IJsjFDNpzl8cxL51J047Pdf3NLJajeWw0H2p5Yj1Uentj3hJlTZKOJJhCJK MYmKhbhxBxdwSUklJ4O5AEAxHEEyu/xW1nnOA7Y2YEJIoFceVZkKs4dpzGcLgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqYqT31ZhzZKQ; Tue, 12 Dec 2023 22:55: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 3BCMtXHa055651; Tue, 12 Dec 2023 22:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCMtXE2055648; Tue, 12 Dec 2023 22:55:33 GMT (envelope-from git) Date: Tue, 12 Dec 2023 22:55:33 GMT Message-Id: <202312122255.3BCMtXE2055648@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: 9aaf4e3be61f - main - libc/*/SYS.h: remove SYCALL macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9aaf4e3be61fc20a84347b7c2c524256a4b93a43 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9aaf4e3be61fc20a84347b7c2c524256a4b93a43 commit 9aaf4e3be61fc20a84347b7c2c524256a4b93a43 Author: Brooks Davis AuthorDate: 2023-12-12 22:52:41 +0000 Commit: Brooks Davis CommitDate: 2023-12-12 22:52:41 +0000 libc/*/SYS.h: remove SYCALL macro This has not been a univerally available interface since it was removed from amd64 by commit efbef97de9805dec95db09953426f0b21bb2964f in 2004. I removed the last consumers in 2016 when I replaced pipe(2) with pipe2(2) in commit b60998c6331e2be21f1fc29fa6c82d94a1f72ef0. Reviewed by: imp, jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42996 --- lib/libc/aarch64/SYS.h | 8 -------- lib/libc/arm/SYS.h | 3 --- lib/libc/i386/SYS.h | 7 +++---- lib/libc/powerpc/SYS.h | 10 ---------- lib/libc/powerpc64/SYS.h | 18 ------------------ lib/libc/riscv/SYS.h | 8 -------- 6 files changed, 3 insertions(+), 51 deletions(-) diff --git a/lib/libc/aarch64/SYS.h b/lib/libc/aarch64/SYS.h index 059ecd469650..af7f0200a0c7 100644 --- a/lib/libc/aarch64/SYS.h +++ b/lib/libc/aarch64/SYS.h @@ -34,14 +34,6 @@ mov x8, SYS_ ## name; \ svc 0 -#define SYSCALL(name) \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - ret; \ -END(__sys_##name) - /* * Conditional jumps can only go up to one megabyte in either * direction, and cerror can be located anywhere, so we have diff --git a/lib/libc/arm/SYS.h b/lib/libc/arm/SYS.h index 9f4750a16b9f..9ac2d90104b4 100644 --- a/lib/libc/arm/SYS.h +++ b/lib/libc/arm/SYS.h @@ -59,9 +59,6 @@ it cs; \ bcs PIC_SYM(CERROR, PLT) -#define SYSCALL(x) \ - _SYSCALL(x) - #define PSEUDO(x) \ ENTRY(__CONCAT(__sys_, x)); \ .weak _C_LABEL(__CONCAT(_,x)); \ diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index 9e8c645280bf..6ef21fb794a6 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -35,13 +35,12 @@ #include #include -#define SYSCALL(name) ENTRY(__sys_##name); \ +#define RSYSCALL(name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ mov $SYS_##name,%eax; KERNCALL; \ - jb HIDENAME(cerror) - -#define RSYSCALL(name) SYSCALL(name); ret; END(__sys_##name) + jb HIDENAME(cerror); \ + ret; END(__sys_##name) #define PSEUDO(name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h index 7fdf7c734310..8c47a65735f5 100644 --- a/lib/libc/powerpc/SYS.h +++ b/lib/libc/powerpc/SYS.h @@ -40,16 +40,6 @@ li 0,(SYS_##name); \ sc -#define SYSCALL(name) \ - .text; \ - .align 2; \ -2: b CNAME(HIDENAME(cerror)); \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bso 2b - #define PSEUDO(name) \ .text; \ .align 2; \ diff --git a/lib/libc/powerpc64/SYS.h b/lib/libc/powerpc64/SYS.h index c364090a5487..dccd08b63541 100644 --- a/lib/libc/powerpc64/SYS.h +++ b/lib/libc/powerpc64/SYS.h @@ -40,24 +40,6 @@ li 0,(SYS_##name); \ sc -#define SYSCALL(name) \ - .text; \ - .align 2; \ -2: mflr %r0; \ - std %r0,16(%r1); \ - stdu %r1,-48(%r1); \ - bl CNAME(HIDENAME(cerror)); \ - nop; \ - addi %r1,%r1,48; \ - ld %r0,16(%r1); \ - mtlr %r0; \ - blr; \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bso 2b - #define PSEUDO(name) \ .text; \ .align 2; \ diff --git a/lib/libc/riscv/SYS.h b/lib/libc/riscv/SYS.h index 47f92467c843..1e3e67834494 100644 --- a/lib/libc/riscv/SYS.h +++ b/lib/libc/riscv/SYS.h @@ -40,14 +40,6 @@ li t0, SYS_ ## name; \ ecall -#define SYSCALL(name) \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - ret; \ -END(__sys_##name) - #define PSEUDO(name) \ ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ From nobody Tue Dec 12 22:55:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqYqV5SFtz53Qnd; Tue, 12 Dec 2023 22:55: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 4SqYqV4tDNz3bP4; Tue, 12 Dec 2023 22:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702421734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HE4/jswqMl+9Ggs2D8srekybWqsRk7emOCkiw6XUPuE=; b=bMU5tiWecV/NWe11a8srQlaW3HQ2GA9bZ0VrH2iJE66olm6L357zhw3MMPKVMPB0isF62I K1SwzsJHDhhbcClXYwfCFnhi2VsVRUGkoVhuwrS4oSybLbrKzH5XxYxIVlTwVDxuZUGKnc jq6LNVjCCiBpR+/Fk3tDt5boXYvECxQUkbGSeuqCSiq7e4+XeRc7jyJT4NkA6VlU/xKsjJ 7NvDt4CkRMuXJyGcD72CztCkeB4iciFhEMTk8APGnywkDMgXhAE1/QejR5B/qoXgXBsjMP oHlRPQpSciuC3cUu5iPWjDQ2SWfTvw4TpsN3qtm7T0yaT4Zv2A8CRYG6o2wH0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702421734; a=rsa-sha256; cv=none; b=PiUHE+w8MVO2GvO2kM0KRDfyWiYNdIUXXYLltxvXHIdCRxhlnaCrzYMghcmA2sdw+73FDL RioH1Vu6F7A6Qj115T0epBQkbhTRLPOb1OEVqOLF/Uptj6t8LRR2lDqP3R8lREL5GvsLvk TeYFcUxXN+NVrML4VmGLr3VxM7n7fwu0G5uKXzUy/3ZTiND8Gmy0I79/PUw0qnuOgbbOJH JVrzoHQ2OnBfNjzlVgbFtiB4fm3MW7Nw28q8ZQUKDsyUZl6Y0ghbCRyg695/IiFF8McurB jDUzOSBoDv6zHAjVTPD03Xx1I2ZTU/iws/IMRvwSDttBvHtDJLBxITH3+i13/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702421734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HE4/jswqMl+9Ggs2D8srekybWqsRk7emOCkiw6XUPuE=; b=Led3htFMTecSUg3p3N/X1jRc+c6/yRTg65OBAjmoavmOwkOulvHNsj5NqL21jbLT/He0QY jM8LzYHCQKelwGhQ5RIBEOVAxNnmMnp87waKMxzH92jCnUlOscLkOE7lajKYufulnTCt+c uk50IUfd3yKMyFPigEncrExwu0ZK/5BWVsjzLh9x563gxF9CGOKwQmYmFAuU+j+zzLF40I 1cpZ5ZP4S6zMQiGGeS3fURBVZX85YU394GPCXd1TSO4uQRFJkYlPWa9kdbdfQW2CE1Hlne QoS+T2128EHha/uF26RgD9dNwan8z9DcWOJpQlsmp/Eq23/JIuWqzadlbIr53A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqYqV404FzZVY; Tue, 12 Dec 2023 22:55: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 3BCMtYlN055693; Tue, 12 Dec 2023 22:55:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCMtYgA055690; Tue, 12 Dec 2023 22:55:34 GMT (envelope-from git) Date: Tue, 12 Dec 2023 22:55:34 GMT Message-Id: <202312122255.3BCMtYgA055690@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: 5c7a9092713d - main - libc/i386/SYS.h: Remove unused LCALL macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c7a9092713d2d076513b31b377dad59780a39da Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5c7a9092713d2d076513b31b377dad59780a39da commit 5c7a9092713d2d076513b31b377dad59780a39da Author: Brooks Davis AuthorDate: 2023-12-12 22:53:09 +0000 Commit: Brooks Davis CommitDate: 2023-12-12 22:53:09 +0000 libc/i386/SYS.h: Remove unused LCALL macro It appears that the only user of this macro was removed with support for building a.out binaries in 2002 by commit 66422f5b7a1a6055f0b2358268eb902aab6e2e3e. Reviewed by: imp, kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42997 --- lib/libc/i386/SYS.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index 6ef21fb794a6..24b0060372f8 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -48,7 +48,4 @@ jb HIDENAME(cerror); ret; \ END(__sys_##name) -/* gas messes up offset -- although we don't currently need it, do for BCS */ -#define LCALL(x,y) .byte 0x9a ; .long y; .word x - #define KERNCALL int $0x80 From nobody Tue Dec 12 23:29:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqZZK2J0Gz53T5S; Tue, 12 Dec 2023 23:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SqZZK1rlRz4G1h; Tue, 12 Dec 2023 23:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hcve0D8eycoYvbbXdwE3hQOr7giHgDYBSK14u0iLRJc=; b=eShlcM/tkxon1QzUE24ssMRqORN4dtorstTJEuWxab4jUV5hryLMPjGvdwQ/pskeb6e7TE Ne3SktYHRIn+U8k0SpZ9KWUPfNRRNq+qHj6Xfd072HT6dWkOO4/axJmEDVLT63DEvUiGpu kDZ8Tp/dDpPwsh2GrY5uucXHIRl2waUXy3sgAgC5Rv/FO7yJauGDJR2KzTSVgpeyJrOdYF ymoDYjouqo5qhwD069nUmmDtknn34vnizcQ9SE6YIXe6b0nfrxyrnuuZRE3EFWwoi2XwWW hCynb4BsAPV8L7eqbDlnzAAQrS45A9CgL6caJD8QZZUT9mtgpZE7eHXCDZc39g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702423753; a=rsa-sha256; cv=none; b=Z5Ctxf418kQZJq2QT0iFgCniTB9UEi8iazsCnAop8cMZ4BBoDXU3M87yqWsfpqeC6/8etG 0SrRLJIb4SPMBbcgYgpccPIvcyy30qtfObw3WOTMTU2Y1mafxNa9jgDx7pWvHJ+PoeHLYQ 4BxhSTOVO0/pm/nvOcTOE3wr8FgULdWzJ7HqhApxm+97VmWaofVxXKlMrkK+Mu1bpzwgTR uItihXLtqhoVTICqUSiiECsN7X6ODi5BEACK+av/dVI3/fk4oRIVNuLVybmh7rvB+F37ps 9o2FOmJk3FriWap+Vt025vB0Yxk0JhEBgicmvHnkD7cpy4roSUZaQ/eTBaBx5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hcve0D8eycoYvbbXdwE3hQOr7giHgDYBSK14u0iLRJc=; b=Aqk22XyONVBEBuEXgrtaJXs1VugJioRCny7mJwAglEWWNB+gJ0ddKDjnbAvKK60FoTBofT Y56j6bffWc7qZBjy7mk7fy43HaeEGk3gS6RqNyUqheshYollOrpYAgdw9xwFoV1EbDBmFA 8UzXw/K+1QkYkO4E711mZuB7vQNsI2OhH27T+SHFBa9bJbp28XSWo4+cSLOYpaCqvC6gME euXJgwbNgu0hLVFhk+G39DNfb15YtZKjF3eqTdfenjDyJEx7VXPFKLRuK0abIQt2rr6Dci o5Qw8DjC44fwMCDGob79+G3FN1dfQGAWFG3hm+HJ/gQbtGpB0dMHkCvcUF3L2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqZZK0wGszbKl; Tue, 12 Dec 2023 23:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BCNTDig007671; Tue, 12 Dec 2023 23:29:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNTDwe007668; Tue, 12 Dec 2023 23:29:13 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:29:13 GMT Message-Id: <202312122329.3BCNTDwe007668@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: ca96a942cafb - main - bhyve: refactor gdbstub to enable single-stepping on AMD CPUs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ca96a942cafb58476e10e887240e594e7923a6e8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ca96a942cafb58476e10e887240e594e7923a6e8 commit ca96a942cafb58476e10e887240e594e7923a6e8 Author: Bojan Novković AuthorDate: 2023-12-12 23:28:59 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:28:59 +0000 bhyve: refactor gdbstub to enable single-stepping on AMD CPUs This patch refactors the existing Intel-specific single-stepping mechanism in bhyve's GDB stub to work with both AMD and Intel CPUs. Reviewed by: jhb Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D42298 --- usr.sbin/bhyve/amd64/vmexit.c | 15 +++++++ usr.sbin/bhyve/gdb.c | 94 +++++++++++++++++++++++++++++++++++-------- usr.sbin/bhyve/gdb.h | 1 + 3 files changed, 93 insertions(+), 17 deletions(-) diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c index 2c01c63f6454..e0b9aec2d17a 100644 --- a/usr.sbin/bhyve/amd64/vmexit.c +++ b/usr.sbin/bhyve/amd64/vmexit.c @@ -439,6 +439,20 @@ vmexit_debug(struct vmctx *ctx __unused, struct vcpu *vcpu, return (VMEXIT_CONTINUE); } +static int +vmexit_db(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun) +{ + +#ifdef BHYVE_SNAPSHOT + checkpoint_cpu_suspend(vcpu_id(vcpu)); +#endif + gdb_cpu_debug(vcpu, vmrun->vm_exit); +#ifdef BHYVE_SNAPSHOT + checkpoint_cpu_resume(vcpu_id(vcpu)); +#endif + return (VMEXIT_CONTINUE); +} + static int vmexit_breakpoint(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun) @@ -503,4 +517,5 @@ const vmexit_handler_t vmexit_handlers[VM_EXITCODE_MAX] = { [VM_EXITCODE_IPI] = vmexit_ipi, [VM_EXITCODE_HLT] = vmexit_hlt, [VM_EXITCODE_PAUSE] = vmexit_pause, + [VM_EXITCODE_DB] = vmexit_db, }; diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index be730a75b3e6..2d49469c2e11 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -743,6 +743,43 @@ _gdb_cpu_suspend(struct vcpu *vcpu, bool report_stop) debug("$vCPU %d resuming\n", vcpuid); } +/* + * Requests vCPU single-stepping using a + * VMEXIT suitable for the host platform. + */ +static int +_gdb_set_step(struct vcpu *vcpu, int val) +{ + int error; + + /* + * If the MTRAP cap fails, we are running on an AMD host. + * In that case, we request DB exits caused by RFLAGS.TF. + */ + error = vm_set_capability(vcpu, VM_CAP_MTRAP_EXIT, val); + if (error != 0) + error = vm_set_capability(vcpu, VM_CAP_RFLAGS_TF, val); + if (error == 0) + (void)vm_set_capability(vcpu, VM_CAP_MASK_HWINTR, val); + + return (error); +} + +/* + * Checks whether single-stepping is enabled for a given vCPU. + */ +static int +_gdb_check_step(struct vcpu *vcpu) +{ + int val; + + if (vm_get_capability(vcpu, VM_CAP_MTRAP_EXIT, &val) != 0) { + if (vm_get_capability(vcpu, VM_CAP_RFLAGS_TF, &val) != 0) + return -1; + } + return 0; +} + /* * Invoked at the start of a vCPU thread's execution to inform the * debug server about the new thread. @@ -797,10 +834,7 @@ gdb_cpu_resume(struct vcpu *vcpu) assert(vs->hit_swbreak == false); assert(vs->stepped == false); if (vs->stepping) { - error = vm_set_capability(vcpu, VM_CAP_MTRAP_EXIT, 1); - assert(error == 0); - - error = vm_set_capability(vcpu, VM_CAP_MASK_HWINTR, 1); + error = _gdb_set_step(vcpu, 1); assert(error == 0); } } @@ -835,26 +869,24 @@ gdb_suspend_vcpus(void) } /* - * Handler for VM_EXITCODE_MTRAP reported when a vCPU single-steps via - * the VT-x-specific MTRAP exit. + * Invoked each time a vmexit handler needs to step a vCPU. + * Handles MTRAP and RFLAGS.TF vmexits. */ -void -gdb_cpu_mtrap(struct vcpu *vcpu) +static void +gdb_cpu_step(struct vcpu *vcpu) { struct vcpu_state *vs; - int vcpuid; + int vcpuid = vcpu_id(vcpu); + int error; - if (!gdb_active) - return; - vcpuid = vcpu_id(vcpu); - debug("$vCPU %d MTRAP\n", vcpuid); + debug("$vCPU %d stepped\n", vcpuid); pthread_mutex_lock(&gdb_lock); vs = &vcpu_state[vcpuid]; if (vs->stepping) { vs->stepping = false; vs->stepped = true; - vm_set_capability(vcpu, VM_CAP_MTRAP_EXIT, 0); - vm_set_capability(vcpu, VM_CAP_MASK_HWINTR, 0); + error = _gdb_set_step(vcpu, 0); + assert(error == 0); while (vs->stepped) { if (stopped_vcpu == -1) { @@ -869,6 +901,34 @@ gdb_cpu_mtrap(struct vcpu *vcpu) pthread_mutex_unlock(&gdb_lock); } +/* + * A general handler for VM_EXITCODE_DB. + * Handles RFLAGS.TF exits on AMD SVM. + */ +void +gdb_cpu_debug(struct vcpu *vcpu, struct vm_exit *vmexit) +{ + if (!gdb_active) + return; + + /* RFLAGS.TF exit? */ + if (vmexit->u.dbg.trace_trap) { + gdb_cpu_step(vcpu); + } +} + +/* + * Handler for VM_EXITCODE_MTRAP reported when a vCPU single-steps via + * the VT-x-specific MTRAP exit. + */ +void +gdb_cpu_mtrap(struct vcpu *vcpu) +{ + if (!gdb_active) + return; + gdb_cpu_step(vcpu); +} + static struct breakpoint * find_breakpoint(uint64_t gpa) { @@ -940,11 +1000,11 @@ gdb_cpu_breakpoint(struct vcpu *vcpu, struct vm_exit *vmexit) static bool gdb_step_vcpu(struct vcpu *vcpu) { - int error, val, vcpuid; + int error, vcpuid; vcpuid = vcpu_id(vcpu); debug("$vCPU %d step\n", vcpuid); - error = vm_get_capability(vcpu, VM_CAP_MTRAP_EXIT, &val); + error = _gdb_check_step(vcpu); if (error < 0) return (false); diff --git a/usr.sbin/bhyve/gdb.h b/usr.sbin/bhyve/gdb.h index f06375d0d591..98f9ece2f60c 100644 --- a/usr.sbin/bhyve/gdb.h +++ b/usr.sbin/bhyve/gdb.h @@ -32,6 +32,7 @@ void gdb_cpu_add(struct vcpu *vcpu); void gdb_cpu_breakpoint(struct vcpu *vcpu, struct vm_exit *vmexit); void gdb_cpu_mtrap(struct vcpu *vcpu); void gdb_cpu_suspend(struct vcpu *vcpu); +void gdb_cpu_debug(struct vcpu *vcpu, struct vm_exit *vmexit); void init_gdb(struct vmctx *ctx); #endif /* !__GDB_H__ */ From nobody Tue Dec 12 23:30:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqZc76fg9z53TP1; Tue, 12 Dec 2023 23:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SqZc76D9Nz4GQb; Tue, 12 Dec 2023 23:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IV0MsG0RaiEHe1IaNgWSrAHTLM2sSO/ZO+G4HzwqfyE=; b=pz4/IsmuRvncd+r6hoA9qLOZFeMqkZpksCKxdxbIDu4ht7GwU5fipMUArF76glJOWC93XR 2NJUd9/vXtJYCY4RTeNjsYbo0gIJaCCdsHK+1iPUVVaccXaU4K6Xnst1snF/y+Fw+wyeH3 JbbrlRKqpZast5cQUccOUL9dZ1dk3LQHMz4kAX4oVxAkn9XnAi2JlNFdDhpyrDkczVse12 mgoFpbUWySVfgzuQgr3Y1ABfswFDZ6ascL+4zeoKOra5vDJFthPVzUqOLGCiPNSQ82zIEU b31t/j+qEbuv8/8pRaNCom9bZiknVP6GjjUIFYs9EErKX5hmTuO8/Wq9NoFyQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702423847; a=rsa-sha256; cv=none; b=uZkzgD43BNxH1TCPR1+QAmsZpEdW9bn5CGgQllW3KCJVfE7Pfxv97LSvy8NkOvm/dWkiXb 5/mmf9dRR9yCsvcU6dU+PAfoMn8FZChpK98SSMhLK0ixVhWVl5K0u/IyDIqnh20TENplJF effdtO+srfQfX7458i/VIljkqfJEnMYTSMqF0IHGi76coBPGQjGpYUfFe0sKnbdhkU9W9V CVcq9v3/LCJGwHGqVOtfyHllYc532gjb8Ig0i84x4iA+zyU7/o5h15KHh/Y8pug9fa7TFQ gTBUxa36BfeFnuEiwng28A/5pM/82Z7eP7Sja7H6U8qGoHs7QjhiYx/TwPw7Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IV0MsG0RaiEHe1IaNgWSrAHTLM2sSO/ZO+G4HzwqfyE=; b=p6gB3POd/ClkyzjvOdRzaf49/lvkyr7VgH3qWkL5qzylOleA+8B87LENa/czcuWgQVl07B 11TO2VMXFwLo6IB3NJ2Eq+5jli/+8l5DNkZIDYOqtK50uNotFLIdydbl1yERv+xvRfs0KY w7976dzBHlrAcF4FCvwhOnXjlLult8dxhX+pRUKtOQ7rBifs9oEJoRYNK/+q05hPFQM02B VM/c17EHbmve0RmhASmQPlh+mBJLlj5HOyvjT5Pfq5X6k7Z5XuBfxt4BKfwxEMKSeEiazA uMobHgz3v1VQW6Jo1BgeVF57ofTdAGDFQjsW94bacc9VeeD1KAeaED2aC7Zt7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqZc75HBSzb6f; Tue, 12 Dec 2023 23:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BCNUlmc019221; Tue, 12 Dec 2023 23:30:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNUldZ019208; Tue, 12 Dec 2023 23:30:47 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:30:47 GMT Message-Id: <202312122330.3BCNUldZ019208@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: 087c4c90d193 - main - kldxref: Add a copyright and license statement to ef.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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 087c4c90d193c1401613e1e13fa99db8de52c8f0 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=087c4c90d193c1401613e1e13fa99db8de52c8f0 commit 087c4c90d193c1401613e1e13fa99db8de52c8f0 Author: John Baldwin AuthorDate: 2023-12-12 23:29:43 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:29:43 +0000 kldxref: Add a copyright and license statement to ef.h This uses the statement from other files in kldxref when the tool was first imported in commit 9c6f92408c29a8980e7aec26a2590087c3b3d8ed. Reviewed by: kevans Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42963 --- usr.sbin/kldxref/ef.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/usr.sbin/kldxref/ef.h b/usr.sbin/kldxref/ef.h index f10af49fafba..94aaca279a80 100644 --- a/usr.sbin/kldxref/ef.h +++ b/usr.sbin/kldxref/ef.h @@ -1,3 +1,36 @@ +/*- + * SPDX-License-Identifier: BSD-4-Clause + * + * Copyright (c) 2000, Boris Popov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Boris Popov. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 _EF_H_ #define _EF_H_ From nobody Tue Dec 12 23:30:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqZc90rVcz53TP2; Tue, 12 Dec 2023 23:30: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 4SqZc90KcFz4GXS; Tue, 12 Dec 2023 23:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo5XJkOJYPzAqYRTuI0JehUEGKAkFovYLdlKdO9HJCo=; b=S0FgDZEQWWZtodR89851Xo4BNfWqHSTIKdvYiFuRcb5JKN6v+ocQT52tr51VsEFn1WYbIt QrJZ9yQfkcuWTjXLRkqKMeVQwG+jfK9nYiY6okfy9jz+3LOnUBie9s20xk65XSJx58nnuS pdOW31UBFG704JehQWSNvHQkts2hUe31FBJgkb4tIbsh2TkTmAhmiSISo4NZOj7OhLQsll hUWrkvgj+kvv7w90it5JGDJjsIzW00SbTjqQBBtP7cW0csosqqlLWoAwOaYaHWAzyloB/b CnbEJ1ypDJYM4n1Mz0feMv+4mwjkKUOtWtvViql54QSlRcXvWG3UC2YtfRdOcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702423849; a=rsa-sha256; cv=none; b=irahtnWl45DccnptEtlJQHbJGY3+RaVTSXyF3QZ0DHOeRpTpl8twlIQxnTyLpp0FtzzbNk ewNco7nmuOeC6VxHjgOGyXwyIUNQFgo00EDbmirSXYmMQw6C3S/1lYRTI2v/Hjlp7qy5M6 NEJT89C961Y2gv4sr/I9dUiFhwKlilzyiWmVDRmX3MxEyqaT0y6tWENHEYRvnq4jpAIkkU +M7I8/pg60cDeVXdyteBSeXOsbzC1Xty1e59iKuJ5O1QZZvi4aOmfCZXN16t9mnQ0OFdCx HQxOtKw+4BJXm8HZoWE+S7SpLOWMizdSbJwvZL+G7T8TwRUaP3tJuiBTwNluzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo5XJkOJYPzAqYRTuI0JehUEGKAkFovYLdlKdO9HJCo=; b=HOa/+evxXN4f8yM6q05xlnCo6Wa/htdLxyzkGesH9ofzfm3hdNCBM/YJwNCiYgEYmQeAYv IxfLFU3PcFt34xs0QzaA5AIWrTX5zUHYohTtWu55Rpncy7IdOI875ELSurpaeX1JunV+94 p06SoMHPpWgiBLnOPYhJZfKtbr4umCbKWopKytkVGMyxAztICGU7jUn2x//jeY06CB8UBd f4gYZeOhrqAnhYQEnjmEs2uAyYQea5IyLgENGZFQskKFhmHmlChvY2rVrHf5qyjf9lKnZa UD7ztugi5/I//O/6LlfPSbEgPLwlQD/S9ViZbdYnECv4RvroGe+m0WWnhZgQ+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqZc86XCkzbL1; Tue, 12 Dec 2023 23:30:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BCNUmTg020104; Tue, 12 Dec 2023 23:30:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNUmgI020101; Tue, 12 Dec 2023 23:30:48 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:30:48 GMT Message-Id: <202312122330.3BCNUmgI020101@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: 4a3cf5f329d6 - main - Stop #defining FREEBSD_ELF List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 4a3cf5f329d69076aa9d093d596eb0ee82d917f5 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4a3cf5f329d69076aa9d093d596eb0ee82d917f5 commit 4a3cf5f329d69076aa9d093d596eb0ee82d917f5 Author: John Baldwin AuthorDate: 2023-12-12 23:30:00 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:30:00 +0000 Stop #defining FREEBSD_ELF This was originally used (along with FREEBSD_AOUT) to prefer the use of ELF in various tools instead of a.out as part of the a.out to ELF transition in the 3.x days. The last use of it was removed from in commit 66422f5b7a1a6055f0b2358268eb902aab6e2e3e back in 2002, but various files still #define it. Reviewed by: kevans, imp, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42964 --- libexec/rtld-elf/Makefile | 2 +- stand/common/load_elf.c | 1 - stand/common/load_elf_obj.c | 1 - stand/common/reloc_elf.c | 1 - usr.sbin/kldxref/ef.c | 1 - usr.sbin/kldxref/ef_obj.c | 1 - usr.sbin/kldxref/kldxref.c | 1 - 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 06922c718b2b..fe7e39a6b788 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -38,7 +38,7 @@ SRCS= \ libmap.c MAN?= rtld.1 ACFLAGS+= -DLOCORE -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding +CFLAGS+= -Wall -DIN_RTLD -ffreestanding CFLAGS+= -I${SRCTOP}/lib/csu/common .if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) RTLD_ARCH= ${MACHINE_ARCH:S/powerpc64le/powerpc64/} diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c index d53c0f8b5b84..8877e5f8b7e0 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -34,7 +34,6 @@ #include #include #include -#define FREEBSD_ELF #include #include "bootstrap.h" diff --git a/stand/common/load_elf_obj.c b/stand/common/load_elf_obj.c index 263553df5e90..9ff1d238b8c8 100644 --- a/stand/common/load_elf_obj.c +++ b/stand/common/load_elf_obj.c @@ -34,7 +34,6 @@ #include #include #include -#define FREEBSD_ELF #include #include "bootstrap.h" diff --git a/stand/common/reloc_elf.c b/stand/common/reloc_elf.c index cf5010a06ccd..e68e59a303a1 100644 --- a/stand/common/reloc_elf.c +++ b/stand/common/reloc_elf.c @@ -32,7 +32,6 @@ #include -#define FREEBSD_ELF #include #include "bootstrap.h" diff --git a/usr.sbin/kldxref/ef.c b/usr.sbin/kldxref/ef.c index 5d052cc90a6c..72e023e30783 100644 --- a/usr.sbin/kldxref/ef.c +++ b/usr.sbin/kldxref/ef.c @@ -43,7 +43,6 @@ #include #include #include -#define FREEBSD_ELF #include "ef.h" diff --git a/usr.sbin/kldxref/ef_obj.c b/usr.sbin/kldxref/ef_obj.c index 953e54dc0d28..027408876a5e 100644 --- a/usr.sbin/kldxref/ef_obj.c +++ b/usr.sbin/kldxref/ef_obj.c @@ -45,7 +45,6 @@ #include #include #include -#define FREEBSD_ELF #include "ef.h" diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c index 59b4f346c7ec..ae0d22181688 100644 --- a/usr.sbin/kldxref/kldxref.c +++ b/usr.sbin/kldxref/kldxref.c @@ -42,7 +42,6 @@ #include #include #include -#define FREEBSD_ELF #include #include From nobody Tue Dec 12 23:30:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqZcB5GKPz53TLh; Tue, 12 Dec 2023 23:30: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 4SqZcB1QNsz4GWP; Tue, 12 Dec 2023 23:30:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S88hpbKmWZVUry0noHFEvxThR1lsbu5jj5U0v4kIpSQ=; b=KJCsPHAdbtfjkODpfuNNpYByfELL+WZwmEk3cnX3VgTCbnIyXyvgkOC4BXAsRRwVA9rMrr tnDM4Va86HEAOlF6Fcjf7q4SdaG64FG5THW1+7F7Q12APYBKFTgjj+yLW6IwsdXIzFefV7 hslxTPLRoac+3LnsholyYrm7BXl/PF3SNnn91OufnlXC+19lslOmyaJwB05/WzJdx8xcvG 0iXhtwc92+fc6rZ3ez1hvwW3fpQTuWjdKuT0l0x/h0g9F/M/WQdQww4ZsOG/S7OYrnE5JC fMdvtMOfhBdLfFnrGnN7bV6w2aRYnPnUCqeMv5uo331hJS5/YqxiVfZ/vFh0dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702423850; a=rsa-sha256; cv=none; b=wtSlbR7+oPim1FVhr+jU3qY0xh8/oAlXdzKsa3PE4I/JIDtJYR4OL+m/eeMkilNEZiGwHD 70T+DeZ+xzmt6A6K0m+jXTM6Jc5ge4F30QiP485W7WRrHDW2kWec421/Uvz6VZ4CE+4hVn 6sW3T/nNKXh6nzE1PAm1BgWq8brE1x0VUHi4hpYmlZCirdiW4hV2q+rkn8OEbqZYRKTCl2 8khqqJGUm1JKv+Vm390/oZJkvDn0m96sRog2gHz8uoK3ix31eHF+hlX8ETwEufZ/NWQuzV FyZgJg6Tsfa4mlgovXIw9BjXzQJwZdFvfQ1n3DEGUmc4KcWKTOzy2+3IkmWFfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S88hpbKmWZVUry0noHFEvxThR1lsbu5jj5U0v4kIpSQ=; b=TRDvK2gNIv8+lQbTY95gvHBm1j7KNY99phqXh157cbzdIFWneP3MWZ0JxT0qduIuJRYMZZ 12miDCduBFaWsoR5E7beVlg0nHvMFjvZPuXBKF6nfBZWt/8kV1XV3sIuOLgHiStLBJjzoM IGXGga17L97EoCzFo46tVtPuWWL5JpkJdSuvMlXs1U3AvH3UZWO4GutE0qSU/hVNVgRQyB eteDhug39VTrirTnbO8h9drSV1TooqecXrlPUSm/K2DLuJZfotZcpviZTBPXwZuzR0aVpo Xdi2ziLbF/FCyqlKrbrn0z1dP6Fk71kz6hF3+8/r9KfZcv7xUa0Ph+PWWwp7RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqZcB0S9Nzb6g; Tue, 12 Dec 2023 23:30: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 3BCNUnTJ020155; Tue, 12 Dec 2023 23:30:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNUnQB020152; Tue, 12 Dec 2023 23:30:49 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:30:49 GMT Message-Id: <202312122330.3BCNUnQB020152@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: c40fa3dc98d3 - main - kldxref: Refactor PNP entry parsing, no functional 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c40fa3dc98d3cd8c39605c19c9cc08026d8e72c9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c40fa3dc98d3cd8c39605c19c9cc08026d8e72c9 commit c40fa3dc98d3cd8c39605c19c9cc08026d8e72c9 Author: John Baldwin AuthorDate: 2023-12-12 23:30:16 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:30:16 +0000 kldxref: Refactor PNP entry parsing, no functional change - Add a free_pnp_list to complement parse_pnp_list. Add freeing of 'new_desc' which was previously leaked. - Move body of loop that checked a single pnp list element against a table entry into a parse_pnp_entry function to reduce indentation and split parse_entry into a smaller function. - Similarly, split out a record_pnp_info function from parse_entry which builds the pnp_list and walks a table. Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42965 --- usr.sbin/kldxref/kldxref.c | 247 +++++++++++++++++++++++++-------------------- 1 file changed, 139 insertions(+), 108 deletions(-) diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c index ae0d22181688..913b64ee2a16 100644 --- a/usr.sbin/kldxref/kldxref.c +++ b/usr.sbin/kldxref/kldxref.c @@ -237,6 +237,7 @@ parse_pnp_list(const char *desc, char **new_desc, pnp_list *list) size_t new_desc_size; FILE *fp; + TAILQ_INIT(list); walker = desc; ep = desc + strlen(desc); off = 0; @@ -379,6 +380,142 @@ err: errx(1, "Parse error of description string %s", desc); } +static void +free_pnp_list(char *new_desc, pnp_list *list) +{ + struct pnp_elt *elt, *elt_tmp; + + TAILQ_FOREACH_SAFE(elt, list, next, elt_tmp) { + TAILQ_REMOVE(list, elt, next); + free(elt); + } + free(new_desc); +} + +static void +parse_pnp_entry(struct elf_file *ef, struct pnp_elt *elt, const char *walker) +{ + uint8_t v1; + uint16_t v2; + uint32_t v4; + int value; + char buffer[1024]; + + if (elt->pe_kind == TYPE_W32) { + memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); + value = v4 & 0xffff; + record_int(value); + if (verbose > 1) + printf("W32:%#x", value); + value = (v4 >> 16) & 0xffff; + record_int(value); + if (verbose > 1) + printf(":%#x;", value); + } else if (elt->pe_kind & TYPE_INT) { + switch (elt->pe_kind & TYPE_SZ_MASK) { + case 1: + memcpy(&v1, walker + elt->pe_offset, sizeof(v1)); + if ((elt->pe_kind & TYPE_FLAGGED) && v1 == 0xff) + value = -1; + else + value = v1; + break; + case 2: + memcpy(&v2, walker + elt->pe_offset, sizeof(v2)); + if ((elt->pe_kind & TYPE_FLAGGED) && v2 == 0xffff) + value = -1; + else + value = v2; + break; + case 4: + memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); + if ((elt->pe_kind & TYPE_FLAGGED) && v4 == 0xffffffff) + value = -1; + else + value = v4; + break; + default: + errx(1, "Invalid size somehow %#x", elt->pe_kind); + } + if (verbose > 1) + printf("I:%#x;", value); + record_int(value); + } else if (elt->pe_kind == TYPE_T) { + /* Do nothing */ + } else { /* E, Z or D -- P already filtered */ + if (elt->pe_kind == TYPE_E) { + memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); + strcpy(buffer, pnp_eisaformat(v4)); + } else { + char *ptr; + + ptr = *(char **)(walker + elt->pe_offset); + buffer[0] = '\0'; + if (ptr != NULL) { + EF_SEG_READ_STRING(ef, (Elf_Off)ptr, + sizeof(buffer), buffer); + buffer[sizeof(buffer) - 1] = '\0'; + } + } + if (verbose > 1) + printf("%c:%s;", elt->pe_kind == TYPE_E ? 'E' : + (elt->pe_kind == TYPE_Z ? 'Z' : 'D'), buffer); + record_string(buffer); + } +} + +static void +record_pnp_info(struct elf_file *ef, const char *cval, + struct mod_pnp_match_info *pnp, const char *descr) +{ + pnp_list list; + struct pnp_elt *elt; + char *new_descr, *walker; + void *table; + size_t len; + int error, i; + + if (verbose > 1) + printf(" pnp info for bus %s format %s %d entries of %d bytes\n", + cval, descr, pnp->num_entry, pnp->entry_len); + + /* + * Parse descr to weed out the chaff and to create a list + * of offsets to output. + */ + parse_pnp_list(descr, &new_descr, &list); + record_int(MDT_PNP_INFO); + record_string(cval); + record_string(new_descr); + record_int(pnp->num_entry); + len = pnp->num_entry * pnp->entry_len; + table = malloc(len); + error = EF_SEG_READ_REL(ef, (Elf_Off)pnp->table, len, table); + if (error != 0) { + free_pnp_list(new_descr, &list); + free(table); + return; + } + + /* + * Walk the list and output things. We've collapsed all the + * variant forms of the table down to just ints and strings. + */ + walker = table; + for (i = 0; i < pnp->num_entry; i++) { + TAILQ_FOREACH(elt, &list, next) { + parse_pnp_entry(ef, elt, walker); + } + if (verbose > 1) + printf("\n"); + walker += pnp->entry_len; + } + + /* Now free it */ + free_pnp_list(new_descr, &list); + free(table); +} + static int parse_entry(struct mod_metadata *md, const char *cval, struct elf_file *ef, const char *kldname) @@ -388,10 +525,7 @@ parse_entry(struct mod_metadata *md, const char *cval, struct mod_pnp_match_info pnp; char descr[1024]; Elf_Off data; - int error, i; - size_t len; - char *walker; - void *table; + int error; data = (Elf_Off)md->md_data; error = 0; @@ -432,110 +566,7 @@ parse_entry(struct mod_metadata *md, const char *cval, printf(" pnp info for bus %s format %s %d entries of %d bytes\n", cval, descr, pnp.num_entry, pnp.entry_len); } else { - pnp_list list; - struct pnp_elt *elt, *elt_tmp; - char *new_descr; - - if (verbose > 1) - printf(" pnp info for bus %s format %s %d entries of %d bytes\n", - cval, descr, pnp.num_entry, pnp.entry_len); - /* - * Parse descr to weed out the chaff and to create a list - * of offsets to output. - */ - TAILQ_INIT(&list); - parse_pnp_list(descr, &new_descr, &list); - record_int(MDT_PNP_INFO); - record_string(cval); - record_string(new_descr); - record_int(pnp.num_entry); - len = pnp.num_entry * pnp.entry_len; - walker = table = malloc(len); - check(EF_SEG_READ_REL(ef, (Elf_Off)pnp.table, len, table)); - - /* - * Walk the list and output things. We've collapsed all the - * variant forms of the table down to just ints and strings. - */ - for (i = 0; i < pnp.num_entry; i++) { - TAILQ_FOREACH(elt, &list, next) { - uint8_t v1; - uint16_t v2; - uint32_t v4; - int value; - char buffer[1024]; - - if (elt->pe_kind == TYPE_W32) { - memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); - value = v4 & 0xffff; - record_int(value); - if (verbose > 1) - printf("W32:%#x", value); - value = (v4 >> 16) & 0xffff; - record_int(value); - if (verbose > 1) - printf(":%#x;", value); - } else if (elt->pe_kind & TYPE_INT) { - switch (elt->pe_kind & TYPE_SZ_MASK) { - case 1: - memcpy(&v1, walker + elt->pe_offset, sizeof(v1)); - if ((elt->pe_kind & TYPE_FLAGGED) && v1 == 0xff) - value = -1; - else - value = v1; - break; - case 2: - memcpy(&v2, walker + elt->pe_offset, sizeof(v2)); - if ((elt->pe_kind & TYPE_FLAGGED) && v2 == 0xffff) - value = -1; - else - value = v2; - break; - case 4: - memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); - if ((elt->pe_kind & TYPE_FLAGGED) && v4 == 0xffffffff) - value = -1; - else - value = v4; - break; - default: - errx(1, "Invalid size somehow %#x", elt->pe_kind); - } - if (verbose > 1) - printf("I:%#x;", value); - record_int(value); - } else if (elt->pe_kind == TYPE_T) { - /* Do nothing */ - } else { /* E, Z or D -- P already filtered */ - if (elt->pe_kind == TYPE_E) { - memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); - strcpy(buffer, pnp_eisaformat(v4)); - } else { - char *ptr; - - ptr = *(char **)(walker + elt->pe_offset); - buffer[0] = '\0'; - if (ptr != NULL) { - EF_SEG_READ_STRING(ef, (Elf_Off)ptr, - sizeof(buffer), buffer); - buffer[sizeof(buffer) - 1] = '\0'; - } - } - if (verbose > 1) - printf("%c:%s;", elt->pe_kind == TYPE_E ? 'E' : (elt->pe_kind == TYPE_Z ? 'Z' : 'D'), buffer); - record_string(buffer); - } - } - if (verbose > 1) - printf("\n"); - walker += pnp.entry_len; - } - /* Now free it */ - TAILQ_FOREACH_SAFE(elt, &list, next, elt_tmp) { - TAILQ_REMOVE(&list, elt, next); - free(elt); - } - free(table); + record_pnp_info(ef, cval, &pnp, descr); } break; default: From nobody Tue Dec 12 23:45:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqZwg6m5fz53VT7; Tue, 12 Dec 2023 23:45: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 4SqZwg6DBmz4JrY; Tue, 12 Dec 2023 23:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702424707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ZcrLQbOJhSQnqXf2nEcjEOShv+WjL4fa3ErWhgqLss=; b=aYFzHNXsKRtPaGpWKmrn1NoH8O72g8zo9xD/IsG4b9hbgP2YVHt1pw4LpNzWFziqUEfsJx EYbcRAUqEtBouKUqfEm8GX5AzFQGtO/q9Z4KZMgA2R3rkgzfhqTwRM/iCwrFlLtDIJYr34 qYtxsY2IYDhiSiE9JUDg0P4lmccd/7fpEOxGgh0p03XmRImbpMnYMfaGHJOCjjNhOnRSS2 ZxmjQqScW4HLdJztngItv3oUbPd6hk+hO2h2hjpXb1V0K4h5o0RWhltrjgEzlcNxfeWyJM Ctcr+AVeMfOi48m0VxyqveUeD6evofocYNs8vFMGGG/n5eOikTmKL4IS2uf+fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702424707; a=rsa-sha256; cv=none; b=XvyOhLXwXh0YMLKcIHDvGPwOQERg0/G1+MuZyZsaWMhMC3bmyRfv4LFcgHPgITFtH4JCKd fJ7NO4eRNXEyTIrx80sBq1rfYCYktDJTNLm13RC1g6dprZE6JwYxaYmiWitHn8Gkp5YtT8 zWy7b/0NCCucSSicmIxn4XjjWgJnHCkcbUaXJMLUZ0IKRCQu+K2+evTAByC5/p0hybyNKE N+XQt8QIWjasvyJ3v+KhY5NAU5jfre0HCtWQUavJq+XGaXcP5ePpnQxH/Bdz6P5v8yOe8s Uzv756bElP5scDVxVV88ZcqgegsAVR1KYx+TJnPgHWXkq2a+MHk26ta/YVjcWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702424707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ZcrLQbOJhSQnqXf2nEcjEOShv+WjL4fa3ErWhgqLss=; b=V6tRPUZs+AJILVwsH7C88w0xADpPmkWXZgsPT3LulDuzx9F7xX7V+BNUbjzfX/MwWARuDs C+nG7HrrRC0kZGVIUX8cz/0mMtbz9IK+lQK7yWSDWvRrBZQrdcN3F8pbFDgHNCLKQQpUzd 4Dc12IEKqbE//9H34aIA03KBrALDh1useaSSwZ5tuhhYmrfRpBWqokhtqmnf4ArVoNBhpn onS2Xm5zMmHVrzCOuBALYotfrZD2/MSk0b7kcX1vlo4QcvUbcul1sYRl1PH8J4owygYuS2 RlUhNi9k2cSsXN/OYL/p/P5x+0gDFdFufBff2ZIi9rNRUSqrt14H9fpl8e9v2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqZwg5Gq0zbgt; Tue, 12 Dec 2023 23:45: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 3BCNj7tJ040565; Tue, 12 Dec 2023 23:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNj7ga040562; Tue, 12 Dec 2023 23:45:07 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:45:07 GMT Message-Id: <202312122345.3BCNj7ga040562@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: 0299afdff145 - main - kldxref: Make use of libelf to be a portable cross tool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0299afdff145e5d861797fe9c2de8b090c456fba Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0299afdff145e5d861797fe9c2de8b090c456fba commit 0299afdff145e5d861797fe9c2de8b090c456fba Author: John Baldwin AuthorDate: 2023-12-12 23:43:00 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:43:00 +0000 kldxref: Make use of libelf to be a portable cross tool This allows kldxref to operate on kernel objects from any architecture, not just the native architecture. In particular, this will permit generating linker.hints files as part of a cross-arch release build. - elf.c is a new file that includes various wrappers around libelf including routines to read ELF data structures such as program and section headers and ELF relocations into the "generic" forms described in . This file also provides routines for converting a linker set into an array of addresses (GElf_Addr) as well as reading architecture-specific mod_* structures and converting them into "generic" Gmod_* forms where pointers are replaced with addresses. - The various architecture-specific reloc handlers now use GElf_* types for most values (including GElf_Rel and GElf_Rela for relocation structures) and use routines from to read and write target values. A new linker set matches reloc handlers to specific ELF (class, encoding, machine) tuples. - The bits of kldxref.c that write out linker.hints now use the encoding (ELFDATA2[LM]SB) of the first file encountered in a directory to set the endianness of the output file. Input files with a different architecture in the same directory are skipped with a warning. In addition, the initial version record for the file must be deferred until the first record is finished since the architecture of the output file is not known until then. - Various places that used 'sizeof(void *)' throughout now use 'elf_pointer_size()' to determine the size of a pointer in the target architecture. Tested by: amd64 binary on both amd64 and i386 /boot/kernel Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42966 --- usr.sbin/kldxref/Makefile | 9 +- usr.sbin/kldxref/ef.c | 730 ++++++++++++++++++++---------------------- usr.sbin/kldxref/ef.h | 291 ++++++++++++++--- usr.sbin/kldxref/ef_aarch64.c | 32 +- usr.sbin/kldxref/ef_amd64.c | 65 ++-- usr.sbin/kldxref/ef_i386.c | 56 ++-- usr.sbin/kldxref/ef_mips.c | 79 +++-- usr.sbin/kldxref/ef_nop.c | 40 --- usr.sbin/kldxref/ef_obj.c | 341 ++++++-------------- usr.sbin/kldxref/ef_powerpc.c | 62 ++-- usr.sbin/kldxref/ef_riscv.c | 35 +- usr.sbin/kldxref/elf.c | 674 ++++++++++++++++++++++++++++++++++++++ usr.sbin/kldxref/kldxref.c | 196 +++++++----- 13 files changed, 1685 insertions(+), 925 deletions(-) diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index 3d4ce7163b48..6e0a7244328b 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -2,14 +2,11 @@ PACKAGE= runtime PROG= kldxref MAN= kldxref.8 -SRCS= kldxref.c ef.c ef_obj.c +SRCS= kldxref.c ef.c ef_obj.c elf.c +SRCS+= ef_aarch64.c ef_amd64.c ef_i386.c ef_mips.c ef_powerpc.c ef_riscv.c WARNS?= 2 -.if exists(ef_${MACHINE_CPUARCH}.c) -SRCS+= ef_${MACHINE_CPUARCH}.c -.else -SRCS+= ef_nop.c -.endif +LIBADD= elf .include diff --git a/usr.sbin/kldxref/ef.c b/usr.sbin/kldxref/ef.c index 72e023e30783..aa9123d7f540 100644 --- a/usr.sbin/kldxref/ef.c +++ b/usr.sbin/kldxref/ef.c @@ -33,16 +33,13 @@ */ #include -#include #include #include -#include +#include #include #include #include -#include -#include #include "ef.h" @@ -50,76 +47,52 @@ struct ef_file { char *ef_name; struct elf_file *ef_efile; - Elf_Phdr *ef_ph; - int ef_fd; - int ef_type; - Elf_Ehdr ef_hdr; + GElf_Phdr *ef_ph; void *ef_fpage; /* First block of the file */ int ef_fplen; /* length of first block */ - Elf_Dyn *ef_dyn; /* Symbol table etc. */ - Elf_Hashelt ef_nbuckets; - Elf_Hashelt ef_nchains; - Elf_Hashelt *ef_buckets; - Elf_Hashelt *ef_chains; - Elf_Hashelt *ef_hashtab; - Elf_Off ef_stroff; + GElf_Hashelt ef_nbuckets; + GElf_Hashelt ef_nchains; + GElf_Hashelt *ef_buckets; + GElf_Hashelt *ef_chains; + GElf_Hashelt *ef_hashtab; caddr_t ef_strtab; - int ef_strsz; - Elf_Off ef_symoff; - Elf_Sym *ef_symtab; + long ef_strsz; + GElf_Sym *ef_symtab; int ef_nsegs; - Elf_Phdr *ef_segs[MAXSEGS]; + GElf_Phdr *ef_segs[MAXSEGS]; int ef_verbose; - Elf_Rel *ef_rel; /* relocation table */ - int ef_relsz; /* number of entries */ - Elf_Rela *ef_rela; /* relocation table */ - int ef_relasz; /* number of entries */ + GElf_Rel *ef_rel; /* relocation table */ + long ef_relsz; /* number of entries */ + GElf_Rela *ef_rela; /* relocation table */ + long ef_relasz; /* number of entries */ }; -static void ef_print_phdr(Elf_Phdr *); -static Elf_Off ef_get_offset(elf_file_t, Elf_Off); -static int ef_parse_dynamic(elf_file_t); +static void ef_print_phdr(GElf_Phdr *); +static GElf_Off ef_get_offset(elf_file_t, GElf_Addr); -static int ef_get_type(elf_file_t ef); -static int ef_close(elf_file_t ef); -static int ef_read(elf_file_t ef, Elf_Off offset, size_t len, void *dest); -static int ef_read_entry(elf_file_t ef, Elf_Off offset, size_t len, - void **ptr); +static void ef_close(elf_file_t ef); -static int ef_seg_read(elf_file_t ef, Elf_Off offset, size_t len, +static int ef_seg_read_rel(elf_file_t ef, GElf_Addr address, size_t len, void *dest); -static int ef_seg_read_rel(elf_file_t ef, Elf_Off offset, size_t len, - void *dest); -static int ef_seg_read_string(elf_file_t ef, Elf_Off offset, size_t len, +static int ef_seg_read_string(elf_file_t ef, GElf_Addr address, size_t len, char *dest); -static int ef_seg_read_entry(elf_file_t ef, Elf_Off offset, size_t len, - void **ptr); -static int ef_seg_read_entry_rel(elf_file_t ef, Elf_Off offset, size_t len, - void **ptr); - -static Elf_Addr ef_symaddr(elf_file_t ef, Elf_Size symidx); -static int ef_lookup_set(elf_file_t ef, const char *name, long *startp, - long *stopp, long *countp); + +static GElf_Addr ef_symaddr(elf_file_t ef, GElf_Size symidx); +static int ef_lookup_set(elf_file_t ef, const char *name, + GElf_Addr *startp, GElf_Addr *stopp, long *countp); static int ef_lookup_symbol(elf_file_t ef, const char *name, - Elf_Sym **sym); + GElf_Sym **sym); static struct elf_file_ops ef_file_ops = { - .get_type = ef_get_type, .close = ef_close, - .read = ef_read, - .read_entry = ef_read_entry, - .seg_read = ef_seg_read, .seg_read_rel = ef_seg_read_rel, .seg_read_string = ef_seg_read_string, - .seg_read_entry = ef_seg_read_entry, - .seg_read_entry_rel = ef_seg_read_entry_rel, .symaddr = ef_symaddr, .lookup_set = ef_lookup_set, - .lookup_symbol = ef_lookup_symbol }; static void -ef_print_phdr(Elf_Phdr *phdr) +ef_print_phdr(GElf_Phdr *phdr) { if ((phdr->p_flags & PF_W) == 0) { @@ -133,53 +106,29 @@ ef_print_phdr(Elf_Phdr *phdr) } } -static Elf_Off -ef_get_offset(elf_file_t ef, Elf_Off off) +static GElf_Off +ef_get_offset(elf_file_t ef, GElf_Addr addr) { - Elf_Phdr *ph; + GElf_Phdr *ph; int i; for (i = 0; i < ef->ef_nsegs; i++) { ph = ef->ef_segs[i]; - if (off >= ph->p_vaddr && off < ph->p_vaddr + ph->p_memsz) { - return (ph->p_offset + (off - ph->p_vaddr)); + if (addr >= ph->p_vaddr && addr < ph->p_vaddr + ph->p_memsz) { + return (ph->p_offset + (addr - ph->p_vaddr)); } } return (0); } -static int -ef_get_type(elf_file_t ef) -{ - - return (ef->ef_type); -} - /* - * next three functions copied from link_elf.c + * next two functions copied from link_elf.c */ -static unsigned long -elf_hash(const char *name) -{ - unsigned long h, g; - const unsigned char *p; - - h = 0; - p = (const unsigned char *)name; - while (*p != '\0') { - h = (h << 4) + *p++; - if ((g = h & 0xf0000000) != 0) - h ^= g >> 24; - h &= ~g; - } - return (h); -} - static int -ef_lookup_symbol(elf_file_t ef, const char *name, Elf_Sym **sym) +ef_lookup_symbol(elf_file_t ef, const char *name, GElf_Sym **sym) { unsigned long hash, symnum; - Elf_Sym *symp; + GElf_Sym *symp; char *strp; /* First, search hashed global symbols */ @@ -205,7 +154,7 @@ ef_lookup_symbol(elf_file_t ef, const char *name, Elf_Sym **sym) if (strcmp(name, strp) == 0) { if (symp->st_shndx != SHN_UNDEF || (symp->st_value != 0 && - ELF_ST_TYPE(symp->st_info) == STT_FUNC)) { + GELF_ST_TYPE(symp->st_info) == STT_FUNC)) { *sym = symp; return (0); } else @@ -219,10 +168,10 @@ ef_lookup_symbol(elf_file_t ef, const char *name, Elf_Sym **sym) } static int -ef_lookup_set(elf_file_t ef, const char *name, long *startp, long *stopp, - long *countp) +ef_lookup_set(elf_file_t ef, const char *name, GElf_Addr *startp, + GElf_Addr *stopp, long *countp) { - Elf_Sym *sym; + GElf_Sym *sym; char *setsym; int error, len; @@ -246,258 +195,340 @@ ef_lookup_set(elf_file_t ef, const char *name, long *startp, long *stopp, *stopp = sym->st_value; /* and the number of entries */ - *countp = (*stopp - *startp) / sizeof(void *); + *countp = (*stopp - *startp) / elf_pointer_size(ef->ef_efile); out: free(setsym); return (error); } -static Elf_Addr -ef_symaddr(elf_file_t ef, Elf_Size symidx) +static GElf_Addr +ef_symaddr(elf_file_t ef, GElf_Size symidx) { - const Elf_Sym *sym; + const GElf_Sym *sym; if (symidx >= ef->ef_nchains) return (0); sym = ef->ef_symtab + symidx; - if (ELF_ST_BIND(sym->st_info) == STB_LOCAL && + if (GELF_ST_BIND(sym->st_info) == STB_LOCAL && sym->st_shndx != SHN_UNDEF && sym->st_value != 0) return (sym->st_value); return (0); } static int -ef_parse_dynamic(elf_file_t ef) +ef_parse_dynamic(elf_file_t ef, const GElf_Phdr *phdyn) { - Elf_Dyn *dp; - Elf_Hashelt hashhdr[2]; + GElf_Shdr *shdr; + GElf_Dyn *dyn, *dp; + size_t i, ndyn, nshdr, nsym; int error; - Elf_Off rel_off; - Elf_Off rela_off; + GElf_Off hash_off, sym_off, str_off; + GElf_Off rel_off; + GElf_Off rela_off; int rel_sz; int rela_sz; - int rel_entry; - int rela_entry; + int dynamic_idx; + + /* + * The kernel linker parses the PT_DYNAMIC segment to find + * various important tables. The gelf API of libelf is + * section-oriented and requires extracting data from sections + * instead of segments (program headers). As a result, + * iterate over section headers to read various tables after + * parsing values from PT_DYNAMIC. + */ + error = elf_read_shdrs(ef->ef_efile, &nshdr, &shdr); + if (error != 0) + return (EFTYPE); + dyn = NULL; + + /* Find section for .dynamic. */ + dynamic_idx = -1; + for (i = 0; i < nshdr; i++) { + if (shdr[i].sh_type == SHT_DYNAMIC) { + if (shdr[i].sh_offset != phdyn->p_offset || + shdr[i].sh_size != phdyn->p_filesz) { + warnx(".dynamic section doesn't match phdr"); + error = EFTYPE; + goto out; + } + if (dynamic_idx != -1) { + warnx("multiple SHT_DYNAMIC sections"); + error = EFTYPE; + goto out; + } + dynamic_idx = i; + } + } + + error = elf_read_dynamic(ef->ef_efile, dynamic_idx, &ndyn, &dyn); + if (error != 0) + goto out; - rel_off = rela_off = 0; + hash_off = rel_off = rela_off = sym_off = str_off = 0; rel_sz = rela_sz = 0; - rel_entry = rela_entry = 0; - for (dp = ef->ef_dyn; dp->d_tag != DT_NULL; dp++) { + for (i = 0; i < ndyn; i++) { + dp = &dyn[i]; + if (dp->d_tag == DT_NULL) + break; + switch (dp->d_tag) { case DT_HASH: - error = ef_read(ef, ef_get_offset(ef, dp->d_un.d_ptr), - sizeof(hashhdr), hashhdr); - if (error != 0) { - warnx("can't read hash header (%jx)", - (uintmax_t)ef_get_offset(ef, dp->d_un.d_ptr)); - return (error); - } - ef->ef_nbuckets = hashhdr[0]; - ef->ef_nchains = hashhdr[1]; - error = ef_read_entry(ef, -1, - (hashhdr[0] + hashhdr[1]) * sizeof(Elf_Hashelt), - (void **)&ef->ef_hashtab); - if (error != 0) { - warnx("can't read hash table"); - return (error); - } - ef->ef_buckets = ef->ef_hashtab; - ef->ef_chains = ef->ef_buckets + ef->ef_nbuckets; + if (hash_off != 0) + warnx("second DT_HASH entry ignored"); + else + hash_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_STRTAB: - ef->ef_stroff = dp->d_un.d_ptr; - break; - case DT_STRSZ: - ef->ef_strsz = dp->d_un.d_val; + if (str_off != 0) + warnx("second DT_STRTAB entry ignored"); + else + str_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_SYMTAB: - ef->ef_symoff = dp->d_un.d_ptr; + if (sym_off != 0) + warnx("second DT_SYMTAB entry ignored"); + else + sym_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_SYMENT: - if (dp->d_un.d_val != sizeof(Elf_Sym)) - return (EFTYPE); + if (dp->d_un.d_val != elf_object_size(ef->ef_efile, + ELF_T_SYM)) { + error = EFTYPE; + goto out; + } break; case DT_REL: if (rel_off != 0) warnx("second DT_REL entry ignored"); - rel_off = dp->d_un.d_ptr; + else + rel_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_RELSZ: if (rel_sz != 0) warnx("second DT_RELSZ entry ignored"); - rel_sz = dp->d_un.d_val; + else + rel_sz = dp->d_un.d_val; break; case DT_RELENT: - if (rel_entry != 0) - warnx("second DT_RELENT entry ignored"); - rel_entry = dp->d_un.d_val; + if (dp->d_un.d_val != elf_object_size(ef->ef_efile, + ELF_T_REL)) { + error = EFTYPE; + goto out; + } break; case DT_RELA: if (rela_off != 0) warnx("second DT_RELA entry ignored"); - rela_off = dp->d_un.d_ptr; + else + rela_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_RELASZ: if (rela_sz != 0) - warnx("second DT_RELASZ entry ignored"); - rela_sz = dp->d_un.d_val; + warnx("second DT_RELSZ entry ignored"); + else + rela_sz = dp->d_un.d_val; break; case DT_RELAENT: - if (rela_entry != 0) - warnx("second DT_RELAENT entry ignored"); - rela_entry = dp->d_un.d_val; + if (dp->d_un.d_val != elf_object_size(ef->ef_efile, + ELF_T_RELA)) { + error = EFTYPE; + goto out; + } break; } } - if (ef->ef_symoff == 0) { + if (hash_off == 0) { + warnx("%s: no .hash section found\n", ef->ef_name); + error = EFTYPE; + goto out; + } + if (sym_off == 0) { warnx("%s: no .dynsym section found\n", ef->ef_name); - return (EFTYPE); + error = EFTYPE; + goto out; } - if (ef->ef_stroff == 0) { + if (str_off == 0) { warnx("%s: no .dynstr section found\n", ef->ef_name); - return (EFTYPE); - } - if (ef_read_entry(ef, ef_get_offset(ef, ef->ef_symoff), - ef->ef_nchains * sizeof(Elf_Sym), - (void **)&ef->ef_symtab) != 0) { - if (ef->ef_verbose) - warnx("%s: can't load .dynsym section (0x%jx)", - ef->ef_name, (uintmax_t)ef->ef_symoff); - return (EIO); - } - if (ef_read_entry(ef, ef_get_offset(ef, ef->ef_stroff), ef->ef_strsz, - (void **)&ef->ef_strtab) != 0) { - warnx("can't load .dynstr section"); - return (EIO); - } - if (rel_off != 0) { - if (rel_entry == 0) { - warnx("%s: no DT_RELENT for DT_REL", ef->ef_name); - return (EFTYPE); - } - if (rel_entry != sizeof(Elf_Rel)) { - warnx("%s: inconsistent DT_RELENT value", - ef->ef_name); - return (EFTYPE); - } - if (rel_sz % rel_entry != 0) { - warnx("%s: inconsistent values for DT_RELSZ and " - "DT_RELENT", ef->ef_name); - return (EFTYPE); - } - if (ef_read_entry(ef, ef_get_offset(ef, rel_off), rel_sz, - (void **)&ef->ef_rel) != 0) { - warnx("%s: cannot load DT_REL section", ef->ef_name); - return (EIO); - } - ef->ef_relsz = rel_sz / rel_entry; - if (ef->ef_verbose) - warnx("%s: %d REL entries", ef->ef_name, - ef->ef_relsz); + error = EFTYPE; + goto out; } - if (rela_off != 0) { - if (rela_entry == 0) { - warnx("%s: no DT_RELAENT for DT_RELA", ef->ef_name); - return (EFTYPE); - } - if (rela_entry != sizeof(Elf_Rela)) { - warnx("%s: inconsistent DT_RELAENT value", - ef->ef_name); - return (EFTYPE); - } - if (rela_sz % rela_entry != 0) { - warnx("%s: inconsistent values for DT_RELASZ and " - "DT_RELAENT", ef->ef_name); - return (EFTYPE); - } - if (ef_read_entry(ef, ef_get_offset(ef, rela_off), rela_sz, - (void **)&ef->ef_rela) != 0) { - warnx("%s: cannot load DT_RELA section", ef->ef_name); - return (EIO); - } - ef->ef_relasz = rela_sz / rela_entry; - if (ef->ef_verbose) - warnx("%s: %d RELA entries", ef->ef_name, - ef->ef_relasz); + if (rel_off == 0 && rela_off == 0) { + warnx("%s: no ELF relocation table found\n", ef->ef_name); + error = EFTYPE; + goto out; } - return (0); -} -static int -ef_read(elf_file_t ef, Elf_Off offset, size_t len, void *dest) -{ - ssize_t r; + for (i = 0; i < nshdr; i++) { + switch (shdr[i].sh_type) { + case SHT_HASH: + if (shdr[i].sh_offset != hash_off) { + warnx("%s: ignoring SHT_HASH at different offset from DT_HASH", + ef->ef_name); + break; + } - if (offset != (Elf_Off)-1) { - if (lseek(ef->ef_fd, offset, SEEK_SET) == -1) - return (EIO); - } + /* + * libelf(3) mentions ELF_T_HASH, but it is + * not defined. + */ + if (shdr[i].sh_size < sizeof(*ef->ef_hashtab) * 2) { + warnx("hash section too small"); + error = EFTYPE; + goto out; + } + error = elf_read_data(ef->ef_efile, ELF_T_WORD, + shdr[i].sh_offset, shdr[i].sh_size, + (void **)&ef->ef_hashtab); + if (error != 0) { + warnc(error, "can't read hash table"); + goto out; + } + ef->ef_nbuckets = ef->ef_hashtab[0]; + ef->ef_nchains = ef->ef_hashtab[1]; + if ((2 + ef->ef_nbuckets + ef->ef_nchains) * + sizeof(*ef->ef_hashtab) != shdr[i].sh_size) { + warnx("inconsistent hash section size"); + error = EFTYPE; + goto out; + } - r = read(ef->ef_fd, dest, len); - if (r != -1 && (size_t)r == len) - return (0); - else - return (EIO); -} + ef->ef_buckets = ef->ef_hashtab + 2; + ef->ef_chains = ef->ef_buckets + ef->ef_nbuckets; + break; + case SHT_DYNSYM: + if (shdr[i].sh_offset != sym_off) { + warnx("%s: ignoring SHT_DYNSYM at different offset from DT_SYMTAB", + ef->ef_name); + break; + } + error = elf_read_symbols(ef->ef_efile, i, &nsym, + &ef->ef_symtab); + if (error != 0) { + if (ef->ef_verbose) + warnx("%s: can't load .dynsym section (0x%jx)", + ef->ef_name, (uintmax_t)sym_off); + goto out; + } + break; + case SHT_STRTAB: + if (shdr[i].sh_offset != str_off) + break; + error = elf_read_string_table(ef->ef_efile, + &shdr[i], &ef->ef_strsz, &ef->ef_strtab); + if (error != 0) { + warnx("can't load .dynstr section"); + error = EIO; + goto out; + } + break; + case SHT_REL: + if (shdr[i].sh_offset != rel_off) + break; + if (shdr[i].sh_size != rel_sz) { + warnx("%s: size mismatch for DT_REL section", + ef->ef_name); + error = EFTYPE; + goto out; + } + error = elf_read_rel(ef->ef_efile, i, &ef->ef_relsz, + &ef->ef_rel); + if (error != 0) { + warnx("%s: cannot load DT_REL section", + ef->ef_name); + goto out; + } + break; + case SHT_RELA: + if (shdr[i].sh_offset != rela_off) + break; + if (shdr[i].sh_size != rela_sz) { + warnx("%s: size mismatch for DT_RELA section", + ef->ef_name); + error = EFTYPE; + goto out; + } + error = elf_read_rela(ef->ef_efile, i, &ef->ef_relasz, + &ef->ef_rela); + if (error != 0) { + warnx("%s: cannot load DT_RELA section", + ef->ef_name); + goto out; + } + break; + } + } -static int -ef_read_entry(elf_file_t ef, Elf_Off offset, size_t len, void **ptr) -{ - int error; + if (ef->ef_hashtab == NULL) { + warnx("%s: did not find a symbol hash table", ef->ef_name); + error = EFTYPE; + goto out; + } + if (ef->ef_symtab == NULL) { + warnx("%s: did not find a dynamic symbol table", ef->ef_name); + error = EFTYPE; + goto out; + } + if (nsym != ef->ef_nchains) { + warnx("%s: symbol count mismatch", ef->ef_name); + error = EFTYPE; + goto out; + } + if (ef->ef_strtab == NULL) { + warnx("%s: did not find a dynamic string table", ef->ef_name); + error = EFTYPE; + goto out; + } + if (rel_off != 0 && ef->ef_rel == NULL) { + warnx("%s: did not find a DT_REL relocation table", + ef->ef_name); + error = EFTYPE; + goto out; + } + if (rela_off != 0 && ef->ef_rela == NULL) { + warnx("%s: did not find a DT_RELA relocation table", + ef->ef_name); + error = EFTYPE; + goto out; + } - *ptr = malloc(len); - if (*ptr == NULL) - return (errno); - error = ef_read(ef, offset, len, *ptr); - if (error != 0) - free(*ptr); + error = 0; +out: + free(dyn); + free(shdr); return (error); } static int -ef_seg_read(elf_file_t ef, Elf_Off offset, size_t len, void *dest) +ef_seg_read_rel(elf_file_t ef, GElf_Addr address, size_t len, void *dest) { - Elf_Off ofs; - - ofs = ef_get_offset(ef, offset); - if (ofs == 0) { - if (ef->ef_verbose) - warnx("ef_seg_read(%s): zero offset (%jx:%ju)", - ef->ef_name, (uintmax_t)offset, (uintmax_t)ofs); - return (EFAULT); - } - return (ef_read(ef, ofs, len, dest)); -} - -static int -ef_seg_read_rel(elf_file_t ef, Elf_Off offset, size_t len, void *dest) -{ - Elf_Off ofs; - const Elf_Rela *a; - const Elf_Rel *r; + GElf_Off ofs; + const GElf_Rela *a; + const GElf_Rel *r; int error; - ofs = ef_get_offset(ef, offset); + ofs = ef_get_offset(ef, address); if (ofs == 0) { if (ef->ef_verbose) warnx("ef_seg_read_rel(%s): zero offset (%jx:%ju)", - ef->ef_name, (uintmax_t)offset, (uintmax_t)ofs); + ef->ef_name, (uintmax_t)address, (uintmax_t)ofs); return (EFAULT); } - if ((error = ef_read(ef, ofs, len, dest)) != 0) + error = elf_read_raw_data(ef->ef_efile, ofs, dest, len); + if (error != 0) return (error); for (r = ef->ef_rel; r < &ef->ef_rel[ef->ef_relsz]; r++) { - error = ef_reloc(ef->ef_efile, r, EF_RELOC_REL, 0, offset, len, - dest); + error = elf_reloc(ef->ef_efile, r, ELF_T_REL, 0, address, + len, dest); if (error != 0) return (error); } for (a = ef->ef_rela; a < &ef->ef_rela[ef->ef_relasz]; a++) { - error = ef_reloc(ef->ef_efile, a, EF_RELOC_RELA, 0, offset, len, - dest); + error = elf_reloc(ef->ef_efile, a, ELF_T_RELA, 0, address, + len, dest); if (error != 0) return (error); } @@ -505,168 +536,115 @@ ef_seg_read_rel(elf_file_t ef, Elf_Off offset, size_t len, void *dest) } static int -ef_seg_read_string(elf_file_t ef, Elf_Off offset, size_t len, char *dest) +ef_seg_read_string(elf_file_t ef, GElf_Addr address, size_t len, char *dest) { - Elf_Off ofs; - ssize_t r; + GElf_Off ofs; + int error; - ofs = ef_get_offset(ef, offset); - if (ofs == 0 || ofs == (Elf_Off)-1) { + ofs = ef_get_offset(ef, address); + if (ofs == 0 || ofs == (GElf_Off)-1) { if (ef->ef_verbose) warnx("ef_seg_read_string(%s): bad offset (%jx:%ju)", - ef->ef_name, (uintmax_t)offset, (uintmax_t)ofs); + ef->ef_name, (uintmax_t)address, (uintmax_t)ofs); return (EFAULT); } - r = pread(ef->ef_fd, dest, len, ofs); - if (r < 0) - return (errno); + error = elf_read_raw_data(ef->ef_efile, ofs, dest, len); + if (error != 0) + return (error); if (strnlen(dest, len) == len) return (EFAULT); return (0); } -static int -ef_seg_read_entry(elf_file_t ef, Elf_Off offset, size_t len, void **ptr) -{ - int error; - - *ptr = malloc(len); - if (*ptr == NULL) - return (errno); - error = ef_seg_read(ef, offset, len, *ptr); - if (error != 0) - free(*ptr); - return (error); -} - -static int -ef_seg_read_entry_rel(elf_file_t ef, Elf_Off offset, size_t len, void **ptr) -{ - int error; - - *ptr = malloc(len); - if (*ptr == NULL) - return (errno); - error = ef_seg_read_rel(ef, offset, len, *ptr); - if (error != 0) - free(*ptr); - return (error); -} - int -ef_open(const char *filename, struct elf_file *efile, int verbose) +ef_open(struct elf_file *efile, int verbose) { elf_file_t ef; - Elf_Ehdr *hdr; - int fd; + GElf_Ehdr *hdr; + size_t i, nphdr, nsegs; int error; - int phlen, res; - int nsegs; - Elf_Phdr *phdr, *phdyn, *phlimit; + GElf_Phdr *phdr, *phdyn; - if (filename == NULL) - return (EINVAL); - if ((fd = open(filename, O_RDONLY)) == -1) - return (errno); + hdr = &efile->ef_hdr; + if (hdr->e_phnum == 0 || + hdr->e_phentsize != elf_object_size(efile, ELF_T_PHDR) || + hdr->e_shnum == 0 || hdr->e_shoff == 0 || + hdr->e_shentsize != elf_object_size(efile, ELF_T_SHDR)) + return (EFTYPE); ef = malloc(sizeof(*ef)); - if (ef == NULL) { - close(fd); + if (ef == NULL) return (errno); - } efile->ef_ef = ef; efile->ef_ops = &ef_file_ops; bzero(ef, sizeof(*ef)); ef->ef_verbose = verbose; - ef->ef_fd = fd; - ef->ef_name = strdup(filename); + ef->ef_name = strdup(efile->ef_filename); ef->ef_efile = efile; - hdr = (Elf_Ehdr *)&ef->ef_hdr; - do { - res = read(fd, hdr, sizeof(*hdr)); - error = EFTYPE; - if (res != sizeof(*hdr)) - break; - if (!IS_ELF(*hdr)) - break; - if (hdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || - hdr->e_ident[EI_DATA] != ELF_TARG_DATA || - hdr->e_ident[EI_VERSION] != EV_CURRENT || - hdr->e_version != EV_CURRENT || - hdr->e_machine != ELF_TARG_MACH || - hdr->e_phentsize != sizeof(Elf_Phdr)) - break; - phlen = hdr->e_phnum * sizeof(Elf_Phdr); - if (ef_read_entry(ef, hdr->e_phoff, phlen, - (void **)&ef->ef_ph) != 0) - break; - phdr = ef->ef_ph; - phlimit = phdr + hdr->e_phnum; - nsegs = 0; - phdyn = NULL; - while (phdr < phlimit) { - if (verbose > 1) - ef_print_phdr(phdr); - switch (phdr->p_type) { - case PT_LOAD: - if (nsegs < MAXSEGS) - ef->ef_segs[nsegs] = phdr; - nsegs++; - break; - case PT_PHDR: - break; - case PT_DYNAMIC: - phdyn = phdr; - break; - } - phdr++; - } + + error = elf_read_phdrs(efile, &nphdr, &ef->ef_ph); + if (error != 0) { + phdr = NULL; + goto out; + } + + error = EFTYPE; + nsegs = 0; + phdyn = NULL; + phdr = ef->ef_ph; + for (i = 0; i < nphdr; i++, phdr++) { if (verbose > 1) - printf("\n"); - if (phdyn == NULL) { - warnx("Skipping %s: not dynamically-linked", - filename); + ef_print_phdr(phdr); + switch (phdr->p_type) { + case PT_LOAD: + if (nsegs < MAXSEGS) + ef->ef_segs[nsegs] = phdr; + nsegs++; break; - } else if (nsegs > MAXSEGS) { - warnx("%s: too many segments", filename); + case PT_PHDR: break; - } - ef->ef_nsegs = nsegs; - if (ef_read_entry(ef, phdyn->p_offset, - phdyn->p_filesz, (void **)&ef->ef_dyn) != 0) { - printf("ef_read_entry failed\n"); + case PT_DYNAMIC: + phdyn = phdr; break; } *** 2714 LINES SKIPPED *** From nobody Wed Dec 13 01:36:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqdPh3jG7z53dNt; Wed, 13 Dec 2023 01:36: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 4SqdPh3CLJz4V6G; Wed, 13 Dec 2023 01:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702431416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8r3zTlGg36EeGl5egnE0H7wdAQYkU7wipG7ZCFyBJc=; b=BeaE+RkZU5JA3+XsptCY4MK9BmdHWC++4VItq1KRlfo9r1OkfJCYyYEqbM11ubq19Iy12b I/BiA5TUOiNc8scDyz8OhNABGwg5TpOXy6A0Q6ckRR+E7m2mD//6/1qhSKCgV1bluUsEdz pQCL4Amb4lZzuneH0GvbsDfeZIx0KXzqldAKBYgYsjqJrp5dRbMvfLjYn2I8LgJ2oOHsPJ c4IXqxgap4zxUTpNu2wXWubu5859qFaKjzv85TnN7XeTb7jCkgyc0eurXlXEifXQFM0V2s zwDe2ZqDGe0wCL7ahwv307NRVStlZjf8YKJMiNrzlGRRg7QsFm9hLmIJBffzWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702431416; a=rsa-sha256; cv=none; b=J6fx0xNb8FIGaWqU8i3BgvekV2yfH7fvrQedTnRyI7mcaCDmSx5Ay64HGrygOiFdWUARjI BXcKfavPXh0H35mULTCOT0afSBWhD+9gDTeu8dy3wwyKN8U5Fmr0lw5yPyn+sUmfv/hB8u NOybr9erSEI3CRqZFS9fUdgzePXYw8HGGZcFutXOQ+Ge1Z25L2lmZRRisGbKszeFJ5+8/6 qynohBTvmDdFVMvQxOOMFCRg6B8/YuMVtw/HlosMTwQQuODTQie5tukivy9hBtbjl5PI+9 XeDcvGjsomrKh0sTOccOOD3HF6XWUhw7nSnbHb9mZNKhPGS+L0MmhPwyui781g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702431416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8r3zTlGg36EeGl5egnE0H7wdAQYkU7wipG7ZCFyBJc=; b=kCZwiNuewhUEh+2xMOUGf4VZd+N1FENnbEVsE6IfdfsI24kmX+1LVEVxn4nw33SK2NXn0W VoMwbzUF983Dn+nW7UQBS56vuj1v4rxNtZJpO2hes0JZ8t8Y48HUVBEG3yNOPcTfJzYw+U BIATxoD673hXXoJf70n29lXc5HzWjfWqZgpnSgNcilVWSh25o+EoR0zrK3kV39EJhxSpVy OqBYkAyO9wMJM2CdITMlfTIibR/9LZ+dTsSfHa61nkRzMFhiH3/MNilm8VDJM5RMifIoga fTkDK/Uz2LAjgXfDtzhVHXhLdgvkkSpnH0xInwBKqPohZp40+KRFawGW2oVZsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqdPh2HLxzfHp; Wed, 13 Dec 2023 01:36: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 3BD1au63024576; Wed, 13 Dec 2023 01:36:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BD1auwK024573; Wed, 13 Dec 2023 01:36:56 GMT (envelope-from git) Date: Wed, 13 Dec 2023 01:36:56 GMT Message-Id: <202312130136.3BD1auwK024573@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: 92aa071dc711 - main - Cirrus-CI: stop forcibly installing pkg List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 92aa071dc711d465c41e691bc2f836ab10055483 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=92aa071dc711d465c41e691bc2f836ab10055483 commit 92aa071dc711d465c41e691bc2f836ab10055483 Author: Ed Maste AuthorDate: 2023-12-09 22:12:33 +0000 Commit: Ed Maste CommitDate: 2023-12-13 00:50:19 +0000 Cirrus-CI: stop forcibly installing pkg Updated pkg is now in quarterly and there is no need to forcibly install a specific version. This reverts commit 1c376684c7441a90e64f082c19e3da7942716ad1. This reverts commit 3c097b06a71715ec9ae86430ee94e25e954a1e36. Reported by: bapt Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index bcb6b411847e..96fbb873136c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -93,11 +93,6 @@ task: install_script: - sh .cirrus-ci/pkg-install.sh ${TOOLCHAIN_PKG} git-lite - xxx_upgrade_pkg_script: - - fetch https://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/pkg-1.20.9.pkg - - pkg install -y ./pkg-1.20.9.pkg - - rm -f pkg-1.20.9.pkg - setup_script: - uname -a - gpart show From nobody Wed Dec 13 11:05:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sqt1L3Bf2z53c0L; Wed, 13 Dec 2023 11:05: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 4Sqt1L1q35z4Wsw; Wed, 13 Dec 2023 11:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702465510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7wbfH6JTg7pMhew9+lgYsDiajuMCthr4SWrQH6/KeU=; b=m3VaqajrJapt4MeIGSGbgx+fSHD0LVECTGmuurwMG2PKRas4uYi3yUiA+QCj+nxZ2oprfn W7Jl2HkysZ8qpEZQAw8sw4FO89zNn+3IjH4sEJZldONB6LYyIwD7CgIZ2R1ff1JVACrXL+ MkeHNNfEmSK44EFEYJ3IQuvZMV13AdRNFJBC83K/K/A4WsMx07Cmx7c/rXj880eLPwHTPi yZoIRGoDV34cDeZ13k1AIDQ19hPjvK6r80R5VrMkQyyExjWnC4qKctS843WZoLALVCzF8Q Y22lq72P0vcYc5R89S151w28WsfXcsuGt6r/9NSirernVb+rTz7r6YKSyaJcuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702465510; a=rsa-sha256; cv=none; b=sHpOHW9h0XQFu4rgvtqe7cq23j8+pCR/6eAMcFtOiKTCIXEBfCB4w56k/06qgSmbgWrWDB kMqjgjzqvM2HxFgPYROSOIFKT/I+7fbUvpKbFUlApnWUH7mXLWVMe4PTLhxSjQwcJATuKG R1PXU7vOWEPX1kAHRVTleoYhupDohnTnPlMhG5gHC7orOh8xxKmEY39HRJ8tTTjDKUNj1a 7g7DTX53qLBB1dQUm9lZvobm8P6kujILrEeymlr8zlnOTQTb2k8N7vXB8NirPx3N6ODNeP T8d0kT7F1vs26aUaEhjrQvs7WKMcuBHMgf23SekxPOIBp2R1+HT1evKBtyScNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702465510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7wbfH6JTg7pMhew9+lgYsDiajuMCthr4SWrQH6/KeU=; b=yjzyMHAz1NY8hqU4pAnred8dLhq6uzj4lORKjMURqLnq3vEJHPvCKieD39eQgjlZNIIgYK zgf4pNBKKEvIqcPbTlIh5AmR3YwWTsE/8O8xsjsJ+d6d9fzdlesyiPvtI5JMSXWJP4Fzwt ucyzkoJeED9nVf7ScZDZ5sbJv/bd6QsGIVxbE7WoYJuf1jTwxwyhDhXVmSVfZDj2P+TxCu /94+vd9Cciz3evwm+uPKAG9mgbCFEzya4xCNzn8WGVIhwV82AbjkeZWJJf1awqPIlh0/XU Yy5jsYSuoERZoXTAf3I2C6pYjnxMBygvzgYfq92mF4atW6ATjwFFY/Xmq0DKxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sqt1L0crszw2Q; Wed, 13 Dec 2023 11:05: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 3BDB5AD3082238; Wed, 13 Dec 2023 11:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDB5AfA082235; Wed, 13 Dec 2023 11:05:10 GMT (envelope-from git) Date: Wed, 13 Dec 2023 11:05:10 GMT Message-Id: <202312131105.3BDB5AfA082235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 97530894fc14 - main - kldxref: fix build on 32 bits arches List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97530894fc142a9c44a5909e6ae668dc95a5036a Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=97530894fc142a9c44a5909e6ae668dc95a5036a commit 97530894fc142a9c44a5909e6ae668dc95a5036a Author: Baptiste Daroussin AuthorDate: 2023-12-13 08:19:18 +0000 Commit: Baptiste Daroussin CommitDate: 2023-12-13 11:04:43 +0000 kldxref: fix build on 32 bits arches --- usr.sbin/kldxref/ef.h | 4 ++-- usr.sbin/kldxref/ef_obj.c | 4 ++-- usr.sbin/kldxref/elf.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/kldxref/ef.h b/usr.sbin/kldxref/ef.h index a96bd72d6931..2909704bf2d1 100644 --- a/usr.sbin/kldxref/ef.h +++ b/usr.sbin/kldxref/ef.h @@ -218,7 +218,7 @@ int elf_read_shdrs(struct elf_file *efile, size_t *nshdrp, * Read the dynamic table from a section of an ELF file into a * dynamically-allocated array of GElf_Dyn objects. */ -int elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, +int elf_read_dynamic(struct elf_file *efile, int section_index, size_t *ndynp, GElf_Dyn **dynp); /* @@ -226,7 +226,7 @@ int elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, * dynamically-allocated array of GElf_Sym objects. */ int elf_read_symbols(struct elf_file *efile, int section_index, - long *nsymp, GElf_Sym **symp); + size_t *nsymp, GElf_Sym **symp); /* * Read a string table described by a section header of an ELF file diff --git a/usr.sbin/kldxref/ef_obj.c b/usr.sbin/kldxref/ef_obj.c index a1d46241b803..36c0dce432b6 100644 --- a/usr.sbin/kldxref/ef_obj.c +++ b/usr.sbin/kldxref/ef_obj.c @@ -82,7 +82,7 @@ struct ef_file { int nrel; GElf_Sym *ddbsymtab; /* The symbol table we are using */ - long ddbsymcnt; /* Number of symbols */ + size_t ddbsymcnt; /* Number of symbols */ caddr_t ddbstrtab; /* String table */ long ddbstrcnt; /* number of bytes in string table */ @@ -155,7 +155,7 @@ ef_obj_symaddr(elf_file_t ef, GElf_Size symidx) { const GElf_Sym *sym; - if (symidx >= (size_t)ef->ddbsymcnt) + if (symidx >= ef->ddbsymcnt) return (0); sym = ef->ddbsymtab + symidx; diff --git a/usr.sbin/kldxref/elf.c b/usr.sbin/kldxref/elf.c index a30eb4456a76..f8a6510ed352 100644 --- a/usr.sbin/kldxref/elf.c +++ b/usr.sbin/kldxref/elf.c @@ -329,7 +329,7 @@ out: } int -elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, +elf_read_dynamic(struct elf_file *efile, int section_index, size_t *ndynp, GElf_Dyn **dynp) { GElf_Shdr shdr; @@ -365,14 +365,14 @@ elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, } int -elf_read_symbols(struct elf_file *efile, int section_index, long *nsymp, +elf_read_symbols(struct elf_file *efile, int section_index, size_t *nsymp, GElf_Sym **symp) { GElf_Shdr shdr; Elf_Scn *scn; Elf_Data *data; GElf_Sym *sym; - long i, nsym; + size_t i, nsym; scn = elf_getscn(efile->ef_elf, section_index); if (scn == NULL) From nobody Wed Dec 13 14:48:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqyzF6MJcz53shs; Wed, 13 Dec 2023 14:48: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 4SqyzF5x2kz3Sjb; Wed, 13 Dec 2023 14:48:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702478921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nuWiMAlZUSd3X1j0LUaPmktwnCLfkNpL194q+vLHof8=; b=szznmJk67dw8pVD2dOtfXWv2LVnT2hpZVOFrprk1d5VWe77+x3uOEpO+b4OrBw/2pvlFi0 Ze+Iqemo1CKPcBXr4POd8bdF4Qn03zj1zXXn6i73P1BwrxVY/si2X2+WtuRT0L4uwzrFGs Il66IweSv9o+SJ0pz3gzh0POmuGowc+nIt6BUecoRBpIAGlmdadqktUBWSBjCiLJo6g9x7 b2M87zLJg7E/dPOYXxqHKKzMHELEmeMmnDndANRe9H84JAhVWgAnwErJByE2BZ8f5BXNpH 5oCargjRwKgH7QgJOA6HDooFIvqlEDkj6UqJdxrA3xIMudRekzHZuL1I9f9YXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702478921; a=rsa-sha256; cv=none; b=vvXxpe4z0yCEzgAKa5FQLaXt2eVcNT0ggh+q+aINGajn/dA9s9je8Vg/ZbSTRxoyGuQJ6B P3Xv7OhoHUanIiskzZ6xFU+bqJasI4FHMrVtNI1oN8pjgdGVHWrsZYUeB8xLDTWKmVg7wG 9QCAdfU8awXkg+kp2r4QYufCViSj+dr01rEQLWgKufy2EY8WZG70FEg/M6ZNYvueUJ7JQR 66qubaAVj1WwH6DUM7p/QIxNlq9ybs0rQEOvF7TPGepVBnuF7ifZVs1PHZtWDbsaw8RpoR L3t2HAM5zLuzgkmzdqnu7HH3naSxtHleCC/b99+AUrrDNlJcidvpvBjDbcaC4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702478921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nuWiMAlZUSd3X1j0LUaPmktwnCLfkNpL194q+vLHof8=; b=AAm/ViuQT7hGo+kPG9B9xFSBjJKuZrqgrnH60aKX6+EaLC9QIxlEvr5X82HdUPw2QcZZs1 07QXndWUTsbnO7Pj26ZUd/bvAZ1L8vwJCA0N21ut776KMqSHL5UG6Saqyr2ft8/j6qnmjw WqDwsSf1mJgwwXke4T1RpIxVTnfF6/RHev6M4J+5JqFF8O3G8aVzDMyTlQpd0UF4yS0/W6 gZ8xgQWs+g6Upj0ie9vvg1UFK0GFAl8lo6fRaJy4cpQm8HGO/Z1og4za2/uZvcPfi5MLuf 0Mrydv56P0PtrKR3fZVvyMwPaj0liR7nCqbgkpmGoHWSFYqXIdl1MHZj7MYzRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqyzF4zjJz12QX; Wed, 13 Dec 2023 14:48: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 3BDEmfHx049781; Wed, 13 Dec 2023 14:48:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDEmfwf049778; Wed, 13 Dec 2023 14:48:41 GMT (envelope-from git) Date: Wed, 13 Dec 2023 14:48:41 GMT Message-Id: <202312131448.3BDEmfwf049778@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: 5437c3b6adad - main - qat: Update firmware for 4xxx devices to version 1.1.20 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 5437c3b6adade1d72971fa214ead90a0296c79f3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5437c3b6adade1d72971fa214ead90a0296c79f3 commit 5437c3b6adade1d72971fa214ead90a0296c79f3 Author: Michal Gulbicki AuthorDate: 2023-11-20 15:25:57 +0000 Commit: Mark Johnston CommitDate: 2023-12-13 14:47:37 +0000 qat: Update firmware for 4xxx devices to version 1.1.20 Key features: - added zeropadding feature for compression - added partial decompression support - added DC rate limiting support - added Admin ME capabilities reporting - added Hash+Compress chaining support MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D42864 --- sys/contrib/dev/qat/qat_4xxx.bin | Bin 665356 -> 665356 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/contrib/dev/qat/qat_4xxx.bin b/sys/contrib/dev/qat/qat_4xxx.bin index 66dd803fe419..23eb8077241a 100644 Binary files a/sys/contrib/dev/qat/qat_4xxx.bin and b/sys/contrib/dev/qat/qat_4xxx.bin differ From nobody Wed Dec 13 15:32:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sqzxj5Pkcz53vq8; Wed, 13 Dec 2023 15:32:25 +0000 (UTC) (envelope-from dim@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 4Sqzxj4zFvz3YKP; Wed, 13 Dec 2023 15:32:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702481545; 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=tH6DWYQ6qeL9kzvbuk6vbagldprRVNMm/AaL+h/GCok=; b=fbLmHMPHWjx6agJ3gE9H0kV5Va1gqTs8mSVcbyzeezce3O91VwyYjsHHMNg21BrEsAl4jP v4xfP3THaIaZHdA2e8Pvbd+g2JNn0v+RNJz5nLhSkVjRGbptH9ndysxtc/R0PVUZbCM2wY BfjcQz7TbuazFGDmzBNB6f80oaz+8NKjaRGfhz84k7AOIFcPxah3H+J6/Lsal1u/wqZvBQ BQomz8ihck6y9BFOsnUC3ymkqVBMjrBpYkqRpeyF4mtklCgkC3dSSMoBFZriqTYsgshNaB 9MHkWHTH5PcIXIbXGy6o1iqpuHe+ULD5bTVNujyFMVrou2zJ4moGAGAExmm/Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702481545; a=rsa-sha256; cv=none; b=OIl99rahGjwgk4lEXnJlJV+31AMA4H7WOKHfKz1gDXsW1IvT0uVPCioBXQcq/lKvQimVe4 ldsi5krG9hzp+yzCkhOknh6OOjmVkfySuuGVuZDF0tKu83Avt7xFOIsbRq4iXjZu7p2YF0 bt1G5GupC5od7CZhmwEvPZFSCV4gxyR2d3lRpTuC1tGNvQf/TA0Z7PqxNHzSuEZxkjolkw OIp1AA5+3n/XOx3LlGsJutGiAarz3Cc5oJU0AatEhIimm8pbsx8kWN8INXwDOCJhDb6N2k XYyZFaY0//g71rEBXkvb7S9sZHrNQVDAcHPg6NCjLe8EsujhJ/wwPnGDg9I9LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702481545; 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=tH6DWYQ6qeL9kzvbuk6vbagldprRVNMm/AaL+h/GCok=; b=DMnPzZnJ5KoeZLUDEKbkEYqWuZhAa3oG0ctZuE48hgzYKxJ0sL22Ml7QiTHd20v08NYiKM MEpr0/gAMGlpxVIQK/5EFVfPD39olX1WtpfpYZbfuCudmHH4X4rCzzt/YzyMNt9fQgBUSJ 49UrjmAxRinCfYtapNJ53Wy4CcYi8XWqNOp3c8sCKUgxo2+Y5IPGRVhwZUQOmVjjFxnuLI AdfIgtUHpb/IIDXvdMQb+biv9mGWAZ/DGwCestAxl7pUkgP0DSWD+tVagNilgs2GVU7G/B uTG6ktpNmvrKhQg8Nnbj3yUSGhsGympDpRp/ysaC0Hu8lyMrZjOcTCeiiHScjg== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher 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 "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Sqzxj3VB1z1K35; Wed, 13 Dec 2023 15:32:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8A19B399F4; Wed, 13 Dec 2023 16:32:24 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_311CB307-E569-4F89-9DAB-4C117DDCBBBE"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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 \(3731.700.6\)) Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 From: Dimitry Andric In-Reply-To: Date: Wed, 13 Dec 2023 16:32:08 +0100 Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> To: Dima Panov X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_311CB307-E569-4F89-9DAB-4C117DDCBBBE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 12 Dec 2023, at 09:37, Dima Panov wrote: >=20 > On 11.12.2023 21:26, Dimitry Andric wrote: >> On 11 Dec 2023, at 19:10, Dima Panov wrote: >>>=20 >>> On 11.12.2023 18:15, Dimitry Andric wrote: >>>> On 11 Dec 2023, at 16:03, Kristof Provost wrote: ... >>> BTW, lang/gcc13 fails to build on 15/aarch64 after this import with = lots of >>>=20 >>> /usr/include/c++/v1/locale:3434:31: error: attempt to use a poisoned = identifier >>> 3434 | __h.reset((char_type*)malloc(__exn * = sizeof(char_type))); >>> | ^ >>>=20 >>>=20 >>> Full log: = https://people.freebsd.org/~fluffy/-log/150aarch64/gcc13-13.2.0_1.log >>>=20 >>>=20 >>> Just curious but gcc12 is fine now >> I have seen this error too, but could only reproduce it outside of = poudriere, so I didn't take it too seriously. It is easy to fix; I have = a patch, shall I commit it? :) Sorry, this took a bit longer than expected, since I went over the other = gcc ports too. So I thought to ask the maintainer first: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275748 -Dimitry --Apple-Mail=_311CB307-E569-4F89-9DAB-4C117DDCBBBE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXnOeAAKCRCwXqMKLiCW o4mCAKC7eDSV/ARPx9amGmsumvvdHUsakgCggVolv3HNeej2iiF1X14ZTCmHaEA= =EoLH -----END PGP SIGNATURE----- --Apple-Mail=_311CB307-E569-4F89-9DAB-4C117DDCBBBE-- From nobody Wed Dec 13 16:49:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr1fh05Wpz541Tx; Wed, 13 Dec 2023 16:49: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 4Sr1fg6jXyz3fTR; Wed, 13 Dec 2023 16:49:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702486171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LabRJFmg/FWZzANsQfXlAo8yKepB7v8hMvDsqR2wq9s=; b=xLidUK0yVos78wRHEukGL2LgMgZdiXeey5oIK5czJIH77eiju+rBuLJyEq5mv/lnswBH8y ywtiFR3GW0KYyK2x7xa721xZ1rFh1Nbg5AZB9PC5jHj+5CREwMl49Nb+iPIYZIwJCAJQp4 6KkXEhG+BQ/yEkLbNTxGsLFCbeqfBRbNhpgauB2obQIU3D6fWpHZ0yyYiKm1hL12FEp0jb 508UvaIk72ORpVkZxsoC6gdZl7SuTiK2r+igCEyx/ixT9MJa7TWxQpiseLYci0c1/Skq+V 71sKWcyoBdAoV6ncoIjShdrgmtZCkgsMxaleOpzqXfBBXoWfcmyfoq6zHbH86w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702486171; a=rsa-sha256; cv=none; b=oLTN0pHZC0k8f012PeB4KCo7KMQEg5kRZAJQ/RBiXIgU19ak3WkVh4KaUlx0KGCky0aoQo Wnru6/df1B4iXtaaqgGcnI+dMRu6dSTOxQGHa08sDiobjmyJieAkRWY9rJLVSbFHE/XcZN zf+93wIfTDn5FZozFuDdHbLt9Xb6QXWPGAN15kPWjXgH6CrLp5NOhs/SHIIQkQCA5fzxnI PswVXn2F0+GpTOc4LUU/n9yxhibQ8b0oLflSCnsLX4KxeJTeHnKRkQRKtdZFtJpHayMLFC 9ve3zOWj1J945H+jLhqyzDW7s6L97gWtrhdbaT4PTJeDE6aDNAEA6th4+8Qggg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702486171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LabRJFmg/FWZzANsQfXlAo8yKepB7v8hMvDsqR2wq9s=; b=PALYuSmJvP33jPagTsHz+GA0ubuLFiLFACTeVHzcM2JT5eMVs49Bz085DA40FUSQ1c465V vvIVbL74nfA6gtNiE2FFoxJTyz0gy2MuxR0naYBu5UOrO3Z0bBdaHBSJOVCfzUJYMlBJY2 5rlPCth1WTEHAFmph0zEoIJyZPeBHkOci0AFny2M7AN/vxtcLBHd23E4GOrWuwC+L+jRhZ /ERvuDCFdHVGplGu85YQby40mk4SxswbKkNCFMc0DOGyCeuAdnxc6s309m1LHyPwjQEvGD JL9/0whm326EaiRfjaIcU8DGO2LEUReIiHDEX3XakKIsh7n3Lz43nD9H8b6Ygg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr1fg5ntfz1612; Wed, 13 Dec 2023 16:49: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 3BDGnVcF050659; Wed, 13 Dec 2023 16:49:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDGnVNr050656; Wed, 13 Dec 2023 16:49:31 GMT (envelope-from git) Date: Wed, 13 Dec 2023 16:49:31 GMT Message-Id: <202312131649.3BDGnVNr050656@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: a206524709bd - main - kdump: use print_mask_arg0 appropriately List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: a206524709bdfbd577bcfe76676da80b8250f84c Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a206524709bdfbd577bcfe76676da80b8250f84c commit a206524709bdfbd577bcfe76676da80b8250f84c Author: Kyle Evans AuthorDate: 2023-12-13 16:49:03 +0000 Commit: Kyle Evans CommitDate: 2023-12-13 16:49:03 +0000 kdump: use print_mask_arg0 appropriately Some callers are using print_mask_arg() when they should be using print_mask_arg0(); the latter should be used when all flags are optional and there's not a flag to be decoded with a 0-mask. This turns: nmount(0x6991e009000,0x8,0<>0) into: nmount(0x6991e009000,0x8,0) Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D43007 --- usr.bin/kdump/kdump.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index ce68f4522e0f..0253fdc9e87b 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -922,7 +922,8 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip, print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_close_range_flags, *ip); + print_mask_arg0(sysdecode_close_range_flags, + *ip); ip += 3; narg -= 3; break; @@ -988,14 +989,14 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip, print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_mount_flags, *ip); + print_mask_arg0(sysdecode_mount_flags, *ip); ip++; narg--; break; case SYS_unmount: print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_mount_flags, *ip); + print_mask_arg0(sysdecode_mount_flags, *ip); ip++; narg--; break; @@ -1453,7 +1454,7 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip, print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_mount_flags, *ip); + print_mask_arg0(sysdecode_mount_flags, *ip); ip++; narg--; break; From nobody Wed Dec 13 16:52:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr1jx2V8kz54282; Wed, 13 Dec 2023 16:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sr1jw71k0z3fmK; Wed, 13 Dec 2023 16:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702486341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/HiX+whBC6QfL645UiWd/6yRxofWwt/imPV9sLBp7VA=; b=Ahaa/WuPai4WC8Mq2fD1gvUnzGN4ZJf8TWX9zOV0d2lI3L2E1uJDZwENJJNzFtu6rgx+aZ a2WZ5Qs/4kp1wtM/0SYVVyBTXjoiGYOFFzlbFiSAwSYa1RBdIF/FZcyO6e/m19KRaoN2pG rw4MfPfHIzo3qzBIFX1TRQjTM4b3w+eOyRlh7H0y9qzVVAEf2oVPvF3E1TqNqRa2+adVD9 7Jc8GeEsMyVJcPzIP6zUTy4DAqZNEGk+zG4qDRp3+FJXUHtWKaIxDToPwtTmeT9GWW2qDw WHoXgs3DL1BhD83WCrpMfCC8zruwz1tuxQW6idzAsSSKsYarVhkqjZyWAZWAbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702486341; a=rsa-sha256; cv=none; b=B+cbMm7vXnpb0pQerBLObEAiNM8H2o2PQw4kNLSULjk38iZJbTczS/ycISmiYkMD/ZqFiu iD+vZ54To255AXMuvrsu3oggpkW/ul+pGiDabWNwd6Runi195D8SHminSiZsS1ZRLofub5 kisiImfyb5UjDCeS7Wn+PAQqQZEIdwmRxSXY4bVahZc49jM+CuhpfZPBZgD1D8U3mp6LTJ myVe3fYRraupzboz1Y9evYZpKld8FVUQxbUVspC9jiGf5DR+luoSK9ZOHNdflPMwhdTy4d 2BzAVYr1/OwZRfYaOHpMkvI6kW1vQL61FsRejM32mWOz+83E48WFUz6Fz5G+hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702486341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/HiX+whBC6QfL645UiWd/6yRxofWwt/imPV9sLBp7VA=; b=SBTRfTXhnCyl8y+vq6sHcomszM9I/1mfkK8Niu3HY7MYh9vdPjmUJrfSLMGfWSBkVG9paW 7SGRYAPLgu+6wQ41WKSRUhJ7rVOmvwjxN+tE9AZCaxXp8RW9furMLFfz+CqgTaSh2xZyu7 avzTLB2rKvizU0iylCT4a+GJLHWggXLcEPbcHBDVRdURzPSK3fpp8sGryYCFRsFjAsdLXL mca9XiiJphiDkprgBiRI9wzr0slcWGSDqom/sB9SoTE5QXZYc1bYoi0i/7lWQRVLW5m0Jm jT5YpjtYHpVF2GEU6vhaf0K9L5o/6OIswBWJE2w2Opl9w4K/ib7F72We/QIFYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr1jw66SZz15lB; Wed, 13 Dec 2023 16:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BDGqK6U064836; Wed, 13 Dec 2023 16:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDGqKHP064834; Wed, 13 Dec 2023 16:52:20 GMT (envelope-from git) Date: Wed, 13 Dec 2023 16:52:20 GMT Message-Id: <202312131652.3BDGqKHP064834@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: d04415c520b0 - main - loader: lua: remove the default kernel if it doesn't exist List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: d04415c520b031fb8eb93cb252e4acee66149c87 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d04415c520b031fb8eb93cb252e4acee66149c87 commit d04415c520b031fb8eb93cb252e4acee66149c87 Author: Kyle Evans AuthorDate: 2023-12-13 16:52:14 +0000 Commit: Kyle Evans CommitDate: 2023-12-13 16:52:14 +0000 loader: lua: remove the default kernel if it doesn't exist The `kernel` env var provides the default kernel, usually "kernel". It may be the case that the user doesn't have a "kernel" kernel, just "kernel.*" kernels, but have left `kernel` to the default because we autodetect entries by default anyways. If we're doing autodetection, take note of whether the default kernel exists or not and remove it from the list if it doesn't and we had found any other kernels. We avoid it in the #kernels == 1 case because something fishy has likely happened and we should just trust the configuration. Reviewed by: imp, manu Differential Revision: https://reviews.freebsd.org/D42967 --- stand/lua/core.lua | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index c7581b296b8f..9226de564348 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -201,17 +201,18 @@ function core.kernelList() return core.cached_kernels end - local k = loader.getenv("kernel") + local default_kernel = loader.getenv("kernel") local v = loader.getenv("kernels") local autodetect = loader.getenv("kernels_autodetect") or "" local kernels = {} local unique = {} local i = 0 - if k ~= nil then + + if default_kernel then i = i + 1 - kernels[i] = k - unique[k] = true + kernels[i] = default_kernel + unique[default_kernel] = true end if v ~= nil then @@ -239,6 +240,8 @@ function core.kernelList() return core.cached_kernels end + local present = {} + -- Automatically detect other bootable kernel directories using a -- heuristic. Any directory in /boot that contains an ordinary file -- named "kernel" is considered eligible. @@ -267,8 +270,25 @@ function core.kernelList() unique[file] = true end + present[file] = true + ::continue:: end + + -- If we found more than one kernel, prune the "kernel" specified kernel + -- off of the list if it wasn't found during traversal. If we didn't + -- actually find any kernels, we just assume that they know what they're + -- doing and leave it alone. + if default_kernel and not present[default_kernel] and #kernels > 1 then + for i = 1, #kernels do + if i == #kernels then + kernels[i] = nil + else + kernels[i] = kernels[i + 1] + end + end + end + core.cached_kernels = kernels return core.cached_kernels end From nobody Wed Dec 13 18:02:55 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr3HM3VWHz5460T; Wed, 13 Dec 2023 18:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sr3HM2YTgz4Gd6; Wed, 13 Dec 2023 18:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702490575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8r+ARCSISj6o+RmsQ81kdCGHf25ie3J8K3W6oQGJTdg=; b=hKbngngKzohmMVjXxJJe3cmOXPR4djiqtpy91w1av5hg3k2VmjQnqpR9LP1gwaSN6tgrz1 pWVoVyYatdWAO4WWYBIRUUOfOw72fLvTJBMvXQ2kF+2abW3VGNt7/OcscahtzyUhyOUO0D 6P2ecZzK0FIxyEX3RSKkih1msgCDiVQqBPKgzSq4m2OaZ8ZPUIIW9/SFhN1gtBgNWnB7/g Vtrd9u5UfpS/vgEftkq7U2NZupkwwtORs199rkUtyL+6fB0uERpm4LTSzxjrS+7arWMkMu 5BdUjUfeCU3x9XeXV12GH5h0UQuLiHVcT6ZjPNBm2541kNwNx2Y+NmF7elvElA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702490575; a=rsa-sha256; cv=none; b=YZ5VzOhPvG026rII3j2KdGkOD+b3x/JmyY0+ItHNfNCAYtv6oT30OymMdj6amGxqUcjZpt hjzpRe/O/GxqnjgakK59KNM/KnQlcHKBTanWVa0praRU57mV2omYOvi3bBZqSmLyeczMZ+ YbMTn37Co6JNh+/oEYUxVeZkQCS7tvkJ8rd7gbEH8oKH1lPZCWnt5en1wtwVYxCTOAdzII BlPA27qHlqrj0OKJZl5aCA9EKC/W4bRJQZQllOAhelS6UO0O5btaxYMudVr2iKid2or3iU BnnMaL5wPWIeqKwTKnISYGXSw0OjkLzC68lDhIuSxY0LW3fPkA68Pcf7OteQsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702490575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8r+ARCSISj6o+RmsQ81kdCGHf25ie3J8K3W6oQGJTdg=; b=k+VTkD+Al2aAunHxcuy4AX2lBd7AYo2+YFzEn4KxHtt1ZuULVmvCbwih2IwBopIEBxqUkc WXVWcTzbetqbpUoOTUNuN2rlY72/YwAQyqBYhzar8CoyYLhwUy45u6/ohW1GoqIvepOCaA cuMYvaE2K+0TPVVjor68OXoy28T7uN8wSuuLZpq/6CWNQhU/9QvCT+b4UNiTa4D3+lnUvx 9zWqBWEphHvAc7Fh+DTU06NaVQlcKEMTWHklQn4vxeZJLionzWhWPuFNI5suh2xXjLktNn F1Xm8ohViOINbx+fIADuiVAATKcoOak/Hb8hyJE/Rr41JVnUeBtgq5HYR3K0zQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr3HM1d5gz17Hl; Wed, 13 Dec 2023 18:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BDI2txp084650; Wed, 13 Dec 2023 18:02:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDI2tH1084647; Wed, 13 Dec 2023 18:02:55 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:02:55 GMT Message-Id: <202312131802.3BDI2tH1084647@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: 641eba2de4b4 - main - Makefile.inc1: Reinstate building sbin/md5 for BOOTSTRAP_ALL_TOOLS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 641eba2de4b4f238d2a9d37ab975a13129376d29 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=641eba2de4b4f238d2a9d37ab975a13129376d29 commit 641eba2de4b4f238d2a9d37ab975a13129376d29 Author: Jessica Clarke AuthorDate: 2023-12-13 18:02:45 +0000 Commit: Jessica Clarke CommitDate: 2023-12-13 18:02:45 +0000 Makefile.inc1: Reinstate building sbin/md5 for BOOTSTRAP_ALL_TOOLS The sha256 and sha512 binaries are used when building release images. Bootstrapping them used to be gated on MK_BOOT, which wasn't quite right but in practice worked, at least in our use cases downstream. Add back bootstrapping sbin/md5 and its aliases for this purpose to fix building release images on Linux and macOS. Fixes: f213da893ca8 ("Makefile.inc1: Remove beri straggler") --- Makefile.inc1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index b509b603821b..3d982e45fd63 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2594,6 +2594,11 @@ _basic_bootstrap_tools+=usr.bin/mkfifo # jot is needed for the mkimg tests _basic_bootstrap_tools+=usr.bin/jot +.if defined(BOOTSTRAP_ALL_TOOLS) +# sha256 and sha512 are used by release/ (and possibly others) +_basic_bootstrap_tools+=sbin/md5 +.endif + # tzsetup is needed as an install tool .if ${MK_ZONEINFO} != "no" _basic_bootstrap_tools+=usr.sbin/tzsetup From nobody Wed Dec 13 18:28:43 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr3s72Bvvz547hx; Wed, 13 Dec 2023 18:28: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 4Sr3s71hlfz4JdQ; Wed, 13 Dec 2023 18:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCta/EuKtE3+wz2gtgo+7Hp62ZoejoFTgsOpCcLpU1Y=; b=QktPI2nKAK9wQ0HBQJgKeGU+DvtwBO+mjeZzdVW6JlPgKHDTb0OYvQ9B6Y0x/ZK3RaZgQE WZRfutviMAFOW4L++Pa4k2kiGA8bdvmslv9evp/A0hKFevuZX18zEDkCPHTbBjG2rX3TTg W4MHFEkgkaswOSJftIgbPyesaM5RN6xrUhQsCyTD3cjJIcyfNCW31c5OluhBKI2+TYJS62 WKLcQ7OiakHBGrPWTGEqpAns1qOVxOF48t/aGEsfvXYTlHvSRDvrxkgf/pN1u8ofLLdJLN 1OoPr+Ejjh9EJ+pIKzD61ylJHjzTKhCpNh5SdKEL70AKx136+Za6st4ue6cTyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492123; a=rsa-sha256; cv=none; b=nsZo+0tDxC+jzoXXspIyDR8q8uuWSyswFdoDnJ4sC05R75+GlKdZD7UJYEvRdHqe5AyX5t YL6D2GL42npdeZt3bbxznoAUEwZLLgwHNmsO3alkJkEgVCAZ8MxT9y/JAOwIN6H+9jaoDy Jpw6QYlsF7z8eu6OxMpTd8ApA8nm8agRsr2sqcDET2HPHkHf5iapi6gNrip3OaishSpshR w/cFFmVA6maFCqXiBzMw9QhyOVcSxAinPf2ku6UR1ErkgFTkxJdH8xmRWrJAuZWwClW8CW bEPmtsK3wFFrx/RpQp6O0Gt8mch4CtCXTmbOxBnCMzlBE4dHgv1FigweorxFmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCta/EuKtE3+wz2gtgo+7Hp62ZoejoFTgsOpCcLpU1Y=; b=IVMme69E5WV72imyBoqEBmKE56BYKEE17l2mze31mSrnNnBSju2Ct6AGoerNxuv5bm2sRO BwUS4AzTEk8KnPePx0KTlDw/rJp0JuXnNQZiAhCPs4a6W5NtLz7GNORBIbfbkflPsr+Ipq SDdXk3lAGJWfBTn+cRQC2nrp4pWN41TfAFzxZmXwR3/gX+LaFeMwNuc7tEaMh48ecMw5+0 zCZjQml1r+RTchoGJSttvHNQZk4AO60JTk2tcFypNGl2t192TMiXeD4Tpet11uLGxjF3X6 P9UeQEgem/aovQ02iDmHz/xlwnlvc8yZyxfqel5uLMlVga//hkPnrIovF8lQEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr3s70mBNz17sN; Wed, 13 Dec 2023 18:28: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 3BDIShDp018826; Wed, 13 Dec 2023 18:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDIShxw018823; Wed, 13 Dec 2023 18:28:43 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:43 GMT Message-Id: <202312131828.3BDIShxw018823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 50a56453dadb - main - linuxkpi: Include from List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50a56453dadbd05eb1c43addaf2773a1ef417445 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=50a56453dadbd05eb1c43addaf2773a1ef417445 commit 50a56453dadbd05eb1c43addaf2773a1ef417445 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-04 22:02:02 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:42 +0000 linuxkpi: Include from [Why] We need this for the `bool` type. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43016 --- sys/compat/linuxkpi/common/include/linux/cc_platform.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cc_platform.h b/sys/compat/linuxkpi/common/include/linux/cc_platform.h index 727dbc98dab2..01c0de17f7d2 100644 --- a/sys/compat/linuxkpi/common/include/linux/cc_platform.h +++ b/sys/compat/linuxkpi/common/include/linux/cc_platform.h @@ -3,6 +3,9 @@ #ifndef _LINUXKPI_LINUX_CC_PLATFORM_H_ #define _LINUXKPI_LINUX_CC_PLATFORM_H_ +#include +#include + enum cc_attr { CC_ATTR_MEM_ENCRYPT, }; From nobody Wed Dec 13 18:28:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr3s83wS7z547n0; Wed, 13 Dec 2023 18:28: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 4Sr3s83G5jz4K0j; Wed, 13 Dec 2023 18:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96JqSeblIukyTlfUpKrVSLBINX980kMSKPnL01x88Vw=; b=gttDcs93Y61a5zW39/Hjfu/8gGXWUsgOsbdJivuMGZUOLg03HcN6ysidpXzreguz1SkEae VQaRcGRrZA3x9cRDerlftLD5Ahk339vl+hZCaNp9gYlPn4q048H7muAwMRS64F+adx5t/Q L1FmlEKXPkHo9kRFdTZeB/xJzelT7k/bnzglYSB/ZVNO+nM79odUsnKcOQH+tCYk7esNJP 6iLbRFxg9XSBIaswZKv58Vdd/boeDU1fJxDPIxFsG8PEEbRkwo2lAIe47+YO7Or0n3a0Ph 7pHzIStCQtpoUPJC/HaUQB69fid4LfxgP60VSTbRlYr95CXqYLit9dsa5cmsuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492124; a=rsa-sha256; cv=none; b=paC2ODRm8hJiJUiThhjWrT3JLawk4egd/Czpl17Uwkng7m/n8GodsHOBDfz7JvlKisxM/s 3tu4FtAEGF/UXBhyAEiF90leWk780wWNJyL6EShNKN53wcTm24VQSsklSmVCYCGs3aA0ZK bSh9fnz/S7CnnBHgWOTcjuIkwgtig5AnoDI/g75+J4O5Iqg79+eW5wMiQPM9O7gEFrNKSs ARbzdmdh0K9++wnjqcygej3u/pzdYFlD3eFBXSlQwVd9a8XG9dgQsADoBaAprg/X8EhJ2p pM0iiG6qRcZ5oh4ggJQWlszCYyw3SMV9dL1gSxVGC/KSc5eds9jMun3YndLSCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96JqSeblIukyTlfUpKrVSLBINX980kMSKPnL01x88Vw=; b=Z4L99IZBkpQNNSPnGmqVXKDPmrJ6szijBbXJ8vxlozMIkGdbJrM3xRu6wnW8PtrkIlIHK4 TPk2P/+b1JRjIkn3sdkWhVZJULxQAMMg9W6+UjJq5el4kfsSp0tb3tzloVOD2J1zLPBnIx tW1h2qs9sv4dkBzK10UPNh8OOpCCb9t1Likk3pAmjLWpmaYcscXPD9mmXwI0wCTr8v6IOK mXRFvC2494NAXV+n/45Ngy6pueygiNcX2/2Xmk1hDxHXCrhLz56JiJuAcdA7xSBa9ZwxFx icDiFyhQ6ZCQFG8r/+IpY7i2jMOligNLJ+3XuD+hZAWVy+VdqNpMnI3wOt7Low== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr3s81lNFz17yG; Wed, 13 Dec 2023 18:28: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 3BDISi5v018879; Wed, 13 Dec 2023 18:28:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISiDa018876; Wed, 13 Dec 2023 18:28:44 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:44 GMT Message-Id: <202312131828.3BDISiDa018876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 4e0d3f7b3c32 - main - linuxkpi: Move `invalidate_mapping_pages()` to List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e0d3f7b3c3295e51ded2bab39f36842f405b4eb Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=4e0d3f7b3c3295e51ded2bab39f36842f405b4eb commit 4e0d3f7b3c3295e51ded2bab39f36842f405b4eb Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 17:07:00 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Move `invalidate_mapping_pages()` to [Why] This is consistent with Linux. [How] The definition is moved from to and the latter is included from the former. This is how it is done on Linux. Prototypes are also expanded with argument names. I got a build failure in the DRM 5.18 drivers because the compiler considered that the `pgoff_t` argument was there twice. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43018 --- sys/compat/linuxkpi/common/include/linux/pagemap.h | 6 ++++++ sys/compat/linuxkpi/common/include/linux/shmem_fs.h | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pagemap.h b/sys/compat/linuxkpi/common/include/linux/pagemap.h index aa2e2a4e3950..7244b61257dc 100644 --- a/sys/compat/linuxkpi/common/include/linux/pagemap.h +++ b/sys/compat/linuxkpi/common/include/linux/pagemap.h @@ -33,6 +33,12 @@ #include #include +#define invalidate_mapping_pages(...) \ + linux_invalidate_mapping_pages(__VA_ARGS__) + +unsigned long linux_invalidate_mapping_pages(vm_object_t obj, pgoff_t start, + pgoff_t end); + static inline void release_pages(struct page **pages, int nr) { diff --git a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h index eb31c5ad827a..d373cfa1d611 100644 --- a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h +++ b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h @@ -29,14 +29,15 @@ #ifndef _LINUXKPI_LINUX_SHMEM_FS_H_ #define _LINUXKPI_LINUX_SHMEM_FS_H_ -/* Shared memory support */ -unsigned long linux_invalidate_mapping_pages(vm_object_t, pgoff_t, pgoff_t); -struct page *linux_shmem_read_mapping_page_gfp(vm_object_t, int, gfp_t); -struct linux_file *linux_shmem_file_setup(const char *, loff_t, unsigned long); -void linux_shmem_truncate_range(vm_object_t, loff_t, loff_t); +#include -#define invalidate_mapping_pages(...) \ - linux_invalidate_mapping_pages(__VA_ARGS__) +/* Shared memory support */ +struct page *linux_shmem_read_mapping_page_gfp(vm_object_t obj, int pindex, + gfp_t gfp); +struct linux_file *linux_shmem_file_setup(const char *name, loff_t size, + unsigned long flags); +void linux_shmem_truncate_range(vm_object_t obj, loff_t lstart, + loff_t lend); #define shmem_read_mapping_page(...) \ linux_shmem_read_mapping_page_gfp(__VA_ARGS__, 0) From nobody Wed Dec 13 18:28:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr3s94kYsz54823; Wed, 13 Dec 2023 18:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sr3s93Lgsz4JwH; Wed, 13 Dec 2023 18:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7C69hAWCk0SEoYAq1yVhVnNqPtIddz0VNQz8hZjvd5A=; b=L4cJxJOGxrMXC5MoyV1NKlBLlbtqXdeBCVQ/tPQwFpC23r8TwxEWb58Q7wnHS9D3OOzmij k/2Nzktr8caMwvfCIU8FEWMMk6pkCM0nnQD8NcHMStlCyabRyvmFEaLrdW59/fy519iPxD ae6wZTDJH488skUshuoHnFqMOT+xnXbi1hzEVAjRt3xJs6qGy0G2goCufGAcJlbnvaK0gV X9sL+0L3nDk2vySDMubD55wrTXjEDv3IFqZrccsXyxmOgYqhf2ahBVvgy3aEoG7kQ+acPu 1xvi2Sq24881celvthoAtkdPhiW/BMlME7Cv51RsTg9t2uIHQDu2k15umA/vGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492125; a=rsa-sha256; cv=none; b=Qo3j/XxyWWcJ2qXvYVx5FmQxyqgTMLSptesM3VmAxRC9qui2itH8hJyQru+u27/1R3F3ro qNebI2As3xREEC8//liKTa5qOIsxU5k9jLxf2lKDjL7P02bced24nUV+/SnuJZPpWuFHp5 itA1hpOeVfk6y7ZVj8tE0Kt58p4SjJHH//eZYIDYKrxTVBWzZ13iReKTr4iyTjS8rfmpZ/ /mNanVPXpwGx6eHvKnkNWaAkvdo8qugY5R2bgqXvfMMUc3NBTYDP8hz1ZPy1FxW9MgbFUm sIXlhSBR/RN7dWaIU8XeWok2Hd4eZR1P6zYJrcSmAbD7JN8yRh/qRebmWEReVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7C69hAWCk0SEoYAq1yVhVnNqPtIddz0VNQz8hZjvd5A=; b=MS840PfblFvyemYVBj6S8dBO4xUOOvdjwXvjKQ1YEWayccNIP0Wfv3MGsbI6mNOzUoeF6k Xuslc2zaDkxmaPBTELB6sf0apyaEIWAm60zUM9hTITpx5dK9o93VWJLrDiOVMDq1RmKouc zTFCHHUHfw9mCnU9Nk9dFx2It9djRYwJkLejn/V8/3p8mbklrjiEcTcHgPgBDg1/1pkdiZ 2712Qf4qjHd2xDyuNwMwu9TTME9Qm7pfWnj7LZXdiN3Hf0yLkJegMCDP9FI44IdNxzHMOz pt76U6nxVVFpqU8pcTYN9tNwfPJ63Dynp5Q0mFal8EECqvpP5pXRFnK8/dagXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr3s92SMBz18Qr; Wed, 13 Dec 2023 18:28: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 3BDISj2r018935; Wed, 13 Dec 2023 18:28:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISjcm018932; Wed, 13 Dec 2023 18:28:45 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:45 GMT Message-Id: <202312131828.3BDISjcm018932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 80446fc7b5e5 - main - linuxkpi: Move `struct kobject` code to `linux_kobject.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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 commit 80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 17:58:03 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Move `struct kobject` code to `linux_kobject.c` [Why] `linux_compat.c` is already too long. I will need to add `struct kset` in a follow-up commit, so let's move the existing `struct kobject` code to its own file. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43019 --- sys/compat/linuxkpi/common/include/linux/kobject.h | 2 + sys/compat/linuxkpi/common/src/linux_compat.c | 190 ------------------ sys/compat/linuxkpi/common/src/linux_kobject.c | 221 +++++++++++++++++++++ sys/conf/files | 2 + sys/modules/linuxkpi/Makefile | 1 + 5 files changed, 226 insertions(+), 190 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kobject.h b/sys/compat/linuxkpi/common/include/linux/kobject.h index 6e59e0952d62..06d71faaa873 100644 --- a/sys/compat/linuxkpi/common/include/linux/kobject.h +++ b/sys/compat/linuxkpi/common/include/linux/kobject.h @@ -154,4 +154,6 @@ kobject_uevent_env(struct kobject *kobj, int action, char *envp[]) */ } +void linux_kobject_kfree_name(struct kobject *kobj); + #endif /* _LINUXKPI_LINUX_KOBJECT_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index b913ae602ab3..a493dc2538ec 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -159,176 +159,6 @@ RB_GENERATE(linux_root, rb_node, __entry, panic_cmp); INTERVAL_TREE_DEFINE(struct interval_tree_node, rb, unsigned long,, START, LAST,, lkpi_interval_tree) -struct kobject * -kobject_create(void) -{ - struct kobject *kobj; - - kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); - if (kobj == NULL) - return (NULL); - kobject_init(kobj, &linux_kfree_type); - - return (kobj); -} - - -int -kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args) -{ - va_list tmp_va; - int len; - char *old; - char *name; - char dummy; - - old = kobj->name; - - if (old && fmt == NULL) - return (0); - - /* compute length of string */ - va_copy(tmp_va, args); - len = vsnprintf(&dummy, 0, fmt, tmp_va); - va_end(tmp_va); - - /* account for zero termination */ - len++; - - /* check for error */ - if (len < 1) - return (-EINVAL); - - /* allocate memory for string */ - name = kzalloc(len, GFP_KERNEL); - if (name == NULL) - return (-ENOMEM); - vsnprintf(name, len, fmt, args); - kobj->name = name; - - /* free old string */ - kfree(old); - - /* filter new string */ - for (; *name != '\0'; name++) - if (*name == '/') - *name = '!'; - return (0); -} - -int -kobject_set_name(struct kobject *kobj, const char *fmt, ...) -{ - va_list args; - int error; - - va_start(args, fmt); - error = kobject_set_name_vargs(kobj, fmt, args); - va_end(args); - - return (error); -} - -static int -kobject_add_complete(struct kobject *kobj, struct kobject *parent) -{ - const struct kobj_type *t; - int error; - - kobj->parent = parent; - error = sysfs_create_dir(kobj); - if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { - struct attribute **attr; - t = kobj->ktype; - - for (attr = t->default_attrs; *attr != NULL; attr++) { - error = sysfs_create_file(kobj, *attr); - if (error) - break; - } - if (error) - sysfs_remove_dir(kobj); - } - return (error); -} - -int -kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) -{ - va_list args; - int error; - - va_start(args, fmt); - error = kobject_set_name_vargs(kobj, fmt, args); - va_end(args); - if (error) - return (error); - - return kobject_add_complete(kobj, parent); -} - -void -linux_kobject_release(struct kref *kref) -{ - struct kobject *kobj; - char *name; - - kobj = container_of(kref, struct kobject, kref); - sysfs_remove_dir(kobj); - name = kobj->name; - if (kobj->ktype && kobj->ktype->release) - kobj->ktype->release(kobj); - kfree(name); -} - -static void -linux_kobject_kfree(struct kobject *kobj) -{ - kfree(kobj); -} - -static void -linux_kobject_kfree_name(struct kobject *kobj) -{ - if (kobj) { - kfree(kobj->name); - } -} - -const struct kobj_type linux_kfree_type = { - .release = linux_kobject_kfree -}; - -static ssize_t -lkpi_kobj_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) -{ - struct kobj_attribute *ka = - container_of(attr, struct kobj_attribute, attr); - - if (ka->show == NULL) - return (-EIO); - - return (ka->show(kobj, ka, buf)); -} - -static ssize_t -lkpi_kobj_attr_store(struct kobject *kobj, struct attribute *attr, - const char *buf, size_t count) -{ - struct kobj_attribute *ka = - container_of(attr, struct kobj_attribute, attr); - - if (ka->store == NULL) - return (-EIO); - - return (ka->store(kobj, ka, buf, count)); -} - -const struct sysfs_ops kobj_sysfs_ops = { - .show = lkpi_kobj_attr_show, - .store = lkpi_kobj_attr_store, -}; - static void linux_device_release(struct device *dev) { @@ -518,26 +348,6 @@ class_create(struct module *owner, const char *name) return (class); } -int -kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, - struct kobject *parent, const char *fmt, ...) -{ - va_list args; - int error; - - kobject_init(kobj, ktype); - kobj->ktype = ktype; - kobj->parent = parent; - kobj->name = NULL; - - va_start(args, fmt); - error = kobject_set_name_vargs(kobj, fmt, args); - va_end(args); - if (error) - return (error); - return kobject_add_complete(kobj, parent); -} - static void linux_kq_lock(void *arg) { diff --git a/sys/compat/linuxkpi/common/src/linux_kobject.c b/sys/compat/linuxkpi/common/src/linux_kobject.c new file mode 100644 index 000000000000..ddd0a58660f1 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_kobject.c @@ -0,0 +1,221 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2021 Mellanox Technologies, Ltd. + * 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 + +struct kobject * +kobject_create(void) +{ + struct kobject *kobj; + + kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); + if (kobj == NULL) + return (NULL); + kobject_init(kobj, &linux_kfree_type); + + return (kobj); +} + + +int +kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args) +{ + va_list tmp_va; + int len; + char *old; + char *name; + char dummy; + + old = kobj->name; + + if (old && fmt == NULL) + return (0); + + /* compute length of string */ + va_copy(tmp_va, args); + len = vsnprintf(&dummy, 0, fmt, tmp_va); + va_end(tmp_va); + + /* account for zero termination */ + len++; + + /* check for error */ + if (len < 1) + return (-EINVAL); + + /* allocate memory for string */ + name = kzalloc(len, GFP_KERNEL); + if (name == NULL) + return (-ENOMEM); + vsnprintf(name, len, fmt, args); + kobj->name = name; + + /* free old string */ + kfree(old); + + /* filter new string */ + for (; *name != '\0'; name++) + if (*name == '/') + *name = '!'; + return (0); +} + +int +kobject_set_name(struct kobject *kobj, const char *fmt, ...) +{ + va_list args; + int error; + + va_start(args, fmt); + error = kobject_set_name_vargs(kobj, fmt, args); + va_end(args); + + return (error); +} + +static int +kobject_add_complete(struct kobject *kobj, struct kobject *parent) +{ + const struct kobj_type *t; + int error; + + kobj->parent = parent; + error = sysfs_create_dir(kobj); + if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { + struct attribute **attr; + t = kobj->ktype; + + for (attr = t->default_attrs; *attr != NULL; attr++) { + error = sysfs_create_file(kobj, *attr); + if (error) + break; + } + if (error) + sysfs_remove_dir(kobj); + } + return (error); +} + +int +kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) +{ + va_list args; + int error; + + va_start(args, fmt); + error = kobject_set_name_vargs(kobj, fmt, args); + va_end(args); + if (error) + return (error); + + return kobject_add_complete(kobj, parent); +} + +int +kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, + struct kobject *parent, const char *fmt, ...) +{ + va_list args; + int error; + + kobject_init(kobj, ktype); + kobj->ktype = ktype; + kobj->parent = parent; + kobj->name = NULL; + + va_start(args, fmt); + error = kobject_set_name_vargs(kobj, fmt, args); + va_end(args); + if (error) + return (error); + return kobject_add_complete(kobj, parent); +} + +void +linux_kobject_release(struct kref *kref) +{ + struct kobject *kobj; + char *name; + + kobj = container_of(kref, struct kobject, kref); + sysfs_remove_dir(kobj); + name = kobj->name; + if (kobj->ktype && kobj->ktype->release) + kobj->ktype->release(kobj); + kfree(name); +} + +static void +linux_kobject_kfree(struct kobject *kobj) +{ + kfree(kobj); +} + +const struct kobj_type linux_kfree_type = { + .release = linux_kobject_kfree +}; + +void +linux_kobject_kfree_name(struct kobject *kobj) +{ + if (kobj) { + kfree(kobj->name); + } +} + +static ssize_t +lkpi_kobj_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) +{ + struct kobj_attribute *ka = + container_of(attr, struct kobj_attribute, attr); + + if (ka->show == NULL) + return (-EIO); + + return (ka->show(kobj, ka, buf)); +} + +static ssize_t +lkpi_kobj_attr_store(struct kobject *kobj, struct attribute *attr, + const char *buf, size_t count) +{ + struct kobj_attribute *ka = + container_of(attr, struct kobj_attribute, attr); + + if (ka->store == NULL) + return (-EIO); + + return (ka->store(kobj, ka, buf, count)); +} + +const struct sysfs_ops kobj_sysfs_ops = { + .show = lkpi_kobj_attr_show, + .store = lkpi_kobj_attr_store, +}; diff --git a/sys/conf/files b/sys/conf/files index 377d65926462..bf951d789de3 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4567,6 +4567,8 @@ compat/linuxkpi/common/src/linux_i2cbb.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_interrupt.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_kobject.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_lock.c optional compat_linuxkpi \ diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index bf40d64de9df..692f69c1f4e1 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -14,6 +14,7 @@ SRCS= linux_compat.c \ linux_i2c.c \ linux_i2cbb.c \ linux_kmod.c \ + linux_kobject.c \ linux_kthread.c \ linux_lock.c \ linux_netdev.c \ From nobody Wed Dec 13 18:28:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr3sB4b2Yz547lR; Wed, 13 Dec 2023 18:28: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 4Sr3sB3wgWz4K6L; Wed, 13 Dec 2023 18:28:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64aO1NzkJtEZr4pRYm4JV7M6MM8NM3gwZEZUNvdWMFM=; b=F/MuJrdW/LFj64l+OLssLyipNLpQzminTn2zDEfEmDCUH9cZ9PEaP65y1oawkREIJrJUa7 fXGXIQS6ZQn3/cO9Y57zWYrQ3i2Y6NHWbJgFs291RbW4Bx8r09vvRp8GEuUhw3UnXhZcbK GtoAlGMpInwZZKugE6R+pt2TxFAFa4X7KFniugjYTPGmOZMvXP4vFRK7evrbS08Hxw/s1Z neNmcDtw0+OJ9BvPZAAYGOjzmqf8llJX3NgeU9gpRtgCnFh8TGAFHShRuBTC7+b7LHsJ4R JgBMunuBLgsDEmLlUVFvM1mSolUmBvxjOoL+4PGyl3OEMbL6kRd8RdMVZde92A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492126; a=rsa-sha256; cv=none; b=lEaOkQPjisFtyZOmySSzv5E7si1e0ndby38F7YcWQiig5Rxzd7xpMBzQFxeKCFnrBt31VW 4gyaV431XAz4AxY3eYcZICul0NGOWO9MW2zX1r99zob517xCp20zEmK3bxkMQsOsDR4fh1 H4kvrCYZB6XvTPa5xJanepN4ZWDnaav5uwHNleSAP353TLV75Zaa5QQtS8OfqZ0J3UzKCk It+WwH9Ot2syS0vIJ5gbaKZFTt4qtNZuZWUDkTgjzRzUqGISMyP951jZUWBYUtaOEFC90Q hHsMz0vqZKiidKlY1+FPU010F/vbp29TiNyUPkzRqpTcjU6WWflG+yyzKB+m+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64aO1NzkJtEZr4pRYm4JV7M6MM8NM3gwZEZUNvdWMFM=; b=ohdf7XEEoqkQkzNNawBHM6cjDAIaQecHou9gRjFOs36so0i1saBVQWJ8TXBb4iLH0RgwFY PemYrZm42eWNMjBA8mqVrEfac8S+BoClp7LMDYXM3T0/nwq5Oii0yNaHF7sN8VrLhwIho/ CAMxYOgIDNjm672ieY8C2ifw9cTkrNHtPQ5jbkhFjlYYxYQyuos92XeQWndom9PdwZSWU8 G7ifINpBOlkAsOEC8vXT9GJsmeuKi92zAAYFSWmHhdodqI2y6JL0wl2J1PvNP2U8dNFKRD oUD7E9Nus4EbPynpjYy7QqvzH6BikGAwaCMm+Zm+ZbxqGxbvEPTEBoRuDQFkeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr3sB32mgz18Nj; Wed, 13 Dec 2023 18:28: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 3BDISkes018983; Wed, 13 Dec 2023 18:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISk3w018980; Wed, 13 Dec 2023 18:28:46 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:46 GMT Message-Id: <202312131828.3BDISk3w018980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: b723bcd05a99 - main - linuxkpi: Add `list_for_each_prev_safe()` in List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b723bcd05a991d446491e914f2b9f35e66227398 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=b723bcd05a991d446491e914f2b9f35e66227398 commit b723bcd05a991d446491e914f2b9f35e66227398 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:53:21 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Add `list_for_each_prev_safe()` in [Why] The amdgpu DRM driver started to use it in Linux 5.18. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43021 --- sys/compat/linuxkpi/common/include/linux/list.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index a27abedc55b0..ca103a670109 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -225,6 +225,11 @@ list_del_init(struct list_head *entry) #define list_for_each_prev(p, h) for (p = (h)->prev; p != (h); p = (p)->prev) +#define list_for_each_prev_safe(p, n, h) \ + for (p = (h)->prev, n = (p)->prev; \ + p != (h); \ + p = n, n = (p)->prev) + #define list_for_each_entry_from_reverse(p, h, field) \ for (; &p->field != (h); \ p = list_prev_entry(p, field)) From nobody Wed Dec 13 18:28:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr3sC58G0z548CJ; Wed, 13 Dec 2023 18:28: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 4Sr3sC4hw2z4K2b; Wed, 13 Dec 2023 18:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xy/n48wNGMsDpSUXEj2UeuVsrbg6DyA/1aDoSgbWYsc=; b=tPEh0hbaw94giot4DZyWYOmWo1MzdzqINw5MsLPRgcW37412IRXASRp7SQWnveI9Mmw4wl FiReKeqxbdWVbd52q+y1aeF00npUyB7EkLQvjFG/obfKa94Jw+Vdfr2C554/qhk2Wkb+eP y5+R1cosVXdJITdWzhz1VvCiixjyqkPPzFB+keVO+hlv4ssObdC92Bw1SBmQrIR7xrEBWP nBc0OL49+lz7xRTfV5nxmkwtJNvNEkcTXV2wpvB4ng8kma0A/PZ21SR9/DxUtkhGhoebM5 8hvjQ5MwXEfRA5qNnlxTfeVKVWFq4tRkf8w67sf/kSjD1KBRAA9qSbpZmKV6Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492127; a=rsa-sha256; cv=none; b=xK3hFbqKoUNI3+ydRyw0mLEafZI2HAunTm/XMxe3ilNsm5aj7lB/fdz3QkZRQrMp8CDLAD bJGrCyzUmDRq+k9aezd8c4uCNAt5DcA/pwZwm5SfkPpYlxUx9UF7bfLS2Y/DB69bi/iQlT J5JCLW0AfAeq6+jnG5qqE+hG3/P6+LmpXldKgywkE5/1/kpz1mLUcUNDUsOCC4YkjnzRDv js4wneN+EcPaMi2ah6cGDJ5HOTvpaaqg7SdUazB5ZHY5Au7vBqAzOhQ55cEYzPzY7g+zaM YhDvMewDsaBOpxRtL7V8oZb7XgO0qIxTpdMQrBCTyPDat2LtpvbqlMPt9GEznA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xy/n48wNGMsDpSUXEj2UeuVsrbg6DyA/1aDoSgbWYsc=; b=iPBdP4aE6NWbkC/YCfp1e0S2DyXbaCJsldXv9d9Y5/IAoc8M0aPHdtiSyKWBue2xll9Tay Fdtrf5VFHi/V9X+73r3rVF2AKLcVTosi18PSG8+EcECACxFF82eL7g/+ummQxpQFmkLg/8 5oJkwc/dFTD36qv+QGO/3qmfwXJ2KhXqdgOpQcCG9aEwIzsnatONbkQFrMA5+rrXyE116S Jaq0JD0+fe5iDhXre04kgwgrHOrQ34hlKZcC0FQDgiGI7iy73+s8bra8fHiXOKcT2a5dYY ujWqTKFga0iml5QD9ZklF8zeihGG7MFO4fMck31OCqclNvl3jEWZL//kCiRHMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr3sC3ng3z18Nk; Wed, 13 Dec 2023 18:28: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 3BDISlYK019037; Wed, 13 Dec 2023 18:28:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISllg019034; Wed, 13 Dec 2023 18:28:47 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:47 GMT Message-Id: <202312131828.3BDISllg019034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 509707e8b6b7 - main - linuxkpi: Add `sysfs_create_link()` in List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 509707e8b6b7326c7f4793b6e291f0a8e6939412 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=509707e8b6b7326c7f4793b6e291f0a8e6939412 commit 509707e8b6b7326c7f4793b6e291f0a8e6939412 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:54:29 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Add `sysfs_create_link()` in [Why] The amdgpu DRM driver started to use it in Linux 5.18. [How] The function is a no-op as I'm not sure how to implement this with sysctls yet. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43022 --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 3dc1a18fdbd3..8b4160453a3a 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -152,6 +152,15 @@ sysfs_remove_file(struct kobject *kobj, const struct attribute *attr) sysctl_remove_name(kobj->oidp, attr->name, 1, 1); } +static inline int +sysfs_create_link(struct kobject *kobj __unused, + struct kobject *target __unused, const char *name __unused) +{ + /* TODO */ + + return (0); +} + static inline int sysfs_create_files(struct kobject *kobj, const struct attribute * const *attrs) { From nobody Wed Dec 13 18:28:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr3sD6JWtz547n7; Wed, 13 Dec 2023 18:28: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 4Sr3sD5lzfz4KNb; Wed, 13 Dec 2023 18:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iQBjgfs+tnpgJBL0E4cRIeSE//vjUqx4KMSwrut6p/M=; b=YBJ0zKRJkNwefP82zy9cEBJbs9KNnSH8xgz56kCcG0EHlzaNf1vItHt8jVvcR8gpaOg58e NFsNIcpA7lWjHfeGXSqwRRS9M4xZQJnmjs6J0g9fmQDhV+tWVADDqoMiNfsavFp7IwbtTH K3lxB+8kEW65fxJ5g745Yx8o/32Plbb7p2XMHz8xYFuW3ZnfVqtKRnTo0H3FZuQE8E7XXj F1gpzOyCN6pKm+5TCej5iy7nPH+1W8jqCKM2uJc8AA4+lGBkt493d2j1ZtCz+29P8dckz7 BeDPVbKcvBBXWpcitPxYyQ/nfATdprMVS4+Kdy1PcXfZuJLUJasKG6wpew3Vkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492128; a=rsa-sha256; cv=none; b=AX85JFjxxqh09C0AXYxuuKVK+I/9U4JzUgdQt+ufmPa5Po6vniHz8ljiZH5kMH8gEBVaaR pmrJgzsjZyQ5FC6uPCze1wr6ZgPEyXtdDvkOjTgYorFIAzPESAvpyojuUS4J4ytR8wWuKy muQHkYb4tjndPdzr89WnAfUdlZAN618eGWScEriOBQrerlbiJpO5AKif5BH7NCBPLbWBqg Z8ETb2biLdTEDWb3lrQ4wgCpaV49V3gxusioOo2GtM8Yy06IMlDzGfBKtqk/qdTVEupYZa 7UKPURBkxA/gw6J5nVsd1UfCg3OV7wrcyNgd0NTuL0wfQ0vNVDt8RnAINp72cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iQBjgfs+tnpgJBL0E4cRIeSE//vjUqx4KMSwrut6p/M=; b=eeEfyosiQgG49xltLueur6Fls83AtoDdrWdxPUeHVGUwTIvy+rFP0gF/yufTx2zL/7MOd+ zZIo6EJeOdYH/Wb4SynXdSaz8FTiUD09SzqhSw7fwchKSqbcfp5u6RQXvjDCXvxrTC1qoP J26aVF9VWYJXd6wavx7knkSJ+mdT8jTl43PnpGHjAXTesQ37yfXfjy3Q2b2Phbvoct7Bff uppwmaN+swYk5Hz5POs5OUnttFuojxXdYWcFHZwFr/HyaGokycYnY5EwycTvuUCWT5MHEp VpNE4mprzUmNFlhkN77t5OQgbjrx4odekHzVqmDvI4g8hUZnIG5xynobwsml4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr3sD4s1Gz189F; Wed, 13 Dec 2023 18:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BDISmh7019087; Wed, 13 Dec 2023 18:28:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISmSp019083; Wed, 13 Dec 2023 18:28:48 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:48 GMT Message-Id: <202312131828.3BDISmSp019083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: d752a5e82ac9 - main - linuxkpi: Fix `__ATTR_RO()` in List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d752a5e82ac92603fadf82e7de75878e1f5d054a Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=d752a5e82ac92603fadf82e7de75878e1f5d054a commit d752a5e82ac92603fadf82e7de75878e1f5d054a Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:57:24 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Fix `__ATTR_RO()` in [Why] The passed structure may not have a `.store` field. This is the case in the amdgpu DRM driver starting with Linux 5.18. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43023 --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 8b4160453a3a..4a65095d9eb1 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -54,7 +54,10 @@ struct attribute_group { .attr = { .name = __stringify(_name), .mode = _mode }, \ .show = _show, .store = _store, \ } -#define __ATTR_RO(_name) __ATTR(_name, 0444, _name##_show, NULL) +#define __ATTR_RO(_name) { \ + .attr = { .name = __stringify(_name), .mode = 0444 }, \ + .show = _name##_show, \ +} #define __ATTR_WO(_name) __ATTR(_name, 0200, NULL, _name##_store) #define __ATTR_RW(_name) __ATTR(_name, 0644, _name##_show, _name##_store) #define __ATTR_NULL { .attr = { .name = NULL } } From nobody Wed Dec 13 18:28:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr3sG02PBz5484Z; Wed, 13 Dec 2023 18:28: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 4Sr3sF6ZDqz4K5W; Wed, 13 Dec 2023 18:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FhqmJH25/tRpx/oyfDNIndiGsuYuMlOkJJ8S3NJvN4k=; b=nn+Vc8BWtlV845XnvLX7p4KgJFMl1F5b6Me5cmdVt+AIvbz34EazSKQsTMn5ygGJEXzMJa PEe23XGMgADOzNBJakpwa/fAFabj71W7kSFndM81+zOCAhGhXI/gDaMAg4rVQCGY4H1/LL //Bq3o0lzWB6cVZKJ379d+hDGsSyu/VaDbsi53Ym4oXFaQp3RmIHYVzP1AxVAt8cOy0UN9 lsHGKaOd5nVj8ze0EUOZCYk1srp4vnXNkOzaGE9psE38EGwEhpTOP18Ggp1+QpeEDXQZsZ rHZ6r8Fb+ygyVHCiawkWj5XO6GjFOntmvSEPx7jObQ9mH3ph9Vc5UMaEexUpXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492129; a=rsa-sha256; cv=none; b=YcYYUOeaZWv9Ozrdud1WpMxtkOcE/TWmuNm2VuoD2XOVppNxtlvz8Lmm+ORVLRdny8y6SN Ionh32honUF6iUdJQ/C4UCpjXHYWtRFKOfRvyk1EuvkDN9oCG5TGGR5lWYbl3eS1R0qYRs O8Ooo1ILzXC3BocW6GjNRaasfwkGuIFoK/jT5lo8XjCPgWGK5PRdbp+8rKUNa5CqWm4Z4b OF0M9VoPUgt9pliaxpnKB2Zhv65v86IiFL7/vN/xOGW37AhPiSDzB23rMA0TFj3RmSKxGk XETUExu/QTwGq+UyYC43Z/wZ53RyTS3hpAFI6kgDF8ImVEsN1Svl4hoDF7Vgzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FhqmJH25/tRpx/oyfDNIndiGsuYuMlOkJJ8S3NJvN4k=; b=XyYy5ck6Ny/STvYWIFkG8Hyhp4AUP758HQVG9ZB2/r42w5e8s17bt6Tn2ct4BDwO0R7Lcm fltivLo2DsZ4dMA75pftH3P5mrIrapIhMil7SWBXV582a0r4nLEcImMQOBVtWeYiLZAySh GPsA1hUiVm3bJuvG7aagKqqe5diWPnidL3wlRKPlRUqwOIfwl9BkUCs+7V3lVOmINMUIA4 ZbRo/8OdrMDS0fwkCQxmGRVK6CC/GZCcMJpbiaX2AgbCFaF6OHRs0BIC71WPBpVgh6L3Rn EvMTHhj1KqRgz8nna7NnYHmsBTApHdmhUdfKWgCQwlBj9XPXgTuQW5fEgjwRpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr3sF5g29z18Qs; Wed, 13 Dec 2023 18:28: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 3BDISnsK019142; Wed, 13 Dec 2023 18:28:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISnlt019139; Wed, 13 Dec 2023 18:28:49 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:49 GMT Message-Id: <202312131828.3BDISnlt019139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: b30637c100f1 - main - linuxkpi: Add
--000000000000721b8e060c6b5315-- From nobody Wed Dec 13 22:58:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sr9s41Gknz54S1g for ; Wed, 13 Dec 2023 22:59:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) (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 4Sr9s31bB0z3ZMf for ; Wed, 13 Dec 2023 22:59:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-50bf32c0140so8537369e87.1 for ; Wed, 13 Dec 2023 14:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1702508342; x=1703113142; 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=QwzC3p8gDcgx4daDAByeEdJND6vuhGQ0qSnAGbKYgoc=; b=kuKve9BzVVwXvI04GYuH0/HAVfXhmtdDL4V1xod58G/izjahp6kEJHmyOJGjgUqxMc B9DIVWKUnGYVl5phzE59qS3g8+CBvqpYO+xEuTC/YqJo3jAvHZ4OGj2AYuGNE4xzFyPT ovWTvQe+5Bb0i6UGn8FxpmO9GtBPbFwS+Tt+TD9YgBiAeAfby7XM6HR8AV4bVSWnxlq5 Vz0ldAUX7lEKMH8VurWpqpKmO3LzYoJZa5w+JHM9eRDSn4dusnxPeRTVjC0cSGRigm0u qEiuJPiXajssdsnfFZP8+QIKRE4uOY7y3g7VySjA4bAn5aOifu3DJUa27mwZqBYuhfyf ShXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702508342; x=1703113142; 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=QwzC3p8gDcgx4daDAByeEdJND6vuhGQ0qSnAGbKYgoc=; b=HZflod5ARrxk/n09t6VvulI3fdgeeGsVsbRX27qHGu9v5IqaKW/smsToKPlB2WjybN yKH5Sw7UXVvaTOMnKjx4MHy2hKb00mAlSqNWcme7WJMhGJ6mrA+lOkMdvNlpSkP7Pd85 JYNl8j4ksOaEZsqA73hcGil+Dyt8o7qhO3Dl0dtldUGwVwO4YVHmwfYGY6mDx4Sn3ZEY G/JZc70gfRj/l0vjYkKgeFC8/QcS1QaZH0jldpjf7DEs/p2NpAJFIKU5P6nBaQy0KJLm Pp+rNrJpEXrs5ONoFeEmHpFEc9/E7C2glnhRnWDhgLyKxiaZlcK5z30/4Ki+fkW0Z6tz Qrww== X-Gm-Message-State: AOJu0Yz4HxN9lyIyMcTi66C6gw3GPXGUwDev331WicHElynPfgyNfj1j Xm9KM3ov4SrmeOXst8ujNQh8udr0K3z1+3NNIFqk1A== X-Google-Smtp-Source: AGHT+IFBRyJtvTiJqJseB+OB6J7CG25QzTl/P+8Pp/m3LSTBtZl7rtpgDAH3HP3Fgmy7O7Whh1JYJqpiiLIm/Ga5BSE= X-Received: by 2002:a05:6512:b26:b0:50c:180:2156 with SMTP id w38-20020a0565120b2600b0050c01802156mr5120370lfu.7.1702508341721; Wed, 13 Dec 2023 14:59:01 -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: <202312070550.3B75o8WV066387@gitrepo.freebsd.org> <389AB29C-D5C0-4091-91ED-219F33351B35@freebsd.org> <20231207222716.obSthG6r@steffen%sdaoden.eu> <20231208010731.3hijmSTL@steffen%sdaoden.eu> <20231208171712.nWToJe0v@steffen%sdaoden.eu> In-Reply-To: From: Warner Losh Date: Wed, 13 Dec 2023 15:58:50 -0700 Message-ID: Subject: Re: git: b1c95af45488 - main - rc.conf: correct $ntp_leapfile_sources To: Xin LI Cc: FreeBSD Security Team , Xin Li , Philip Paeps , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000ef95a7060c6c1ca6" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Sr9s31bB0z3ZMf --000000000000ef95a7060c6c1ca6 Content-Type: text/plain; charset="UTF-8" On Wed, Dec 13, 2023, 3:02 PM Xin LI wrote: > Hi! > > I've written a draft errata at > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275419#c27 . > > The commits to address the issue are: > > 832c63f5e07e6f960d051747ccb4358695a393ec > Updated > list (14: 2acec38b91fdf8520ca1ca6aebbde5c527040d14 > 13: b1d3826ededc09b271bef8aa9dae6a838ab05c8d) > 3b3195f6767b39eb33b3523134ef988931c9c86d > Don't > download without ntpd (14: 52369c5d29f5f291bfc98270cf13768633abe322 13: > 3ef596c6e80562710da09c16558d7351749ea143) > b1c95af45488bef649e9a84890e2414ff80b3a00 > Changed > to download IANA location > > Have we decided to go with the IANA location? If so we should include > philip's change above too. > IANA location is fine. This file is really only used as a backup when ntpd hasn't learned the truth from upstream ntp severs Warner I think we should issue an EN for at least the first two so FreeBSD systems > won't go to IETF until ~mid 2024. Can someone (other from myself :) from > secteam@ help with the actual EN process? > > Cheers, > --000000000000ef95a7060c6c1ca6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Dec 13, 2023, 3:02 PM Xin LI <delphij@gmail.com> wrote:
Hi!


The commits=C2=A0to ad= dress the issue are:

832c63f5e07e6f960d051747ccb4358695a393ec=C2=A0Updated list=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0(14: 2acec38b91fd= f8520ca1ca6aebbde5c527040d14 13:=C2=A0b1d3826ededc09b271bef8aa9dae6a838ab05= c8d)
3b3195f6= 767b39eb33b3523134ef988931c9c86d=C2=A0Don't download without ntpd (= 14:=C2=A052369c5d29f5f291bfc98270cf13768633abe322 13: 3ef596c6e80562710da09= c16558d7351749ea143)
b1c95af45488bef649e9a84890e2414ff80b3a00=C2=A0Changed to downlo= ad IANA location

Have we decided to go with the IANA location?= =C2=A0 If so we should include philip's change above too.

IANA l= ocation is fine. This file is really only used as a backup when ntpd hasn&#= 39;t learned the truth from upstream ntp severs=C2=A0

Warner

I think we should issue an EN for at least the first two so FreeBS= D systems won't go to IETF until ~mid 2024.=C2=A0 Can someone (other fr= om myself :) from secteam@ help with the actual EN process?

Cheers,<= /div>
--000000000000ef95a7060c6c1ca6-- From nobody Wed Dec 13 23:34:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrBf32n7mz54TYR; Wed, 13 Dec 2023 23:34: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 4SrBf32Bnyz4CnH; Wed, 13 Dec 2023 23:34:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702510475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DR3hM2rkSxUMdwCSc5hRRbQxo5FlqIDYdyI+pV3rkts=; b=aUVwP6uZ7S4g/OKK3H9l47fPaJUxX/0cAUWxe7DmVZy2GCVowfOtpJuFBWZ86dwmw0WprS dQh23xVNcyLcoJczumqP73+b8aRpLq0ESYDK7X5fL3mOavdaPl54w7eprMMNwOJynMu4q0 FQ9iDVHiQptnL1Rl67I+vHYsp9F6jroTmxqsO4228kk+miURQZNQtZw9Dd+5p2a3SmSjFp 5VFcrIO/3PRp2W0rppOd+UyA2inWad2wqcb3pe7AWz5OB3KIkD/7WntDsTPXOW/E+R1tI0 f6/CyYXYXg18xqk28aQo8dRpFugnuZ+F5IxG74FjZcjzD4NYMXoXkoYLaworSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702510475; a=rsa-sha256; cv=none; b=PbcO5Zrs+xrIxxZAf0mxhB2Qs4S2xLLknyZgQmMdldUqXN7PcfRFl0IVQhFvaCjhq2FII9 6oUd99VTUWfZWDZ49N/0dXVFS3helAMun/xJbmQ4nAPewWcIKnnXSbsuUWRqVeFn+M2wE3 wjlM0icwUeNNBBD+U9hw+uB2ltTNpbJG7LyXNrf0KsYPQ2FDefsFha8YlhgT8207811QQd 8bQKuAiXsm59N6swzo+1uFA6RI5qcXeAhO6TqyarumH7kOaIVpPZjJkZE8DReg/drhVvGc 7SYezUxR+rhcwCj5kRht3WYZmQbaGTYY+nEdTAtE6iTYIepCCMWbn2x8FOYyxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702510475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DR3hM2rkSxUMdwCSc5hRRbQxo5FlqIDYdyI+pV3rkts=; b=gdn6uakZHT14WTWolmFdxmZosu1d1LWFqppSXdBAE8FjktuFdBAjtgg7QFlUf5H9V+myIt D+M3251Hi7TXMrt89oWE9ktpkmdyx5cGHlYK/6reMlqfqoGdXIEXIQwdo2KnItVclV0ClI bjOEdVl8gOt3x0JojoqnQ+39IwJjPpof1rS/Nf6Lt1di7OyRAx1MIx9gblGUEX+taQXMfi b6psO90KXFqKmfnCT6GHKN30wsEyTDt6TR/i4IUtewiMxEeagH64wv1atTgdL7Ik+2LnpC hePOfRXYvdW75b1RAv9mhroMurXNb0swHVxh8yWoqrVl68SIzNYOMNT0BUNK3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrBf311Gpz1J9f; Wed, 13 Dec 2023 23:34: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 3BDNYYZD041714; Wed, 13 Dec 2023 23:34:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNYYTs041711; Wed, 13 Dec 2023 23:34:34 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:34:34 GMT Message-Id: <202312132334.3BDNYYTs041711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d3a8e9b43b4c - main - cp: Add tests for symbolic link case. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d3a8e9b43b4cef5b80e3845dfa8fd1fec6e568f9 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d3a8e9b43b4cef5b80e3845dfa8fd1fec6e568f9 commit d3a8e9b43b4cef5b80e3845dfa8fd1fec6e568f9 Author: Dag-Erling Smørgrav AuthorDate: 2023-12-13 23:33:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-13 23:33:37 +0000 cp: Add tests for symbolic link case. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D43054 --- bin/cp/tests/cp_test.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh index 52f33c93d31a..a9e419bb39a9 100755 --- a/bin/cp/tests/cp_test.sh +++ b/bin/cp/tests/cp_test.sh @@ -322,6 +322,34 @@ standalone_Pflag_body() atf_check -o inline:'Symbolic Link\n' stat -f %SHT baz } +atf_test_case symlink +symlink_body() +{ + echo "foo" >foo + atf_check cp -s foo bar + atf_check -o inline:"foo\n" cat bar + atf_check -o inline:"foo\n" readlink bar +} + +atf_test_case symlink_exists +symlink_exists_body() +{ + echo "foo" >foo + echo "bar" >bar + atf_check -s not-exit:0 -e match:exists cp -s foo bar + atf_check -o inline:"bar\n" cat bar +} + +atf_test_case symlink_exists_force +symlink_exists_force_body() +{ + echo "foo" >foo + echo "bar" >bar + atf_check cp -fs foo bar + atf_check -o inline:"foo\n" cat bar + atf_check -o inline:"foo\n" readlink bar +} + atf_init_test_cases() { atf_add_test_case basic @@ -343,4 +371,7 @@ atf_init_test_cases() atf_add_test_case sparse_to_dev atf_add_test_case sparse_trailing_hole atf_add_test_case standalone_Pflag + atf_add_test_case symlink + atf_add_test_case symlink_exists + atf_add_test_case symlink_exists_force } From nobody Wed Dec 13 23:41:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrBpZ3jvqz54VC1; Wed, 13 Dec 2023 23:41: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 4SrBpZ3F7Wz4D8r; Wed, 13 Dec 2023 23:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702510918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+e0b6uG/YkbIYQqtC8POkLXxg0uzdgBvMTTxprq6fQ=; b=DXQ/7voEis7mykEzHkXaewZjibiaTCr/YvyFGKpqrDtXYvG5CdvIJhzfk+Z99+1cas4Od4 hgtvPQ+/IXUAd0/WlhU73xX6aDAgFmMOvsGPeAZMDlOoHusxaWAQdlHD7nSMgdzpR1C0/f D/GCtv6tipcM5eAgqeKVUajJnsuI3FfqTgqZnIsptOwJv0bJUp5biKC/FXtuUeW3gA84dM 1A60UgjYJ+5MtgByMBQyrEFeY67vxwbdrmOE5U7rZ95WDZoRqWi/Io5s3Ec4QndS4h3Pkb tmE7qbRrTq3OZl7s8fOIfd/kh+noAU/6052UQDZSL17MwGiOSYOlCEm0PiSVYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702510918; a=rsa-sha256; cv=none; b=ogWQWjOPK4wLLGfaaYxmqO84EGE2XKyGF2ZRZp+vN/QqlJz9mJ+hQIVyy9ZOO5j73360PC tl15VjGWV1hcO7S+tDDmCSR/Z1h9JRBvtStCsaGbusXQBD09NHVjiwVBE/FK+PTYFULrME NdyzIf3tChIxsTIVkqFNmAof8pSzvcwekHbFC0s+dpampGRD0jkJlyB8/XaNGp1udBvauf +2UN71a+HR/Jp6X1UmDU/nldL175WakqjothrLCQCl0pdLCw+UACAwHq2mQIN7jZ72WYhD f7VZXb2y2kmsomi6Kf0q1OfSSeJNIM368A4V1QbbYdScOqPKS7eaNs8lhwx/Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702510918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+e0b6uG/YkbIYQqtC8POkLXxg0uzdgBvMTTxprq6fQ=; b=RJ31u3avEmVPT7x0KDCwazA/GwMDy0I+PUCB29FY+IZyTJutSxzj315MMOxYdKTvJ1aqLI sQd9QGwIt+IQjsCVdKrBUApo/7yZ0wR7Oru5WOJt0tZufCd9Z3gYUeAbAlP+ffkfajsAGk YfF1JI4SHNqIBPFaPDH3ZenoldZfBaujvIAjuqNBWQgvmmttbuxhf4DdbPKrRutgVF+feb bTXJeePWEUgw+XPGjzpgYlGUew4I3WKfEZVQDoI+hjPW0MJGxmp7Q0s+2wMIwMZ0hNl9qx gwhAtXf5ZWgbgkcjsldJceDFAzh0O2/ExhKN3Ex2rsfg9SSG1I0Vpgm2BeSCMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrBpZ2Hq8z1JMq; Wed, 13 Dec 2023 23:41: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 3BDNfwZf057526; Wed, 13 Dec 2023 23:41:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNfwDU057523; Wed, 13 Dec 2023 23:41:58 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:41:58 GMT Message-Id: <202312132341.3BDNfwDU057523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d002316fd7bf - main - cp: Refactor the core logic. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d002316fd7bf0b359ea2f5518f3c10f6ad89a9ac Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d002316fd7bf0b359ea2f5518f3c10f6ad89a9ac commit d002316fd7bf0b359ea2f5518f3c10f6ad89a9ac Author: Dag-Erling Smørgrav AuthorDate: 2023-12-13 23:40:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-13 23:40:55 +0000 cp: Refactor the core logic. Rewrite `copy_file()` so the lflag and sflag are handled as early as possible instead of constantly checking that they're not set and then handling them at the end. This also opens the door to changing the failure logic at some future point (for instance, we might decide to fall back to copying if `errno` indicates that the file system does not support links). MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D43055 --- bin/cp/utils.c | 121 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 60 insertions(+), 61 deletions(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 3621c89dd2f2..891360604631 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -62,6 +62,11 @@ */ #define BUFSIZE_SMALL (MAXPHYS) +/* + * Prompt used in -i case. + */ +#define YESNO "(y/n [n]) " + static ssize_t copy_fallback(int from_fd, int to_fd) { @@ -119,7 +124,6 @@ copy_file(const FTSENT *entp, int dne) * modified by the umask.) */ if (!dne) { -#define YESNO "(y/n [n]) " if (nflag) { if (vflag) printf("%s not overwritten\n", to.p_path); @@ -139,70 +143,68 @@ copy_file(const FTSENT *entp, int dne) } if (fflag) { - /* - * Remove existing destination file name create a new - * file. - */ + /* remove existing destination file */ (void)unlink(to.p_path); - if (!lflag && !sflag) { - to_fd = open(to.p_path, - O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); - } - } else if (!lflag && !sflag) { - /* Overwrite existing destination file name. */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } - } else if (!lflag && !sflag) { + } + + rval = 0; + + if (lflag) { + if (link(entp->fts_path, to.p_path) != 0) { + warn("%s", to.p_path); + rval = 1; + } + goto done; + } + + if (sflag) { + if (symlink(entp->fts_path, to.p_path) != 0) { + warn("%s", to.p_path); + rval = 1; + } + goto done; + } + + if (!dne && !fflag) { + /* overwrite existing destination file */ + to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); + } else { + /* create new destination file */ to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, fs->st_mode & ~(S_ISUID | S_ISGID)); } - - if (!lflag && !sflag && to_fd == -1) { + if (to_fd == -1) { warn("%s", to.p_path); rval = 1; goto done; } - rval = 0; - - if (!lflag && !sflag) { - wtotal = 0; - do { - if (use_copy_file_range) { - wcount = copy_file_range(from_fd, NULL, - to_fd, NULL, SSIZE_MAX, 0); - if (wcount < 0 && errno == EINVAL) { - /* Prob a non-seekable FD */ - use_copy_file_range = 0; - } - } - if (!use_copy_file_range) { - wcount = copy_fallback(from_fd, to_fd); - } - wtotal += wcount; - if (info) { - info = 0; - (void)fprintf(stderr, - "%s -> %s %3d%%\n", - entp->fts_path, to.p_path, - cp_pct(wtotal, fs->st_size)); + wtotal = 0; + do { + if (use_copy_file_range) { + wcount = copy_file_range(from_fd, NULL, + to_fd, NULL, SSIZE_MAX, 0); + if (wcount < 0 && errno == EINVAL) { + /* probably a non-seekable descriptor */ + use_copy_file_range = 0; } - } while (wcount > 0); - if (wcount < 0) { - warn("%s", entp->fts_path); - rval = 1; } - } else if (lflag) { - if (link(entp->fts_path, to.p_path)) { - warn("%s", to.p_path); - rval = 1; + if (!use_copy_file_range) { + wcount = copy_fallback(from_fd, to_fd); } - } else if (sflag) { - if (symlink(entp->fts_path, to.p_path)) { - warn("%s", to.p_path); - rval = 1; + wtotal += wcount; + if (info) { + info = 0; + (void)fprintf(stderr, + "%s -> %s %3d%%\n", + entp->fts_path, to.p_path, + cp_pct(wtotal, fs->st_size)); } + } while (wcount > 0); + if (wcount < 0) { + warn("%s", entp->fts_path); + rval = 1; } /* @@ -211,16 +213,13 @@ copy_file(const FTSENT *entp, int dne) * or its contents might be irreplaceable. It would only be safe * to remove it if we created it and its length is 0. */ - - if (!lflag && !sflag) { - if (pflag && setfile(fs, to_fd)) - rval = 1; - if (pflag && preserve_fd_acls(from_fd, to_fd) != 0) - rval = 1; - if (close(to_fd)) { - warn("%s", to.p_path); - rval = 1; - } + if (pflag && setfile(fs, to_fd)) + rval = 1; + if (pflag && preserve_fd_acls(from_fd, to_fd) != 0) + rval = 1; + if (close(to_fd)) { + warn("%s", to.p_path); + rval = 1; } done: From nobody Wed Dec 13 23:55:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrC5d0yrlz54VyW; Wed, 13 Dec 2023 23:55:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SrC5c64lsz4FhR; Wed, 13 Dec 2023 23:55:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702511700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SiEwWKp1mzCvteHOo4FiniV6vmqqnluCt9v9RMREXxk=; b=vRt/dosvfQqNdOiNWA2EHXfBUqQixyCrd+ZEcu0yMcD5DuMB4f5exHtWtUt7MlAb2rRmij cJPdOh7SPq6f6mKGbNs6Ss3fcZjRE/sNRpjk5lX/D4WSkSlEWz+lDQwcsHtMpQMHH8PlHI MVzm9rxmmUxjQPY+yNY3NP04OkwehBt35SY0UkWHC2ax4i5Y1SRD3KvGd+c0uMLBZEru+6 cxN9idKu5NuAUiEK09sf7YHsaLNIklz0CtG4VhkLVIxkh8Zwopiaw7bCEnCkeZQJ6UOA1d au88I2+lvt8WQZPIsDa0kohPWpV3lqmZNZbUL/ygAcrslZJTCdyl8hxFHyNtVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702511700; a=rsa-sha256; cv=none; b=ZgErKOxQnzoq5elHmVSzxjEFsbE7r0N4rcMOZh+Yf3Vgp4Kdp/dk1vL6oaouB5FR8r0B46 2Fl7EVXRfsXHGMrZLtVUIhHa38LczKVWFpHk/w+Wwm2pGEqgQmAc26A0o6OP+RDDS+MgVt 1AsdFCLl1DbVIG4EavA7secstwAydKcrr32AGXbYg6NCkJ4qavwp7yvED2V8Lf7Gp3G7QI g+KBrwu0XQ5TZlobojnzSPmRJAqpWscKL0JjlZDDP/DIArcS3Zv/ShpvCKn6ZlI4pSKl+Y t8akZ6y8BVjtLoGjLRvbS4Bc19T32s0UdPj8BCcirBXP5u7LKkZOQ6GH5g4x5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702511700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SiEwWKp1mzCvteHOo4FiniV6vmqqnluCt9v9RMREXxk=; b=TMaCiGO8EQVQoyQcrMZc/b0NinS1bIFO2K166q+y1k2gaLzhkgE67jUKcVeSvGM8w0nFI7 NE/DOu0QKL0deqfCtZ1eBRJz9mDMGx6mOgVFkz1glez8PqCUSHT2cdTkiA1O67Cf3LeLYp DyjAguU3z6i4QX6UUILEnLSrwUQQcOv5Nlx4tCOQdx9Z6BRh0E8Bv5fQOvwlSUQ1+JgibD wTfUk8oBHqP6hzZZTYRPtbTRqJhS3ZHTOGLQiBnuYsKJV3wRws9rA8K3mrXs/kbFzyOHbF TEsuN+XegXigGhO1M3XaXTqec+WmULQ8v9J8FyprfQU6acSskbmhUA03DOGLVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrC5c579cz1JPH; Wed, 13 Dec 2023 23:55: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 3BDNt05w075453; Wed, 13 Dec 2023 23:55:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNt0so075450; Wed, 13 Dec 2023 23:55:00 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:55:00 GMT Message-Id: <202312132355.3BDNt0so075450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 59dba901f227 - main - bwn: remove unused ic_headroom List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59dba901f227420647e4856f03cb782a3375c220 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=59dba901f227420647e4856f03cb782a3375c220 commit 59dba901f227420647e4856f03cb782a3375c220 Author: Frank Hilgendorf AuthorDate: 2023-12-13 23:48:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-12-13 23:54:05 +0000 bwn: remove unused ic_headroom Unlike bwi(4), bwn(4) does not rely on ic_headroom (despite having it set) but splits the bwn_txhdr (first) segment into its own transaction. Remove ic_headroom to avoid net80211 troubles with not enough space in the mbuf around ieee80211_mbuf_adjust(). PR: 275616 MFC after: 3 days --- sys/dev/bwn/if_bwn.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index 501bcc1e958e..742ed63a92aa 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -808,8 +808,6 @@ bwn_attach_post(struct bwn_softc *sc) /* call MI attach routine. */ ieee80211_ifattach(ic); - ic->ic_headroom = sizeof(struct bwn_txhdr); - /* override default methods */ ic->ic_raw_xmit = bwn_raw_xmit; ic->ic_updateslot = bwn_updateslot; From nobody Thu Dec 14 00:01:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrCFN497rz54WBP; Thu, 14 Dec 2023 00:01:44 +0000 (UTC) (envelope-from philip@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 4SrCFN3jBPz4FtK; Thu, 14 Dec 2023 00:01:44 +0000 (UTC) (envelope-from philip@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512104; 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=3hkvf/YGUVQ+/UTQVJAJhL39eMaoPqgZX+82d3obuaQ=; b=tjYU5lOb94NU2NbZ3MzY1ulhYx2COzMq1NGnLSr6SG0k/3yXMmwtPC9yCcA+KloD+zG0Jk Irpd6bDZbUtGPofwWZfD461JGljRHuI3XpCRZ+f1siXzIyQxRAxV1taDczzJBjpR6fA6nQ b7a4pT1CSFeYjCcSCsaUV1FvPc88pItsJ4NOygltx9/hZjiv0fKAtv9fDZCnnJwRdsdjki LUXNrkpwnAaBRSHkfYmDrMAYbDsW/xV8bss+dIF83j2vTddKAU6Q/2k9h49ko/x4/JXDby GnwIAmK3JgP1Rvyd1lAxtvIl+jJ80BGYqd7rm0RWKjc1hDsbFXmDtfzaJPV0tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702512104; a=rsa-sha256; cv=none; b=pTD5ZpaLwA0iFCfKGjcmG1mDU4KHsuabtGAZyZdl805qJW5q60Z6k94Idro2679NFU5eKq hHtIYR7/UMUP8Bn3lVK9npV9nVNSKvmvP34Y+Eahy2oLkVAtPh4RpHtLdflPoefPBsocrO NHjA+WBagavlTEuB6sViVNBqi5eRt7WAjWF25uaX0n5dKxF/30TqkOwUItxx6vWi0qHax6 NdvXTpvVT2F/WmGYrngLtYmiTBsJ8x9UvxKt7DOJ3FzFx7Mj02VxbFwFSWPzVMXroGpVz6 kfCuC2N7UFWH78FZlyLsIjaPW3DyI4PAoFW5nE8/cG8L2gQDtjiMwATTGLIsHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512104; 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=3hkvf/YGUVQ+/UTQVJAJhL39eMaoPqgZX+82d3obuaQ=; b=J8ByQI9gVn6NVznKSr0E/pNjBhPtY9F9BkJ57kH/IA5rBLqaRkYQ/Af7I/MG8X1v7Cf7WB wXl1EAEP6/TOEag6XYzE2QH7TbVXPK1B8RAwIwKwyBt8MtA5C/Shv9mQYhRca65bvM/ktS xoaNG0eKgD7pR//3PLnqLUAaHFVFzXkqZ7A2BEk8CdhFL+5PNzhrQ5CoKaMzbipYRKHth1 GWIw+zWFtgwM2UhklV2R4cCngnqjEebLlvYQ51EsHfX2cS67JzbgyVnVhNqC+BJI6fiWO4 s8Yx19ORdhYPKJv43sjXLAC7yW9Ct57nGlToc68xVQyoS2E5w2cWz+aAFUcOiw== Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.3 with cipher TLS_AES_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: philip/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SrCFN2WXZzbn; Thu, 14 Dec 2023 00:01:44 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 2571027C005A; Wed, 13 Dec 2023 19:01:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 13 Dec 2023 19:01:44 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelkedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffokfgjfhggtgesthdtmhdtredttdenucfhrhhomheprfhhihhl ihhpucfrrggvphhsuceophhhihhlihhpsehfrhgvvggsshgurdhorhhgqeenucggtffrrg htthgvrhhnpedvheehkefghfeiteehteduudeuhfdvgeettdeihfffleeuteeggeetuddt tddufeenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidqudduieeivdeivdegkedqvdefhedukedttdekqdhphh hilhhipheppehfrhgvvggsshgurdhorhhgsehtrhhouhgslhgvrdhish X-ME-Proxy: Feedback-ID: ia691475d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Dec 2023 19:01:41 -0500 (EST) From: Philip Paeps To: Xin LI Cc: FreeBSD Security Team , Xin Li , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Warner Losh Subject: Re: git: b1c95af45488 - main - rc.conf: correct $ntp_leapfile_sources Date: Thu, 14 Dec 2023 08:01:38 +0800 X-Mailer: MailMate (1.14r6010) Message-ID: In-Reply-To: References: <202312070550.3B75o8WV066387@gitrepo.freebsd.org> <389AB29C-D5C0-4091-91ED-219F33351B35@freebsd.org> <20231207222716.obSthG6r@steffen%sdaoden.eu> <20231208010731.3hijmSTL@steffen%sdaoden.eu> <20231208171712.nWToJe0v@steffen%sdaoden.eu> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; format=flowed On 2023-12-14 06:02:28 (+0800), Xin LI wrote: > I've written a draft errata at > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275419#c27 . Thanks. I think it's worth doing an EN for this, but I'd rather do it when the IANA leap-seconds.list file is updated. Otherwise we'll get complaints from folks who have installed the EN but note their leap-seconds.list still complains of imminent / past expiry. Regardless of whether we do an EN, I do think we should do an announcement (possibly signed by security-officer@) that the imminent expiry of leap-seconds.list is not an actual problem. No leap second will be introduced at the end of 2023. > Have we decided to go with the IANA location? If so we should include > philip's change above too. I believe IANA Is the best upstream for leap-seconds.list. IERS is really authoritative but there are copyright concerns (no public domain in France). NIST's version has no copyright concerns but is only available over FTP (and it's 2023. > I think we should issue an EN for at least the first two so FreeBSD > systems > won't go to IETF until ~mid 2024. Can someone (other from myself :) > from > secteam@ help with the actual EN process? I'll pick this up. Thanks for the draft! Philip -- Philip Paeps Senior Reality Engineer Alternative Enterprises From nobody Thu Dec 14 00:02:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrCGk06Ttz54WS4; Thu, 14 Dec 2023 00:02:54 +0000 (UTC) (envelope-from bz@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 4SrCGj703Hz4GMk; Thu, 14 Dec 2023 00:02:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512173; 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=UOblTXyep7gynUOvTBDgNZ0mgxYwbMeoO9goGgDabWc=; b=YzfEI0mayNNOy69HqIChcw6Cy5cwhC5IYjDIqOt37tHauC3BYpVvCWobh41WsufhBUFPGP xE9lAq5Ukue1lPLHnL46GEybuTPFUnRHGBjBbTRKg6w31S4Mw1k4dQ2vQ0pJrKOXez0Ufj wiOzJr9g8E3HaMAwh+OtUvs/opdfltL/P+CmBRPqwWc08zQdYVwFRdTBkYffqTD57S9cGG FBtsjDhhEdICBHFGmZptA/d34PQVrl6rnR4U/tfuNzeouYnD6azE8JVq0PLT/q4ZlqoKmd j5TtmfZ9BpW/ulEnCwY4MI4l5QeU8VNh3vPQsV9Srz2DvCdOZQURrxaKtRAvwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702512173; a=rsa-sha256; cv=none; b=JE2DkBhqlkX6Kt/6MjdtP06FiYOGQ/luCMjZ3wkFtyv4n9pvMVivIV29Xq/q6Xz6bIhq5K L/rQ5VL8+8UeaO/LJzQJO709q/SlT0Ow4BfBlLKm77oWP0vXNzEW8myR+rqH0KbV2Dq6WX +zfy/KWxHEQwul34FY16p+rKnvdw1Tdkup7s2EU2yKy0+/Sg1lFr8WXX1kS7v/76QodQyQ a7MlTL9TiIjQ5r8i5nTxo86cPVNQd9hv939pY0P3GXpJPGIq4xx4sGBJt46GFlYBSk6VO3 gq6JLpfz3zMgcRQWUnlBCYVZqM28InwwFC1+qFQG3UJmcmoShpAsjgbDqMHltg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512173; 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=UOblTXyep7gynUOvTBDgNZ0mgxYwbMeoO9goGgDabWc=; b=SRmc19y2LKQDVA7cFcEf6WKu2goXViJAkopfaDllz0fUJxpgJDaghRic8/+1KsFyGHF5ow BRENVLivlZLm3a5IQvc86Tu9T2/k2xRQr/y9O2tpIRoCl+xQk90Ue7mkjePG/hj3D+AQxd 3XIs7ychbbZJqIpXhn0Z4UTJVkD7tAQ131h2blbJnGaHsA2hxWqe6ZK5BU8bpuw3KWxRO9 PNaPXnWomo89jpyNQ6kfFKp7wEeEFrpZsV2xMZ54kMZ02Dmllhbk2XmuUyMielhC7WhUf4 M17XS9o/GqlqvhbdmpI8X/x9BBrXFPxFeaC9shme0A/31akpb5Ynbk+LKZA2qw== Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SrCGj4qXbz16g; Thu, 14 Dec 2023 00:02:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 7872F8D4A213; Thu, 14 Dec 2023 00:02:50 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 274D92D029D7; Thu, 14 Dec 2023 00:02:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id wsKRS1jIHi7G; Thu, 14 Dec 2023 00:02:47 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A7E312D029D2; Thu, 14 Dec 2023 00:02:47 +0000 (UTC) Date: Thu, 14 Dec 2023 00:02:47 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Jean-S=C3=A9bastienP=C3=A9dron?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 80446fc7b5e5 - main - linuxkpi: Move `struct kobject` code to `linux_kobject.c` In-Reply-To: <202312131828.3BDISjcm018932@gitrepo.freebsd.org> Message-ID: <1p234o1s-555q-o818-8307-or6n2p874079@SerrOFQ.bet> References: <202312131828.3BDISjcm018932@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: 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/mixed; boundary="1098556516-354143444-1702512167=:54546" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-354143444-1702512167=:54546 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 13 Dec 2023, Jean-SébastienPédron wrote: > The branch main has been updated by dumbbell: > > URL: https://cgit.FreeBSD.org/src/commit/?id=80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 > > commit 80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 > Author: Jean-Sébastien Pédron > AuthorDate: 2023-12-08 17:58:03 +0000 > Commit: Jean-Sébastien Pédron > CommitDate: 2023-12-13 18:18:46 +0000 > > linuxkpi: Move `struct kobject` code to `linux_kobject.c` > > [Why] > `linux_compat.c` is already too long. I will need to add `struct kset` > in a follow-up commit, so let's move the existing `struct kobject` code > to its own file. > > Reviewed by: manu > Approved by: manu > Differential Revision: https://reviews.freebsd.org/D43019 > --- > sys/compat/linuxkpi/common/include/linux/kobject.h | 2 + > sys/compat/linuxkpi/common/src/linux_compat.c | 190 ------------------ > sys/compat/linuxkpi/common/src/linux_kobject.c | 221 +++++++++++++++++++++ > sys/conf/files | 2 + > sys/modules/linuxkpi/Makefile | 1 + > 5 files changed, 226 insertions(+), 190 deletions(-) > > diff --git a/sys/compat/linuxkpi/common/include/linux/kobject.h b/sys/compat/linuxkpi/common/include/linux/kobject.h > index 6e59e0952d62..06d71faaa873 100644 > --- a/sys/compat/linuxkpi/common/include/linux/kobject.h > +++ b/sys/compat/linuxkpi/common/include/linux/kobject.h > @@ -154,4 +154,6 @@ kobject_uevent_env(struct kobject *kobj, int action, char *envp[]) > */ > } > > +void linux_kobject_kfree_name(struct kobject *kobj); This is not part of the Linux KPI but an internal function? If so this should go into an internal header in the src/ directory? > #endif /* _LINUXKPI_LINUX_KOBJECT_H_ */ > diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c > index b913ae602ab3..a493dc2538ec 100644 > --- a/sys/compat/linuxkpi/common/src/linux_compat.c > +++ b/sys/compat/linuxkpi/common/src/linux_compat.c > @@ -159,176 +159,6 @@ RB_GENERATE(linux_root, rb_node, __entry, panic_cmp); > INTERVAL_TREE_DEFINE(struct interval_tree_node, rb, unsigned long,, START, > LAST,, lkpi_interval_tree) > > -struct kobject * > -kobject_create(void) > -{ > - struct kobject *kobj; > - > - kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); > - if (kobj == NULL) > - return (NULL); > - kobject_init(kobj, &linux_kfree_type); > - > - return (kobj); > -} > - > - > -int > -kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args) > -{ > - va_list tmp_va; > - int len; > - char *old; > - char *name; > - char dummy; > - > - old = kobj->name; > - > - if (old && fmt == NULL) > - return (0); > - > - /* compute length of string */ > - va_copy(tmp_va, args); > - len = vsnprintf(&dummy, 0, fmt, tmp_va); > - va_end(tmp_va); > - > - /* account for zero termination */ > - len++; > - > - /* check for error */ > - if (len < 1) > - return (-EINVAL); > - > - /* allocate memory for string */ > - name = kzalloc(len, GFP_KERNEL); > - if (name == NULL) > - return (-ENOMEM); > - vsnprintf(name, len, fmt, args); > - kobj->name = name; > - > - /* free old string */ > - kfree(old); > - > - /* filter new string */ > - for (; *name != '\0'; name++) > - if (*name == '/') > - *name = '!'; > - return (0); > -} > - > -int > -kobject_set_name(struct kobject *kobj, const char *fmt, ...) > -{ > - va_list args; > - int error; > - > - va_start(args, fmt); > - error = kobject_set_name_vargs(kobj, fmt, args); > - va_end(args); > - > - return (error); > -} > - > -static int > -kobject_add_complete(struct kobject *kobj, struct kobject *parent) > -{ > - const struct kobj_type *t; > - int error; > - > - kobj->parent = parent; > - error = sysfs_create_dir(kobj); > - if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { > - struct attribute **attr; > - t = kobj->ktype; > - > - for (attr = t->default_attrs; *attr != NULL; attr++) { > - error = sysfs_create_file(kobj, *attr); > - if (error) > - break; > - } > - if (error) > - sysfs_remove_dir(kobj); > - } > - return (error); > -} > - > -int > -kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) > -{ > - va_list args; > - int error; > - > - va_start(args, fmt); > - error = kobject_set_name_vargs(kobj, fmt, args); > - va_end(args); > - if (error) > - return (error); > - > - return kobject_add_complete(kobj, parent); > -} > - > -void > -linux_kobject_release(struct kref *kref) > -{ > - struct kobject *kobj; > - char *name; > - > - kobj = container_of(kref, struct kobject, kref); > - sysfs_remove_dir(kobj); > - name = kobj->name; > - if (kobj->ktype && kobj->ktype->release) > - kobj->ktype->release(kobj); > - kfree(name); > -} > - > -static void > -linux_kobject_kfree(struct kobject *kobj) > -{ > - kfree(kobj); > -} > - > -static void > -linux_kobject_kfree_name(struct kobject *kobj) > -{ > - if (kobj) { > - kfree(kobj->name); > - } > -} > - > -const struct kobj_type linux_kfree_type = { > - .release = linux_kobject_kfree > -}; > - > -static ssize_t > -lkpi_kobj_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) > -{ > - struct kobj_attribute *ka = > - container_of(attr, struct kobj_attribute, attr); > - > - if (ka->show == NULL) > - return (-EIO); > - > - return (ka->show(kobj, ka, buf)); > -} > - > -static ssize_t > -lkpi_kobj_attr_store(struct kobject *kobj, struct attribute *attr, > - const char *buf, size_t count) > -{ > - struct kobj_attribute *ka = > - container_of(attr, struct kobj_attribute, attr); > - > - if (ka->store == NULL) > - return (-EIO); > - > - return (ka->store(kobj, ka, buf, count)); > -} > - > -const struct sysfs_ops kobj_sysfs_ops = { > - .show = lkpi_kobj_attr_show, > - .store = lkpi_kobj_attr_store, > -}; > - > static void > linux_device_release(struct device *dev) > { > @@ -518,26 +348,6 @@ class_create(struct module *owner, const char *name) > return (class); > } > > -int > -kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, > - struct kobject *parent, const char *fmt, ...) > -{ > - va_list args; > - int error; > - > - kobject_init(kobj, ktype); > - kobj->ktype = ktype; > - kobj->parent = parent; > - kobj->name = NULL; > - > - va_start(args, fmt); > - error = kobject_set_name_vargs(kobj, fmt, args); > - va_end(args); > - if (error) > - return (error); > - return kobject_add_complete(kobj, parent); > -} > - > static void > linux_kq_lock(void *arg) > { > diff --git a/sys/compat/linuxkpi/common/src/linux_kobject.c b/sys/compat/linuxkpi/common/src/linux_kobject.c > new file mode 100644 > index 000000000000..ddd0a58660f1 > --- /dev/null > +++ b/sys/compat/linuxkpi/common/src/linux_kobject.c > @@ -0,0 +1,221 @@ > +/*- > + * Copyright (c) 2010 Isilon Systems, Inc. > + * Copyright (c) 2010 iX Systems, Inc. > + * Copyright (c) 2010 Panasas, Inc. > + * Copyright (c) 2013-2021 Mellanox Technologies, Ltd. > + * 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 > + > +struct kobject * > +kobject_create(void) > +{ > + struct kobject *kobj; > + > + kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); > + if (kobj == NULL) > + return (NULL); > + kobject_init(kobj, &linux_kfree_type); > + > + return (kobj); > +} > + > + > +int > +kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args) > +{ > + va_list tmp_va; > + int len; > + char *old; > + char *name; > + char dummy; > + > + old = kobj->name; > + > + if (old && fmt == NULL) > + return (0); > + > + /* compute length of string */ > + va_copy(tmp_va, args); > + len = vsnprintf(&dummy, 0, fmt, tmp_va); > + va_end(tmp_va); > + > + /* account for zero termination */ > + len++; > + > + /* check for error */ > + if (len < 1) > + return (-EINVAL); > + > + /* allocate memory for string */ > + name = kzalloc(len, GFP_KERNEL); > + if (name == NULL) > + return (-ENOMEM); > + vsnprintf(name, len, fmt, args); > + kobj->name = name; > + > + /* free old string */ > + kfree(old); > + > + /* filter new string */ > + for (; *name != '\0'; name++) > + if (*name == '/') > + *name = '!'; > + return (0); > +} > + > +int > +kobject_set_name(struct kobject *kobj, const char *fmt, ...) > +{ > + va_list args; > + int error; > + > + va_start(args, fmt); > + error = kobject_set_name_vargs(kobj, fmt, args); > + va_end(args); > + > + return (error); > +} > + > +static int > +kobject_add_complete(struct kobject *kobj, struct kobject *parent) > +{ > + const struct kobj_type *t; > + int error; > + > + kobj->parent = parent; > + error = sysfs_create_dir(kobj); > + if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { > + struct attribute **attr; > + t = kobj->ktype; > + > + for (attr = t->default_attrs; *attr != NULL; attr++) { > + error = sysfs_create_file(kobj, *attr); > + if (error) > + break; > + } > + if (error) > + sysfs_remove_dir(kobj); > + } > + return (error); > +} > + > +int > +kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) > +{ > + va_list args; > + int error; > + > + va_start(args, fmt); > + error = kobject_set_name_vargs(kobj, fmt, args); > + va_end(args); > + if (error) > + return (error); > + > + return kobject_add_complete(kobj, parent); > +} > + > +int > +kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, > + struct kobject *parent, const char *fmt, ...) > +{ > + va_list args; > + int error; > + > + kobject_init(kobj, ktype); > + kobj->ktype = ktype; > + kobj->parent = parent; > + kobj->name = NULL; > + > + va_start(args, fmt); > + error = kobject_set_name_vargs(kobj, fmt, args); > + va_end(args); > + if (error) > + return (error); > + return kobject_add_complete(kobj, parent); > +} > + > +void > +linux_kobject_release(struct kref *kref) > +{ > + struct kobject *kobj; > + char *name; > + > + kobj = container_of(kref, struct kobject, kref); > + sysfs_remove_dir(kobj); > + name = kobj->name; > + if (kobj->ktype && kobj->ktype->release) > + kobj->ktype->release(kobj); > + kfree(name); > +} > + > +static void > +linux_kobject_kfree(struct kobject *kobj) > +{ > + kfree(kobj); > +} > + > +const struct kobj_type linux_kfree_type = { > + .release = linux_kobject_kfree > +}; > + > +void > +linux_kobject_kfree_name(struct kobject *kobj) > +{ > + if (kobj) { > + kfree(kobj->name); > + } > +} > + > +static ssize_t > +lkpi_kobj_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) > +{ > + struct kobj_attribute *ka = > + container_of(attr, struct kobj_attribute, attr); > + > + if (ka->show == NULL) > + return (-EIO); > + > + return (ka->show(kobj, ka, buf)); > +} > + > +static ssize_t > +lkpi_kobj_attr_store(struct kobject *kobj, struct attribute *attr, > + const char *buf, size_t count) > +{ > + struct kobj_attribute *ka = > + container_of(attr, struct kobj_attribute, attr); > + > + if (ka->store == NULL) > + return (-EIO); > + > + return (ka->store(kobj, ka, buf, count)); > +} > + > +const struct sysfs_ops kobj_sysfs_ops = { > + .show = lkpi_kobj_attr_show, > + .store = lkpi_kobj_attr_store, > +}; > diff --git a/sys/conf/files b/sys/conf/files > index 377d65926462..bf951d789de3 100644 > --- a/sys/conf/files > +++ b/sys/conf/files > @@ -4567,6 +4567,8 @@ compat/linuxkpi/common/src/linux_i2cbb.c optional compat_linuxkpi \ > compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_interrupt.c optional compat_linuxkpi \ > compile-with "${LINUXKPI_C}" > +compat/linuxkpi/common/src/linux_kobject.c optional compat_linuxkpi \ > + compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ > compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_lock.c optional compat_linuxkpi \ > diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile > index bf40d64de9df..692f69c1f4e1 100644 > --- a/sys/modules/linuxkpi/Makefile > +++ b/sys/modules/linuxkpi/Makefile > @@ -14,6 +14,7 @@ SRCS= linux_compat.c \ > linux_i2c.c \ > linux_i2cbb.c \ > linux_kmod.c \ > + linux_kobject.c \ > linux_kthread.c \ > linux_lock.c \ > linux_netdev.c \ > -- Bjoern A. Zeeb r15:7 --1098556516-354143444-1702512167=:54546-- From nobody Thu Dec 14 00:06:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrCMJ3DdXz54WT7; Thu, 14 Dec 2023 00:06:52 +0000 (UTC) (envelope-from bz@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 4SrCMJ2gxfz4Gk3; Thu, 14 Dec 2023 00:06:52 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512412; 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=YrdSxXNSqK88CmCEw2kMoFwQ5Zz2nKu+nuRFbZb9FDU=; b=gForuEnnWpMEviEglQCZGOs7NMP3aJiRsV7Voc/4E8+LFbrcLiRBRAhO9/njM9Y4uj5LjF z4wbee4pircls1FVbGNlodyw5yfDGkNUm7qxiqsStxMZF/zrzikRxiTS/IFQyGUVx4RS+s kzldRehJDccnwOy0YxCYIFKzfmqWplGYbIGxiPI4mdggDJfUZo/TNSa9I/2/YH47sQAZHA 3m83F5MMOyqqeKWwLE9rLiW5W78XnV0sm0pmIgTDewZLQ/axPPj5Skku2yL8zLspw48VLe 8uIPSyurGJ53DP5JgwvZwoGApRGvAi+pMUDUdeeAeMI9fjI+fF0eB5kS+1Fhvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702512412; a=rsa-sha256; cv=none; b=o6QnDOlNItgcEszYqvKSlxNRbaedV8oVqiFtnFQByzKtiKYi+mV0fGXRPcZ1idVeZ56+OD opFjmHOcjZhbwgUAsFo9Ah/aCeoua3TUm9XPdmIxAAfx27Z9ZfUsUt3XM5ezBgaDmuhvjH SVgh9vzO5je00IzdBywgHqMl2GUJGBquEixGDvAKIv16jyIkhJxm8Yxb920CnIYNDnX+OU 1bcVOl28ef1yJtvfUV0U0as/gcDSe1QGSZNQk9IrrnMnPPps117acKgzBHLN4JXbHv0Hvl gYoW/Jus2msYdThdTd6oTKuoqJk7JCFTyqCAvrMmjraiGq7zsYkXK+ouGObj1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512412; 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=YrdSxXNSqK88CmCEw2kMoFwQ5Zz2nKu+nuRFbZb9FDU=; b=qvZjmHDZU5LjPz8scXlPiZTO+8TgAh+jfqX5VcNKlVDvbPtQlqBOZh0SsFjYxeu72iNt1n t3HLKWDjDXVJMQi6v52O4NkErSdul3Kee0R0w7BjOsXkdOdFWtb1xVZUCxRPTNVn/TsF59 W53ig6cHq2IU/QIaHlZ02LDwytYNqBBo0ViwaeIHzcNXiPPPO6ac3oX17xpu/oRHW++r2j gpN7aYUevaDPZML56+zjMR+UmpPjG5NLSxiVp8J1N+4Ohe6CTbmnMwo8ZrQgPbWt41ivLj WrcQCVpaBoYwSXU7HChSUVEEN2vpQlOkokvD/7TX6G+i4SgvFIt8+PU2M7C9OQ== Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SrCMJ0LyGz16h; Thu, 14 Dec 2023 00:06:52 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E329F8D4A162; Thu, 14 Dec 2023 00:06:50 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 8F9142D029D6; Thu, 14 Dec 2023 00:06:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id uVvgu2sJiH-P; Thu, 14 Dec 2023 00:06:49 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 4FE712D029D2; Thu, 14 Dec 2023 00:06:49 +0000 (UTC) Date: Thu, 14 Dec 2023 00:06:48 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Jean-S=C3=A9bastienP=C3=A9dron?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 509707e8b6b7 - main - linuxkpi: Add `sysfs_create_link()` in In-Reply-To: <202312131828.3BDISllg019034@gitrepo.freebsd.org> Message-ID: References: <202312131828.3BDISllg019034@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: 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/mixed; boundary="1098556516-735906049-1702512409=:54546" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-735906049-1702512409=:54546 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 13 Dec 2023, Jean-SébastienPédron wrote: > The branch main has been updated by dumbbell: > > URL: https://cgit.FreeBSD.org/src/commit/?id=509707e8b6b7326c7f4793b6e291f0a8e6939412 > > commit 509707e8b6b7326c7f4793b6e291f0a8e6939412 > Author: Jean-Sébastien Pédron > AuthorDate: 2023-12-08 21:54:29 +0000 > Commit: Jean-Sébastien Pédron > CommitDate: 2023-12-13 18:18:46 +0000 > > linuxkpi: Add `sysfs_create_link()` in > > [Why] > The amdgpu DRM driver started to use it in Linux 5.18. > > [How] > The function is a no-op as I'm not sure how to implement this with > sysctls yet. > > Reviewed by: manu > Approved by: manu > Differential Revision: https://reviews.freebsd.org/D43022 > --- > sys/compat/linuxkpi/common/include/linux/sysfs.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h > index 3dc1a18fdbd3..8b4160453a3a 100644 > --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h > +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h > @@ -152,6 +152,15 @@ sysfs_remove_file(struct kobject *kobj, const struct attribute *attr) > sysctl_remove_name(kobj->oidp, attr->name, 1, 1); > } > > +static inline int > +sysfs_create_link(struct kobject *kobj __unused, > + struct kobject *target __unused, const char *name __unused) > +{ > + /* TODO */ We've started to add these as pr_debug("%s: TODO\n", __func__); as that way they will at least show up if linuxkpi.debug is turned on rather than being silent NOPs. That said, is the link supposed to go away along with the "file" if removed or do both need to be removed independently? > + return (0); > +} > + > static inline int > sysfs_create_files(struct kobject *kobj, const struct attribute * const *attrs) > { > -- Bjoern A. Zeeb r15:7 --1098556516-735906049-1702512409=:54546-- From nobody Thu Dec 14 00:09:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrCQp3J4cz54WgC; Thu, 14 Dec 2023 00:09:54 +0000 (UTC) (envelope-from bz@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 4SrCQp2bqwz4H8w; Thu, 14 Dec 2023 00:09:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512594; 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=X7ITpZW7bYjchsIAqB2iuqWS4J3RcsaZgC6kPhxKYd4=; b=pv6n02SqdcVe+vo4osmPaH1ZiEt/i6yMU/d+tjV+KtTKO+EQySKSb6mXb63ewqrtx8kdTo vYmB7V2JUNaZzujiniJQwNG6pdoz9sadfUelSBFVr1i4VbalX0buQm+9wUKI6VVVhpD3yP TxJ+C+vdiBmj5LRSym4vuYSqqgJIbv5QENQ/GPghd8NEBy1s4t1lIgBjNd151xss5CEA8Q ZPJ6Ty6VK4slmXGCMiRQ1LJUFYcn+xhBvQThtd6JXRCpE1H5hAxqkORl1cfyeKoiexxbiR VItuAApt0+caxIUXRib25QEtPtijV4eMJ93nfsa2AnGvdiuhbqkbK6ffeJBmCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702512594; a=rsa-sha256; cv=none; b=Dq9UgzX1o7k2yHNyiGJn/Dr8if0o4rkP1TSXSh2BkZvKxviZ7QoQh10oaV6gTg85kXbsWE mqoeob+wKYM4DaqVMI5N+IkkQRfwvKU32EcQNSbnEi1noFjE1TMK7hIbBdwVWSNlej5H5+ e0iHH5E0zOg2x4vHlBSdruwBfI/Qgv4MJdBD3/rKX0DryRyaiKd2aGZt+R/gJxwufwLnNU qLYQvqaJWWU1YCY1mWDf8XCl5iKHRIqgX7QqhxH70MyPMzK20/5YPLe5yPVf4YFgr1UOVp J831rS+DGoZPQ63ACF9mL6K9F4QWZA/DDoyeLXh0ZXvvhsb5z7cXJa3PhoinXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512594; 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=X7ITpZW7bYjchsIAqB2iuqWS4J3RcsaZgC6kPhxKYd4=; b=qea91u/HO5zucXpzKIL/Aah4+BcnXnjIBLYeWe7Om+wN8RhCk/kTscUtPjA2TfpHyjrgvs UUqI6wbDJeLmWlJFJo25jYYBUXnK2xOd1Jjsua60BXDdfDeuTzRBYteaWMDMJ6ghhGLkYO 0Vup70WSrESNF9tXv4LUBXcQe4iwpAjPg5C1EU1CdQtIIOT3kDSCvOpzpap4U3fNIonD+d 0SAQs1ORz5mAz/eqiq5uhfc4Nc1Z0PKlvF+2LCb+/oyjsIdQVQ8cRtcsa6a1zKxOvM6Ra6 dvUtm200o3aU3ip8Cizd8je84qYUV2Ef+qsfzO9VTLs4e18PwWcuOUyq5ngy0Q== Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SrCQp03Hwzwy; Thu, 14 Dec 2023 00:09:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 42BAC8D4A162; Thu, 14 Dec 2023 00:09:52 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E25B42D029D6; Thu, 14 Dec 2023 00:09:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id KzZfr43RHmYY; Thu, 14 Dec 2023 00:09:50 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A8E082D029D2; Thu, 14 Dec 2023 00:09:50 +0000 (UTC) Date: Thu, 14 Dec 2023 00:09:50 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Jean-S=C3=A9bastienP=C3=A9dron?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 59cbead6b15f - main - linuxkpi: Add support for `suspend_noirq` callback in `struct dev_pm_ops` In-Reply-To: <202312131828.3BDISons019199@gitrepo.freebsd.org> Message-ID: <3rrqsr57-255q-pro4-5rn3-o725214q07n7@SerrOFQ.bet> References: <202312131828.3BDISons019199@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: 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/mixed; boundary="1098556516-716910007-1702512590=:54546" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-716910007-1702512590=:54546 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 13 Dec 2023, Jean-SébastienPédron wrote: > The branch main has been updated by dumbbell: > > URL: https://cgit.FreeBSD.org/src/commit/?id=59cbead6b15fd2320fa0a98dc680aef5d6e1438f > > commit 59cbead6b15fd2320fa0a98dc680aef5d6e1438f > Author: Jean-Sébastien Pédron > AuthorDate: 2023-12-09 16:24:20 +0000 > Commit: Jean-Sébastien Pédron > CommitDate: 2023-12-13 18:18:47 +0000 > > linuxkpi: Add support for `suspend_noirq` callback in `struct dev_pm_ops` > > [Why] > This callback is being used by the amdgpu DRM driver in Linux 5.18. > > [How] > The callback is called after `suspend_late()`. > > Reviewed by: emaste, manu > Approved by: emaste, manu > Differential Revision: https://reviews.freebsd.org/D43029 > --- > sys/compat/linuxkpi/common/include/linux/device.h | 1 + > sys/compat/linuxkpi/common/src/linux_pci.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h > index df06b356e092..7a5d813063a9 100644 > --- a/sys/compat/linuxkpi/common/include/linux/device.h > +++ b/sys/compat/linuxkpi/common/include/linux/device.h > @@ -81,6 +81,7 @@ struct dev_pm_ops { This struct is embedded in driver source code in struct pci_driver; that means all LinuxKPI based drivers need to be recompiled. In case you MFC please at least append at the end! > int (*poweroff_late)(struct device *dev); > int (*restore)(struct device *dev); > int (*restore_early)(struct device *dev); > + int (*suspend_noirq)(struct device *dev); > int (*runtime_suspend)(struct device *dev); > int (*runtime_resume)(struct device *dev); > int (*runtime_idle)(struct device *dev); > diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c > index 99750d5ced26..852cec9cdc94 100644 > --- a/sys/compat/linuxkpi/common/src/linux_pci.c > +++ b/sys/compat/linuxkpi/common/src/linux_pci.c > @@ -643,6 +643,8 @@ linux_pci_suspend(device_t dev) > error = -pmops->suspend(&pdev->dev); > if (error == 0 && pmops->suspend_late != NULL) > error = -pmops->suspend_late(&pdev->dev); > + if (error == 0 && pmops->suspend_noirq != NULL) > + error = -pmops->suspend_noirq(&pdev->dev); > } > return (error); > } > -- Bjoern A. Zeeb r15:7 --1098556516-716910007-1702512590=:54546-- From nobody Thu Dec 14 09:23:59 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrRk75HdMz53hg9; Thu, 14 Dec 2023 09:23: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 4SrRk74Sf4z4M7F; Thu, 14 Dec 2023 09:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702545839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=268jIA/ttsRePvMfS+pjVr8lrfPxOcQ2l1jAkBdb1CA=; b=OJ4Tfyshs5iYGstCun4wfK08egrJrPG83ggNOF4ekKvwfozoCXyZPOIKIXybhNgw8WuVpp bdQHDRyyo9AfRn8kHhz21j6HN9p5OmdVLEVmAKoO/5XvNRNz+K2Oq2IChpKkx05WzIdft4 tdEpXl7jk1fWFwg3wIFqspBMG+Jxr9C3pxmGzwFvs+ISMGXUzyio/C8lk50kjsX97RuG18 jyqRdxDMKJI0mcLtMHIeIJHGyTxnNWB7+8tpl//0jKI8b4WBK7Ic0IcGkR02XgEaG/Sl5b LfVcHIUmmQRyiCRUsvP6Faxc8eUFQtc65xC8d5vSNW1JkMgGr4K1U/wlo8ss0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702545839; a=rsa-sha256; cv=none; b=iQ2If0pffwEMvrxUoGO1ih2xD1BpyJinGIdACc/J9szPA8g0HKPIyYuTV4u9DEqGVZKH3n koYQVpXlmxMsfx0dztpDGY7LCZSpJ02b61l/ScWf7RU/IL2raNV0kuUSzQwkTAgz6ul7iK jaiA8/ndnruwdI6V+pIABX4XOstX/gqiU3UX9JGtGsMv2bKYL/SN2rfW49UDsNhVrZH2AA Pm/jcuiP0UoU1loPgy2GGIwsdXQ3dDiDuzfXF2aUA2Eyhgt+VEB+WSDpep4sAWzfaX01c2 XkVb3lq57HurBpgXxGq25OUG0N5rRB64CuM9N8zvN+Lu3KVmHwBThiyLjuH/tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702545839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=268jIA/ttsRePvMfS+pjVr8lrfPxOcQ2l1jAkBdb1CA=; b=xHnHhtNIx9H2IdUbfgajM9qn8n2xWsG1K29ZPLLep3mw3wVRPzYWSCLAwgMUZPaDYCQFwa /VYUvMpANli4+CWAZWZimfhXuikJtd3DBqu+hW1WwE8+vs/pSCjv2Z49lYNQJNgbuhUNez zkCO9wCAI1mPcB7EjgeoGzFiE3vHGzrejeRYlRTdeZoPJ6eU8f0d6TNCzgCed17yumD8CA M8cIj9xmoI5Kv7HL8opXGdc85uptYq4VYxk2qVULm8ply5sLBT8UBVc1kHehdoUQRlaDim dPnmOjquBjEJhcbQ5E9bWBMsEz3rW1WMyb1bvxKkjx5qprtBjZP5DLwlAQzQvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrRk723dwz6Q5; Thu, 14 Dec 2023 09:23: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 3BE9NxcV043227; Thu, 14 Dec 2023 09:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BE9Nxaj043224; Thu, 14 Dec 2023 09:23:59 GMT (envelope-from git) Date: Thu, 14 Dec 2023 09:23:59 GMT Message-Id: <202312140923.3BE9Nxaj043224@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: 8fab83d2c5c5 - main - pf tests: fix typos in the abort_v6 test case head / cleanup function name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 8fab83d2c5c5e801105dbf25c28252fc97935b00 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fab83d2c5c5e801105dbf25c28252fc97935b00 commit 8fab83d2c5c5e801105dbf25c28252fc97935b00 Author: Kristof Provost AuthorDate: 2023-12-14 09:22:26 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 09:23:41 +0000 pf tests: fix typos in the abort_v6 test case head / cleanup function name MFC after: 1 week --- tests/sys/netpfil/pf/sctp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 86356128bb7e..66225e132d1c 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -240,7 +240,7 @@ abort_v4_cleanup() } atf_test_case "abort_v6" "cleanup" -abort_v4_head() +abort_v6_head() { atf_set descr 'Test sending ABORT messages over IPv6' atf_set require.user root @@ -292,7 +292,7 @@ abort_v6_body() fi } -abort_v4_cleanup() +abort_v6_cleanup() { pft_cleanup } From nobody Thu Dec 14 16:07:28 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Srcgj0GXDz52gDg; Thu, 14 Dec 2023 16: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 4Srcgh6q0Mz3S8P; Thu, 14 Dec 2023 16:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFOPfsAaCRFaGtjicpHgLgNcfJMw0AuToOkzqw+lgFg=; b=NSZBbReG6NyaGd9J4+Z6CbFrjrl/OolfmQg54tWnQ+aDXzZFXSK/GClX/MKDq4+Ade72JD +tgIWYZdvu1xDeo9hzO+BBxH19Epnj2aTrQ+Ac9OthBPCl6A7Ycr1J2Fl2gmblOVHJwsi6 W4tSNfKM723IawNXarLO4hKPEypaQcILTxMuyxZM9QIQENUbAMLyOLuQzHlQl78l1txBQZ E/d6iF62koj+E6S2xR1jaJasV9TomlbjvsyCnqkxT1VzYSowNLFhRF6NN2j3jL+djeWvyQ o7CuSPrZj8OwhMDQ2n/CjqIkTZf06ZFI0Mx6rPvTAXijFcgXCgVKHEDCfS98pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702570049; a=rsa-sha256; cv=none; b=X8nQ+mjb7hGfoNr0UpA4nS5xLNEZ5TAQvSB31qI1LCoG4Qs5wZjR5reRX0QgDw2JytfNcT YlyZ/uVDXnf/u2g3AUvwC0+4b6Zl2YvSPHBX2A63R2z50Y2AEA28qRMmM1POtcIjOdxvJ4 YDyuczpAYtv8KG3NfsflaKZ6D0b3n2iPncI5ekxF0tf9P+klfhPaWNQk2mFmFywXb1mveK WZ1v6UZl+f4P8xDLd1WJ2l3qaNRPW7kChc6bmFEV72y8QyLKSOlutVX4hQfNO9WRrxcVYL G9b53YSQ5Dl7XGWyx/Y/nfGqMoYEB3/Oe4RjciuNTHUFLmTZUS+qIkWVAYpMWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFOPfsAaCRFaGtjicpHgLgNcfJMw0AuToOkzqw+lgFg=; b=X7r0VeWIVFBshe23tWhho3p6fy0soO5f3KNMZaTKXLWGZQogynJQM6IXbgmiA8wkR08TnN GV6ZZAtp03gfJ/QdPBjmWzICtdqFy1Foa7+m+A7TjgXWcw5lBPGVy6y2Nl27C/NVQPll5h WMLrrfn89LmaDeeymcSZ4AGGA03WSyx12CRY+D6EG2NNRPZDSObf9sr09XVpJ1zpzP2Jc3 UrP4vmwGXAeE6ebCPCeRpX2rBObv80kYuFyTAvb4nhWaruOqmTdEQ552pFntGjQe+L2Zr7 HSQiopqY1cbSoniV8WMkfqgJpxT4cJAHbZ+RPwCjtGgmq3er6/YRrKHsXgmx7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Srcgh5rJgzYr2; Thu, 14 Dec 2023 16:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BEG7ScZ015406; Thu, 14 Dec 2023 16:07:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEG7SdP015403; Thu, 14 Dec 2023 16:07:28 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:07:28 GMT Message-Id: <202312141607.3BEG7SdP015403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ac56b9d83c75 - main - cp: Split the basic_symlink test case in two. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac56b9d83c75f548667912ffe422be6bd4f5c27e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ac56b9d83c75f548667912ffe422be6bd4f5c27e commit ac56b9d83c75f548667912ffe422be6bd4f5c27e Author: Dag-Erling Smørgrav AuthorDate: 2023-12-14 16:06:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-14 16:06:57 +0000 cp: Split the basic_symlink test case in two. This test case tests two different things: first, that copying a symlink results in a file with the same contents as the target of the symlink, rather than a second symlink, and second, that cp will refuse to copy a file to itself, or to a link to itself, or a link to its target. Leave the first part in basic_symlink, move the second part to a new test case named samefile, and slightly expand both cases. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43062 --- bin/cp/tests/cp_test.sh | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh index a9e419bb39a9..397c06d75bbb 100755 --- a/bin/cp/tests/cp_test.sh +++ b/bin/cp/tests/cp_test.sh @@ -51,10 +51,7 @@ basic_symlink_body() atf_check cp baz foo atf_check test '!' -L foo - atf_check -e inline:"cp: baz and baz are identical (not copied).\n" \ - -s exit:1 cp baz baz - atf_check -e inline:"cp: bar and baz are identical (not copied).\n" \ - -s exit:1 cp baz bar + atf_check cmp foo bar } atf_test_case chrdev @@ -227,6 +224,22 @@ recursive_link_Lflag_body() '(' ! -L foo-mirror/foo/baz ')' } +atf_test_case samefile +samefile_body() +{ + echo "foo" >foo + ln foo bar + ln -s bar baz + atf_check -e match:"baz and baz are identical" \ + -s exit:1 cp baz baz + atf_check -e match:"bar and baz are identical" \ + -s exit:1 cp baz bar + atf_check -e match:"foo and baz are identical" \ + -s exit:1 cp baz foo + atf_check -e match:"bar and foo are identical" \ + -s exit:1 cp foo bar +} + file_is_sparse() { atf_check ${0%/*}/sparse "$1" @@ -234,7 +247,7 @@ file_is_sparse() files_are_equal() { - atf_check test "$(stat -f "%d %i" "$1")" != "$(stat -f "%d %i" "$2")" + atf_check_not_equal "$(stat -f%d,%i "$1")" "$(stat -f%d,%i "$2")" atf_check cmp "$1" "$2" } @@ -365,6 +378,7 @@ atf_init_test_cases() atf_add_test_case recursive_link_dflt atf_add_test_case recursive_link_Hflag atf_add_test_case recursive_link_Lflag + atf_add_test_case samefile atf_add_test_case sparse_leading_hole atf_add_test_case sparse_multiple_holes atf_add_test_case sparse_only_hole From nobody Thu Dec 14 16:07:29 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Srcgk10p4z52gVW; Thu, 14 Dec 2023 16:07:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Srcgk0NlWz3S6T; Thu, 14 Dec 2023 16:07:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayAvdkKsNaytsx0IT9PN6Qs3Njwe9+Bt1fQ3gUWr+/M=; b=WC7Gfs2C92sG+DGvaS2ufJ1dJGP0jgxmmR4kR6RnZKAJ/4Tib7vrOtkWKghBuZSBt/T4LL +Yl3HoIugNhL46H6yxSrnsu3QBQx4jaz+yDisT/cNNWkM8pu4j1CfSOB1rv7vQhzBUBqR5 CCLxrF5S3sxu3qaXnVMYNtRcRXkw8hGt3MXMiFryEeookZnNjCwIdwwzEMXsahcEE0oIu5 r0BsOsDFEQf3hpOeQ2qJa2ich1M6adExegb1gqH4YjutgDiaW+mP/Ek6j3suks8KIPFpFu TW/7xyP+jaNaYtzXAP9pYYDGwkplr7opvddtRjG3/MW0Xw3MLGZoGzcxZsmSYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702570050; a=rsa-sha256; cv=none; b=IthVqX2A6RE0O1/2YWwBf5WhaDqKCy1KVjFD6M3oisO9QFU/DtAfnB+tyzQWt+ZOc9g7f3 IIYKe6VsouFPpNY6BRc/myJFg2MkZGB5do1gHaKlMqdS9DU6RFGv+XXxuARpBouQ6il+J9 K5D5yMAyCWFqc2caGtzz69dPZVJNJpYVRk/upkayRQ81AbVlZfRgFbUq/0sRLDsP3jUpmC kiuFAYZEe9E1eswN2OZkja19zw0PC6gnmQlrUy5Q6qdQG7Zg8Ar6UOW+gXdglBhkX+4qW7 0iwq7WUsY77YxRpdC1AFJTTrv4QrVOPUgi8bg2vFRJEosHcd2x2aZ/bSGptHVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayAvdkKsNaytsx0IT9PN6Qs3Njwe9+Bt1fQ3gUWr+/M=; b=LBSzinH7nEyEU2+pLNiCXWasav7YnhJc65SzpMA5ukHaCnMMpc/f8pp6ZtJJK1u3DkiXXl Uaqbfho0+USBSRwXUzcwNTXhx80DhV+Om2sWVAnVId9dPJrJZCt6oHvkwfN2yXouCi3xwU l54RYwhFoe2E1D3K14Ph3xE8EH47TuyrATcxCzTLrAyLSMDK4MGuZW/7UfXyFaf89Yl5R0 HxN01DInFYaAFLdHJ6604QsVU33YQ3DjaIcPZaMCEUa0Na5Wew5CAeOFPaMCvfGbyw5kAX pFskCJI6DdTTozE0i68FCd6oKbf6ckGrUcz1IWfa1TYpXdKU0oWlZwG6rWKJAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Srcgj6bG3zZ9S; Thu, 14 Dec 2023 16: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 3BEG7TBx015457; Thu, 14 Dec 2023 16: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 3BEG7TsA015454; Thu, 14 Dec 2023 16:07:29 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:07:29 GMT Message-Id: <202312141607.3BEG7TsA015454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 0f4467ce444b - main - cp: Move the flags around a bit. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f4467ce444b201468d2268958130f495951ca3c Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=0f4467ce444b201468d2268958130f495951ca3c commit 0f4467ce444b201468d2268958130f495951ca3c Author: Dag-Erling Smørgrav AuthorDate: 2023-12-14 16:07:00 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-14 16:07:00 +0000 cp: Move the flags around a bit. - The HLPR flags are grouped together at the beginning because they are the standard flags for programs using FTS. Move the N flag out from among them to its correct place in the sequence. - The Pflag variable isn't used outside main(), but moving it out lets us skip initialization and keeps it with its friends H, L and R. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43063 --- bin/cp/cp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 78ded7af3d5a..1455979bdb6e 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -73,7 +73,7 @@ static char emptystring[] = ""; PATH_T to = { to.p_path, emptystring, "" }; int Nflag, fflag, iflag, lflag, nflag, pflag, sflag, vflag; -static int Hflag, Lflag, Rflag, rflag; +static int Hflag, Lflag, Pflag, Rflag, rflag; volatile sig_atomic_t info; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; @@ -86,12 +86,11 @@ main(int argc, char *argv[]) { struct stat to_stat, tmp_stat; enum op type; - int Pflag, ch, fts_options, r, have_trailing_slash; + int ch, fts_options, r, have_trailing_slash; char *target; fts_options = FTS_NOCHDIR | FTS_PHYSICAL; - Pflag = 0; - while ((ch = getopt(argc, argv, "HLNPRafilnprsvx")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilNnprsvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -101,9 +100,6 @@ main(int argc, char *argv[]) Lflag = 1; Hflag = Pflag = 0; break; - case 'N': - Nflag = 1; - break; case 'P': Pflag = 1; Hflag = Lflag = 0; @@ -128,6 +124,9 @@ main(int argc, char *argv[]) case 'l': lflag = 1; break; + case 'N': + Nflag = 1; + break; case 'n': nflag = 1; fflag = iflag = 0; From nobody Thu Dec 14 16:07:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Srcgl2WbRz52gSD; Thu, 14 Dec 2023 16:07:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Srcgl1dVSz3SCm; Thu, 14 Dec 2023 16:07:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ux45kw+913AzvG2CP2pjf9PecAPD/08C4IV47O3WwWc=; b=BuC2NAZqOD+uoejtKQqCrFaw4i0AQsXohoUu+ToGYEYoTWD0r+K4GiieuBC5J2oKceEOJE aRjucjOtJDTmaUYsd6/B64tzojMW57sCq8pixgzF/NGX3IUEMqs54Uvyr28cll6jc+oYh+ J2n4KyLzoxulliHZCCguUI8ExjK5zLQrBKA/o2MyBKcU0rRXdiJjDJuiAe/wpx2KjywBkF p/q9XWFENQ6MAC5ig8/kvZcq+x9nAEAyfR7DaD8o04tsPNucUh1uvABuiwldUHou8jdyw2 yqv58S247eL7TI3puhusfUjQoJX8LjPd7+G828ovxry00gHXeDFCLJ8+Cbq2eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702570051; a=rsa-sha256; cv=none; b=lCo0UnhsaKnqpqpdWesOo8qN2rrvY/FEQ2Q8+SugxV1FPQw1KAGz08CN6kv+ggimM9sEPJ 9XQ2tEIv+y6l/Y4dZEENP0jXz2ljUDZrtYPI2R8Vwo66ejxs5Yw2a0j7ZktXsp3mqrBQ0f rDSyaMGYDjqZ6oIUkAyJ6FQvxYOtMWGutOfGSE6u/2HFTDRKlHPCFKsLV/muNqUMvG6mJ+ dkbIJiCq9bl3w9sSk9PA9TkZDugHcuCicAkP82Ca6PiMwideMqtZMY5GZ380ffApXZoEH2 BJLanQPrDMbWtsSgKNSa+gT6cS13AD9V2/I8xVADBkkc3vWXnbOSDWbgDXOrBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ux45kw+913AzvG2CP2pjf9PecAPD/08C4IV47O3WwWc=; b=PhtrnpCoAi7WuT+4bBeWIXB9bVyVIEtfoWNGiYLtrk5QTL1LRG4GYXx9mWXpsFTUwj/kNK cHmhKTjWiBKfoJ9vGCHsPsyh41a/hxWjaPTdcrZHk/264kE0OjfnT+5JknSo/USFO9Bzr9 U48ZFeshzuhn70KQkh83lDoQyLjXEIUc3lX7wROPZujCkLwKqI3MXQwe2p3CmZi1R22rfr yX2XNiVcGHvl0sVBszq/PksJA2viqML221Cyswd/yrqvUiEAABb6EZ1GEKEHqMXiNjIDEJ 5zv/7yOh58r+m7bzB5uimbacshioXf0b56J0qROvf4zViGL3S2ArjzplXwsYig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Srcgl0kGRzZJs; Thu, 14 Dec 2023 16:07:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BEG7V05015505; Thu, 14 Dec 2023 16:07:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEG7VlU015502; Thu, 14 Dec 2023 16:07:31 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:07:31 GMT Message-Id: <202312141607.3BEG7VlU015502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 38509270663f - main - cp: Further simplify the core logic. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38509270663f336103273878cc8ddc88a225b9d8 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=38509270663f336103273878cc8ddc88a225b9d8 commit 38509270663f336103273878cc8ddc88a225b9d8 Author: Dag-Erling Smørgrav AuthorDate: 2023-12-14 16:07:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-14 16:07:04 +0000 cp: Further simplify the core logic. If the destination file exists but we decide unlink it, set the dne flag. This means we don't need to re-check the conditions that would have caused us to delete the file when we later need to decide whether to create or replace it. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43064 --- bin/cp/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 891360604631..80a0c1fce824 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -145,6 +145,7 @@ copy_file(const FTSENT *entp, int dne) if (fflag) { /* remove existing destination file */ (void)unlink(to.p_path); + dne = 1; } } @@ -166,7 +167,7 @@ copy_file(const FTSENT *entp, int dne) goto done; } - if (!dne && !fflag) { + if (!dne) { /* overwrite existing destination file */ to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } else { From nobody Thu Dec 14 16:44:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrdVK2nynz52jgf; Thu, 14 Dec 2023 16: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 4SrdVK2FGRz3Wcx; Thu, 14 Dec 2023 16: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=1702572265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VffTHOvYee6E5XVCKSMX04sQOy3ih3Zz0e2hualaPXk=; b=NE+NAdooaEkbBWyoOn8a2v8mflX/vPxWpD+zgTXGWETB5h8g2MGzJDb15EI8tzLeY/bBif qoLRb3BKTZFGQNTmYQrcII/YxFnlQV81+oh73J654DdQm4zfa+NQHrtTOvEBjtL9dA+Hbv WYun3eBHz6cOz15CcKwgNR7PKeR88Ez44lO6mJWHV12k+XDkTj7mCLHzeotladyhi3+M8X 8dMDkdn6swDAwfp8WOZ0K+PAYnD+Lie5e95pmsGeKxeTZOdMfKbwbZXUvChFWGHzozGume 7nq5oEJkB+NSkRgYJ5VKA1f8/RWleQVTztEvdwH3cFX2/4cjA3mG6VlA2woG4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702572265; a=rsa-sha256; cv=none; b=krT0re+n51PtNqx7Kze/JpTRwW3ig8EN+MHKL0N5wzGtYx24LZfKVKXSouqrLqPJW3qfgq ClFk8d26feWZYNEPrjZMoj+IUyzZMEG3m3uUzHmlUNs6XHL4GNsu/C+z5mTE4+GjMXzW+T bm04ayM2Qy7znIiKxcDPckD0i8LWeJ3caMmfyfizjtLHxwcFFiFuveKZBJgBfJZRLSlS3H 3Czwmqcwkij2me1ow763cuUWrjuJs4RqJ4gGVewh+CRhQxCdqHExqzrunYTvTmqT5CPrlB koaTT42PporeylS37d0yhbgr8nJAYzEJKktf/F3Ud0G7MUZzo227w6J8YMRncQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702572265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VffTHOvYee6E5XVCKSMX04sQOy3ih3Zz0e2hualaPXk=; b=Jt8xkaxfcZX7l/tZjen2s1Z7t31HYJy+1841V/O12+n/lwFIE/7M9BkNsOMMDlpK+XerI6 Af3ItfCveOU5l6bM/5joMOO327ZRa5mkBWSfO/uYLhL7P/gXQbP1yeRZGr2jgMm0yDPtdB 64CUjxvZ5H5iYG2mc6eUYwSA+/Ru32eBJlIC4BOjzWUGGayzk8TtHMkBTCpv2BIrPaeTe+ r6LmJjMBEZLWnhncAobkf50NJ4X4ufZ4ekPAM0xERwwVqhHmbVIzBId8jv4839FcIK2+Bz 2SjKeUU9UokhUzzeM3dp7ptZqFDTIZbslV6HcVUI4vco9ykcM/59fWucam4LVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrdVK1Jg0zbHy; Thu, 14 Dec 2023 16: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 3BEGiPQ6081449; Thu, 14 Dec 2023 16: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 3BEGiPoU081446; Thu, 14 Dec 2023 16:44:25 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:44:25 GMT Message-Id: <202312141644.3BEGiPoU081446@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: d1ce87ae0ddc - main - kldxref: Fix for 32-bit powerpc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: d1ce87ae0ddca413b098b6be8f5d3b4da87422ef Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=d1ce87ae0ddca413b098b6be8f5d3b4da87422ef commit d1ce87ae0ddca413b098b6be8f5d3b4da87422ef Author: Jessica Clarke AuthorDate: 2023-12-14 16:37:34 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 16:37:34 +0000 kldxref: Fix for 32-bit powerpc R_PPC_RELATIVE lost its 32-bit handling in the libelf conversion. Reported by: bapt Fixes: 0299afdff145 ("kldxref: Make use of libelf to be a portable cross tool") --- usr.sbin/kldxref/ef_powerpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/ef_powerpc.c b/usr.sbin/kldxref/ef_powerpc.c index 068c8117e4a6..ab33e170b488 100644 --- a/usr.sbin/kldxref/ef_powerpc.c +++ b/usr.sbin/kldxref/ef_powerpc.c @@ -69,7 +69,8 @@ ef_ppc_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le64enc(where, val); else be64enc(where, val); - } + } else + be32enc(where, val); break; case R_PPC_ADDR32: /* word32 S + A */ val = EF_SYMADDR(ef, symidx) + addend; From nobody Thu Dec 14 16:44:26 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrdVL4cd7z52jdm; Thu, 14 Dec 2023 16: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 4SrdVL3D1Kz3WtW; Thu, 14 Dec 2023 16: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=1702572266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=osltNOoweVh1AEfDgioYBPi+fVu0ZjiX4RDG1mJnNI8=; b=WqLkVIuUsDRmeIbk949qT+KRejwHgU0ObKNN180x4e6ATK5Jx/5uwOtUGZwmo+685hKZtM 2f0QPsJ39FRmaIVPZr/xAMkbK3EG8FAFNkkz/DMMP5E94KEM5C8yNMKztb8w0ERQ1XKvpq tB23MsT9a/yMHTQVKzCD+n/MvOQmuU2g4w/eOVm3Dn85Da7KnoFAV0FvzB8hVccJ32YLjn WAbyW4meN4UusDTCiVWAVHJC0cYvciMOyW4OUmxRgsjBQYo5GjkG74qjZNGd72C/bnaYbB QXXqpDfihLxL5gku7+HSjX4mM479DsF9fLSovNSeIJhQHcNTNbn5fvXfMr3wvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702572266; a=rsa-sha256; cv=none; b=hsmg4NGhtwgkV4VeIzkZNY0NLw6laqUxlRDauQ68nuuY7h/yAfKxcyG2INoZeB5dy6gtBH dY/cWe/FPdVSfSbWntzJgx0ELVn82l7S/N6UFc214F1GAaxahilT53St7Mi/0Z8/lSzWPM jBTjegdajDsyLGad5Y7rU7baIwk2OvsDWzZ0L8+5rAMhyyujkpQPE7k6N1ZLCsH532Qetc kkioSewVrpm82Gpb40t4e+boyQMi1TW9E7XhJnAHezMXk9PUeLaCnprX73ziiAJOcLZIkR Jv1Eo5NRkTDu0Anbp086PvHGSNRmUZ6jIx4tifWmr68iETG2kUeRNqCHSSF58w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702572266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=osltNOoweVh1AEfDgioYBPi+fVu0ZjiX4RDG1mJnNI8=; b=anJ3zVFjw/BpZ5XkzNKP46WClGwgMWp0yebCU7XxZsjvejsz9kRLWyq96eWt3pyWno1YKn fMRD14z/hQ1WP8Dj0bOfVXZtA1CdIMiWAv1zK6pfcUkkRzdNVvvixAWKNVTKwTtJecCd53 wy8SVmaODZCNfa4NKGGcjM2zxSB0D09a3Zn/wW524USFxFBdULlURnwdUdBoUb0Ep8ZZf2 e/uq8JTaQbOnWHlxqqNw+C68aCOqh/HFiHnURjIGPAEIS2PhXLS+ubQGBXiMtw15QSlubs 96voonPW776jt++amdIF0ZiMjcofHBnQBDNXXTxeJZWEJmoATwWPHcRFiv2dWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrdVL2435zbGK; Thu, 14 Dec 2023 16: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 3BEGiQWj081500; Thu, 14 Dec 2023 16: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 3BEGiQKZ081497; Thu, 14 Dec 2023 16:44:26 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:44:26 GMT Message-Id: <202312141644.3BEGiQKZ081497@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: 0840bdbf2a07 - main - Don't try and run kldxref for arm kernels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0840bdbf2a07b68e29267bc49057ca6df2351360 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=0840bdbf2a07b68e29267bc49057ca6df2351360 commit 0840bdbf2a07b68e29267bc49057ca6df2351360 Author: Jessica Clarke AuthorDate: 2023-12-14 16:40:08 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 16:40:08 +0000 Don't try and run kldxref for arm kernels Surprisingly, kldxref does not currently support arm, and unhelpfully this means it silently does nothing rather than give an error, so the linker.hints entry added to the METALOG for -DNO_ROOT builds (and pkgbase ones) refers to a file that doesn't exist. Ideally it would be supported (and ideally the METALOG handling would be less fragile, but without integrating it into kldxref the only real option would be to just run find(1) to get the list of linker.hints files, which feels a little backwards), but for now just paper over this by skipping the build step on arm. Reported by: bapt Fixes: ff7c12c1f17e ("Make kldxref a bootstrap tool and use unconditionally") --- sys/conf/kmod.mk | 3 ++- sys/modules/Makefile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 5d4dcd4371bc..4482034baf67 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -354,7 +354,8 @@ _kmodinstall: .PHONY .include -.if !defined(NO_XREF) +# XXX: kldxref lacks support for arm +.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm" afterinstall: _kldxref .ORDER: realinstall _kldxref .ORDER: _installlinks _kldxref diff --git a/sys/modules/Makefile b/sys/modules/Makefile index c14933eebda4..dc914946ff41 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -908,7 +908,8 @@ SUBDIR:= ${SUBDIR:N${reject}} .endif # MODULES_OVERRIDE -- Keep last # Calling kldxref(8) for each module is expensive. -.if !defined(NO_XREF) +# XXX: kldxref lacks support for arm +.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm" .MAKEFLAGS+= -DNO_XREF afterinstall: .PHONY ${KLDXREF_CMD} ${DESTDIR}${KMODDIR} From nobody Thu Dec 14 17:48:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Srfwh3wYgz52nQ7; Thu, 14 Dec 2023 17:48:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Srfwh3L9Qz3fPf; Thu, 14 Dec 2023 17:48:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702576132; h=from:from:reply-to:subject: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=SvoH2upjyu+nxatEXX7RZ/UHvaoxrq5+YVmPS2L7DJw=; b=q0rL3TFQhPstZ3Hs1Tw6yq7BjnjFpSUZwOi38Xqm2wwAuCIn1HElm/HYt9WNweZcm2+9lw Eyorvw6Fu6WEgPTuE1r1NZlhBM0G0AEeJUTOoRvDjNBgoavMkqzogh+1wbFoPboiQcxghN AbzStkJA6f82b7l8U7UXDXg2LVlEiFkXz7v5etvUVA/WNadE5NUeCZ+j0n4CEBYAbHp5Im p7YtWjsHN82WciRva4lQ0LrofSRNZD3bdci8JjEsy49+memjNyYVTkIyQ2EQijs2ic+ivd YVdHalBKLKYaVRDopxhBHKkKtHq10eJhs8cMV4Gw1DnHwolT2W73EI41qwosbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702576132; a=rsa-sha256; cv=none; b=bWQNzWhpqxjRbR86PTYJUYwigUFT5NIQToVaH50cSB/0TKkagoC7lxg8kYdrWBdB0ngGXI 8nSPTRkoXfkLhTFjCzQI3CxIotNbOlavPSKVMwXgydGvC00Pb4oo20YQir8rpIgIbKuX3u 9AnOVo7Ld9IFR18wpKaA6V31mAsVzYu9tgEr5/yIdHKjoM5h6AhKULr7OQN+8hUa3CzLKJ In9dOxFKdY4RQH75Dz5PoLDDIQTdGcdiFXgnAIh4IP4Om0sn7bJb3ZPPPWzMYqmuA01kpT 422Yg9DW0dHFlpA6bpU5n2f4tMXfkZSXAZhxLQr4VziiX3rmd9RL9aUdTKrpOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702576132; h=from:from:reply-to:subject: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=SvoH2upjyu+nxatEXX7RZ/UHvaoxrq5+YVmPS2L7DJw=; b=R2hBjPR4qligNzu4jP3yp8WUdtjO15a2epL9Ckji8eR6Toxl1bK238P8AnoX1MOVU0R7/v 8b0Bq6z3DZhbdD4C9Xua1xTOZ7SBhqa2ktYP+K4yDntLIdqoI/Ailta22a1uqgvaGMwDQH shkVPGRXmUWb/pRNpHWgr0V/lUF9KePFmUg9UUy0VMX5eYzROP6WD500iX6dL3CmttAJed vX5ub8sr4PwTyz2LBY6gxu6BsdGHcs1V76pu2H3gRLW7dvrxe0qjDumHlNCJn2SjDWdUWn Yf2Uin+Mxn174v/6YOc6FQraAn6q3iYGZSQK8oHEOhz64zfft2Z0I5vwiy0uZA== Received: from [IPV6:2601:648:8384:fd00:655e:b60a:b20c:6a5f] (unknown [IPv6:2601:648:8384:fd00:655e:b60a:b20c:6a5f]) (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 4Srfwg6S57zpXd; Thu, 14 Dec 2023 17:48:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <92a185f3-ab96-4dd0-b455-a3e28aa595f6@FreeBSD.org> Date: Thu, 14 Dec 2023 09:48: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: 0840bdbf2a07 - main - Don't try and run kldxref for arm kernels Content-Language: en-US To: Jessica Clarke , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202312141644.3BEGiQKZ081497@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202312141644.3BEGiQKZ081497@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/14/23 8:44 AM, Jessica Clarke wrote: > The branch main has been updated by jrtc27: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0840bdbf2a07b68e29267bc49057ca6df2351360 > > commit 0840bdbf2a07b68e29267bc49057ca6df2351360 > Author: Jessica Clarke > AuthorDate: 2023-12-14 16:40:08 +0000 > Commit: Jessica Clarke > CommitDate: 2023-12-14 16:40:08 +0000 > > Don't try and run kldxref for arm kernels > > Surprisingly, kldxref does not currently support arm, and unhelpfully > this means it silently does nothing rather than give an error, so the > linker.hints entry added to the METALOG for -DNO_ROOT builds (and > pkgbase ones) refers to a file that doesn't exist. Ideally it would be > supported (and ideally the METALOG handling would be less fragile, but > without integrating it into kldxref the only real option would be to > just run find(1) to get the list of linker.hints files, which feels a > little backwards), but for now just paper over this by skipping the > build step on arm. > > Reported by: bapt > Fixes: ff7c12c1f17e ("Make kldxref a bootstrap tool and use unconditionally") > --- > sys/conf/kmod.mk | 3 ++- > sys/modules/Makefile | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) I think before the libelf changes it was creating a file, but with only a single version record. Now it defers emitting the version record until it emits at least one "real" record since it doesn't know which endianness to use until it has successfully opened and parsed a file. As a result it is now leaving the file empty rather than with the version record. It should not be hard to add ef_arm.c to fix for arm. Another fun project btw would be for someone to add a "read" mode to kldxref to read a linker.hints file and dump the contents in a human readable fashion similar to the output one gets from 'kldxref -d'. -- John Baldwin From nobody Thu Dec 14 18:02:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrgD70ZVbz52pBW for ; Thu, 14 Dec 2023 18:02:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 4SrgD661n6z4CpY for ; Thu, 14 Dec 2023 18:02:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a1e2f34467aso774290066b.2 for ; Thu, 14 Dec 2023 10:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1702576933; x=1703181733; 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=UE4ufFZvqgCYoB9zA80OcULRfoCCy0+yBSpw7Cf5S/8=; b=d9xjLDut0uAm4+csXBC55SrVZWAPCVeYqRn7XFg2j2wFx2r4zvBURhV4WjIVsDlTMZ rMbhOZfiXsXV1nrS+tXW4akXIVa1Wyif7qSiTm2bjYtdeVSS617crF/nHW+3/uqGGq5M U/s9I41y/emvB7fdceu2ydRAO/20vSHmp9be70MKjViW+KMWvVJHjnC+p2uUt//E83LL zV4w0CGsSK+ooA+bh9KgT4TksG0Fqy16pwvcEMWbMVX75CHpf7g+oHSNF+q9fojiSfpw P3AGfoUYA6oTmzl6YQNTbBGIm4ttyeDK+yDg5J6Xs3N829kScoo5UoOJXeuSgpPUHBIU 04RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702576933; x=1703181733; 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=UE4ufFZvqgCYoB9zA80OcULRfoCCy0+yBSpw7Cf5S/8=; b=piTxb10A3wnvZvDIoBYn9vMEcbN5Kgw8FHg7wMigyHA08WP3Z4VK/kiZbhE/9umt6r qp0pos1nFvWBQpTG7nOV1QmttM+08nto07GRSanS+BMtyDo/bB3uCpvT36HL6na9mPgv LBEBQ92a0uhJM7hyQtdUNDk7DpMceKb4U1CYvv7MqLc5l5cFQ6ZkZv5XbrS9IiS7mum7 R1jyq+RUcQ0wOLIg+DGisvfjaWBvyqFhzS8ChTrN6xOiBF10XP6bKTgLgu350O4JDemB t/8UtgVfSQJtHDBDEYEu5XJ2sMdfkyhTCx/yoYovnxFemz3gtK1E1TllF5Zy2wm/XUDe 5zRw== X-Gm-Message-State: AOJu0Yy5DqXaF0SYSOl3XqEJ/EGCpFiMN/7bddW66QOIKNKAG5dDObvc WOhVM4GJc4nvaE5dTxplkS03WnJ4F7qs+wTGuVHI+Q== X-Google-Smtp-Source: AGHT+IF6rfWeLcdxyrM8HGkHYv/zNeyRzAuKugaigUsvl77kXPgEeHdpJOcFkRBtzBc09i3JRRd03DS4envdr6XUSYY= X-Received: by 2002:a17:906:cc96:b0:a1d:8259:98d2 with SMTP id oq22-20020a170906cc9600b00a1d825998d2mr5070203ejb.61.1702576932941; Thu, 14 Dec 2023 10:02:12 -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: <202312141644.3BEGiQKZ081497@gitrepo.freebsd.org> <92a185f3-ab96-4dd0-b455-a3e28aa595f6@FreeBSD.org> In-Reply-To: <92a185f3-ab96-4dd0-b455-a3e28aa595f6@FreeBSD.org> From: Warner Losh Date: Thu, 14 Dec 2023 11:02:02 -0700 Message-ID: Subject: Re: git: 0840bdbf2a07 - main - Don't try and run kldxref for arm kernels To: John Baldwin Cc: Jessica Clarke , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000004a89b5060c7c15ef" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4SrgD661n6z4CpY --0000000000004a89b5060c7c15ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 14, 2023 at 10:48=E2=80=AFAM John Baldwin wro= te: > On 12/14/23 8:44 AM, Jessica Clarke wrote: > > The branch main has been updated by jrtc27: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D0840bdbf2a07b68e29267bc49057ca6= df2351360 > > > > commit 0840bdbf2a07b68e29267bc49057ca6df2351360 > > Author: Jessica Clarke > > AuthorDate: 2023-12-14 16:40:08 +0000 > > Commit: Jessica Clarke > > CommitDate: 2023-12-14 16:40:08 +0000 > > > > Don't try and run kldxref for arm kernels > > > > Surprisingly, kldxref does not currently support arm, and > unhelpfully > > this means it silently does nothing rather than give an error, so > the > > linker.hints entry added to the METALOG for -DNO_ROOT builds (and > > pkgbase ones) refers to a file that doesn't exist. Ideally it woul= d > be > > supported (and ideally the METALOG handling would be less fragile, > but > > without integrating it into kldxref the only real option would be = to > > just run find(1) to get the list of linker.hints files, which feel= s > a > > little backwards), but for now just paper over this by skipping th= e > > build step on arm. > > > > Reported by: bapt > > Fixes: ff7c12c1f17e ("Make kldxref a bootstrap tool and > use unconditionally") > > --- > > sys/conf/kmod.mk | 3 ++- > > sys/modules/Makefile | 3 ++- > > 2 files changed, 4 insertions(+), 2 deletions(-) > > I think before the libelf changes it was creating a file, but with only a > single > version record. Now it defers emitting the version record until it emits > at least > one "real" record since it doesn't know which endianness to use until it > has > successfully opened and parsed a file. As a result it is now leaving the > file > empty rather than with the version record. > > It should not be hard to add ef_arm.c to fix for arm. > > Another fun project btw would be for someone to add a "read" mode to > kldxref to > read a linker.hints file and dump the contents in a human readable fashio= n > similar > to the output one gets from 'kldxref -d'. > devmatch -v I think does this. But it's not nice. Warner --0000000000004a89b5060c7c15ef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Dec 14, 2023 at 10:48=E2=80= =AFAM John Baldwin <jhb@freebsd.org> wrote:
On= 12/14/23 8:44 AM, Jessica Clarke wrote:
> The branch main has been updated by jrtc27:
>
> URL:
https://= cgit.FreeBSD.org/src/commit/?id=3D0840bdbf2a07b68e29267bc49057ca6df2351360<= /a>
>
> commit 0840bdbf2a07b68e29267bc49057ca6df2351360
> Author:=C2=A0 =C2=A0 =C2=A0Jessica Clarke <jrtc27@FreeBSD.org> > AuthorDate: 2023-12-14 16:40:08 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Jessica Clarke <jrtc27@FreeBSD.org> > CommitDate: 2023-12-14 16:40:08 +0000
>
>=C2=A0 =C2=A0 =C2=A0 Don't try and run kldxref for arm kernels
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Surprisingly, kldxref does not currently support a= rm, and unhelpfully
>=C2=A0 =C2=A0 =C2=A0 this means it silently does nothing rather than gi= ve an error, so the
>=C2=A0 =C2=A0 =C2=A0 linker.hints entry added to the METALOG for -DNO_R= OOT builds (and
>=C2=A0 =C2=A0 =C2=A0 pkgbase ones) refers to a file that doesn't ex= ist. Ideally it would be
>=C2=A0 =C2=A0 =C2=A0 supported (and ideally the METALOG handling would = be less fragile, but
>=C2=A0 =C2=A0 =C2=A0 without integrating it into kldxref the only real = option would be to
>=C2=A0 =C2=A0 =C2=A0 just run find(1) to get the list of linker.hints f= iles, which feels a
>=C2=A0 =C2=A0 =C2=A0 little backwards), but for now just paper over thi= s by skipping the
>=C2=A0 =C2=A0 =C2=A0 build step on arm.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 bapt
>=C2=A0 =C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ff7c12c1f= 17e ("Make kldxref a bootstrap tool and use unconditionally")
> ---
>=C2=A0 =C2=A0sys/conf/
kmod.mk=C2=A0 =C2=A0 =C2=A0| 3 ++-
>=C2=A0 =C2=A0sys/modules/Makefile | 3 ++-
>=C2=A0 =C2=A02 files changed, 4 insertions(+), 2 deletions(-)

I think before the libelf changes it was creating a file, but with only a s= ingle
version record.=C2=A0 Now it defers emitting the version record until it em= its at least
one "real" record since it doesn't know which endianness to u= se until it has
successfully opened and parsed a file.=C2=A0 As a result it is now leaving = the file
empty rather than with the version record.

It should not be hard to add ef_arm.c to fix for arm.

Another fun project btw would be for someone to add a "read" mode= to kldxref to
read a linker.hints file and dump the contents in a human readable fashion = similar
to the output one gets from 'kldxref -d'.

=
devmatch -v I think does this. But it's not nice.
=
Warner=C2=A0
--0000000000004a89b5060c7c15ef-- From nobody Thu Dec 14 18:31:57 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrgtP3bDVz52pyS; Thu, 14 Dec 2023 18:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SrgtP374Gz4GgN; Thu, 14 Dec 2023 18:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwsGzW/ec9XAP0ptkc/Dw/GeJoWaRCawBB+4K4O+akQ=; b=YcqcGzzwf0IsejwoPpgg4aCxlaVro0jx+Obd0woOPjIdJo1N0+QRnvmKKLLdpZnToZIIRo rmKoqPCATJ7Pnw94SPXEsrRVLggOmOn28chYVREx3aZqEvcWAJiQ2yQB9KWmWOpM35Fk2t Rt/PbAAlAsp4ZKsfuycYK0BPrD3v74m5E+YFcgx/9zxseKtNPcdRR2K0dQB9kkWOYTrQPU NMb1Vv27OqO2qLzzd+OX4JE6oIDn0C3c7qq46AefzO72Q+eE/hQucqa6D2hiDLFT5HBCx3 fp8q1/DOZSzqsBNm+vcWh1MMBb864uFajz1KaSg8qbwm8FR6+zrU3dU6+8yJ1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702578717; a=rsa-sha256; cv=none; b=oBwziViMS4Wx09zK+R3uCzoRO5eYXtAP3BxR7hQWFD1Z6obWm7i65dBN0VFY2vFOmVrjCy Z63pgBD8Fpt1pXlVz2DPXuurQ1JRI5TEKxGH5uwATHWFVdOfZEZQgwTMX/qg61uzqZxxj3 NUgSEM0+3cIEGKNMOfkyVz9GPC1u9MSa/aTb/UGrC9nVSfskdmzKq2I9YAfO8AhpMA9lQ3 Wo6UgkudH6nB8rnRfcPPPO8ZFbV8f0wNFc6hL2mnbqOyEl9dnhjsOKRNcYUpFGk2XwH8rk KRwX/fOpw2cs7L2jNZny29a5hv6i659yMdKoBblWkQ6gNQyAqka/gryQ6t+gKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwsGzW/ec9XAP0ptkc/Dw/GeJoWaRCawBB+4K4O+akQ=; b=v0nHUgx+cmjuqcQSA+CKUe4K581PYIU3USDb5CMXMXiibC8cYDzKSlskKmn1aBaOyeSyrq 2GRnu7iu7J5wftMrBarpRyKy1iOVh6pDHNVKdMr0FivTS67PSSccBTSgxMXl+V+QTX5zgk x40g/TRackq5m75Og0vlPiEvUyWDLUEneOAPci8QSm2k5cyMJ7dLwqJ7HfJROelXKLQUBk ouMMn0NY55olZBI0Fx7wGP5vEUvvutlXxdRNQ4I7yimdACzKy0+lCbDbiE0Pgw/Xs/otab Hi7Lw9iVm5pmt+pe0vhmrYl8xXRYF40PyseJM+EzPP1X8PXoctQ2YpV1YWSNJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrgtP29rWzdpj; Thu, 14 Dec 2023 18:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BEIVvaU067165; Thu, 14 Dec 2023 18:31:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEIVvQK067162; Thu, 14 Dec 2023 18:31:57 GMT (envelope-from git) Date: Thu, 14 Dec 2023 18:31:57 GMT Message-Id: <202312141831.3BEIVvQK067162@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: ada9d12f9512 - main - kldxref: Put each ef_CPUARCH.c on its own line to prepare for ef_arm.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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ada9d12f951201e13d831edc10acc36dd37d625e Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=ada9d12f951201e13d831edc10acc36dd37d625e commit ada9d12f951201e13d831edc10acc36dd37d625e Author: Jessica Clarke AuthorDate: 2023-12-14 18:27:09 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 18:27:09 +0000 kldxref: Put each ef_CPUARCH.c on its own line to prepare for ef_arm.c Adding ef_arm.c would push this past 80 columns, so prepare for its addition by splitting the line up. --- usr.sbin/kldxref/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index 6e0a7244328b..07451ba8f42b 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -3,7 +3,12 @@ PACKAGE= runtime PROG= kldxref MAN= kldxref.8 SRCS= kldxref.c ef.c ef_obj.c elf.c -SRCS+= ef_aarch64.c ef_amd64.c ef_i386.c ef_mips.c ef_powerpc.c ef_riscv.c +SRCS+= ef_aarch64.c \ + ef_amd64.c \ + ef_i386.c \ + ef_mips.c \ + ef_powerpc.c \ + ef_riscv.c WARNS?= 2 From nobody Thu Dec 14 18:31:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrgtQ4c8Dz52r8V; Thu, 14 Dec 2023 18:31: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 4SrgtQ47BVz4Gkb; Thu, 14 Dec 2023 18:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UbVgKgu39jhwnOwYVNeykVHrf8XI8rIbaCnBdfh2Aps=; b=fpz7lB2BRpEzO4ltdr81pciCJ/CH4hPJpSiYAoqMHGcVmHxJUI8Vj7Qj6pk1p2TacrZogY Aeko3ENPKJw80CteIj2ZN+osiW3XFN2dwGCeuQfhBa0+FmsOuTZ8A4vvNnaWoxJ+iXgCzF MEsmIZ3QgewOiz2AwNr5TLje7+UYeDjv0/paVfjv05n+g2Tbvf5g/WEC1TYP0uPNSd7+dt AXwX50G05VKvg0tuQ6GahrZujaNYAzPJIAXVpRBLPvfshwFaHJAhXlAj5e2LAjiGJIsgin 1+L+0L7mPBENZ6ffCK8stciXKY0/cUNMCPbqjrGigTGAXuVVzfVXawSrV0YOGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702578718; a=rsa-sha256; cv=none; b=ENrqUVmJDMK8GQWvTdmdOQmz5VRIzam4V/XUK3FuA6juKFPfu1FwO9RseZ/Jm27/SRBgPN oXchRc0W+s/GyFIVDHKDT0kDdSY7Jk9CU8vdbgm3Tl1WxFr/GI+n59HrVlsqjh512d1wf/ Ye0NrkRIutSmZ5eaV/pn7BuELBSReeMztrcgCyMjKFAn0PlYrxydKEpE5oRGnkJnWPomgQ 63Jg+fY07tYVPO+epnHTLBRkgZsk4oJ+0u0Kx2Na4a96Z5pC1cS/BVcd+KN1v3jp1/G3U0 lE5xqLFgm/kM40QB2Y2jNZI/UFBuUiCnGZUxNVoMDnQrpipDWblGBy0tdKJIyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UbVgKgu39jhwnOwYVNeykVHrf8XI8rIbaCnBdfh2Aps=; b=qN/Y8oIJBLq7DTQCIxs5XWlfiMjNJ3JPeBJK06KacJ7uuz90RBf5uMa+EIa/nH69Ycu7xw xPf799xINNPrSJazWyA6lCxj7MSWv2AgCN12eHa8y1THMN6/yU9452ZIA7Lttmose8YH16 SuXL6vFHccsxEBVKAPfRar3rYtCR8S5gluJkSuw7KIjZlxCFYSwLhjZ7JUh3tmwB75wZBc Q00ymGnPm8PsROfw89D03FLF52pYiHQ/mqIrgzu4OSmi5K8rAqRAxuXG2QTfUlb0nTPwH+ QJJ6nrtMBzodqUnx/2v990idavf4fiUgYwg++ghta8HcQQTGCwt2rZETti2jjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrgtQ3Cymzf6Q; Thu, 14 Dec 2023 18:31: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 3BEIVwBe067204; Thu, 14 Dec 2023 18:31:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEIVwMG067201; Thu, 14 Dec 2023 18:31:58 GMT (envelope-from git) Date: Thu, 14 Dec 2023 18:31:58 GMT Message-Id: <202312141831.3BEIVwMG067201@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: c88f7d8fb540 - main - kldxref: Add arm 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c88f7d8fb54051366d91acfc6c80aca6154da3b4 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c88f7d8fb54051366d91acfc6c80aca6154da3b4 commit c88f7d8fb54051366d91acfc6c80aca6154da3b4 Author: Jessica Clarke AuthorDate: 2023-12-14 18:27:09 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 18:27:09 +0000 kldxref: Add arm support --- usr.sbin/kldxref/Makefile | 1 + usr.sbin/kldxref/ef_arm.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index 07451ba8f42b..7b392e020939 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -4,6 +4,7 @@ PROG= kldxref MAN= kldxref.8 SRCS= kldxref.c ef.c ef_obj.c elf.c SRCS+= ef_aarch64.c \ + ef_arm.c \ ef_amd64.c \ ef_i386.c \ ef_mips.c \ diff --git a/usr.sbin/kldxref/ef_arm.c b/usr.sbin/kldxref/ef_arm.c new file mode 100644 index 000000000000..4b926839ee5d --- /dev/null +++ b/usr.sbin/kldxref/ef_arm.c @@ -0,0 +1,94 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2003 Jake Burkholder. + * Copyright 1996-1998 John D. Polstra. + * All rights reserved. + * Copyright (c) 2023 Jessica Clarke + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +#include "ef.h" + +/* + * Apply relocations to the values we got from the file. `relbase' is the + * target relocation address of the section, and `dataoff' is the target + * relocation address of the data in `dest'. + */ +static int +ef_arm_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, + GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) +{ + char *where; + GElf_Addr addr, addend; + GElf_Size rtype, symidx; + const GElf_Rel *rel; + const GElf_Rela *rela; + + switch (reltype) { + case ELF_T_REL: + rel = (const GElf_Rel *)reldata; + where = (char *)dest + relbase + rel->r_offset - dataoff; + addend = 0; + rtype = GELF_R_TYPE(rel->r_info); + symidx = GELF_R_SYM(rel->r_info); + break; + case ELF_T_RELA: + rela = (const GElf_Rela *)reldata; + where = (char *)dest + relbase + rela->r_offset - dataoff; + addend = rela->r_addend; + rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); + break; + default: + return (EINVAL); + } + + if (where < (char *)dest || where >= (char *)dest + len) + return (0); + + if (reltype == ELF_T_REL) + addend = le32dec(where); + + switch (rtype) { + case R_ARM_ABS32: /* S + A */ + addr = EF_SYMADDR(ef, symidx) + addend; + le32enc(where, addr); + break; + case R_ARM_RELATIVE: /* B + A */ + addr = addend + relbase; + le32enc(where, addr); + break; + default: + warnx("unhandled relocation type %d", (int)rtype); + } + return (0); +} + +ELF_RELOC(ELFCLASS32, ELFDATA2LSB, EM_ARM, ef_arm_reloc); From nobody Thu Dec 14 18:31:59 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrgtR5pQjz52pyV; Thu, 14 Dec 2023 18:31: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 4SrgtR5CGwz4Gyl; Thu, 14 Dec 2023 18:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Trx3AEy8AjRUpriFu0ziSGyDDpCutZy5PiCaVdwhpiQ=; b=UPGNCiqWgvne8MLbj0Q5MmCEx75EmJv79yIS9F4fIvgsfu8ONXAoHPcWSRNt4Ad5Hnk2qf e6zNq5MhjHNe+Ob9yutWgdVVisEa/GeMyF9WeVWuXqFdzG1g5KqJZUbrVhbt6apwjB0b1K HkzunMKI/cfDzBsTNYqK4SxEJWF+FkMNTYattZyJimDfVA503w3a+C4YdzRNbk0JFl3oyl NxLX6r4qFsyDwGLNa8JdLjV+6mkSQBTqncR0uQCfeQIMgzRizjGfcAyghz/Zhcna+651Jp 0MzBWjOd0c9cIqF1rGv4QuoPNZl/0pSR/NARFCjD1719zvpriadKgwGUmpfHHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702578719; a=rsa-sha256; cv=none; b=dKxkXq1xm+YneozqQXTGk6hh4eiR9YTiDei8ThMk3Q80lAm7hBhIeAzdj/bXtvii3HbDqj sUBDbPTILGJG+FVcrEV6v/nnVFiQdG2EQbZ0T0yMHT9qSFWsC79kigrhQleQdPNVxqSQeK Uge9csVm5UpT/1aefZezbk5PkNi9hrg6rjzVWSwYTfc3jt1Czhj4KgT+GiWXomPSNFiZM2 9kSE8egKhAy5+QAQjdh9HWlfzhupmhc7s134YWlTXeqELC+j/nD7GSQA+r1s0R9LUF4exw VbxfUiMxPnZfM9hmjkq/B423g2Ff5o4tlQ1ysax6liYdmv89Syps2tYMfS3ZxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Trx3AEy8AjRUpriFu0ziSGyDDpCutZy5PiCaVdwhpiQ=; b=FxjPpzkTCerzmdwBnJa7drYGZBpv4Mcf+BvnFn5KKRUoJQuuQaPo8c4WiHj/CKGRFpG1po UhdGO7WXrnuD04UYKYYwH9yfWYkl+ZMKOWq/jGeOH3YN69ND5wZDEzntuKfOOrr4wFJGpS CWQ+DDh03lCxz9eq4KQT1kEMcVMzKrq0Va90kfphgQbw+K5w5MVZxAdRf5vT32wHTD623y elfpHO3CygRVlNENwWkk0+Tn/a1o3Z9kMGT0P4DLQ/zmfW26wkkJZxnQO5l3TIwQysTVME Fvag3W2Rf73NliQhjSyGM704FkD5KT2ZSub9GucOZ+5GuAKlIWI3LXLBxqW6jA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrgtR4Ffwzf41; Thu, 14 Dec 2023 18:31: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 3BEIVxSI067259; Thu, 14 Dec 2023 18:31:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEIVxUQ067256; Thu, 14 Dec 2023 18:31:59 GMT (envelope-from git) Date: Thu, 14 Dec 2023 18:31:59 GMT Message-Id: <202312141831.3BEIVxUQ067256@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: 3812c653b146 - main - Revert "Don't try and run kldxref for arm kernels" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3812c653b1468bc97003c9f59cc13cfd9afb6ed1 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=3812c653b1468bc97003c9f59cc13cfd9afb6ed1 commit 3812c653b1468bc97003c9f59cc13cfd9afb6ed1 Author: Jessica Clarke AuthorDate: 2023-12-14 18:27:09 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 18:27:09 +0000 Revert "Don't try and run kldxref for arm kernels" Now that kldxref supports arm this should not be needed. This reverts commit 0840bdbf2a07b68e29267bc49057ca6df2351360. --- sys/conf/kmod.mk | 3 +-- sys/modules/Makefile | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 4482034baf67..5d4dcd4371bc 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -354,8 +354,7 @@ _kmodinstall: .PHONY .include -# XXX: kldxref lacks support for arm -.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm" +.if !defined(NO_XREF) afterinstall: _kldxref .ORDER: realinstall _kldxref .ORDER: _installlinks _kldxref diff --git a/sys/modules/Makefile b/sys/modules/Makefile index dc914946ff41..c14933eebda4 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -908,8 +908,7 @@ SUBDIR:= ${SUBDIR:N${reject}} .endif # MODULES_OVERRIDE -- Keep last # Calling kldxref(8) for each module is expensive. -# XXX: kldxref lacks support for arm -.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm" +.if !defined(NO_XREF) .MAKEFLAGS+= -DNO_XREF afterinstall: .PHONY ${KLDXREF_CMD} ${DESTDIR}${KMODDIR} From nobody Thu Dec 14 20:02:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Srjtn754Lz53hJ3; Thu, 14 Dec 2023 20:02: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 4Srjtn6X6pz4Pct; Thu, 14 Dec 2023 20:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702584145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0RjFV1gOdWZ1PiZNxx2fTZWc4FOKDjNFQ+geD6ObJo0=; b=vTlKCXw76ZMZQ9d5msVJDJKWlW9GIGiNPDc0pYoj8IYHgxL6IllR6sKGGfCsqRyiYoPaCl QI2f2oRQ6jqnsw9d+GPRRMFEWMjerJdRRYNzaIjBgIWYu8iuaUKq7HeiAltEz2sBYKKz6W JJwZI8/RYeu8x/zf9AXD0dS3AUCEbnF6E7Og9pI2UBoEI2FD7O6BbqTuzvuPWr34HpteEs nZ6D+u0IShibdw/f/aAhWaUSf2gRzrPkcXunN57QD4OVjUDwelew6ZO45RK69q3ENhWISU XoLJ/Pvc41xJzLM3VbspwwNK2kGWa89GjG75nLamR/TVrAGG2WW4lsrNRyZTpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702584145; a=rsa-sha256; cv=none; b=gFoGEOuPby0GnyZCwbBtRMTYZ2FrOLdebgVLHvDiu4y2xVjE7iCKhP3Ek4ayLMY2GboNoH +coIstRR+UhySFsmwsMVLrXaVQJn9cg4PnAjwHbm94klIW/88WRORwrD7RVL15nmumXRvV RifqE13oKA8jFxPjXri8LS2CpkwxeHmKFoC6ML+BxqI02RXDa1G3D3T7uATIwIJtUBkyFD NBULVTYhihSxzu60zBeFsmyWJzeoxdEEUXtQlLrgCPE0m4/57FzvBo0wJy6p6OwQPbV/yn g5leg6Nen/N3ZohRXyUCRguvGNtRNHO7Nx6ay3d0YbtQIZIMPVcoZKGJ901pIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702584145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0RjFV1gOdWZ1PiZNxx2fTZWc4FOKDjNFQ+geD6ObJo0=; b=pFbRCFatPdPpL5Ax34X6IyV8I+SxjRnHBZn5mVtdFNeLQ8IseunFWZca0q09e+3HadD5QK RQBWvoANwuWBytSVqca/aGx0HKqtPu9vowjrOvbVkuRPYTjxsueR6F0eqRtXNqnd3xNlpi IDiuatDZjSjpdf+zgRQGQwi407HqlxzZ85jT8XaYM6WXqAO6CVbITjObCCTu4Jc2Bd3H4/ MDfbWsTsn+LUM39hvWeMIBngCFkZwzH7HN4Dw/mCPgb1iE3RKIyFUwlzCtfQtQCvvQhjbX Q4MYcY7vCFKOEPCk624esKo6Q8W8feLx4JN0v5paeAlWbDo/7i1lGzyZHUskHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Srjtn5cnszhHC; Thu, 14 Dec 2023 20:02: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 3BEK2PoV017948; Thu, 14 Dec 2023 20:02:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEK2Pfi017945; Thu, 14 Dec 2023 20:02:25 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:02:25 GMT Message-Id: <202312142002.3BEK2Pfi017945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 53fc8e190241 - main - cp: Move the -N flag in the manual 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53fc8e190241233d94e183f8a39ec39f2154dfa8 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=53fc8e190241233d94e183f8a39ec39f2154dfa8 commit 53fc8e190241233d94e183f8a39ec39f2154dfa8 Author: Dag-Erling Smørgrav AuthorDate: 2023-12-14 20:02:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-14 20:02:06 +0000 cp: Move the -N flag in the manual page. This accidentally got left out of 0f4467ce444b. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D43067 --- bin/cp/cp.1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/cp/cp.1 b/bin/cp/cp.1 index 32e6fe295b35..66d4ab04f5d3 100644 --- a/bin/cp/cp.1 +++ b/bin/cp/cp.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 7, 2023 +.Dd December 14, 2023 .Dt CP 1 .Os .Sh NAME @@ -88,10 +88,6 @@ option is specified, symbolic links on the command line are followed. If the .Fl R option is specified, all symbolic links are followed. -.It Fl N -When used with -.Fl p , -suppress copying file flags. .It Fl P No symbolic links are followed. This is the default if the @@ -159,6 +155,10 @@ or options.) .It Fl l Create hard links to regular files in a hierarchy instead of copying. +.It Fl N +When used with +.Fl p , +suppress copying file flags. .It Fl n Do not overwrite an existing file. (The From nobody Thu Dec 14 20:16:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrkC64zqGz53hqb; Thu, 14 Dec 2023 20:16: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 4SrkC64RF1z4QqF; Thu, 14 Dec 2023 20:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702584994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZBKQQZeoA1Od6ibscz/qRXy8nSueI6t5xFLUl5/bYg=; b=kEY46z3f60QEoDDGR6cmg3nmgRhzWO8mnHPr67BsN1wN1TwzOFB69rfDex542DIDmI7ge+ 4aSL+Q+obS9leYfl2I/G2bWR4Qvoeg3CLiXdoKP0SqtOQBk7RxedWTsKVqVzufjdV6b/tz QriyGyr3JW2tLnUyqg2WPmGU3F2pKh4Zf+fuQZay0LiY5YIxiFzlncze0arEC9zDEFI85x aUVJhE6eAQ4wKdc2f4zh4fB0L9q+aO2kfI7xd5gxD13LmYX3AiBaKM8GOX7MHZaR5Xat4k cKNLOkQI9nXV2p6XrD/k7w0++stJ+Degk4jpuPp6lNX7u5ejztQiUSyTSAGkGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702584994; a=rsa-sha256; cv=none; b=eAx6hlS18MfNQnmhR1CTGMfLICVNyL+E08Qv2uKxpjyKtLyuXn3arsc2RKsglilufV4O9N wEy4ihmXBpGtG7TmFJRySBDqKJNN+nUnmQcPBsyxmkWs0NoCmxPNbGwawy+nhSSh2B3DtU 3vPWO3TPIs8LbTVoJMl1HFx6qvWjZ8HVCsu9Djb3a9yrjrCVJKAjlz/qfeelaMZEiMwuE8 cj/5YudMcZol1TTmt8aoPeSmTfwwq55LqKMa4zbDbi9XSXYjppgX+tUdQAxZsH/lqc8JNe fubZIZVflaC28Ssyaw1e8+c+C+T3HMNAWrwXpf1KOP1KvO1qmqFjdWldELtvzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702584994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZBKQQZeoA1Od6ibscz/qRXy8nSueI6t5xFLUl5/bYg=; b=Lbz4I0nAwiSBlCRehevvwikvM7ZrR5soaqZZP3mnHiYy08Kf1weT1sCUlRUdIDtjd4mGF0 UwqWFihiUiInH3GuEfU1cmTUCoqrsCF+unNwzHTpEWLtOkjzPxHCJ2HC7iKrvswkBHrD5+ rO8Xjc2GTUW9e1yDd1S1x2BzVZGFfvnaoiuMPsHISdwTsU21HJHNZowJpV1wcVzHKBdsNS n9dCxirILc6SjRNMSdXm9jbNNqYwLfcuFYWJZxplSx3vfLfmV84R/s568yNzuUmQQo/9/B pffhX03SxsFiTva5xfHZhY8hYrlHP7snAJDHwxM3KrnTGAe3h2MmVbVxos3MhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrkC63Tm6zhnR; Thu, 14 Dec 2023 20:16: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 3BEKGYfh035712; Thu, 14 Dec 2023 20:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKGY7f035709; Thu, 14 Dec 2023 20:16:34 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:16:34 GMT Message-Id: <202312142016.3BEKGY7f035709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 264610a86e14 - main - mpr, mps: Establish busdma boundaries for memory pools List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 264610a86e14f8e123d94c3c3bd9632d75c078a3 Auto-Submitted: auto-generated The branch main has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=264610a86e14f8e123d94c3c3bd9632d75c078a3 commit 264610a86e14f8e123d94c3c3bd9632d75c078a3 Author: Kenneth D. Merry AuthorDate: 2023-12-14 20:05:17 +0000 Commit: Kenneth D. Merry CommitDate: 2023-12-14 20:05:17 +0000 mpr, mps: Establish busdma boundaries for memory pools Most all of the memory used by the cards in the mpr(4) and mps(4) drivers is required, according to the specs and Broadcom developers, to be within a 4GB segment of memory. This includes: System Request Message Frames pool Reply Free Queues pool ReplyDescriptorPost Queues pool Chain Segments pool Sense Buffers pool SystemReply message pool We got a bug report from Dwight Engen, who ran into data corruption in the BAE port of FreeBSD: > We have a port of the FreeBSD mpr driver to our kernel and recently > I found an issue under heavy load where a DMA may go to the wrong > address. The test system is a Supermicro X10SRH-CLN4F with the > onboard SAS3008 controller setup with 2 enterprise Micron SSDs in > RAID 0 (striped). I have debugged the issue and narrowed down that > the errant DMA is one that has a segment that crosses a 4GB > physical boundary. There are more details I can provide if you'd > like, but with the attached patch in place I can no longer > re-create the issue. > I'm not sure if this is a known limit of the card (have not found a > datasheet/programming docs for the chip) or our system is just > doing something a bit different. Any helpful info or insight would > be welcome. > Anyway, just thought this might be helpful info if you want to > apply a similar fix to FreeBSD. You can ignore/discard the commit > message as it is my internal commit (blkio is our own tool we use > to write/read every block of a device with CRC verification which > is how I found the problem). The commit message was: > [PATCH 8/9] mpr: fix memory corrupting DMA when sg segment crosses > 4GB boundary > Test case was two SSD's in RAID 0 (stripe). The logical disk was > then partitioned into two partitions. One partition had lots of > filesystem I/O and the other was initially filled using blkio with > CRCable data and then read back with blkio CRC verify in a loop. > Eventually blkio would report a bad CRC block because the physical > page being read-ahead into didn't contain the right data. If the > physical address in the arq/segs was for example 0x500003000 the > data would actually be DMAed to 0x400003000. The original patch was against mpr(4) before busdma templates were introduced, and only affected the buffer pool (sc->buffer_dmat) in the mpr(4) driver. After some discussion with Dwight and the LSI/Broadcom developers and looking through the driver, it looks like most of the queues in the driver are ok, because they limit the memory used to memory below 4GB. The buffer queue and the chain frames seem to be the exceptions. This is pretty much the same between the mpr(4) and mps(4) drivers. So, apply a 4GB boundary limitation for the buffer and chain frame pools in the mpr(4) and mps(4) drivers. Reported by: Dwight Engen Reviewed by: imp Obtained from: Dwight Engen Differential Revision: --- sys/dev/mpr/mpr.c | 6 ++++-- sys/dev/mps/mps.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 23f7ff0c3e9a..d5c02f9608ca 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -1500,7 +1500,8 @@ mpr_alloc_requests(struct mpr_softc *sc) rsize = sc->chain_frame_size * sc->num_chains; bus_dma_template_init(&t, sc->mpr_parent_dmat); BUS_DMA_TEMPLATE_FILL(&t, BD_ALIGNMENT(16), BD_MAXSIZE(rsize), - BD_MAXSEGSIZE(rsize), BD_NSEGMENTS((howmany(rsize, PAGE_SIZE)))); + BD_MAXSEGSIZE(rsize), BD_NSEGMENTS((howmany(rsize, PAGE_SIZE))), + BD_BOUNDARY(BUS_SPACE_MAXSIZE_32BIT+1)); if (bus_dma_template_tag(&t, &sc->chain_dmat)) { mpr_dprint(sc, MPR_ERROR, "Cannot allocate chain DMA tag\n"); return (ENOMEM); @@ -1552,7 +1553,8 @@ mpr_alloc_requests(struct mpr_softc *sc) BUS_DMA_TEMPLATE_FILL(&t, BD_MAXSIZE(BUS_SPACE_MAXSIZE_32BIT), BD_NSEGMENTS(nsegs), BD_MAXSEGSIZE(BUS_SPACE_MAXSIZE_32BIT), BD_FLAGS(BUS_DMA_ALLOCNOW), BD_LOCKFUNC(busdma_lock_mutex), - BD_LOCKFUNCARG(&sc->mpr_mtx)); + BD_LOCKFUNCARG(&sc->mpr_mtx), + BD_BOUNDARY(BUS_SPACE_MAXSIZE_32BIT+1)); if (bus_dma_template_tag(&t, &sc->buffer_dmat)) { mpr_dprint(sc, MPR_ERROR, "Cannot allocate buffer DMA tag\n"); return (ENOMEM); diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index f358ab8a73a9..adad2450a3d4 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -1431,7 +1431,8 @@ mps_alloc_requests(struct mps_softc *sc) rsize = sc->reqframesz * sc->num_chains; bus_dma_template_clone(&t, sc->req_dmat); BUS_DMA_TEMPLATE_FILL(&t, BD_MAXSIZE(rsize), BD_MAXSEGSIZE(rsize), - BD_NSEGMENTS(howmany(rsize, PAGE_SIZE))); + BD_NSEGMENTS(howmany(rsize, PAGE_SIZE)), + BD_BOUNDARY(BUS_SPACE_MAXSIZE_32BIT+1)); if (bus_dma_template_tag(&t, &sc->chain_dmat)) { mps_dprint(sc, MPS_ERROR, "Cannot allocate chain DMA tag\n"); return (ENOMEM); @@ -1473,7 +1474,8 @@ mps_alloc_requests(struct mps_softc *sc) BUS_DMA_TEMPLATE_FILL(&t, BD_MAXSIZE(BUS_SPACE_MAXSIZE_32BIT), BD_NSEGMENTS(nsegs), BD_MAXSEGSIZE(BUS_SPACE_MAXSIZE_24BIT), BD_FLAGS(BUS_DMA_ALLOCNOW), BD_LOCKFUNC(busdma_lock_mutex), - BD_LOCKFUNCARG(&sc->mps_mtx)); + BD_LOCKFUNCARG(&sc->mps_mtx), + BD_BOUNDARY(BUS_SPACE_MAXSIZE_32BIT+1)); if (bus_dma_template_tag(&t, &sc->buffer_dmat)) { mps_dprint(sc, MPS_ERROR, "Cannot allocate buffer DMA tag\n"); return (ENOMEM); From nobody Thu Dec 14 20:18:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrkF40HXGz53jMh; Thu, 14 Dec 2023 20:18: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 4SrkF36tByz4RnD; Thu, 14 Dec 2023 20:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePIbju++NK3vkRzO+Qbyg74696OYnkpuyN7UQju+f/8=; b=Ys6QbKuxU/UKkkPaSNVDoJTSPyDiLrZuK7AvTXsJSdr2/z8+A1Xe193vLMGFzouTunakmN XDAMzNhbtI/+alK8zWbVdBDvVEZqXIwVIe/AmR1q4tXVsMQ7YozaTDMGcYsxGYWrtFP0Ew z/d92SGbII8+Xlyni2L4TxIWy4gbPPEoO2rzhokP1xEYM2l+NZ9hSZjvPlXrezFFfWtJeR dpgaEL6H27gG/SjB+mt0HhXAnwJr4FIJfN0UCA76kGqxU6NLh9WidfX/nXIHR/9KN63RTy Fij6Hw0ErefCHzejQ1EEDxGHlNgl/W94xOV3BWmVgziy95f6QBT8lqZokx02Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702585096; a=rsa-sha256; cv=none; b=vBECArFsUrXhClz5hCY26361CV3uEpXiWMbbZheOlZPTH6h+uVwAsDZipDlEEuq6tvMSWl vLkUO5UBs1Kfrly6S5klvBnr/7tPhwLshhJ3GKJncZbx6/RFlOcD8iQm4Z0tjz16qNMcBT /Jr82DfpWmxpzuXMqQGt+BsutjDFne0/MP0bgIlw3V27xTyGPDJ+VEeaHcoP0arRZQtUHk H0iBv05lceVMS9ZgNcLagNj1kOAWl6HZOJ8heLDtgHx9h+uWgWOk9V57q0OJ/sTLYQCqdN KGClb6giE4pMXpjTLJni/R7j47/VLMZRmgLjjnXQoB3RBClnc63vxBvH01SnRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePIbju++NK3vkRzO+Qbyg74696OYnkpuyN7UQju+f/8=; b=m2UnxaSQmiRDnyC6diOwW+/Dc6q5zfpaAvfOH0qMwsPzRBChDvEgZrZraEgZD70rdXXGSs MetOD0Cp4mjL+nAp2dMPUB1sjbyX4tgJgAuES4yLmkUZaw0diLHLdxtMgE6AuotV51VjoI CbOilQ+gUYUXycL9Zo6gSzujtoEL9obXcFhe5AMnCV3d23ZJ9p62+V3dRkfzP2rEzQt5ih AuPqBbyGl+VrcEMhFbUOGPxv5OTpnaWX+uRNx6F9z4FPXwCaiLQ6koskheZeSCY+N2OgfA wae6Ry5NxxvSpLcK80nyTwaeADjw/yZ7nDkysPi2Nq+Gmdi41+Pe5TIgMFsDGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrkF35wvFzhQf; Thu, 14 Dec 2023 20:18: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 3BEKIFKL036119; Thu, 14 Dec 2023 20:18:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKIFCx036116; Thu, 14 Dec 2023 20:18:15 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:18:15 GMT Message-Id: <202312142018.3BEKIFCx036116@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: ae7925cafeee - main - kldxref: Fix MIPS Elf_Rel addend computation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ae7925cafeee1136bd1761b2ce75614ee47b0039 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=ae7925cafeee1136bd1761b2ce75614ee47b0039 commit ae7925cafeee1136bd1761b2ce75614ee47b0039 Author: Jessica Clarke AuthorDate: 2023-12-14 20:17:19 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 20:17:19 +0000 kldxref: Fix MIPS Elf_Rel addend computation Fixes: 0299afdff145 ("kldxref: Make use of libelf to be a portable cross tool") --- usr.sbin/kldxref/ef_mips.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/kldxref/ef_mips.c b/usr.sbin/kldxref/ef_mips.c index edc99a7d2505..60fd35390d7e 100644 --- a/usr.sbin/kldxref/ef_mips.c +++ b/usr.sbin/kldxref/ef_mips.c @@ -88,7 +88,6 @@ ef_mips_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, else addend = be32dec(where); } - addend = *where; } switch (rtype) { From nobody Thu Dec 14 20:18:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrkF51M26z53jPc; Thu, 14 Dec 2023 20:18: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 4SrkF50jbdz4RlQ; Thu, 14 Dec 2023 20:18:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GNG+SVdlhDm0qBozjx3DqFA+PDq/zKlWFj1yRpXuKs=; b=Upap4QOLI0FdW7wM04x6BOkLE7W1LiEYGHNhQMaQ8j0X/yD1DoQ5HWze/WxWCIioafHPij LcN97B/DrRN7GRyUfjGYlwKvXoFkR5R/iMYV6HtU4/2QcOq+oOaKJObAnS6SEKqlzlG0qn Y0pG6cOhpGfkVBpu1FcT7IMeVPwTBV8QjltMD0w1BUnsGG4YkVwoU47lgDJaIJMIBlWPbV w9eHyqyh2iG4UEl9G1e9srRz7VidBNyy3ZjQXYvRoLaEJWVJgR4k0iaQkqJy0cOjRzmfLR R0N+CUlVW56b8MVzDpuczhe8HuWCiZzRdd81xbh/yYrbFKUi7p8hknV3ClwG1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702585097; a=rsa-sha256; cv=none; b=lstD+5FfZ4Uwb1EuREjEI0D4OnwMalYron6rKNz2WicRzjz1lS2jVZnQsAuUqTLpchn2iO 5G9eueFFoIZCkUneIVlWt1GOYjvvxpinO6LDLSCuiiS8EvnROdf1Brm1jQOF59cshJ+2/z qkBGGx4w+td8h9XNWcOBAJscu7QXXYD6vjSRXOgkSqVLurpTwzzTAMUSkwlvYu1lslDy53 J8ueQbJBowv6Qf+LKahWaNeLxHkp13to5ngtdc4NB/c3cem+86hTuOfoRTMCFBtLTSs+WS rkxaP8yDrvUZCJNvQVxq63vFMwg/XOhJMtCeN+tF1wxB+3fliS4YA4ZrKuZXEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GNG+SVdlhDm0qBozjx3DqFA+PDq/zKlWFj1yRpXuKs=; b=RP0vbCBtvYVkELjMQ3HLFughz+7b665gLo1EVxvJ0W5YOMNCO7O7MlClbDFUY+pi7D4H6P OWk20bIpWjrozBPjyiAsnrWJ+cjjE0RgauF55LqXFmuSZZSo2KmdO2p4uk3ylLx5OyFfWx QtkYFK8C+owf7labDU2+HnxfdrnjE/vQcRgqauWPHT7DuSMA11dzO5KJzIu/zxY0bzjPz0 fn3KmAlJknAY0EJqC2vFjZkyXjp0XTy9QJ5YnGXgALXLy+0Jdvq61dr1h4jtLwJnhfhyzm 4c3zVOCIWeabokYJH7w2xoVwsXYm6vWzeD80qJ5+J40fgQ5P8TosnYIp1Ii8Nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrkF46s89zh5h; Thu, 14 Dec 2023 20:18: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 3BEKIGCv036161; Thu, 14 Dec 2023 20:18:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKIGEb036158; Thu, 14 Dec 2023 20:18:16 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:18:16 GMT Message-Id: <202312142018.3BEKIGEb036158@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: aaba1490ec4b - main - kldxref: Implement aarch64 R_AARCH64_AB64 relocation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: aaba1490ec4b17dea750b1e58dfded7aeb4e9816 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=aaba1490ec4b17dea750b1e58dfded7aeb4e9816 commit aaba1490ec4b17dea750b1e58dfded7aeb4e9816 Author: Jessica Clarke AuthorDate: 2023-12-14 20:17:20 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 20:17:20 +0000 kldxref: Implement aarch64 R_AARCH64_AB64 relocation Doing nothing seems to be sufficient but is strange, inconsistent with other architectures, and not necessary when it's easy to support properly. --- usr.sbin/kldxref/ef_aarch64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/kldxref/ef_aarch64.c b/usr.sbin/kldxref/ef_aarch64.c index f1e499e76ef1..4365a7ff1f66 100644 --- a/usr.sbin/kldxref/ef_aarch64.c +++ b/usr.sbin/kldxref/ef_aarch64.c @@ -43,8 +43,8 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - Elf64_Addr addend; - GElf_Size rtype; + GElf_Addr addr, addend; + GElf_Size rtype, symidx; const GElf_Rela *rela; if (reltype != ELF_T_RELA) @@ -54,6 +54,7 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, where = (char *)dest - dataoff + rela->r_offset; addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); if (where < (char *)dest || where >= (char *)dest + len) return (0); @@ -63,6 +64,8 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le64enc(where, relbase + addend); break; case R_AARCH64_ABS64: + addr = EF_SYMADDR(ef, symidx) + addend; + le64enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype); From nobody Thu Dec 14 20:18:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrkF625qrz53jB9; Thu, 14 Dec 2023 20:18: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 4SrkF61nk3z4S0V; Thu, 14 Dec 2023 20:18:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7uls7kBmo1/sWwr9XbFKLIWmoMlHtlgxp5WJ7lK0zm0=; b=M5Lzgiuk2d/zaHI3GXNASURfyks7VgGlC3ftME1vTyki76SAQHxXvPjVpiTxbxCczE8jzl JRKVzanpjJuYocrJy+DTsNqcxVGdPl3tTVrN+yAvxWRjrl2uTgI/WDD0XmM2ayQvxJKeTG IBbIYtpMVvfrSRHTL3QAQNutcjxzVSRHxawMV1IZuI9Fyq8EYWrdnighFzjeKthFsxek4E dYnXezQCPMZYfP6z7x9kUqwgy73sZMpcShYu2+vGFS+dhfUJus9+pCZo2h/35Lktqk9sM0 4oQ3CBJjfYYnHcTs77E4mQntkeg+Ig0inoE+4bcepLUGbUVFD9MpsiuSjnmTdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702585098; a=rsa-sha256; cv=none; b=geYow9Oc3hzIhouRXVBSsIeGP/fjUBBJZcth4K8Irs2Tymw67piWIXvsDf32YTcEcoM7ol 0Vj7N45/DTNoh+aFT+0S3mvqnbN6sFxkhJ0Qu/pp76omh1iPdsW1T9PKly0d6CbHQIHEWl HjauRESUL2sdube1baeRuJclZ7HH5HEyXGD2mybiy2G6mn+CQAbtdh7InnQgrgrwovJ3MV ssJUxzloo4cQkNT8zUtVRBAlzU/MDK0AjlMIUxgtKJ26IiuH6EKqQf//8e9B6OrKW4CezI Z5hLZn9OpYP/lb2mGeg+1ysgrAq5j1yNfEvlwYn4eyL2oxPJ89Vw6TCdizwWaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7uls7kBmo1/sWwr9XbFKLIWmoMlHtlgxp5WJ7lK0zm0=; b=q+mgVr9chSkp8zr55qokUAQo4EOjO7LTRDHfiLhssyUNl3weYFVPV+KSgCLw6pE+/QN7zj e2/hJOW3KvP5kttCbhgwInsJx4YUZsL6Xh1MuKMZsiijBXpzEdze6IN0QPnYMPV02p2wCQ O7gj+nApsTzl17Nz+d0E4EGl+FRmkFbMzgNvSRiFzi1zzBDtz1Xa704hJFgyfrUPicI4SN KqE4lKJvsDrFYqhK1CMF3PHgKzi7dJmRTYGycoyIdG4nY0QYs4S1rlcMWNGpZ2PqXJKrMR exmFIEO74s4aaM9xob1KdhCYo2Gzb6hm6Fmh8ru0roGTQMFrsiQFdpECibs2iA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrkF60mynzhQg; Thu, 14 Dec 2023 20:18: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 3BEKIIPw036209; Thu, 14 Dec 2023 20:18:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKIIW3036206; Thu, 14 Dec 2023 20:18:18 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:18:18 GMT Message-Id: <202312142018.3BEKIIW3036206@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: 2a622f14e8a5 - main - kldxref: Reduce divergence between per-architecture files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 2a622f14e8a588de654847ae264cdc3616528c9d Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=2a622f14e8a588de654847ae264cdc3616528c9d commit 2a622f14e8a588de654847ae264cdc3616528c9d Author: Jessica Clarke AuthorDate: 2023-12-14 20:17:20 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 20:17:20 +0000 kldxref: Reduce divergence between per-architecture files Note that relbase is always 0 for DSOs so its omission for __KLD_SHARED architectures was not a bug in practice. Whilst here, also parenthesise the dest offset for where to avoid transiently creating an out-of-bounds pointer, which is UB (though even on CHERI architectures, where capability bounds compression can result in that creating invalid capabilities that will trap on dereference, optimisation will reassociate to the correct form in practice and thus work just fine). --- usr.sbin/kldxref/ef_aarch64.c | 22 +++++++++++++--------- usr.sbin/kldxref/ef_amd64.c | 28 ++++++++++++---------------- usr.sbin/kldxref/ef_arm.c | 12 ++++++------ usr.sbin/kldxref/ef_i386.c | 17 ++++++++--------- usr.sbin/kldxref/ef_mips.c | 29 +++++++++++++---------------- usr.sbin/kldxref/ef_powerpc.c | 39 +++++++++++++++++++++------------------ usr.sbin/kldxref/ef_riscv.c | 15 ++++++++++----- 7 files changed, 83 insertions(+), 79 deletions(-) diff --git a/usr.sbin/kldxref/ef_aarch64.c b/usr.sbin/kldxref/ef_aarch64.c index 4365a7ff1f66..b61de3b032ab 100644 --- a/usr.sbin/kldxref/ef_aarch64.c +++ b/usr.sbin/kldxref/ef_aarch64.c @@ -47,21 +47,25 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Size rtype, symidx; const GElf_Rela *rela; - if (reltype != ELF_T_RELA) + switch (reltype) { + case ELF_T_RELA: + rela = (const GElf_Rela *)reldata; + where = (char *)dest + (relbase + rela->r_offset - dataoff); + addend = rela->r_addend; + rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); + break; + default: return (EINVAL); - - rela = (const GElf_Rela *)reldata; - where = (char *)dest - dataoff + rela->r_offset; - addend = rela->r_addend; - rtype = GELF_R_TYPE(rela->r_info); - symidx = GELF_R_SYM(rela->r_info); + } if (where < (char *)dest || where >= (char *)dest + len) return (0); - switch(rtype) { + switch (rtype) { case R_AARCH64_RELATIVE: - le64enc(where, relbase + addend); + addr = relbase + addend; + le64enc(where, addr); break; case R_AARCH64_ABS64: addr = EF_SYMADDR(ef, symidx) + addend; diff --git a/usr.sbin/kldxref/ef_amd64.c b/usr.sbin/kldxref/ef_amd64.c index 729039daa509..fde032dcabc2 100644 --- a/usr.sbin/kldxref/ef_amd64.c +++ b/usr.sbin/kldxref/ef_amd64.c @@ -36,17 +36,16 @@ #include "ef.h" /* - * Apply relocations to the values we got from the file. `relbase' is the - * target relocation address of the section, and `dataoff' is the target - * relocation address of the data in `dest'. + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest */ static int ef_amd64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - GElf_Addr val; - GElf_Addr addend, addr; + GElf_Addr addr, addend; GElf_Size rtype, symidx; const GElf_Rel *rel; const GElf_Rela *rela; @@ -54,14 +53,14 @@ ef_amd64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, switch (reltype) { case ELF_T_REL: rel = (const GElf_Rel *)reldata; - where = (char *)dest + relbase + rel->r_offset - dataoff; + where = (char *)dest + (relbase + rel->r_offset - dataoff); addend = 0; rtype = GELF_R_TYPE(rel->r_info); symidx = GELF_R_SYM(rel->r_info); break; case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -90,23 +89,20 @@ ef_amd64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, case R_X86_64_NONE: /* none */ break; case R_X86_64_64: /* S + A */ - addr = EF_SYMADDR(ef, symidx); - val = addr + addend; - le64enc(where, val); + addr = EF_SYMADDR(ef, symidx) + addend; + le64enc(where, addr); break; case R_X86_64_32S: /* S + A sign extend */ - addr = EF_SYMADDR(ef, symidx); - val = (Elf32_Addr)(addr + addend); - le32enc(where, val); + addr = EF_SYMADDR(ef, symidx) + addend; + le32enc(where, addr); break; case R_X86_64_GLOB_DAT: /* S */ addr = EF_SYMADDR(ef, symidx); le64enc(where, addr); break; case R_X86_64_RELATIVE: /* B + A */ - addr = addend + relbase; - val = addr; - le64enc(where, val); + addr = relbase + addend; + le64enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype); diff --git a/usr.sbin/kldxref/ef_arm.c b/usr.sbin/kldxref/ef_arm.c index 4b926839ee5d..cc5e265f821e 100644 --- a/usr.sbin/kldxref/ef_arm.c +++ b/usr.sbin/kldxref/ef_arm.c @@ -37,9 +37,9 @@ #include "ef.h" /* - * Apply relocations to the values we got from the file. `relbase' is the - * target relocation address of the section, and `dataoff' is the target - * relocation address of the data in `dest'. + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest */ static int ef_arm_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, @@ -54,14 +54,14 @@ ef_arm_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, switch (reltype) { case ELF_T_REL: rel = (const GElf_Rel *)reldata; - where = (char *)dest + relbase + rel->r_offset - dataoff; + where = (char *)dest + (relbase + rel->r_offset - dataoff); addend = 0; rtype = GELF_R_TYPE(rel->r_info); symidx = GELF_R_SYM(rel->r_info); break; case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -82,7 +82,7 @@ ef_arm_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le32enc(where, addr); break; case R_ARM_RELATIVE: /* B + A */ - addr = addend + relbase; + addr = relbase + addend; le32enc(where, addr); break; default: diff --git a/usr.sbin/kldxref/ef_i386.c b/usr.sbin/kldxref/ef_i386.c index e4f73877c430..962ed2bc0664 100644 --- a/usr.sbin/kldxref/ef_i386.c +++ b/usr.sbin/kldxref/ef_i386.c @@ -36,9 +36,9 @@ #include "ef.h" /* - * Apply relocations to the values we got from the file. `relbase' is the - * target relocation address of the section, and `dataoff' is the target - * relocation address of the data in `dest'. + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest */ static int ef_i386_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, @@ -53,14 +53,14 @@ ef_i386_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, switch (reltype) { case ELF_T_REL: rel = (const GElf_Rel *)reldata; - where = (char *)dest + relbase + rel->r_offset - dataoff; + where = (char *)dest + (relbase + rel->r_offset - dataoff); addend = 0; rtype = GELF_R_TYPE(rel->r_info); symidx = GELF_R_SYM(rel->r_info); break; case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -76,13 +76,12 @@ ef_i386_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, addend = le32dec(where); switch (rtype) { - case R_386_RELATIVE: /* A + B */ - addr = addend + relbase; + case R_386_RELATIVE: /* B + A */ + addr = relbase + addend; le32enc(where, addr); break; case R_386_32: /* S + A - P */ - addr = EF_SYMADDR(ef, symidx); - addr += addend; + addr = EF_SYMADDR(ef, symidx) + addend; le32enc(where, addr); break; case R_386_GLOB_DAT: /* S */ diff --git a/usr.sbin/kldxref/ef_mips.c b/usr.sbin/kldxref/ef_mips.c index 60fd35390d7e..e4aeedb5c08b 100644 --- a/usr.sbin/kldxref/ef_mips.c +++ b/usr.sbin/kldxref/ef_mips.c @@ -39,32 +39,31 @@ #include "ef.h" /* - * Apply relocations to the values we got from the file. `relbase' is the - * target relocation address of the section, and `dataoff' is the target - * relocation address of the data in `dest'. + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest */ static int ef_mips_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - GElf_Addr val; + GElf_Addr addr, addend; + GElf_Size rtype, symidx; const GElf_Rel *rel; const GElf_Rela *rela; - GElf_Addr addend, addr; - GElf_Size rtype, symidx; switch (reltype) { case ELF_T_REL: rel = (const GElf_Rel *)reldata; - where = (char *)dest + relbase + rel->r_offset - dataoff; + where = (char *)dest + (relbase + rel->r_offset - dataoff); addend = 0; rtype = GELF_R_TYPE(rel->r_info); symidx = GELF_R_SYM(rel->r_info); break; case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -92,20 +91,18 @@ ef_mips_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, switch (rtype) { case R_MIPS_64: /* S + A */ - addr = EF_SYMADDR(ef, symidx); - val = addr + addend; + addr = EF_SYMADDR(ef, symidx) + addend; if (elf_encoding(ef) == ELFDATA2LSB) - le64enc(where, val); + le64enc(where, addr); else - be64enc(where, val); + be64enc(where, addr); break; case R_MIPS_32: /* S + A */ - addr = EF_SYMADDR(ef, symidx); - val = addr + addend; + addr = EF_SYMADDR(ef, symidx) + addend; if (elf_encoding(ef) == ELFDATA2LSB) - le32enc(where, val); + le32enc(where, addr); else - be32enc(where, val); + be32enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype); diff --git a/usr.sbin/kldxref/ef_powerpc.c b/usr.sbin/kldxref/ef_powerpc.c index ab33e170b488..f72cc1d85e20 100644 --- a/usr.sbin/kldxref/ef_powerpc.c +++ b/usr.sbin/kldxref/ef_powerpc.c @@ -40,48 +40,51 @@ * target relocation address of the section, and `dataoff/len' is the region * that is to be relocated, and has been copied to *dest */ -int +static int ef_ppc_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - GElf_Addr addend, val; + GElf_Addr addr, addend; GElf_Size rtype, symidx; const GElf_Rela *rela; - if (reltype != ELF_T_RELA) + switch (reltype) { + case ELF_T_RELA: + rela = (const GElf_Rela *)reldata; + where = (char *)dest + (relbase + rela->r_offset - dataoff); + addend = rela->r_addend; + rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); + break; + default: return (EINVAL); - - rela = (const GElf_Rela *)reldata; - where = (char *)dest - dataoff + rela->r_offset; - addend = rela->r_addend; - rtype = GELF_R_TYPE(rela->r_info); - symidx = GELF_R_SYM(rela->r_info); + } if (where < (char *)dest || where >= (char *)dest + len) return (0); switch (rtype) { case R_PPC_RELATIVE: /* word32|doubleword64 B + A */ - val = relbase + addend; + addr = relbase + addend; if (elf_class(ef) == ELFCLASS64) { if (elf_encoding(ef) == ELFDATA2LSB) - le64enc(where, val); + le64enc(where, addr); else - be64enc(where, val); + be64enc(where, addr); } else - be32enc(where, val); + be32enc(where, addr); break; case R_PPC_ADDR32: /* word32 S + A */ - val = EF_SYMADDR(ef, symidx) + addend; - be32enc(where, val); + addr = EF_SYMADDR(ef, symidx) + addend; + be32enc(where, addr); break; case R_PPC64_ADDR64: /* doubleword64 S + A */ - val = EF_SYMADDR(ef, symidx) + addend; + addr = EF_SYMADDR(ef, symidx) + addend; if (elf_encoding(ef) == ELFDATA2LSB) - le64enc(where, val); + le64enc(where, addr); else - be64enc(where, val); + be64enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype); diff --git a/usr.sbin/kldxref/ef_riscv.c b/usr.sbin/kldxref/ef_riscv.c index 38299a1e9b46..46b9b66bee58 100644 --- a/usr.sbin/kldxref/ef_riscv.c +++ b/usr.sbin/kldxref/ef_riscv.c @@ -38,19 +38,24 @@ #include "ef.h" -int +/* + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest + */ +static int ef_riscv_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - const GElf_Rela *rela; - GElf_Addr addend, addr; + GElf_Addr addr, addend; GElf_Size rtype, symidx; + const GElf_Rela *rela; switch (reltype) { case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -68,7 +73,7 @@ ef_riscv_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le64enc(where, addr); break; case R_RISCV_RELATIVE: /* B + A */ - addr = addend + relbase; + addr = relbase + addend; le64enc(where, addr); break; default: From nobody Thu Dec 14 21:59:59 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrmVR2hhQz53qWh; Thu, 14 Dec 2023 21:59: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 4SrmVR2D7jz4sXd; Thu, 14 Dec 2023 21:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4q3TcuJF2fOitLPirdx+i94FmjDJ60bvlQ0godBv5xs=; b=o5qKpxEYxpgitpR6xfuXw08wNFKg9GaCQkZIET86uzgTx7oqvo9428ZxZvDVgxteXyM2dZ ovgLASut9pnp0CV+PLPMVwDMrpDbtMuTs/3WBTHa1fFIkTiTnzsR+X/7hwtEh/3fg+GhuJ yTVtxS3vjXCWfQw8yMTZCghl/kbYiB1DNA83nlxx3UN9ycVZbwOgD56Cg7D7A48Y2+VkOh 7bNOHd3z1SbiqghanP4XMm6EnWwv/YVQGCSoaQTJLCLD8TA1jFPthdWz+i59Zdy+JZB5GA EkAhvEr/w92i+0yKBtBHlMBLWRFxLWfO2JR4rEq4zhlbvLbIDHfwLdzb/G6CgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591199; a=rsa-sha256; cv=none; b=hA5YHFXkg26mU0pySTCnYKjg5k3BeSVRGR/913emFaXoNmzCiBz6/bkBiTO0ScDoPPDLSp n708t5hfaKAl/7nyicMxPLsOghPfCRkb+Xiq2wQ60/f0eyAR1ZGQCFicVFnjlp1GN1TaLs bjkblyl5AyXY4HndLRKNSUF/NrbVKbgJMG6BKdPy343BnZrJt7RzIBjVGloYSUDAoXBV39 qckQhShDhMpR0qHjuQz0/ksXGdRqEQ01UZdA+x31J5oMhW3kOWq3nqtSlFNjqHFHbq68w9 r5WPhR7lpDbtFD94sl+QjKDBisM34x49pjhLuhYNReKR8UsTzriCz+AopBQGng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4q3TcuJF2fOitLPirdx+i94FmjDJ60bvlQ0godBv5xs=; b=sX3WEW1cA/M0EWIXEnopSusDBIHZsuViv6t9ZUtBOruXzZFSN/PS+jicv2uyGvo2dJuzWW gzC92bPkSX/HymhPY3VL0g52ELEhdWhwenubARav0Wc+QSPMVUQPkKFjIHVo05TTAO1/ZC woba8IZZG8EyuWPN7kznkrk4HTNYpTD/y8dfanayWBeu80BnqAlEXA8Npy+1e3LDCiOzqL Bv6l2+Dg33VvV/KSDeWknGrYLRQIL0roLe/MA9+0Q/5o9uShAUPhRlkoquyJVP6Kf7mjpP P29cCdUXU2ugJb5jDRmdcX/fHzmf1Q1obpOXjKkLrYUbcufqaz7riXg9wdVUFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrmVR1G26zkqV; Thu, 14 Dec 2023 21:59: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 3BELxxMF010540; Thu, 14 Dec 2023 21:59:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BELxxRO010537; Thu, 14 Dec 2023 21:59:59 GMT (envelope-from git) Date: Thu, 14 Dec 2023 21:59:59 GMT Message-Id: <202312142159.3BELxxRO010537@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: 0bc82e4fbbe9 - main - ip_mroute: allow MRT_DEL_MFC even if there are pending upcalls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef commit 0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef Author: Kristof Provost AuthorDate: 2023-12-12 18:17:40 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:04:43 +0000 ip_mroute: allow MRT_DEL_MFC even if there are pending upcalls In del_mfc() we try to find the forwarding entry, but that fails to find the entry if mfc_stall_ring is not empty. We should find the entry anyway, and destroy it (and any pending messages) on delete. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43031 --- sys/netinet/ip_mroute.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 10ac13d7d582..b864a4db5abc 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1250,22 +1250,17 @@ del_mfc(struct mfcctl2 *mfccp) MRW_WLOCK(); - rt = mfc_find(&origin, &mcastgrp); + LIST_FOREACH(rt, &V_mfchashtbl[MFCHASH(origin, mcastgrp)], mfc_hash) { + if (in_hosteq(rt->mfc_origin, origin) && + in_hosteq(rt->mfc_mcastgrp, mcastgrp)) + break; + } if (rt == NULL) { MRW_WUNLOCK(); return EADDRNOTAVAIL; } - /* - * free the bw_meter entries - */ - free_bw_list(rt->mfc_bw_meter_leq); - rt->mfc_bw_meter_leq = NULL; - free_bw_list(rt->mfc_bw_meter_geq); - rt->mfc_bw_meter_geq = NULL; - - LIST_REMOVE(rt, mfc_hash); - free(rt, M_MRTABLE); + expire_mfc(rt); MRW_WUNLOCK(); From nobody Thu Dec 14 22:00:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrmVS3m9Qz53qP0; Thu, 14 Dec 2023 22:00: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 4SrmVS3G0jz4sVc; Thu, 14 Dec 2023 22:00:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5HFH41OEAlGmt7N+sR27a04mYDGE9G50td1vsWdNFI=; b=okZkczuuVzHeUdA/KtWuOaZw78tCYHmStCmmBPAH8G3cG511Gfgt7yPOap+MV74mxw2F8M brQP4UB/NsrbFZMNqumkNYeOplvm7x/SApq/CJAE0SnHteTZQ9jxJ+ZLKDXt1pCJBD7hFd p68RNKnYnmvY4uHCl4WlBqrT2u5KzbnJtWaBby2NbJX5sppcQWC7/s+acsFUWlfFUvP5w+ THNB/UduRXfj9ubtsWDJ6Gap/OY4psiS75uGqsSiQLHe+stfqBg1HUHJ62B7rwiOuI0Z5A 3throob+vpaiRC/S62+CLlIXmIvxD5sioJNyVAF/5JhzLGqKsmpF4Lg5gE2tvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591200; a=rsa-sha256; cv=none; b=BEirdEZ1OpTxtWePz33PzmaAJEMnVAuRLq0C+msseeRizFN7NfA9eq3r2+QwFnNbha0U3o 3ilAkxF7ylRasa3Y9lL0dqWH/RFrjmzGQ3fUWgEx9b9L7nWCqm46LGDEk34fL8rqBfQdY9 GrcoVA8X3MARFWIRXRz2TfQtml65npiuqF3Yd7BeBGllkT28NBDSYcgEUGBsMCIEColkEa I/Tt4jO3ibBdIph/i/r9iU0zs7Toop7yXsMfRFZXwN+xjF3jRn7BPBG9D1naItZoeyVj4t rSsqK3O/sw+EIbR1tNKfPeVENEWPNUBIGrcHXDmLUSdR60X/Lgs6v5K6/UMAsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5HFH41OEAlGmt7N+sR27a04mYDGE9G50td1vsWdNFI=; b=gzDordptoxD8VK3qHv4T3aTWFZMVdoqF0kbrwYTrsaDGFiEtP4dEwxWRw6r3xalhu/8S8t fQuvueA260k18vuQ2GrSWN4Va6oKs1AYbSUn/vFhA8un6Uk62TunhkbDJ1Pbb7uGpPI77Y gX/rLn321X6Lct8NDjB71IXUKxmSBv+TH8fXgU31gc1G2R06pd27CLkBB9jI+ruPlgsErd 3jeukP/vSA6Nrw8KEcMP5c+PzX2HBjm3eTWpEq4pBuXSWSd3dMs+SzFEqk3KI3OlzDA25b 9C9sDDDEBB0PoT0Z6CmzkdNsWUaZDSjHjJSo6DAQVAmmul1FymSQtpaDlVmCcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrmVS1mRxzkqW; Thu, 14 Dec 2023 22:00: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 3BEM00TM010685; Thu, 14 Dec 2023 22:00:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEM007Z010682; Thu, 14 Dec 2023 22:00:00 GMT (envelope-from git) Date: Thu, 14 Dec 2023 22:00:00 GMT Message-Id: <202312142200.3BEM007Z010682@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: c196e43243b8 - main - Revert "mcast: fix memory leak in imf_purge()" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: c196e43243b83840cc9f3d1dadc7dacb3b0f556f Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c196e43243b83840cc9f3d1dadc7dacb3b0f556f commit c196e43243b83840cc9f3d1dadc7dacb3b0f556f Author: Kristof Provost AuthorDate: 2023-12-12 18:20:03 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:05:34 +0000 Revert "mcast: fix memory leak in imf_purge()" This reverts commit fa03d37432caf17d56a931a9e6f5d9b06f102c5b. This commit caused us to not send IGMP leave messages if the inpcb went away. In other words: we freed pending packets whenever the socket closed rather than when the interface (or address) goes away. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43032 --- sys/netinet/in_mcast.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index ee707414dc42..cae15bc4108a 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -914,8 +914,6 @@ imf_purge(struct in_mfilter *imf) imf->imf_st[0] = imf->imf_st[1] = MCAST_UNDEFINED; KASSERT(RB_EMPTY(&imf->imf_sources), ("%s: imf_sources not empty", __func__)); - if (imf->imf_inm != NULL) - mbufq_drain(&imf->imf_inm->inm_scq); } /* From nobody Thu Dec 14 22:00:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrmVT3vZQz53qL6; Thu, 14 Dec 2023 22:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SrmVT3LQ6z4scT; Thu, 14 Dec 2023 22:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTDXJG2Wlp1NAi70DuZUdtp/w4LXyVqY4mtI/XNVwmA=; b=kfYAsguNVSNZof1vLQU3AkodC8q9H0OOjVl+428D3b7lRrotNwRwPeuLMz9y5o6PKefTWb aaFxHCjQqkcrxQBivJPbrOnFe43vE3c5eQr5KxO41MhCwcmvuG8XinM+WcNZO/+iBnQmVU xh7aD4JG7BwTyrMAN1UcYk4DSmEIbWl3i+XSwEBTjiI4HdR9h9o6JEFRH26L1/pNh1CK1A 9HkSUpFuoOAaxtZQMcU9JWWrlNcUX7L3wIAU5JYoLEz7qvGI+1riAVTd+5opJ+Ht/GEI2n sK6Mr+1t8GhU1cuf8kH24jNug/9NeurH3ex6KdZ9J8KYoy+/l9Ae3aGhm+wV8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591201; a=rsa-sha256; cv=none; b=Qq2zFIYNTOo52vv6Cy7jFZ+VZsqJMShUEtVHMCWn5SZlRpivjeaIGSxKbd9etbH/QIa91B JEIiHPA+6hdm8wgVJNHRNjEiCDHVr/xlx3qJB3Ksmhkddjkjb1Pf8HRYcVUvDG+ECamivl n9C4G2quzdL5LN1zQZ9kgN+rjIcFpc0/5lQ0G9VIwzGzzSP0IE10tbhPm5JhpC60UqT2kC yLY+EEY4nCHuHZIORrN6+WHDJf/b4enWC2yZX3vxK4aes6VPH0zUNuKVwpX0NYXYlHgvuE MqgC2QqjbRNgLvBIbVGTr028Gh+w8rnokBTO7FJOrCJpmeJE34k2RRT27Wg3iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTDXJG2Wlp1NAi70DuZUdtp/w4LXyVqY4mtI/XNVwmA=; b=oqYPZDQRUN/pFnmASxrYkAAbNo0AQ9dusnMLcPhIw5nCA4/gG4UfDCbfX/fg8/gmjiSTu9 9deMv9XXGCiE4UusGg2KSTUV8krkMpWvPVP0X75B7QsFbtS4M7dYhhXeMCWU3NXlGbb+Dn GaHGW+cMn0klKASED/bTi6FGkC6wiodcH74ZxxiQbbZyXXxGMvRh/qiqXQF3c7QlDz4oGy eCRjSjAgmouLs+63WubXs6ik+1H6agG5looR/4/RJbYZAZiO3MW+jOt2xjM08n2pgvRtmX YaIj21jupe1AqWXOx14b9gQMLmrkbtDl133TN/QnwpESM6HUvP6aL2t7P2EN0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrmVT2SHmzlGH; Thu, 14 Dec 2023 22:00: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 3BEM011F012684; Thu, 14 Dec 2023 22:00:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEM01gU012664; Thu, 14 Dec 2023 22:00:01 GMT (envelope-from git) Date: Thu, 14 Dec 2023 22:00:01 GMT Message-Id: <202312142200.3BEM01gU012664@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: c2e340452c14 - main - mcast: fix leaked igmp packets on multicast cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2e340452c147b551180f2a1600ae76491342b0e Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c2e340452c147b551180f2a1600ae76491342b0e commit c2e340452c147b551180f2a1600ae76491342b0e Author: Kristof Provost AuthorDate: 2023-12-13 12:32:08 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:06:01 +0000 mcast: fix leaked igmp packets on multicast cleanup When we release a multicast address (e.g. on interface shutdown) we may still have packets queued in inm_scq. We have to free those, or we'll leak memory. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43033 --- sys/netinet/in_mcast.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index cae15bc4108a..6d68ebcb188c 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -1180,6 +1180,7 @@ inm_purge(struct in_multi *inm) free(ims, M_IPMSOURCE); inm->inm_nsrc--; } + mbufq_drain(&inm->inm_scq); } /* From nobody Fri Dec 15 13:18:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ss8tK4yYSz52nPD; Fri, 15 Dec 2023 13:18: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 4Ss8tK4kZ8z4DVJ; Fri, 15 Dec 2023 13:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702646313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s24+S5zvLRqCIZg7baS9ZY0xrQBaNWdVefjwdvh6Vww=; b=kZNchI4XNrtLa7O0FjiQHg+hHLFZs7SpIQkduQ0ifft+wal3WmUac2EHTpnkqBLqTPlDNy 0vUA9cNx5OjXzPftmK6Z+6icNzGc4N6Nq/G9IUgsZuDLUawJCRrkr/Nnz4M8faMdpyibfi eCKDuyIzVR2tmIJeDKtD1uOwtTvPpOckE+OeYaORlrG2YEvONs2JbATNx62fZjmhOHFimd 2ef8VYEkAwnHcprwJeLwapv39KAhk4Gyw+7/tu45LYPtMb5LWltHm+0kO1o2sdI7WPGF0B R2AQvfUMrBc0oLCixxRlweI2u7wVDQyVEPv8ogMK9/T6SY1Ge9X11TbtcvRdsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702646313; a=rsa-sha256; cv=none; b=VbQeGXDGp9fg7qHa2m+WwuGDLmS0BbIIL2YkF0/1+yQCYUfcNq8+zJDXP/tLmLHHWorGXk hnqzm/J7AP4d1g8umjkHJ/yUEW4MY8uRdYgUPtPrTIlVhCYZYXy6fQiG+RdiUBET8c6Dfq DSZcYkqy/ArSf0h/IglR4SjHkkeDqY5RBtiCLoXyBO9u8Y7r0JWM/NGuefCOU6OJdAjebT Z+SK3/dzel329zenos7LQtCMHyEnDWnEc91IAqG/RjCrRanTmYzaoT9VtGSa0m9t30SorO YqiiiiJCwoWk5Cq+njDtuzy1I38JBqGnq24ZRl9Z5+4UCEmupbGtGehDqc31/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702646313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s24+S5zvLRqCIZg7baS9ZY0xrQBaNWdVefjwdvh6Vww=; b=LMBZu99UUliPGfLFn33jxdwrbLOZUKuPHHFfhDocJtGi1pOZqM1jPn/hGEA/jMuyndKUDT ZG7sJ4lACU4OLVr9BR/IBMpcS2ImBQLz6nE3Y5Wk+ZHO7FRBdDvzLvgCWquN7EoG0GwByK CoU+O4j8SstSImYRrCnkNmh3rUlqMJgM6aEaQtPdTDuHPG+p0h050+ZVLRUgmf3qL0xtS5 iG1dPdbZ2MzOuzlEtvsiwdqTEu6waZAN6SU8asgl66Xd1UEe/L+cMSCkBieRn+O7MbkNaO p/4acT2kfzAcJqgJgJ7J+ePgJ4tFKzXRpfvjDao8tL6ij6netQ/8UukkplCPCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ss8tK3qQ3z1BfP; Fri, 15 Dec 2023 13:18: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 3BFDIXHR048790; Fri, 15 Dec 2023 13:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDIXK6048787; Fri, 15 Dec 2023 13:18:33 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:18:33 GMT Message-Id: <202312151318.3BFDIXK6048787@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: 5fb307d29b36 - main - zfs: merge openzfs/zfs@86e115e21 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 5fb307d29b364982acbde82cbf77db3cae486f8c Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=5fb307d29b364982acbde82cbf77db3cae486f8c commit 5fb307d29b364982acbde82cbf77db3cae486f8c Merge: c2e340452c14 86e115e21e5b Author: Martin Matuska AuthorDate: 2023-12-15 13:17:23 +0000 Commit: Martin Matuska CommitDate: 2023-12-15 13:18:07 +0000 zfs: merge openzfs/zfs@86e115e21 Notable upstream pull request merges: #15643 a9b937e06 For db_marker inherit the db pointer for AVL comparision #15644 e53e60c0b DMU: Fix lock leak on dbuf_hold() error #15653 86063d903 dbuf: Handle arcbuf assignment after block cloning #15656 86e115e21 dbuf: Set dr_data when unoverriding after clone Obtained from: OpenZFS OpenZFS commit: 86e115e21e5bdeee73c88c5a1a73a29d9637380a .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 6 +- sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 2 +- sys/contrib/openzfs/include/sys/dbuf.h | 1 + sys/contrib/openzfs/module/zfs/dbuf.c | 20 ++- sys/contrib/openzfs/module/zfs/dmu.c | 2 +- sys/contrib/openzfs/module/zfs/dnode.c | 8 + sys/contrib/openzfs/module/zfs/dnode_sync.c | 9 +- sys/contrib/openzfs/tests/runfiles/common.run | 2 +- sys/contrib/openzfs/tests/runfiles/linux.run | 3 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 5 +- sys/contrib/openzfs/tests/zfs-tests/Makefile.am | 3 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 4 + .../functional/block_cloning/block_cloning.kshlib | 2 +- .../block_cloning/block_cloning_replay.ksh | 131 +++++++++++++++ .../block_cloning_replay_encrypted.ksh | 133 +++++++++++++++ .../zfs-tests/tests/functional/cp_files/.gitignore | 1 + .../tests/functional/cp_files/cp_stress.ksh | 73 +++++++++ .../tests/functional/cp_files/seekflood.c | 180 +++++++++++++++++++++ .../zfs-tests/tests/functional/io/io_uring.ksh | 7 + .../functional/raidz/raidz_expand_005_pos.ksh | 2 +- sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 22 files changed, 582 insertions(+), 18 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh index 000000000000,1fdf379ed2d2..1fdf379ed2d2 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh index 000000000000,f9f687c83e5b..f9f687c83e5b mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/.gitignore index 000000000000,d15225ac8429..d15225ac8429 mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/.gitignore +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/.gitignore diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_stress.ksh index 000000000000,43bb8ab572d2..43bb8ab572d2 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_stress.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_stress.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/seekflood.c index 000000000000,02c2c8e6eca5..02c2c8e6eca5 mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/seekflood.c +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/seekflood.c diff --cc sys/modules/zfs/zfs_config.h index 03314cf89e35,000000000000..b6e93c8eadf7 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1152 -1,0 +1,1152 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* Define to 1 if you have the `execvpe' function. */ +/* #undef HAVE_EXECVPE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ *** 252 LINES SKIPPED *** From nobody Fri Dec 15 13:47:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ss9Wq2BqLz52qbS; Fri, 15 Dec 2023 13:47: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 4Ss9Wq1kpnz4Gcb; Fri, 15 Dec 2023 13:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eee+FfYkM0DXvcUirBSVSlmz0kw5YcbKQfcTiPGTiWo=; b=XPForr/2doRtVxMQBoC3yOUeJwKwGYLqljNX7TM4a5Q7lWiqnyLxLbKQ4hBJlFwPTHpZMt /IdN7MMCBcqEx8wcGMCP/2mY9GD+Dqj8X+pNC0mpyek+1U0DEVD8PdYx+ubFFzbWqZ0vRD HM4lxaLxQH7LlS9cpV6e9izCRxr/JXZTg/UJxeYw3EJvN6skxkh56jJA7UPElKVthYCABC xJRUT1jeiJ+KA37AxFN0SKXRycqPdMkSh9TaQz5TedF69aeMu4unU32OFEM/qAqxqJ6xF6 R/WLOKptRbtMy+1jHBVBvwTNGaZCHMRi8SrDbOK/l13l9YZCUrJc+ccVQfCpQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648055; a=rsa-sha256; cv=none; b=vEUabM/hS5nXiLc9w5IT3tUy0KNFcW/4UlyOUtpmBEMvSvgWH4G4bhvfPMQ3CkbudnLBjK UvIQ9yIapCn090NkALAZHHGOFj7Cm21GRsikG5YGIiOnTPF4zquczd1ddc5/KZfspg7Wmb X+Z1Q+CK/2LK6WJEyiwiMW/wOZ7VbhXwHbevIi0ygesnZ/eSDILw4Z8V+iLP7vHfQS/IXA MUWPDI7rdsQleZkfIO7qyNVy34yUNBSGSSkOPHRg/SM61Yi13X8iPvvfFsGC1ViY1uc0t3 QaVqkeD43G44btOx67g50lCRIYlhjyXa8fSr5LE4Ly19N3H5Uy3rvAhDfpDhVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eee+FfYkM0DXvcUirBSVSlmz0kw5YcbKQfcTiPGTiWo=; b=n7Chderb/U4BxcYhV6oEuKUHEsyi5+8cJdwPWkcseC1vpwXG2J8UAecJwWdY6KS4ZVd9pf PC39SVaQOr1ZMgg2XrKZwIryCaGniTVp7KXkSlnRSLuAnk1qeN703/k5OmvrE38ty0sgjX wh4FxYOmOpcuKKZGjS+Rm8IOD81STdkH53U6fId/hYULASpUA2HK6GagjFye6fwHM/qJ2w s1OeCf0fDVH0JX1AkGgyugnzrCUQ50MFyckyDWuDd3pAkhULW8jrMU7Tt1HbvDSWMf5lDQ rUxH4HD22Q2f6UtuKkHekD0f/2MHg9cQVyWfLuvdV6E9p6upesxy0Ufu4Fjr7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ss9Wq0hcjz1BZv; Fri, 15 Dec 2023 13:47: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 3BFDlYEC098037; Fri, 15 Dec 2023 13:47:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDlY5Z098034; Fri, 15 Dec 2023 13:47:34 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:47:34 GMT Message-Id: <202312151347.3BFDlY5Z098034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cheng Cui Subject: git: 93b7818226cf - main - libexec/rc/rc.initdiskless: make tar's path flexible List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93b7818226cf5270646725805b4a8c17a1ad3761 Auto-Submitted: auto-generated The branch main has been updated by cc: URL: https://cgit.FreeBSD.org/src/commit/?id=93b7818226cf5270646725805b4a8c17a1ad3761 commit 93b7818226cf5270646725805b4a8c17a1ad3761 Author: Cheng Cui AuthorDate: 2023-11-24 15:47:18 +0000 Commit: Cheng Cui CommitDate: 2023-12-15 08:46:44 +0000 libexec/rc/rc.initdiskless: make tar's path flexible Summary: PR: 274977 Reviewed by: rgrimes,imp Approved by: rgrimes MFC after: 1 month --- libexec/rc/rc.initdiskless | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.initdiskless b/libexec/rc/rc.initdiskless index 9b37497c1e7e..ee891c3f782e 100644 --- a/libexec/rc/rc.initdiskless +++ b/libexec/rc/rc.initdiskless @@ -362,6 +362,8 @@ done # so if the cpio archive is present, it prevents the files from dir/ # from being copied. ++PATH=${PATH}:/rescue + for i in ${templates} ; do for j in /conf/$i/* ; do subdir=${j##*/} @@ -376,7 +378,7 @@ for i in ${templates} ; do if [ -f $j ]; then create_md $subdir echo "Loading /$subdir from cpio archive $j" - (cd / ; /rescue/tar -xpf $j) + (cd / ; tar -xpf $j) fi done for j in /conf/$i/*/extract ; do From nobody Fri Dec 15 13:59:43 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ss9nr2HWYz52rW9; Fri, 15 Dec 2023 13:59: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 4Ss9nr1mrlz4Hvj; Fri, 15 Dec 2023 13:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/lFmEA5aYcIP4yg0k38FlmrKjbFpPvkT604CZkh0+7o=; b=e0+tS9XdM3j5eOBGzI/hZJg9AjrYrWyPyZQX3OuEvTUu/DSOQWPW2Ysx9fcA7r0eAUc946 ee4Um5cwLdsJoSvj+PKOA1PSKX7uCqYtkbtPAdqq/TE4Fb1KzifsZJ3Z4ZuoWMYQcmfJks whV/OvbVRfr75VWAZHmNEYb2Z9k7TyUQnq5Ajwdqz/y/I8PYX3tOOUcL83+qH56DsDXZ/c unUWlU0deQi0J8lF5uC7Fa/przHT9W67vdCtG14x/iT0URH9OICKQgBtm040MvNzfz1i8c ZjFwl2/qtgBhfCCJGy0QdJpcQJkM4ARSDkTRGRfKu/hk9z7iO+KQK3RRhcbIKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648784; a=rsa-sha256; cv=none; b=tMGsdvafwzLcqav7fFE/blMfBqRwQ+m6jtgzPkL6tw6W0fGo0ATLb6Qj1ReSOs1jzWIr/6 O+AsSZRlAprkDECPtVR3DQo/YevRKe7UV8+whnGsfcnyp6bvmauxdx2/zK88NE8U3E8YDW 6EeGon2WD9PvYbrx3jWdoTHL8MIhrUbZvKNZRZeIORWO43IK9pT6BWZACj1CdYdo+G9B9h p88R7776xQHwOiZkzMiF61fR1Zrj73aGC3QwnKWLzMQX8wBaOlP2+RIDpg/qajYZhHbqKg lQC0rG3WErHu9Ln6G0B+fXn4BOHzWXqO+KLGbT3SnFoeI7uoT0UtkcQkpa84VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/lFmEA5aYcIP4yg0k38FlmrKjbFpPvkT604CZkh0+7o=; b=AogErtVPiixfI8M+lVYn3av6tGd2I+qjRBs2g6P/KUiwwCSWqiqdY28OuRjrD4J5DuT0BY lloevYO4bIqKK/5F4o95GODaLwpFEbb1HZlYNvwtWKWBLJ9o31ihaMHaSmUr+U0v4i+AjV Z6t3P7yxTraSHygvYcEFR8G9AsfZcDgUtemWO2fNbMoB+XXbczbBOm4cMO4zz3eZvKHuNO XRR1EKZlZR8lfw97UnlsFi8atzEKxlQs4oO347gv4alpjLdyDOXe3rHHYeXVFiDtHdtN2p CE3pZeIc7EgC2IH5q+wto13Kg0EQzq6t4b0TJT4q72tV1XGFxZiJ8zU38SICwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ss9nr0jpVz1CM6; Fri, 15 Dec 2023 13:59: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 3BFDxhN3015522; Fri, 15 Dec 2023 13:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDxh1f015519; Fri, 15 Dec 2023 13:59:43 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:59:43 GMT Message-Id: <202312151359.3BFDxh1f015519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 40e1d9d45f0f - main - xen: add SPDX license tags to Xen headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40e1d9d45f0f6798e404eb7d63afb3976e85cc02 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=40e1d9d45f0f6798e404eb7d63afb3976e85cc02 commit 40e1d9d45f0f6798e404eb7d63afb3976e85cc02 Author: Elliott Mitchell AuthorDate: 2021-11-02 05:53:44 +0000 Commit: Roger Pau Monné CommitDate: 2023-12-15 13:59:25 +0000 xen: add SPDX license tags to Xen headers These are in fact GPLv2 when distributed with the Linux kernel, but the license also allows MIT if distributed separately. Add the markers to avoid interference by automated tools. Differential Revision: https://reviews.freebsd.org/D32796 Reviewed by: royger --- sys/amd64/include/xen/hypercall.h | 2 ++ sys/i386/include/xen/hypercall.h | 2 ++ sys/xen/gnttab.h | 2 ++ sys/xen/privcmd.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/sys/amd64/include/xen/hypercall.h b/sys/amd64/include/xen/hypercall.h index f62250679f0f..48d60e345983 100644 --- a/sys/amd64/include/xen/hypercall.h +++ b/sys/amd64/include/xen/hypercall.h @@ -1,4 +1,6 @@ /****************************************************************************** + * SPDX-License-Identifier: MIT OR GPL-2.0-only + * * hypercall.h * * FreeBSD-specific hypervisor handling. diff --git a/sys/i386/include/xen/hypercall.h b/sys/i386/include/xen/hypercall.h index 94bb42e38a39..2a8b36f0f7cd 100644 --- a/sys/i386/include/xen/hypercall.h +++ b/sys/i386/include/xen/hypercall.h @@ -1,4 +1,6 @@ /****************************************************************************** + * SPDX-License-Identifier: MIT OR GPL-2.0-only + * * hypercall.h * * Linux-specific hypervisor handling. diff --git a/sys/xen/gnttab.h b/sys/xen/gnttab.h index d85f882c0c4b..583f19128377 100644 --- a/sys/xen/gnttab.h +++ b/sys/xen/gnttab.h @@ -1,4 +1,6 @@ /****************************************************************************** + * SPDX-License-Identifier: MIT OR GPL-2.0-only + * * gnttab.h * * Two sets of functionality: diff --git a/sys/xen/privcmd.h b/sys/xen/privcmd.h index 8ae1732ae75b..cf620af31f4f 100644 --- a/sys/xen/privcmd.h +++ b/sys/xen/privcmd.h @@ -1,4 +1,6 @@ /****************************************************************************** + * SPDX-License-Identifier: MIT OR GPL-2.0-only + * * privcmd.h * * Interface to /proc/xen/privcmd. From nobody Fri Dec 15 13:59:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ss9ns389kz52rBN; Fri, 15 Dec 2023 13:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ss9ns2ghhz4Hfd; Fri, 15 Dec 2023 13:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2CLlvsI01Fdtob54oQGMwaJ5P9LXnoHU+IBMuuKjHp8=; b=f6lJN7MXsajkTleV0LX72qPovm070CjB7CTleOuf0dZig1THgVns+l1wiFqwpeHbXX5omy fHsoM56j8szE8FstoDVy9kQ+tnyD58zz/Cw28w47eEpAkQ550oyVDdss8zwA5fP8klJE8Q wyCkEeOyjQzbpuZSWvYL+xQ4SOHeyldElFIIl74imNvMjtI3s/v3rBHO60KvKAQkSHnJF1 vmzODblg3gH1D4X7ttwD/tr8q5BxekUKUjwXIJp+7EuzlbLwUHV4y062qCiJoeItv4lYRf eHNuScX0N4juueMPdfJbCtwav11XKv6fVY4QEC1dZ0ilZ9eab6uFAXN0bM6Egg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648785; a=rsa-sha256; cv=none; b=EeNZhmZ17NKzT5oV1WBNNn9AM1lfMIHW4YvNb/Gq/oYn0BDtNLV+yRQ3KQ2nmcvtoenZim O4R5IZ1imBvbm2qZes/rrX9s2ye312IYNIstLVhbnq0FMtGL/h21dEi87bh15Ra2IP56B6 zAbXuCoOvHGZsUpRBiYYckw1HfuRFw/8qKOB/uNKOpjTFxMvAaPwBC9ic2jWaZHhQT+UkY /VjNvKtGHR69JO/HPmP6kb1o8PgN7y2k0nSz9WXcn9R9Yss1c7TVqAS11DmzA/O/VlNPBl mhyBxARWH0dXa5mWwfgH5zcBfOysj5J/5kvjtsHLErKDchZj9BwKh7NE77zrrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2CLlvsI01Fdtob54oQGMwaJ5P9LXnoHU+IBMuuKjHp8=; b=SZkymOH12ocg0OBTfZyxEsjzfC/jK+BRHU39fIUmZPHoT3ZKhG2kGAtjUjqqAdJWAATlln d82Ojh3lE+vk1O977NqA8StWr7ZWx2IIr0aDSGumABIQNkyvkobLKqTFIPq686wL6ckd9x 1NAiYxVT6VqdC4bg+d6tgmAGv+HK5U/pkEq+UlslhF3upM4zJ7m64l27qHnRPVMIVZbR7B NMTDEX0p/pL0HCAcP5FThIj/w2kjcTHXVDAoVFNRZ35E3nbN3uxqL7KveBJBJ5XWVzYJ5L 1mQVDxvgw0ObRK7dyaBVs3MTBhZg7+YjM7wvTcO4j2Ai4RxUDhTTVlCvV259qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ss9ns1T4Cz1CfF; Fri, 15 Dec 2023 13:59: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 3BFDxjvI015580; Fri, 15 Dec 2023 13:59:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDxjmp015577; Fri, 15 Dec 2023 13:59:45 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:59:45 GMT Message-Id: <202312151359.3BFDxjmp015577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: ea9a9b122d94 - main - sys/conf: make xen_acpi_cpu.c depend on acpi List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea9a9b122d949141fe9e5a49d2d01ca6b48fb1d0 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ea9a9b122d949141fe9e5a49d2d01ca6b48fb1d0 commit ea9a9b122d949141fe9e5a49d2d01ca6b48fb1d0 Author: Elliott Mitchell AuthorDate: 2023-12-02 06:22:57 +0000 Commit: Roger Pau Monné CommitDate: 2023-12-15 13:59:25 +0000 sys/conf: make xen_acpi_cpu.c depend on acpi Since Xen can function on systems without ACPI, make sure this key dependency is handled. Reviewed by: royger --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index bf951d789de3..16e3c1ddb6dd 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3480,7 +3480,7 @@ dev/xen/bus/xen_intr.c optional xenhvm dev/xen/bus/xenpv.c optional xenhvm dev/xen/console/xen_console.c optional xenhvm dev/xen/control/control.c optional xenhvm -dev/xen/cpu/xen_acpi_cpu.c optional xenhvm +dev/xen/cpu/xen_acpi_cpu.c optional xenhvm acpi dev/xen/efi/pvefi.c optional xenhvm xenefi efirt dev/xen/grant_table/grant_table.c optional xenhvm dev/xen/netback/netback.c optional xenhvm From nobody Fri Dec 15 13:59:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ss9nt48YSz52rhb; Fri, 15 Dec 2023 13:59: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 4Ss9nt3TVqz4J73; Fri, 15 Dec 2023 13:59:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UwBtV6A9yc3ttqf0KrFV3k6dv6Eu2sGjTfUCppfLYq4=; b=rHih3BACSpqSLoPX+NFYztf9jGTsLB0r820yr7qsqjHV8oQuzv+jhSzLnZ4AOG4y+5qnMq hpklQoEkyPAWacGzpkzn/YlP4BE0LcDPciqj5TxScYU72Lldxezv0h1f8ud3iI8UZvQhwz aiVwkkGH04xMPihG/fa8hjitybDD70yGn03CXQgpFvUuy4XLzFu6xOpwQCrX0KWwlulFBy eAQwuh4yNOjDjMFkoLj054ilSgmyt+xSk9TXczbQ28oP/ugfClKPzlBvdl3/EMt28tmMbf zVd8Bp2xTPBlbhx0PEiEpxCApNHkngOug43+twvumQEdSkp9RS1ddvjqYyj1zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648786; a=rsa-sha256; cv=none; b=SGQy2TvzdNojf7jNAuKDX/eNQCrl3J5zg6MI/PyJP31PAoet8l5lxKDzPq6be0pkrWQ5c3 NgsJmefL+/Q/KPAQ4WUyGXvJnKnP4KBCRWCMm0QQNuuT+z5GVDdYEeTSKWWhWSToFl2Pl6 TPU5kyUNnRssvKkQdv/xy85OBR4+vg3vfEtHsOUs4mebbIMbCnI7vL+t3dgodMHr+PDEYu uyPnVcbQ1qEc8Ayy4FefXGDxp5RUCM+02q1lbarcY70vSb2Pyf7rbKTHgpi2xnTghGBuHV ey2NvdTyTGgzTY2izNrWPv2noF21xMpxxSa8DUIkKlHYLZ1MFXxgmuFzNQaJiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UwBtV6A9yc3ttqf0KrFV3k6dv6Eu2sGjTfUCppfLYq4=; b=xUXtXZmDbFOYr7+W3onBAjGI0BGHXU9nBGe64biw0Dib5fQhH+bmaqwD/Qu+sGB0HP74lh HF2kLA4qEg0JObbAK2F9Z08LLnoYiEjxS2FWAKgq7bPuoMP0shzmsxzpSULKiqz/e4gIU2 +mw46cMmrPT8GDTPkqZpquPdxO/hRSF860DO+1MyQeederXQxw+AG8DExF9WUqI6I1bkxS fsCW3XqQykAOMhhQ4fxiYsQuHfp9PHL0Gim1u1yK1900Ax7soTW7jgbTSILEYEkYQLZ+AG DYKSfCoscb+IQsnFeeeDfkkRcY73asoQYiOkRpQNt3IbFIbrpYuwuvYWcUUjfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ss9nt2TKqz1C02; Fri, 15 Dec 2023 13:59: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 3BFDxku3015634; Fri, 15 Dec 2023 13:59:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDxkVX015631; Fri, 15 Dec 2023 13:59:46 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:59:46 GMT Message-Id: <202312151359.3BFDxkVX015631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: ed917e0faea8 - main - xen/intr: correct type of evtchn_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: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed917e0faea8453551b0ee9728c5d328e2e3e412 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ed917e0faea8453551b0ee9728c5d328e2e3e412 commit ed917e0faea8453551b0ee9728c5d328e2e3e412 Author: Elliott Mitchell AuthorDate: 2023-12-02 15:29:43 +0000 Commit: Roger Pau Monné CommitDate: 2023-12-15 13:59:25 +0000 xen/intr: correct type of evtchn_enabled evtchn_enabled needs to match the type of Xen's evtchn_mask. As Xen's headers have a type for this, use Xen's type. Reviewed by: royger --- sys/dev/xen/bus/xen_intr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/xen/bus/xen_intr.c b/sys/dev/xen/bus/xen_intr.c index 75750aa5b0bf..3e44c05ceeb7 100644 --- a/sys/dev/xen/bus/xen_intr.c +++ b/sys/dev/xen/bus/xen_intr.c @@ -84,7 +84,7 @@ struct xen_intr_pcpu_data { * A bitmap of ports that can be serviced from this CPU. * A set bit means interrupt handling is enabled. */ - u_long evtchn_enabled[sizeof(u_long) * 8]; + xen_ulong_t evtchn_enabled[sizeof(xen_ulong_t) * 8]; }; /* From nobody Fri Dec 15 13:59:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ss9nw1WRMz52rSp; Fri, 15 Dec 2023 13:59: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 4Ss9nv4TcTz4J9d; Fri, 15 Dec 2023 13:59:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DIJ4ZrwUnUuYQ1TuGb8klABIiJJSq4f9bb5ok3OVrOo=; b=GY+I9f6NAQJC5RsGSjQyX0Hv7hUL8zdJLQcp6Spzz99VQLpIbJV8q8IVR/xKzt+gwVzF+H Tp9jHEkMZZrrGt5eEADwBSL92zJbdXuooM+0Sjzittd205b4FqN+on+/QAO8yW+8BopB8O Qs8z0hCX1Tvd6kpZ0U9jgZE2Q4g055PveSFKh9+0gGDADo5D3vHY7EQarH6Bu9yoecpimN 9hCq2ajrOiOXmqak+ZgeDxaymZ5d8Nts9JwiM8QHUQRkymR1BnxmZI/B3am0bBlC2Fv3DW nUJVUzTNG/pB9Duz9WslJX1OyBTSKxuEgeTQ4nsbG1jLlJjQFOuUGlCojowiyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648787; a=rsa-sha256; cv=none; b=VpndNLLYyZX8TzPR0t4QBnnd7X/65xO6l2ObtjyYG3apNUQa+aaXRG8pv5qGGH6jjqocC2 U59jiKCuiGP+W1TRq2NPxmpGpfG4lwwEQuT4jRQsO1XnLEkTqecNx43vpzvu7daSA1im+c BoXvCHg46aDhoQF2CwjVZMASyOpKo2+CAPRfYK2pVn5DfBf2I0NkdvACRBSgRLcAKBR70N tPPVPBSrFd1222aMRy5zFK9+fJzXuiC8Kg/BMipRqhUVDxnlSsFfUgiTWHGPvETCjINsYZ vW9clUtjq3S7AnngGsfl9qtV+4EQ14V1wurXTq6Foa6Pm3COarTX7PmlkY3stw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DIJ4ZrwUnUuYQ1TuGb8klABIiJJSq4f9bb5ok3OVrOo=; b=FG8nN3yvCBzXtpQXSpRw4u+AKIoQE86Po825+nWuf8dofHOHFvSRS2KIp4PdqJ6Pgxtv8w AZN3gFnCQBIqbaS2RnFOFKwqbGRjEAhobs/ztmt7wY4NorVsLIxzmPEaWhWvjNpM2s0IIp bsGG2/OyGU7lZK3JNuuxiP5G6p6uVK6FHI0KYvw+4vaiCeAkomR7XPJDTT+lMr/kSJEkWX aZ8tyTAHno/LhcM7WK6zLCcFssUW9vgA80Bq0dNbTsJ0Te/D8alXMA9sxB7b0gihr6RJ7p gVhPlhmzorNznxMMMos55MltxjnwGkcfwKvfKE77mcw0u0COglILwVBOUVyNXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ss9nv3Y5sz1C03; Fri, 15 Dec 2023 13:59: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 3BFDxlnF015694; Fri, 15 Dec 2023 13:59:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDxlBN015691; Fri, 15 Dec 2023 13:59:47 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:59:47 GMT Message-Id: <202312151359.3BFDxlBN015691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 4c9e6ad3205a - main - xen: add atomic #defines to accomodate differing xen_ulong_t sizes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c9e6ad3205a770a029cedc3056790258791e6ba Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=4c9e6ad3205a770a029cedc3056790258791e6ba commit 4c9e6ad3205a770a029cedc3056790258791e6ba Author: Elliott Mitchell AuthorDate: 2023-12-02 21:54:48 +0000 Commit: Roger Pau Monné CommitDate: 2023-12-15 13:59:26 +0000 xen: add atomic #defines to accomodate differing xen_ulong_t sizes Alas, ARM declared xen_ulong_t to be 64-bits long, unlike i386 where it matches the word size. As a result, compatibility wrappers are needed for Xen atomic operations. Reviewed by: royger --- sys/dev/xen/bus/xen_intr.c | 6 +++--- sys/x86/include/xen/xen-os.h | 10 ++++++++++ sys/xen/evtchn/evtchnvar.h | 6 +++--- sys/xen/xen-os.h | 12 ++++++------ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/sys/dev/xen/bus/xen_intr.c b/sys/dev/xen/bus/xen_intr.c index 3e44c05ceeb7..3fc8fb0fe83a 100644 --- a/sys/dev/xen/bus/xen_intr.c +++ b/sys/dev/xen/bus/xen_intr.c @@ -369,7 +369,7 @@ xen_intr_handle_upcall(void *unused __unused) /* Clear master flag /before/ clearing selector flag. */ wmb(); #endif - l1 = atomic_readandclear_long(&v->evtchn_pending_sel); + l1 = atomic_readandclear_xen_ulong(&v->evtchn_pending_sel); l1i = pc->last_processed_l1i; l2i = pc->last_processed_l2i; @@ -475,7 +475,7 @@ xen_intr_init(void *dummy __unused) } for (i = 0; i < nitems(s->evtchn_mask); i++) - atomic_store_rel_long(&s->evtchn_mask[i], ~0); + atomic_store_rel_xen_ulong(&s->evtchn_mask[i], ~0); xen_arch_intr_init(); @@ -582,7 +582,7 @@ xen_intr_resume(void) /* Mask all event channels. */ for (i = 0; i < nitems(s->evtchn_mask); i++) - atomic_store_rel_long(&s->evtchn_mask[i], ~0); + atomic_store_rel_xen_ulong(&s->evtchn_mask[i], ~0); /* Clear existing port mappings */ for (isrc_idx = 0; isrc_idx < NR_EVENT_CHANNELS; ++isrc_idx) diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h index 6a3b82c0ba62..12942375be43 100644 --- a/sys/x86/include/xen/xen-os.h +++ b/sys/x86/include/xen/xen-os.h @@ -54,6 +54,16 @@ extern int xen_disable_pv_nics; extern uint32_t xen_cpuid_base; +/* compatibility for accessing xen_ulong_t with atomics */ +#define atomic_clear_xen_ulong atomic_clear_long +#define atomic_set_xen_ulong atomic_set_long +#define atomic_readandclear_xen_ulong atomic_readandclear_long +#define atomic_testandset_xen_ulong atomic_testandset_long +#define atomic_load_acq_xen_ulong atomic_load_acq_long +#define atomic_store_rel_xen_ulong atomic_store_rel_long +#define atomic_set_xen_ulong atomic_set_long +#define atomic_clear_xen_ulong atomic_clear_long + static inline u_int XEN_CPUID_TO_VCPUID(u_int cpuid) { diff --git a/sys/xen/evtchn/evtchnvar.h b/sys/xen/evtchn/evtchnvar.h index 10eed8434ebe..455f7bcbd620 100644 --- a/sys/xen/evtchn/evtchnvar.h +++ b/sys/xen/evtchn/evtchnvar.h @@ -54,7 +54,7 @@ static inline int evtchn_test_and_set_mask(evtchn_port_t port) { - return (atomic_testandset_long(EVTCHN_PTR(mask, port), + return (atomic_testandset_xen_ulong(EVTCHN_PTR(mask, port), EVTCHN_BIT(port))); } @@ -67,7 +67,7 @@ static inline void evtchn_clear_port(evtchn_port_t port) { - atomic_clear_long(EVTCHN_PTR(pending, port), EVTCHN_MASK(port)); + atomic_clear_xen_ulong(EVTCHN_PTR(pending, port), EVTCHN_MASK(port)); } /** @@ -79,7 +79,7 @@ static inline void evtchn_mask_port(evtchn_port_t port) { - atomic_set_long(EVTCHN_PTR(mask, port), EVTCHN_MASK(port)); + atomic_set_xen_ulong(EVTCHN_PTR(mask, port), EVTCHN_MASK(port)); } /** diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h index d009b1af11fa..d7e9b3ca8632 100644 --- a/sys/xen/xen-os.h +++ b/sys/xen/xen-os.h @@ -120,23 +120,23 @@ xen_initial_domain(void) #define NBPL (NBBY * sizeof(long)) static inline bool -xen_test_bit(int bit, volatile long *addr) +xen_test_bit(int bit, volatile xen_ulong_t *addr) { unsigned long mask = 1UL << (bit % NBPL); - return !!(atomic_load_acq_long(&addr[bit / NBPL]) & mask); + return !!(atomic_load_acq_xen_ulong(&addr[bit / NBPL]) & mask); } static inline void -xen_set_bit(int bit, volatile long *addr) +xen_set_bit(int bit, volatile xen_ulong_t *addr) { - atomic_set_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); + atomic_set_xen_ulong(&addr[bit / NBPL], 1UL << (bit % NBPL)); } static inline void -xen_clear_bit(int bit, volatile long *addr) +xen_clear_bit(int bit, volatile xen_ulong_t *addr) { - atomic_clear_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); + atomic_clear_xen_ulong(&addr[bit / NBPL], 1UL << (bit % NBPL)); } #undef NBPL From nobody Fri Dec 15 18:10:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SsHMj1YXsz53t4r; Fri, 15 Dec 2023 18:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SsHMj10Sbz3GWZ; Fri, 15 Dec 2023 18:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702663857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BfChbn5n3iw0mm7vRdcv1q1rJtCLthD2dqPGVJSHmLU=; b=dCl1WAxAGNEniVhYPsolXx22qe8CixEirrlv1v6SDFES1Dej8/0xIm+6y15ZGPcwxIj54c n6jx8g3U0F5inEQW3X8seGi8W6TV/79wsh8vN5+TW3SuDeIzoFo7Z8XupzYKgvtAczVr3E ivFcrzx2YC1wdBzOISXWun8Ja5+3Gp3AErF/aefdDIfONT1+YeM00Cr+bQcPMvra8cWaKt /nzCkyL0F3uZHBsiYF0e2s2joMxE4AJNbH4nUnebYrcrT4tUW93aNTWQLW556rwIY7p4yi PHhw60bX4g/0IV8r/Jy0HIq7oEytc95vm5aB+8K5nnLaPvdzZ7mgWO66GCNQbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702663857; a=rsa-sha256; cv=none; b=DxlxARJj2ra/nHROllhU8C8Tu3xpy5pgqRXME1/zvnU7EB3Iu2QVn9irqn0aTpP1jIEY2P ika7QcPfITDceDuGHdYVbwJPnDH9+DrtIZM45H1oUkyUrwQNN8pznXzuGaJuDS92l8Bo0d KaG1TJ9by1F9a2i3ylgQS3B11SiXbgHOoSsKBUzznBQEGzpEoYuf7tArMFjE+KEoGtIffB EjCFiv6BfysSkOYVgvSNtiXfc5Vl08+j14v6gJ07sM6jRM4C/peyW+rCVYrlf3i+QKhZmI RWq9QWDPfDRG3QkzxtHqDEZNOrs7FLnkQIlz+mVKMOEAdL1AlgdmlBOVaTO9uQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702663857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BfChbn5n3iw0mm7vRdcv1q1rJtCLthD2dqPGVJSHmLU=; b=UyQGqnnE1ItUQF4j9POkOVOhwVzZ30ZRB9Mllwe/So8r+HtshtQH5xSBd1W44TcgVaJ4L8 WQgM6O9Om4ogzhz2KGSwuWvJIUiF0sSM4T1IWdAiqEMZxQqv0ypSqK/mToF/AjOH24H1aK GLf1ZwteMFdN7+jetp9AD3gyNyi3F5IfVPAgESL5vQW+GWzhcOay2xqU6znm1FCSPXm3aL IGpIeY1HAbJpmRSpIZNr/Ezp4cKvpbHqoyAdB6xcGzadbMHbrvqbQ2lLDoLCfb1DlCNo8h Scrr5Tf0sIFw/bmMv9RKO2JhcFwBuxI/gVr69L6yaPxG+v7LwFWKlw/22rZDZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SsHMh740sz5dX; Fri, 15 Dec 2023 18:10:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BFIAuDC043967; Fri, 15 Dec 2023 18:10:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIAurY043964; Fri, 15 Dec 2023 18:10:56 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:10:56 GMT Message-Id: <202312151810.3BFIAurY043964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 863975b6840b - main - release/Makefile.vm: Add cloudware overrides List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 863975b6840b2833b0f772648ba2532806ffece8 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=863975b6840b2833b0f772648ba2532806ffece8 commit 863975b6840b2833b0f772648ba2532806ffece8 Author: Brad Davis AuthorDate: 2023-12-15 18:08:50 +0000 Commit: Colin Percival CommitDate: 2023-12-15 18:08:50 +0000 release/Makefile.vm: Add cloudware overrides Allow the cloudware *_FLAVOURS and *_FSLIST values to be overridden at the command line, to assist users who want to e.g. build only one of the many EC2 AMIs available. --- release/Makefile.vm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 58703de16cf3..cab46bb737b3 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -23,28 +23,28 @@ CLOUDWARE_TYPES?= BASIC-CI \ OCI \ VAGRANT AZURE_FORMAT= vhdf -AZURE_FSLIST= ufs zfs +AZURE_FSLIST?= ufs zfs AZURE_DESC= Microsoft Azure platform image BASIC-CI_FORMAT= raw -BASIC-CI_FSLIST= ufs +BASIC-CI_FSLIST?= ufs BASIC-CI_DESC= Image for CI EC2_FORMAT= raw -EC2_FSLIST= ufs zfs -EC2_FLAVOURS= BASE CLOUD-INIT +EC2_FSLIST?= ufs zfs +EC2_FLAVOURS?= BASE CLOUD-INIT EC2-BASE_DESC= Amazon EC2 image EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw -GCE_FSLIST= ufs zfs +GCE_FSLIST?= ufs zfs GCE_DESC= Google Compute Engine image OCI_FORMAT= qcow2 -OCI_FSLIST= ufs +OCI_FSLIST?= ufs OCI_DESC= Oracle Cloud Infrastructure image OPENSTACK_FORMAT=qcow2 -OPENSTACK_FSLIST= ufs +OPENSTACK_FSLIST?= ufs OPENSTACK_DESC= OpenStack platform image VAGRANT_FORMAT= vmdk -VAGRANT_FSLIST= ufs -VAGRANT_FLAVOURS= VIRTUALBOX VMWARE +VAGRANT_FSLIST?= ufs +VAGRANT_FLAVOURS?= VIRTUALBOX VMWARE VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox VAGRANT-VMWARE_DESC= Vagrant Image for VMWare From nobody Fri Dec 15 22:09:19 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SsNfm10gpz5497q; Fri, 15 Dec 2023 22:09: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 4SsNfl59Z2z3dqq; Fri, 15 Dec 2023 22:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702678159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tIfifwJku5x5ey3DQ6YR5eqfzLXkwLNcdkuUMJUvJm0=; b=nMl3q+Upasui2PmYVepIt4BEcks5uhDe37mKmSSTRNHULqICnoViLcYrBU1ZN7qcjkAQNP fVJcWzWUTfryyFKnAUm/xHhOffw74fIVpJsuWuMiHalppMTPouUOqFd9cBxwVazP175CUe 9u34/XJHFFlxiQnxjIDkrmnhmnSHT7RDwZ0SD7h3hoSkHgUdu72G4St06ta/w0kY9l7LXn sT3aOJ2iPKeWXjR2l/z6EcYy01WZf19/tkPf4abh4luxXx4PXnRLK1MQdPalYOOUmNnWvm /WtCFwv7vHp6/5FQf2f2r4jFYa+voY3bOOxl5IBg1odYOeKHOv2Q3ASbqkBfWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702678159; a=rsa-sha256; cv=none; b=I/LCkjF3I9Do4ZmGH5ZO+h+laInIuuQKOfJNik7TPamYjnwY2b0eBTFlqMvWRsQV3VQwHe jrKZUJfulPqIT34J3jEYTGN3E7wB+ERf0FnlAkqAXHJdaQc+1W+7BAj2llVJHt828Y6zZV KcpdYUdITu6d1ganfIbHSbppRtejmrbBm50wt6mZIzeWuw55aVhZbeuCj+dRnO3OgxzPMm CRSje7ajwzFayOwZoBHePVxG87oMdfzO+s4hZ+dwRxbTqIsALdSm/m6Sg09ic26re1lAlY v0DaLxhL5KbwRHGOLiSRc0Dvfw4ybhfi6Q+NQUhtq537lg1ycicc12tRgHsfwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702678159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tIfifwJku5x5ey3DQ6YR5eqfzLXkwLNcdkuUMJUvJm0=; b=NpY5EkHBusQvA+vcuuxRiZ5gAZJkS2IFdB0qwIdws4pHYY7CLgbBgda8zSybdqQV9bJ9Vx FdpeGmF7Jb2166lm8vdkDsXOSQQsdMIWOVE4lHZz/78PMCOtNs2Y26hb4Mh3miyYTygmQY p9WUqxcY4eOE+tlyZKwDcYrJxj6FmH1hhvA7wuVl8iUYyNeVnQbma0iL4jSTspW+tZop+q tY+NeNp2vC+kf6phzknynjGolR3JNLorfs50hvFVT3Jp71IMr05Fy07jfT7NpFZMozA9k3 8Zn8ym0C646QxhQ2x88b2AlLAnNX+kbb/c0mXKHWY5BPvWREqYFoknMX1E214g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SsNfl4DtLzD8k; Fri, 15 Dec 2023 22:09: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 3BFM9JYQ038545; Fri, 15 Dec 2023 22:09:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFM9J2o038542; Fri, 15 Dec 2023 22:09:19 GMT (envelope-from git) Date: Fri, 15 Dec 2023 22:09:19 GMT Message-Id: <202312152209.3BFM9J2o038542@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: ca39f23347e1 - main - ufs: do not leave around empty buffers shadowing disk content List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ca39f23347e1416a28dde13279bfe5841ad9a746 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ca39f23347e1416a28dde13279bfe5841ad9a746 commit ca39f23347e1416a28dde13279bfe5841ad9a746 Author: Konstantin Belousov AuthorDate: 2023-12-11 22:57:28 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-15 22:06:10 +0000 ufs: do not leave around empty buffers shadowing disk content If the ffs_write() operation specified to overwrite the whole buffer, ffs tries to save the read by not validating allocated buffer. Then uiommove() might fail with EFAULT, in which case pages are left zeroed and marked valid but not read from the disk. Then vn_io_fault() logic retries the write after holding the user pages to avoid EFAULTs. In erronous case of really faulty buffer, or in contrived case of writing from file to itself, we are left with zeroed buffer instead of valid content written back to disk. Handle the situation by releasing non-cached buffer on fault, instead of clearing it. Note that buffers with alive dependencies cannot be released, but also either they cannot have valid content on the disk because dependency on data buffer means that it was not yet written, or they were reallocated by fragment extension or ffs_reallocbks(), and are already fully valid. Reported by: kevans Discussed with: mav In collaboration with: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_vnops.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 0a327aab155b..e9849008cde2 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -978,8 +978,15 @@ ffs_write( * validated the pages. */ if (error != 0 && (bp->b_flags & B_CACHE) == 0 && - fs->fs_bsize == xfersize) - vfs_bio_clrbuf(bp); + fs->fs_bsize == xfersize) { + if (error == EFAULT && LIST_EMPTY(&bp->b_dep)) { + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + brelse(bp); + break; + } else { + vfs_bio_clrbuf(bp); + } + } vfs_bio_set_flags(bp, ioflag); From nobody Sat Dec 16 13:19:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SsmrW5kLRz53vtH; Sat, 16 Dec 2023 13:19: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 4SsmrW5Hvzz4ZCQ; Sat, 16 Dec 2023 13:19:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702732747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRFTwzc+64DR1y+RE+5ErRVFcZnsZOoKT+glmXaxGAc=; b=XvNYIgsZ7Gxnvo6VrLxkVQTaQWDg/PPCELe0N6gpGck2VxaSz7SOCZsH1x+dAZJl3AEza7 NFCC8bS3nEW/zXYMsCLHa8gYiaoDe2VFxhvQA/wWenw4FI5iC4O0uv+MXrw6GgbiqpxVX7 Yq/YJAF1QUFwluPrKs2q0touE2elsZSg8EuxeAC0HPx4ModFwZTKYxUFNGr6tEt5Pq5oiI 4RzAlWlX4tZOUXOlyxxvJfWB2QWWRBZDbSQDo0UMiQViyk0AVarvbVsnneakQHsO0oZD3o kjET6IIzWVJqzpyqp0Ww/pk7gdQ2lZN88K2R0R9pjQo/GSUhDa8xdZUTTh1Pgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702732747; a=rsa-sha256; cv=none; b=TcmWrwAeURciV1TjEVrpPnbyE0cGcS2iqD8luC8z7zB8wBDd0JNI68Ozo3TBZm3hUu7l2i wvj25w8zUBXSCyjAs92LCQ3KsX6j37sqnY1hBB/dGzofM4Cdze6zSWa9N74wSI12jsy82D nKM8+LMO9Qbd105L1cZk9OHv5MmS2lXmwd7ClHQtOlXqbFLAEu4PZULU1Endw7x+ijdndT o90O6k+R3809d83vifPIykfH4YL4y0E9YzIZAoJEauPWREePnbNzYX4n21cnqkrOmIs8+U 2r6QlSGUJQ2wadZYj1kQMOllyEVuTj1+VeAUpqTapjPeOobM5bDiQUjte6eAkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702732747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRFTwzc+64DR1y+RE+5ErRVFcZnsZOoKT+glmXaxGAc=; b=YMq6pLO3YGX7UoVp26US4Kw8DhsNwkFq7R9LhZHB2zoSqMbnYaVsgjQuypzKM1yzQMI4fh n1LYDRrPZKCwgaTnGW8/X5xjsiY0M+p9W+OgB8q5SB/mzG5Z+gTPElwpibZo09JOdhMPbb cbu96U0u3bXcnf0B+XJap9BNNGV7vl3myK17vxV8MEqwG+lHxVrPP2zmk0iM4ad3eqclO5 rsaeNeSlsUJAIAjvzFQjiSq0LhPvjtGBnP5uF/XqXPVJ96TR0TkgOMX0sDcZr4sQwKx0Ou 0/gbNeHcrjT6o7aq80Plf3viFTImcJmwiK4PpWx14oIVOoPoGptAVt9/hC/Esg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SsmrW4N3lzwHF; Sat, 16 Dec 2023 13:19: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 3BGDJ7Pi063109; Sat, 16 Dec 2023 13:19:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BGDJ7p1063106; Sat, 16 Dec 2023 13:19:07 GMT (envelope-from git) Date: Sat, 16 Dec 2023 13:19:07 GMT Message-Id: <202312161319.3BGDJ7p1063106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: 6f3e9bac4d46 - main - vm: Plug umtx shm object 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: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f3e9bac4d46d789af3e563f47681d0a020582ed Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=6f3e9bac4d46d789af3e563f47681d0a020582ed commit 6f3e9bac4d46d789af3e563f47681d0a020582ed Author: Pawel Jakub Dawidek AuthorDate: 2023-12-16 00:33:29 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2023-12-16 13:18:36 +0000 vm: Plug umtx shm object leak. Reviewed by: kib Approved by: oshogbo MFC after: 1 week Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D43073 --- sys/vm/vm_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index b559c9d2cbab..c141b410edf2 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1995,6 +1995,7 @@ vm_object_collapse(vm_object_t object) backing_object)); vm_object_pip_wakeup(backing_object); (void)refcount_release(&backing_object->ref_count); + umtx_shm_object_terminated(backing_object); vm_object_terminate(backing_object); counter_u64_add(object_collapses, 1); VM_OBJECT_WLOCK(object);