From nobody Sun Dec 31 13:47:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T30lq4R9jz55n9x; Sun, 31 Dec 2023 13:47:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T30lq3vlZz4FcD; Sun, 31 Dec 2023 13:47:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704030423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WsP8DNwIAJr8CPMrOg4cG30y1JwPeE782yewcWoV5hs=; b=d+eAV4tQlE1NaoUgwoo1iFyUP07KREpkKA4hA6Z/lCzP9pIbeHb9z37orwdNMoTdHTu5O+ 0T89OqRLti+R/1hYP5EhcRbHHtP+AB4vku1ADkZNAZ2jN4vqqHlzJHLnPqmgBDHzGjls5g lzoLa+nBJ6QjvmdFOmzo+yZNt8bCpgWOrN0g12qe9ZJuZu7GzdI9GsBhiMUB+xADk8rGHh 43P82tv890AbYPUYtIuZwJX6vS1klLZpzquErzZLPJUGsKMiFUHj91j5DA8QrC4tCykya6 3tOecvuUoJObemWEGqAaZ56TwLZbhYsgOzgJ3zbk5f30poufYBPCTMGW/k0xCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704030423; a=rsa-sha256; cv=none; b=ZC/984XaorFjvvceQlFshiIDR53BbXovR8mAQqV9MdZVGfN311STAAeVPBw1K4Psg4G8Dr Z3mnh/Xd36ZtMYhzuRZNnrmknfghkmPLIhY63Er2UJonJz2yp+VRZ/hGjZF4x3SIJzOTto zQRmID03m0jF5/yMFZUVb8IdEwV7OKSVPAwDxnjuF76Kc7VRJXmvjU1NyVe0si5KvA/auC InbnFtkpM6mHQyGSiK+PHCeTBkSNr/SuP5ZlGyHaOhqfq9KV2h1NyKeE1nBJQNMxjc6+/d cC3iMgcj4iPO90+TNbK7K7ozuzQdxf98SDwHEzK72K20ZbubbGgWMSiPsCdETA== 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=1704030423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WsP8DNwIAJr8CPMrOg4cG30y1JwPeE782yewcWoV5hs=; b=uET0tMs3kgrg0kHyL6ZHzI5FcUWcT7jZPJ+qVEWOsYMsUHsE+mqsmEl7O8BUkuemOOmMyo K5tjO06FQCBhetiVAl6zrg5bNOBO4sckAOte4o1T4cFWum5cPV2FS/nvg1yuGq/X2+3Lxg +SojABnG4qSE8Nuw0EfviXGXBhTc1N2xUiDj3m2M1/mtQxFE2v2x3qrd6EZ2lqnEh5C7ej oR5KU0va6xWzp2/N4DBUh+34T8IV5pgnvA8I+BzXMB61uKQwBZhNZLR4/gi1EKOt8+ZY1Z JpIPGkhaK5mZHeNdHpa4g2kQ44FxzOlSNvAVdD3nybV+Jrebsqoq7Z46tngBmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T30lq2rbMzcfZ; Sun, 31 Dec 2023 13:47:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BVDl3WA073628; Sun, 31 Dec 2023 13:47:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BVDl38O073625; Sun, 31 Dec 2023 13:47:03 GMT (envelope-from git) Date: Sun, 31 Dec 2023 13:47:03 GMT Message-Id: <202312311347.3BVDl38O073625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: ab71e3480921 - stable/14 - fortune: update mailing list search url List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab71e3480921a8dec26a19d160a91c0531095418 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ab71e3480921a8dec26a19d160a91c0531095418 commit ab71e3480921a8dec26a19d160a91c0531095418 Author: Christos Margiolis AuthorDate: 2023-12-27 16:28:11 +0000 Commit: Christos Margiolis CommitDate: 2023-12-31 13:46:55 +0000 fortune: update mailing list search url Markmail no longer exists. Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D43209 (cherry picked from commit 2b1c477d88e579585c6b3ba5f6ded70b9a05e3c3) --- usr.bin/fortune/datfiles/freebsd-tips | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index 3ee4ca3a5972..aed66f2295e2 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -388,7 +388,7 @@ You can make a log of your terminal session with script(1). You can often get answers to your questions about FreeBSD by searching in the FreeBSD mailing list archives at - http://freebsd.markmail.org + https://lists.freebsd.org/search % You can open up a new split-screen window in (n)vi with :N or :E and then use ^w to switch between the two. From nobody Sun Dec 31 13:47:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T30mh4vTXz55nB2; Sun, 31 Dec 2023 13:47: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 4T30mh4Pdkz4G3R; Sun, 31 Dec 2023 13:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704030468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L9TR7DVc8UQqon4pEC/MHXz3pZ+r25e7KPHJY1bruN0=; b=kIK7kkTzI7nhmGXkDu0SugQeTbP9bnGeOCIuKJL+qsYqe65I1Kg40siexqe/Ff5e+s4CMT 99q+XLrXZKiaol71PqgmQrCbA2tPt2W58kfX4db0ZtWJ7o7JaqhIyADHJgFtTKdOb5lxNn vz4GfMc2dd+2GnEm9ImLpAEyU8e8HN3dkL6oG6sgZgJEJFVjCZXE/OU9X7LqewdU3Gz7Rf DZGM9Y7Ad0wiKngo9Fpyk+LAS2ZKC/HgKWFeB0m2iyjXEd0lhLWCQL8qlUehG24k7ZZrF8 8XUkn7agu3teygH5IPS8Xcudyb34K/QHTxRzrslwHnbSCjnTYUBzPHYujhNu7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704030468; a=rsa-sha256; cv=none; b=TJlHjnLedOtVi4sKZwh7vqtJPyT2fZUL7I5bLOxxWEkRWLlTzENfzJKwbo5sElUrEGbs7N aT1o+dXyqD2EKB2mZgcy8+ADwLmxQpdpi8A651Ptqkqs6GFE0BQ7sgeZ/E5yakwgwbO3u0 nCkC5a87vVZf6K0btgF+zft0kAEPN1CFLfwCLaVPgMX3w2Wiunag7PiBEP4DuLw76H/ygv ajt5T6ThJJbAKVUG4c62PUz4+9CwxFzyLMseZC+0e1SlQMSuh/+QD0eQsyf97BluJUkjf0 1zMp3KvXsYg/gllrdkSptWbajTTlbXBb3OdmxCnO4Fj1TPz+spekryLx1VqiWQ== 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=1704030468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L9TR7DVc8UQqon4pEC/MHXz3pZ+r25e7KPHJY1bruN0=; b=b0nKJbtbHn27ZIwNlOVyMSCNGhkMQu+BK+Aw6BRfyDvY1v+VyhbhZVzMQkzPQjWXpTBMoa Rzr5yeONLFbFR1vMHaHZtr0IEkuuXpat+tqaOu2+NwPluHRxh2WwmLSXAz42u9jVemt+GP XxSCIUmVHBWU3FVaNQoepqcRXfaxEzRIQ4cWExsAdrJaiu2ZWbmk/znmzJ/WtWeR6X5d6M pXlwqZUYmsx67ENS/Us1d3FcS3N6ocIxF5Aervbbed2Pxb/tU7bk8FIWHg47e9E8qxUcWu 2heNMX+9+C03QAY9U7tWlG+YFuHCEKc0WhmbvP57Nr+LwiS0tt/gL60R9B9eRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T30mh3SDBzcSl; Sun, 31 Dec 2023 13:47: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 3BVDlmhf073854; Sun, 31 Dec 2023 13:47:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BVDlm3i073851; Sun, 31 Dec 2023 13:47:48 GMT (envelope-from git) Date: Sun, 31 Dec 2023 13:47:48 GMT Message-Id: <202312311347.3BVDlm3i073851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: eefdc4a34875 - stable/13 - fortune: update mailing list search url List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eefdc4a34875d7f5a4a4fcff637ca019641e2d14 Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=eefdc4a34875d7f5a4a4fcff637ca019641e2d14 commit eefdc4a34875d7f5a4a4fcff637ca019641e2d14 Author: Christos Margiolis AuthorDate: 2023-12-27 16:28:11 +0000 Commit: Christos Margiolis CommitDate: 2023-12-31 13:47:37 +0000 fortune: update mailing list search url Markmail no longer exists. Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D43209 (cherry picked from commit 2b1c477d88e579585c6b3ba5f6ded70b9a05e3c3) --- usr.bin/fortune/datfiles/freebsd-tips | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index 7d7b8fb0b580..d1edb8688f23 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -390,7 +390,7 @@ You can make a log of your terminal session with script(1). You can often get answers to your questions about FreeBSD by searching in the FreeBSD mailing list archives at - http://freebsd.markmail.org + https://lists.freebsd.org/search % You can open up a new split-screen window in (n)vi with :N or :E and then use ^w to switch between the two. From nobody Mon Jan 1 09:13:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3Vf34Yfrz56M64; Mon, 1 Jan 2024 09:13: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 4T3Vf33xylz4JMG; Mon, 1 Jan 2024 09:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704100427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AGL/mCNJPZ7NhSC8rgyJ/vUgKXgtOAyQWl2iNbU1jKc=; b=cAhoCrzm9Ohz7If9mjMJnm9QXFLRwOjcX3YQD/ybJbMDXb9Wl13PYeSl8evshw28dhjYxz GrlHWAv35JUMVSssNZwUqpfWqkPOyWBBmN44xFebkz+iM1a2pORxGfkiuR3Dc/dallQY9a mJpuMX7avt7OyjhogYlUrD2L/rxOuB6GSndEjCHBAaFf7T7X+aotp31HLTiL4bIJ5dwnas t0YVOS4zLu9/AB5jUEN4kjnAsoy+OLvnlxcWp4X5LqfARCjLHoh1yxM5CSBHgAYaIAoRuX cmGEV7wEjGr20YOU2CShVzLwsf0axFgfw5f3oi+77espK1cq3g66dQImngXNYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704100427; a=rsa-sha256; cv=none; b=LdMldglWxnusl3VOGsv9Jg+zGI/jQduTpNmrWV++pq4dkqS/7icJkT39whwIWjsdW9wYm7 vh65FSdrG/rjRnU2f+492EruMAfMXuvs+SPBNxctw7CTag0Mv+ml/fGTjWPwBEJgyyEgy0 BzScEReBwESKtHdpvLAP7GAtR/xLX9ya60HLyQIXqbPnxU5UPiErb1WzQDi4IGFbcy/DhY XbZhlZ6cCJh/CshoUBtMRYE1+FCno8KAJv/98PKyC2mnydhrxs7Yph0E1quQSy5ffRD23e 2WTg5sZ0t42Odab+7E63ms6cYlMOKbNcrRkr+6CUDDYytrTA1ancYZsQV+YhiA== 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=1704100427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AGL/mCNJPZ7NhSC8rgyJ/vUgKXgtOAyQWl2iNbU1jKc=; b=tsJyspYf6b9EAtyomKZFWdT9uxEFeT5ojoMsRhe78778JgzM914AUVRStNOESTpQYOt3ul Q2MiiWYp2KV38YmVSZ6JyWx5AEz+9NdS7j+6f2PULw/DaVTZFsidRQjijiuGmM2kO2Xfwm cMReOzwYL2f9Up65llDMpR6qmzcVQHmU3/7tOwtGPrSlq71bQCfifcf7mYtpQzqDFPXD+f T/1QPP8URW88SL9zmeRbnt886JSMKmSA3SHF8OQDQUJYniyjnB59sFH3be61tPjiBjkgp1 Ud+wb1RfHu51aSS8Mehm55/IwB/2/58uPqYg44QeMh0bvgFD2SvS9Vzmy0/avw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3Vf330hRz1BMm; Mon, 1 Jan 2024 09:13: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 4019DlGO037587; Mon, 1 Jan 2024 09:13:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4019DlmB037584; Mon, 1 Jan 2024 09:13:47 GMT (envelope-from git) Date: Mon, 1 Jan 2024 09:13:47 GMT Message-Id: <202401010913.4019DlmB037584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ronald Klop Subject: git: 3d96ee7c7dcc - stable/13 - Teach if_smsc to get MAC from bootargs. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ronald X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3d96ee7c7dcc54995894985ef2beacc4c4f57956 Auto-Submitted: auto-generated The branch stable/13 has been updated by ronald: URL: https://cgit.FreeBSD.org/src/commit/?id=3d96ee7c7dcc54995894985ef2beacc4c4f57956 commit 3d96ee7c7dcc54995894985ef2beacc4c4f57956 Author: Ronald Klop AuthorDate: 2023-11-04 14:14:00 +0000 Commit: Ronald Klop CommitDate: 2024-01-01 09:13:13 +0000 Teach if_smsc to get MAC from bootargs. Some Raspberry Pi pass smsc95xx.macaddr=XX:XX:XX:XX:XX:XX as bootargs. Use this if no ethernet address is found in an EEPROM. As last resort fall back to ether_gen_addr() instead of random MAC. (cherry picked from commit 3878bbf1bb9e68f8579b57cde7d4e5c77de93320) if_smsc: fix build on armv6 & armv7 compile error was: /usr/src/sys/dev/usb/net/if_smsc.c:1597:40: error: format specifies type 'unsigned long' but the argument has type 'ssize_t' (aka 'int') [-Werror,-Wformat] "failed alloc for bootargs (%lu)", len); ~~~ ^~~ %zd (cherry picked from commit 8a0ee306227a17a998bdc7af2275fd94b9164342) PR: 274092 Reported by: Patrick M. Hausen (via ML) Reviewed by: imp, karels, zlei Tested by: Patrick M. Hausen Approved by: karels Relnotes: yes Differential Revision: https://reviews.freebsd.org/D42463 --- sys/dev/usb/net/if_smsc.c | 86 +++++++++++++++++++++++++++++++++++++++++++++-- sys/net/ethernet.h | 1 + sys/net/if_ethersubr.c | 10 ++++-- 3 files changed, 92 insertions(+), 5 deletions(-) diff --git a/sys/dev/usb/net/if_smsc.c b/sys/dev/usb/net/if_smsc.c index b02f1c180679..e6f811754555 100644 --- a/sys/dev/usb/net/if_smsc.c +++ b/sys/dev/usb/net/if_smsc.c @@ -179,6 +179,8 @@ static const struct usb_device_id smsc_devs[] = { #define ETHER_IS_VALID(addr) \ (!ETHER_IS_MULTICAST(addr) && !ETHER_IS_ZERO(addr)) +#define BOOTARGS_SMSC95XX "smsc95xx.macaddr" + static device_probe_t smsc_probe; static device_attach_t smsc_attach; static device_detach_t smsc_detach; @@ -1538,6 +1540,76 @@ smsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) return (rc); } +#ifdef FDT +static bool +smsc_get_smsc95xx_macaddr(char* bootargs, size_t len, struct usb_ether *ue) +{ + int values[6]; + int i; + char* p; + + p = strnstr(bootargs, BOOTARGS_SMSC95XX, len); + if (p == NULL) + return (false); + + if (sscanf(p, BOOTARGS_SMSC95XX "=%x:%x:%x:%x:%x:%x%*c", + &values[0], &values[1], &values[2], + &values[3], &values[4], &values[5]) != 6) { + smsc_warn_printf((struct smsc_softc *)ue->ue_sc, + "invalid mac from bootargs '%s'.\n", p); + return (false); + } + + for (i = 0; i < ETHER_ADDR_LEN; ++i) + ue->ue_eaddr[i] = values[i]; + + smsc_dbg_printf((struct smsc_softc *)ue->ue_sc, + "bootargs mac=%6D.\n", ue->ue_eaddr, ":"); + return (true); +} + +/** + * Raspberry Pi is known to pass smsc95xx.macaddr=XX:XX:XX:XX:XX:XX via + * bootargs. + */ +static bool +smsc_bootargs_get_mac_addr(device_t dev, struct usb_ether *ue) +{ + char *bootargs; + ssize_t len; + phandle_t node; + + /* only use bootargs for the first device + * to prevent duplicate mac addresses */ + if (device_get_unit(dev) != 0) + return (false); + node = OF_finddevice("/chosen"); + if (node == -1) + return (false); + if (OF_hasprop(node, "bootargs") == 0) { + smsc_dbg_printf((struct smsc_softc *)ue->ue_sc, + "bootargs not found"); + return (false); + } + len = OF_getprop_alloc(node, "bootargs", (void **)&bootargs); + if (len == -1 || bootargs == NULL) { + smsc_warn_printf((struct smsc_softc *)ue->ue_sc, + "failed alloc for bootargs (%zd)", len); + return (false); + } + smsc_dbg_printf((struct smsc_softc *)ue->ue_sc, "bootargs: %s.\n", + bootargs); + if (!smsc_get_smsc95xx_macaddr(bootargs, len, ue)) { + OF_prop_free(bootargs); + return (false); + } + OF_prop_free(bootargs); + device_printf(dev, "MAC address found in bootargs %6D.\n", + ue->ue_eaddr, ":"); + return (true); +} +#endif + /** * smsc_attach_post - Called after the driver attached to the USB interface * @ue: the USB ethernet device @@ -1552,8 +1624,10 @@ static void smsc_attach_post(struct usb_ether *ue) { struct smsc_softc *sc = uether_getsc(ue); + struct ether_addr eaddr; uint32_t mac_h, mac_l; int err; + int i; smsc_dbg_printf(sc, "smsc_attach_post\n"); @@ -1585,11 +1659,17 @@ smsc_attach_post(struct usb_ether *ue) #ifdef FDT if ((err != 0) || (!ETHER_IS_VALID(sc->sc_ue.ue_eaddr))) err = usb_fdt_get_mac_addr(sc->sc_ue.ue_dev, &sc->sc_ue); + if ((err != 0) || (!ETHER_IS_VALID(sc->sc_ue.ue_eaddr))) + err = smsc_bootargs_get_mac_addr(sc->sc_ue.ue_dev, + &sc->sc_ue) ? (0) : (1); #endif if ((err != 0) || (!ETHER_IS_VALID(sc->sc_ue.ue_eaddr))) { - read_random(sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN); - sc->sc_ue.ue_eaddr[0] &= ~0x01; /* unicast */ - sc->sc_ue.ue_eaddr[0] |= 0x02; /* locally administered */ + smsc_dbg_printf(sc, "No MAC address found." + " Using ether_gen_addr().\n"); + ether_gen_addr_byname(device_get_nameunit(ue->ue_dev), + &eaddr); + for (i = 0; i < ETHER_ADDR_LEN; i++) + sc->sc_ue.ue_eaddr[i] = eaddr.octet[i]; } } diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h index 7a763c15ff26..6a16f6f92b57 100644 --- a/sys/net/ethernet.h +++ b/sys/net/ethernet.h @@ -450,6 +450,7 @@ struct mbuf *ether_vlanencap_proto(struct mbuf *, uint16_t, uint16_t); bool ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, const struct ether_8021q_tag *); void ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr); +void ether_gen_addr_byname(const char *nameunit, struct ether_addr *hwaddr); static __inline struct mbuf *ether_vlanencap(struct mbuf *m, uint16_t tag) { diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index a3466c94d312..b361af2fe428 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1444,7 +1444,7 @@ ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, * allocate non-locally-administered addresses. */ void -ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) +ether_gen_addr_byname(const char *nameunit, struct ether_addr *hwaddr) { SHA1_CTX ctx; char *buf; @@ -1463,7 +1463,7 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) /* If each (vnet) jail would also have a unique hostuuid this would not * be necessary. */ getjailname(curthread->td_ucred, jailname, sizeof(jailname)); - sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, nameunit, jailname); if (sz < 0) { /* Fall back to a random mac address. */ @@ -1492,5 +1492,11 @@ rando: hwaddr->octet[0] |= 0x02; } +void +ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) +{ + ether_gen_addr_byname(if_name(ifp), hwaddr); +} + DECLARE_MODULE(ether, ether_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); MODULE_VERSION(ether, 1); From nobody Mon Jan 1 16:42:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3hc10W1zz573ng; Mon, 1 Jan 2024 16:42: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 4T3hc075lfz3DWg; Mon, 1 Jan 2024 16:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704127361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NuOjcMQHStxPdHpm47Jo9jEDJvbeKnTlc+cPpqMZXUI=; b=m6kh58NKlTZN0XET8k3PLM4Kx4++FzmNwKJ4ws+2/VC2iw2RAiRIQRfTflNH/mv9HkN2ux Wf5H/pzn9aqZRHCcQMeMpoGi8e0onpzfES48En5P1k9ZSLjV5DdYfP6XaXCwZgcOjTZosp Dahn2V14h2ABPbYX4+wN76DpFV59nG7F8e5zzXMYOd1lNzBvB0DTKgD6efddJe3PoL+UeL LSkTL5/FDfaCxJvT8sB/ClX8fOQJmrTbtFEp9kP0bsFFYuYntdinr+lgX6c1z44IMnRUI6 FIg2DaKQRcNeqI/yWjZNXkWhuaICnhAhF6EjID7LLE60nD2fh44bawN+boTKMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704127361; a=rsa-sha256; cv=none; b=QwyIUfm1xTsNCzJCksvVrygOBJrSPKbWhX+Ivg9mh4qQaTChIzRXVR3YtlCzQwsx1RNK7l OBRxoTsPqk/p1Xe3Z6tUxfEIzn/L4Lldn/QwmKtZ+Jj533lts6mkVjjZ4Xzt7l4lOFkt/e CdwXoLm1PCGIS5vzODuq47dcIkgHsZnUs8dae07Niqebwx0Wv5uYXJZTJ38nrKD52bBgIa 6GnGNamLPmDrX6fVauQuBOxh9El9WWE5JCIuBOhW6Osb2M2xAACpBHMnxnmOeS9KqrJWQE m0j2w2epJ0KMbdw0E6KC2HoLYID4KYMJ+/I/lFTdgwNHBwFsunzIs95muT5Kew== 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=1704127361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NuOjcMQHStxPdHpm47Jo9jEDJvbeKnTlc+cPpqMZXUI=; b=qF4Yws1zHPnANH4zkFWpcyqj9dUHIf0TZtBZSTtGmIcqJ9o8P4gJKoPLLxXCqjywKqrtAp X9Nvv4erTgK80gEG1wbuPMmmQBCaY9gwj3exr1+A1V3HA9yj0X70jlgJXnsx2k7WGP8RTM WdjwFDIOAU9J22HfvCD5C/3AO3tkDyFbQq6lktC7zMq/i5aZVGN6ElEa81qrzAOYlQyLDf 7Nthp73bg4jxWIvLg7KWpAoT7lxPXhuEk2E2e+Db0HMnarnfAHZDETdn0WR4gu8nC6NcYT LOryXtXmEn6M3fPBq1p8VyHvyxokznvOaiiyMfNTG0CAbZiyexjymbZLtlcq/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3hc068HJz9sT; Mon, 1 Jan 2024 16:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 401Gge0t089305; Mon, 1 Jan 2024 16:42:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 401Gges9089302; Mon, 1 Jan 2024 16:42:40 GMT (envelope-from git) Date: Mon, 1 Jan 2024 16:42:40 GMT Message-Id: <202401011642.401Gges9089302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 8334205c84cf - stable/14 - Reorganize libclang_rt Makefile and make more lib/arch combos available List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8334205c84cf8fb2006cc9dc9fdeecaa855242b3 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8334205c84cf8fb2006cc9dc9fdeecaa855242b3 commit 8334205c84cf8fb2006cc9dc9fdeecaa855242b3 Author: Dimitry Andric AuthorDate: 2023-12-28 12:57:41 +0000 Commit: Dimitry Andric CommitDate: 2024-01-01 16:34:04 +0000 Reorganize libclang_rt Makefile and make more lib/arch combos available Upstream has made more clang runtime libraries available for more architectures, so add them. To make this easier, split up subdir lists into functional parts (asan, tsan, etc), and put each architecture into its own .if block. Effectively, this adds the following libraries for aarch64: asan, cfi, fuzzer, msan, safestack, stats, tsan, ubsan, xray. PR: 262706 MFC after: 3 days (cherry picked from commit e77a1bb2757471ab3fed0750b76eeb15d0c7b10a) --- lib/libclang_rt/Makefile | 162 ++++++++++++++++++++++++++--------------------- 1 file changed, 91 insertions(+), 71 deletions(-) diff --git a/lib/libclang_rt/Makefile b/lib/libclang_rt/Makefile index 40fd7dfab8fb..46f7fdf814be 100644 --- a/lib/libclang_rt/Makefile +++ b/lib/libclang_rt/Makefile @@ -1,75 +1,95 @@ -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" -SUBDIR+= include -SUBDIR+= asan -SUBDIR+= asan-preinit -SUBDIR+= asan_cxx -SUBDIR+= asan_dynamic -SUBDIR+= asan_static -SUBDIR+= cfi -SUBDIR+= cfi_diag -SUBDIR+= safestack -SUBDIR+= stats -SUBDIR+= stats_client -SUBDIR+= ubsan_minimal -SUBDIR+= ubsan_standalone -SUBDIR+= ubsan_standalone_cxx -.endif # amd64 || i386 - -.if ${MACHINE_CPUARCH} == "amd64" -SUBDIR+= dd -SUBDIR+= fuzzer -SUBDIR+= fuzzer_interceptors -SUBDIR+= fuzzer_no_main -SUBDIR+= msan -SUBDIR+= msan_cxx -SUBDIR+= tsan -SUBDIR+= tsan_cxx -SUBDIR+= xray -SUBDIR+= xray-basic -SUBDIR+= xray-fdr -SUBDIR+= xray-profiling -.endif # amd64 - -.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc64le" -SUBDIR+= include -SUBDIR+= asan -SUBDIR+= asan-preinit -SUBDIR+= asan_cxx -SUBDIR+= asan_dynamic -SUBDIR+= asan_static -SUBDIR+= msan -SUBDIR+= msan_cxx -SUBDIR+= stats -SUBDIR+= stats_client -SUBDIR+= tsan -SUBDIR+= tsan_cxx -SUBDIR+= ubsan_minimal -SUBDIR+= ubsan_standalone -SUBDIR+= ubsan_standalone_cxx -.endif # powerpc64 || powerpc64le - -.if ${MACHINE_ARCH} == "powerpc64le" -SUBDIR+= xray -SUBDIR+= xray-basic -SUBDIR+= xray-fdr -SUBDIR+= xray-profiling -.endif # powerpc64le - -.if ${MACHINE_CPUARCH} == "riscv" -SUBDIR+= include -SUBDIR+= asan -SUBDIR+= asan-preinit -SUBDIR+= asan_cxx -SUBDIR+= asan_dynamic -SUBDIR+= stats -SUBDIR+= stats_client -SUBDIR+= ubsan_minimal -SUBDIR+= ubsan_standalone -SUBDIR+= ubsan_standalone_cxx -.endif # riscv - -SUBDIR+= profile +SD_ASAN+= asan +SD_ASAN+= asan-preinit +SD_ASAN+= asan_cxx +SD_ASAN+= asan_dynamic +SD_ASAN+= asan_static + +SD_CFI+= cfi +SD_CFI+= cfi_diag + +SD_DD+= dd + +SD_FUZZER+= fuzzer +SD_FUZZER+= fuzzer_interceptors +SD_FUZZER+= fuzzer_no_main + +SD_INCLUDE+= include + +SD_MSAN+= msan +SD_MSAN+= msan_cxx + +SD_PROFILE+= profile + +SD_SAFESTACK+= safestack + +SD_STATS+= stats +SD_STATS+= stats_client + +SD_TSAN+= tsan +SD_TSAN+= tsan_cxx + +SD_UBSAN+= ubsan_minimal +SD_UBSAN+= ubsan_standalone +SD_UBSAN+= ubsan_standalone_cxx + +SD_XRAY+= xray +SD_XRAY+= xray-basic +SD_XRAY+= xray-fdr +SD_XRAY+= xray-profiling + +.if ${MACHINE_CPUARCH} == "aarch64" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_CFI} +SUBDIR+= ${SD_FUZZER} +SUBDIR+= ${SD_MSAN} +SUBDIR+= ${SD_SAFESTACK} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_TSAN} +SUBDIR+= ${SD_UBSAN} +SUBDIR+= ${SD_XRAY} +.elif ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_CFI} +SUBDIR+= ${SD_DD} +SUBDIR+= ${SD_FUZZER} +SUBDIR+= ${SD_MSAN} +SUBDIR+= ${SD_SAFESTACK} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_TSAN} +SUBDIR+= ${SD_UBSAN} +SUBDIR+= ${SD_XRAY} +.elif ${MACHINE_CPUARCH} == "arm" +# nothing for 32-bit arm +.elif ${MACHINE_CPUARCH} == "i386" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_CFI} +SUBDIR+= ${SD_SAFESTACK} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_UBSAN} +.elif ${MACHINE_CPUARCH} == "powerpc" +# nothing for 32-bit powerpc +.elif ${MACHINE_ARCH} == "powerpc64" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_MSAN} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_TSAN} +SUBDIR+= ${SD_UBSAN} +.elif ${MACHINE_ARCH} == "powerpc64le" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_MSAN} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_TSAN} +SUBDIR+= ${SD_UBSAN} +SUBDIR+= ${SD_XRAY} +.elif ${MACHINE_CPUARCH} == "riscv" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_UBSAN} +.endif + +SUBDIR+= ${SD_INCLUDE} +SUBDIR+= ${SD_PROFILE} SUBDIR_PARALLEL= From nobody Mon Jan 1 16:42:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3hc21tkdz573Wc; Mon, 1 Jan 2024 16:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3hc216P2z3Dt7; Mon, 1 Jan 2024 16:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704127362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HENutWzpGBfK/7FsTY1YI+SpRaw5qqLVAB47csTJ87g=; b=p4w+Ria90LfkImk5CfdGWmul6oaKJpwY+K89EqtUgkc6bwmQe5u0Myz4uITTu3KpRmJo95 RRI/ho4Zo7b7S4ArrBcUxJmAa0YBSF1R7HnC9eomx04GHbGQ+CcHJktY/bS7RLnv61SnQZ E0bVB1yMq/42hC01PutGwVFGkCsat3oxGPUw8rAyn4Set+RtCeCvmSbRmQUKVK5OX3i5XH OT2+euwg4d0syHG4DK1RCUOuAhSp7C3OU21LgK9yO4+u9W0u+K1P+N5zw76J3ib1eJSYyA JZnutGAKHOYR+ELHrhsZojFVybdvui4zI59XfSzUN6gMOomI6YjUSIq1kHf6MQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704127362; a=rsa-sha256; cv=none; b=tQxdkpTnMdT7M3YSsmxCXP0sp1Wz4ZVWtGHmr9kNotys+hUrYyIJSuBO2dnAVSQPL9JZCE zKyXavIeNnA7knKa+57nBkyn8SmbLFUo5ZzXPp59CnUc4DwBo17whhhbWKJA/x+4AqexJV 1z22WJ1Zw5IfmswknRw0qvNSIxfY1VcXeEUug57C6PTVC0sWPaQN7WWhfAvCPCj0JYSqU4 i2U75rvrazgMZwEkRDb2DQ5Yvr3AUkbAkh4l9VyUsgEU9wG06c40DadHtpZgCP4tNBFt5y dDTRinkJ+bmx/7mi7yFS58RcqpjZHRpYFeoGqjq0utRxeZ/r/bP8AGLQ7mlUjA== 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=1704127362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HENutWzpGBfK/7FsTY1YI+SpRaw5qqLVAB47csTJ87g=; b=us0XOQCRYkdhwgdll3R7wJ8NxFkGdOeJHgGtD/rDIUYAVVXnB6M7iYkGoTX12krO7HG6hu Th5lhCpemtF357Y49i7e6Wym8bZ+fz9D9EPrpt9R5u0TtHWWxnNaw41l7zE7on2E/QYrfo pPS4x1ifPBNyh/46wB+IK6AK047leBtLShpMRhn+edqYhL48EXxzCfq8qXUdDIxERYOUF/ G9Fd/tTaHSE4fyUmMHJQfdIv5gnxl2rQBjPcfe27M7SZFgDwb/YjdePDQ2HLW4dmE7bdyd +aLtj/6sgmpvie4FBfqIK0abQ/w/cPepAdP3yIADWuko8qQE2QuAbOOlSoKSaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3hc2093Gz9GX; Mon, 1 Jan 2024 16:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 401GgfLI089358; Mon, 1 Jan 2024 16:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 401GgflD089355; Mon, 1 Jan 2024 16:42:41 GMT (envelope-from git) Date: Mon, 1 Jan 2024 16:42:41 GMT Message-Id: <202401011642.401GgflD089355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 9606dfe4620e - stable/14 - Minimize libc++ errno-related header diffs with upstream List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9606dfe4620e23e4bff508f8444579f125e16cc3 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9606dfe4620e23e4bff508f8444579f125e16cc3 commit 9606dfe4620e23e4bff508f8444579f125e16cc3 Author: Dimitry Andric AuthorDate: 2023-12-25 17:18:31 +0000 Commit: Dimitry Andric CommitDate: 2024-01-01 16:37:01 +0000 Minimize libc++ errno-related header diffs with upstream In commit 88640c0e8b6f5 the new EINTEGRITY errno value was added, and this caused us to carry a patch for upstream libc++ since that time. Because it can cause merge conflicts when importing libc++ code from upstream, I have submitted an upstream pull request to get most of that patch integrated. It turns out that we do not need the errno.h part of it at all, since all supported FreeBSD versions define EOWNERDEAD and ENOTRECOVERABLE, and therefore the block that juggles with ELAST values is never used in FreeBSD. At the moment it only applies to older versions of Linux, or possibly other platforms. Therefore the only part that needs to stay is the definition of a enum errc value for EINTEGRITY, and this is made optional upon EINTEGRITY being defined, to make it suitable for upstreaming. No functional change is intended. MFC after: 1 week (cherry picked from commit 1ff41cad716adeba0d408652c92c81e59e3ba316) --- contrib/llvm-project/libcxx/include/__errc | 2 + contrib/llvm-project/libcxx/include/errno.h | 62 +++++++---------------------- 2 files changed, 16 insertions(+), 48 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__errc b/contrib/llvm-project/libcxx/include/__errc index f0c27b1c60a1..f939c99f7ed6 100644 --- a/contrib/llvm-project/libcxx/include/__errc +++ b/contrib/llvm-project/libcxx/include/__errc @@ -143,7 +143,9 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc) identifier_removed = EIDRM, illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, +#ifdef EINTEGRITY integrity_check_failed = EINTEGRITY, +#endif interrupted = EINTR, invalid_argument = EINVAL, invalid_seek = ESPIPE, diff --git a/contrib/llvm-project/libcxx/include/errno.h b/contrib/llvm-project/libcxx/include/errno.h index ea96c3a0f004..7b02d2b47953 100644 --- a/contrib/llvm-project/libcxx/include/errno.h +++ b/contrib/llvm-project/libcxx/include/errno.h @@ -34,79 +34,49 @@ Macros: #ifdef __cplusplus -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) -#if defined(ELAST) +#ifdef ELAST static const int __elast1 = ELAST+1; static const int __elast2 = ELAST+2; -static const int __elast3 = ELAST+3; #else static const int __elast1 = 104; static const int __elast2 = 105; -static const int __elast3 = 106; #endif -#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) -#define ENOTRECOVERABLE __elast1 -#define EOWNERDEAD __elast2 -#define EINTEGRITY __elast3 -#if defined(ELAST) -#undef ELAST -#define ELAST EINTEGRITY -#endif - -#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) -#define ENOTRECOVERABLE __elast1 -#define EOWNERDEAD __elast2 -#if defined(ELAST) -#undef ELAST -#define ELAST EOWNERDEAD -#endif +#ifdef ENOTRECOVERABLE -#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EOWNERDEAD __elast1 -#define EINTEGRITY __elast2 -#if defined(ELAST) -#undef ELAST -#define ELAST EINTEGRITY -#endif -#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINTEGRITY) -#define EOWNERDEAD __elast1 -#if defined(ELAST) +#ifdef ELAST #undef ELAST #define ELAST EOWNERDEAD #endif -#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) -#define ENOTRECOVERABLE __elast1 -#define EINTEGRITY __elast2 -#if defined(ELAST) -#undef ELAST -#define ELAST EINTEGRITY -#endif +#elif defined(EOWNERDEAD) -#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 -#if defined(ELAST) +#ifdef ELAST #undef ELAST #define ELAST ENOTRECOVERABLE #endif -#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) -#define EINTEGRITY __elast1 -#if defined(ELAST) +#else // defined(EOWNERDEAD) + +#define EOWNERDEAD __elast1 +#define ENOTRECOVERABLE __elast2 +#ifdef ELAST #undef ELAST -#define ELAST EINTEGRITY +#define ELAST ENOTRECOVERABLE #endif -#endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && !defined(INTEGRITY) +#endif // defined(EOWNERDEAD) -#endif // !defined(OWNERDEAD) || !defined(NOTRECOVERABLE) || !defined(INTEGRITY) +#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) // supply errno values likely to be missing, particularly on Windows @@ -424,10 +394,6 @@ static const int __elast3 = 106; #define EMLINK 9979 #endif -#ifndef EINTEGRITY -#define EINTEGRITY 9980 -#endif - #endif // __cplusplus #endif // _LIBCPP_ERRNO_H From nobody Mon Jan 1 16:42:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3hc33zgtz573Z6; Mon, 1 Jan 2024 16:42: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 4T3hc32DCsz3Dc0; Mon, 1 Jan 2024 16:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704127363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zsmGiIkDyk0e5WeteBJuCHocFjzhzhRoHLoKlEZJMJQ=; b=L9gDEAWsnrQn4zL4OeG/kjcSP4kRtLjsCc6q3IhaQJv0vS3NG0dYoxQoTI3nKllCwkfCJZ VOGa0sTKQghPmGdQch89LGfahFWCyutUi19uRJ8Dxb20Ac2/RQNAqfwa06I3HoWJv8V0lF PLQhUTfwx5chBQ26Tpha/7DpLtLkIv5jvoKeQqxex1lh1teWVjXu1kie2YX3R0a5IQB3JC FVlU6LdWd1/vsCeXO1L7K2PJA6vMcwHuCPG+4IhCrT33tYmMWPfMA+lRRnyaFgh9YAaJGW aA+wA3NM03abamfk1lMYcp67tcEs94mgdpLYwA03mgvtRpoDfmQGwaxdFtHu/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704127363; a=rsa-sha256; cv=none; b=ZEZ8l+gmAPg/raW2MmTYBqv8oWdao597baVmYpk8JbXsPxYqeZg8d/IHlwMxEQo0rCvLbo TQZSBi5U+IfnSBbvOr/CeF8db1tiuqJUsS0UtaplhxLhCCCoI3RS7dYezyssk6dmk01Boc vYCNdKUn35OzTQWNUiYU5a8GUHhtuSS6K42pTd2tc6Gu3n5dLIMi03V8pZ7sDu9LcGO9Yy wRlKQxqYYdYG2BbAB6oI3Uv799glWjvLRDPOkLQNUGnnAu7+vXvbr3/qcN1TpK2J2CUyof qc+0yiyVqqWzOFjs5Gj6Bu27iZQxm0sbQbbeJSpbzATITe1LLJjw0rndenUDSQ== 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=1704127363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zsmGiIkDyk0e5WeteBJuCHocFjzhzhRoHLoKlEZJMJQ=; b=lsMOJVG6crLIyNjtPlbNxkmdPftHfsMtFvn1X/jj5k4DUX8ve4XhBywJT+Lo7dLMjfplfZ nd45xpRYgtGDa+vlqpKHxi+Is1D9GgcevqQnGkduxWLWKbqe4ml1JJPRBULra6OESRcAkE Twv73fk56voym/6Wc7gJ+uizh2xxhfarYjlCQDsizy6OyJ2eGaB1Uo2Cm/uFvKioPzN990 eewgyn5s9zwUV3CfMpMiA1H5PuBohbYvVUP9Xkv+Zz6N15RU3+4Jj4viuNfU147uAbxsHW WH4ZWN0QYlOgT9VpyE7Wc7JhUzc/AsnZcxHSJxXXOECvwcYSaDnp1ekdhAjN3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3hc31Kzxz9KD; Mon, 1 Jan 2024 16:42: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 401Ggh5N089419; Mon, 1 Jan 2024 16:42:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 401GghVq089416; Mon, 1 Jan 2024 16:42:43 GMT (envelope-from git) Date: Mon, 1 Jan 2024 16:42:43 GMT Message-Id: <202401011642.401GghVq089416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b6304db6a9c3 - stable/14 - Merge commit c97a7675eea4 from llvm git (by Qiu Chaofan): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b6304db6a9c31b9389e1e4c5e09f03f99f42eea5 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b6304db6a9c31b9389e1e4c5e09f03f99f42eea5 commit b6304db6a9c31b9389e1e4c5e09f03f99f42eea5 Author: Dimitry Andric AuthorDate: 2023-12-29 19:30:45 +0000 Commit: Dimitry Andric CommitDate: 2024-01-01 16:37:11 +0000 Merge commit c97a7675eea4 from llvm git (by Qiu Chaofan): [PowerPC] Expand FSINCOS of fp128 (#76494) This fixes "fatal error: error in backend: Cannot select: 0x6d420285c0: f128,f128 = fsincos 0x6d4202b6f0" when compiling s_cpowl.c for powerpc64le. Upstream ticket: https://github.com/llvm/llvm-project/issues/76442 Reported by: pkubaj MFC after: 3 days (cherry picked from commit 79639686401bedbcbbf04eb71e0acb1cc7dcbbcb) --- contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index cf1cdad3fee6..1b9824a7c3d1 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -1169,6 +1169,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM, setTruncStoreAction(MVT::f128, MVT::f32, Expand); // No implementation for these ops for PowerPC. + setOperationAction(ISD::FSINCOS, MVT::f128, Expand); setOperationAction(ISD::FSIN, MVT::f128, Expand); setOperationAction(ISD::FCOS, MVT::f128, Expand); setOperationAction(ISD::FPOW, MVT::f128, Expand); @@ -1401,6 +1402,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM, setLibcallName(RTLIB::EXP2_F128, "exp2f128"); setLibcallName(RTLIB::SIN_F128, "sinf128"); setLibcallName(RTLIB::COS_F128, "cosf128"); + setLibcallName(RTLIB::SINCOS_F128, "sincosf128"); setLibcallName(RTLIB::POW_F128, "powf128"); setLibcallName(RTLIB::FMIN_F128, "fminf128"); setLibcallName(RTLIB::FMAX_F128, "fmaxf128"); From nobody Mon Jan 1 16:43:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3hcN2f5Bz573nl; Mon, 1 Jan 2024 16:43: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 4T3hcN20zjz3FZ7; Mon, 1 Jan 2024 16:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704127380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fketJ7cSLmDb9G9Cew2cwnHY2fkTCOXyqZmEhsYXmsE=; b=hna1lXDFVv6xkaL5IFoRX9j0UmVLpKnmk1iZglYi3TbsfPUIrdrAMsb1KNrVaVqDZCy+wI VNasA4Sm+wLBeOwj2vkoE7ZvIyNpUien9kV7JoQLc0gD1LVo0wknjIDyXFPZkoOPTXW/ZE AkxJXMxQIHL/2aUvG9rP1vHl7ixvLKx1JvtdYJQgGTOUTA70wP2J6vwgcV8TC5yQNqCrXh SeJAR76HDRknAPIXoJEeimVp9C/vgg1sO+zjmBvZNjTO1MAMT2te5dBnxOVuoAUbq/J1QH 5K21YAKSiyGddpzgWGbjKv2E3lGzHQFq9PMhl5j3jMXogsLMI5Ialxgbx1Xmwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704127380; a=rsa-sha256; cv=none; b=AT19d4ZHPetiCvUK8yFnfptA71x+05bJgce93G+pNTiM0AJft+2lvbUNSwaVkia6RLA2zO 3CCDUD1UE6PPO0frUFHmjFwxPuSlMXhpJXh4LmMXnLoX/4CU7GpZeJpJDfdy2NSbMqObu4 TFmkIwGzgIUa7s8iaO1BBTLtxp55vr1V1EjuBjyGxvwap2wfy2VZlnrsQLxPqsoNqC+hCn xERcoQHl+z92W1S6Rhm3ThMhrojCc8l1bu90W6E5FAGYbq9dFeqRF+MCYiuoqHTyTkQced k6tBoSS/9clFbDmWODF4QrhcAA4TXyJXWhC75OPPGZugtxOLLn/0qq6MduTKrw== 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=1704127380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fketJ7cSLmDb9G9Cew2cwnHY2fkTCOXyqZmEhsYXmsE=; b=Jy6Q2gLyeMzrt4zOzXsnrwnVEyB/otadSOc6U+piwttoSH2AyDkoI7gXEpRCCEwmg+ip8t 4gU9lWKRRi5JFKZSQaOHx7m3obK7+8qwCvUTMGsmjjFCTXgoCGHk72TAqPba8Xe12CVMM1 eigzjHxtUZ7Y9JnJ9S5Bf4aCTvSJ8RPMmithEqBegtRKZqgSlJbxKPPs2zO/HaqpeGjuaf wqT2Z05esK92mpnruMRr6udVgZqc2/jtivzM//o2bIIMRX+ldBylE09/NT7nSps8aVt32u 3Gr9QFNC3AVfE/OqnCT5r855Yy8Uj3fzVs3cSFS/NWQaIU9xDSpYwyov7Zt/Ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3hcN150bz9dl; Mon, 1 Jan 2024 16:43: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 401Gh0TF089629; Mon, 1 Jan 2024 16:43:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 401Gh0gX089626; Mon, 1 Jan 2024 16:43:00 GMT (envelope-from git) Date: Mon, 1 Jan 2024 16:43:00 GMT Message-Id: <202401011643.401Gh0gX089626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 5c95aeb90f70 - stable/13 - Reorganize libclang_rt Makefile and make more lib/arch combos available List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5c95aeb90f70a66c75869fa0de44283c04bbd725 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5c95aeb90f70a66c75869fa0de44283c04bbd725 commit 5c95aeb90f70a66c75869fa0de44283c04bbd725 Author: Dimitry Andric AuthorDate: 2023-12-28 12:57:41 +0000 Commit: Dimitry Andric CommitDate: 2024-01-01 16:41:43 +0000 Reorganize libclang_rt Makefile and make more lib/arch combos available Upstream has made more clang runtime libraries available for more architectures, so add them. To make this easier, split up subdir lists into functional parts (asan, tsan, etc), and put each architecture into its own .if block. Effectively, this adds the following libraries for aarch64: asan, cfi, fuzzer, msan, safestack, stats, tsan, ubsan, xray. PR: 262706 MFC after: 3 days (cherry picked from commit e77a1bb2757471ab3fed0750b76eeb15d0c7b10a) --- lib/libclang_rt/Makefile | 161 ++++++++++++++++++++++++++--------------------- 1 file changed, 91 insertions(+), 70 deletions(-) diff --git a/lib/libclang_rt/Makefile b/lib/libclang_rt/Makefile index 38275400ef3c..46f7fdf814be 100644 --- a/lib/libclang_rt/Makefile +++ b/lib/libclang_rt/Makefile @@ -1,74 +1,95 @@ -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" -SUBDIR+= include -SUBDIR+= asan -SUBDIR+= asan-preinit -SUBDIR+= asan_cxx -SUBDIR+= asan_dynamic -SUBDIR+= asan_static -SUBDIR+= cfi -SUBDIR+= cfi_diag -SUBDIR+= safestack -SUBDIR+= stats -SUBDIR+= stats_client -SUBDIR+= ubsan_minimal -SUBDIR+= ubsan_standalone -SUBDIR+= ubsan_standalone_cxx -.endif # amd64 || i386 - -.if ${MACHINE_CPUARCH} == "amd64" -SUBDIR+= dd -SUBDIR+= fuzzer -SUBDIR+= fuzzer_interceptors -SUBDIR+= fuzzer_no_main -SUBDIR+= msan -SUBDIR+= msan_cxx -SUBDIR+= tsan -SUBDIR+= tsan_cxx -SUBDIR+= xray -SUBDIR+= xray-basic -SUBDIR+= xray-fdr -SUBDIR+= xray-profiling -.endif # amd64 - -.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc64le" -SUBDIR+= include -SUBDIR+= asan -SUBDIR+= asan-preinit -SUBDIR+= asan_cxx -SUBDIR+= asan_dynamic -SUBDIR+= msan -SUBDIR+= msan_cxx -SUBDIR+= stats -SUBDIR+= stats_client -SUBDIR+= tsan -SUBDIR+= tsan_cxx -SUBDIR+= ubsan_minimal -SUBDIR+= ubsan_standalone -SUBDIR+= ubsan_standalone_cxx -.endif # powerpc64 || powerpc64le - -.if ${MACHINE_ARCH} == "powerpc64le" -SUBDIR+= xray -SUBDIR+= xray-basic -SUBDIR+= xray-fdr -SUBDIR+= xray-profiling -.endif # powerpc64le - -.if ${MACHINE_CPUARCH} == "riscv" -SUBDIR+= include -SUBDIR+= asan -SUBDIR+= asan-preinit -SUBDIR+= asan_cxx -SUBDIR+= asan_dynamic -SUBDIR+= stats -SUBDIR+= stats_client -SUBDIR+= ubsan_minimal -SUBDIR+= ubsan_standalone -SUBDIR+= ubsan_standalone_cxx -.endif # riscv - -SUBDIR+= profile +SD_ASAN+= asan +SD_ASAN+= asan-preinit +SD_ASAN+= asan_cxx +SD_ASAN+= asan_dynamic +SD_ASAN+= asan_static + +SD_CFI+= cfi +SD_CFI+= cfi_diag + +SD_DD+= dd + +SD_FUZZER+= fuzzer +SD_FUZZER+= fuzzer_interceptors +SD_FUZZER+= fuzzer_no_main + +SD_INCLUDE+= include + +SD_MSAN+= msan +SD_MSAN+= msan_cxx + +SD_PROFILE+= profile + +SD_SAFESTACK+= safestack + +SD_STATS+= stats +SD_STATS+= stats_client + +SD_TSAN+= tsan +SD_TSAN+= tsan_cxx + +SD_UBSAN+= ubsan_minimal +SD_UBSAN+= ubsan_standalone +SD_UBSAN+= ubsan_standalone_cxx + +SD_XRAY+= xray +SD_XRAY+= xray-basic +SD_XRAY+= xray-fdr +SD_XRAY+= xray-profiling + +.if ${MACHINE_CPUARCH} == "aarch64" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_CFI} +SUBDIR+= ${SD_FUZZER} +SUBDIR+= ${SD_MSAN} +SUBDIR+= ${SD_SAFESTACK} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_TSAN} +SUBDIR+= ${SD_UBSAN} +SUBDIR+= ${SD_XRAY} +.elif ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_CFI} +SUBDIR+= ${SD_DD} +SUBDIR+= ${SD_FUZZER} +SUBDIR+= ${SD_MSAN} +SUBDIR+= ${SD_SAFESTACK} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_TSAN} +SUBDIR+= ${SD_UBSAN} +SUBDIR+= ${SD_XRAY} +.elif ${MACHINE_CPUARCH} == "arm" +# nothing for 32-bit arm +.elif ${MACHINE_CPUARCH} == "i386" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_CFI} +SUBDIR+= ${SD_SAFESTACK} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_UBSAN} +.elif ${MACHINE_CPUARCH} == "powerpc" +# nothing for 32-bit powerpc +.elif ${MACHINE_ARCH} == "powerpc64" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_MSAN} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_TSAN} +SUBDIR+= ${SD_UBSAN} +.elif ${MACHINE_ARCH} == "powerpc64le" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_MSAN} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_TSAN} +SUBDIR+= ${SD_UBSAN} +SUBDIR+= ${SD_XRAY} +.elif ${MACHINE_CPUARCH} == "riscv" +SUBDIR+= ${SD_ASAN} +SUBDIR+= ${SD_STATS} +SUBDIR+= ${SD_UBSAN} +.endif + +SUBDIR+= ${SD_INCLUDE} +SUBDIR+= ${SD_PROFILE} SUBDIR_PARALLEL= From nobody Mon Jan 1 16:43:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3hcP3fYfz573cV; Mon, 1 Jan 2024 16:43: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 4T3hcP2zdJz3FZ8; Mon, 1 Jan 2024 16:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704127381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4h9TJFK/kfvkSBprpAuhjiG6B16xmzFTccqMP/drKtg=; b=wUtR2L/edu4aXCvjt0SCQDa48OcmcZPQ9GI9hdlvD+iwJAPAk89254NcqBvsYvV3UdTbMs n/lu6ZTLTRiyezfGzw/eEr0MUMoUqMTcZnWSqWPE+r6mZcZQfYZfexLULW1bOOcyx6WJDo 6RZd7ddv8vXH+T5BUcHB+PS/7dL53YflXuyHX+ePKvNcj0/hjR+08EfDPAI2Z4getonKhr Kf/tN9ThSQqQC3DiIhWwJeodlUbfSPVPNj/t2ypek9GVSX3kP30HyPY3CO4rSMxbhMIZ7f tirfZkp2JSwuwjMkOxXwMo078U9PD2fDWfX0x+CiDKqnCEPfKw+EtFoGiv8QBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704127381; a=rsa-sha256; cv=none; b=oNdCoaUqNhbGCDo7vxk7icSE7bnb4H92eRxDMI/Zr6wkhe76rr50613A9QNXDzD9CvNzGA foQ05otF2/uDMt7qbuzN3HGAldTYgQZ6e+6AE5SyH9TdgbtslbhE55mrkFcZgxOfDcNSkG UQnwtX0tknqugeeeV33/EVisHtYRRKIko0ouhQ0j0ozLmIUykljbh3ARyM/3Z16E9ysLwz /NcUNAJfHEddH1tIl8A8y76HW4MGa7tYMhouM66CVYbMOZRh4rLm/UW5tSGk4M7thGrvsX tFPdZDihxWh7zlfNHBvPgSy11CT4gqEdO7IpF1UwgoiXpTNAuCcpXigny8iM1Q== 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=1704127381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4h9TJFK/kfvkSBprpAuhjiG6B16xmzFTccqMP/drKtg=; b=XMY4IANxJKdVB8bGaCsmvwAJ1Xc2IohFY6tSoPSTqONIOEn5dsEHmSfoHeaiKGPYsQs2gY rtGKUbEWD+m3DX9CVwiLkictZQaloPeFaILQJK8YJwcONN6YIwpJDwJeW1V8/bcNiVdSBs aA0TXQTeawLZ4nSgWesZmnp5DWRcHmiDPDQ7S6AbCUAka/kGXqv0REXHMxRDPEKDCVmAr7 rNi33GBY8dY2r1fSUJlxbTWOwKjEfT7Ar3fy67xjbkc+mK47TQTaOVbd9FKjTRnC1QcKBY kdZlclaMQiAdb+aAWqtH+3T+j+f8ClqOHhG9bkrf+tsHnw7EfXilJuBNczdTiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3hcP25H0z9dm; Mon, 1 Jan 2024 16:43: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 401Gh1QA089677; Mon, 1 Jan 2024 16:43:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 401Gh1RG089674; Mon, 1 Jan 2024 16:43:01 GMT (envelope-from git) Date: Mon, 1 Jan 2024 16:43:01 GMT Message-Id: <202401011643.401Gh1RG089674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f4cff561aefd - stable/13 - Minimize libc++ errno-related header diffs with upstream List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4cff561aefdaa588c93d8fbc7b103defb251945 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f4cff561aefdaa588c93d8fbc7b103defb251945 commit f4cff561aefdaa588c93d8fbc7b103defb251945 Author: Dimitry Andric AuthorDate: 2023-12-25 17:18:31 +0000 Commit: Dimitry Andric CommitDate: 2024-01-01 16:41:58 +0000 Minimize libc++ errno-related header diffs with upstream In commit 88640c0e8b6f5 the new EINTEGRITY errno value was added, and this caused us to carry a patch for upstream libc++ since that time. Because it can cause merge conflicts when importing libc++ code from upstream, I have submitted an upstream pull request to get most of that patch integrated. It turns out that we do not need the errno.h part of it at all, since all supported FreeBSD versions define EOWNERDEAD and ENOTRECOVERABLE, and therefore the block that juggles with ELAST values is never used in FreeBSD. At the moment it only applies to older versions of Linux, or possibly other platforms. Therefore the only part that needs to stay is the definition of a enum errc value for EINTEGRITY, and this is made optional upon EINTEGRITY being defined, to make it suitable for upstreaming. No functional change is intended. MFC after: 1 week (cherry picked from commit 1ff41cad716adeba0d408652c92c81e59e3ba316) --- contrib/llvm-project/libcxx/include/__errc | 2 + contrib/llvm-project/libcxx/include/errno.h | 62 +++++++---------------------- 2 files changed, 16 insertions(+), 48 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__errc b/contrib/llvm-project/libcxx/include/__errc index f0c27b1c60a1..f939c99f7ed6 100644 --- a/contrib/llvm-project/libcxx/include/__errc +++ b/contrib/llvm-project/libcxx/include/__errc @@ -143,7 +143,9 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc) identifier_removed = EIDRM, illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, +#ifdef EINTEGRITY integrity_check_failed = EINTEGRITY, +#endif interrupted = EINTR, invalid_argument = EINVAL, invalid_seek = ESPIPE, diff --git a/contrib/llvm-project/libcxx/include/errno.h b/contrib/llvm-project/libcxx/include/errno.h index ea96c3a0f004..7b02d2b47953 100644 --- a/contrib/llvm-project/libcxx/include/errno.h +++ b/contrib/llvm-project/libcxx/include/errno.h @@ -34,79 +34,49 @@ Macros: #ifdef __cplusplus -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) -#if defined(ELAST) +#ifdef ELAST static const int __elast1 = ELAST+1; static const int __elast2 = ELAST+2; -static const int __elast3 = ELAST+3; #else static const int __elast1 = 104; static const int __elast2 = 105; -static const int __elast3 = 106; #endif -#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) -#define ENOTRECOVERABLE __elast1 -#define EOWNERDEAD __elast2 -#define EINTEGRITY __elast3 -#if defined(ELAST) -#undef ELAST -#define ELAST EINTEGRITY -#endif - -#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) -#define ENOTRECOVERABLE __elast1 -#define EOWNERDEAD __elast2 -#if defined(ELAST) -#undef ELAST -#define ELAST EOWNERDEAD -#endif +#ifdef ENOTRECOVERABLE -#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EOWNERDEAD __elast1 -#define EINTEGRITY __elast2 -#if defined(ELAST) -#undef ELAST -#define ELAST EINTEGRITY -#endif -#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINTEGRITY) -#define EOWNERDEAD __elast1 -#if defined(ELAST) +#ifdef ELAST #undef ELAST #define ELAST EOWNERDEAD #endif -#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) -#define ENOTRECOVERABLE __elast1 -#define EINTEGRITY __elast2 -#if defined(ELAST) -#undef ELAST -#define ELAST EINTEGRITY -#endif +#elif defined(EOWNERDEAD) -#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 -#if defined(ELAST) +#ifdef ELAST #undef ELAST #define ELAST ENOTRECOVERABLE #endif -#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) -#define EINTEGRITY __elast1 -#if defined(ELAST) +#else // defined(EOWNERDEAD) + +#define EOWNERDEAD __elast1 +#define ENOTRECOVERABLE __elast2 +#ifdef ELAST #undef ELAST -#define ELAST EINTEGRITY +#define ELAST ENOTRECOVERABLE #endif -#endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && !defined(INTEGRITY) +#endif // defined(EOWNERDEAD) -#endif // !defined(OWNERDEAD) || !defined(NOTRECOVERABLE) || !defined(INTEGRITY) +#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) // supply errno values likely to be missing, particularly on Windows @@ -424,10 +394,6 @@ static const int __elast3 = 106; #define EMLINK 9979 #endif -#ifndef EINTEGRITY -#define EINTEGRITY 9980 -#endif - #endif // __cplusplus #endif // _LIBCPP_ERRNO_H From nobody Mon Jan 1 16:43:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3hcQ5ydXz5741w; Mon, 1 Jan 2024 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3hcQ4BWdz3FS4; Mon, 1 Jan 2024 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704127382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTCETEqxON2cn/qRUnvCj5dU/XN8vD/zesgv5G/uhMs=; b=fkXrDlRovObC2sLC5O8ZOqBKpfBS1GnPKPLIcvlVW/T9CDXJTIHtRXE9ia/xcF2dSRACdG A6f00w1xYPjSnbLyFsovnRBDjw0KUk3QU3ldxM0OLxfSocJs1jf9NeMjsyCVOvf7fAGQT+ qqdj42U2LMkEypV2aDBa73buqg37/hnTXrGXbT6uXAEmmWMvpQx8mFLEMuaObEyBDU2VWn ULdAaoaBNikoAdD2WiUSGvnRsGvAiPvqFBlLnK2iCwtHM/NJVD/pAL8Q90Evo2pYrkgzCS 3+X0cgIqZuX9aCr5Lv7krsT7+bkT5H5ngekCjd97IqI9mMLY8INocrnXUNDqew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704127382; a=rsa-sha256; cv=none; b=klr6mtVmgZxV6NgdWuVxQcnkbca63oYoCTnRpd9J5vTcWSI3vAxJiAMnV9n7zinAFbdA6Q bW51n4w29me4BRqIHs1Fb4WE/l8fCrdG7FJF0W8g9YFP+qZmpwRW17VbXk0Zp8o2rLH+Vp iRe4vDRFDQFiU2yr5kd3hbkcI1iEscuWBID/BOI1+fnUrm0oNfmphpsWP260mbQ7Z+BwPc QM4G+qCnWRtv+zkmJNvGhgmmKSU44SPk5/AAsnUkhp7iqjRl90Z+knMnI8VdMqaxvnXSXS P00qoMYDHpTyiX2b+TycwnOLWM+nU3X8P/XOt4AZhRHDEwRMq99RPJUncfRACg== 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=1704127382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTCETEqxON2cn/qRUnvCj5dU/XN8vD/zesgv5G/uhMs=; b=a7NedctPq3tzM7vpnyLua6BYoM0XlJlcV7nfIEx/g+4babP3Vcb/j9StbrClUHNAvOZ30a O3Xn9k8fbc4PO0Gu5OvmMjWBgaxl5e9AqcgNHipouUIfT1C1hIKQ4m4LTMMykpmdNZtlkm Y95YNY+xyU9OoEGb5k8M8LA4dM/OkSYq1MyThaAJpN1Gi/5ug0VS7EU1x1tvqR1gBHX5JB 8iCbyx7/7+jU2X3jB/ghn3lBugdxD6dP91SFe3ll2LfBnpszqVoJ2wl+RgEw51pIV3CoAf f6KfrioCMX5v1uudAdlh252NHcgpKEuR4vOt5sJUl6Klz/W24sIghJvI4SaJdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3hcQ3GjGz9Y1; Mon, 1 Jan 2024 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 401Gh2Jw089733; Mon, 1 Jan 2024 16:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 401Gh2hI089730; Mon, 1 Jan 2024 16:43:02 GMT (envelope-from git) Date: Mon, 1 Jan 2024 16:43:02 GMT Message-Id: <202401011643.401Gh2hI089730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1eaec69134ba - stable/13 - Merge commit c97a7675eea4 from llvm git (by Qiu Chaofan): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1eaec69134ba3017a78c764aa6cb843d567715d3 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1eaec69134ba3017a78c764aa6cb843d567715d3 commit 1eaec69134ba3017a78c764aa6cb843d567715d3 Author: Dimitry Andric AuthorDate: 2023-12-29 19:30:45 +0000 Commit: Dimitry Andric CommitDate: 2024-01-01 16:42:09 +0000 Merge commit c97a7675eea4 from llvm git (by Qiu Chaofan): [PowerPC] Expand FSINCOS of fp128 (#76494) This fixes "fatal error: error in backend: Cannot select: 0x6d420285c0: f128,f128 = fsincos 0x6d4202b6f0" when compiling s_cpowl.c for powerpc64le. Upstream ticket: https://github.com/llvm/llvm-project/issues/76442 Reported by: pkubaj MFC after: 3 days (cherry picked from commit 79639686401bedbcbbf04eb71e0acb1cc7dcbbcb) --- contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index cf1cdad3fee6..1b9824a7c3d1 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -1169,6 +1169,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM, setTruncStoreAction(MVT::f128, MVT::f32, Expand); // No implementation for these ops for PowerPC. + setOperationAction(ISD::FSINCOS, MVT::f128, Expand); setOperationAction(ISD::FSIN, MVT::f128, Expand); setOperationAction(ISD::FCOS, MVT::f128, Expand); setOperationAction(ISD::FPOW, MVT::f128, Expand); @@ -1401,6 +1402,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM, setLibcallName(RTLIB::EXP2_F128, "exp2f128"); setLibcallName(RTLIB::SIN_F128, "sinf128"); setLibcallName(RTLIB::COS_F128, "cosf128"); + setLibcallName(RTLIB::SINCOS_F128, "sincosf128"); setLibcallName(RTLIB::POW_F128, "powf128"); setLibcallName(RTLIB::FMIN_F128, "fminf128"); setLibcallName(RTLIB::FMAX_F128, "fmaxf128"); From nobody Tue Jan 2 00:37:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7W2X5lz55yWj; Tue, 2 Jan 2024 00:37: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 4T3v7W1y8Xz3HDP; Tue, 2 Jan 2024 00:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TtbdMiz5evS8QT7pK8JlCaZ1/QLWLXqNvyXPOR9hAkU=; b=eiBgVs3wajzkX2LnCnaUVhGIJTOY5vQ5XWTOpqExRQV0A5VdMyo8Pqz73ooZc+I4eBu0aD tib5rSO5scbk+/w52cELSun/BBpYYy5Rlb7zVr6fNgctDYak9+TNRIJZweA5Zd/GF2qzjR JSXuJaxwljvMYsxKQ5nppCi+Mz7bf7homdItXSPxuzebg4LBgACUJ1I7fJERyPZdmQDpJt 92t63s2lIpNiF/dt4ATDurbliYGc5KGEjBaSZCYvP2k/c/ZUgXAc6Qg1e1Zh9nmUOnolTN eSgG2o++mgI837OKaz3AGApp7SdgNfn0GOioLAO6whKrzWKwTP5e2iv6hF6G5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155831; a=rsa-sha256; cv=none; b=cmZyS/bcze3d30j/JkWo3gMjogoxZ9P52jIammrpQjh90QqSYy7QKrg4azKqjLVShvl8GW WSlVNQk91geqrYQP2rNJdmSzx8TqeatcHjaOYu9R21XK2Gj4RlVzrAppM1a/wc/tICVn/+ yNJtoISCoDTfQrKgmzyCWSC8nRKnjQ4GMlp112ONbEdaY7WJZfckwvfKecfCKFw1GAJENW RUWQJCWcIIB8sFWDRWGM7KeEuzU6RI+YcwrSXo0iIN9JGqbu/FOSFMoFL4Uu+iZQGiTTS1 FvirlFFzvRur0nex1++K2/IqsHUamVS6PJIZmyJuRLKExV+LP/gTaQ6H1LbcYg== 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=1704155831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TtbdMiz5evS8QT7pK8JlCaZ1/QLWLXqNvyXPOR9hAkU=; b=Z8frJvFVHn5o4rrlGlar2qbcsPpBfj5p1LNzSlCPCqr/ZXonYoZMz9fzhAqMqgzStVNGcM 6+Lp3JBQpsLVscHDlnl5YbHdMLJUm1o0RvCjfO8FAdJDrDMEZ3y6qzbkUnsLf2zozmIVI3 LUwW9kDzE+K1LW6reiLzO/f2LxJxbZZc/kfUK8H6PdiGQa18MHL+gsdglArs4RH3NCoL+B Vr+PcQPQ1IKDWUKKPvFxtms2V7bbvEOP3B5yCi94+7AYhbtgQlYc0dYGpC1GID8d2r7fN9 bFtO9Zom290toIF7lMXdRpCK0q6R0pquTZTMzrpiJ6BTOOm2FtDBkhKZjgZglQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7W12QYzfsf; Tue, 2 Jan 2024 00:37: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 4020bBsB084850; Tue, 2 Jan 2024 00:37:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bBd5084847; Tue, 2 Jan 2024 00:37:11 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:11 GMT Message-Id: <202401020037.4020bBd5084847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9483388587a1 - stable/14 - ath: Handle errors from copyout() in ath_rate_fetch_node_stats() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9483388587a1348ff3a7d2feaff6fab6a9cd7446 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9483388587a1348ff3a7d2feaff6fab6a9cd7446 commit 9483388587a1348ff3a7d2feaff6fab6a9cd7446 Author: Mark Johnston AuthorDate: 2023-12-26 01:35:43 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:39 +0000 ath: Handle errors from copyout() in ath_rate_fetch_node_stats() MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43096 (cherry picked from commit 711880597c6c4ac971eb2aba6a2dadb5933d38dd) --- sys/dev/ath/ath_rate/sample/sample.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c index 39ca5d1e9f31..8e70699f708d 100644 --- a/sys/dev/ath/ath_rate/sample/sample.c +++ b/sys/dev/ath/ath_rate/sample/sample.c @@ -1433,11 +1433,13 @@ ath_rate_fetch_node_stats(struct ath_softc *sc, struct ath_node *an, const HAL_RATE_TABLE *rt = sc->sc_currates; struct ath_rateioctl_tlv av; struct ath_rateioctl_rt *tv; - int y; + int error, y; int o = 0; ATH_NODE_LOCK_ASSERT(an); + error = 0; + /* * Ensure there's enough space for the statistics. */ @@ -1478,9 +1480,13 @@ ath_rate_fetch_node_stats(struct ath_softc *sc, struct ath_node *an, */ av.tlv_id = ATH_RATE_TLV_RATETABLE; av.tlv_len = sizeof(struct ath_rateioctl_rt); - copyout(&av, rs->buf + o, sizeof(struct ath_rateioctl_tlv)); + error = copyout(&av, rs->buf + o, sizeof(struct ath_rateioctl_tlv)); + if (error != 0) + goto out; o += sizeof(struct ath_rateioctl_tlv); - copyout(tv, rs->buf + o, sizeof(struct ath_rateioctl_rt)); + error = copyout(tv, rs->buf + o, sizeof(struct ath_rateioctl_rt)); + if (error != 0) + goto out; o += sizeof(struct ath_rateioctl_rt); /* @@ -1488,18 +1494,22 @@ ath_rate_fetch_node_stats(struct ath_softc *sc, struct ath_node *an, */ av.tlv_id = ATH_RATE_TLV_SAMPLENODE; av.tlv_len = sizeof(struct sample_node); - copyout(&av, rs->buf + o, sizeof(struct ath_rateioctl_tlv)); + error = copyout(&av, rs->buf + o, sizeof(struct ath_rateioctl_tlv)); + if (error != 0) + goto out; o += sizeof(struct ath_rateioctl_tlv); /* * Copy the statistics over to the provided buffer. */ - copyout(sn, rs->buf + o, sizeof(struct sample_node)); + error = copyout(sn, rs->buf + o, sizeof(struct sample_node)); + if (error != 0) + goto out; o += sizeof(struct sample_node); +out: free(tv, M_TEMP); - - return (0); + return (error); } static void From nobody Tue Jan 2 00:37:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7X3FwNz55yTR; Tue, 2 Jan 2024 00:37: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 4T3v7X2jymz3HMN; Tue, 2 Jan 2024 00:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t+fmblfDUPa056JopiHMgYrzt158Y9VPFuEcWEh3prQ=; b=HcmH8qCek6aw7vh5YN5LcKc3dsbtOpdICukEZxDepUg3mt0bABKzcd383+A7CSC9yoaO/L Ps+SK0K7lUM9fQsMmLw2n9yqMS71VYwVSENmDCh6mr7P+rpwv4Nzl3Jxt+p3Pg5UEQV2GJ aVR1IqCA+yBa5p/ozYZeC/wajEywEpitVhBSYCjYuZ+r+yH4LTer2un+C8fg7Az6Zxt5bR JrJZcjn4LgU1cCabtwSE2ddZB/YGPMhcgBv6rYzhqY+GIoG/uzP75jOCAcXNlqgrmS92Hv ZgdDGJ95rvG1wmQYQrnCU710noDJiLGIzMjTuF7O08oR4lLHra6vDmLQK9Ddkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155832; a=rsa-sha256; cv=none; b=ZEYzm7e2VFLYAG0Jla04SgnYtlZe975fdSXUW1g6PAxfNijwBvNBcycCQ/QwQfVe4daCFB WQFOAsRJ5lGhlQJDHo0rpMJg8lKenaeESXzzz05UCCtuJ2KgfEHbntMr+wMbtjFFK8un2n QvlyN+TYhVgmY0eOOGXrtSybkV6YIOPe85kpW3eqA3awWz/R+7W5MjVhTQ/nYCQ8dEA9wX Bxye5nZs71hWbFtGOw7/udOr3XV7oLjNMh+XzTkwgKeonLSDBdM1lfHjCW+MST94tFIOUh Y/+YZnLr8dneLt+ThWjvDPav2dzblsrSVY8DB/mYHgrr688OsVtXejz4WFfslw== 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=1704155832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t+fmblfDUPa056JopiHMgYrzt158Y9VPFuEcWEh3prQ=; b=M8Ag7G7yciSNmlzHyXOmY28QqI3Rr8gFuM6PixDQXjSyUq8kculZkJojp/KYJC2BCmfa83 sIRO9pmPFJfm1gkY86rQ702jeMUq0QymwpI5vokw6Nts//TXLakAmonXxDWOGLwG3ZBdRv hsc3eF1v5VFRFU7a41a35yRPKXWUkBxfot/T8BbpDobaD/J5SUhQey6Vt8ySbxZmGeRrhr RjoHfhhQtGFoQbENtMIZGbf+C8L7SiaH0Fi/huaNkFFvP85H9psfzlQa4939Ub2m40RNF5 +XixNyFDEXa00g3IHeYns7fo/ZfmGAtqiwtzHTlF+zSse53V67RXFzIbX6ANnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7X1n61zfGv; Tue, 2 Jan 2024 00:37: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 4020bCJ1084911; Tue, 2 Jan 2024 00:37:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bCHX084908; Tue, 2 Jan 2024 00:37:12 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:12 GMT Message-Id: <202401020037.4020bCHX084908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8fa808af6fb9 - stable/14 - freebsd32: Report errors when copying out oldlenp in __sysctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8fa808af6fb98fd6cf942f2dac13b35c264552bd Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8fa808af6fb98fd6cf942f2dac13b35c264552bd commit 8fa808af6fb98fd6cf942f2dac13b35c264552bd Author: Mark Johnston AuthorDate: 2023-12-26 01:37:32 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:42 +0000 freebsd32: Report errors when copying out oldlenp in __sysctl This matches the native implementation's behaviour. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43101 (cherry picked from commit 81eb7baa69e983fe159d254a4ed47d9c00396801) --- sys/compat/freebsd32/freebsd32_misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 5aafc459d60a..41f456d67e5b 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2675,9 +2675,9 @@ freebsd32___sysctl(struct thread *td, struct freebsd32___sysctl_args *uap) uap->new, uap->newlen, &j, SCTL_MASK32); if (error) return (error); - if (uap->oldlenp) - suword32(uap->oldlenp, j); - return (0); + if (uap->oldlenp != NULL && suword32(uap->oldlenp, j) != 0) + error = EFAULT; + return (error); } int From nobody Tue Jan 2 00:37:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7Y5f8rz55yTS; Tue, 2 Jan 2024 00:37: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 4T3v7Y4Ch8z3HXf; Tue, 2 Jan 2024 00:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hixTeZQHZ/99fhZ53AXUBgUaBsDq2TdF8baanLDspfo=; b=hUv6vo+Aa+Laxxu94ixnQ2tRwzcWVOd0gBEYlBO6E75rg0hMb+JEuFsWVd1bs148buzxQy PTvPexQAPZnVCphIW+Fwd0Y8PmcUURGZe4KnAjT0FgU4XMl8ZFrwpNkL1dDf8Db0swQQev khvULhPAMSotDySykDxOu/0ErZLe0nrlSmW/+eAn8EvFSTTRrCzC5r+o2IcuGPs4j1Nxy5 TdqF/e8mwMcrMN+KlZzk4dyBkbRsrKiEj+r0lCobbE9dJ0DK6zzDcTk9awTNFzkKaRIeSL S5Lk/3vxnwT6zMMb12jKKPay6OISJGjnrPPq67zIqGWzNp5Om960zHMvxGW3EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155833; a=rsa-sha256; cv=none; b=PuqKhnL42wII5OXNKftqUJtc741BARp1EFLqaSbRe8c07wLdEcu30ON/LjBCt+M3805PTq +O1Sa0ec6y7XMhQKC2TRzmsrLFUqnCSx/dacsgNft/2hRsVpH4C6FfkgrqAHBhYJ9zxkBU k5CzYkzEUOvRnDfnzoIaCJWgN6r5HvFpmLp94G7Y2HOqAocWulhVWOvsOpMVnAbhKWD8ut n1Jw+Y43QkMJN1PHgzLf6ExaGu8W1dVoEUAAfxM2hnswxA2Icw+zGW52vELIU9OLis6apT //eC23zmfr6vrzdV958bxPCe4ZJ8xNEvE2YB8uNG5518FXqURAIWPG92Guvgyg== 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=1704155833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hixTeZQHZ/99fhZ53AXUBgUaBsDq2TdF8baanLDspfo=; b=sq+Ur8Kge8S9FN4OWpAw8OXrl7aKb2G8IL+ZeMwHQoEjVhxc21tFsVvU/x+kZxTT/w0KVd Dn66YpXAD4SqdXq8aQWy1rIcQUblBUmE2oYTMp6J2CvB2JJG6ZmnHmbkNJM0R+yyzEFU36 iQQBjHyUtflu2m5NWleCGLWF8qTZaZVaVleVh72QjERogmCUxkLVe43YVHId8nFlWSk0A/ bCISFBYkjV+SuF9B13JWrfCTKLFo/NeHlAcKDFCgsY3jgIiEyQ5N2TF61iHtHuRmTbOCri dz2l22Qkw5t3Eo4UQwo5C+Q5CTgokFoP7YV2rHa2wh1krbz6X6KRqunhOOg/5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7Y2pzqzfGw; Tue, 2 Jan 2024 00:37: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 4020bDZl084966; Tue, 2 Jan 2024 00:37:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bD9M084963; Tue, 2 Jan 2024 00:37:13 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:13 GMT Message-Id: <202401020037.4020bD9M084963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4f1e5e94d4ac - stable/14 - hid: Handle errors from copyin() in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4f1e5e94d4ace6e8c253faa80b462bf0370990e0 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4f1e5e94d4ace6e8c253faa80b462bf0370990e0 commit 4f1e5e94d4ace6e8c253faa80b462bf0370990e0 Author: Mark Johnston AuthorDate: 2023-12-26 01:37:49 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:43 +0000 hid: Handle errors from copyin() in ioctl handlers If copyin() fails, the driver will proceed blindly with a zeroed buffer, which is not what we want. In preparation for annotating copyin() with __result_use_check, start checking for errors. Reviewed by: wulf MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43102 (cherry picked from commit e452fa70d50761b5fe5f19c3c93c107be116728c) --- sys/dev/hid/hidraw.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c index fbc75aaa4e79..6a05b633cfc8 100644 --- a/sys/dev/hid/hidraw.c +++ b/sys/dev/hid/hidraw.c @@ -674,13 +674,16 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, sc->sc_state.quiet = true; mtx_unlock(&sc->sc_mtx); if (error != 0) - return(error); + return (error); buf = HIDRAW_LOCAL_ALLOC(local_buf, hgd->hgd_maxlen); - copyin(hgd->hgd_data, buf, hgd->hgd_maxlen); - bus_topo_lock(); - error = hid_set_report_descr(sc->sc_dev, buf, hgd->hgd_maxlen); - bus_topo_unlock(); + error = copyin(hgd->hgd_data, buf, hgd->hgd_maxlen); + if (error == 0) { + bus_topo_lock(); + error = hid_set_report_descr(sc->sc_dev, buf, + hgd->hgd_maxlen); + bus_topo_unlock(); + } HIDRAW_LOCAL_FREE(local_buf, buf); /* Realloc hidraw input queue */ @@ -737,8 +740,11 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, default: return (EINVAL); } - if (id != 0) - copyin(hgd->hgd_data, &id, 1); + if (id != 0) { + error = copyin(hgd->hgd_data, &id, 1); + if (error != 0) + return (error); + } size = MIN(hgd->hgd_maxlen, size); buf = HIDRAW_LOCAL_ALLOC(local_buf, size); error = hid_get_report(sc->sc_dev, buf, size, NULL, @@ -775,11 +781,13 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, } size = MIN(hgd->hgd_maxlen, size); buf = HIDRAW_LOCAL_ALLOC(local_buf, size); - copyin(hgd->hgd_data, buf, size); - if (id != 0) - id = *(uint8_t *)buf; - error = hid_set_report(sc->sc_dev, buf, size, - hgd->hgd_report_type, id); + error = copyin(hgd->hgd_data, buf, size); + if (error == 0) { + if (id != 0) + id = *(uint8_t *)buf; + error = hid_set_report(sc->sc_dev, buf, size, + hgd->hgd_report_type, id); + } HIDRAW_LOCAL_FREE(local_buf, buf); return (error); From nobody Tue Jan 2 00:37:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7b0B1Pz55yTX; Tue, 2 Jan 2024 00:37: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 4T3v7Z4mxPz3HZv; Tue, 2 Jan 2024 00:37:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IFm4DY/z/xfAYNoI1thOjNbqZZgMpg5lMdXIO5UW2Cg=; b=Zq88i/KJJUuedXVdyvmspBy/NMa1a9Ag95iYqS6ddboK4AznPMM1NR35hOrHzkx7YBlbdQ DL+FBeuC0TKCW/C2aN7E2iy8vKNo9qA0Smy6+3JUepiW45X8plCML6C+Bs4Cg7rLs2I8jo 1Z62Kts4TH/0ijE87NT0vPUcRppxWTnKTp2EZ4i8Xxw6APq8Rf7/j1brEXbkoj750fapP9 MKAotunJ6fn0UkbFk/Ea7yFdGMRuq++2recdny9H1IhdIuTvw0B8839S23FQUvt4guke+4 8fGDH4ermMmFCJyyvCPIyijL9FOlc49Q6LfumBLsdu3MZUTZLSrV8quZGQJVEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155834; a=rsa-sha256; cv=none; b=xiEXdRttYJVIZGu4QHYIh9YfUGqnGinWBS0ABKqy2DNAYqDATgjdHBC4Xfntw3ugMelpnw aB3vjB7ymsoIR3bDRNrsRNo+z5SOEcjFCw+23+zcMk71Qj6hxE5rOnyucVumw2ZdMX/NBH vvfKbWsHtT+occn2RarSYHhKtbpPYIk/yi+agDFGypDT5i32FTp+bNaV255K+ADlIkdh7g 7Eps7sLL9BTdT/4L/SMF7vCaPT/IPTY0D6R2HCCZjJS6xvwjFQJ/Y2uILNWYzepfzc1qum Gkf9hZqPTBHWTlkAba6S/QKsrXQGYctNtxyrnmRTW6qxe13batUYIJ+K4JJhfw== 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=1704155834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IFm4DY/z/xfAYNoI1thOjNbqZZgMpg5lMdXIO5UW2Cg=; b=HTIlH4wemr+IJv7Ok7gIF78KL3PnMLj+izj6CAHUBvHSi7GRayx7QdWcINY135mpL3wDli q0dKx/yELfolQJYYtumSzfYcDohH6fr1BH2x91SawSjiDtHI/ensoK7yAhPTyuCrqrvFZ+ FEsgQYlXELorFWoRR62Bgk47AEm/CducLpFoCf/OGSVM5UwrWjMgNX1VjoX+BLkWbjE87M +W+DuIF2oMOJre1bHpgtbXYIWHNviMy7woGekhYcgBq1oH11tPMPXGIH2Ee7k2PjrZmGbJ 6wAQvhdAnGjtpIEipFEYq4IRKAD/6+UjFoUTHZpauYYJ00ljVoJFD9Tq+gcc9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7Z3glQzfsg; Tue, 2 Jan 2024 00:37: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 4020bEoc085029; Tue, 2 Jan 2024 00:37:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bEwa085026; Tue, 2 Jan 2024 00:37:14 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:14 GMT Message-Id: <202401020037.4020bEwa085026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f9946e9ae724 - stable/14 - uhid: Check for errors from copyin() in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f9946e9ae7240d0c27d1062bec54d48e14b4204a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f9946e9ae7240d0c27d1062bec54d48e14b4204a commit f9946e9ae7240d0c27d1062bec54d48e14b4204a Author: Mark Johnston AuthorDate: 2023-12-26 01:38:04 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:44 +0000 uhid: Check for errors from copyin() in ioctl handlers This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: wulf MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43103 (cherry picked from commit b2caed2f8d699d6dc59ecf8810d945cdea148c44) --- sys/dev/usb/input/uhid.c | 14 ++++++++------ sys/dev/usb/input/uhid_snes.c | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index 2f65a07dea56..863e04f4e52b 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -634,9 +634,10 @@ uhid_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, return (EINVAL); } if (id != 0) - copyin(ugd->ugd_data, &id, 1); - error = uhid_get_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + error = copyin(ugd->ugd_data, &id, 1); + if (error == 0) + error = uhid_get_report(sc, ugd->ugd_report_type, id, + NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); break; case USB_SET_REPORT: @@ -661,9 +662,10 @@ uhid_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, return (EINVAL); } if (id != 0) - copyin(ugd->ugd_data, &id, 1); - error = uhid_set_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + error = copyin(ugd->ugd_data, &id, 1); + if (error == 0) + error = uhid_set_report(sc, ugd->ugd_report_type, id, + NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); break; case USB_GET_REPORT_ID: diff --git a/sys/dev/usb/input/uhid_snes.c b/sys/dev/usb/input/uhid_snes.c index 085881faa88b..7a16542794cc 100644 --- a/sys/dev/usb/input/uhid_snes.c +++ b/sys/dev/usb/input/uhid_snes.c @@ -359,9 +359,10 @@ uhid_snes_ioctl(struct usb_fifo *fifo, u_long cmd, void *data, int fflags) return (EINVAL); } if (id != 0) - copyin(ugd->ugd_data, &id, 1); - error = uhid_get_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + error = copyin(ugd->ugd_data, &id, 1); + if (error == 0) + error = uhid_get_report(sc, ugd->ugd_report_type, id, + NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); break; case USB_SET_REPORT: @@ -386,9 +387,10 @@ uhid_snes_ioctl(struct usb_fifo *fifo, u_long cmd, void *data, int fflags) return (EINVAL); } if (id != 0) - copyin(ugd->ugd_data, &id, 1); - error = uhid_set_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + error = copyin(ugd->ugd_data, &id, 1); + if (error == 0) + error = uhid_set_report(sc, ugd->ugd_report_type, id, + NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); break; case USB_GET_REPORT_ID: From nobody Tue Jan 2 00:37:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7c06k9z55yld; Tue, 2 Jan 2024 00: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 4T3v7b5rF5z3HdM; Tue, 2 Jan 2024 00:37:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=chutXDWsmZ5VMvWNwHUMeGTUZVDaepxwxMlTaHeWnCA=; b=ON/+lZhvZeSoXmRqEslr9VhS8AhqJBkBm7DWc6KH/bzqH1Kg4VXAGl7aMSdw7sDzadjFhd /wGhYGZc97k3+Q4fVo31/1lUWL5Mzybw25cZ1DjMrSHVqdlIS8m/GWK++H0+BXnry/K06L 8E2qQGuhifJrS3DNaEmj8GcrWizuuB7ln+jRK/PezdXA5lICrbaVKp49LJXqenbHzXHwOG 5gFFXI5x+ln4Psr4QCIySgNSitec4JW2ZApX76nJ+RCSj2NH4RO/UqQE5ESnV0bfouWcf3 nHyzmcnyjBmtxmK6eOwQYx5ridPKxZcYePofZJIsxQUvRpQFSxQrEZRGMqtwjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155835; a=rsa-sha256; cv=none; b=QWYr8Lujr5VqlpGlzorXk8Fh4ytc6/ktmR4gFmk+QzdF6nkJOWh9lx+RXs73JJopGhnkIO 303KDYcR3INPGEmZct5EV9carbK8XbymBczIjlVCCmbfQw5GmpBC3GGtKFgWUwCyEq4PaW n/zlsz4PiigQXmNuYg+1TtyJwLmLWgJuTBAug2v0Sw30GUBmZblpqFNLEWPhxhtvf9L3wl /SR48TivGrABNdZXPl9nx3EBLiEo1w6pQsA3P7tmW6AFopb3wr+BFXuOcSw9GxD3ll1sH1 dJtgjI+lH+kk3EO5/xvmGOegohr1c0F5B4zYviUuaSL8TaQtVmpStLldMiyp6Q== 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=1704155835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=chutXDWsmZ5VMvWNwHUMeGTUZVDaepxwxMlTaHeWnCA=; b=MXMCjB6fI5LGG0LRh+sdmlWqUobPmBFQgGL2fk8+Cip/XU531l3+tKziulMNfiSxkbsY2Q y3bwNp1m4NFNciw6Oef7d18ZRmvbna7+FdqM/keB421lrSD3q3DFWtwUwz+uAj31/FKYql 4HLFXMs6oByo8XoDJpIjCtQT90jasUKTq0COp54BGy2ADcZwCbn/OLfoNvMxGRguNzSN5G mxdxKmo0vg5L3y3oF2cg0rPjx9e/pEKWXBqdd+6Wi8CjP2DdJk5e2jA8CO/Ec1VTHcE/4v Xpb1SQhqz5Tj9p4/7Jakes1/nxl3vL5U0ll8kL6QO66aJO4LLwAzcJ3SaS1Tgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7b4t7zzfQB; Tue, 2 Jan 2024 00:37: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 4020bFfM085077; Tue, 2 Jan 2024 00:37:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bF0v085074; Tue, 2 Jan 2024 00:37:15 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:15 GMT Message-Id: <202401020037.4020bF0v085074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8adca661c2bb - stable/14 - mpi3mr: Check for copyin errors in mpi3mr_map_data_buffer_dma() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8adca661c2bbcec780d0ad532be4a870090e35db Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8adca661c2bbcec780d0ad532be4a870090e35db commit 8adca661c2bbcec780d0ad532be4a870090e35db Author: Mark Johnston AuthorDate: 2023-12-26 01:38:12 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:45 +0000 mpi3mr: Check for copyin errors in mpi3mr_map_data_buffer_dma() A failed copyin will cause the driver to use the contents of uninitialized buffers instead, which is unlikely to be the behaviour that we want. Check for errors. This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43098 (cherry picked from commit 6bfb7306ef92aaccffae42ed00ce6d7201b76966) --- sys/dev/mpi3mr/mpi3mr_app.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/mpi3mr/mpi3mr_app.c b/sys/dev/mpi3mr/mpi3mr_app.c index 001753732a35..cf3afc7bba95 100644 --- a/sys/dev/mpi3mr/mpi3mr_app.c +++ b/sys/dev/mpi3mr/mpi3mr_app.c @@ -544,6 +544,7 @@ static int mpi3mr_map_data_buffer_dma(struct mpi3mr_softc *sc, { U16 i, needed_desc = (dma_buffers->kern_buf_len / MPI3MR_IOCTL_SGE_SIZE); U32 buf_len = dma_buffers->kern_buf_len, copied_len = 0; + int error; if (dma_buffers->kern_buf_len % MPI3MR_IOCTL_SGE_SIZE) needed_desc++; @@ -559,6 +560,7 @@ static int mpi3mr_map_data_buffer_dma(struct mpi3mr_softc *sc, if (!dma_buffers->dma_desc) return -1; + error = 0; for (i = 0; i < needed_desc; i++, desc_count++) { dma_buffers->dma_desc[i].addr = sc->ioctl_sge[desc_count].addr; @@ -573,12 +575,19 @@ static int mpi3mr_map_data_buffer_dma(struct mpi3mr_softc *sc, memset(dma_buffers->dma_desc[i].addr, 0, sc->ioctl_sge[desc_count].size); if (dma_buffers->data_dir == MPI3MR_APP_DDO) { - copyin(((U8 *)dma_buffers->user_buf + copied_len), + error = copyin(((U8 *)dma_buffers->user_buf + copied_len), dma_buffers->dma_desc[i].addr, dma_buffers->dma_desc[i].size); + if (error != 0) + break; copied_len += dma_buffers->dma_desc[i].size; } } + if (error != 0) { + printf("%s: DMA copyin error %d\n", __func__, error); + free(dma_buffers->dma_desc, M_MPI3MR); + return -1; + } dma_buffers->num_dma_desc = needed_desc; From nobody Tue Jan 2 00:37:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7d14sRz55yny; Tue, 2 Jan 2024 00:37: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 4T3v7c6q0Hz3HKk; Tue, 2 Jan 2024 00: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=1704155837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pH+medsmpmeZgjGD6Phkxn6WcFzKQlIzIgEhkjtVpnI=; b=a6aOvHHkQWGZ7c2Z32sKM2txYlJx1PqsyB1S+BOPuydfYeluoH2pANXoQTHcQAfJTyERcF UpU0Tz46KQ1LXetwd1Y5+Bs7prKPVxv+ayzYaeXthlUBOI2im/697BkuHVrQodeep0KFjK qKXoH7PXH6SkKUfZKCpC6gwNE4WGAUcy1/YRRUFmafZOhFDsT3ocLocwtpGED31aeVP903 SoE3oUGRhPSR3rIxmSSpe3C70qfEZQQnvlxA9Xr4MjL7Y92pZKa2h3pf9zW/CtRGwpq1zz kwtCcxYg9ug3x16rEe3PJvr8XEcuhLpZLs9wOj7fagJC/6/GatkyB8CrM2xJTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155837; a=rsa-sha256; cv=none; b=yafw8gshj6r+8snwQ0ua9BGY5x3+E/zGMuwj6MmNdMpEbRSeqqNqCq4xWp+jNcIGxvDHrh DD9u3M29e8YKVDVtmaChzCwcmtaDA6r9lHWNQilSUVDC8UtnSOpkvdzWKA1XIVzF5eZ1rZ qvQb5g7MTrTTbxizfTaJI/m8BI/J5x5VA9Q2xaIwHuDWtPqMFIdaiJSYkT1/BoSQPZaqbH pfGGB+ZAnHBnNhaFVqMMxBlwoqZFL2CtAMfiTYeAtQMmTJ5pDL3g8SVa7g0k5FhHQR0zju G39dJ7WdpdE5RMPz6ExkrzrrsA3lGFEgyFYKK6A+K1hwMzI/CHMgaM75KHi1cA== 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=1704155837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pH+medsmpmeZgjGD6Phkxn6WcFzKQlIzIgEhkjtVpnI=; b=B/2d/U84xQeXqAH7+SKYM4u3d9BLGJQRSxhmLllcM9bDapEwjF9k+nRW7AHAGvnsJYzwu9 8hYi6nas6oBhLvYXKSLHBVlqSeflfhQ0x6vmjg719kgjG/j1axJUFPbPXjuW3cz/K8RrTT OXaA1qDcXIZnGrpEGbWTLnr5VzaqcCVWAWkq5QSyhCrT3aCJCUMHLRt1/tzkRKXibKfxXc c5BXRgZPMjMlGLqPovWuygfpgKYX0JaST0rEt9wgKWalYN9qRMa+DPD27FSmu4RuwB3uOU XfBPeCO7jZ1raG+Oaldf7wEVWZjQoKU22skEr+hqs0Rpm65+UhSGvAxAHAWG0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7c5w8GzfQC; Tue, 2 Jan 2024 00: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 4020bGKY085131; Tue, 2 Jan 2024 00: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 4020bGjR085128; Tue, 2 Jan 2024 00:37:16 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:16 GMT Message-Id: <202401020037.4020bGjR085128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d8fe1e4c5a9d - stable/14 - ocs: Check for copyin errors in the ioctl handler List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d8fe1e4c5a9dd17d79635c5964b7fa68f1954bea Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d8fe1e4c5a9dd17d79635c5964b7fa68f1954bea commit d8fe1e4c5a9dd17d79635c5964b7fa68f1954bea Author: Mark Johnston AuthorDate: 2023-12-26 01:38:57 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:46 +0000 ocs: Check for copyin errors in the ioctl handler If copyin() fails, the driver will blindly proceed with whatever had been in the uninitialized DMA buffer. This is not what we want. Check for copyin failures. This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: ram MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43097 (cherry picked from commit a01ff11cb73d7a1988f6241f63d141371ff23717) --- sys/dev/ocs_fc/ocs_ioctl.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_ioctl.c b/sys/dev/ocs_fc/ocs_ioctl.c index 6021ddf5c0d6..71ba17d5f72a 100644 --- a/sys/dev/ocs_fc/ocs_ioctl.c +++ b/sys/dev/ocs_fc/ocs_ioctl.c @@ -86,6 +86,7 @@ static int ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma) { sli4_cmd_sli_config_t *sli_config = (sli4_cmd_sli_config_t *)mcmd->payload; + int error; if (sli_config->emb) { sli4_req_hdr_t *req = (sli4_req_hdr_t *)sli_config->payload.embed; @@ -127,7 +128,13 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma) wrobj->host_buffer_descriptor[0].u.data.buffer_address_high = ocs_addr32_hi(dma->phys); /* copy the data into the DMA buffer */ - copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); + error = copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); + if (error != 0) { + device_printf(ocs->dev, "%s: COMMON_WRITE_OBJECT - copyin failed: %d\n", + __func__, error); + ocs_dma_free(ocs, dma); + return error; + } } break; case SLI4_OPC_COMMON_DELETE_OBJECT: @@ -170,7 +177,13 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma) return ENXIO; } - copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); + error = copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); + if (error != 0) { + device_printf(ocs->dev, "%s: non-embedded - copyin failed: %d\n", + __func__, error); + ocs_dma_free(ocs, dma); + return error; + } sli_config->payload.mem.address_low = ocs_addr32_lo(dma->phys); sli_config->payload.mem.address_high = ocs_addr32_hi(dma->phys); @@ -184,6 +197,9 @@ static int ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd) { ocs_dma_t dma = { 0 }; + int error; + + error = 0; if ((ELXU_BSD_MAGIC != mcmd->magic) || (sizeof(ocs_ioctl_elxu_mbox_t) != mcmd->size)) { @@ -238,13 +254,13 @@ ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd) if( SLI4_MBOX_COMMAND_SLI_CONFIG == ((sli4_mbox_command_header_t *)mcmd->payload)->command && mcmd->out_bytes && dma.virt) { - copyout(dma.virt, (void *)(uintptr_t)mcmd->out_addr, mcmd->out_bytes); + error = copyout(dma.virt, (void *)(uintptr_t)mcmd->out_addr, mcmd->out_bytes); } no_support: ocs_dma_free(ocs, &dma); - return 0; + return error; } /** From nobody Tue Jan 2 00:37:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7f25Hnz55yjB; Tue, 2 Jan 2024 00:37: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 4T3v7f0l5Gz3HkH; Tue, 2 Jan 2024 00:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+6GaA9OHOlTwX40yxvuRHgY18vmKJdAHC4NuieMljSE=; b=GTkD/Y599X6AJS5yZ+ltXAEV0TQIcO9zyF1cTZq2M/6Ybw0A/Rg0cY39DwejGQdkEFgkk7 3fs3rwU2olZCPJR4FINQUStZM7kNe7wafelik1e6cwLZ1tqbEsIP3m2XXJVdr3XybprLDW 2lPuuMOhggVbAx+5GS4uhwtMZpchIcfSqVoqz9GZl+9xT9furFEzBSmz+nbqFCuY+yVrV+ jF2WwaqylM5tZfdgzRwv/vP6tp55IDlvViPsHKMu7XBqI4lPlqQuZhQ7AUTp3Pg2H/C2mo T8FmXGUB7JSrSZqOJVZlyLWDUT8O9fg0L6y23O4xbNhAlibDM22hKA/dpix36Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155838; a=rsa-sha256; cv=none; b=DMhif+q9sWDZv/6JemKMJOEWjqv4Q6UPoH5kOZiT+/uop86w7n50HzFxqyoJoLfF33zXAf JpWOLDG3R24MXM03X3QhVdmjbVJQVcSWwEjw2vgtSf8EsEw9d3kpp/AOnqt/FQn6Wv8R+D xkDktZVlugBUb+2t4fQIHgrexZbqIbSbO7sirZLyYwesoG48TIzIV/w4gJIeR6amG4BuDJ nAuaQSLb7L07im+Vw4pT8tOpM47Xbu7iSQZWBAAmRdH39d2H0FN3fb78Cbhxr2yYwr79xg OTCJ4BYR9eJIT4W8VAqd9gXOPtHepCXUIJkZqD3YInWMikrYwvB4v9uZs+TSfQ== 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=1704155838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+6GaA9OHOlTwX40yxvuRHgY18vmKJdAHC4NuieMljSE=; b=dePRM5BxV0KabG6FHVnsM4wyT1rbd1760jInlBaFe3rkR5iKuOZpGuQVgGsOOStrA1rx8c WqyTDsgD1ms45wgkMXRBUN0lbcgpUVzkVJu721+s/imCGlUcg+Cfv27ckr3dDEAC202aOf vMeffdfjfj6gwhKrU68Q0mu5L3BGFBV5hVZhPngtIUa0Fw7D9Bw5JQ9dk6FMeiq3+CiHn7 TPlurrLcPgGTmxEVhliq6AHrEWXv2t641zL6PNsXREXsFkCxHOTcOeU+33FHOyr9KJ1dKQ cfT2jxb5kJ5msjq2o/B8LtkMVkuQ1I7XMuh0OOY6FFFJe40baGiJBn0K5JEbgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7d6yfhzfQD; Tue, 2 Jan 2024 00:37:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020bH58085182; Tue, 2 Jan 2024 00:37:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bHCr085179; Tue, 2 Jan 2024 00:37:17 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:17 GMT Message-Id: <202401020037.4020bHCr085179@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 81ee40d0a269 - stable/14 - compat_freebsd4: Check for errors from subyte() in freebsd4_uname() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 81ee40d0a269f8fb902f79b9e6f018944880ac8f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=81ee40d0a269f8fb902f79b9e6f018944880ac8f commit 81ee40d0a269f8fb902f79b9e6f018944880ac8f Author: Mark Johnston AuthorDate: 2023-12-26 01:39:21 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:47 +0000 compat_freebsd4: Check for errors from subyte() in freebsd4_uname() This is in preparation for adding a __result_use_check annotation to copyin() and related functions. Reviewed by: imp, kib, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43099 (cherry picked from commit 4f35450ce52a7b141e7ae8d37fa257b5f8971dda) --- sys/kern/kern_xxx.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index 3fe681d0c08e..398ac18c9422 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -327,7 +327,9 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) 1, 0, 0, 0, 0); if (error) return (error); - subyte( uap->name->sysname + sizeof(uap->name->sysname) - 1, 0); + error = subyte(uap->name->sysname + sizeof(uap->name->sysname) - 1, 0); + if (error) + return (EFAULT); name[1] = KERN_HOSTNAME; len = sizeof uap->name->nodename; @@ -335,7 +337,9 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) 1, 0, 0, 0, 0); if (error) return (error); - subyte( uap->name->nodename + sizeof(uap->name->nodename) - 1, 0); + error = subyte(uap->name->nodename + sizeof(uap->name->nodename) - 1, 0); + if (error) + return (EFAULT); name[1] = KERN_OSRELEASE; len = sizeof uap->name->release; @@ -343,7 +347,9 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) 1, 0, 0, 0, 0); if (error) return (error); - subyte( uap->name->release + sizeof(uap->name->release) - 1, 0); + error = subyte(uap->name->release + sizeof(uap->name->release) - 1, 0); + if (error) + return (EFAULT); /* name = KERN_VERSION; @@ -376,7 +382,9 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) 1, 0, 0, 0, 0); if (error) return (error); - subyte( uap->name->machine + sizeof(uap->name->machine) - 1, 0); + error = subyte(uap->name->machine + sizeof(uap->name->machine) - 1, 0); + if (error) + return (EFAULT); return (0); } From nobody Tue Jan 2 00:37:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7g3gTSz55yjG; Tue, 2 Jan 2024 00:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3v7g1q21z3Hf8; Tue, 2 Jan 2024 00:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFQ9yubEKQLwZNlD5wvYzdJ9hTmznopCwanzmqmVMbg=; b=lBneQ6tvGa1k87Sqf+c5MDT/J88tHSBh62f9ib3Q2+At/9Z8ucSARR24tCJzmHDNefdPlr zsFCKrMzsUw3939Bspo09XFBhN+lmSbSy4id5kHCjuLY3pVMLBTczHdKywmWead5Z6Yjr8 l/HZKa6KtsV7n/Mvl3TsfFX7Eah0Jtx21ZPr28qw2+Mh85UsdGU89CPaK6Qu7DPJfnWHMF NcbjHWct8ZDv5itLgZCtUjJamCj6P7oox5y/iQW06G9/XgUN7/M2Uv8FyrHWNSapx2+OOb BuYKUdqtQauU7M9HcexpwITvHjQhWXnMenHx03WiMafDUehXeKaFkjWynSNIkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155839; a=rsa-sha256; cv=none; b=n5doLFV8lbYOK+RpEJ1WL+59DPqUU8UT9dOhY7aFkx/bth9myyIwreu7e5C88DEJvDEGrP ius39ZAVju81HESd2Enr1i70sFgYzMYSvQsQwlBI69rpteMq53c6t0b50Kn8dmInwXNj7U 3RD5RoPBVnczrAmR3qkiJIfhaMKr6dn2h1F/ELf4AeXsLph/PJbrEt7H2jhraxwqHOAAwp Iv010zRZ0MQR1yLZ2sr8zbUSqYED14+1ELvNLvLLpwAdzDRoxdSiWFLR/V53h/VcUnLyU/ iAQ2fgP3xQQhCjMtZJvOIjs4qIoRbSZ1YFuRWUnz4NUe4sanzXA4WYq6OxUTgQ== 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=1704155839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFQ9yubEKQLwZNlD5wvYzdJ9hTmznopCwanzmqmVMbg=; b=MJMf4q3O/YcWn0irXzrPM8VI4riou2eGUZK9gmMIR4/XGuxd0lHbzXng8pgvCqqmSJ3oYh CHWQqHZp6gX0Q4iOUBqvh39N/ZA5xR1WUwKAPBHUrwq9H9Q6AfGtuOEcmMS0lS+suhpeXw 6FXpLUOI657IIdK3/5Dr+YfxYmMDSvpQGOnDXO478oeua/i6pqsZtgBjgR1ywTYgXh5bkI Xcfg/PljPHBe40HbR3zFcBQev/FRG69pEIh0AeqaMghVfCBnfyNqYNTww9RjG4lnS1Omvr rtX5sC3MDwzZM21sHrHSMX70w7U54iU5/E2SXbpVVY+/JGt+TUkihT+4xcPSCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7g0wYHzfQF; Tue, 2 Jan 2024 00:37: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 4020bJWT085232; Tue, 2 Jan 2024 00:37:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bJdr085229; Tue, 2 Jan 2024 00:37:19 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:19 GMT Message-Id: <202401020037.4020bJdr085229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f9c3b1be3677 - stable/14 - thread: Add a return value to cpu_set_upcall() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f9c3b1be3677e9bf770fc037a35b7df56f1bb032 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f9c3b1be3677e9bf770fc037a35b7df56f1bb032 commit f9c3b1be3677e9bf770fc037a35b7df56f1bb032 Author: Mark Johnston AuthorDate: 2023-12-26 01:39:39 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:48 +0000 thread: Add a return value to cpu_set_upcall() Some implementations copy data to userspace, an operation which can in principle fail. In preparation for adding a __result_use_check annotation to copyin() and related functions, let implementations of cpu_set_upcall() return an error, and check for errors when copying data to user memory. Reviewed by: kib, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43100 (cherry picked from commit 7b68fb5ab2a276ccd081cc1a43cebf0fb315e952) --- sys/amd64/amd64/vm_machdep.c | 19 ++++++++++++------- sys/arm/arm/vm_machdep.c | 3 ++- sys/arm64/arm64/vm_machdep.c | 3 ++- sys/i386/i386/vm_machdep.c | 11 +++++++---- sys/kern/kern_thr.c | 5 ++++- sys/powerpc/powerpc/exec_machdep.c | 3 ++- sys/riscv/riscv/vm_machdep.c | 3 ++- sys/sys/proc.h | 2 +- 8 files changed, 32 insertions(+), 17 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 27bf3f67ca25..9e77ac7af2d7 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -613,7 +613,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -639,13 +639,15 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, td->td_frame->tf_rip = (uintptr_t)entry; /* Return address sentinel value to stop stack unwinding. */ - suword32((void *)td->td_frame->tf_rsp, 0); + if (suword32((void *)td->td_frame->tf_rsp, 0) != 0) + return (EFAULT); /* Pass the argument to the entry point. */ - suword32((void *)(td->td_frame->tf_rsp + sizeof(int32_t)), - (uint32_t)(uintptr_t)arg); - - return; + if (suword32( + (void *)(td->td_frame->tf_rsp + sizeof(int32_t)), + (uint32_t)(uintptr_t)arg) != 0) + return (EFAULT); + return (0); } #endif @@ -665,10 +667,13 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, td->td_frame->tf_flags = TF_HASSEGS; /* Return address sentinel value to stop stack unwinding. */ - suword((void *)td->td_frame->tf_rsp, 0); + if (suword((void *)td->td_frame->tf_rsp, 0) != 0) + return (EFAULT); /* Pass the argument to the entry point. */ td->td_frame->tf_rdi = (register_t)arg; + + return (0); } int diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index b7c08cd4e97f..3fd39d3f7a97 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -227,7 +227,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -239,6 +239,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->tf_spsr = PSR_USR32_MODE; if ((register_t)entry & 1) tf->tf_spsr |= PSR_T; + return (0); } int diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 5e45b45dc320..66528b8487e0 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -206,7 +206,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -223,6 +223,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->tf_x[0] = (register_t)arg; tf->tf_x[29] = 0; tf->tf_lr = 0; + return (0); } int diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 8e0917eed1c2..e05791967fba 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -488,7 +488,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -512,11 +512,14 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, td->td_frame->tf_eip = (int)entry; /* Return address sentinel value to stop stack unwinding. */ - suword((void *)td->td_frame->tf_esp, 0); + if (suword((void *)td->td_frame->tf_esp, 0) != 0) + return (EFAULT); /* Pass the argument to the entry point. */ - suword((void *)(td->td_frame->tf_esp + sizeof(void *)), - (int)arg); + if (suword((void *)(td->td_frame->tf_esp + sizeof(void *)), + (int)arg) != 0) + return (EFAULT); + return (0); } int diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index d75305ea5020..544479fc9f13 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -146,6 +146,7 @@ thr_new_initthr(struct thread *td, void *thunk) { stack_t stack; struct thr_param *param; + int error; /* * Here we copy out tid to two places, one for child and one @@ -165,7 +166,9 @@ thr_new_initthr(struct thread *td, void *thunk) stack.ss_sp = param->stack_base; stack.ss_size = param->stack_size; /* Set upcall address to user thread entry function. */ - cpu_set_upcall(td, param->start_func, param->arg, &stack); + error = cpu_set_upcall(td, param->start_func, param->arg, &stack); + if (error != 0) + return (error); /* Setup user TLS address and TLS pointer register. */ return (cpu_set_user_tls(td, param->tls_base)); } diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 0b1751a76454..0c10115c4e25 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1149,7 +1149,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) td->td_md.md_saved_msr = psl_kernset; } -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -1201,6 +1201,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, td->td_retval[0] = (register_t)entry; td->td_retval[1] = 0; + return (0); } static int diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index 58acf5df9e14..043093960edf 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -179,7 +179,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -190,6 +190,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->tf_sp = STACKALIGN((uintptr_t)stack->ss_sp + stack->ss_size); tf->tf_sepc = (register_t)entry; tf->tf_a[0] = (register_t)arg; + return (0); } int diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 0b91b2a1a0b5..6d6a4e8624c5 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1248,7 +1248,7 @@ void cpu_fork_kthread_handler(struct thread *, void (*)(void *), void *); int cpu_procctl(struct thread *td, int idtype, id_t id, int com, void *data); void cpu_set_syscall_retval(struct thread *, int); -void cpu_set_upcall(struct thread *, void (*)(void *), void *, +int cpu_set_upcall(struct thread *, void (*)(void *), void *, stack_t *); int cpu_set_user_tls(struct thread *, void *tls_base); void cpu_thread_alloc(struct thread *); From nobody Tue Jan 2 00:37:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7h52s6z55yWx; Tue, 2 Jan 2024 00:37: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 4T3v7h3HDnz3HQs; Tue, 2 Jan 2024 00:37:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WkAVW1qrxbcXfGCQE9QzdhPNIS5P2eFELKNMGSjiZk8=; b=rvsQbAE3GTYno7XvV+Cm65XojmmhZSNATkAAff+j6WGdwF6nWLdLX2z396gc/PYIbnWwF2 /8RCnqkUozKHd//VC2YV2wr25caSsGSKKwAxX8y1wTIiv4n+RvrGKvLdsdmPi6zpDsZ8nD Oedmf7Gn6xi99W71SDgin/UfZ0Re6egmfJH9Z4UhJPTINFbXUXI/+PD2dM5UQsAt54kUTd E+rMR1QEFoW9Da3DCbltyUFkmmhvY92UHCimPkUxtbGaD4Ygz5O96sIMT4oneyW4l9zWEn u5VTreNwycI3iltRFk3DljFQFejc7ZpQ5Em3iG1PqWQJVZbBisCQqVOcr3opxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155840; a=rsa-sha256; cv=none; b=ngIvuwZ7rUD6ODcFZkDUaqQVBJKNq81oswTY/3X3jSt1SNcCfdaqM9MRJY+xNBxrIcE09w aA/RolOjwKwKOnoS2biO+quYY6rh6C0+Hdi4Umey6pQDBcKU3/MxkgrAzGAqDxSMwAsuLQ 1fJwh30scL+7UC4GLM6kYDJWX45FAs70iPJkjp7ytqPxZcgioBkkJCTK/DrdkWPxO7vBJ1 R/ceQ+zUJJUSJH1aSdCMzLTpcLrlx8IDMU+pE8u129BUXr8Eq1WUiUn4oafmLSMUY/Gjny ogWR+OmUdgMSUmG0lenEdYr9QkqVz4MRa2tlOnuLxT7tRk9LR3JtPvHMnLw3NQ== 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=1704155840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WkAVW1qrxbcXfGCQE9QzdhPNIS5P2eFELKNMGSjiZk8=; b=DV0Kh5bwZbNPBNk/Vpjo6lOL8HBP2T2MLtm48P9dop3lC/luteQBtktCY7Eh+3Uk4Ome3m J8QRFzTudDK9hygPtKZ4WRXiKSuly8n+zFkGp17+yvkJiubXF2ee7ENauFe/4J0DO/+Qnc aGVzsq2WAVkzPYFYGU50MCkAOPyFGVn+ADRSHHADY7uKd9+5+T96yufRIOsqyhTvNNsPxJ AX0GtL7uUD0NIgQRwhKq5C37+wpPLvrYYk8217kdXk3BLEVzD/rR8s89bpUC6rMm604mU5 bdeiw2/TwyyyUgwlSqC3qCB4kZW08ySOmX4EZUFyarjZsyNziwQpbJq1SduRVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7h1x8VzfqW; Tue, 2 Jan 2024 00:37: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 4020bK7q085286; Tue, 2 Jan 2024 00:37:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bKjD085283; Tue, 2 Jan 2024 00:37:20 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:20 GMT Message-Id: <202401020037.4020bKjD085283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c8fdf4b88e02 - stable/14 - linux: Check for copyout errors in linux_fixup() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c8fdf4b88e026640e082536c12da33288922a04d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c8fdf4b88e026640e082536c12da33288922a04d commit c8fdf4b88e026640e082536c12da33288922a04d Author: Mark Johnston AuthorDate: 2023-12-26 01:40:05 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:49 +0000 linux: Check for copyout errors in linux_fixup() This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: olce, dchagin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43104 (cherry picked from commit 3fde275167ce1f1455a03586d29840546d06d97a) --- sys/i386/linux/linux_sysvec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 8990b9b806ca..24f8ec2d7ea8 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -126,11 +126,14 @@ linux_fixup(uintptr_t *stack_base, struct image_params *imgp) argv = base; envp = base + (imgp->args->argc + 1); base--; - suword(base, (intptr_t)envp); + if (suword(base, (intptr_t)envp) != 0) + return (EFAULT); base--; - suword(base, (intptr_t)argv); + if (suword(base, (intptr_t)argv) != 0) + return (EFAULT); base--; - suword(base, imgp->args->argc); + if (suword(base, imgp->args->argc) != 0) + return (EFAULT); *stack_base = (uintptr_t)base; return (0); } From nobody Tue Jan 2 00:37:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7j58bJz55yX1; Tue, 2 Jan 2024 00:37: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 4T3v7j41wpz3Hqb; Tue, 2 Jan 2024 00:37:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lg9HWwwzrTYi+170cvdnPjmkpAZFvnn0vnogXdr+qLU=; b=c56VhxFOrt/k5EKi8j6AdiiDDdk6jtp3i795ZeocB3i5u6TrRnbHx7tIsfW6T0aBuV9SaH 4O2RC0wV7UFn40vei/HwfJuJemIt/yM/cLwR3drJfU8O8FkcSRfujzJ4j37NejRxeSSOmt 7SJULlljiLBS5en2jeEeCUjHGBmP8n0HOyvVP50VvtJu6Qmd870FRaolh+mnRPIemxy5cc YDyHTvJUyiv8YOEMCEzWeFPdB3B1Zw3f+B2ao9jQS5Y/nU6H627Kjzo+KdSXCrIp2mJHIw /ovuhYmp2SJrZyq53VFlO6AZvieeIiVEY1/ymG2qTkBrJrfWCJA3SnqJH1rr8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155841; a=rsa-sha256; cv=none; b=nk5GVHkqAti6oB2Eb2ySnXVnnqRIpEML/FBDQPdv0DCM2slGf5G/HtD5hbuS6xxUntJ3k6 xEOAAvXk57KXql3pm7r1y7OiBpr4sF6lnbQ1bx8KYhPjAAkT6X0wdc183daGQyFqittpKY mdrA2bdo7kU2PXBmMxdtGQBqX8ZqNtOKMxuvCAArlfS/QgaYaoRCq0mpnJdYKbSkD1QyEV TQOeL33xwzx5wtXrVVEqHER6v8Z6kkhui5/8yffj3Slje6JkO2TRdJ+uUfrjP7/Q1FDos+ 7zerCTPw9NWNy3B3arp6N5ky3MhKVz59f19910k2tXpWbs12eXs2P3FXyLAsUw== 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=1704155841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lg9HWwwzrTYi+170cvdnPjmkpAZFvnn0vnogXdr+qLU=; b=gnyt7PgvBKMV6/QsDUaVbr3zH9KJQ+UrtjN1mqI61+F7zJwyUWzp35f7ERA/QdopdVaRm6 0Je6h+Z34mowptVkEJ1Ik2VelD2b9Dg0y0O14nhCfCwZZ++Xkz+oLXerDA2suFr8LJtzj8 szHDAUgWjbaZ6EFuAa8bGtmd+kuapccAQgWSjphBSSBs3fSHx2fu/wuFYtjY7309cAEqzo IbFdsq0RJ/VW3yCFaFPqPGY/j8hXDyIZNpVWJKcigSleieAoquZWAErqqpJBbFMyBEGDGu 0D0ITjZm8SVwgkFSWIbRq+gu2FRn/uCeA4CurTGd8b6fKLEV4ea6Spovseupsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7j2xydzfYL; Tue, 2 Jan 2024 00:37: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 4020bLex085334; Tue, 2 Jan 2024 00:37:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bLSq085331; Tue, 2 Jan 2024 00:37:21 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:21 GMT Message-Id: <202401020037.4020bLSq085331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: eb5a0f6271a0 - stable/14 - powerpc: Avoid ignoring copyin()'s return value List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eb5a0f6271a01aafe39bd232f2f91133a8e36fbc Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eb5a0f6271a01aafe39bd232f2f91133a8e36fbc commit eb5a0f6271a01aafe39bd232f2f91133a8e36fbc Author: Mark Johnston AuthorDate: 2023-12-26 01:40:16 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:50 +0000 powerpc: Avoid ignoring copyin()'s return value A recent change made it possible for cpu_set_upcall() to return an error. Do that here instead of ignoring an error from copyin(). Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43105 (cherry picked from commit bdf03b4bcc4a9aa0be503dbc64415e6b0b845fbc) --- sys/powerpc/powerpc/exec_machdep.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 0c10115c4e25..94e561ddd33a 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1155,6 +1155,9 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, { struct trapframe *tf; uintptr_t sp; + #ifdef __powerpc64__ + int error; + #endif tf = td->td_frame; /* align stack and alloc space for frame ptr and saved LR */ @@ -1182,10 +1185,12 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->srr0 = (register_t)entry; /* ELFv2 ABI requires that the global entry point be in r12. */ tf->fixreg[12] = (register_t)entry; - } - else { + } else { register_t entry_desc[3]; - (void)copyin((void *)entry, entry_desc, sizeof(entry_desc)); + error = copyin((void *)entry, entry_desc, + sizeof(entry_desc)); + if (error != 0) + return (error); tf->srr0 = entry_desc[0]; tf->fixreg[2] = entry_desc[1]; tf->fixreg[11] = entry_desc[2]; From nobody Tue Jan 2 00:37:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7k6kpkz55yjN; Tue, 2 Jan 2024 00:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3v7k4xh4z3HgF; Tue, 2 Jan 2024 00:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RyVjmXXm6DW1ppQnK6M1Bf7MCprNwZTW/TzIIBMxKN8=; b=pXV86w6/8SX73xiaR866CSJ6X/dIw5WSGF0+O3WBDgwz7patW67ruxp/dv4osa82WT0BOF HKoepBf8X6+ExMmHZlSKPvPI+nWzgwaY+DGcPKLibZ0CpCcWOG0m0LNV3J4bW3L8oDssd8 kw5wDJ70MjAtxBp+8uL4PPVuX+/Sm7GAdxcqC37JXyUYVE66br6RN4ycM6X4HywZOQ8/Le L1lZXQqRRh5d5JPn+k2KKTJkPsMrOEWtVf+sVDMQAc2PvTFmkI1XiSdjXqRPCefrnPiFMI UX6Xtq7t0Ni9KJoiM79Q4sLT5iccV/KrJ41P0vkQ57mt73r9CxwgEMM0r5+/BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155842; a=rsa-sha256; cv=none; b=kccM6zDRDnkavqsSk2DSyP6nh6IXY9cYr4RDwz+iUBKswgzulSiUo20wVR1JJk1+3QghhV ojtnqNarWXYjoG5i8rHzVUTMWDRJVfCtR9jcUBa3HAXA1+99Wne6qR9RoUNyLKW8RnynmQ ap5y8HdTPNr2b64IqDYRPKg66JwL4qF9APVVn+z4Qxy8IldKh6hsZhrg0axS1Mzf0Rt5xY uxh06J/eIKt8fMthRparEylc968dy+ePSVQ5QaoZtLnvRDOYGwpkMer4wgGBNRghh6hawY jdy49UkLyetPampH7dWrvc+qlHf2UdptzmV9mvwKO+UAscLdPnPFg12ho4cM7Q== 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=1704155842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RyVjmXXm6DW1ppQnK6M1Bf7MCprNwZTW/TzIIBMxKN8=; b=v26NybOKH3yAKIZZExxJBpGrA570Due0BvcJF8t6bAdg4fRD8FHOeRWpWH14Pg+Xcqn5Mm cKNHecB2Yv7YSRollgafTCC/ltgA+ybgfDSXFcjmgB+RP+mwIuOezXePJ6ImMNC0Yal7vj 7Zde3NHijjrg5EeJBWLmHQO8wy1ltpm45OTHIZek8U3xWQLG1ChNKyxODhIHsSUCcJdP6X yR2aBBaAnw6Sgud25q2piMO708OS2TAPLFMQs5YzY7oEGBNTSNk2O1lLV1UEnoHFtg6zlt 9sE9SeJTlfWdgEamfOcq1zJHI9oiauh6qyDxxE2BCzP2tszRPxVLirkEqZtcJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7k43QMzflv; Tue, 2 Jan 2024 00:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020bMFq085382; Tue, 2 Jan 2024 00:37:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bMWY085379; Tue, 2 Jan 2024 00:37:22 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:22 GMT Message-Id: <202401020037.4020bMWY085379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: cd4fa9258949 - stable/14 - ses: Add error checking for copyout() calls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cd4fa9258949b1a1a67a98022a350d4131faa6bd Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd4fa9258949b1a1a67a98022a350d4131faa6bd commit cd4fa9258949b1a1a67a98022a350d4131faa6bd Author: Mark Johnston AuthorDate: 2023-12-26 01:40:33 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:50 +0000 ses: Add error checking for copyout() calls This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: mav, imp, asomers Tested by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43130 (cherry picked from commit 771501e96ffd7e314c338300a351ad76d28a2f69) --- sys/cam/scsi/scsi_enc_ses.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c index 767f4f0b7fa6..34e79b55ed51 100644 --- a/sys/cam/scsi/scsi_enc_ses.c +++ b/sys/cam/scsi/scsi_enc_ses.c @@ -2811,8 +2811,8 @@ ses_get_elm_desc(enc_softc_t *enc, encioc_elm_desc_t *elmd) } if (elmd->elm_desc_len > elmpriv->descr_len) elmd->elm_desc_len = elmpriv->descr_len; - copyout(elmpriv->descr, elmd->elm_desc_str, elmd->elm_desc_len); - return (0); + return (copyout(elmpriv->descr, elmd->elm_desc_str, + elmd->elm_desc_len)); } /** @@ -2828,7 +2828,7 @@ static int ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devnames_t *elmdn) { struct sbuf sb; - int len; + int error, len; len = elmdn->elm_names_size; if (len < 0) @@ -2840,10 +2840,13 @@ ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devnames_t *elmdn) ses_elmdevname_callback, &sb); sbuf_finish(&sb); elmdn->elm_names_len = sbuf_len(&sb); - copyout(sbuf_data(&sb), elmdn->elm_devnames, elmdn->elm_names_len + 1); + error = copyout(sbuf_data(&sb), elmdn->elm_devnames, + elmdn->elm_names_len + 1); sbuf_delete(&sb); cam_periph_lock(enc->periph); - return (elmdn->elm_names_len > 0 ? 0 : ENODEV); + if (error == 0 && elmdn->elm_names_len == 0) + error = ENODEV; + return (error); } /** @@ -2922,9 +2925,9 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *sstr, unsigned long ioc) size = rsize; if (size > sstr->bufsiz) size = sstr->bufsiz; - copyout(str, sstr->buf, size); + ret = copyout(str, sstr->buf, size); sstr->bufsiz = rsize; - return (size == rsize ? 0 : ENOMEM); + return (ret != 0 ? ret : (size == rsize ? 0 : ENOMEM)); case ENCIOC_GETENCID: if (ses_cache->ses_nsubencs < 1) return (ENODEV); @@ -2936,9 +2939,9 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *sstr, unsigned long ioc) size = rsize; if (size > sstr->bufsiz) size = sstr->bufsiz; - copyout(str, sstr->buf, size); + ret = copyout(str, sstr->buf, size); sstr->bufsiz = rsize; - return (size == rsize ? 0 : ENOMEM); + return (ret != 0 ? ret : (size == rsize ? 0 : ENOMEM)); default: return (EINVAL); } From nobody Tue Jan 2 00:37:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7m0k5tz55ygc; Tue, 2 Jan 2024 00:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3v7l65Czz3HwZ; Tue, 2 Jan 2024 00:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WTWVCNi6yc07ZimML4GYBQBJnuSigA77IXMfycAtVLk=; b=UozJJJmdR0Plyp0Tr1AlEzs7kLpz+LXDGOnH1WeVJ8nMlyOpx0wjxmP6dWyR4KG1LuplCH Yn/e+95cVKt8vB9s1wslHb7dG2qPLn7cVAAY1iOj4IFnAINYjs6XjYZZURLKchZp/Ax3Lm BqTFFj/TKhiSE4u2efJSf778x6IKcLUfArBGiVvMO5jaym1R4nerJkj1T36yrMLVQgHRZa DdtROJ1UM3elzzOpl5219nEeLPtVrghNEge/M/qI5Li0mWo3aqZKS5RSBNeys+ju7EX7k8 /qz554eqFbtBo98xoxhgIhwPW1KTWZ9i551UCbbMBV+RVeYm/EgFnU4nExcB1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155843; a=rsa-sha256; cv=none; b=Eboo+tTktH5F5gMQ3Kl/iMpODZp194bs4zR8RTg//qdlQ5Rp+uYdnXlCxy7NhRUsA41lxz /WQxkZ1kjwcZ3T5FKTGUeCkZVNFXLotMstiSKkseOZc1WeL/x9l7a0HUC3s1Lae8KwCxRr PyWSnh+vbTeWYyMvI2xawOf4/txhweb/DhHBdfWkY9nmEXgQW1ZaPsKMUAYibD8Owgxp3Y QQ6ukstjWvY33yByz3r/hwgblXiT+wKO9da+y725949FzPkXel1oVHr7vXFUwoi0dE4Hhb rjhsyePZWSpUq4UCiaAGCB0wpyE06X7O03zKqIiak8GBR75VtAInymFvDCujOw== 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=1704155843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WTWVCNi6yc07ZimML4GYBQBJnuSigA77IXMfycAtVLk=; b=Z2SuraMqxZbAegDTz9GSX0w9FEOJ9nG4eEgQAxlkjrd/Bz3lD4QRDllBMZLOMo9tVbp27n l6+pJL2KhKUmqw4iTwxx5+6UHYqrV0IhkLv0hAjDICgvkldOjWFrt/fFSq2BxJikuQmLA3 +EAOfY6XXXs/AidtdBRpACK1w4eu1/L24Sj+kN8rSqEJpNlT0HtZSm3nxWWtC7TgLSDWn3 EwJChHwjs/A94WFfjsK44giwO18wKVvqwyxrWD8ZYEKMSEicLyEdbi1y8sznDlB6bilRCT 0vIe0Lzttj0Unhjl/Koh1iMcp4QeHSSDuS7E8NSog7QkcLS0YngNJ6/T+odizQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7l5B5xzfsh; Tue, 2 Jan 2024 00:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020bNFt085428; Tue, 2 Jan 2024 00:37:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bNLQ085424; Tue, 2 Jan 2024 00:37:23 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:23 GMT Message-Id: <202401020037.4020bNLQ085424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c7975edd99b7 - stable/14 - sendfile: Explicitly ignore errors from copyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c7975edd99b7b47b5a8e4112b3494d1c5bac96dc Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c7975edd99b7b47b5a8e4112b3494d1c5bac96dc commit c7975edd99b7b47b5a8e4112b3494d1c5bac96dc Author: Mark Johnston AuthorDate: 2023-12-26 01:41:32 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:51 +0000 sendfile: Explicitly ignore errors from copyout() There is a documented bug in sendfile.2 which notes that sendfile(2) does not raise an error if it fails to copy out the number of bytes written. Explicitly ignore the error from copyout() calls in preparation for annotating copyout() with __result_use_check. Reviewed by: glebius, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43129 (cherry picked from commit d0adc2f283ad5db6b568ca533a056c9f635551cd) --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/kern/kern_sendfile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 41f456d67e5b..f2d66cf74b2b 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2195,7 +2195,7 @@ freebsd32_do_sendfile(struct thread *td, fdrop(fp, td); if (uap->sbytes != NULL) - copyout(&sbytes, uap->sbytes, sizeof(off_t)); + (void)copyout(&sbytes, uap->sbytes, sizeof(off_t)); out: if (hdr_uio) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index dfdf01f45e34..f6f6b57adfc7 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -1328,7 +1328,7 @@ sendfile(struct thread *td, struct sendfile_args *uap, int compat) fdrop(fp, td); if (uap->sbytes != NULL) - copyout(&sbytes, uap->sbytes, sizeof(off_t)); + (void)copyout(&sbytes, uap->sbytes, sizeof(off_t)); out: free(hdr_uio, M_IOV); From nobody Tue Jan 2 00:37:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7n2Wmxz55yTl; Tue, 2 Jan 2024 00:37: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 4T3v7n0DLLz3Hys; Tue, 2 Jan 2024 00:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YOMoDEw5kEBDTDWrcaYKJ5NM2OmJu1ds/M3nUBGnu8=; b=t9C2+FmyQWCGXskBw70uNWHSeSK783b/MTZ8uJVscDiISeYLoi48XmRNTuSMXV5sZz/DKW tPFCWU9HBf1sPBtJGxan/CPGugu9ITym5V9v641GWz9JwfSUXqOyr0+6ZhkFD+ogY8hs8W yBAplCwL656P6RFXZpSa/xRORvX4KgrcGReDJS2weNnGnSyehT8sfkd9YWR8loPgJqYHRl hRX0awbdyJjgKCnab2LOS+i0SIS+Zdhe3HJbRwT1Nu9tefxSOLWxygLLBQvHl9uatsvJw0 EJ6CRdosmnVoOxjHmyVVbjWRFEVEsNW854xMmfQeojP/iRxi8CwQ+AO8azxlBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155845; a=rsa-sha256; cv=none; b=Xo5XiWlLIdo6rbqMgBhiypElHwtDAgzTqoEW7VoayTEzeMBi3TUGAE/PMy211Qy3q2Mdfz 9NEfSFyf6wb7F9cXZVz6LXTSwbRU2Xo3NbH6nL6s9HZ8oNC2GbfmAR55Syr6Lo1iT4KzGA 7zUBlSBmyYNlcJlxZvzjJc2RVK2UgHRShz6/5aBtvREh8pas1BvHT5PnHdbqDmpzaxDkmk eMVBVrkyS5YhGCd6C8DHzwwe/eNc5ycZYcTfYmUj1xqhjTa69bigrgdDZMi4I93GKHoiSU olIdi93BcaRV1GfkKsceL+Jq8RbUyZS9Dstb+ZYRtVlV0YlvpnDblMfKMSsXTw== 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=1704155845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YOMoDEw5kEBDTDWrcaYKJ5NM2OmJu1ds/M3nUBGnu8=; b=EPQmyuurzcOcy+BTaKRMhmq6GL1agHTo+S4LbsQZnI/TwXjZGFbtCLpklDqZVHFmVUhwSq zK9BQ415ljCzQhqjCkFteO55xPIXZVe+B6Z7AdXhUwnOcwAQrpLQg+ptU8vvliIfuDi/rD VTUZjg0FT05BULBXsE12rYVvEFSpokjEd6/bnC3hCFVpLIYb2pE7CUmqmM1aU1/3KZ1ZXw Kw10eD8LtkFJ7PXRh2x2d6mNFaHuC6eVxr4Q6o9n2NUj9/zqBH8LSjxORHhycxJyFH5Sof PNZ+kjXreLvDczxiJSkVSH8m+dRCOh5raN+LBugfwFUIyobBw3+tosZyu7I4eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7m6PvqzfbC; Tue, 2 Jan 2024 00:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020bOtr085486; Tue, 2 Jan 2024 00:37:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bOAA085483; Tue, 2 Jan 2024 00:37:24 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:24 GMT Message-Id: <202401020037.4020bOAA085483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4b4f8106bdfb - stable/14 - jail: Ignore errors from copyout() while copying the error string List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4b4f8106bdfbf2dd03f89bc8ea02c6991de0555a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4b4f8106bdfbf2dd03f89bc8ea02c6991de0555a commit 4b4f8106bdfbf2dd03f89bc8ea02c6991de0555a Author: Mark Johnston AuthorDate: 2023-12-26 01:41:54 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:52 +0000 jail: Ignore errors from copyout() while copying the error string Reviewed by: zlei, jamie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43142 (cherry picked from commit abbc260f74b203646dd108ad4038627fcfb0ded7) --- sys/kern/kern_jail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 57e6024a9939..e95008be42e8 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -2163,7 +2163,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) optuio->uio_iov[errmsg_pos].iov_base, errmsg_len); else - copyout(errmsg, + (void)copyout(errmsg, optuio->uio_iov[errmsg_pos].iov_base, errmsg_len); } @@ -2548,7 +2548,7 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) optuio->uio_iov[errmsg_pos].iov_base, errmsg_len); else - copyout(errmsg, + (void)copyout(errmsg, optuio->uio_iov[errmsg_pos].iov_base, errmsg_len); } From nobody Tue Jan 2 00:37:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7p2mG6z55yZD; Tue, 2 Jan 2024 00: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 4T3v7p1Sq3z3HxD; Tue, 2 Jan 2024 00: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=1704155846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AOEm/f2WVfeaMdyrz6Pel7/9QhLWqMTngCS2vZcH68o=; b=KwcTF6rlzX7BR6+U9quYoizds9Z5KoHiAqnmQDqgqJVOGFXT4AFrshMzndxRJolYtIxoVC j42Vo4CUimy/1pwpWnUuO458nK6vLK3QByxH11A1VBSAa6L3e9pjskPK+zvoJvWH5GcLn4 RS+nJPAFebLzbdWIrWwk4lyfLB6Qm52OBh7an02/kKK+ti7wgknGIXOrTGNXJr6b7iKnf1 vG3T/vcL84PJi9EV1Ml/LTEiZ7y64G1RLA1H/0KGa15erM60P1UKxgmcDQZkeg6fvu23dy EhVlcHyHHI1maGaLgORa7KBrnEy1wLJG5EGsgZUVVCFx0G5AH989CZz4KuRfyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155846; a=rsa-sha256; cv=none; b=eNT25kEM8L2a7sqjtYjlV1J5VQJ1SQUxklBgV1Nx5ndjRnC6pEG2JxTxCX6zK/Ma9r413s oOf7aPuQlzu5x07nKHp2Y8cigrZMImayaWm3OePiYN8drwZjHeDTzfGn7+drK13dQz0ypU ctPyNiU5SSNSyZEscjcR5dh7fPVmKl/ufJ3Mx1z19pkVlt8MGlcFcE+cMqHQ0xWz7WEXPk 3AZP49xhmxZMgn9GGA6WxQETjHefRvT7vjwToaTuElTRxwJhoc7nF1y0GY0KRl0HZq9CYy hi0oOjF7lDQGKZdR+GNupd4XreGGib95S8cqdBOwwWA7ql8a0dJNl3huKMMTrw== 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=1704155846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AOEm/f2WVfeaMdyrz6Pel7/9QhLWqMTngCS2vZcH68o=; b=azQW1TKl6+3KqLIJRFHEmkwZfU1/G+bHSbTDk78TDHwRBF6uQL+3+SOrkiTIic+XXiotWR yKoukEGPBgbZQ5jDld0auQVMo+c8HA96osjHOYYnTHLgbE2ToL6LDzGMDT6/Xi/6Bz/uWf vR7GA/2IJ82jQg0yvex2YU4CXH4kOIp9NU3T9KPqdLpsbuk+IPPQ6CNGT9XYlwj3SsxQsE 9iujYzJTErxEKj1vKn2AnUsSEk7KGXJtMMVfCmNnyltEBkYdQNDPZZ+Oshxaw532+LfNiq hfqdTpsfp/S5wmXxHjI5vZLocacyeANHdp10sRqWp9BMIcase7gNB0bRKq3A1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7p0XTpzfsj; Tue, 2 Jan 2024 00: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 4020bPEZ085544; Tue, 2 Jan 2024 00:37:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bPH0085541; Tue, 2 Jan 2024 00:37:25 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:25 GMT Message-Id: <202401020037.4020bPH0085541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 14943fbc483a - stable/14 - thread: Ignore errors when copying out during thr_exit() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 14943fbc483a502a3e183d88f69954642ee91eba Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=14943fbc483a502a3e183d88f69954642ee91eba commit 14943fbc483a502a3e183d88f69954642ee91eba Author: Mark Johnston AuthorDate: 2023-12-26 01:42:04 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:53 +0000 thread: Ignore errors when copying out during thr_exit() It does not seem reasonable to return to userspace after calling umtx_thread_exit(). This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: olce, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43143 (cherry picked from commit f450277f7a608f26624384e046c1987490c51296) --- sys/kern/kern_thr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 544479fc9f13..e2f1b6baca4b 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -315,8 +315,8 @@ sys_thr_exit(struct thread *td, struct thr_exit_args *uap) /* Signal userland that it can free the stack. */ if ((void *)uap->state != NULL) { - suword_lwpid(uap->state, 1); - kern_umtx_wake(td, uap->state, INT_MAX, 0); + (void)suword_lwpid(uap->state, 1); + (void)kern_umtx_wake(td, uap->state, INT_MAX, 0); } return (kern_thr_exit(td)); From nobody Tue Jan 2 00:37:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7q5DMcz55yXD; Tue, 2 Jan 2024 00:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3v7q2g1Bz3Hrs; Tue, 2 Jan 2024 00:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gOJKjxbup0iAdJPIobV4fTpPWVRAmI4U1y/9tiPMNA4=; b=aFKfU8QttTGKDmC90lhqRzEVsO9SiHuFj66fBab5TdKzQa/kdUzr8C/9IcdmxQ2dzlCkJb 6Nvk+DUaU9jzD15p0C4FkAyR7J4XIhTDy7/4FjY5L2As9P/vhxJTrL3SFS0akwCo0ITJUC /T0f+/ylQT9JmU68QK5ERTMl515/TVA7digaUWUdFQfj1RzjXaBXWmDHhyd5VDw/XlG0P9 WlbfyGHgLXqSFxOOEG3Bf/pVHBhQwRMlB9vIvGQ6xwt/MaZGYuc+VftBNsIWa4TXHeCcVO uDZnlNircP2RIq2pdQmy586cMj3091x9bsMoupAYr7e4E37G/oDlIz3TGe/StA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155847; a=rsa-sha256; cv=none; b=eIUvLCJiws6nHIs3FgRqKpP89wmgz/Ths1KGHU4RM8zPTdA2fSzwzTwd2wULj7t9jkq2Hc fw4trzehclMH575M7/3tEjkJw63pOjJbCDPLJ37FOAdLIBToFyXJwVNhK3nUM7En9n6HGk +0BfHyZdatyqw/YcJ6tT3FifKJJneZ7zYcJDJkqNKAYPI4kbTchBrA4aKHt7z6DRMP4qFi 40XqV1sDVZ5W/VE6nmnTm+/lPxx2qHr89N8ZIwD/cAAexg0DoxoWx7LGmeTYpMAL7d4C9x 9D/9nvD5q9Pi7kqj+y+HL+9uip4GU+Wl2OvTIs4Wz7csBPDGAj5e4X9354uW7A== 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=1704155847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gOJKjxbup0iAdJPIobV4fTpPWVRAmI4U1y/9tiPMNA4=; b=DgQo8CSG81FW2lIfMLkTJjpuul1igvkNi4K4b3LuZRn8ok/EfEGnugQE8+DB7UWErph8Q4 jq3/PqMkz4ft2dgjyRnxGzP5ou+Nod3jNQrlht0kgkHdVGsOGeZIB3UkYXr2c6CMXSb5Wm 0ZvMSaKRbWlyOBbTwtUfUjHpPtOk4QGa50tnk5y0VLtY4kEi3n2r0kQnLPACgL8AkvTkOZ O9Ck+oU37l21Bn8IFgx5dE23enFQzYpgHwAPfYIHp6qEObGfsXhNOZlha9UDaW0Q868+3t HIFEPd+CQ52nAsM+cTvF0tZiOnULKE3bj0Eergb0YUikToWgNe3GJaOoGGgE1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7q1mprzfmx; Tue, 2 Jan 2024 00:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020bRo6085589; Tue, 2 Jan 2024 00:37:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bRpF085586; Tue, 2 Jan 2024 00:37:27 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:27 GMT Message-Id: <202401020037.4020bRpF085586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8ff1566cb202 - stable/14 - umtx: Check for errors from suword32() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8ff1566cb202519cea1ad86850e1547fa01c749a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8ff1566cb202519cea1ad86850e1547fa01c749a commit 8ff1566cb202519cea1ad86850e1547fa01c749a Author: Mark Johnston AuthorDate: 2023-12-26 01:42:17 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:54 +0000 umtx: Check for errors from suword32() This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43144 (cherry picked from commit 3379d9b5de4c4876a317d25ca008e66b1111b701) --- sys/kern/kern_umtx.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index ff9505b8e31d..57ff74f5421e 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2960,7 +2960,14 @@ do_cv_wait(struct thread *td, struct ucond *cv, struct umutex *m, */ error = fueword32(&cv->c_has_waiters, &hasw); if (error == 0 && hasw == 0) - suword32(&cv->c_has_waiters, 1); + error = suword32(&cv->c_has_waiters, 1); + if (error != 0) { + umtxq_lock(&uq->uq_key); + umtxq_remove(uq); + umtxq_unbusy(&uq->uq_key); + error = EFAULT; + goto out; + } umtxq_unbusy_unlocked(&uq->uq_key); @@ -2990,7 +2997,9 @@ do_cv_wait(struct thread *td, struct ucond *cv, struct umutex *m, umtxq_remove(uq); if (oldlen == 1) { umtxq_unlock(&uq->uq_key); - suword32(&cv->c_has_waiters, 0); + if (suword32(&cv->c_has_waiters, 0) != 0 && + error == 0) + error = EFAULT; umtxq_lock(&uq->uq_key); } } @@ -2998,7 +3007,7 @@ do_cv_wait(struct thread *td, struct ucond *cv, struct umutex *m, if (error == ERESTART) error = EINTR; } - +out: umtxq_unlock(&uq->uq_key); umtx_key_release(&uq->uq_key); return (error); @@ -3176,12 +3185,14 @@ sleep: */ rv = fueword32(&rwlock->rw_blocked_readers, &blocked_readers); + if (rv == 0) + rv = suword32(&rwlock->rw_blocked_readers, + blocked_readers + 1); if (rv == -1) { umtxq_unbusy_unlocked(&uq->uq_key); error = EFAULT; break; } - suword32(&rwlock->rw_blocked_readers, blocked_readers+1); while (state & wrflags) { umtxq_lock(&uq->uq_key); @@ -3206,12 +3217,14 @@ sleep: /* decrease read waiter count, and may clear read contention bit */ rv = fueword32(&rwlock->rw_blocked_readers, &blocked_readers); + if (rv == 0) + rv = suword32(&rwlock->rw_blocked_readers, + blocked_readers - 1); if (rv == -1) { umtxq_unbusy_unlocked(&uq->uq_key); error = EFAULT; break; } - suword32(&rwlock->rw_blocked_readers, blocked_readers-1); if (blocked_readers == 1) { rv = fueword32(&rwlock->rw_state, &state); if (rv == -1) { @@ -3360,12 +3373,14 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock, struct _umtx_time *timeo sleep: rv = fueword32(&rwlock->rw_blocked_writers, &blocked_writers); + if (rv == 0) + rv = suword32(&rwlock->rw_blocked_writers, + blocked_writers + 1); if (rv == -1) { umtxq_unbusy_unlocked(&uq->uq_key); error = EFAULT; break; } - suword32(&rwlock->rw_blocked_writers, blocked_writers + 1); while ((state & URWLOCK_WRITE_OWNER) || URWLOCK_READER_COUNT(state) != 0) { @@ -3390,12 +3405,14 @@ sleep: rv = fueword32(&rwlock->rw_blocked_writers, &blocked_writers); + if (rv == 0) + rv = suword32(&rwlock->rw_blocked_writers, + blocked_writers - 1); if (rv == -1) { umtxq_unbusy_unlocked(&uq->uq_key); error = EFAULT; break; } - suword32(&rwlock->rw_blocked_writers, blocked_writers-1); if (blocked_writers == 1) { rv = fueword32(&rwlock->rw_state, &state); if (rv == -1) { @@ -3574,7 +3591,7 @@ again: rv1 = fueword32(&sem->_count, &count); if (rv == -1 || rv1 == -1 || count != 0 || (rv == 1 && count1 == 0)) { if (rv == 0) - suword32(&sem->_has_waiters, 0); + rv = suword32(&sem->_has_waiters, 0); umtxq_lock(&uq->uq_key); umtxq_unbusy(&uq->uq_key); umtxq_remove(uq); From nobody Tue Jan 2 00:37:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7r5VGPz55ypN; Tue, 2 Jan 2024 00:37: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 4T3v7r3Sx0z3Hxj; Tue, 2 Jan 2024 00:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QaUrRZotRFEErbvxAWPLpgGAvBfWEWAyJpRMcX5Tv9Y=; b=DOv911RvAGtxZHD9mLTFQKdNdteNWmJxsKWFuGXYhXRwNrm6QuCDX/go0XUodfZ2ccdpAO i/k+Jyt0AQ/OxyzRi0lHFf+itdTXaEq2VmQnKtHKcidRQZD3nmFJLyYT4CoE6yGfGU/yg+ q7MwQohFLk9mo8z6TX4EurO1kSAqOlKTiHrGQRmd1EMf1RN3QJa4fJmxB5uJnScRCedkxK KQeqUkINvzZGnXX6f2579ZChXDIwcuNNz1aTdd+AJQiUYUWJEClQEUIeYVEp8eXYatQzgU wZtvaWqpqjDP0xkUDEOkBLyRPAMvpQJ22ZQ0vmKdj/M9oRQYSwjhO1Yv5ltnxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155848; a=rsa-sha256; cv=none; b=wbAhsj+WFWtnmF/XdhHM/b2ntDQolZ+rPHvBa9ibismSXlbi8gStlGRTng8RoHSRpRdxJB 0CleH67hx/RyTY+5/XtKqpU80PZZamRYNSqZ6dV96J6NknBeyFkE9shmkMyUNLq4d/RIcI HKx0gYf2l6KGYdSrqJJxfJu7uxbyE9c9zndRjkt3NsDxvKg4yZBJ8FIPp/6RmO4wg6RYtl ZdNOMCwWTo7hXi2JIBXEWXY0L3Vnj0RAsmFyg5xgUUn4GGfASQGVZIcZcOEbeUpFwTF7Kt KBvpldcMZwv9DZdUlon6LqkCnUQisyt8uBuBgEbE1Fma/sYqYvzlxFjqubp7+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=1704155848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QaUrRZotRFEErbvxAWPLpgGAvBfWEWAyJpRMcX5Tv9Y=; b=GCZ1W4lVBegaZwa9GofeyAdZsmT9E2uAoZczjrPOvjdMbMYhrkHmDbVD/i+3fLoW/qIVkE 0tMCvg9q9Q62B0t/gSh+PVsv0vcPw941bwhs05VrbjvFgDFb+Iv5YytAg/KJzRqZLLpact zUoJfLlLzM3UDsMHCt/cg/6/jy72bxiTmx0Y6+7S53A1rXIjbUW8CV+X9dSNjZGJuH4Pg+ XeSfoq1nPoXvG8/I15h/xzASV+HS897XjwesgB7fdMivPOJ+T8MGbb4P44f27Fwy4OyfL9 rBo6WVjP+oDd44FuPKqIC8PZycqQwYTtV+Ru5pKRl1M1TffuFC1mnKW+n5YSkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7r2Z9qzflw; Tue, 2 Jan 2024 00:37: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 4020bS57085640; Tue, 2 Jan 2024 00:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bSh7085637; Tue, 2 Jan 2024 00:37:28 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:28 GMT Message-Id: <202401020037.4020bSh7085637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0e83222347c5 - stable/14 - mps: Handle errors from copyout() in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0e83222347c5a039bac43c45f174f9b4cdc90336 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0e83222347c5a039bac43c45f174f9b4cdc90336 commit 0e83222347c5a039bac43c45f174f9b4cdc90336 Author: Mark Johnston AuthorDate: 2023-12-26 01:42:33 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:55 +0000 mps: Handle errors from copyout() in ioctl handlers In preparation for adding a __result_use_check annotation to copyin() and related functions, start checking for errors from copyout() in the mps(4) user command handler. This should make it easier to catch bugs. Reviewed by: imp, asomers MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D43176 (cherry picked from commit bcf4a7c7ace21a01d10003de9c7692f0887526c1) --- sys/dev/mps/mps_user.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c index 3d1b478d81b1..01edcbed2609 100644 --- a/sys/dev/mps/mps_user.c +++ b/sys/dev/mps/mps_user.c @@ -715,9 +715,9 @@ mps_user_command(struct mps_softc *sc, struct mps_usr_command *cmd) } mps_unlock(sc); - copyout(rpl, cmd->rpl, sz); - if (buf != NULL) - copyout(buf, cmd->buf, cmd->len); + err = copyout(rpl, cmd->rpl, sz); + if (buf != NULL && err == 0) + err = copyout(buf, cmd->buf, cmd->len); mps_dprint(sc, MPS_USER, "%s: reply size %d\n", __func__, sz); RetFreeUnlocked: @@ -847,7 +847,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) /* * Copy the reply data and sense data to user space. */ - if ((cm != NULL) && (cm->cm_reply != NULL)) { + if (err == 0 && cm != NULL && cm->cm_reply != NULL) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; @@ -857,8 +857,11 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) __func__, data->ReplySize, sz); } mps_unlock(sc); - copyout(cm->cm_reply, PTRIN(data->PtrReply), + err = copyout(cm->cm_reply, PTRIN(data->PtrReply), MIN(sz, data->ReplySize)); + if (err != 0) + mps_dprint(sc, MPS_FAULT, + "%s: copyout failed\n", __func__); mps_lock(sc); } mpssas_free_tm(sc, cm); @@ -1001,7 +1004,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) /* * Copy the reply data and sense data to user space. */ - if (cm->cm_reply != NULL) { + if (err == 0 && cm->cm_reply != NULL) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; @@ -1011,12 +1014,16 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) data->ReplySize, sz); } mps_unlock(sc); - copyout(cm->cm_reply, PTRIN(data->PtrReply), + err = copyout(cm->cm_reply, PTRIN(data->PtrReply), MIN(sz, data->ReplySize)); mps_lock(sc); + if (err != 0) + mps_dprint(sc, MPS_FAULT, "%s: failed to copy " + "IOCTL data to user space\n", __func__); - if ((function == MPI2_FUNCTION_SCSI_IO_REQUEST) || - (function == MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { + if (err == 0 && + (function == MPI2_FUNCTION_SCSI_IO_REQUEST || + function == MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { if (((MPI2_SCSI_IO_REPLY *)rpl)->SCSIState & MPI2_SCSI_STATE_AUTOSENSE_VALID) { sense_len = @@ -1024,9 +1031,13 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) SenseCount)), sizeof(struct scsi_sense_data)); mps_unlock(sc); - copyout(cm->cm_sense, (PTRIN(data->PtrReply + + err = copyout(cm->cm_sense, (PTRIN(data->PtrReply + sizeof(MPI2_SCSI_IO_REPLY))), sense_len); mps_lock(sc); + if (err != 0) + mps_dprint(sc, MPS_FAULT, + "%s: failed to copy IOCTL data to " + "user space\n", __func__); } } } From nobody Tue Jan 2 00:37:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7s6stHz55ym7; Tue, 2 Jan 2024 00:37: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 4T3v7s4hSJz3Hy1; Tue, 2 Jan 2024 00:37:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FncWmU1Gh1mj424q84b4JuoCaMJrnCAl1J/0OTxzOyc=; b=f+I/6hh79JYDgkZd6Xz3HqWyP391ojBmlqa+700vCPgggRTvd0VFYeHQYwK1ZBdBmqcIIw KhyguoQ+q9sKxz0vtNwrbatAXhEM9JVaxzU/ZJdiONqlYefsEZpMfKukbXirqwKhKXtM/p 0BSgBzlHynlbibBmY2kGboO0KKCNdYhK9OF+Iicw4K4vsL/jq5w5TOylU17AhMhG9eHLI2 d2n4jewE4wgULDrP3Fa97wGrImYZEwC3P5zjkyEPU6ExZOcQ6GTrE9X4N8xdG1Ge/2VNsG 1tAG5l6KwMjGcf78eYAbf3ey5DV/fwVnyEcbbQf+FKVhT/P7l6zFiCZ63dE7CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155849; a=rsa-sha256; cv=none; b=wj7o9GiiO/yhmAE5INl3W9KMhqYL7ntNwGA59HqpobZf/RHcu8bP1vX7J6lstSeyOaOwX8 RfK1eGm82Hd2AfVi2EyE7G/tpPLLMWIevOCDttL+wr6+qIoM4OUuPAw9C+xhjBPQR+SjXq wGsjw1IEKOr6QRHPU+TSkMwUe+vPQL5cbR6GjnWTR3/is039TR4HC2IW2HMd2LkDli0P8b 2E8B05ttWxnMdDJnXafClXceg3Izm6yAeH0J2IBMcwxji6Chozg3KlYPlAwnpz9pvx1B8B Z7J9AeEkdslbVki3GadbvczGguGrUVy1c2RwLZkNiWaE8tNBMLq9K161oyOW6g== 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=1704155849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FncWmU1Gh1mj424q84b4JuoCaMJrnCAl1J/0OTxzOyc=; b=QC3PlCXXtPBxrjIY/s5jdbulx44+Ft4ttUdYRq1a7XhDOw6lIvKEJH5vWLAZor4atFniDQ UP1FwPPVc8FBmCqnKRjj1N2/DRF9aCRzRz8p2dcHwXzieQE7iR/fHuUf0FMHL8j4iav+R4 ecwLxh4LETP8FCZWdWk2sJ3yvbtEqs2A2vHn2tZsqw+htVNoz5n7LpF+nvJlTHcCBnfAhs SeAMqmi+MOVgPI+SLHO+HWme5A827Jf937/vbtUNJfzFcDHTTolexd2iz/4IL2abVLMBE9 lpVW74NGnC9f46L0arxCZoD5Z0OTOYMZRqjewB/00gg7gY2yPa2Jp64qPldujg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7s3m0NzfYM; Tue, 2 Jan 2024 00:37: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 4020bTmh085692; Tue, 2 Jan 2024 00:37:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bTfn085689; Tue, 2 Jan 2024 00:37:29 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:29 GMT Message-Id: <202401020037.4020bTfn085689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d60d9b713a46 - stable/14 - mpr: Handle errors from copyout() in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d60d9b713a46cb03aef2c1c3304aa29b7b033d83 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d60d9b713a46cb03aef2c1c3304aa29b7b033d83 commit d60d9b713a46cb03aef2c1c3304aa29b7b033d83 Author: Mark Johnston AuthorDate: 2023-12-26 01:42:49 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:55 +0000 mpr: Handle errors from copyout() in ioctl handlers In preparation for adding a __result_use_check annotation to copyin() and related functions, start checking for errors from copyout() in the mpr(4) user command handler. This should make it easier to catch bugs. Reviewed by: imp, asomers MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D43177 (cherry picked from commit 68cc77a3b73ffda1e8ac891b9852faca833e11b7) --- sys/dev/mpr/mpr_user.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index f2847ae36d66..5245129ce8c1 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -714,9 +714,9 @@ mpr_user_command(struct mpr_softc *sc, struct mpr_usr_command *cmd) } mpr_unlock(sc); - copyout(rpl, cmd->rpl, sz); - if (buf != NULL) - copyout(buf, cmd->buf, cmd->len); + err = copyout(rpl, cmd->rpl, sz); + if (buf != NULL && err == 0) + err = copyout(buf, cmd->buf, cmd->len); mpr_dprint(sc, MPR_USER, "%s: reply size %d\n", __func__, sz); RetFreeUnlocked: @@ -848,7 +848,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) /* * Copy the reply data and sense data to user space. */ - if ((cm != NULL) && (cm->cm_reply != NULL)) { + if (err == 0 && cm != NULL && cm->cm_reply != NULL) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; @@ -858,7 +858,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) __func__, data->ReplySize, sz); } mpr_unlock(sc); - copyout(cm->cm_reply, PTRIN(data->PtrReply), + err = copyout(cm->cm_reply, PTRIN(data->PtrReply), MIN(sz, data->ReplySize)); mpr_lock(sc); } @@ -1073,7 +1073,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) /* * Copy the reply data and sense data to user space. */ - if (cm->cm_reply != NULL) { + if (err == 0 && cm->cm_reply != NULL) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; @@ -1083,12 +1083,16 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) data->ReplySize, sz); } mpr_unlock(sc); - copyout(cm->cm_reply, PTRIN(data->PtrReply), + err = copyout(cm->cm_reply, PTRIN(data->PtrReply), MIN(sz, data->ReplySize)); + if (err != 0) + mpr_dprint(sc, MPR_FAULT, "%s: failed to copy " + "IOCTL data to user space\n", __func__); mpr_lock(sc); - if ((function == MPI2_FUNCTION_SCSI_IO_REQUEST) || - (function == MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { + if (err == 0 && + (function == MPI2_FUNCTION_SCSI_IO_REQUEST || + function == MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { if (((MPI2_SCSI_IO_REPLY *)rpl)->SCSIState & MPI2_SCSI_STATE_AUTOSENSE_VALID) { sense_len = @@ -1096,8 +1100,13 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) SenseCount)), sizeof(struct scsi_sense_data)); mpr_unlock(sc); - copyout(cm->cm_sense, (PTRIN(data->PtrReply + - sizeof(MPI2_SCSI_IO_REPLY))), sense_len); + err = copyout(cm->cm_sense, + PTRIN(data->PtrReply + + sizeof(MPI2_SCSI_IO_REPLY)), sense_len); + if (err != 0) + mpr_dprint(sc, MPR_FAULT, + "%s: failed to copy IOCTL data to " + "user space\n", __func__); mpr_lock(sc); } } @@ -1116,7 +1125,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) * the same IOCTL structure and sense buffers can be used for * NVMe. */ - if (function == MPI2_FUNCTION_NVME_ENCAPSULATED) { + if (err == 0 && function == MPI2_FUNCTION_NVME_ENCAPSULATED) { if (cm->nvme_error_response == NULL) { mpr_dprint(sc, MPR_INFO, "NVMe Error Response " "buffer is NULL. Response data will not be " @@ -1130,9 +1139,13 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) sz = MIN(le32toh(nvme_error_reply->ErrorResponseCount), NVME_ERROR_RESPONSE_SIZE); mpr_unlock(sc); - copyout(cm->cm_sense, + err = copyout(cm->cm_sense, (PTRIN(data->PtrReply + sizeof(MPI2_SCSI_IO_REPLY))), sz); + if (err != 0) + mpr_dprint(sc, MPR_FAULT, + "%s: failed to copy IOCTL data to " + "user space\n", __func__); mpr_lock(sc); } } From nobody Tue Jan 2 00:37:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7w0Rs4z55ymC; Tue, 2 Jan 2024 00:37: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 4T3v7v6R0Lz3J3n; Tue, 2 Jan 2024 00:37:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uIVlttnGz6TXuHY8kbHUxLx1vrR0OZchzuPjX3Cqzzw=; b=gJeXUUNg2n4RMaoHM4qwWHn1L0RjLxreI7By5ZR37Yw/G6eh7Ks/xWkNjbDqFJg8HHlnnF PFmqwUekRm8NrGtLoR5AqJFc5x6w3MrarysqnT+RVHjzRnJPLrNj0cOynLVEyWwxfAd+Fx SbTSVI3Eo04Ghsssok35yA+RtNi7/J4X6QcGfevDnPp6f41xvMgUsFxBDtUiPYXOhdYlxh RQc2jCFdh+rOw1oGqPNj77R7HwWjO2SBJa5ckZhC2RbcC4BqPvjgSnQXNBA7siAcFIkXSk 2egb307PX5eBmkq3wZF3XpW0lfQrBTDLvrcVEroQwgt3oEUhDP0jBrM2yuBESg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155851; a=rsa-sha256; cv=none; b=iBgXw/OSx2PHuSTSr4cGT5DiWwhkk45NJ/6M/rlaQcGsCj8tJMyvK8JBi04wkEk6FmoLS/ ZdOWrB0ZDbR6Yrwfq2LG36vF20/zd0VPB2f/pvKDdkyxGf+7irbzRS/ACIbdP4HCgLWJAo geOKRCTZzPaW9h96xAL5RngJ4WxoBTADcXYkV7+Aubf9B+1t10uK0mRzFCFzMzozxJHUHn F52zSoiXwbdugJepu0RwiATp9G1w5DH7ExaYCIXSokAhQ/KNrjbptRhnU5WxtvGLGD0K4D X+PDi9Fms+hx1ot05cgqw06qZqmczeIoQIpD2mmn9HwZhlbKlJmQ86uONHiAYw== 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=1704155851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uIVlttnGz6TXuHY8kbHUxLx1vrR0OZchzuPjX3Cqzzw=; b=JY41k+JuCv3xOHFz8tnk2Q/XsVdeUI185FYALEPzZLo52M5NTlVp9E5NfYzYgrfgow8eWY 9Js3AuwpczheT0or20XamQqj4yoJSQ3IfmOhlMxQnA9Az4LQL/EGETsnGTPrc9BvH+gc18 5OAhv1WWiYmnMAYlotunWmm840iKSoputV7B5+28AtTM/QZbS3V8pS9g9zNnszkJS9g98K QF4AuNM990vHirhTD/6UGgnwQdjxwn0269zEAfCnj6V2fnmTsko07t011mORnVjFAnIC3B k/lOnQQ8FNZwkhk0SKP13R8IZjiZLrHAM/HE6+Y42ZaVIUm9LR3LNWTbEYOw4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7v5XpNzfbD; Tue, 2 Jan 2024 00:37: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 4020bVN7085791; Tue, 2 Jan 2024 00:37:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bVcG085788; Tue, 2 Jan 2024 00:37:31 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:31 GMT Message-Id: <202401020037.4020bVcG085788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bd287fa8bcac - stable/14 - geom: Report copyout() errors in g_ctl_ioctl_ctl() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bd287fa8bcac0d985d503c01d581c85ffb6d25ee Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bd287fa8bcac0d985d503c01d581c85ffb6d25ee commit bd287fa8bcac0d985d503c01d581c85ffb6d25ee Author: Mark Johnston AuthorDate: 2023-12-26 01:43:06 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:57 +0000 geom: Report copyout() errors in g_ctl_ioctl_ctl() Despite the name, req->serror is used in some cases to copy non-error messages to userspace. So, report errors when copying out so long as they don't clobber an earlier error. Reviewed by: mav, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43146 (cherry picked from commit bbf221e3e822d15dafb37bd8e200a9864f2636b4) --- sys/geom/geom_ctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c index b7c80c77d4ba..f075488a832c 100644 --- a/sys/geom/geom_ctl.c +++ b/sys/geom/geom_ctl.c @@ -617,8 +617,10 @@ g_ctl_ioctl_ctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct th } } if (sbuf_done(req->serror)) { - copyout(sbuf_data(req->serror), req->error, + nerror = copyout(sbuf_data(req->serror), req->error, imin(req->lerror, sbuf_len(req->serror) + 1)); + if (nerror != 0 && req->nerror == 0) + req->nerror = nerror; } nerror = req->nerror; From nobody Tue Jan 2 00:37:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7x11m7z55ydf; Tue, 2 Jan 2024 00:37: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 4T3v7x0Q8Fz3J89; Tue, 2 Jan 2024 00:37:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=61Fgsv/QKGEU5RJDO69shuJVn6hKe0lg/2c61y3EVOg=; b=lJl7rLuQ3fKO7Q8ag7fC7mULBSqoMB7e6EGUROlMc4kwEhfr6z/k019wMsI/9kzbEwq4Jd zL74JJOhImye+po0i1uS+2ys0WDZNL5zIPsFeX6NEf4LVAjrRcDf9jwBSevEbJn/cy+W49 kKb+qwMx05oIWcmiezANE1XaGQDKxvoop3lcVHZ0NGTlKcLO9zuU1KjN4PjOqbOpcMRA2O OeGFng7D/Faaf4KiYVJIWILtx3QGDw6QSe/hUes7WO9pPJPFozeTa8+yeGnxvdMsmq/E+K Dqqe2svrpPTzgtEiOPT/KtoIu85Y1av0ewaQBoFOvee7tCPEDE0I1oCn+D+vlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155853; a=rsa-sha256; cv=none; b=GHzQrdBxNHYqOgneJrvdDojgZ/NeDKRF+IJlYdTj8wDFueYuLbQiVRtmo9CiFKoQpfrkhU MjToVqUPdRINO2cWIgbOxIk6zeQ2/c3D03n4TTN8rcaeG0cnDqsC+dZQXEtA5BkTPKf5Iw HDrOO5Gu6UB2+UpwATxep5vsy1SN7uhdRGxEj0WHb33/9eQ0zwELNlAllLSSfKyx4ygUUO QYhKe7TDvymSC2as5iFB5KpqhY2V/hmkd+/WYOQC3a5HVPRplLgIgdejeqjsFJ6e5vYWDp VIgFGGOuxoMWu0+O7rjvRf5bIaCosmRDAyz+YTgquqEywatJNIG+by45zV7fBg== 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=1704155853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=61Fgsv/QKGEU5RJDO69shuJVn6hKe0lg/2c61y3EVOg=; b=mTE+/2DhQmfsZxzAICbHTJL9n8jy7xP573FKvy3pok5LBSm9D0p7kqMoCoZMB6LaLE7oOC aNogTCWLWHZ0AK/YRfZXTuUN/lf1pOuTrfgPhzgwfaoPcyEozkli4gbv1vtWP6MhZW1hmm Y1nGzPaJkZ8aDPbyEau2DeSUnlU8odgpRBjyX90/OOF1MBaI77s5AOYlTUcNFzhn6a3rtX OkFhIu8lxytwjdNinQiYklhQn9qATd/vLcmXf0i5efyp2s9U1+O/pAiN/cnKPkQeynKDo1 wvWK/oYP7M7Tol2NzV1gjQqJxCoyOvLuDP5oFPlBJHn2Dhy88FmDj+VjdmFmxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7w6bgtzfqY; Tue, 2 Jan 2024 00:37: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 4020bWN3085845; Tue, 2 Jan 2024 00:37:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bWWi085842; Tue, 2 Jan 2024 00:37:32 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:32 GMT Message-Id: <202401020037.4020bWWi085842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7bc713a5a5cf - stable/14 - nmount: Ignore errors when copying out an error string List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7bc713a5a5cf27140ad86a2ac805e9c0ea9bd083 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7bc713a5a5cf27140ad86a2ac805e9c0ea9bd083 commit 7bc713a5a5cf27140ad86a2ac805e9c0ea9bd083 Author: Mark Johnston AuthorDate: 2023-12-26 01:43:21 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:58 +0000 nmount: Ignore errors when copying out an error string In general we copy error strings as part of reporting an error from lower layers, so if the copyout() fails there's nothing to do since we'd prefer to preserve the original error. This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: olce, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43147 (cherry picked from commit 099d25c354d93d9cd9c9cd261428f5ab0547a194) --- sys/kern/vfs_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 79a23b058add..c42fcfa7537b 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1025,7 +1025,7 @@ bail: fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); } else { - copyout(errmsg, + (void)copyout(errmsg, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); } From nobody Tue Jan 2 00:37:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7y2RS0z55ydg; Tue, 2 Jan 2024 00:37: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 4T3v7y1frbz3J4H; Tue, 2 Jan 2024 00:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0DndajV0UraSmFve/lQo67MtgLDC+6gJQYAjePsk49c=; b=HPDdM+u1Audw2lpgh+g4AjoRbqoQxCc5HkVYtNKi9cA6hDEKIkUrSGwOROwL4neVy6bMnh LoPKTssi7G1Zy76vHYk47LAQQAxFK5ckabyOopb9I+aaTdqcRu7tRQJzSsDsxr2kbFLQyN Fu/DF5DYvZGwJvnNDI0u+UVjR1lap5rwzC1RmELQtXboe6g2J4TXHhVhJnJtH9Wh6iVqRh IYtIzST6uoJLhIjqeiddQOIIJs+nf8g5b0BtnT32N0x8pha0RLWpLyzaB30u5bthcdaO2T WkBMv4ZUyJgJpQgLQ97xNp8D31JCSJbHPmRBli6LdGfLfKw07Wm5Lqa3fMJ9Fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155854; a=rsa-sha256; cv=none; b=li/9RSI4fms6dKzZhZcLrVwrtHFYT3PusDLLXbaf49zwZ6cMYaiApCCqowus6wReqKSXMn N8RFz3A1flmoLBDuDqvVY9ATNIYiNBzverH+hUuhdfnRxO0PdtPGGEW4I7aX+/WZEJMhvD 2GJ4DVKdTCgMbNlIzXLyVYVZLy7emtWl+KmOqlDGp6Pb7wyd9O7yVUuroa0+XWiRgKa7gs Bj64SiM8dAI3SvDT9wl+58pTMBLzqNCcm+F4KCGWVT4TdwtDIrHmxo0ZM04ggsXc6HCXBl FFHxZec8U6nK3XW2ljHO/B6vRkwg9wSHvtl+AFnVft7j47kN8Qs9NO0OPiTlTw== 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=1704155854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0DndajV0UraSmFve/lQo67MtgLDC+6gJQYAjePsk49c=; b=qsj6ypUtcAJJGyS6KKvaUOlz+9FzETWeGOk0QPbYU3VhlUVFCMYdS7KB14LmKQLxGB4cuA nVHgKMNGhbgx6m6zoDZKDGKCSfQ71KwKWNMIVmFh3KPrtCdhPSLMkokcmOuI9fWAErYA1Q h6XW6D5A97G8ip36DVyUj8ZP1WYkX+A1U2FkTkGugpHgZlug7phi/UWD35zwxOb1VfrePG N0iC6UcvaAHS+Tau5tgxPzOt9ndGVRhH5MuuZwW8rl9D4nu3cjlQzSHHue0IMTlI/oSMUk l+TDZ5ldVhlh/sHbNo2yqVcD5iMw3PpydRJAhqRJLFoKnOzgyRzDksz32Y5lzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7y0mchzfbF; Tue, 2 Jan 2024 00:37: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 4020bYBi085893; Tue, 2 Jan 2024 00:37:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bY4O085890; Tue, 2 Jan 2024 00:37:34 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:34 GMT Message-Id: <202401020037.4020bY4O085890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9b28f3f03236 - stable/14 - iscsi: Check for copyout errors in iscsi_ioctl_daemon_receive() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b28f3f0323645960404c5e61e4ded5468910d72 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9b28f3f0323645960404c5e61e4ded5468910d72 commit 9b28f3f0323645960404c5e61e4ded5468910d72 Author: Mark Johnston AuthorDate: 2023-12-26 01:43:31 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:29:59 +0000 iscsi: Check for copyout errors in iscsi_ioctl_daemon_receive() Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43148 (cherry picked from commit 74e713804fa4767991c5f20e6b85da4235107122) --- sys/dev/iscsi/iscsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 38973898a9d1..0a39e94a25cb 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1897,17 +1897,17 @@ iscsi_ioctl_daemon_receive(struct iscsi_softc *sc, return (EMSGSIZE); } - copyout(ip->ip_bhs, idr->idr_bhs, sizeof(*ip->ip_bhs)); - if (ip->ip_data_len > 0) { + error = copyout(ip->ip_bhs, idr->idr_bhs, sizeof(*ip->ip_bhs)); + if (error == 0 && ip->ip_data_len > 0) { data = malloc(ip->ip_data_len, M_ISCSI, M_WAITOK); icl_pdu_get_data(ip, 0, data, ip->ip_data_len); - copyout(data, idr->idr_data_segment, ip->ip_data_len); + error = copyout(data, idr->idr_data_segment, ip->ip_data_len); free(data, M_ISCSI); } icl_pdu_free(ip); - return (0); + return (error); } #endif /* ICL_KERNEL_PROXY */ From nobody Tue Jan 2 00:37:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v7z6RCGz55yhF; Tue, 2 Jan 2024 00:37: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 4T3v7z2qQKz3J6w; Tue, 2 Jan 2024 00:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tk3QMb+/Gn+0yLvQWDGI7e01wKQjQ9E41FgJBXa8LCY=; b=Z+bANG4ebUCbS8xQB3TwgZGkfFrcjjrZTZ9GaWjJ9fj0EXRZx2/eokCOHZJ/kcMvijIhQV 5odslxZuBvfDlVkRl45hn80gxYeQM8RKdyX4nACo4cKX6odAQw+Ye01zD76yD4BkaHlF3+ fIex9KuFSoKuogmQ9ibvelJAl8nT3Al5PLK9KGD5rq2qCCvoYm7ef7CyVYT5FIwiIWdbce KF1QzoZB9QZLmQhVSFmIRQ6jU45aStvftWm5Hbxdie8XgU3ieykba+keW02TDOHzZy5Sv/ X3wy42r7BTnULPzDkshWexNiFkJg4CYgW3eoP2OGtKjc5J3MKp5rh7MdhGOqAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155855; a=rsa-sha256; cv=none; b=B4lam9U3VOYVocumXdMY2GSNP/xG2O/KPeM6l5QFiMSA2ul0BbQ86LjdXtj/rgYiFj35ve Z9PwicGrfJrkI9ooPW6vSHcigiZ48MCtDwOUX518koKnUg6jVomYDzvpFrddmPTB9Wh7fv oYfWuTdTCs/QsY1LB+9kHJUTtsuN0mrQF2/YxV+V5wZ5vk0F/4gJti3BkyH/9BIE53Mh+Q QLwpR7HzWfmv0jbm4qZP4OZCe8+HMO4D7m4x4dRcUiDDyfuGEy5q8KRMIe1eJ14hk93uTQ 9H+jb8WrKFNx0rraNYDKe2U3TBOD+O370vp4iQvGMbgJubv40e6zC1nFM3q50g== 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=1704155855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tk3QMb+/Gn+0yLvQWDGI7e01wKQjQ9E41FgJBXa8LCY=; b=T46QROK66WLaSnm6KYhzaR589PKKUb8idnxVr0CzoYxIMz/0iOWMzsulUUVHQMj+XVnuxY esFzQhkHzsSekKXbi/b1Um3C0c0lAJuj3RRe0vldgzeCKu26QkxwS7f3qczFzBVkR0fxJq /vvChz242vr8X7hB6dIYyRTpv0qpdG64Fh2V99RySzDwIlw9l50LJf3hNbbgOWxnaK6F5j ON1C4i3JwcgWciTzpPUm7JfRo2jlW9medUtxlxvUSjNWkatBqpfHFXcF4Pqg0UcOO1wG/2 +XPdS5TYFQM231UeowOyRkqwkTEzbMbDY1e54IN8yPFCS8O4R8ftJ8HcHdzXrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v7z1nfvzfbG; Tue, 2 Jan 2024 00:37: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 4020bZ56085941; Tue, 2 Jan 2024 00:37:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020bZaf085938; Tue, 2 Jan 2024 00:37:35 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:35 GMT Message-Id: <202401020037.4020bZaf085938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fecd8e111a0b - stable/14 - compat_freebsd4: Fix handling of errors from subyte() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fecd8e111a0bbd4eb4224b2b4821d3097ea9ea00 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fecd8e111a0bbd4eb4224b2b4821d3097ea9ea00 commit fecd8e111a0bbd4eb4224b2b4821d3097ea9ea00 Author: Mark Johnston AuthorDate: 2023-12-26 01:43:38 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:30:00 +0000 compat_freebsd4: Fix handling of errors from subyte() Upon failure, subyte() returns -1, not an errno value. MFC after: 1 week (cherry picked from commit c38df501ce2ed7da128448f815ec627c39fd3bad) --- sys/kern/kern_xxx.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index 398ac18c9422..66d99edb7da1 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -367,13 +367,11 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) for(s = version; *s && *s != '#'; s++); for(us = uap->name->version; *s && *s != ':'; s++) { - error = subyte( us++, *s); - if (error) - return (error); + if (subyte(us++, *s) != 0) + return (EFAULT); } - error = subyte( us++, 0); - if (error) - return (error); + if (subyte(us++, 0) != 0) + return (EFAULT); name[0] = CTL_HW; name[1] = HW_MACHINE; From nobody Tue Jan 2 00:37:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3v805hd5z55ypk; Tue, 2 Jan 2024 00:37: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 4T3v803XtNz3JKl; Tue, 2 Jan 2024 00:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704155856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAGVT9FAe93i0PGDhLhEdne0iE/RAAW6Pnpi2B8alQE=; b=AcOMd0EmgJg80KiNUJhQDOBH8ykNoRHhU4V/GLigNBXZbyeq+9YMT7svXJFmlL3QgTFAA2 M/nHobNsdxOES0on3yL8G4ScXJaGQjdIFBaBGPlY0mQMdz2FmJdP2K7O0hqoOIP6Z434wr B6Y7fEVfrwAOKYcZMQwYY//uR/mCNZSg4FmFoI+h5Cl+mX5QOfOdA+gu6f86Cn1pi5+SWR BXV4xXJHupgnyNSYzWWv2P2P0gGyPDjk7mD0JsoLS1EkCol9OymYPnUvNNuLDX0DVgj2cx 2JgWQyaIlkfRdCxHegs40AuKt+ctm+xY7AV0We/BAsXokY4CdxbqWy7aRPTncw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704155856; a=rsa-sha256; cv=none; b=uvafvzU14s4vRIao+vrhk3tyOi7paGvFeNVM48OAOUoXtTcNoariQQkvt5BSgX6l/Nj2LO n1C8sjucOmfRsi1rSFAFlN0XJ2EG1+sgkiQPgj5CyITZW0d/mh+ztkWZNY9UoIsQF9U+qk YhT6wTs82u8U730cD53j43hdbsKIdXj4Om7EMUPJGCAK7TLQW03DDzeuX7CdCtJCN5K8ut BWZVS2uOG8Qg3cY6+Act6ZqmBe+4VWXp1dGwO+xgzLnSP+ir0yvPKPKktwTAe4XYDAiw+d 7u5K7CLjpYOD226dwf+0zdRrIzzVr/fu8h1gSDxTBAwP7whqU3p7DbH4/Oyn3w== 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=1704155856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAGVT9FAe93i0PGDhLhEdne0iE/RAAW6Pnpi2B8alQE=; b=RIxyaD/0G8z2zOZxfEi6BSWLdTJaMIgplRQw/7Q2ARpAQW65QZsDhFMp5TzAK3DHnBwNTV Ra0D9Xx1rCdkduSp7SyCayxRpJPntvCnAOxeFkO3AIwAFR42NyejgqYossYawnEXAStx2s XBirbVmFeJrbeQypQvQfw79wLr+OEGDJ/5pTUoY7HCbS1xRneeDiEGmb63rDdywDlQhcVh +VkUM69fn3A4gvZ3YIT1yiB2xpacfheDAc9noMvMK/hlnJ1jkyf2kpS/Nbh9yBKWOB5HN3 0TEvVvLjmrsYYV7UI/CowvNXwPtGxOJs1nu7GPAzTNcCkhkp6nMhSPrfKgTLWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3v802fdJzflx; Tue, 2 Jan 2024 00:37: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 4020baId085994; Tue, 2 Jan 2024 00:37:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020baVt085991; Tue, 2 Jan 2024 00:37:36 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:37:36 GMT Message-Id: <202401020037.4020baVt085991@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 266eefe7f465 - stable/14 - vmm: Fix handling of errors from subyte() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 266eefe7f465cf99d592a47a1905f7ecd9f7e9bd Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=266eefe7f465cf99d592a47a1905f7ecd9f7e9bd commit 266eefe7f465cf99d592a47a1905f7ecd9f7e9bd Author: Mark Johnston AuthorDate: 2023-12-26 01:43:51 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 00:30:00 +0000 vmm: Fix handling of errors from subyte() subyte() returns -1 upon an error, not an errno value. MFC after: 1 week Fixes: e17eca327633 ("vmm: Avoid embedding cpuset_t ioctl ABIs") (cherry picked from commit 6adf554abd1c848d2c9ab7ea8a7fb7dd20a0c186) --- sys/amd64/vmm/vmm_dev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c index cae15d7059cb..5214cd3f1447 100644 --- a/sys/amd64/vmm/vmm_dev.c +++ b/sys/amd64/vmm/vmm_dev.c @@ -629,10 +629,12 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, p = (uint8_t *)vmrun->cpuset + sizeof(cpuset_t); - while (error == 0 && - p < (uint8_t *)vmrun->cpuset + + while (p < (uint8_t *)vmrun->cpuset + vmrun->cpusetsize) { - error = subyte(p++, 0); + if (subyte(p++, 0) != 0) { + error = EFAULT; + break; + } } } } From nobody Tue Jan 2 00:41:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vDt5Sz1z55ytq; Tue, 2 Jan 2024 00:41: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 4T3vDt51ZSz3PVp; Tue, 2 Jan 2024 00:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DveEh9BenU5204/mfEMAWoNBRPuUr1Erf+eizCVp/8o=; b=Ovg6pXi1zJpCp4mnE71onz4QOBUWHqVJcThOX1vwxS7abj5nQXp2QsWox6NxBD8Afm/ucj O5q6Q0zKI0ucB/BqJp/AFd6Ufjy0IMQaAl2N4VUYoIrZvx0iuDr4LoI7kP4ADFaN9wRjpQ mDnnwWATlI5OGe5xF7SgVwCxZ6mXbHKtpG9BScIOvpBbStD3PDAr/m3exN6pXa3ifYVFxu PLwGVCfTJZbpodTSZX6f7duE1ewEisYSwGZvDdXVMUqvRcWT7ryQu1GUjDyLJs8OiUL3tH kgKZ6HU7J1lV69FooE5PN3I86Y92Dx6y7LmLfO3cXnZ1eTolDpYYXx0AeQM3+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156110; a=rsa-sha256; cv=none; b=onXpqjT5iN9ZO+nysZ9aZn5ierbKyOyCjTvkmVccWMwjRKbbGhnktM9hSBPJ6aDjWDWpMH pEcaDsoUsXPYDijLVAg4Aw5V3KHPIa8u/L2vLNIwMTQVMAeungJxEaHbcJHXzRxdGESD5A HoKpMW1by8Dhj7lAVdVm33mKmm6FupznSjyGI+IT3GsDSpiDJtopTu3G/7dyGWmcWlvF8A DCNzvrQcMtO1BGQIO3wEYJ6KbElliG+RSNrXjCjTqTDDh48ZA3EYgkT4gv1SI0tOWrdD3Q b/RqhQyT4CyKrj2B1FS5WMfHVJ6aDpkbZjiUc4IFrpZLYiTZ8ecM6Iy9WcLRqQ== 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=1704156110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DveEh9BenU5204/mfEMAWoNBRPuUr1Erf+eizCVp/8o=; b=d4eoUucRHVdyBwuSzop9uyv/2ET5sUAdowTBaWArnSbw0o41TIF6Ca5Q6+rfWolauPPb4c apa/VeCSC4Lb55zBco83snIDjSEUkPGIDjF0FCZeXoFGVS3wDhDol4MPMg4tnGP8LHWw2H W9YKfJcsNF7fqosDs0qrwLL1gBQyuFItRh+LolwHzosDkJVgzS5yH1sS6l5pMfD5AQXalR Fo5VRjbjHjW/1SBPKAjc8T1TKCTe4U2D+6m1WSM9+KRvN8K9OKeWYXJ8oUZHT4LFxpzxtK GWg7PcUBRzKbzXGdgd65TDn2orcbtNDxK4ElAwsopNbA22fLMyl/jJ+6TaV5eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vDt46RKzft5; Tue, 2 Jan 2024 00:41: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 4020foWc096586; Tue, 2 Jan 2024 00:41:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020foOh096583; Tue, 2 Jan 2024 00:41:50 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:50 GMT Message-Id: <202401020041.4020foOh096583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d60d1d584056 - stable/14 - iommu: remove leftover sys/cdefs.h includes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d60d1d5840566ba5a65a0f0821840215bfc0b3a5 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d60d1d5840566ba5a65a0f0821840215bfc0b3a5 commit d60d1d5840566ba5a65a0f0821840215bfc0b3a5 Author: Konstantin Belousov AuthorDate: 2023-12-24 14:24:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:38 +0000 iommu: remove leftover sys/cdefs.h includes (cherry picked from commit 6afa2333d2e42e1df67a0fab20f0ede76dff516d) --- sys/dev/iommu/iommu_gas.c | 1 - sys/x86/iommu/intel_drv.c | 1 - sys/x86/iommu/intel_fault.c | 1 - sys/x86/iommu/intel_qi.c | 1 - 4 files changed, 4 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 6088bee9a855..4e0bfb116116 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include #define RB_AUGMENT_CHECK(entry) iommu_gas_augment_entry(entry) #include diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index ebdf24976504..e5c7416b2127 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include #include "opt_acpi.h" #if defined(__amd64__) #define DEV_APIC diff --git a/sys/x86/iommu/intel_fault.c b/sys/x86/iommu/intel_fault.c index d2760d6db93e..e275304c8d51 100644 --- a/sys/x86/iommu/intel_fault.c +++ b/sys/x86/iommu/intel_fault.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include #include "opt_acpi.h" #include diff --git a/sys/x86/iommu/intel_qi.c b/sys/x86/iommu/intel_qi.c index 49b0039f3ac3..37e2bf211e32 100644 --- a/sys/x86/iommu/intel_qi.c +++ b/sys/x86/iommu/intel_qi.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include #include "opt_acpi.h" #include From nobody Tue Jan 2 00:41:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vDw01Ncz55ykj; Tue, 2 Jan 2024 00:41:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vDv5ll0z3PVx; Tue, 2 Jan 2024 00:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mNt1o4jMKOC/eSklvmQCR564ODifTrWpw4ryggxeqOI=; b=ayjqEVVd0z92bqWyqR5s+ioLIjlW8ZwP5T1Iutqdh8Z5+/oYSOHIKQXcW7AFKJ5kXZe8mz jIS9pYeCiVOjcrmQ7iGEDXYV19yO259gUM/CVHDZIHwtrpdzgpjLLV8DKp9WmGIxgnhKQg oGL7CEUz3VVQIN10HbpqRVRGszDSIGmgPRE/xQGZYkzMxT0Qbgsb6pvYNJ1n3mcG6o2rE7 twc9GtR7m97agiaHvlF/WFfkkCnyc1UV9o560MqlinQafYGIuaWLzK0OObeMHezN/Hmqhw T/Njf3reoL7smxh4R/XuIVQdsxi6AS8QaImUlYsI5PRX/zdhtv8Gh/4rZj6aPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156111; a=rsa-sha256; cv=none; b=JKY9CU5rRh1vfnpXDA0pskWelPVCnEydHtl/wqE3BYmUmT3xEU1w5D+jLkdRGnaTArBIib 8syofv67/ttOUc4AS/oKqrStCE3LAs6kvPXIEt80G3F+oJpCPL/d7wqjPIK57PncCwGVeq pyWqV5iemVnJa4E21xZV6WQkVGHSeTKlc9b/Fr4p2l/h9TYRrP5HhY9Ne1XbKCjC+/cXDP 7Yz5OfPxPijWXPoyufQDACgu+k0CQpuM5kkIetcXPSrJhChmjuxSt07vFUSmQd6bx+HQaV ut4j3/MYvJKoCDyMDiQ+JowGW3b2IaR8QykhUQI+it8+7kFTTbeGXNG8IsGOJw== 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=1704156111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mNt1o4jMKOC/eSklvmQCR564ODifTrWpw4ryggxeqOI=; b=HNSBTDwKHIymZuNWCCK/A2WsEM1XaZiW9nuy7Fm0f4YZ5D6nWI3Y2Ra6MvpAc7jHLxxqEn tl0UEiSdRgZlY1kzvRANb8QqbMGYi0dsaokUE82S7+DBx2C6R4GySlv6ANST4d9qA0OGyX oyw6EUonPjZwiZ7D0gKbA4UbPq3MDQVcr86Ke4gb07qo6KuryW4ubMvQKgR9y2sBFPrmRs jcwG/XqoQAP/JP9TL1sBSjKsgSg5OyM6TLS+fl+g6SAVB1Y7tyLjNYx+e1cc600BKM1pzQ y+SaB3DUicqGZX3stShM2u1WyYJY3G3KkAM8+tSy8mEXpdm5BX5Q5lg6JCWF4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vDv4qvNzfw5; Tue, 2 Jan 2024 00:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020fpPT096633; Tue, 2 Jan 2024 00:41:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020fpKL096630; Tue, 2 Jan 2024 00:41:51 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:51 GMT Message-Id: <202401020041.4020fpKL096630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 056e270e26ea - stable/14 - dmar(9): style, fix indent List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 056e270e26ea5947879e83e684afbad10ace98b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=056e270e26ea5947879e83e684afbad10ace98b2 commit 056e270e26ea5947879e83e684afbad10ace98b2 Author: Konstantin Belousov AuthorDate: 2023-12-15 11:24:44 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:38 +0000 dmar(9): style, fix indent (cherry picked from commit 7153d5e4bc67732f8258d50ffffa42a09a19b427) --- sys/x86/iommu/intel_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index e5c7416b2127..274ba566ad23 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -1018,10 +1018,10 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) if (bootverbose) { printf("dmar%d no dev found for RMRR " "[%#jx, %#jx] rid %#x scope path ", - iria->dmar->iommu.unit, - (uintmax_t)resmem->BaseAddress, - (uintmax_t)resmem->EndAddress, - rid); + iria->dmar->iommu.unit, + (uintmax_t)resmem->BaseAddress, + (uintmax_t)resmem->EndAddress, + rid); dmar_print_path(devscope->Bus, dev_path_len, (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); printf("\n"); From nobody Tue Jan 2 00:41:52 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vDx1psVz55yn9; Tue, 2 Jan 2024 00:41: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 4T3vDw6j47z3PW7; Tue, 2 Jan 2024 00:41:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzrSuvLFM0pK8JM0N2M//AGCxLTDmYtWMiJXKJNAwW4=; b=e6oxi3tF/CfCvygxaFOvIiDwIv4GqG1yImVNCdHd1gSOVMEWXijQvo5F4FpxDulwIi0Vjx s58PzDcXWI7bQys9u5UxCfsgBOZKWWWe2ZnILj0unVZXJg0rCjVgWlkF3fBXhsnlnZJqjo OYPs5Gmn1hG8wFHaA69VuNczhGjzJzCGBIZBjuFwllu8cgSvdq+XUw57cHZr/5RlIJgEhX k5KSm1gJ/8TyyrvGqPQ3NWBTq/znG6PLj3d550pjHHpqEF+SzzAb8725Col7OpCpm9rxjm 4a6TE+Y7R9uSHna/JOy1/vPBqZWNPyO/FK8JaqPKwRV+m6WhAPoeXanyzGf2Yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156112; a=rsa-sha256; cv=none; b=jAZ+avRnaInuSTXNlMhVyjCPi1lD3Y3MBIT7SJrcW2l26blVMFklUOzk4YMNLAdsxHYjf+ BUj1xqHnQg6lPviaVoWlz/hqHi4q5FMX2v6pNxqYM5nPRTI43+TIuR3eb52BZv+D/eK4Wy X51Fzc9x+5dLKphHQTc9y4yEc4NhITygwdSLUduWBzSqFqEexIZgHSti8HBPcgLHZ+QsNq Vikut6ISxoctQjOot13aniav/CLhKftzE/fdX6eKqVKzJ76M4k/1TXeHr6kYo35OFfN0dv uo8JYC7z6lONnMSqT8wAa8ks+kcFkev0uZFTafTsaKIzEBcVN1KJ5FIEkL1M9A== 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=1704156112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzrSuvLFM0pK8JM0N2M//AGCxLTDmYtWMiJXKJNAwW4=; b=RxQiaCoseor3VemgBD2JTJScFuHtnbUGoDNGjGGzw5p6Gw2sX8SlQJe7JJe0pYhALdolP4 Z7pyvUaFNBLrwSk/PoZmfyJPBtl5WlWcdjdUeYBtI1nmhN60qh39AuKXRVF8DR+33cXec+ D8gdwB/kPn/34Ienu26h5nzFengHGL8xB5OSFDUUrbaEmANIzpx9vkOye3f7IEKiO13Q4w wgOz9B6X9bl5IfgXWPr83TDN8eRH6ryDbSVQ/iYQLHcbJvH/t24zomnML6a0Id5qbkfdzQ RFfeQeCSG31/3zK1sro3C4+l9qyBqAu3rG5oQGnNBuWmP99kG1Pv9MwRhYO1xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vDw5prdzfnF; Tue, 2 Jan 2024 00:41:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020fq00096672; Tue, 2 Jan 2024 00:41:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020fqTr096669; Tue, 2 Jan 2024 00:41:52 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:52 GMT Message-Id: <202401020041.4020fqTr096669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: eb0d8cb12166 - stable/14 - iommu_gas_match_one(): check for underflow List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eb0d8cb121667bf2c2632a6cc48b44c036cd173a Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=eb0d8cb121667bf2c2632a6cc48b44c036cd173a commit eb0d8cb121667bf2c2632a6cc48b44c036cd173a Author: Konstantin Belousov AuthorDate: 2023-12-26 00:57:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:38 +0000 iommu_gas_match_one(): check for underflow (cherry picked from commit a869643e184a73382ef7939b465fd42785e096d1) --- sys/dev/iommu/iommu_gas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 4e0bfb116116..cc541e748f48 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -329,6 +329,8 @@ iommu_gas_match_one(struct iommu_gas_match_args *a, iommu_gaddr_t beg, start = roundup2(beg, a->common->alignment); if (start < beg) return (false); + if (end < IOMMU_PAGE_SIZE + 1) + return (false); end = MIN(end - IOMMU_PAGE_SIZE - 1, ubound); offset = a->offset; size = a->size; From nobody Tue Jan 2 00:41:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vDy3nNyz5609B; Tue, 2 Jan 2024 00:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vDy15Mgz3Pss; Tue, 2 Jan 2024 00:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sxD4MXnYwJHFW3scylSCG+Z8UvX8VNkY8z4h9LljYfE=; b=a5QC/J6BaXqMXsDDefRrNlz4vnZT9Lz40zyTH17XyIcNhIrLqwF6qBuwukxigjEicBYAsf aS4vL3MD47PEzKVJHEWDjM2/5S6GaH6t6dihiahhB9Y8CCj/6gyJTOZomA/PS8IcqEZIvW JotIr56d9NIFI9HKpQmnPnnZt2PNab+PKq6TSmLvm2hLNtGx+XWlc7Icu8W9whKQuuwncr BQkJncMuygafUIgdS5qSwPt9oV25Aajz3gK9Crn13n5wV4bphQdxOSDD10ey3xhDyKsXkm kik025dG0sVdl6m15xnHAjbpDqy0rW2lVsa1mqb0wQB5ltV1/U46ibxoB8WVzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156114; a=rsa-sha256; cv=none; b=wfqsu+ki52ZVChEoVRzjH4Hr4Uo2Qp3p0XDvWWTv6+VbxYNNE99Zbm5XzRXEVBIgEJscMP Ohgg+5z5JlZHD6zNCFf5nrJA9zyY6yHiOsj4r+73AKiqqhV6FuZTrA+V9qbkrZsJ6WoYg8 a/jukFY9VmGzGJzRrH0Ts7i0nmBnVV1N7qUKFqhana8mACOgwyerc2FUars7gbUTjpWzSi x9lUf4WixGbkvTlFgKd1Uy68FzUYEkazFa62GC+tGsMgSsudTYFwBg6xem9B/9IoQOvVKk MPPLd3RPynbgSKrrNyxkB4skmtLn0xsoMYtVbo46n3GoPq4hte+OIdE807Z9hQ== 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=1704156114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sxD4MXnYwJHFW3scylSCG+Z8UvX8VNkY8z4h9LljYfE=; b=bJhxnx6qz4yLVMl4+W0XvrxY5occooGsq1Jb8Zm6ahPRcuAUbV0l8VHn+ZN8v6IJ+Khlu6 +LNAgnl8+3NXyLEMVbQyH/E0HPW+DzkA5dydrVy5i3XR/ZceFL/qkRkKhVNo3B02tpVXCO ri9pfj0Zh80x3yWLpfbD+SY5byEOIjToiDislpSoJoNwdOyqEgSIKpyYrS7nnH32Gzy0d8 AjARDGgCTIoTx6nFUMxQ9SPJXjQ1AvrzrP/0lsEzspUUe2Y9ObxT+oSem8EFL15VSJB2K0 /RhSmzLDM4mg4lyhNSVDpnWMIbmoj7OTGxiBoAfEl+omUHK0ZLD5jK0v2vgElQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vDy00sszfQj; Tue, 2 Jan 2024 00:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020frrn096717; Tue, 2 Jan 2024 00:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020frDv096714; Tue, 2 Jan 2024 00:41:53 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:53 GMT Message-Id: <202401020041.4020frDv096714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1bb758df1aec - stable/14 - iommu_gas: add ddb 'show iommu_domain' command List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1bb758df1aecbeaae484b7faf3d16ccfbb314b4f Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1bb758df1aecbeaae484b7faf3d16ccfbb314b4f commit 1bb758df1aecbeaae484b7faf3d16ccfbb314b4f Author: Konstantin Belousov AuthorDate: 2023-12-24 14:52:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:38 +0000 iommu_gas: add ddb 'show iommu_domain' command (cherry picked from commit 30ce85ca11433ba05cdbab8aedceaa15a93bd97a) --- sys/dev/iommu/iommu_gas.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index cc541e748f48..72db5ca871ec 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -1031,3 +1031,48 @@ SYSCTL_INT(_hw_iommu, OID_AUTO, check_free, CTLFLAG_RWTUN, &iommu_check_free, 0, "Check the GPA RBtree for free_down and free_after validity"); #endif + +#include "opt_ddb.h" +#ifdef DDB + +#include + +static void +iommu_debug_dump_gas(struct iommu_domain *domain) +{ + struct iommu_map_entry *entry; + + db_printf("iommu_domain %p tree %p iommu %p fl %#x\n", domain, + &domain->rb_root, domain->iommu, domain->flags); + db_printf("iommu_domain %p tree %p\n", domain, &domain->rb_root); + RB_FOREACH(entry, iommu_gas_entries_tree, &domain->rb_root) { + db_printf( + " e %p [%#jx %#jx] fl %#x first %#jx last %#jx free_down %#jx", + entry, (uintmax_t)entry->start, (uintmax_t)entry->end, + entry->flags, + (uintmax_t)entry->first, (uintmax_t)entry->last, + (uintmax_t)entry->free_down); + if (entry == domain->start_gap) + db_printf(" start_gap"); + if (entry == domain->first_place) + db_printf(" first_place"); + if (entry == domain->last_place) + db_printf(" last_place"); + db_printf("\n"); + } +} + +DB_SHOW_COMMAND(iommu_domain, iommu_domain_show) +{ + struct iommu_domain *domain; + + if (!have_addr) { + db_printf("show iommu_domain addr\n"); + return; + } + + domain = (void *)addr; + iommu_debug_dump_gas(domain); +} + +#endif From nobody Tue Jan 2 00:41:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF016Tdz55ytX; Tue, 2 Jan 2024 00:41: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 4T3vDz1ymLz3PtB; Tue, 2 Jan 2024 00:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3eBq4MZdttClNWMbz0H7117AftDVK6q8S8ANDilC4M=; b=PEuamcYYNudEtN7DF/ZrKKUhOZf24ylDOLjI7DaTCsVd9qFl515Cu9z4kGpdffvQC8jg7Y ahtR6f4Q9MGwhLj6ResaCMaMFHugJTwCXefkQd86/z/pYo0WnUvHuDFj/aCQr5SI0pk14k Usj5s3HKTyE/ywbL3lewR+CZUYLPO4PCRBz7kAwBI8n5QR8A1yAgphzC9beczUFvH4eePt Mq25ngrESwTgA2UQHNt3LmwgZM8K9wUi8O7zHkvvqe92GsjYNutrAPtD6AZoYfV0zsQFmi GMAX9N8M4uM3HJ7TdAt1kn1OHjG4ltgA+rP7cXt/s+9vodfCrsxmnQaL9Sasgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156115; a=rsa-sha256; cv=none; b=PCb2k7LKeMJFCCDuLEyt4zDT7xpTZOGYb3l/HcIjKFdkFOxLYA43DBm/KcZbTE7xlE2XTC my/oRiBxZUfokJxRyF9EVCztNQ9xQkkQkioXtPOXPJ7oH29QTSzw0k5dQSZl8iSa9CmFbc JYsZvigQ2vg6Qp/MCkN2z6YS18whRTji7qfgXLZR7JEkMk9/9XkR0T9T9Xv4w5exs45UV+ 5Z9bZaIisqWosCcvRrnztSRNwUgDVRuK9lA3WJv2Dya3IhGMHaeeuakJKZtaAHJr0wt4Ti CTpigk16v14UIbaGrbbWHCPYnUYFXE1+mI7wRIh3+DVimCwMoM3h9DvY/1T39A== 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=1704156115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3eBq4MZdttClNWMbz0H7117AftDVK6q8S8ANDilC4M=; b=rY85j1MNUsum7uXf2OaveaoyoabBLnN4hlSoyRgYv6tz7R/l4nSaGGSmm3r2Rrl7tMspXb agWhWazHFGTzGF/5lCtOPgCiGryX338tZsrX+nrGjo1a9Vw1Vmb3rYNsf9RSYCkUIVKkcA UZgzQDSVIefvn3SnVWw3yKOPBxYGDBLoPt/atMURsTfYvTjbU4q06/nRbJ+ROr3hOXyoUS jKnINKeSNYLwPLMdRC9BrSIWrAzg8MAjTaGFvDoyBHN65gbtj9jgwFFQI5jIjYN3YNPdI/ 4NNMKCfiP/5iMRjd1h3gjHb+kcDiuChcCY/Efg+605NMRLekGmDM/1mt7REbWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vDz13ngzft8; Tue, 2 Jan 2024 00:41: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 4020ftQX096774; Tue, 2 Jan 2024 00:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020ft2o096771; Tue, 2 Jan 2024 00:41:55 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:55 GMT Message-Id: <202401020041.4020ft2o096771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 43ccf1cf37b0 - stable/14 - DMAR: add knob to disable RMRR entries installation into domains List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 43ccf1cf37b0629ff3bdabcfccf16865fbac4c8f Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=43ccf1cf37b0629ff3bdabcfccf16865fbac4c8f commit 43ccf1cf37b0629ff3bdabcfccf16865fbac4c8f Author: Konstantin Belousov AuthorDate: 2023-12-23 16:57:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:38 +0000 DMAR: add knob to disable RMRR entries installation into domains (cherry picked from commit 24e38af60a637073b5164837959098acaa3d8daa) --- sys/x86/iommu/intel_ctx.c | 3 +++ sys/x86/iommu/intel_dmar.h | 1 + sys/x86/iommu/intel_drv.c | 10 ++++++++++ 3 files changed, 14 insertions(+) diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index 90c883b28ea6..65ca88b052ed 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -239,6 +239,9 @@ domain_init_rmrr(struct dmar_domain *domain, device_t dev, int bus, vm_pindex_t size, i; int error, error1; + if (!dmar_rmrr_enable) + return (0); + error = 0; TAILQ_INIT(&rmrr_entries); dmar_dev_parse_rmrr(domain, dev_domain, dev_busno, dev_path, diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index 1c428e60d96f..e20144094c80 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -319,6 +319,7 @@ extern iommu_haddr_t dmar_high; extern int haw; extern int dmar_tbl_pagecnt; extern int dmar_batch_coalesce; +extern int dmar_rmrr_enable; static inline uint32_t dmar_read4(const struct dmar_unit *unit, int reg) diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 274ba566ad23..c4bb3a1745f4 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -156,6 +156,8 @@ dmar_count_iter(ACPI_DMAR_HEADER *dmarh, void *arg) return (1); } +int dmar_rmrr_enable = 1; + static int dmar_enable = 0; static void dmar_identify(driver_t *driver, device_t parent) @@ -170,6 +172,8 @@ dmar_identify(driver_t *driver, device_t parent) TUNABLE_INT_FETCH("hw.dmar.enable", &dmar_enable); if (!dmar_enable) return; + TUNABLE_INT_FETCH("hw.dmar.rmrr_enable", &dmar_rmrr_enable); + status = AcpiGetTable(ACPI_SIG_DMAR, 1, (ACPI_TABLE_HEADER **)&dmartbl); if (ACPI_FAILURE(status)) return; @@ -905,6 +909,9 @@ dmar_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) char *ptr, *ptrend; int match; + if (!dmar_rmrr_enable) + return (1); + if (dmarh->Type != ACPI_DMAR_TYPE_RESERVED_MEMORY) return (1); @@ -991,6 +998,9 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) iria = arg; + if (!dmar_rmrr_enable) + return (1); + if (dmarh->Type != ACPI_DMAR_TYPE_RESERVED_MEMORY) return (1); From nobody Tue Jan 2 00:41:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF0530Dz560JM; Tue, 2 Jan 2024 00:41: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 4T3vF039Dkz3PtL; Tue, 2 Jan 2024 00:41:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Ct13Gxl8YQBc519JzPZnqJnVnBbOOpnQtJJV+ZNjbU=; b=E/uphzgb50iR4TtgxcqRwGAuYoDfNFxcp2ertneKtK6N34xWsRLNFCQdWbAzw+0OIwoFYF pOt1b9XztyihdYo7uIFHEsVnBY7/toOcViF5O6QYLUhash/rj0cH3/wUhoPnPknI5qvh4S j3E8h3RabfTcO7QUhD+44mrzRsdHC6vx7IefAZRnG8bCVZjnsLLV31S3hRwhjuiUCaVmLo KVEG1b/S05hk8Mi6HYfFM+Kp6ED4pzNOoZtqsbb1da6U7bzMFrikLKFsybesPhzfhnpHm5 P/XS5gFv0H5geDpCf5E/0YrwnD+mubdsFAtIwZaEqiGy4WrqEWksLvZ7BhzZOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156116; a=rsa-sha256; cv=none; b=wkrYTkw6nG007N/BeoW52owuhnYRKHKlQSHfjBUVB/GT756mFoMhPhN21szAFtNhd4wz0m c0TjHj6rYOQBKQBrNklStOXoqugDr9LUdVZAnLFqOYi6+wANNRGEhpVWDANapEADUT36D+ JicGgpODPeSRV0C9Fmtef8tq9tKcJJohQ2maLF9UXjmdWluRVUGa6ERkVBfwRIwfa8lWfV JpzRr3td3bKqxg0mIbNprjwfna2iOSgoCzqJmn6l0Jsmv21JjwdVeTlnCUEF5waLnENhCK nrZ3xEvGjjOrOfPIvLicchFD8srka816AE6JGYOqiVFGI4Dut0vdk6pvMWkZgA== 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=1704156116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Ct13Gxl8YQBc519JzPZnqJnVnBbOOpnQtJJV+ZNjbU=; b=mnHoepagAGZlzSTR1r27vXE83LCk04n+rViiB7c7vJnWLdvGnsGhN98CC6nonnZMj1OLTk Yy81bvrZrr+WtnOjPqXqyAaoX379iK6eXGic4VcJ5U5PgEXTHJN6IKAjO9mtyel7Dfh/cR P5UrtM/JqiYm9gKAXiKeuiyHO/CIz8qZcOYSILVaHvaBO4/igcnTR/BasDrnr25JEjPK6X CQMKyI3qe1xszyus07ETLaaV/z8IkXWUE/wljkBKSAYDRbyHHRMPCRqTxHqnOatcVFw1C9 0o+St15RpsDYBkTr2iSUPt2rtzpCvPpOj5Y3Eq3yv9Hv/CjCkynfUW4DTARpuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vF028lSzfQk; Tue, 2 Jan 2024 00:41: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 4020fugh096831; Tue, 2 Jan 2024 00:41:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020fu17096828; Tue, 2 Jan 2024 00:41:56 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:56 GMT Message-Id: <202401020041.4020fu17096828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b86d839af9c8 - stable/14 - iommu_gas: print entries flags and domains if an overlap detected List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b86d839af9c869abee58b0dbb309cefc4d8695e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b86d839af9c869abee58b0dbb309cefc4d8695e1 commit b86d839af9c869abee58b0dbb309cefc4d8695e1 Author: Konstantin Belousov AuthorDate: 2023-12-23 23:34:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:38 +0000 iommu_gas: print entries flags and domains if an overlap detected (cherry picked from commit 733da1eb947688210bc152656357ecafbd172bb7) --- sys/dev/iommu/iommu_gas.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 72db5ca871ec..25e13aad2291 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -125,9 +125,11 @@ iommu_gas_cmp_entries(struct iommu_map_entry *a, struct iommu_map_entry *b) b, (uintmax_t)b->start, (uintmax_t)b->end)); KASSERT(a->end <= b->start || b->end <= a->start || a->end == a->start || b->end == b->start, - ("overlapping entries %p (%jx, %jx) %p (%jx, %jx)", - a, (uintmax_t)a->start, (uintmax_t)a->end, - b, (uintmax_t)b->start, (uintmax_t)b->end)); + ("overlapping entries %p (%jx, %jx) f %#x %p (%jx, %jx) f %#x" + " domain %p %p", + a, (uintmax_t)a->start, (uintmax_t)a->end, a->flags, + b, (uintmax_t)b->start, (uintmax_t)b->end, b->flags, + a->domain, b->domain)); if (a->end < b->end) return (-1); From nobody Tue Jan 2 00:41:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF16z7Jz55ywm; Tue, 2 Jan 2024 00:41: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 4T3vF14Jf2z3PZj; Tue, 2 Jan 2024 00:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2lD37j0VBEhQ0BmfmU4379YVdyPn3z80/zvglxEvTRA=; b=dc9tEjL52MOL829qF/FsHyrSF+Fi8ZxUeDI/HG5zfj5qC3ZBCv7PWu/CHdcM1ugb3c9PEl 9kpVamY4fdkd3X08oQ6dQxsLkuCNb7nzJxi64JFaiaE4+XAZzFsr0eSIKdoI5sLryPy2hj sV5I71CA3foPOHDiBy8JAfzVXfu840Tfjd8F8R7/VoKTWXtWroEI0Fcp3QDaRPVt75cFOP 3PhXVhbEcOgPTVsaBy7sxwYADz4NJ7FS7y5DnGNVxOG2B0fkLXgIGQ1Yih2jyB+B/Erto7 P0tOwc9yEmib7DJZu+nKoZYUftR19OyuzCAtnzw2toxXh97WhYirukFhS+uUiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156117; a=rsa-sha256; cv=none; b=xO8YYayEe07GjrodTlgd2qhJPuWpsf2cnZ8xiAkHnnwgLFgo5/tMHbNVszQDSXmTvvVLQ/ antMAZzytm5fVnttx1Sos9auUw7xJV9NfRSmMAnZmh1b0XiNniJfo3ObGYSijinbddilt3 xXSwXIz5Jsi6QgRpWYJwQPG6VBFloGPEJGlIOrJq12UK5z+ZZ1wtuwGLlgbgmJZ4qplY+0 ItQUjrnYXcAmVBncBJPyX0n2FOBxfKzllxr5WFT+mMYrt6Aq6Vo5j0MqInrf93q8WFg70w P81Scr7ox+hFKIkuW0cX8WpZ3t4MqblguTQjyU//F/sQsK9xRL3uNi//qcs7Lw== 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=1704156117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2lD37j0VBEhQ0BmfmU4379YVdyPn3z80/zvglxEvTRA=; b=SY+A46lccdjJMLaqProW56pW/+VuNkQeN2WvJW/5GKerXf4jxnc3pGmE6qMPF6fQpPyjC7 2h3GbrSdN/x0siVS8LCBd6aaejdwSj/Ej+8g93NE+SR7rGcAPprSdBYLmnkvu4c3bnRaRj ifJPe/zFlktFyV3Es8jY3m/BIPXzs+1FLPWH+KbvIg2Wy0ucVR3Xm1zUKRBCBeL8geFMAl xU1Nm5jYo5QJC+KjXRwWzlLqqe0X5haFYAS9VbL5J6fGo7ZwCYn5sdERkmRY2GKBr8VEZs uNRginlTIXiGprPriCnr/E8b5mtkCvEkNrUH64mcZq3ZK7hh8bQVUaPi9Kb4qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vF1326Rzfr9; Tue, 2 Jan 2024 00:41: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 4020fvet096892; Tue, 2 Jan 2024 00:41:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020fvoe096889; Tue, 2 Jan 2024 00:41:57 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:57 GMT Message-Id: <202401020041.4020fvoe096889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: edaece2f7e37 - stable/14 - iommu_gas: zero fake on-stack map entry used in iommu_gas_remove_clip_left() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: edaece2f7e37219854aba5f78a5c68f0aac05f4e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=edaece2f7e37219854aba5f78a5c68f0aac05f4e commit edaece2f7e37219854aba5f78a5c68f0aac05f4e Author: Konstantin Belousov AuthorDate: 2023-12-24 00:59:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:38 +0000 iommu_gas: zero fake on-stack map entry used in iommu_gas_remove_clip_left() (cherry picked from commit cb1d664b0073232173072231cb386f0216ee596b) --- sys/dev/iommu/iommu_gas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 25e13aad2291..e178acf60478 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -655,6 +655,7 @@ iommu_gas_remove_clip_left(struct iommu_domain *domain, iommu_gaddr_t start, * asserted that start is below domain end, entry should * exist. Then clip it if needed. */ + bzero(&fentry, sizeof(fentry)); fentry.start = start + 1; fentry.end = start + 1; entry = RB_NFIND(iommu_gas_entries_tree, &domain->rb_root, &fentry); From nobody Tue Jan 2 00:41:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF26M3tz560B5; Tue, 2 Jan 2024 00: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 4T3vF25BfDz3Pwg; Tue, 2 Jan 2024 00: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=1704156118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbbQZAHidixKTW1WiRwn1h0fn9mOxGMOt6rB81anNGs=; b=tTWKdQxAkuXVT95UJhLZiqxXf5BsXFbDjg6TwDvmhwWv7mGe8Ex/qGW4ZWqZMSvkyKdO6o yvIdLqnAskANcEGA+5NS3XBhBDOPTSvPeq6F1VGA7MpH31ImQZuSJ1Hwya+TTQ2r8weWqc OdxpD3n5X+IRpnPqjKGyuVvdFl6AnhMgLKvrojQXINKrWAiiofsZPu64CwGEY67WNaH9aC UBZL53R1+JX7PfKGc+qpLmez0uuC5robOm4IXVNhAK0S2fnLP7sDWa+Np/n3RkEpdSWRCL ulLJZS+n4m7L2pQx5TBCIs5nzDElDWy4y/uCyBHpiZ8gO4oPmWi5C/Q0hWcWcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156118; a=rsa-sha256; cv=none; b=qEntJKi7TTxiz/wuTePqxPvNaVwm+NdsoUuoZGkVm7wPUOYhA+fUwRunCYt8SpL1Xro8sT PAQfpOfWw/KfWSVoBvYTybQh2mZc90YZHY/rs6ED5W1kKUq6qaXqfQ3V9hQWQNnp7XLjgR Y/5rsJJeH1ttmAEVNsJOUJ1m2tsjq25PJr3VG6H7eQjGze5exukN4F8RXzJDHxYdki1QL3 dQruP4t1NKe9j+QodO7j5t7cm02BlfcsujDMDTca6+fLLtgpeEhElvnFzyWGlptVWG3zFQ Kd7UmFDGFuFVfB9MFILSszZW6fVggvaO6q9Da1ADJQQp+SItALpIvpQF3MC0ug== 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=1704156118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbbQZAHidixKTW1WiRwn1h0fn9mOxGMOt6rB81anNGs=; b=NuTrBFdlXDlc9XP4M86i40ODGjAznU6QoPPbHK6tPeyjoMrw0IuW4PXvodAJsDYKEIC5jv RUtgO9BSiwWEZbwB9TjLVnc85sq37UJvlg/9AmRMR0MMQDDTCORm5c/s5eO0dc94pxR3qi UCPldeyC41l16vfhVz3CkRl3RBlhqf9fsFrtOYHOi/tHMGDix6MDeeQZwA5OXnlHaTj65I MrZ+Bww8SkBBuEMNyKko498uDn+/K2IKwi4a5orgiNKZM9hXdZxEWkuKph27cnZ0K/wACR xau6rPCs5qfBJBmtBo/hncOxotiCoXvk1k0PhW2vd3yxIUxMgSRsvdGUv1k9Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vF24Jsnzfw7; Tue, 2 Jan 2024 00: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 4020fwic096941; Tue, 2 Jan 2024 00: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 4020fw9u096938; Tue, 2 Jan 2024 00:41:58 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:58 GMT Message-Id: <202401020041.4020fw9u096938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5dcf0d72f645 - stable/14 - IOMMU: add GAS map entry flag IOMMU_MAP_ENTRY_FAKE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5dcf0d72f645bee142d28cbdc213cfc1458bc306 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5dcf0d72f645bee142d28cbdc213cfc1458bc306 commit 5dcf0d72f645bee142d28cbdc213cfc1458bc306 Author: Konstantin Belousov AuthorDate: 2023-12-22 22:39:27 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:39 +0000 IOMMU: add GAS map entry flag IOMMU_MAP_ENTRY_FAKE (cherry picked from commit a59c252903e81f46c74903ce5b1cf0960927dbcc) --- sys/dev/iommu/iommu_gas.c | 6 +++++- sys/dev/iommu/iommu_gas.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index e178acf60478..dc850747512a 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -123,7 +123,8 @@ iommu_gas_cmp_entries(struct iommu_map_entry *a, struct iommu_map_entry *b) a, (uintmax_t)a->start, (uintmax_t)a->end)); KASSERT(b->start <= b->end, ("inverted entry %p (%jx, %jx)", b, (uintmax_t)b->start, (uintmax_t)b->end)); - KASSERT(a->end <= b->start || b->end <= a->start || + KASSERT(((a->flags | b->flags) & IOMMU_MAP_ENTRY_FAKE) != 0 || + a->end <= b->start || b->end <= a->start || a->end == a->start || b->end == b->start, ("overlapping entries %p (%jx, %jx) f %#x %p (%jx, %jx) f %#x" " domain %p %p", @@ -536,11 +537,13 @@ iommu_gas_alloc_region(struct iommu_domain *domain, struct iommu_map_entry *entr if (entry->end >= domain->end) return (EINVAL); + entry->flags |= IOMMU_MAP_ENTRY_FAKE; next = RB_NFIND(iommu_gas_entries_tree, &domain->rb_root, entry); KASSERT(next != NULL, ("next must be non-null %p %jx", domain, (uintmax_t)entry->start)); prev = RB_PREV(iommu_gas_entries_tree, &domain->rb_root, next); /* prev could be NULL */ + entry->flags &= ~IOMMU_MAP_ENTRY_FAKE; /* * Adapt to broken BIOSes which specify overlapping RMRR @@ -658,6 +661,7 @@ iommu_gas_remove_clip_left(struct iommu_domain *domain, iommu_gaddr_t start, bzero(&fentry, sizeof(fentry)); fentry.start = start + 1; fentry.end = start + 1; + fentry.flags = IOMMU_MAP_ENTRY_FAKE; entry = RB_NFIND(iommu_gas_entries_tree, &domain->rb_root, &fentry); if (entry->start >= start || diff --git a/sys/dev/iommu/iommu_gas.h b/sys/dev/iommu/iommu_gas.h index 8069c5a15a34..cdc4bd22d60c 100644 --- a/sys/dev/iommu/iommu_gas.h +++ b/sys/dev/iommu/iommu_gas.h @@ -50,6 +50,7 @@ #define IOMMU_MAP_ENTRY_UNMAPPED 0x0010 /* No backing pages */ #define IOMMU_MAP_ENTRY_REMOVING 0x0020 /* In process of removal by iommu_gas_remove() */ +#define IOMMU_MAP_ENTRY_FAKE 0x0040 /* disable assert in cmp() */ #define IOMMU_MAP_ENTRY_READ 0x1000 /* Read permitted */ #define IOMMU_MAP_ENTRY_WRITE 0x2000 /* Write permitted */ #define IOMMU_MAP_ENTRY_SNOOP 0x4000 /* Snoop */ From nobody Tue Jan 2 00:41:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF44J1nz560Lj; Tue, 2 Jan 2024 00:42: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 4T3vF401pwz3PpT; Tue, 2 Jan 2024 00:42:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nmNJ2C4dlDaLNkIkOu9gZE2XajGQauJNW5JVwKO1ehg=; b=PX7+08NwzhBDRRV7C5rdCE31ENblVZD8AHp1MYCO/5DgiNkwUVBMzNfZ6ETACahMdcmoOA GoT/sZHLXgj6i9e4XlByEncrSSf92MzREsdWhj2dXpBcdgsifFKV4x8SGhSbIXG7o7tojV 3UEv94ouiFwlJ0VZvp3Lv+lhwyC5toMVAEPSK4kFgoDUGZKK1a78JQhgyMAnVfoE228iKl q73BPUS0xj+DoBeyslEP/q5GfOQOJvnwn/G5yHymqOLcQ/VQJXYsJ0QncLDADiYFD2QT9z /NNmuaSHr9ShFIJz2lJOd4M41jvI8+3ThimQiREsMekjCnPxB2vmmE+MIF7dvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156120; a=rsa-sha256; cv=none; b=LaK/3CyZhjAnAyEKqwW+5Chmu7GxSlazCRuL97qSWiEg9xJGn0lNg+YB6+Cl3u8s+eeplx FJaNOZbsTRhg534Z2nI6G2IlGu0/QZwalyqV3Jc8dhVeQgJ3VnSiLqV0tWH7YTgsVu1LgU oVuqKN8hlcXr9Xe3cFCF518jhDyLeycDYo3AINNexEtsOFOq9UZWg2oafJMWMDVYR7nMDH BJGM07lzfBo9CfeSgkFR2wwFOHenZCFBNYYy69kpfeYdxO+6EGgbNtN4bbhcsBiqn0cH/q moKOtwNnpNnFKHewno39s758HCD9NqWHmaAb6odjuQQ9fwNpWrFAyc08DboAtQ== 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=1704156120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nmNJ2C4dlDaLNkIkOu9gZE2XajGQauJNW5JVwKO1ehg=; b=UookIOCu2HxbhGFqs0ANDUVw2t79zYADcZ8EnxIBeeFavDVUbGaERWGOv0s/32OoEog+6D 1pRwWxOvHKKZFTV52jF9ls3vkFQu6kg3wp1iHDBymNq7bEnO4xwk3z6Z3dt7oj40Y8Qoc9 WOBZ0Y8jGO4aJX6nFBmIR1tbZltFCIsP7dAf3sHJ0niTX9U11a0LaF+gw8ebBr5QybArO4 yrYQeDFGUySYkR1Djyx27ggKVyXmBeU58BMoqi8Q/luQYQ2L4Za3uRJV2oDJzp9H3xKgzB R1lZF9ZzILMfZrsCrzJZz1VHEKRBZrtFXQz2BffX2tE5iKAvv3UseCyH2/5Hcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vF35JZlzfbj; Tue, 2 Jan 2024 00:41: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 4020fxMk096979; Tue, 2 Jan 2024 00:41:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020fxH7096976; Tue, 2 Jan 2024 00:41:59 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:41:59 GMT Message-Id: <202401020041.4020fxH7096976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 264e49515fb0 - stable/14 - iommu: add iommu_gas_remove_locked() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 264e49515fb0028bc77af953d8f98ff9de24ae8f Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=264e49515fb0028bc77af953d8f98ff9de24ae8f commit 264e49515fb0028bc77af953d8f98ff9de24ae8f Author: Konstantin Belousov AuthorDate: 2023-12-14 02:41:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:39 +0000 iommu: add iommu_gas_remove_locked() (cherry picked from commit 273b4de3462d7825ebe4ace7a1930f098311287f) --- sys/dev/iommu/iommu_gas.c | 83 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 26 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index dc850747512a..9a74854f926f 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -708,28 +708,20 @@ iommu_gas_remove_unmap(struct iommu_domain *domain, TAILQ_INSERT_TAIL(gcp, entry, dmamap_link); } -/* - * Remove specified range from the GAS of the domain. Note that the - * removal is not guaranteed to occur upon the function return, it - * might be finalized some time after, when hardware reports that - * (queued) IOTLB invalidation was performed. - */ -void -iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, - iommu_gaddr_t size) +static void +iommu_gas_remove_locked(struct iommu_domain *domain, + iommu_gaddr_t start, iommu_gaddr_t size, + struct iommu_map_entries_tailq *gc, + struct iommu_map_entry **r1, struct iommu_map_entry **r2) { - struct iommu_map_entry *entry, *nentry, *r1, *r2; - struct iommu_map_entries_tailq gc; + struct iommu_map_entry *entry, *nentry; iommu_gaddr_t end; - end = start + size; - r1 = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); - r2 = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); - TAILQ_INIT(&gc); + IOMMU_DOMAIN_ASSERT_LOCKED(domain); - IOMMU_DOMAIN_LOCK(domain); + end = start + size; - nentry = iommu_gas_remove_clip_left(domain, start, end, &r1); + nentry = iommu_gas_remove_clip_left(domain, start, end, r1); RB_FOREACH_FROM(entry, iommu_gas_entries_tree, nentry) { if (entry->start >= end) break; @@ -738,11 +730,11 @@ iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, entry->start, entry->end, start)); if ((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0) continue; - iommu_gas_remove_unmap(domain, entry, &gc); + iommu_gas_remove_unmap(domain, entry, gc); } - if (iommu_gas_remove_clip_right(domain, end, entry, r2)) { - iommu_gas_remove_unmap(domain, r2, &gc); - r2 = NULL; + if (iommu_gas_remove_clip_right(domain, end, entry, *r2)) { + iommu_gas_remove_unmap(domain, *r2, gc); + *r2 = NULL; } #ifdef INVARIANTS @@ -755,13 +747,52 @@ iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, entry->start, entry->end, start, end)); } #endif +} + +static void +iommu_gas_remove_init(struct iommu_domain *domain, + struct iommu_map_entries_tailq *gc, struct iommu_map_entry **r1, + struct iommu_map_entry **r2) +{ + TAILQ_INIT(gc); + *r1 = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); + *r2 = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); +} +static void +iommu_gas_remove_cleanup(struct iommu_domain *domain, + struct iommu_map_entries_tailq *gc, struct iommu_map_entry **r1, + struct iommu_map_entry **r2) +{ + if (*r1 != NULL) { + iommu_gas_free_entry(*r1); + *r1 = NULL; + } + if (*r2 != NULL) { + iommu_gas_free_entry(*r2); + *r2 = NULL; + } + iommu_domain_unload(domain, gc, true); +} + +/* + * Remove specified range from the GAS of the domain. Note that the + * removal is not guaranteed to occur upon the function return, it + * might be finalized some time after, when hardware reports that + * (queued) IOTLB invalidation was performed. + */ +void +iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, + iommu_gaddr_t size) +{ + struct iommu_map_entry *r1, *r2; + struct iommu_map_entries_tailq gc; + + iommu_gas_remove_init(domain, &gc, &r1, &r2); + IOMMU_DOMAIN_LOCK(domain); + iommu_gas_remove_locked(domain, start, size, &gc, &r1, &r2); IOMMU_DOMAIN_UNLOCK(domain); - if (r1 != NULL) - iommu_gas_free_entry(r1); - if (r2 != NULL) - iommu_gas_free_entry(r2); - iommu_domain_unload(domain, &gc, true); + iommu_gas_remove_cleanup(domain, &gc, &r1, &r2); } int From nobody Tue Jan 2 00:42:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF52s0qz55yx3; Tue, 2 Jan 2024 00:42: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 4T3vF50fHZz3Prt; Tue, 2 Jan 2024 00:42:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K4Ln4hN3++fDD5Up+AEO+Pbw3wgJVeS2Pxs8/vZC3II=; b=G31Zedzk0ODmG/W3h5k4PEbJeLazz0i6HqVohZ1Zs8CjgxLpHuGRthbb2EbbnO4028GrnI 2pdFbtxczUM6iUiOzypaQZGDED/tPLTSZxbfTlEIh1inEI5LTYj1eXb4Y2C8FL2ljZPDGL vNcwXUAi+kb2gU7+RggABso8ljfIqZte37CBrLhTFoU6cyblDf8J4wJ1EHUBnIqh77rJR3 n/hLcIXk6pyZ4piWnOtJpKuOEFIsdGArAcPm1923uEpEPRZM7lMT0t3Kx8PSVnHeBdSZkJ XXCoBXIGuuWLUb+vKyUHYoT/FtfRCYqkTGQ5WJ10dPRpgllKqG/u7g0e0Rg5tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156121; a=rsa-sha256; cv=none; b=fGacTgi71ZN+2fp8GTwb0WBBM2J8e/V8U2iTKQOijbVEoLFwFa/5eamebLk/Puwly4Qa6/ 53ylNC2tJkyo6Ma7aY8hMo5RWZKKoXR23FEnpuM6PW8ekUpBwaj/n+VvEGxuccMxA/SmTV ZOnm/YV+b2re2lahZUxGAGut9uC8KNBnRv8Y476XbHM+KOkACzOVPpSFxICci9wQ5OCF/r wbwHXN5ELeCqJUIgi+OnDVODSUsfPXBKWLzxw1Pds1HNN6wv7DSgAJ6XP/JvDglO+mQdoO DgdN4SmD0y73+anb/r4M64kUIcLIwN0H8kLwtQogloFQFWUMgAxfcb6l0Hs5+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=1704156121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K4Ln4hN3++fDD5Up+AEO+Pbw3wgJVeS2Pxs8/vZC3II=; b=E2QoKNpMh1UI4IW2e+DylGPitqLiu6XwiEzVK4EMEvKyId8X1C3G8mu/HD0JsIL7rn83Jb EXDwnv2HxtdHui4+SeJRb362S45BZh/2ymqkAzgBUQyZ3oaApTMefOxdJDeJC8PbrNd8hg OKeeChFkDihKzG1/drmB/nJ3/70ioMmU5jucGtZQO4NVo9v8ajLSeqVK3ttuW0Hrq/cu/T h1ILwjJesNrwH6tlC2uH4l6QFwcGyg7/E0pC/3qYcoTtdWtJbRhLAS0OMISNWs9wFxeRSU 61hjtVjfR6B+f1FaT12r+L4TRuz8kzJ+N/3DSrI23+sPwqP50BEz7dFK27Yeeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vF467nlzfnJ; Tue, 2 Jan 2024 00:42: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 4020g0jm097050; Tue, 2 Jan 2024 00:42:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020g0aJ097047; Tue, 2 Jan 2024 00:42:00 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:00 GMT Message-Id: <202401020042.4020g0aJ097047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8019d103e020 - stable/14 - iommu_gas: make placeholder entry at the start of the GAS zero size List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8019d103e020a5aa100d7a652739d733f8c2c2eb Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8019d103e020a5aa100d7a652739d733f8c2c2eb commit 8019d103e020a5aa100d7a652739d733f8c2c2eb Author: Konstantin Belousov AuthorDate: 2023-12-22 22:19:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:39 +0000 iommu_gas: make placeholder entry at the start of the GAS zero size (cherry picked from commit f59128775636846574e092c68e849a56f74577e6) --- sys/dev/iommu/iommu_gas.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 9a74854f926f..cfd375c658c3 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -118,7 +118,7 @@ static int iommu_gas_cmp_entries(struct iommu_map_entry *a, struct iommu_map_entry *b) { - /* Last entry have zero size, so <= */ + /* First and last entries have zero size, so <= */ KASSERT(a->start <= a->end, ("inverted entry %p (%jx, %jx)", a, (uintmax_t)a->start, (uintmax_t)a->end)); KASSERT(b->start <= b->end, ("inverted entry %p (%jx, %jx)", @@ -244,25 +244,17 @@ iommu_gas_init_domain(struct iommu_domain *domain) KASSERT(RB_EMPTY(&domain->rb_root), ("non-empty entries %p", domain)); - /* - * The end entry must be inserted first because it has a zero-length gap - * between start and end. Initially, all augmentation data for a new - * entry is zero. Function iommu_gas_augment_entry will compute no - * change in the value of (start-end) and no change in the value of - * free_down, so it will return false to suggest that nothing changed in - * the entry. Thus, inserting the end entry second prevents - * augmentation information to be propogated to the begin entry at the - * tree root. So it is inserted first. - */ end->start = domain->end; end->end = domain->end; end->flags = IOMMU_MAP_ENTRY_PLACE | IOMMU_MAP_ENTRY_UNMAPPED; RB_INSERT(iommu_gas_entries_tree, &domain->rb_root, end); begin->start = 0; - begin->end = IOMMU_PAGE_SIZE; + begin->end = 0; begin->flags = IOMMU_MAP_ENTRY_PLACE | IOMMU_MAP_ENTRY_UNMAPPED; RB_INSERT_PREV(iommu_gas_entries_tree, &domain->rb_root, end, begin); + iommu_gas_augment_entry(end); + iommu_gas_augment_entry(begin); domain->start_gap = begin; domain->first_place = begin; @@ -739,7 +731,8 @@ iommu_gas_remove_locked(struct iommu_domain *domain, #ifdef INVARIANTS RB_FOREACH(entry, iommu_gas_entries_tree, &domain->rb_root) { - if ((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0) + if ((entry->flags & (IOMMU_MAP_ENTRY_RMRR | + IOMMU_MAP_ENTRY_PLACE)) != 0) continue; KASSERT(entry->end <= start || entry->start >= end, ("iommu_gas_remove leftover entry (%#jx, %#jx) range " From nobody Tue Jan 2 00:42:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF63m6tz560Cg; Tue, 2 Jan 2024 00:42:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vF624DSz3Q0r; Tue, 2 Jan 2024 00:42:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5briwcONE82Gqd1syE7I5Vkt7JCGjPvktZUww9YU+qA=; b=WcYXI6qC1+453Xi2joxCynXMVpnBIpIr8Bb6RPggaHsPOolR9pxUQvpsKD2Weaei6IFAst YDxA92ZoN7sTDOM3Ogw7XaV4o957Mlml0jHFeFapAGZf2/lqH9O5cHCq5FrraMVDP8b1Yd ITNVtJbMrQxPuJZTFFCJxVJvw/HigLXZUBUPsuijmieC++VJY1ft3g9RNY3Kxm4yPWaB8l ZdMn27diV1+cQ75hGjhnrlNSisUqNS3azljRNpLpmHmzCYf4uVnBZje/3EPoZ0p4XZaAtm dteM+XL9BwaPHEYQmyeYUuACwiBmTw0g3fi11ZnDgt/WQAuBSbfM632Y8f4J2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156122; a=rsa-sha256; cv=none; b=uDPjnpV8rSEogDkWEFM8Y5OW6vz8csRu0Qz2yLiopYDRoBAuYGxngYl5DVfqCiCdG3UjJ4 Sz0IMK7epREejhmj/Yne6aXQS/69T5S0ygYpR6qIkySR0nSKutd+WHaD3OKJoFnxNV4JAz hor4Xh07E6dV8+GBPVtPilxOt7B7aJx39mV+1ee2nY8NZxuhHndGUCJ79JzxL2R9sSOBLK VR0keP9h4kP84ReZ/eVZ+lOji9Qj9MEz0hLTNUIvi6Tl2DLNX3aeJgRzu4fIUlHzcsQyco 3TyvlvwDDUVAC7IGIxVsJwte7gGmgblN6ToDadAPPPysXmWral0T8ToEuJcj/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=1704156122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5briwcONE82Gqd1syE7I5Vkt7JCGjPvktZUww9YU+qA=; b=w7eqgSGRCH44rVeeDZcRc7pLr3j92E6WMGPZmbc1pn+utqw8+jXiJXRlk+t1Lj7z+0TIQM 46iDKePmwmrdiOnosTMYICjR1reiKoyNw7PTwvnjsyfB8xmdRNll5w7WrSo88OKsgpwMy6 HudWHh82gngVBHft8peT41cWtMtnJwSXXrhOHTm61y1aRnmyDJh6FveEkvQnVMxX++fo5H D4EMt41W5QKvekyHMnB1meBfL9mt5t6NXRV8h8QjSkg5qDRlVucQZIAJS/ghU7BaMdBkng pkB1tMEE0eECVECek8Jafe7xYXQ4gCkhppVPzsp9JvJguVyR3eMQE2OcIxQLYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vF604wCzfQl; Tue, 2 Jan 2024 00:42:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020g16H097110; Tue, 2 Jan 2024 00:42:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020g1F8097107; Tue, 2 Jan 2024 00:42:01 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:01 GMT Message-Id: <202401020042.4020g1F8097107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: aaa4654adc7e - stable/14 - iommu_gas_remove(): consolidate places where decision is made to keep the entry List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aaa4654adc7e19d679759a2e485ea740cf7b4817 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=aaa4654adc7e19d679759a2e485ea740cf7b4817 commit aaa4654adc7e19d679759a2e485ea740cf7b4817 Author: Konstantin Belousov AuthorDate: 2023-12-22 22:41:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:39 +0000 iommu_gas_remove(): consolidate places where decision is made to keep the entry (cherry picked from commit c0047e7c356953d138194ff71cc510ffe85425f0) --- sys/dev/iommu/iommu_gas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index cfd375c658c3..4b6141b981da 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -693,6 +693,7 @@ iommu_gas_remove_unmap(struct iommu_domain *domain, IOMMU_DOMAIN_ASSERT_LOCKED(domain); if ((entry->flags & (IOMMU_MAP_ENTRY_UNMAPPED | + IOMMU_MAP_ENTRY_RMRR | IOMMU_MAP_ENTRY_REMOVING)) != 0) return; MPASS((entry->flags & IOMMU_MAP_ENTRY_PLACE) == 0); @@ -720,8 +721,6 @@ iommu_gas_remove_locked(struct iommu_domain *domain, KASSERT(start <= entry->start, ("iommu_gas_remove entry (%#jx, %#jx) start %#jx", entry->start, entry->end, start)); - if ((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0) - continue; iommu_gas_remove_unmap(domain, entry, gc); } if (iommu_gas_remove_clip_right(domain, end, entry, *r2)) { From nobody Tue Jan 2 00:42:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF768x7z560Jt; Tue, 2 Jan 2024 00:42:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vF74cg2z3Pq8; Tue, 2 Jan 2024 00:42:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cBKkrItLiO9LSdyMyIBminkI0TNOOGyiP8xIUxfBlHc=; b=ImApL9YRw58M1oFXlJNkJ0IS/GzZP39syYAJyqB8VxP6oL+JPDYkRqrpIIRbb/1PHICgie g8vGwXY7wFC5sde1QZzsbsHhCCVfUDjotFBBK/9UpTc9ny1zm8v3/63Rh65TqU0ORoqtWI 7cSqBNmTl/D0duS2Anbrx6NwtRL8hOdZPk0VfyLPpk755qvioqMrb9R9EmFYYOQ3+08A0H m5nBObA2120FPeLm2+sz78yWNj/lj+mK4iSQlCbKjGVlNcJ6WKVEH1UXn2y8+VJtSOtIEx tzOJHMxtozrpK9TusmSPZVFZdwXqCmPX4cMY4UymhHUj8nnbr9ij2GKZkkRMTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156123; a=rsa-sha256; cv=none; b=b3bGoSS/ItEVcyy7owyi5CeOxH4U+VZhbMCZns46mQubbE3fNwOeammQOMYEkRftipDij2 IFIv3aDoa44J4wDXc65e+x4qO6qTnb0zZPk2kaOGMwooUafCQOHpBXyAhPcHE+OujZhZ3V 7BTY8WNGRXHpf8sRNH4+pd+vnXJnnaN/B3cz89neZVe7F6PDu97IcEL1K+0oYw0YeyjIQk 3tgjUcoXUt65FGWZzIV6va3I9/AH9BvbcOOOzoCdPRPlh1d1xmq82n/kF0L82zcgrrSP/y lUa6BUKKqHLBGQB1aVl+nwvfqnFOo9bE8kXP3zuAlzls7ucnVjzdKSW/aVdffQ== 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=1704156123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cBKkrItLiO9LSdyMyIBminkI0TNOOGyiP8xIUxfBlHc=; b=rgwl44kjDFGVdTNF6hgRtbwZ3DtwqVQSvYtTgMvDadIW+UZLtknC9lBZvq0CLgvtQERMeY znhS3FCXAyJOj1O4AK4XduA0oh8RotxbQOcQM/X4DJ3oWoZK5q77Vdov02I3zGmok+qJ6+ RMlwqUXxYjA54NLd0WwuTnu6mekTDZu8gzxIe8CRbGdooW37izpo7F6rTTTSY4dPK0yYT/ NAvvSkDIrjoiK6Ohc3VIQR3J+C3pQVUNq0gxAVW2coWa0kl7EAnOWDF8yJlk+QDt5kFYvT zRMKrbF64d5Xc7QiQW0BQUFTtpVpYAKHNNjjVNPTavzlQHPOdhFxNvxOV81ZtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vF71CHbzfnK; Tue, 2 Jan 2024 00:42:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020g3xG097167; Tue, 2 Jan 2024 00:42:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020g3xN097164; Tue, 2 Jan 2024 00:42:03 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:03 GMT Message-Id: <202401020042.4020g3xN097164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: dc0bf449c2e8 - stable/14 - ofed: use ANSI C functions definitions in opensm/sm.c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dc0bf449c2e85b17e10a1e179d186662fb8783aa Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dc0bf449c2e85b17e10a1e179d186662fb8783aa commit dc0bf449c2e85b17e10a1e179d186662fb8783aa Author: Konstantin Belousov AuthorDate: 2023-12-26 19:16:49 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:39 +0000 ofed: use ANSI C functions definitions in opensm/sm.c (cherry picked from commit bf7830d79dd02a84225c93130c2dce68e0a541d6) --- contrib/ofed/opensm/opensm/st.c | 71 ++++++++++++----------------------------- 1 file changed, 21 insertions(+), 50 deletions(-) diff --git a/contrib/ofed/opensm/opensm/st.c b/contrib/ofed/opensm/opensm/st.c index c2ee01474c23..7dba30644d61 100644 --- a/contrib/ofed/opensm/opensm/st.c +++ b/contrib/ofed/opensm/opensm/st.c @@ -174,7 +174,7 @@ static int new_size(int size) static int collision = 0; static int init_st = 0; -static void stat_col() +static void stat_col(void) { FILE *f = fopen("/var/log/osm_st_col", "w"); fprintf(f, "collision: %d\n", collision); @@ -182,9 +182,7 @@ static void stat_col() } #endif -st_table *st_init_table_with_size(type, size) -struct st_hash_type *type; -size_t size; +st_table *st_init_table_with_size(struct st_hash_type *type, size_t size) { st_table *tbl; @@ -208,8 +206,7 @@ size_t size; return tbl; } -st_table *st_init_table(type) -struct st_hash_type *type; +st_table *st_init_table(struct st_hash_type *type) { return st_init_table_with_size(type, 0); } @@ -219,8 +216,7 @@ st_table *st_init_numtable(void) return st_init_table(&type_numhash); } -st_table *st_init_numtable_with_size(size) -size_t size; +st_table *st_init_numtable_with_size(size_t size) { return st_init_table_with_size(&type_numhash, size); } @@ -230,14 +226,12 @@ st_table *st_init_strtable(void) return st_init_table(&type_strhash); } -st_table *st_init_strtable_with_size(size) -size_t size; +st_table *st_init_strtable_with_size(size_t size) { return st_init_table_with_size(&type_strhash, size); } -void st_free_table(table) -st_table *table; +void st_free_table(st_table *table) { register st_table_entry *ptr, *next; int i; @@ -276,10 +270,7 @@ st_table *table; }\ } while (0) -int st_lookup(table, key, value) -st_table *table; -register st_data_t key; -st_data_t *value; +int st_lookup(st_table *table, st_data_t key, st_data_t *value) { unsigned int hash_val, bin_pos; register st_table_entry *ptr; @@ -315,10 +306,7 @@ do {\ table->num_entries++;\ } while (0); -int st_insert(table, key, value) -register st_table *table; -register st_data_t key; -st_data_t value; +int st_insert(st_table *table, st_data_t key, st_data_t value) { unsigned int hash_val, bin_pos; register st_table_entry *ptr; @@ -335,10 +323,7 @@ st_data_t value; } } -void st_add_direct(table, key, value) -st_table *table; -st_data_t key; -st_data_t value; +void st_add_direct(st_table *table, st_data_t key, st_data_t value) { unsigned int hash_val, bin_pos; @@ -347,8 +332,7 @@ st_data_t value; ADD_DIRECT(table, key, value, hash_val, bin_pos); } -static void rehash(table) -register st_table *table; +static void rehash(st_table *table) { register st_table_entry *ptr, *next, **new_bins; int i, old_num_bins = table->num_bins, new_num_bins; @@ -376,8 +360,7 @@ register st_table *table; table->bins = new_bins; } -st_table *st_copy(old_table) -st_table *old_table; +st_table *st_copy(st_table *old_table) { st_table *new_table; st_table_entry *ptr, *entry; @@ -416,10 +399,7 @@ st_table *old_table; return new_table; } -int st_delete(table, key, value) -register st_table *table; -register st_data_t *key; -st_data_t *value; +int st_delete(st_table *table, st_data_t *key, st_data_t *value) { unsigned int hash_val; st_table_entry *tmp; @@ -460,11 +440,8 @@ st_data_t *value; return 0; } -int st_delete_safe(table, key, value, never) -register st_table *table; -register st_data_t *key; -st_data_t *value; -st_data_t never; +int st_delete_safe(st_table *table, st_data_t *key, st_data_t *value, + st_data_t never) { unsigned int hash_val; register st_table_entry *ptr; @@ -499,9 +476,7 @@ static int delete_never(st_data_t key, st_data_t value, st_data_t never) return ST_CONTINUE; } -void st_cleanup_safe(table, never) -st_table *table; -st_data_t never; +void st_cleanup_safe(st_table *table, st_data_t never) { int num_entries = table->num_entries; @@ -509,10 +484,9 @@ st_data_t never; table->num_entries = num_entries; } -void st_foreach(table, func, arg) -st_table *table; -int (*func) (st_data_t key, st_data_t val, st_data_t arg); -st_data_t arg; +void st_foreach(st_table *table, + int (*func)(st_data_t key, st_data_t val, st_data_t arg), + st_data_t arg) { st_table_entry *ptr, *last, *tmp; enum st_retval retval; @@ -544,8 +518,7 @@ st_data_t arg; } } -static int strhash(string) -register const char *string; +static int strhash(const char *string) { register int c; @@ -578,14 +551,12 @@ register const char *string; #endif } -static int numcmp(x, y) -void *x, *y; +static int numcmp(void *x, void *y) { return (st_ptr_t) x != (st_ptr_t) y; } -static st_ptr_t numhash(n) -void *n; +static st_ptr_t numhash(void *n) { return (st_ptr_t) n; } From nobody Tue Jan 2 00:42:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vF975fxz560Cw; Tue, 2 Jan 2024 00:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vF95CBjz3Py9; Tue, 2 Jan 2024 00:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jPIe8F4Tbtr/A64dsNCMynMSjIvLJnuqi1DxsfUU0HA=; b=XrgY8d6sG51KDYtp/4HpjVKe/EYhQh5Cxt9j2x8Iu9Szkx5NrY+b20XKLxxHWP8ETldBoU c9iivD41SLEWxLVDgWJIp/iGBPyE1At6oLMcMLdEBLBVDCxF6XLm3o1fYwHSe71D8p+QX+ cAnpibD0PN00RhiXP0osR8pD3Hita6uVkwgn85bGqx0F9IXFeDOcIIDBPwypFtSJcjlGUI SuJCqx7bAF8fSRrbqC/MoKTrwtMdKFde4tBwoq0CqkZ2xUaN9fSB9TrW/d2/L0FhpLNHzd c6y6KTycNuN1c8lpac95oiyg7xOg/WxalHp+p0Z/xKZu0+fwkhqKdLKr0k4bNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156125; a=rsa-sha256; cv=none; b=iCWA2FadvyGQXhR94j9IG2W3RNExwqQhW6v6mK+8/9zMJKMLNGZVVQwY7tWgazIkk++EVo C4Mvb+cf7UdIS2t75mGqzWNG4HRCfKhVhiBP230jmTdKQ9EDEnw52sXpHjkUvITndZ0cQw 8fVB3nZjJsLZY2qT0982FdXue7mBXt1vwr5Jjr4y7eJmVCZatKix9oSJt2mopvhZ4IAXK+ yC0dwBn4diG9vZ0vjiZKWHCWvKgybe9jU7HuZqafVLnIeHMJQ5m+e0azO0zXLVUgeNRC5p fyYoC2GnyWwyM5xT5AplYnkpTjEeloT3g7MULifjXQGXPPNT3d1njP13WwA0Gw== 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=1704156125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jPIe8F4Tbtr/A64dsNCMynMSjIvLJnuqi1DxsfUU0HA=; b=g+WMFLRkJqXUnC2CBIrCUDgP7KpepAiYHI9mW7pGd+l+UHBJKRbRDDv1kWoP9CTf8R7tFi 5v+wPUGi4rZ7exKVaTPJCNmEHTnKxhkEJV9ougQGpM8/2ufhOTysq+p2DI0d6a1xlO8exT DlKlnIebB7CRocGLyior3hXmosLowzx9FVFtkCBHEnY90/be2DlIorFJt4XcdCWjWoKmKz oqyLmdTo6vb3LCQmKC58v/2vJe1Cx+FlAaXaEiv5j+Tg7TDHeG4X730hDsyKg9ZDCpOAjs 9RdQwLoj8yDoErK9i93yG2j1T/AnC/GCx58YpVW0LnZOHDQdyT7h195CMtsdmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vF82KfHzfbn; Tue, 2 Jan 2024 00:42: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 4020g4D2097215; Tue, 2 Jan 2024 00:42:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020g4Ch097212; Tue, 2 Jan 2024 00:42:04 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:04 GMT Message-Id: <202401020042.4020g4Ch097212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 27acf8db5b69 - stable/14 - Convert fsidcmp(9) from macro to inline function List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 27acf8db5b69fb0cdc8f52ecdeb6da2f49ec69f1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=27acf8db5b69fb0cdc8f52ecdeb6da2f49ec69f1 commit 27acf8db5b69fb0cdc8f52ecdeb6da2f49ec69f1 Author: Konstantin Belousov AuthorDate: 2023-12-26 19:39:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:41:39 +0000 Convert fsidcmp(9) from macro to inline function (cherry picked from commit 3334a537ed385e487a47208dab8f36b25643bcdb) --- sys/sys/mount.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 70f4bc2b834e..2c2d4a0a479d 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -52,7 +52,12 @@ typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */ -#define fsidcmp(a, b) memcmp((a), (b), sizeof(fsid_t)) +/* Returns non-zero if fsids are different. */ +static inline int +fsidcmp(const fsid_t *a, const fsid_t *b) +{ + return (a->val[0] != b->val[0] || a->val[1] != b->val[1]); +} /* * File identifier. From nobody Tue Jan 2 00:42:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFl41m7z560H2; Tue, 2 Jan 2024 00:42: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 4T3vFl2gRMz3RXB; Tue, 2 Jan 2024 00:42:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKbpWBydcdRJV4tni626VXaayGvn7CBIBeJ6fplWn8M=; b=IE08tE5hIVym0r7cgyBI7hZQaWUQzhhFO9rrQ28hMKq51NzEkUSQr5DfcTm2NwEtTh8gqG /VZyo8mZqbcziBXsKIGrOIzwepWK80HV/ixElRP94JJjTgYGum5U/k+r1Tesp9CnbdIbb8 dSkN9u04mZ9jelHScTDAbZQQZvsi1c/I7U/61h4r68U8gUIfv3us0yG8M3hAtfmE7F6Uqd GxizX/4n8l0qOzNCTp5cowKUEimV4/n5v6urVKe24w0oMpnEXe8csxQbh8sHO63FS1a9Oz n9+LUOq/Wki6Wfb/XI6y90H3MnSBWPDhrYCvZ5VTV+5YrV7cFQcmBsUabGfKVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156155; a=rsa-sha256; cv=none; b=b55jA6Bv/SiH72SUnhc5KZxyF6jHKrJiuEBPmYim3lheYAVlWdBcTgNzVxqW0qaRHo+hr0 x4GxHEoLH4ABiAO8CQIjddrVP5QF8yRxyup8zz+uwzI/CGXEqzmrPDp5tm/3MqZ3onHjpj RLlZ9nEOe+q2LAWKAtTk/XIWs6OZVbzCmWKVvqzY2rf0CP/Cy9PcP5B4UcCXjF0GJyepAC Zga9t9J2ZQtP0pDSRp7HkT/BDMruW/lp124lk3XeTteD+ORCMEMlhO9xAirYmVzdPnQnY0 GeN+TgK7nN9ajAXlv62aKTW7gx+cE3ZJDAelPirzRv9CtCfwxFb10OZMlZRTuQ== 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=1704156155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKbpWBydcdRJV4tni626VXaayGvn7CBIBeJ6fplWn8M=; b=qpFZUHYj868h4ayEZ+wY5eRFkDjGSOo7curJBXbWfY7+oHUfOj6kA9W6Li8TpMlWERkqG5 o762opM4TdV4amlkXBxAu/hh7/PGWUscbr7f7t7oJ5yTzjkW/im1UQeRQMMzj3TOwJvP0s yr+yGSXRbyZpoIHboADYlnDseMPNGhGefPSGLSghyTjXD8wAtoyxeFIqkLah4RDU7/1fMy vMbxbcfzHcDLrlA/2St8qIxL6gEupJfwugFUwHoblS17xAj2/HbS4YeWHmvzGFHKY74EGV 7SL9cfbTHFu32SkAbDM+FVeJICiqHzTWMJCZzdBv5JZ0KX1V0qndEMNIz4MKLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFl1lxpzg5Y; Tue, 2 Jan 2024 00:42: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 4020gZ4P003765; Tue, 2 Jan 2024 00:42:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gZre003762; Tue, 2 Jan 2024 00:42:35 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:35 GMT Message-Id: <202401020042.4020gZre003762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 34ec24edce61 - stable/13 - iommu: remove leftover sys/cdefs.h includes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 34ec24edce610b2f656ad65c0d37071a26b6de07 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=34ec24edce610b2f656ad65c0d37071a26b6de07 commit 34ec24edce610b2f656ad65c0d37071a26b6de07 Author: Konstantin Belousov AuthorDate: 2023-12-24 14:24:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:12 +0000 iommu: remove leftover sys/cdefs.h includes (cherry picked from commit 6afa2333d2e42e1df67a0fab20f0ede76dff516d) --- sys/dev/iommu/iommu_gas.c | 1 - sys/x86/iommu/intel_drv.c | 1 - sys/x86/iommu/intel_fault.c | 1 - sys/x86/iommu/intel_qi.c | 1 - 4 files changed, 4 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 6088bee9a855..4e0bfb116116 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include #define RB_AUGMENT_CHECK(entry) iommu_gas_augment_entry(entry) #include diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 6aa1c9d090cf..95822f184de9 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include #include "opt_acpi.h" #if defined(__amd64__) #define DEV_APIC diff --git a/sys/x86/iommu/intel_fault.c b/sys/x86/iommu/intel_fault.c index d2760d6db93e..e275304c8d51 100644 --- a/sys/x86/iommu/intel_fault.c +++ b/sys/x86/iommu/intel_fault.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include #include "opt_acpi.h" #include diff --git a/sys/x86/iommu/intel_qi.c b/sys/x86/iommu/intel_qi.c index dc0f09f6ff64..3a3df42c673e 100644 --- a/sys/x86/iommu/intel_qi.c +++ b/sys/x86/iommu/intel_qi.c @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include #include "opt_acpi.h" #include From nobody Tue Jan 2 00:42:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFm53sFz560MD; Tue, 2 Jan 2024 00:42: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 4T3vFm3fNgz3RlZ; Tue, 2 Jan 2024 00:42:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POZAY3Spi/Rcpq7Akbo4ZynxWCPnCpYuEVB0t2WB4BE=; b=KW2tKt3na+yD8HykuIBDoeZmFenMEOK1HRas9xAE2WMsYU57JZbGATOlzW8Pkd0+v2s39T yBzlc8pYtSjz8/fE0SutEkvsF8+9dzt0kLiRPMir3ceVrh3ZrwVqdeTJOPQTFuz4kBbv1I pooOuGzrzag1wmdBuKlxsaJJohyESrab1CyBbZiaFUdEGtiTx96ulgLAYp59xXKKri97oh j5BqwA1IsAPeyL2UPuPngtnPznELYc0uRTZB3Ovc6DMqJ44MstLlS9fDmaF89DMWp9shLb WQbIvUw7k/94bNF+cyawNYTqEfUgXavAImVDxl+9SUBbwrsq84aH61SBOLZZfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156156; a=rsa-sha256; cv=none; b=qp1tGJJt1emOJYhTQCi8lnaigETow73JuQ5vUj2MFIIszNsSHcyG3b92O/b/S3rUO3Lhxy BjAz7ds7RbBHKkDnKqaRohKssZgAQ3Qkem6gta3qXpxthKfqW5wOAMHauLZ+g880OtdzeY uEVPXPvwpNsekPGQS8tK88XbsOvdOF7hqTwPJKgVrcaBeFpgXTWE060eeI1XhuCgPkMqOk lAnyXvoj97vKPGYOBmfRsrfvUqAaHGTjVAuX/Ux4uYNatiMG6GaBDYl4L74ymRpBHNHXzt drwvND/5hWoOSNiQjn4MdAWj9ki1oLM5CoVe8znseVge/1kGQQDiHJpcZ7UvKQ== 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=1704156156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POZAY3Spi/Rcpq7Akbo4ZynxWCPnCpYuEVB0t2WB4BE=; b=SNLCNz8jRFMWUQ1cqJ5/yxwTpDCHmTu+SF4ShVATKJvDEqli0+BI2ilYVeQznZFLc8KCis +xCZC22udKv+ZTr/iaMBG6qJDWDq6zBFiM1M6s848WZGGq8zOGJmhVYYIrhTir28b6wz3R ZusVahbX73TcUPUXhf3a+sFLodYfi1U0xEhY+bHwa7slRYY0+tAXega4N0hWqK1Td9Zdr1 LgOjUhAkHXrkQ/NyRA+Rg1eNWUwHm8D7X1ofiLHiDodu8ebdYCX4X0CuJinFSW9CScLGqT p7uUFmxKEVmRbhb2o2vdkMBqjj194Nipi+1jNe3dUtWI7dvWxNifLpf3jpOR8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFm2lGvzg5Z; Tue, 2 Jan 2024 00:42: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 4020gajW003809; Tue, 2 Jan 2024 00:42:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gafH003806; Tue, 2 Jan 2024 00:42:36 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:36 GMT Message-Id: <202401020042.4020gafH003806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1f831f468433 - stable/13 - dmar(9): style, fix indent List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1f831f4684337f3f90d2e02e72fc05e069849cf2 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1f831f4684337f3f90d2e02e72fc05e069849cf2 commit 1f831f4684337f3f90d2e02e72fc05e069849cf2 Author: Konstantin Belousov AuthorDate: 2023-12-15 11:24:44 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:12 +0000 dmar(9): style, fix indent (cherry picked from commit 7153d5e4bc67732f8258d50ffffa42a09a19b427) --- sys/x86/iommu/intel_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 95822f184de9..b48993fc7969 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -1008,10 +1008,10 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) if (bootverbose) { printf("dmar%d no dev found for RMRR " "[%#jx, %#jx] rid %#x scope path ", - iria->dmar->iommu.unit, - (uintmax_t)resmem->BaseAddress, - (uintmax_t)resmem->EndAddress, - rid); + iria->dmar->iommu.unit, + (uintmax_t)resmem->BaseAddress, + (uintmax_t)resmem->EndAddress, + rid); dmar_print_path(devscope->Bus, dev_path_len, (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); printf("\n"); From nobody Tue Jan 2 00:42:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFp0s6rz560Rr; Tue, 2 Jan 2024 00:42:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vFn4QgGz3RjX; Tue, 2 Jan 2024 00:42:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xp4xX1LvpG6gyc54SuAKDKlj3ftwP/Knzw0sdpO0PC8=; b=tFRdydQLxCx081RKw0WMKXhdPhG5NzepTVsrI+fMoywBfAwllhbULmhkmYVA8Ox2B3KtkE NUAycNg9M+nzMyYWEc7xV1WFh/Ni5JjesWEr8xQNtj1V9m5CeFACdOx+QdhfY/5MlAFPLz 1r4417GOQaikxozFpfm1yiU7oKbhOXocf4t0Kn1i/7I6PVboc8OL30RxcavwMlXrlM/5h+ DijbyDKmwzDtBmg35/yXX5p1vv4twrZ3OhEN16SYEPJq+K3avdAfoH3dn0tSFb7r7wDemE +dZEkMgUno4Zg2OTjM21SwwXW1Bc4+L/ylVRX5FBtCIwl+8DAbzI+QK8SF8hwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156157; a=rsa-sha256; cv=none; b=hQ8O46H1/tZkG7DlKU3Og/jvhdHWxVDHb10k8o1HNsBFf7J7Td1KQUPahplKVMNikz3Ixk wR2qbisusIwCTIKaGVwaR1n6oql+zrrvw8nDVz27qmM8yl6xhJACn46MIqYv5XWdxdRPfv ViskCl6LdOKedMCJJP9RtmQiYQmmy5R1SygLeXAIgICEZf4KxvvhUCT86SPP79VCJRpR+h GOx6bZujktYmqd5dC0f1TucJKdStJgC0L9DdFkILNR2fWrl+jsC7js2PJdALnmrU7F7r07 XqcsU3f8uIJhdps7gYR8+wdiaNsIF6KIesJd4/UdRCm25NrMVQ8mEC9MoB1Mcg== 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=1704156157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xp4xX1LvpG6gyc54SuAKDKlj3ftwP/Knzw0sdpO0PC8=; b=yKhwPx38kZ0S77ZPp6MR/NsiPg7odfmSVoU/BFS/UDvsUyUCEugPfKWZ3IdsNHS/nOI96M Dn31IPpZQ7HI8hVK91rc91SCYYRT/SS6hqN8TazW+8mxpGTmKZXY2mzuLPj8zqX9wK/cOP n+3f7N/MxQZuUcBf5rwddlb6ZoSH1ZNE3uI+chZV/Gy/zfJZNp2ayVSXXT2MZGBaw6fBnE G0ou32bQt5iF/j+QuAkMLZQxw7frQyo+OVZ/miBNPVShJSKU2l9VUlMn/HwYEn/LR/CyIx FKLaS57lfZi/V7iavl1VVHt3vf3rPP/n625fmT0uCj3h1i2eFTmJHJWQeJbzLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFn3TbGzfYw; Tue, 2 Jan 2024 00:42: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 4020gbKZ003853; Tue, 2 Jan 2024 00:42:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gbXN003850; Tue, 2 Jan 2024 00:42:37 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:37 GMT Message-Id: <202401020042.4020gbXN003850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f7d120eca071 - stable/13 - iommu_gas_match_one(): check for underflow List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f7d120eca071bb5b259f3ccce511ea059205b594 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f7d120eca071bb5b259f3ccce511ea059205b594 commit f7d120eca071bb5b259f3ccce511ea059205b594 Author: Konstantin Belousov AuthorDate: 2023-12-26 00:57:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:12 +0000 iommu_gas_match_one(): check for underflow (cherry picked from commit a869643e184a73382ef7939b465fd42785e096d1) --- sys/dev/iommu/iommu_gas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 4e0bfb116116..cc541e748f48 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -329,6 +329,8 @@ iommu_gas_match_one(struct iommu_gas_match_args *a, iommu_gaddr_t beg, start = roundup2(beg, a->common->alignment); if (start < beg) return (false); + if (end < IOMMU_PAGE_SIZE + 1) + return (false); end = MIN(end - IOMMU_PAGE_SIZE - 1, ubound); offset = a->offset; size = a->size; From nobody Tue Jan 2 00:42:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFq0GD0z56089; Tue, 2 Jan 2024 00:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vFp5dwNz3RrQ; Tue, 2 Jan 2024 00:42:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qLp69zZ+1q6bx2vavX9TUdH7ivIW4XMIBDHusfvUjdI=; b=xNIZMLxUcGYVh7wEACZNPo/vKvm0zTFz/X4vZr/jqxz+m3v0N5jdwTyHAtMZwp5wthQRe0 rhstoJ5FiqiAjUfrBAM+zKaLICoYT45df6FlRQQZY+OC/RsqD2snyEAPEbmMN4txW1d00x VmLsI1UF9n1B1Oo59ylP3nS550bzkNUZBFtntmJcc4g7jLbqdFm+TUPexL5Me/IpzNGqbI Q+2DwWZwonj13xPAx0ErfLke66cklk7He9qjCDnK2xUmjaPqYIdKIUOiGpHW8hA5Osjxix FqmF4XcW70QT2krPbvFFQsXTIvS8oyaw6hu2Z4E9wVWU5VropRbWc5iWZzt+qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156158; a=rsa-sha256; cv=none; b=KvwWv6Rht5m6mRTJ3QCGve+tWa50cP3RUvwCyyU6EOXr+PGUdRAA5Bk8ZucdjMLjfy/9HZ h/Ibg7zYWkIezNCzidDNiCR1xlhcMSlctQbz99T9516DEcRc2ggf5vjhU0nJQRBEWbACTQ aFBnYvLEDiBNSBxmGmu1kxj/XI4ot5QapqBIeLqXdmv4LU4dTJHX4No8raOTw4y7UHCsHw A/W6uSJH+qWRK44fFflglUwZQyOgeRH9EAC2qSppYf4WYkwcWp2cj/XCcGRbEJAKgBr4qR OU7oYJrLfsWxXRm0NbMnkACh2+IR080HMs57jpRoJT02uUQ73azzDrEalcepGQ== 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=1704156158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qLp69zZ+1q6bx2vavX9TUdH7ivIW4XMIBDHusfvUjdI=; b=pz52c75pkUp89qEVCV6zJOANlSyxLIl2HcaSm0lvelteQJX1GVYo4Art5TbivXF5uwSP7E LIIiX77zpJxYgVLLwAF5+DHKVDeIHoOknhm8d4cmkhB/5ySeIWmQ1+u9LusLhWr/SsOkac sgQU5N46KkOnvA5Dt1XjB1CVmSVE5OQ1KbKfHh6odYtFXLiws+4bwfU4i6Y2czM98vhaFA aUcMyF/tGfr3R1ZSGWR7r4HDgEgl61xdz5Lgcl4tMSuF+R9N8m+0rqVG5+jXwfwQACOLE/ FNkMYizn+a5v6p8/o6G/Oq1SwDYZFfm/huikaqHs3H+nIJU0ElgLHDobD8sZUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFp4l67zfYx; Tue, 2 Jan 2024 00:42:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020gcVG003898; Tue, 2 Jan 2024 00:42:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gcaR003895; Tue, 2 Jan 2024 00:42:38 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:38 GMT Message-Id: <202401020042.4020gcaR003895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5eb2fcd1f232 - stable/13 - iommu_gas: add ddb 'show iommu_domain' command List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5eb2fcd1f232f992c2c77549e5cb04aff9ae6dae Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5eb2fcd1f232f992c2c77549e5cb04aff9ae6dae commit 5eb2fcd1f232f992c2c77549e5cb04aff9ae6dae Author: Konstantin Belousov AuthorDate: 2023-12-24 14:52:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 iommu_gas: add ddb 'show iommu_domain' command (cherry picked from commit 30ce85ca11433ba05cdbab8aedceaa15a93bd97a) --- sys/dev/iommu/iommu_gas.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index cc541e748f48..72db5ca871ec 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -1031,3 +1031,48 @@ SYSCTL_INT(_hw_iommu, OID_AUTO, check_free, CTLFLAG_RWTUN, &iommu_check_free, 0, "Check the GPA RBtree for free_down and free_after validity"); #endif + +#include "opt_ddb.h" +#ifdef DDB + +#include + +static void +iommu_debug_dump_gas(struct iommu_domain *domain) +{ + struct iommu_map_entry *entry; + + db_printf("iommu_domain %p tree %p iommu %p fl %#x\n", domain, + &domain->rb_root, domain->iommu, domain->flags); + db_printf("iommu_domain %p tree %p\n", domain, &domain->rb_root); + RB_FOREACH(entry, iommu_gas_entries_tree, &domain->rb_root) { + db_printf( + " e %p [%#jx %#jx] fl %#x first %#jx last %#jx free_down %#jx", + entry, (uintmax_t)entry->start, (uintmax_t)entry->end, + entry->flags, + (uintmax_t)entry->first, (uintmax_t)entry->last, + (uintmax_t)entry->free_down); + if (entry == domain->start_gap) + db_printf(" start_gap"); + if (entry == domain->first_place) + db_printf(" first_place"); + if (entry == domain->last_place) + db_printf(" last_place"); + db_printf("\n"); + } +} + +DB_SHOW_COMMAND(iommu_domain, iommu_domain_show) +{ + struct iommu_domain *domain; + + if (!have_addr) { + db_printf("show iommu_domain addr\n"); + return; + } + + domain = (void *)addr; + iommu_debug_dump_gas(domain); +} + +#endif From nobody Tue Jan 2 00:42:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFr1435z560Rv; Tue, 2 Jan 2024 00:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vFq6HHtz3RdV; Tue, 2 Jan 2024 00:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nY/psgeP6TpWQMW9CVCKnXrj9dg2TyH9LV9+Al+pwas=; b=s8Zs6ZGi2eTEd0xJVBFRcxHOxKrCDuDmfnAuo/L+QTr63eiQmMXWY4niM2OrmewbvsDdBs YRJUWZikUYK+3FVzA+dVW+56wXRzoVKDI8NGcn3siUZ/pVbsGEBv6Kg/gLwkTew+ZhncBw +nsQiX1ZKyFmnG9C9vSJ1ZbZVMn8EGNLEFiRYQWCjHQOzY8jEgpDrv3JpBjfXjRNiU7cvb /oKFEHrX2tRds8aWI/ndfcgzHCLpM0xTFJcCELJ7Xf62DrmZCUQlU9jfqGg5guhdMot1Qd AawIHm0ACi+T9XS2+nwNfOMsUmhx4PUpw3mkPcM/USRxBrt7ipVqR/WECG/plA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156159; a=rsa-sha256; cv=none; b=nrZekLjd/ARTehdLoW7skuLpQku4oEWIpxubFDfzaLZQufG9IWeFoJijPPjSaaRF7uJlG8 6mppN/in6HUb1Cm6Cl3lnjsga5iBfV0oSkudfMnypORa2zfRl/9zWvtDfOrDICMjIGhVxk E2dIV0nkmhN1Jrz5lcascifnZHSvYBNoS+kFHPKoY7BjWKCF/yF3jm4HmxLZtjOJfau57J Vve180dl4giskOQjTsPgfJJlBdZ3FB01otuV/8nOeRXqTZdTS8+4nkSjwsX0/PiXmv4zzA utea8T4jsbrrFYKiskqpb6NrUIpoM7tofvIsS+NF33DiqcDscQHEMlleDz8BbA== 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=1704156159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nY/psgeP6TpWQMW9CVCKnXrj9dg2TyH9LV9+Al+pwas=; b=F9mE0uRmHszd5rkaFop1d8bKj/cV2em4zkY+LyG825Oq2xJejI8Xlrs6KsoZc9hTTeSQWl Bm4sMVRRolvgH8XCi8jGjNsl6jbbaJHHgsbCPofr0u+WzEaD9Rbqh+F9Af7zOhdUcWQj94 VdC/xsz0TXlpPdKIn9PdEriutXVmWiT/gMXyym2fzUhkf1JgUGwn+AiR3Q/CcUCCwBtsb0 9ha3J/LMSoSbwEL4ex5a9jvCcI5rneUw9NebCVGepzbdDc6Wkv28rCdC84wXuVJjToRIFj 2xpwQwdC3ds4iLRzcH0tgto1h4qtqdgLspMRQsrsPUOXq+KtVtzc7VvMgpYb3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFq5P0qzfpQ; Tue, 2 Jan 2024 00:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020gdlG003955; Tue, 2 Jan 2024 00:42:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gdXb003952; Tue, 2 Jan 2024 00:42:39 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:39 GMT Message-Id: <202401020042.4020gdXb003952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d4a04574875c - stable/13 - DMAR: add knob to disable RMRR entries installation into domains List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d4a04574875cbbdb8bf2600b4618cd02b781e833 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a04574875cbbdb8bf2600b4618cd02b781e833 commit d4a04574875cbbdb8bf2600b4618cd02b781e833 Author: Konstantin Belousov AuthorDate: 2023-12-23 16:57:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 DMAR: add knob to disable RMRR entries installation into domains (cherry picked from commit 24e38af60a637073b5164837959098acaa3d8daa) --- sys/x86/iommu/intel_ctx.c | 3 +++ sys/x86/iommu/intel_dmar.h | 1 + sys/x86/iommu/intel_drv.c | 10 ++++++++++ 3 files changed, 14 insertions(+) diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index fd17933f9556..8ea4ece26073 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -239,6 +239,9 @@ domain_init_rmrr(struct dmar_domain *domain, device_t dev, int bus, vm_pindex_t size, i; int error, error1; + if (!dmar_rmrr_enable) + return (0); + error = 0; TAILQ_INIT(&rmrr_entries); dmar_dev_parse_rmrr(domain, dev_domain, dev_busno, dev_path, diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index b38407e6fdc9..8343bf1e9f9b 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -318,6 +318,7 @@ extern iommu_haddr_t dmar_high; extern int haw; extern int dmar_tbl_pagecnt; extern int dmar_batch_coalesce; +extern int dmar_rmrr_enable; static inline uint32_t dmar_read4(const struct dmar_unit *unit, int reg) diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index b48993fc7969..4205b08cab4f 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -157,6 +157,8 @@ dmar_count_iter(ACPI_DMAR_HEADER *dmarh, void *arg) return (1); } +int dmar_rmrr_enable = 1; + static int dmar_enable = 0; static void dmar_identify(driver_t *driver, device_t parent) @@ -171,6 +173,8 @@ dmar_identify(driver_t *driver, device_t parent) TUNABLE_INT_FETCH("hw.dmar.enable", &dmar_enable); if (!dmar_enable) return; + TUNABLE_INT_FETCH("hw.dmar.rmrr_enable", &dmar_rmrr_enable); + status = AcpiGetTable(ACPI_SIG_DMAR, 1, (ACPI_TABLE_HEADER **)&dmartbl); if (ACPI_FAILURE(status)) return; @@ -895,6 +899,9 @@ dmar_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) char *ptr, *ptrend; int match; + if (!dmar_rmrr_enable) + return (1); + if (dmarh->Type != ACPI_DMAR_TYPE_RESERVED_MEMORY) return (1); @@ -981,6 +988,9 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) iria = arg; + if (!dmar_rmrr_enable) + return (1); + if (dmarh->Type != ACPI_DMAR_TYPE_RESERVED_MEMORY) return (1); From nobody Tue Jan 2 00:42:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFs39lkz560MJ; Tue, 2 Jan 2024 00:42: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 4T3vFs0W93z3Rdn; Tue, 2 Jan 2024 00:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BbdSfghbRREee04uiOrGAxph966I4mzrxoEPcg+TJqQ=; b=SkUwacGJpFUqZzobOqegjb0yJ3vnX2uLv9L4cepBCUSU3RAyqCK8PjO/uJWxzyjNn2m4fZ SDp+9gmhK05J/2o79BPo1h0eFrrg8RuMJdul+XKOgjJufZla+iOh1F+vUXebDTvncBLjy+ gG34yQwN9lCUqjm56bsD3eM+l99cHfMybXwn78sBu/zMk1eT2O3P5de5V8PXRrtchJv0DM on59pZOYZNy+yY2wnAjb71tdypshVjxHJotzNii1tO45rcUfre8wVFM4mO2a7W+yCb6mU2 eLrnEEucN9g8KOnoTgxjz6+4GNunUzsb41sPMtKSebGurxzL9pB72zt1g8VqDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156161; a=rsa-sha256; cv=none; b=BXEFHTAUIlkiKrIAQi+WK4Dygt8QjEpalnF3GYFW+1qZA3w+vXyPO4oS+RlkQKTLjy+eOZ Ki318JUIB5dFQ1rARO/9mhvAvppxbYraG2mBQxOXI6fO2Ja7yEH7EA2U0ybjVSMrZikoah 33CNTleBTvh7HCaRyZUnPrdtty3MX5RMFVG7CAjNaRjYpqK4l4jVUtr6qjKFNjELstno4i leP0A9d/Dj9ZeROZFX15xZyXKdGK1xp2owBpRSFOncPblIcDxYkzVptS3R1rQBgeadLmOI s1vlzfThI7zNad7kg4q+lSvNGFCpG4YAmlo/28Yn2iQwnO2ZrRmSr5cnnWbZ6w== 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=1704156161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BbdSfghbRREee04uiOrGAxph966I4mzrxoEPcg+TJqQ=; b=IboRDnGQ03j9sgKkvvSchCWpUBnkGlbVwee4dZDEgmgKvcgZEtrSVkplN5rMkNpiklLYkP QGgAKT60nxQHLlcik65k+DpwCZpBCFmhfZN+c9bUxVoMouJPIsykVAN9XkjOD4wSRJSgbv bRH8WknCMRhhrDp67UGTHPJUMwTHrTzr0Ov2983O0W5ZYTsxAzI/L+oId/oSvxjkz9jo3X OH0mXfhOlZjAFRNh1fjScXxVjcrxZHNjAJxKFDlYJMN0UvWWeSEDRZRKuINQJ9OR/lQaDJ okU2Mf2cP5yPruxUIkXj38NL29A+92LGml4TpnAsW9eNUIaaPoD8Q/9eWFUp6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFr6kjYzfc9; Tue, 2 Jan 2024 00:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020geaU004013; Tue, 2 Jan 2024 00:42:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020geg7004010; Tue, 2 Jan 2024 00:42:40 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:40 GMT Message-Id: <202401020042.4020geg7004010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a4b9c406369f - stable/13 - iommu_gas: print entries flags and domains if an overlap detected List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a4b9c406369fabd2a6036904917234189f361fbc Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a4b9c406369fabd2a6036904917234189f361fbc commit a4b9c406369fabd2a6036904917234189f361fbc Author: Konstantin Belousov AuthorDate: 2023-12-23 23:34:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 iommu_gas: print entries flags and domains if an overlap detected (cherry picked from commit 733da1eb947688210bc152656357ecafbd172bb7) --- sys/dev/iommu/iommu_gas.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 72db5ca871ec..25e13aad2291 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -125,9 +125,11 @@ iommu_gas_cmp_entries(struct iommu_map_entry *a, struct iommu_map_entry *b) b, (uintmax_t)b->start, (uintmax_t)b->end)); KASSERT(a->end <= b->start || b->end <= a->start || a->end == a->start || b->end == b->start, - ("overlapping entries %p (%jx, %jx) %p (%jx, %jx)", - a, (uintmax_t)a->start, (uintmax_t)a->end, - b, (uintmax_t)b->start, (uintmax_t)b->end)); + ("overlapping entries %p (%jx, %jx) f %#x %p (%jx, %jx) f %#x" + " domain %p %p", + a, (uintmax_t)a->start, (uintmax_t)a->end, a->flags, + b, (uintmax_t)b->start, (uintmax_t)b->end, b->flags, + a->domain, b->domain)); if (a->end < b->end) return (-1); From nobody Tue Jan 2 00:42:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFt644rz560MP; Tue, 2 Jan 2024 00:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vFt1bfzz3RkR; Tue, 2 Jan 2024 00:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AexA4yjvCDdvVd/rAX1B5tSlHgsbTR3vljlA0lH3P+c=; b=auE3St3J4QVIY1CaVRpXYutHO9cA+gYecr/6GbiulKaUiD97Ygp7KBeNy9Q+6Np8mugY7W ja2kvTSnxXZ+XWkhbif4mJGT3G/rarXxpR9yaFitqF9wF0GJmeuldYODxZKOg1uXO7/I4R iq7J5ZU7Et+33rUvUjJJx65DXVgNRGi6Uct4kGJfr6EtwY4aBiVRaoMwF0SugfXOaHfPYo ssq5RNhp5OdNqp10RE4EiLWxAJ5D74UkNLLkvufYx0vGTZoZ5Vztnvi4sZEr/YzRTVJlCI mKOmt1+y3yaD/GQLPjgcUHuinLjLRL2qM8OcJ0C+c5DIRySrJUwWA8L/ut+DLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156162; a=rsa-sha256; cv=none; b=m+KOe9i2L4tkb/m2DgYOEEtV5WQp+0stqU/L7/NsYTcLXpIopV7moxqmWTLwelgqvZrbyz 559W5Wf2kGKAR63L13WYcKsYmwhAwfqcjTC9dPvaeel3s1siCEpjYl7oi+xXyq8iPAHw4s TJvCyRkwhmkuBDSe5eIHuKtM+q2gdvt8SKk3/0gy4ESto/vPU1QsYfL7Mdzp2lDHiGLn1X ek+pwEd2T/s2NdGEq9QcWXFVnDz13Xd3XGdmfngNR+8fjVYlGGulCW09H1AULVF08vZzIe Ul6zLZGabO3JY536/MF62qAdtCGzrGcZ5wmqV6FaGCvFgnZwnJyjhmA3DI2N1g== 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=1704156162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AexA4yjvCDdvVd/rAX1B5tSlHgsbTR3vljlA0lH3P+c=; b=R324ABZXbtNepBnspyClP9yx9naR5hoScwxmeNqVzKeCptUK1JLotP1U+ogYlJWmfWXeQL reO2fRDjCXmNtOIMR8c5stkcW8scsVeKt3v6rkjeUTxJ9mftaAavYRjsUgoWyIe2hPYjXz xTmZqEk4BnxIbzuKcT43RslRs0xd6CJJTAMZp1rLGlX0/LeQcy5ovSouHVfMczA/Mu38Ak yu9pjldsqCeyReKcEAv+goPfXzvJgAvn21kAtiU/v+ZpllManP//exBdy8l/yxpKG4fn/U qJfmFhCW0G6l3EpeKKsZUP6XMTpr4MP/0h/wtSrQe828n5hKnp6XnRi+Hpzi+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFt0j5Jzfx9; Tue, 2 Jan 2024 00:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4020ggR9004070; Tue, 2 Jan 2024 00:42:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gffT004067; Tue, 2 Jan 2024 00:42:41 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:41 GMT Message-Id: <202401020042.4020gffT004067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3934342846e6 - stable/13 - iommu_gas: zero fake on-stack map entry used in iommu_gas_remove_clip_left() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3934342846e67940045c74a732fd3de124672efb Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3934342846e67940045c74a732fd3de124672efb commit 3934342846e67940045c74a732fd3de124672efb Author: Konstantin Belousov AuthorDate: 2023-12-24 00:59:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 iommu_gas: zero fake on-stack map entry used in iommu_gas_remove_clip_left() (cherry picked from commit cb1d664b0073232173072231cb386f0216ee596b) --- sys/dev/iommu/iommu_gas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 25e13aad2291..e178acf60478 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -655,6 +655,7 @@ iommu_gas_remove_clip_left(struct iommu_domain *domain, iommu_gaddr_t start, * asserted that start is below domain end, entry should * exist. Then clip it if needed. */ + bzero(&fentry, sizeof(fentry)); fentry.start = start + 1; fentry.end = start + 1; entry = RB_NFIND(iommu_gas_entries_tree, &domain->rb_root, &fentry); From nobody Tue Jan 2 00:42:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFv6XTjz560DK; Tue, 2 Jan 2024 00:42: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 4T3vFv2tWVz3S3M; Tue, 2 Jan 2024 00:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zdznI8XdpIUjsDJTf1RQPhtAwhkqtRXvi075TL6KnG4=; b=QbW/RsPXgCt3BSaiMard8ddKS8d1wj3m6eSF2q4zhHJSeVIIgPA54DRX2lij4Jmi1F6cYh Yu75opmAdGu0PpAs2NGe8YA2Zy7pSy8d6fGke6d66UAzxgBn09cpvkvvs5Ax3dKtFhFU5D R8Alp+OCMmBmUxyemN4DQy0lVuC9uk/XnyffjtRUHgDBAowlvffJSzUJmOtZFH184BUZtR x/9JzNOOpouH8LHHE71f3smSreXSkUT1aaARENlKCvk+6+J6diStwBnzLSHtkZm9x1E5xQ 38Xy3yl3Faa4QHLoRedz2RlO2JKgSvqiG12pdlpG+J8+Az1qHrN72fyUnppr/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156163; a=rsa-sha256; cv=none; b=a2Nh4jmJhezOgOlNqgMfQ0SVwVSQYGkmbu4GELXn0d2m2RTrH+BhFdk+Q7AWNBkLniqsAE NshL0v37QY2/EWu+5MyzB0Qeocn+Fo7XU77l189GIIGCyTvfyjcRTgYX3RvggZe8u59hfH 0UQSUO3djH1Mbk0Td0QS9VHRp5FZhIHDub+CJmJNM8+yXaUlw6Wk3Sl39qi1h331nC3hBk 1/rNfrMwGmIahV1KcGWWv+945pVAxhTBSVftTILmMQOHS79TFa1OH7NYZLDPzdvIVvfP6h BIpXQZy1gEEvPZimMYKBXCS/q4Gxs6HLi7pC/pESYUDefNZFO3DV09g60a/XoA== 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=1704156163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zdznI8XdpIUjsDJTf1RQPhtAwhkqtRXvi075TL6KnG4=; b=j1wXf9Nh2oU57wwiy6I0xtkdiDGW+9QVJBrIFwvKHsHegW6anvic57/nMTqqMs0FpoUkil pK3IxAXtW0CyBRXhH8QJAbk1nj4fVluPrlo2p1XUEs+z8BUXjwGNfnCDrQn7J6MWcqSqM7 k5H+AweKecGbHEvxOCE/z/CdzBkliqHAGQffTTeRRQf4bGm0D537tK2VcfZGzti3u3Bvo5 EyLbyo9UXXhdP78ghIY2L5MFTOa93EuYYBbluNiNK+/5na6T4JIwf4TiWI7TamCQZxIHxl l0SR/hg3mqJfPGfEB2WEzX97N+Qn2sugpUF0Tcyt+Dz06Tz6MyD8LIt4zl4o8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFv1hVQzfcB; Tue, 2 Jan 2024 00:42: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 4020ghlh004125; Tue, 2 Jan 2024 00:42:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020ghsv004122; Tue, 2 Jan 2024 00:42:43 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:43 GMT Message-Id: <202401020042.4020ghsv004122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 9ffa317779e3 - stable/13 - IOMMU: add GAS map entry flag IOMMU_MAP_ENTRY_FAKE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9ffa317779e3a05b8609302f84bae1d59947b779 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9ffa317779e3a05b8609302f84bae1d59947b779 commit 9ffa317779e3a05b8609302f84bae1d59947b779 Author: Konstantin Belousov AuthorDate: 2023-12-22 22:39:27 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 IOMMU: add GAS map entry flag IOMMU_MAP_ENTRY_FAKE (cherry picked from commit a59c252903e81f46c74903ce5b1cf0960927dbcc) --- sys/dev/iommu/iommu_gas.c | 6 +++++- sys/dev/iommu/iommu_gas.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index e178acf60478..dc850747512a 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -123,7 +123,8 @@ iommu_gas_cmp_entries(struct iommu_map_entry *a, struct iommu_map_entry *b) a, (uintmax_t)a->start, (uintmax_t)a->end)); KASSERT(b->start <= b->end, ("inverted entry %p (%jx, %jx)", b, (uintmax_t)b->start, (uintmax_t)b->end)); - KASSERT(a->end <= b->start || b->end <= a->start || + KASSERT(((a->flags | b->flags) & IOMMU_MAP_ENTRY_FAKE) != 0 || + a->end <= b->start || b->end <= a->start || a->end == a->start || b->end == b->start, ("overlapping entries %p (%jx, %jx) f %#x %p (%jx, %jx) f %#x" " domain %p %p", @@ -536,11 +537,13 @@ iommu_gas_alloc_region(struct iommu_domain *domain, struct iommu_map_entry *entr if (entry->end >= domain->end) return (EINVAL); + entry->flags |= IOMMU_MAP_ENTRY_FAKE; next = RB_NFIND(iommu_gas_entries_tree, &domain->rb_root, entry); KASSERT(next != NULL, ("next must be non-null %p %jx", domain, (uintmax_t)entry->start)); prev = RB_PREV(iommu_gas_entries_tree, &domain->rb_root, next); /* prev could be NULL */ + entry->flags &= ~IOMMU_MAP_ENTRY_FAKE; /* * Adapt to broken BIOSes which specify overlapping RMRR @@ -658,6 +661,7 @@ iommu_gas_remove_clip_left(struct iommu_domain *domain, iommu_gaddr_t start, bzero(&fentry, sizeof(fentry)); fentry.start = start + 1; fentry.end = start + 1; + fentry.flags = IOMMU_MAP_ENTRY_FAKE; entry = RB_NFIND(iommu_gas_entries_tree, &domain->rb_root, &fentry); if (entry->start >= start || diff --git a/sys/dev/iommu/iommu_gas.h b/sys/dev/iommu/iommu_gas.h index 8069c5a15a34..cdc4bd22d60c 100644 --- a/sys/dev/iommu/iommu_gas.h +++ b/sys/dev/iommu/iommu_gas.h @@ -50,6 +50,7 @@ #define IOMMU_MAP_ENTRY_UNMAPPED 0x0010 /* No backing pages */ #define IOMMU_MAP_ENTRY_REMOVING 0x0020 /* In process of removal by iommu_gas_remove() */ +#define IOMMU_MAP_ENTRY_FAKE 0x0040 /* disable assert in cmp() */ #define IOMMU_MAP_ENTRY_READ 0x1000 /* Read permitted */ #define IOMMU_MAP_ENTRY_WRITE 0x2000 /* Write permitted */ #define IOMMU_MAP_ENTRY_SNOOP 0x4000 /* Snoop */ From nobody Tue Jan 2 00:42:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFx74cqz560MS; Tue, 2 Jan 2024 00:42: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 4T3vFx4RQ1z3S5t; Tue, 2 Jan 2024 00:42:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WeQ3muhqm3rBitWCtAGdlU7bwPpExpYa3krfvwTYv9Y=; b=HGaYGRnbrgmF+ORTsCg8jjBXFi62FurUtACWq1iL7/i3sWk83Blytk2Sb+VNOR7L6xmHty 9rCeFwFqX5xo34A1WIU0skyxbz9HGQmP5iHX/jLliolVrnQxf1u1QJ/Z2CBnQSVGVUHKh2 AeKdFeib4E3BHcUw4BfP+ZwIrivYyxcV6POVwXtasnlqtRWTJmekVjttUGbxv/dg+1KD6r 2GvCNlwSKBg+iy0PhX6M/bz9seB4o2EAU/3gQI8zUoJwYrArq2dDyGojAySYNdcSQA4/Ui /DHqkccoOUAfnTTYQ+RmdoIZAW+VbqjxhteXuhSPSHiK//9lb4CV0Pkb5Py6qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156165; a=rsa-sha256; cv=none; b=tGwoAyXVdz/iDwYr8SLOWqOGU2HqHgBD2nueHgikAMm6FCzZWQTCyiEaHKH4YsXK4hwcS1 +VzjWfssvF47B2nRlZgt6uk5pNpaj9G8kBu4KYYjt7+8212rkACVDGu7IdECD61WJ7Wl+P 8RBvepDCN+sX8Il9uNPL+hZ1B16RyFDwnbFYZpc9YoeH4TIizvh9VFo+YrV4uFh1p1d7Yq QVugNjflEA3asyibORDrN5X3P8eB0DpkP6l6gpfCJ/0SIuutfdjQWMTLHe4swZBX2LxPO+ FDQOCzbA9zwk6jtxs6RMTUZmLo51QzdShbEqa/Scgp81uaJl5pUIQ097HeKL3g== 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=1704156165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WeQ3muhqm3rBitWCtAGdlU7bwPpExpYa3krfvwTYv9Y=; b=P7PhL7nIe3IUwf0zxaskVfCpHJjdveh/3yWXeEXocyGF6ZkEZfSJCUhpq7gYXtn8M/9ETx meFGdWa6LcxXtrRgZK8LGUtvlLdGX6vYVuqbyHdKN1QWHRs2hRTEBevyhAukpSMx4cvpi9 TvpLHx9L/Sw94uHpRwZlJC30FITut2a2q1fDv5qB08zth3G6YPgjdjmKdpWn2il7J1qsJw SSptx6lrUAVPnqAgONMVXofmlPD8VQPLStM6qY8UM+uUNJyufDPWCdrGkKdEoR1vpraMib 9UjuGp7mep/W6Cv2ghFcog3aWfrr7bZGgmAC10ULXoT0E1jhmK2BT2MNNgS2yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFx3Xl8zfpR; Tue, 2 Jan 2024 00:42: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 4020gjI9004233; Tue, 2 Jan 2024 00:42:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gjow004230; Tue, 2 Jan 2024 00:42:45 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:45 GMT Message-Id: <202401020042.4020gjow004230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 41478582cb2d - stable/13 - iommu_gas: make placeholder entry at the start of the GAS zero size List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 41478582cb2df925d1065c1b996294db3eafd583 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=41478582cb2df925d1065c1b996294db3eafd583 commit 41478582cb2df925d1065c1b996294db3eafd583 Author: Konstantin Belousov AuthorDate: 2023-12-22 22:19:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 iommu_gas: make placeholder entry at the start of the GAS zero size (cherry picked from commit f59128775636846574e092c68e849a56f74577e6) --- sys/dev/iommu/iommu_gas.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 9a74854f926f..cfd375c658c3 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -118,7 +118,7 @@ static int iommu_gas_cmp_entries(struct iommu_map_entry *a, struct iommu_map_entry *b) { - /* Last entry have zero size, so <= */ + /* First and last entries have zero size, so <= */ KASSERT(a->start <= a->end, ("inverted entry %p (%jx, %jx)", a, (uintmax_t)a->start, (uintmax_t)a->end)); KASSERT(b->start <= b->end, ("inverted entry %p (%jx, %jx)", @@ -244,25 +244,17 @@ iommu_gas_init_domain(struct iommu_domain *domain) KASSERT(RB_EMPTY(&domain->rb_root), ("non-empty entries %p", domain)); - /* - * The end entry must be inserted first because it has a zero-length gap - * between start and end. Initially, all augmentation data for a new - * entry is zero. Function iommu_gas_augment_entry will compute no - * change in the value of (start-end) and no change in the value of - * free_down, so it will return false to suggest that nothing changed in - * the entry. Thus, inserting the end entry second prevents - * augmentation information to be propogated to the begin entry at the - * tree root. So it is inserted first. - */ end->start = domain->end; end->end = domain->end; end->flags = IOMMU_MAP_ENTRY_PLACE | IOMMU_MAP_ENTRY_UNMAPPED; RB_INSERT(iommu_gas_entries_tree, &domain->rb_root, end); begin->start = 0; - begin->end = IOMMU_PAGE_SIZE; + begin->end = 0; begin->flags = IOMMU_MAP_ENTRY_PLACE | IOMMU_MAP_ENTRY_UNMAPPED; RB_INSERT_PREV(iommu_gas_entries_tree, &domain->rb_root, end, begin); + iommu_gas_augment_entry(end); + iommu_gas_augment_entry(begin); domain->start_gap = begin; domain->first_place = begin; @@ -739,7 +731,8 @@ iommu_gas_remove_locked(struct iommu_domain *domain, #ifdef INVARIANTS RB_FOREACH(entry, iommu_gas_entries_tree, &domain->rb_root) { - if ((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0) + if ((entry->flags & (IOMMU_MAP_ENTRY_RMRR | + IOMMU_MAP_ENTRY_PLACE)) != 0) continue; KASSERT(entry->end <= start || entry->start >= end, ("iommu_gas_remove leftover entry (%#jx, %#jx) range " From nobody Tue Jan 2 00:42:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFw68bKz560HF; Tue, 2 Jan 2024 00:42: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 4T3vFw3Pntz3S3g; Tue, 2 Jan 2024 00:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Yc4gvPJfIxc2l8d9i84EOH4yYtIlSZC/BQAmnW4amg=; b=yrU3ziLha3OtNvI4ktTarCkWbo7A5LKLwg7/Ky4kE79oxMTHjU6hL+sxQfGMdCeGQGWwFL xegXUe/kYdhSRBSivNE3qN2bWC2ZvxTTRtFe3PS2m7mJgtWKwp0FanvEcAiJuZYr+TvUQD xQ66OkCqt/f0G8xSdfLQP5d1AzyL+GGyp1p3hLlX1TBizXZwZ38dS12qeYvzjZMEMws9pl BJ+WgSINdtAnm0DafbEF8Xr3dqmOh7qlcSWd8acHmgouqaN5iXW5ojozouBsfX5Z3qcHl0 yPk1iGIoclliye6DZ9xv5d8p3X/KXKXFZyi19+7LUydE2KWdFJKxCiKoOq/Z7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156164; a=rsa-sha256; cv=none; b=lJLQShihg/354mTzc/cvhWwAdCNeUAfQLbI4qTxx7G6IvXX9lKSKDMNhhC0OXFb6flIpOS n3OROFoSWBQ1l9XKFQHhLS2QULWR8TquLl+lRRyFrcBJZ9y4RjwtvRcO+bMpOSD5o+fN6r yGaW2ngBUgZwudxYRUvifjLKt5oi4nbyiKRc1QOMuI7zHH+m0+C8MCo9SV6BAyi99xX9NI DZplR9PkU37DtnnVQBYtj33KxAgouJzLGs2T/CBVbuA73xcXIeEPlbUbipG+BTPKUGFxgI QO0v65EJJ7l3IegcZSFqKb2hGS/4W39JeNi272KtqbSMLj/CPzHPHi00ZIZ9vA== 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=1704156164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Yc4gvPJfIxc2l8d9i84EOH4yYtIlSZC/BQAmnW4amg=; b=KpfrpxpFDF9f0MreU+pG4+8NmhInpcTJPAVuIFd36D/UVuhKXkC3eRr6r/fuLVb66Hsxce sul16crOseYjJgj3GxhDTHoE6Ne76LQL2xkoW5M144uQEXXzSIy4yn12AlF5IzxtF3biGt mp15L2cj3A1M3BwSmkqHjzT8x2eT+i7EIb2vR/YMYVmBy/wQgF+UcGHJQO6jQ9H2FZDyEz ENON1rGWf45N5Vw3y432ZkkllkmhogO0376Jkrjufw0kQeO0i+ZGX7zXoknuLtplD0eN9a p/OoJgEhpTZAwfwkvlFHZK3uvzkgzvWPd30dJpRcSsx384jlEbNPbrA17GUyZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFw2WFszfv6; Tue, 2 Jan 2024 00:42: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 4020giCT004163; Tue, 2 Jan 2024 00:42:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gijP004159; Tue, 2 Jan 2024 00:42:44 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:44 GMT Message-Id: <202401020042.4020gijP004159@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 9f39aabec76c - stable/13 - iommu: add iommu_gas_remove_locked() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9f39aabec76ca4152cd6bbd808b816b80cf6b421 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9f39aabec76ca4152cd6bbd808b816b80cf6b421 commit 9f39aabec76ca4152cd6bbd808b816b80cf6b421 Author: Konstantin Belousov AuthorDate: 2023-12-14 02:41:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 iommu: add iommu_gas_remove_locked() (cherry picked from commit 273b4de3462d7825ebe4ace7a1930f098311287f) --- sys/dev/iommu/iommu_gas.c | 83 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 26 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index dc850747512a..9a74854f926f 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -708,28 +708,20 @@ iommu_gas_remove_unmap(struct iommu_domain *domain, TAILQ_INSERT_TAIL(gcp, entry, dmamap_link); } -/* - * Remove specified range from the GAS of the domain. Note that the - * removal is not guaranteed to occur upon the function return, it - * might be finalized some time after, when hardware reports that - * (queued) IOTLB invalidation was performed. - */ -void -iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, - iommu_gaddr_t size) +static void +iommu_gas_remove_locked(struct iommu_domain *domain, + iommu_gaddr_t start, iommu_gaddr_t size, + struct iommu_map_entries_tailq *gc, + struct iommu_map_entry **r1, struct iommu_map_entry **r2) { - struct iommu_map_entry *entry, *nentry, *r1, *r2; - struct iommu_map_entries_tailq gc; + struct iommu_map_entry *entry, *nentry; iommu_gaddr_t end; - end = start + size; - r1 = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); - r2 = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); - TAILQ_INIT(&gc); + IOMMU_DOMAIN_ASSERT_LOCKED(domain); - IOMMU_DOMAIN_LOCK(domain); + end = start + size; - nentry = iommu_gas_remove_clip_left(domain, start, end, &r1); + nentry = iommu_gas_remove_clip_left(domain, start, end, r1); RB_FOREACH_FROM(entry, iommu_gas_entries_tree, nentry) { if (entry->start >= end) break; @@ -738,11 +730,11 @@ iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, entry->start, entry->end, start)); if ((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0) continue; - iommu_gas_remove_unmap(domain, entry, &gc); + iommu_gas_remove_unmap(domain, entry, gc); } - if (iommu_gas_remove_clip_right(domain, end, entry, r2)) { - iommu_gas_remove_unmap(domain, r2, &gc); - r2 = NULL; + if (iommu_gas_remove_clip_right(domain, end, entry, *r2)) { + iommu_gas_remove_unmap(domain, *r2, gc); + *r2 = NULL; } #ifdef INVARIANTS @@ -755,13 +747,52 @@ iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, entry->start, entry->end, start, end)); } #endif +} + +static void +iommu_gas_remove_init(struct iommu_domain *domain, + struct iommu_map_entries_tailq *gc, struct iommu_map_entry **r1, + struct iommu_map_entry **r2) +{ + TAILQ_INIT(gc); + *r1 = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); + *r2 = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); +} +static void +iommu_gas_remove_cleanup(struct iommu_domain *domain, + struct iommu_map_entries_tailq *gc, struct iommu_map_entry **r1, + struct iommu_map_entry **r2) +{ + if (*r1 != NULL) { + iommu_gas_free_entry(*r1); + *r1 = NULL; + } + if (*r2 != NULL) { + iommu_gas_free_entry(*r2); + *r2 = NULL; + } + iommu_domain_unload(domain, gc, true); +} + +/* + * Remove specified range from the GAS of the domain. Note that the + * removal is not guaranteed to occur upon the function return, it + * might be finalized some time after, when hardware reports that + * (queued) IOTLB invalidation was performed. + */ +void +iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, + iommu_gaddr_t size) +{ + struct iommu_map_entry *r1, *r2; + struct iommu_map_entries_tailq gc; + + iommu_gas_remove_init(domain, &gc, &r1, &r2); + IOMMU_DOMAIN_LOCK(domain); + iommu_gas_remove_locked(domain, start, size, &gc, &r1, &r2); IOMMU_DOMAIN_UNLOCK(domain); - if (r1 != NULL) - iommu_gas_free_entry(r1); - if (r2 != NULL) - iommu_gas_free_entry(r2); - iommu_domain_unload(domain, &gc, true); + iommu_gas_remove_cleanup(domain, &gc, &r1, &r2); } int From nobody Tue Jan 2 00:42:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vFz1Kzlz560Kj; Tue, 2 Jan 2024 00:42: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 4T3vFy5fF6z3RtH; Tue, 2 Jan 2024 00:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3xqa7DawWHDk+Iy5OlYYJncJU3HLKIW9JAD1lceLXxM=; b=jKQ70UwSyo9KZWT06ig29t2w/Fd690yNZjzQlL3FI+kaG5WsTmtJt0iV1/94VrzrCLLbZc oORrFGirunkpiN3GorZ5l0vT3SK6s+v0hVSpawvn+uq191ENMSezoeLZ4KMwssosTX+xrZ FrH/oDTudHn+Qf3Ny1Se1cHO9Oj/BBSMUfCEZgJxV8n+0RoaykhJ+Pj/eACy3eilDMtvl4 7rLUjVnqtuFHoAlk56sNnq08AjEdJOBh4jfzPfo/tXaGdVTNZxLIosODpf7jcYIIfuaASa DD+46c+T1IUjCtOoyLozSCKOwpwFfGCqBlY9rCnciE61/U9iUHR2m+X2hTthUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156166; a=rsa-sha256; cv=none; b=P6whRwkqWXh5lm+N9b4PyFPHNhE0aBvYLccJcIQgGliwc2gsBW2Xk4Jd4qNmaiL+CxVZsU KzK8IeUgApPZvolWnKalQHMXF9PgnciINyz6+2c5ydbu+evEfoZQJ+ksLvnmTzpWqbpAms Fr6xozf0Z7ZFEfydH6yRhhHoezXW127ZC90goVyFVhf8VeVEUhttqaQs01nyMRqynlVjnx t2gxIPsBPT6wtKKj376OPBBSrbc5ZvApWheX8b4zgNl25VCQcQgEWpwv9s+jW+zmh3yhhO bD1BFQRRo8qYl03t2d6nH29xtyXwZ67POgXLdGVljZYER5JaT78Oq4iFweHfAQ== 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=1704156166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3xqa7DawWHDk+Iy5OlYYJncJU3HLKIW9JAD1lceLXxM=; b=RyFx8XXM7KykyDPlqL0shrk8Pt0qHNM53VZnwW+azhIB5GTbbadd2aEMiIZicoZ73g6CuM x9Dj36COMpyw6jBQa2qoQcNJhDDJfZjcnGQdtutJDUuqw6K5BFndNClb0LhAYrgqSVy2dD Nc4/UUGTCGBxyyUCjZGdeaVMcNbYC8FsMsx7HSDEqKjENA1j3OpKMSneViTiIQr4Sg/JwO cvhiFNbg4XBQyZbJ3V0Umw3Egs76mTum0cuw9deG3+jSzEmY3Mokj1/2/gieu5CQJJxM7b yAbGTIwcilq/RLrzR/CWToKVtZBd2zPATQPuWtmJy/tMuwhWa6HajqiBIDyBww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFy4dTKzfcC; Tue, 2 Jan 2024 00:42: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 4020gkaR004293; Tue, 2 Jan 2024 00:42:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gkJ6004290; Tue, 2 Jan 2024 00:42:46 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:46 GMT Message-Id: <202401020042.4020gkJ6004290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a7f3fe764cfb - stable/13 - iommu_gas_remove(): consolidate places where decision is made to keep the entry List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a7f3fe764cfbdec5aea4102414edaec721b1c33e Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a7f3fe764cfbdec5aea4102414edaec721b1c33e commit a7f3fe764cfbdec5aea4102414edaec721b1c33e Author: Konstantin Belousov AuthorDate: 2023-12-22 22:41:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 iommu_gas_remove(): consolidate places where decision is made to keep the entry (cherry picked from commit c0047e7c356953d138194ff71cc510ffe85425f0) --- sys/dev/iommu/iommu_gas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index cfd375c658c3..4b6141b981da 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -693,6 +693,7 @@ iommu_gas_remove_unmap(struct iommu_domain *domain, IOMMU_DOMAIN_ASSERT_LOCKED(domain); if ((entry->flags & (IOMMU_MAP_ENTRY_UNMAPPED | + IOMMU_MAP_ENTRY_RMRR | IOMMU_MAP_ENTRY_REMOVING)) != 0) return; MPASS((entry->flags & IOMMU_MAP_ENTRY_PLACE) == 0); @@ -720,8 +721,6 @@ iommu_gas_remove_locked(struct iommu_domain *domain, KASSERT(start <= entry->start, ("iommu_gas_remove entry (%#jx, %#jx) start %#jx", entry->start, entry->end, start)); - if ((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0) - continue; iommu_gas_remove_unmap(domain, entry, gc); } if (iommu_gas_remove_clip_right(domain, end, entry, *r2)) { From nobody Tue Jan 2 00:42:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vG01yN5z560MX; Tue, 2 Jan 2024 00:42: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 4T3vFz6vR1z3S8V; Tue, 2 Jan 2024 00:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xtlrtSqzqCja8yRh0BQSOUx4+2UXyqs3OcxCFjAiIKE=; b=Yqf4SuEWMskXaPb98K7Qvkr7Mt1Z7JKRqTnm5dvNYIY2HJ5w5FFrv0EybocjnSojx8NlMb G9Ew7hUNZIKVPBaRPVcfHy04GU+6zzst7Abc7JJsc4/o4WlQGlwzvJyerT4A29cEnwGG0h dM//lfpXvuxhxc9Q1PGiOubh9LQXLCmknzmDoeebDYNqn6PDqeqZWaiAN/fHt/y2SVDBFn kTgAvMiPyIVWmBh2S5c1li4WuWruhUfZeJbsxSm5FkX14S8nJxvXLklOMPQc8RYJw2GkP3 CJTQHo3grn+H4BlhJZqI8FrIS4bSr8U6IzArkVbI2rgEb6J16NRO1eFJprYR1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156168; a=rsa-sha256; cv=none; b=xmnsUBKyhgANrG8KJ0q+foJFJ72yGetWQDgxF8P0oOFtLnpyzeEO53vLGpxjOzZzjiFeMf 5E/K5n9cHiaeKqJYMAPFpDqsiQIYkKlL3uK8k2ZWknmQNIT7Wyl9sq9NLAKon38my6QA4J Vi1i7PJMoYgEnA1n3xD1qp0cJNrDcugj7YadHlS+r7axtrUGQnbyHnt5PJnjQqBR0BRPok NGHmlVHHyuoOTDxFgn8hNscc1bsXrS2WtBgSpacJW6fkZaLoLejFZhHGh2GYbph9YoKJpD ZI3kZqjfDrUKlJCVhcrJvlHXVs9oa/XntJMvzicN6vzh4aFFCXM9hwLf8wQfKQ== 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=1704156168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xtlrtSqzqCja8yRh0BQSOUx4+2UXyqs3OcxCFjAiIKE=; b=OEnKRAR2s8ycc/XuO6Eo6HKzr4g1OOIlPyf7fwtCn4LG5FFjDt29KssIDPvLS1d8G6xV9R ArxE2d6Gq/Fl5095iYOVakBJ7XbJkYOU7kibxNrrBizP+a+mC5zTUoP98zlSoKYiPu1J5s 4khabrWLSDlcxknjtH4pdik91/UJF/OTseErzbT+1GTC8e7J8Mwm5aOp9pvLllkM1pp+xy d/XcNCa4c3xOsqPiO8FOJlUxvtnnNcrX0y12FXg3M5KMG3XpuibQ9aGxOzh+TnA98KCyrL nWAPYy9Li0En2DKLmcz0F5Iz+wSJ00gtDdr0fVoE6p9lOkxFTlAMxNYuS8kn2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vFz5h1Lzg0H; Tue, 2 Jan 2024 00:42: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 4020glj7004344; Tue, 2 Jan 2024 00:42:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020glWc004341; Tue, 2 Jan 2024 00:42:47 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:47 GMT Message-Id: <202401020042.4020glWc004341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d850efed891a - stable/13 - ofed: use ANSI C functions definitions in opensm/sm.c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d850efed891a89d2522895455ef5d9945cdd7af1 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d850efed891a89d2522895455ef5d9945cdd7af1 commit d850efed891a89d2522895455ef5d9945cdd7af1 Author: Konstantin Belousov AuthorDate: 2023-12-26 19:16:49 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:13 +0000 ofed: use ANSI C functions definitions in opensm/sm.c (cherry picked from commit bf7830d79dd02a84225c93130c2dce68e0a541d6) --- contrib/ofed/opensm/opensm/st.c | 71 ++++++++++++----------------------------- 1 file changed, 21 insertions(+), 50 deletions(-) diff --git a/contrib/ofed/opensm/opensm/st.c b/contrib/ofed/opensm/opensm/st.c index c2ee01474c23..7dba30644d61 100644 --- a/contrib/ofed/opensm/opensm/st.c +++ b/contrib/ofed/opensm/opensm/st.c @@ -174,7 +174,7 @@ static int new_size(int size) static int collision = 0; static int init_st = 0; -static void stat_col() +static void stat_col(void) { FILE *f = fopen("/var/log/osm_st_col", "w"); fprintf(f, "collision: %d\n", collision); @@ -182,9 +182,7 @@ static void stat_col() } #endif -st_table *st_init_table_with_size(type, size) -struct st_hash_type *type; -size_t size; +st_table *st_init_table_with_size(struct st_hash_type *type, size_t size) { st_table *tbl; @@ -208,8 +206,7 @@ size_t size; return tbl; } -st_table *st_init_table(type) -struct st_hash_type *type; +st_table *st_init_table(struct st_hash_type *type) { return st_init_table_with_size(type, 0); } @@ -219,8 +216,7 @@ st_table *st_init_numtable(void) return st_init_table(&type_numhash); } -st_table *st_init_numtable_with_size(size) -size_t size; +st_table *st_init_numtable_with_size(size_t size) { return st_init_table_with_size(&type_numhash, size); } @@ -230,14 +226,12 @@ st_table *st_init_strtable(void) return st_init_table(&type_strhash); } -st_table *st_init_strtable_with_size(size) -size_t size; +st_table *st_init_strtable_with_size(size_t size) { return st_init_table_with_size(&type_strhash, size); } -void st_free_table(table) -st_table *table; +void st_free_table(st_table *table) { register st_table_entry *ptr, *next; int i; @@ -276,10 +270,7 @@ st_table *table; }\ } while (0) -int st_lookup(table, key, value) -st_table *table; -register st_data_t key; -st_data_t *value; +int st_lookup(st_table *table, st_data_t key, st_data_t *value) { unsigned int hash_val, bin_pos; register st_table_entry *ptr; @@ -315,10 +306,7 @@ do {\ table->num_entries++;\ } while (0); -int st_insert(table, key, value) -register st_table *table; -register st_data_t key; -st_data_t value; +int st_insert(st_table *table, st_data_t key, st_data_t value) { unsigned int hash_val, bin_pos; register st_table_entry *ptr; @@ -335,10 +323,7 @@ st_data_t value; } } -void st_add_direct(table, key, value) -st_table *table; -st_data_t key; -st_data_t value; +void st_add_direct(st_table *table, st_data_t key, st_data_t value) { unsigned int hash_val, bin_pos; @@ -347,8 +332,7 @@ st_data_t value; ADD_DIRECT(table, key, value, hash_val, bin_pos); } -static void rehash(table) -register st_table *table; +static void rehash(st_table *table) { register st_table_entry *ptr, *next, **new_bins; int i, old_num_bins = table->num_bins, new_num_bins; @@ -376,8 +360,7 @@ register st_table *table; table->bins = new_bins; } -st_table *st_copy(old_table) -st_table *old_table; +st_table *st_copy(st_table *old_table) { st_table *new_table; st_table_entry *ptr, *entry; @@ -416,10 +399,7 @@ st_table *old_table; return new_table; } -int st_delete(table, key, value) -register st_table *table; -register st_data_t *key; -st_data_t *value; +int st_delete(st_table *table, st_data_t *key, st_data_t *value) { unsigned int hash_val; st_table_entry *tmp; @@ -460,11 +440,8 @@ st_data_t *value; return 0; } -int st_delete_safe(table, key, value, never) -register st_table *table; -register st_data_t *key; -st_data_t *value; -st_data_t never; +int st_delete_safe(st_table *table, st_data_t *key, st_data_t *value, + st_data_t never) { unsigned int hash_val; register st_table_entry *ptr; @@ -499,9 +476,7 @@ static int delete_never(st_data_t key, st_data_t value, st_data_t never) return ST_CONTINUE; } -void st_cleanup_safe(table, never) -st_table *table; -st_data_t never; +void st_cleanup_safe(st_table *table, st_data_t never) { int num_entries = table->num_entries; @@ -509,10 +484,9 @@ st_data_t never; table->num_entries = num_entries; } -void st_foreach(table, func, arg) -st_table *table; -int (*func) (st_data_t key, st_data_t val, st_data_t arg); -st_data_t arg; +void st_foreach(st_table *table, + int (*func)(st_data_t key, st_data_t val, st_data_t arg), + st_data_t arg) { st_table_entry *ptr, *last, *tmp; enum st_retval retval; @@ -544,8 +518,7 @@ st_data_t arg; } } -static int strhash(string) -register const char *string; +static int strhash(const char *string) { register int c; @@ -578,14 +551,12 @@ register const char *string; #endif } -static int numcmp(x, y) -void *x, *y; +static int numcmp(void *x, void *y) { return (st_ptr_t) x != (st_ptr_t) y; } -static st_ptr_t numhash(n) -void *n; +static st_ptr_t numhash(void *n) { return (st_ptr_t) n; } From nobody Tue Jan 2 00:42:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vG15R0Sz560Qq; Tue, 2 Jan 2024 00:42: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 4T3vG10FWdz3SC5; Tue, 2 Jan 2024 00:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704156169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y+20Nkw4XYoqKMIN5vdu0Y7QTucPsW4N2qSDwWJzQxA=; b=jnqGX+7fEWZSLqAgp3mQIkvzhYgXej3AIQm90qo1vDfVFvZuMThQVEia6rZVdW8g1NdCq/ CO+2IeJLnmRva1pqu5a4w2nI1S/ejQRjtMUXkzthyaVzlMhdDSiaHjHg7v0m4rtpKPTR/l lT4wsnA3g4+1CYsy41Roq7B+coNdiIF05B0o/r69x6ybxDqmbzTFnFAC7djr+e4QXVFhE8 QiYmIwYf/Dk7qSwRbihvxdlqH5atH/uroGZYt8QSEOGU4uG6bxTUJqoU0wFIgmZakonCe6 FnUJVJ9xCBJvyMA1S+yaF2KTmazatQGMIIQAaZlXCQb7jb8G0nRUtatCB1Qi7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156169; a=rsa-sha256; cv=none; b=TuPOzY5MUZItUj922/NpBa57oKGNXD6S128R09+ZLOW9XOF4HpiXmU3QrhIp66FsZYGWqy wosvEkf7T7nRFWKtv0+gW/uZEBmY6gifojmTMvf5wiL8CtrC3vtD7IBBAKT3wwUSu/7Aip xl/txY0JlZFb0S+6IzC+KWBaIy+33SF00DfzpxXwzaD/+fLljmn6fUYY6oCwOSfha7nYoq qMN8bREPC3oXeHXk106NfVpV86rCIh0qb6FLQNO2wuLuQOPbeRbsS0mQtWKfpdM+ASxR4J 6Y8bClQyIxPpN1ndA8IlTjtgATyiq2PIaUvFmItoYktAfmx4Z68ME/UlNMsMdA== 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=1704156169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y+20Nkw4XYoqKMIN5vdu0Y7QTucPsW4N2qSDwWJzQxA=; b=XvZrKQrYIqfS5ZrdqPvEbsCWUZ4yFZr1gJnYvxfKZifbz6EhbRN+x4Fyi8OQ4JFz6kliJ9 Zg2rpib6EGmJV9yjKVegNd0pyvrHirmaGbcZSC5uvkNHMCDeBSSkNgzmohA1p2p6FpjWT0 NqK6m4FzcRfoZDz4vEp0zfaXjijLdWCsiPNL+ro/95908wg1+i+NhFD5ZOCLZZYM6xHH3b ixXWQk4guShlKs+o0BQbDyphNCq6Unt/IbDvCNjI3EYWMwhKtq9cCIXZaCSrMZuGLM2/WX ZCjLPxqlpTlPfuV9XE093MMJ7CBoMNpoeul/3x/AKBdRMsbLU5/A9g3O1HkXFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vG06TdNzfcD; Tue, 2 Jan 2024 00:42: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 4020gmfG004400; Tue, 2 Jan 2024 00:42:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020gm6f004397; Tue, 2 Jan 2024 00:42:48 GMT (envelope-from git) Date: Tue, 2 Jan 2024 00:42:48 GMT Message-Id: <202401020042.4020gm6f004397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ce248ddce72f - stable/13 - Convert fsidcmp(9) from macro to inline function List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ce248ddce72fea1a6069434336bd4e4a144ab30c Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ce248ddce72fea1a6069434336bd4e4a144ab30c commit ce248ddce72fea1a6069434336bd4e4a144ab30c Author: Konstantin Belousov AuthorDate: 2023-12-26 19:39:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-02 00:42:14 +0000 Convert fsidcmp(9) from macro to inline function (cherry picked from commit 3334a537ed385e487a47208dab8f36b25643bcdb) --- sys/sys/mount.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 9c1862956812..bb8719d8a4f1 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -51,7 +51,12 @@ typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */ -#define fsidcmp(a, b) memcmp((a), (b), sizeof(fsid_t)) +/* Returns non-zero if fsids are different. */ +static inline int +fsidcmp(const fsid_t *a, const fsid_t *b) +{ + return (a->val[0] != b->val[0] || a->val[1] != b->val[1]); +} /* * File identifier. From nobody Tue Jan 2 01:12:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwk06Dyz562nW; Tue, 2 Jan 2024 01:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vwj6F22z3ZhL; Tue, 2 Jan 2024 01:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGlTci68IUFW2uq2d+5jyHxeQfwKTbBzjpGcfOby/9A=; b=iSlUYhwQNwUEBxHbhs6uPyjjyXE91dgfUQV2QWDlp86+vGJFioPRRb2KUf2GReVav0pGDl 8Icvh4UVHVD90nDwYMvS6cxY4CSXX4/hiJWR35iueOPc8xIo5IwmOQMQ67NnbuWC4tq5lj rb73fHDpfG8mfvC+p4bCSEh/129+D+aMaWytZ1teKvdJeLc/BprR+0Q/Wt/uNM/pnDiM6c l8aLNGFclqoI63BBE8sXYkl9RgGz24dOYKgDdUnQRQz9u/ed2TZ8xcP4LikT0ErFxhVV7N vIXtEV81xuBZhIVGuak/MeOwMhXpNXeYt2beVddFWAKeXmWCFlBjVOypDWhDZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157973; a=rsa-sha256; cv=none; b=rwc+CzTBT/DQxKJEnVAhgj6nvgyIqmt2tL4BBOGu9/JxELnh4noXc4yfdcKvb3EjzZHEAx Wm8lfotKxSoOdPJbYgEs8J+NmCY63lMloNPdSDbFhEfINBMqH+TfSX/bv2RMIDFH/yuxFY jFeouXLowOhNJ+JsK3xK344MfEGIja0yIsu7hDpcJbGhcGsMLyPuSeSjac5VOMEoWI74dm Uq1tV7b1loVoiM4OkEerg+49fCb1XfzIdNeUQm3sYzXkTwrK0l87cjyMD6+ZqUz7c6A718 v1Qn5fGzIAGGll8jwgvntBWn29ynnS5Dua79sQ7sgBh/IBcTqwF3AzEpUkxSIA== 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=1704157973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGlTci68IUFW2uq2d+5jyHxeQfwKTbBzjpGcfOby/9A=; b=qJ0FWY3XoaNTebZEXXnIipzQYR6pqKoqiQXy00wGLqsXOrukVy9gCE+B6K5amyiKOIF1G3 bUx13s+njESqgZJ8pVjIE8or1sLAjxSJT6tBr/2+KpHSOwfVI+MjIp2ubYer31SeWKX4Nu pgSjdYCx5C7jkVPxqi2HKFkM8V0Ym0k/jLb53t7rzfn3EUocfYcQLg+jgWU8ss6s0hmVzB IqoqK0cjb8zW92dDTCVUasahhgxrLWcMk0sm/LAVieF/q1vPTpywhBAxJm/k15wwtEzQMD hVRRJ+0t8N5yGnTSnkmJ9oJ1i8xXpx8+6JOxsGsZLpgu2D1sAHIcaSLH8mUQeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwj5JQbzgRC; Tue, 2 Jan 2024 01:12: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 4021Cr41054512; Tue, 2 Jan 2024 01:12:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021Cr4b054509; Tue, 2 Jan 2024 01:12:53 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:12:53 GMT Message-Id: <202401020112.4021Cr4b054509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 163e0066ff1e - stable/13 - ath: Handle errors from copyout() in ath_rate_fetch_node_stats() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 163e0066ff1e28c83a53ad2ab5c2804daa662c1b Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=163e0066ff1e28c83a53ad2ab5c2804daa662c1b commit 163e0066ff1e28c83a53ad2ab5c2804daa662c1b Author: Mark Johnston AuthorDate: 2023-12-26 01:35:43 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:44 +0000 ath: Handle errors from copyout() in ath_rate_fetch_node_stats() MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43096 (cherry picked from commit 711880597c6c4ac971eb2aba6a2dadb5933d38dd) --- sys/dev/ath/ath_rate/sample/sample.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c index 39ca5d1e9f31..8e70699f708d 100644 --- a/sys/dev/ath/ath_rate/sample/sample.c +++ b/sys/dev/ath/ath_rate/sample/sample.c @@ -1433,11 +1433,13 @@ ath_rate_fetch_node_stats(struct ath_softc *sc, struct ath_node *an, const HAL_RATE_TABLE *rt = sc->sc_currates; struct ath_rateioctl_tlv av; struct ath_rateioctl_rt *tv; - int y; + int error, y; int o = 0; ATH_NODE_LOCK_ASSERT(an); + error = 0; + /* * Ensure there's enough space for the statistics. */ @@ -1478,9 +1480,13 @@ ath_rate_fetch_node_stats(struct ath_softc *sc, struct ath_node *an, */ av.tlv_id = ATH_RATE_TLV_RATETABLE; av.tlv_len = sizeof(struct ath_rateioctl_rt); - copyout(&av, rs->buf + o, sizeof(struct ath_rateioctl_tlv)); + error = copyout(&av, rs->buf + o, sizeof(struct ath_rateioctl_tlv)); + if (error != 0) + goto out; o += sizeof(struct ath_rateioctl_tlv); - copyout(tv, rs->buf + o, sizeof(struct ath_rateioctl_rt)); + error = copyout(tv, rs->buf + o, sizeof(struct ath_rateioctl_rt)); + if (error != 0) + goto out; o += sizeof(struct ath_rateioctl_rt); /* @@ -1488,18 +1494,22 @@ ath_rate_fetch_node_stats(struct ath_softc *sc, struct ath_node *an, */ av.tlv_id = ATH_RATE_TLV_SAMPLENODE; av.tlv_len = sizeof(struct sample_node); - copyout(&av, rs->buf + o, sizeof(struct ath_rateioctl_tlv)); + error = copyout(&av, rs->buf + o, sizeof(struct ath_rateioctl_tlv)); + if (error != 0) + goto out; o += sizeof(struct ath_rateioctl_tlv); /* * Copy the statistics over to the provided buffer. */ - copyout(sn, rs->buf + o, sizeof(struct sample_node)); + error = copyout(sn, rs->buf + o, sizeof(struct sample_node)); + if (error != 0) + goto out; o += sizeof(struct sample_node); +out: free(tv, M_TEMP); - - return (0); + return (error); } static void From nobody Tue Jan 2 01:12:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwl0q2Vz563FV; Tue, 2 Jan 2024 01:12: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 4T3vwl00K5z3ZKw; Tue, 2 Jan 2024 01:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1ULlm2JlI6fxHtOGdbaNmO5caqfwmBEPg/DqFXX/Hw=; b=jj0xsU1DoY/NiMwds1H57LHH8EvMQxZ0PORtngI1GS+IHyJybYLVjXLE3HGYWJvqPl13XL uxkEbRzMDJM72lOITs8WotHyS4iK7DCtyFky7DZ1WIl7o9fwCm4KdtERqtTPQd7GeQTDpH COCnw301e0peIVHqP4+DlBbk3BtgCrE3k9AdKjYWNzX/2TKt9iUt8G+zH7oSZRseW91F3+ tGmWfCTCVvJeQxux2JM2Pl8ZbDjY+LwX1JvRfYy12ecqMKIT0H2fTwwEgDj+TbCd4SbD1y 1E88pLVfhrc5TrCPg3jBpTm4uQzYUrc1s0OJd+4AdMk9SQjSNiSTxPzV1jg+5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157975; a=rsa-sha256; cv=none; b=j4s8FNh7e+KsM1o0OuPgs2SnWatw7nmsWwNmfORbzcKaHb/TR06dQHK7CitADmjZm+ei5/ l9bnN3cMA2qTVIc7PayQXRrxh0cvv12zEEaQSpOV8bYQJvwEsYSDpLI5EuSxGhMtdsog6S 2BTzvJh4DjYwjqe5sQLm/gy/oZwb9P/KMKCis2lNruI42jmLXGAoyPb5t0geMtT9UuvQXx s9EUCIjLq+OKksI26Qup5WMxrZ3iAKMYh5vIgqWLxXwQmKZGUK8tD/cvTTnQWozXSa8P8D DyKKija+Io6YVeft7g7wJT+AJY4IqL6Fwu9FBz1G7IkIkvcox/OX6hx6YwGwMw== 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=1704157975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1ULlm2JlI6fxHtOGdbaNmO5caqfwmBEPg/DqFXX/Hw=; b=bszaRXtLKWRqBI8t0Hgh5fAs99QltnQppAZloFekW72F8vBhwdInDQfzWY/1WjHkYxUOgz 7hY+UgjYFiByazbpvLoXuDzPJPXGZExvrM7wHqNEXwp2h15OtwvhWkWcE/GR1q4PPmyYsM lxStWhHolS254POKHpDTmlZkdai45FTTYXZxMzX9JsGIKApyAwZNiL8GUmw2AKMELNxauj miLX4fuANTcFI1O3zupxdsYSMsY3dDkzBQvjYTDP3u4otHWWf0pUbB1bIyFjZvliqYMwL9 NAxILnD59hBGMp8uIVK+USbD6Hc34O447UeRJCqrqJuKNojimgICfOBcn3KbUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwk68wkzgTc; Tue, 2 Jan 2024 01:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021CsFL054566; Tue, 2 Jan 2024 01:12:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021CsC8054563; Tue, 2 Jan 2024 01:12:54 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:12:54 GMT Message-Id: <202401020112.4021CsC8054563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 573b117f6e30 - stable/13 - freebsd32: Report errors when copying out oldlenp in __sysctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 573b117f6e30b8839bec4a778c37d60d88d980f5 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=573b117f6e30b8839bec4a778c37d60d88d980f5 commit 573b117f6e30b8839bec4a778c37d60d88d980f5 Author: Mark Johnston AuthorDate: 2023-12-26 01:37:32 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:44 +0000 freebsd32: Report errors when copying out oldlenp in __sysctl This matches the native implementation's behaviour. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43101 (cherry picked from commit 81eb7baa69e983fe159d254a4ed47d9c00396801) --- sys/compat/freebsd32/freebsd32_misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 65b7ddf83e3d..cd6a4c2dc3df 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2543,9 +2543,9 @@ freebsd32___sysctl(struct thread *td, struct freebsd32___sysctl_args *uap) uap->new, uap->newlen, &j, SCTL_MASK32); if (error) return (error); - if (uap->oldlenp) - suword32(uap->oldlenp, j); - return (0); + if (uap->oldlenp != NULL && suword32(uap->oldlenp, j) != 0) + error = EFAULT; + return (error); } int From nobody Tue Jan 2 01:12:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwm2vkDz563FX; Tue, 2 Jan 2024 01:12: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 4T3vwm100Kz3ZhV; Tue, 2 Jan 2024 01:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xQ68K076c8dr/GCNQwgHuuL7EzUJ4cz7R35hILXM81E=; b=do6R3E8SpKqGfg0mrBjc3kSY8j930Co3KRl9tHNoSUb/hiegXaTfPLaclnMXFi19FWZohY 8weTlBTxF/B1D9kE1e9dyguS8J9JOmaoEFLD49hRNuq+K9tIjzqJn5s4Zja9CuQQCBDubZ Zb5d4r6TAwar6jgtLY/dykB0vxC4m7+1uJ0xPc05AnYi6WRCVFsM7DneTgSfy+UnhYh8Y9 kvP+OdOFDJ7qIg1OYxGxjT9rIAPFlE0pymbb9EPgp7jFFeivqAYmNVn1rHOrF0JMEw4nE8 NhjIXzU/38aMkSgwbHqGNyBiciWMSX1YKWtoPlceac+RZ6FaNvqxnL1zCZWiDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157976; a=rsa-sha256; cv=none; b=ApAVhC06YWAmQSUEZCF1BFhj1WiKIWGe4e1b0hE3iYtYVRnEh0YC33y2B0oOIzF06YwK10 2ZzFAyzak3X7Zo6Lyuj6XkjzaBx+hyEI/v/Fiqj3MBpOX8+Ytr6bzCGozz2FIK1Tqh4/td TJUmhPcERqgDdeZIWzvqrUQqIEAeWy4PBV5liitdREd7DBOm92a2pUDoEFcE6jdSAr/hEt LABEZi42dktFzJZI+fUO+Empdi9Fsi7U/EgjnArOkUFaQsURm/V3vWmye25GnE3iA1b06R oFrjDggVCGl3LhGnHx5Q5O53X2AM3RbnopqKyRmX2A/BVfm3dM6LK3EdQvTY6Q== 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=1704157976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xQ68K076c8dr/GCNQwgHuuL7EzUJ4cz7R35hILXM81E=; b=nDDrXGSmhbS5OF6UtsrCp0a8TjDH1u9ijov4K/Sf0+AxYUqwFwOyRk0BNI56ma+8CyTtBd U4pfsbOqTJEezfH5jBXxbOS0IlK4htJdUNt8t0loacDoit24uYIsXbc6X8AkhuQIy4fVOF qBP9c7o0TqE6xi2cBw3RIxLXjERHsr6CJh+c0/25ksydOROqn5TB0LK2n3Ztx+Bzg5VqmJ /kETxc/e/cXdFJvFVmrKClZqs7988sfXOYFpqUEXeF5BaYqiwcucxfYVNOV9fsncrMeyR/ w/tLg26WdUX8zL5GxGQFF6cHtiGdbBRYmVIcPKdij8j9tDDxt5B6ezgB2wsFvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwm05XWzgc1; Tue, 2 Jan 2024 01:12: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 4021Ctvh054617; Tue, 2 Jan 2024 01:12:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021Ctlq054614; Tue, 2 Jan 2024 01:12:55 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:12:55 GMT Message-Id: <202401020112.4021Ctlq054614@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7db5449ec5b1 - stable/13 - hid: Handle errors from copyin() in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7db5449ec5b176036b28c9b91a91ea2d09f37566 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7db5449ec5b176036b28c9b91a91ea2d09f37566 commit 7db5449ec5b176036b28c9b91a91ea2d09f37566 Author: Mark Johnston AuthorDate: 2023-12-26 01:37:49 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:44 +0000 hid: Handle errors from copyin() in ioctl handlers If copyin() fails, the driver will proceed blindly with a zeroed buffer, which is not what we want. In preparation for annotating copyin() with __result_use_check, start checking for errors. Reviewed by: wulf MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43102 (cherry picked from commit e452fa70d50761b5fe5f19c3c93c107be116728c) --- sys/dev/hid/hidraw.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c index 103f73bb3750..c47a1445f7af 100644 --- a/sys/dev/hid/hidraw.c +++ b/sys/dev/hid/hidraw.c @@ -673,14 +673,17 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, sc->sc_state.quiet = true; mtx_unlock(&sc->sc_mtx); if (error != 0) - return(error); + return (error); buf = HIDRAW_LOCAL_ALLOC(local_buf, hgd->hgd_maxlen); - copyin(hgd->hgd_data, buf, hgd->hgd_maxlen); - /* Lock newbus around set_report_descr call */ - mtx_lock(&Giant); - error = hid_set_report_descr(sc->sc_dev, buf, hgd->hgd_maxlen); - mtx_unlock(&Giant); + error = copyin(hgd->hgd_data, buf, hgd->hgd_maxlen); + if (error == 0) { + /* Lock newbus around set_report_descr call */ + mtx_lock(&Giant); + error = hid_set_report_descr(sc->sc_dev, buf, + hgd->hgd_maxlen); + mtx_unlock(&Giant); + } HIDRAW_LOCAL_FREE(local_buf, buf); /* Realloc hidraw input queue */ @@ -737,8 +740,11 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, default: return (EINVAL); } - if (id != 0) - copyin(hgd->hgd_data, &id, 1); + if (id != 0) { + error = copyin(hgd->hgd_data, &id, 1); + if (error != 0) + return (error); + } size = MIN(hgd->hgd_maxlen, size); buf = HIDRAW_LOCAL_ALLOC(local_buf, size); error = hid_get_report(sc->sc_dev, buf, size, NULL, @@ -775,11 +781,13 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, } size = MIN(hgd->hgd_maxlen, size); buf = HIDRAW_LOCAL_ALLOC(local_buf, size); - copyin(hgd->hgd_data, buf, size); - if (id != 0) - id = *(uint8_t *)buf; - error = hid_set_report(sc->sc_dev, buf, size, - hgd->hgd_report_type, id); + error = copyin(hgd->hgd_data, buf, size); + if (error == 0) { + if (id != 0) + id = *(uint8_t *)buf; + error = hid_set_report(sc->sc_dev, buf, size, + hgd->hgd_report_type, id); + } HIDRAW_LOCAL_FREE(local_buf, buf); return (error); From nobody Tue Jan 2 01:12:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwn53Txz563CG; Tue, 2 Jan 2024 01:12: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 4T3vwn21bXz3ZWc; Tue, 2 Jan 2024 01:12:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/pX2PfffrPeBZJlMHQQtGVBioEhiqG6r8DXwslvh/g=; b=rF3DYc6vHawBFnLurzCDYNhZR7CSozzDvtWObqeG0vX2WV1Hdz+BhiqtkMJkXHoAYCjWPk yeOtbgoi3a02/ytprxU7Na2uzoWiUCoQVMWxSBJGSesoKqXZugCB0fwi6eby2JdoqqUvpQ 1e+ask0c5tH1IZS4/1O3o9Ktki9LRF/YOk6SGw2ZEOmTUxregpP3xr+QXl8laW57iXqe6w FnBTlCrA3CWMyY/UcsdHZ4bMJ2smBMcRFHMHTuoj+f0DJm4t6/6knlEaUfjivxOge3RZAj b7198hUUk2W74LNgcj6OXl70aKktvWmUwgnKQZ/P2jzdzYv5I5Eg/QvlMSD7NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157977; a=rsa-sha256; cv=none; b=Ty0tSL6BbeOmwEqyeHk9P9pIl3FP+cbQMUfTpt//iieQtjtBZjfwV7USPPuwadsiwrOeCs 6MbycgJi7Yt8Lcry/3L+ZibxV7UG+WWZEf1ux7Y5yNmFb4kmoDxdKPVWGhm/hrEnwjL8DR vx6uW+JpCBQXpKEv0hm8F/ll5IvQ1wdRO0AU/04BhmY3/9wukX8Vnuaa2SpKmNG4ha5rns hTUUXFU9xRQ73AR2vIqCjAepXnzTsLhUq4Z48ly722ij3fvTtBhpH6jwtWIF1GOfAf7+TK Rt/gsWMvItmWJQXSe3ieT+A+xQI0Z4xgBh1lN/CcTHs1z4C9VoDlDZ+ZVXsNJA== 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=1704157977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/pX2PfffrPeBZJlMHQQtGVBioEhiqG6r8DXwslvh/g=; b=Obsyu9K6eV/n1I1Xc0SZSIDyu0xjn3t5D3YbObCHrJMEqnH3Qoj1/YFYKBNaBE7BpI/kcD 8anzyp2TGuNkb8FPS6XtajfizCQt0oV02kMm6Z0vC5TX1v399dFat01zhk9/m4xi7n6VUG 0UCpnQBwLlRseOkAWRCWLWr/HZG7qRKGwq7YPELiPu030f7BCzMcJKRH+y14XAJaq0ALlD wEsuQ0dHXwBKR7ODetxAx65iw1/CrxNg/pmmBLo0/ndzZ0YyjQmoONRPQnwTwc+LelMYNR 40JmOvkH3T3fTK0/dfmAle81a6ehPHkvOuCg2NGuncf7n2EqecZiYVgbBSY3FQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwn17WRzgdj; Tue, 2 Jan 2024 01:12: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 4021Cv41054677; Tue, 2 Jan 2024 01:12:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021CvuY054674; Tue, 2 Jan 2024 01:12:57 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:12:57 GMT Message-Id: <202401020112.4021CvuY054674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 517a81cdb40b - stable/13 - uhid: Check for errors from copyin() in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 517a81cdb40b5d17774d97a1ee1135a35a97be07 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=517a81cdb40b5d17774d97a1ee1135a35a97be07 commit 517a81cdb40b5d17774d97a1ee1135a35a97be07 Author: Mark Johnston AuthorDate: 2023-12-26 01:38:04 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:44 +0000 uhid: Check for errors from copyin() in ioctl handlers This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: wulf MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43103 (cherry picked from commit b2caed2f8d699d6dc59ecf8810d945cdea148c44) --- sys/dev/usb/input/uhid.c | 14 ++++++++------ sys/dev/usb/input/uhid_snes.c | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index 8ead8f0b86d4..f6447dd0d3c6 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -634,9 +634,10 @@ uhid_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, return (EINVAL); } if (id != 0) - copyin(ugd->ugd_data, &id, 1); - error = uhid_get_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + error = copyin(ugd->ugd_data, &id, 1); + if (error == 0) + error = uhid_get_report(sc, ugd->ugd_report_type, id, + NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); break; case USB_SET_REPORT: @@ -661,9 +662,10 @@ uhid_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, return (EINVAL); } if (id != 0) - copyin(ugd->ugd_data, &id, 1); - error = uhid_set_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + error = copyin(ugd->ugd_data, &id, 1); + if (error == 0) + error = uhid_set_report(sc, ugd->ugd_report_type, id, + NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); break; case USB_GET_REPORT_ID: diff --git a/sys/dev/usb/input/uhid_snes.c b/sys/dev/usb/input/uhid_snes.c index 4931c6239b39..b46454867cf3 100644 --- a/sys/dev/usb/input/uhid_snes.c +++ b/sys/dev/usb/input/uhid_snes.c @@ -359,9 +359,10 @@ uhid_snes_ioctl(struct usb_fifo *fifo, u_long cmd, void *data, int fflags) return (EINVAL); } if (id != 0) - copyin(ugd->ugd_data, &id, 1); - error = uhid_get_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + error = copyin(ugd->ugd_data, &id, 1); + if (error == 0) + error = uhid_get_report(sc, ugd->ugd_report_type, id, + NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); break; case USB_SET_REPORT: @@ -386,9 +387,10 @@ uhid_snes_ioctl(struct usb_fifo *fifo, u_long cmd, void *data, int fflags) return (EINVAL); } if (id != 0) - copyin(ugd->ugd_data, &id, 1); - error = uhid_set_report(sc, ugd->ugd_report_type, id, - NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); + error = copyin(ugd->ugd_data, &id, 1); + if (error == 0) + error = uhid_set_report(sc, ugd->ugd_report_type, id, + NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); break; case USB_GET_REPORT_ID: From nobody Tue Jan 2 01:12:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwp4Yjsz56354; Tue, 2 Jan 2024 01:12: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 4T3vwp3BCfz3ZZ6; Tue, 2 Jan 2024 01:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AAlrxEcyBR7S0WdSiTbmNo7QBY+vQEzTk5PD0PVZSwI=; b=St6FPq3XSYntdF+FiZOovB7hGg1c/GgphoPt60xDNpXJXo7QVVY3q+osyp7t0qhzED9iqv uMUY4EV1QvK4V21/QawS1t+2CdURTpUNWxvEChWwH7tKMlFJ7DLiACNCtuo6lo3QevbRnp iEdJT3pO996latjs6ZZ5/gL31wYDKMFcUeFcsmhl7LxeQOAt/oTY+wBOjkogGMg1qzFiNs Um3xjVMJHkD0THZjcnYw2qnh0w1DVK7XGv05cukSwCrF05F461vVPPcGPi5VN3m8LHtut8 zHCAmJ1lTg8KciVfPIgOaVvaHNMmUC5Rdjw51kDyP+g9FZqKMyk0u5y6YAu1GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157978; a=rsa-sha256; cv=none; b=PvKRAr1ymPW5PI8wZfcILSLUaetuCzq9LnwTCWTpbavLc72n4+Mk8dFXD6LbUOP+js3LL4 DWP82yVQYYPf0/DRLKp7n8RYPnNMzPIUP3IOilq2ETDB5kTZZ/rHmGaoc6bdx6q8j08UUV kt872L3EqE3ryHHvnI64cKeFIZW1JWiTEf+EEenIZsLEYMC5kjh/6qK6Z5oN1eMhEQ7mOr vJXBXfVNo0A46e6y88we6GgaiVcabeny4QfMH56GukMZdtNgBDZlemUzu3ljG/ckj+O/Y3 07Qv9ItwsTpxaLK+gSfQO5MYgs4T1U38QxfVWaJJ/s1xxMYqiUAYDUparAfn/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AAlrxEcyBR7S0WdSiTbmNo7QBY+vQEzTk5PD0PVZSwI=; b=s0O/25UeijbYbjs5mBOkwsVINOGW9wuQsJicnzz4jeviJqJHIASyF3RdFmN6Qrlqe0qRfi M14aOVRRNIbH8BaI8in7k2ULrgol1Si5ab1iqAtzV2CugZyVowC2N4loKMiNKiwFd/BQN2 PPmGVKHhdiJ2cEjXqzT5jjnrBkseSsj7FOtqgS/w7iPK2m16X06q4lg981mBn8zUTRlyT2 RQEdVWC9APKP+ncSNrmD8zlSoGbCk6Yr2S/oexiAaXG3lqVcRqnid6jfoSME2/J8MHXuGU 3cuyDf3nPs26C3Af4imKoIP/EiPRyQIWkmgDjWS08bvJRvdIYl7LkBrgLN00QQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwp2CKdzgRD; Tue, 2 Jan 2024 01:12: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 4021Cw9B054734; Tue, 2 Jan 2024 01:12:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021CwAB054731; Tue, 2 Jan 2024 01:12:58 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:12:58 GMT Message-Id: <202401020112.4021CwAB054731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f5a139a03767 - stable/13 - ocs: Check for copyin errors in the ioctl handler List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f5a139a0376740aa3a80e2c626846020e7643c14 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f5a139a0376740aa3a80e2c626846020e7643c14 commit f5a139a0376740aa3a80e2c626846020e7643c14 Author: Mark Johnston AuthorDate: 2023-12-26 01:38:57 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:44 +0000 ocs: Check for copyin errors in the ioctl handler If copyin() fails, the driver will blindly proceed with whatever had been in the uninitialized DMA buffer. This is not what we want. Check for copyin failures. This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: ram MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43097 (cherry picked from commit a01ff11cb73d7a1988f6241f63d141371ff23717) --- sys/dev/ocs_fc/ocs_ioctl.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_ioctl.c b/sys/dev/ocs_fc/ocs_ioctl.c index 75afdb218333..5b794cccbf7f 100644 --- a/sys/dev/ocs_fc/ocs_ioctl.c +++ b/sys/dev/ocs_fc/ocs_ioctl.c @@ -86,6 +86,7 @@ static int ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma) { sli4_cmd_sli_config_t *sli_config = (sli4_cmd_sli_config_t *)mcmd->payload; + int error; if (sli_config->emb) { sli4_req_hdr_t *req = (sli4_req_hdr_t *)sli_config->payload.embed; @@ -127,7 +128,13 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma) wrobj->host_buffer_descriptor[0].u.data.buffer_address_high = ocs_addr32_hi(dma->phys); /* copy the data into the DMA buffer */ - copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); + error = copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); + if (error != 0) { + device_printf(ocs->dev, "%s: COMMON_WRITE_OBJECT - copyin failed: %d\n", + __func__, error); + ocs_dma_free(ocs, dma); + return error; + } } break; case SLI4_OPC_COMMON_DELETE_OBJECT: @@ -170,7 +177,13 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma) return ENXIO; } - copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); + error = copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); + if (error != 0) { + device_printf(ocs->dev, "%s: non-embedded - copyin failed: %d\n", + __func__, error); + ocs_dma_free(ocs, dma); + return error; + } sli_config->payload.mem.address_low = ocs_addr32_lo(dma->phys); sli_config->payload.mem.address_high = ocs_addr32_hi(dma->phys); @@ -184,6 +197,9 @@ static int ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd) { ocs_dma_t dma = { 0 }; + int error; + + error = 0; if ((ELXU_BSD_MAGIC != mcmd->magic) || (sizeof(ocs_ioctl_elxu_mbox_t) != mcmd->size)) { @@ -238,13 +254,13 @@ ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd) if( SLI4_MBOX_COMMAND_SLI_CONFIG == ((sli4_mbox_command_header_t *)mcmd->payload)->command && mcmd->out_bytes && dma.virt) { - copyout(dma.virt, (void *)(uintptr_t)mcmd->out_addr, mcmd->out_bytes); + error = copyout(dma.virt, (void *)(uintptr_t)mcmd->out_addr, mcmd->out_bytes); } no_support: ocs_dma_free(ocs, &dma); - return 0; + return error; } /** From nobody Tue Jan 2 01:12:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwq6McJz562dv; Tue, 2 Jan 2024 01:12: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 4T3vwq3qw3z3Znx; Tue, 2 Jan 2024 01:12:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ROozMbwON658wWYtsXntmys3x1X/W70GAzHz/6HHF9Q=; b=sOkBZ1pY6ISxNGgXkbIWoF0pRCj+S865hsdvScol9+FLLygznnUG2YdvYIdgEgpqrfC4Aw OxodMxfpnKwD/82sIoQYCeeTunv2KEMKEAllbFz1m7NqqHK35nqzNiAmcxB64HBvwd1JDL mjW6vBlqihdPmi+2gk7Db1tiRhMfXD2DY/4irv5Fl2kbNBtAL90jPejoMxxd+aUd0IrvXE rwpSCGl9CxuCGOTojTYcJQyIAbSHBC6no0nxIPGnjxfUrMmD65vNwr+6L6ie8QfS64/UGx /1HoAv0/RLgNVCqe2KFqqFkSRQyryjge8FoSctJfxQ1vs+KfKOquO83+7pK6FA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157979; a=rsa-sha256; cv=none; b=OF/8cY0faaLs9QncAhlqkQCgMlOON5bb5bK/velOy4OPTLkEXXQ+IMcsC7WSe9OYwVRhtw sfp5IcWZseXJ7Pxwl5PF6zY+wuMC/PRXROHOPIheuVxjncNWUHncWeV8ulCyb7zLoR3YOE PkmycuJhVS3/z2XkXow346u94MvydqTZGn6VuC/Dc12GfWRIsnIOx2CZVGz+16f/p0rvDf /gB5jbVSpFowFsbyqnaGZKHPwtWlxb0TASla2kDm/8Y7vfpHpADf727ZkYgh6eAHYIOVDe wrZdlch/rLRo+a+TGxLPd8BBqyMg5jZmn80GaZ12eN/WkTR1VwmoT4OsczuFhQ== 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=1704157979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ROozMbwON658wWYtsXntmys3x1X/W70GAzHz/6HHF9Q=; b=pzZ1S1QZQwBfU+s+N8okmT7ysRMIdQBKYJsQE4rWS9WPQkdH6w7PqXoa/KUchjdzCbIeAH ikhY+L3tuPVHIoZ4SyLNi+XFpT+tEuz6IrQo4Td7C6jSfP3QX4KHfGol8DJ2pnQQc2p6ud vMMKG0lhWUav4qC+Tj99Ao9gx2oUPNpr8t/mLF9Gsbq8Sguex4e39H1OQhGHGPUo2h/485 m8m173whW7/82W4x4p5jiN80mVvSZ/LukSMsmHL6HGkqwdDUb1R+VzwQ4jgZirlC8+6tPH JVJ535RrDFIGUSE1kyqeOujyaT5mJfVM0m+0smsyW4MZVVOcrtLfKknkeP4TRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwq2sDmzgdl; Tue, 2 Jan 2024 01:12: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 4021CxOH054787; Tue, 2 Jan 2024 01:12:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021Cx1T054784; Tue, 2 Jan 2024 01:12:59 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:12:59 GMT Message-Id: <202401020112.4021Cx1T054784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6b067be54eda - stable/13 - compat_freebsd4: Check for errors from subyte() in freebsd4_uname() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6b067be54eda23929e4ffaf8402471151b101856 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6b067be54eda23929e4ffaf8402471151b101856 commit 6b067be54eda23929e4ffaf8402471151b101856 Author: Mark Johnston AuthorDate: 2023-12-26 01:39:21 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:44 +0000 compat_freebsd4: Check for errors from subyte() in freebsd4_uname() This is in preparation for adding a __result_use_check annotation to copyin() and related functions. Reviewed by: imp, kib, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43099 (cherry picked from commit 4f35450ce52a7b141e7ae8d37fa257b5f8971dda) --- sys/kern/kern_xxx.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index 99fe9e6e71c9..8674dbf61361 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -334,7 +334,9 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) 1, 0, 0, 0, 0); if (error) return (error); - subyte( uap->name->sysname + sizeof(uap->name->sysname) - 1, 0); + error = subyte(uap->name->sysname + sizeof(uap->name->sysname) - 1, 0); + if (error) + return (EFAULT); name[1] = KERN_HOSTNAME; len = sizeof uap->name->nodename; @@ -342,7 +344,9 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) 1, 0, 0, 0, 0); if (error) return (error); - subyte( uap->name->nodename + sizeof(uap->name->nodename) - 1, 0); + error = subyte(uap->name->nodename + sizeof(uap->name->nodename) - 1, 0); + if (error) + return (EFAULT); name[1] = KERN_OSRELEASE; len = sizeof uap->name->release; @@ -350,7 +354,9 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) 1, 0, 0, 0, 0); if (error) return (error); - subyte( uap->name->release + sizeof(uap->name->release) - 1, 0); + error = subyte(uap->name->release + sizeof(uap->name->release) - 1, 0); + if (error) + return (EFAULT); /* name = KERN_VERSION; @@ -383,7 +389,9 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) 1, 0, 0, 0, 0); if (error) return (error); - subyte( uap->name->machine + sizeof(uap->name->machine) - 1, 0); + error = subyte(uap->name->machine + sizeof(uap->name->machine) - 1, 0); + if (error) + return (EFAULT); return (0); } From nobody Tue Jan 2 01:13:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vws0Cfhz563CN; Tue, 2 Jan 2024 01:13: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 4T3vwr4pBmz3Zm7; Tue, 2 Jan 2024 01:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LHz8ojde/bkV7u3guAdYQItOf2L1LB6nAhCluV+whtc=; b=qC83l4vyzIKscB+qyZgfVq+ld3dyjwmKFXXTkxlL8S+C2U3yd/pRTXt3s8JtzgtyqMeS7y bxVSzD4s62DaHHWgQCzf2GLIy38iCxwI7+/aRaJalAjFJVv6y+EiXHFeMiHu8qmHrRKG1D J377d0Hr3i1SO+g7wk0TAsxEJNEEdGEza78O1+aiDqqdCu1FovlTg+wqpcyhzS5sWItAbW etSvBaDM49r7mOKH3PGNo4mXjWCbxn8VDGL+tSVWH08VlRnUln6yrQtocOv0o/oUF9Bsd1 jTNcYxQuoCkr7BmQqGvYiMIb76RLBXzpkHPsCHUPnrSLDBJ1Pj9irVMMBQPPiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157980; a=rsa-sha256; cv=none; b=D3jYU/qZyplo7WteyW6NL/Gf6Hq4YfMpZS2T+f7BcNp3qoZvrPWCNRszFI5FGDHiHa3d4I Fy8DHVMxFF5jvieKHPnXGXtHWB+JWbofLrWg6xKs6OyI07IvAc7EOfQZET2GU+uFwFBlbT SktMIPdGMDzgnJtS9gMveMkih7gjRXv5n/XKy6Naaxl3qO5Fu6ZIyf760GWRuPCbGJmuWB 7JbGonA8vmM6XDOhH6h4lSTG5aJ3M1jv/uEtWaVvMswX4cOJ5pmBGnkve8Gq6tKgJaK2WI +65iU4OHBEtd6wXH2KAWgKkqc6EBS+Du8unuvgvyn2zeeRs5OwtbaMkUKq0ZKw== 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=1704157980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LHz8ojde/bkV7u3guAdYQItOf2L1LB6nAhCluV+whtc=; b=bVeVFdw6No1m4hriBROn2vcOwWeC/OZpVvZNh9vCgnYAduweEYEHM+6d/rog5bZiElBET1 Z+lm2Af2vRBX4qN7tgPWWhLnJ2UF9sL+4iu4oeyRbYqoAFQze1d3zEduIDKl3EFWDw0KPl zP/n83GRBNBdOozzcIFKX+mJVsGDwqSaDsQ5NgBIje86wex83MYi3opXBDTia51ju+hWpa Hr/HV4A/8HaOeBEm8r63bsjz54HB7bXNi71Y9bN+yMkwPsc7F4K9rYxYO70Rp5ljcMCIaf X/4srAsdey4mRiLDNTRIRlJjUZtf9TohbM3srt0QeKeKtWU8468N/LV6dnINEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwr3wCjzgLk; Tue, 2 Jan 2024 01:13: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 4021D0Wb054843; Tue, 2 Jan 2024 01:13:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D0gQ054840; Tue, 2 Jan 2024 01:13:00 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:00 GMT Message-Id: <202401020113.4021D0gQ054840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bcced8754840 - stable/13 - thread: Add a return value to cpu_set_upcall() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bcced8754840857be3fe86540de796db4832fe5b Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bcced8754840857be3fe86540de796db4832fe5b commit bcced8754840857be3fe86540de796db4832fe5b Author: Mark Johnston AuthorDate: 2023-12-26 01:39:39 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 thread: Add a return value to cpu_set_upcall() Some implementations copy data to userspace, an operation which can in principle fail. In preparation for adding a __result_use_check annotation to copyin() and related functions, let implementations of cpu_set_upcall() return an error, and check for errors when copying data to user memory. Reviewed by: kib, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43100 (cherry picked from commit 7b68fb5ab2a276ccd081cc1a43cebf0fb315e952) --- sys/amd64/amd64/vm_machdep.c | 19 ++++++++++++------- sys/arm/arm/vm_machdep.c | 3 ++- sys/arm64/arm64/vm_machdep.c | 3 ++- sys/i386/i386/vm_machdep.c | 11 +++++++---- sys/kern/kern_thr.c | 5 ++++- sys/powerpc/powerpc/exec_machdep.c | 3 ++- sys/riscv/riscv/vm_machdep.c | 3 ++- sys/sys/proc.h | 2 +- 8 files changed, 32 insertions(+), 17 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 0bb75e18c5d8..4235ed1cd8e9 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -611,7 +611,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -637,13 +637,15 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, td->td_frame->tf_rip = (uintptr_t)entry; /* Return address sentinel value to stop stack unwinding. */ - suword32((void *)td->td_frame->tf_rsp, 0); + if (suword32((void *)td->td_frame->tf_rsp, 0) != 0) + return (EFAULT); /* Pass the argument to the entry point. */ - suword32((void *)(td->td_frame->tf_rsp + sizeof(int32_t)), - (uint32_t)(uintptr_t)arg); - - return; + if (suword32( + (void *)(td->td_frame->tf_rsp + sizeof(int32_t)), + (uint32_t)(uintptr_t)arg) != 0) + return (EFAULT); + return (0); } #endif @@ -663,10 +665,13 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, td->td_frame->tf_flags = TF_HASSEGS; /* Return address sentinel value to stop stack unwinding. */ - suword((void *)td->td_frame->tf_rsp, 0); + if (suword((void *)td->td_frame->tf_rsp, 0) != 0) + return (EFAULT); /* Pass the argument to the entry point. */ td->td_frame->tf_rdi = (register_t)arg; + + return (0); } int diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 03816df5760f..b2ece47e621e 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -223,7 +223,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -233,6 +233,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->tf_pc = (int)entry; tf->tf_r0 = (int)arg; tf->tf_spsr = PSR_USR32_MODE; + return (0); } int diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index ea8e88b7201d..8f5343a0c6ef 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -203,7 +203,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -216,6 +216,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->tf_sp = STACKALIGN((uintptr_t)stack->ss_sp + stack->ss_size); tf->tf_elr = (register_t)entry; tf->tf_x[0] = (register_t)arg; + return (0); } int diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 8e0917eed1c2..e05791967fba 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -488,7 +488,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -512,11 +512,14 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, td->td_frame->tf_eip = (int)entry; /* Return address sentinel value to stop stack unwinding. */ - suword((void *)td->td_frame->tf_esp, 0); + if (suword((void *)td->td_frame->tf_esp, 0) != 0) + return (EFAULT); /* Pass the argument to the entry point. */ - suword((void *)(td->td_frame->tf_esp + sizeof(void *)), - (int)arg); + if (suword((void *)(td->td_frame->tf_esp + sizeof(void *)), + (int)arg) != 0) + return (EFAULT); + return (0); } int diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 5efdfea6235d..f5787c0be427 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -146,6 +146,7 @@ thr_new_initthr(struct thread *td, void *thunk) { stack_t stack; struct thr_param *param; + int error; /* * Here we copy out tid to two places, one for child and one @@ -165,7 +166,9 @@ thr_new_initthr(struct thread *td, void *thunk) stack.ss_sp = param->stack_base; stack.ss_size = param->stack_size; /* Set upcall address to user thread entry function. */ - cpu_set_upcall(td, param->start_func, param->arg, &stack); + error = cpu_set_upcall(td, param->start_func, param->arg, &stack); + if (error != 0) + return (error); /* Setup user TLS address and TLS pointer register. */ return (cpu_set_user_tls(td, param->tls_base)); } diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index d4bef747284f..341b78b018b6 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1063,7 +1063,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) td->td_md.md_saved_msr = psl_kernset; } -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -1116,6 +1116,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, td->td_retval[0] = (register_t)entry; td->td_retval[1] = 0; + return (0); } static int diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index 58acf5df9e14..043093960edf 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -179,7 +179,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -190,6 +190,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->tf_sp = STACKALIGN((uintptr_t)stack->ss_sp + stack->ss_size); tf->tf_sepc = (register_t)entry; tf->tf_a[0] = (register_t)arg; + return (0); } int diff --git a/sys/sys/proc.h b/sys/sys/proc.h index a85ae239f46b..fb9bcfe1d746 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1184,7 +1184,7 @@ void cpu_fork_kthread_handler(struct thread *, void (*)(void *), void *); int cpu_procctl(struct thread *td, int idtype, id_t id, int com, void *data); void cpu_set_syscall_retval(struct thread *, int); -void cpu_set_upcall(struct thread *, void (*)(void *), void *, +int cpu_set_upcall(struct thread *, void (*)(void *), void *, stack_t *); int cpu_set_user_tls(struct thread *, void *tls_base); void cpu_thread_alloc(struct thread *); From nobody Tue Jan 2 01:13:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vws6vZgz563CS; Tue, 2 Jan 2024 01:13: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 4T3vws646lz3ZgB; Tue, 2 Jan 2024 01:13:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+MgFeabOqtQD8mJkj365exxSCS823Iw+xcKDSovOD6E=; b=UlcE8qRW1atWMONLadQLtTyjd0AfWyirn8Jnl8Wgpjo8KEqyHtfC7Nk/id3c43sXZ6DrU3 WsoAP9FuASLP1xPv4bKHtLmmKnADWmsy8+30NZixGUQr4cZQXISDk67D4NPyvuzJhvOOLL Z9rfIK8ERjewsvEy0ddG0IbxpWK21uCwnqiDvaF5hbVGMAayspE9iMOUkhWRkfOIRVoKJo GrY1LnBKB34HylKaZFFmPUJnLz6yyYPpLOytDuExAmLpF01gmmjklSgYn9j9fV0fFi/iEa CB8MWO/IMmTghWOiWCMxw8mcb83tdn0PwIRJjjDUqMC34EtdnWzwJVS/hY4pEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157981; a=rsa-sha256; cv=none; b=lZok4zq/O8kO+8qx57Ev72DWXcThswmqjQ+nHpiNqHxCx9FLibFnK37a7tRQ8ryvNEJ/+n 4ileBSdacnNFU1l86ml4sz+QTH6IyXSqYMnkTRZfhdQ8Qps3DvP/X2XJTIXcgEnNjInkca HGxOj95jYqZeZd9DukY5goQ9AjeHY5EfU/+ZOoPzEYmQxDtJ0NTM1wDHF5zTYyxwzc1X5k dpHTjmVsxcmcON6vZajGesu7pfMndY0IbykQQKKFrKG/C9XM3bz/xLacfAIo2cjMH6W2o8 Qe8LhhXpf+4IfMpumdACbmXwWdSQYWu5TvMn2tudLG9Ff1BY9+0UF3wxVAnPGQ== 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=1704157981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+MgFeabOqtQD8mJkj365exxSCS823Iw+xcKDSovOD6E=; b=wbWK16Mw0b34aEv8UlEhJJ8gzqz+y29Dj/SOp4/iTCqTePZEi/KMeI5WJmmWiSrYmtvPUJ Xz2fXyVoP/MLYvOsVjRWBbuZFmXBIotEwEptOG8r68oTmXIf+GjnF09fghUUybNGDXqteo bPydd2ovfppKHpYJF2xT293zWTfYf4xPbAfLw5NwshwGrB69ubILEGaI7pkJPPGqSG4hVk KiFL8P69n2fi5KMDpayW6O5EZaj21Mw85y/K4l6OG8WZlGoOI0VCEcgy5SbTvrOiJeQHF3 J7voDKRyQIs6iIup6IFrqda7MCVNoYD712QPcpd6+ZLLPKrVL2oBA7RNslNXRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vws5081zgdm; Tue, 2 Jan 2024 01:13: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 4021D1Zw054891; Tue, 2 Jan 2024 01:13:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D14a054888; Tue, 2 Jan 2024 01:13:01 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:01 GMT Message-Id: <202401020113.4021D14a054888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: dc2622bb27f7 - stable/13 - linux: Check for copyout errors in linux_fixup() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dc2622bb27f78b1119eb9cbd9db0e0c2b16fa099 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dc2622bb27f78b1119eb9cbd9db0e0c2b16fa099 commit dc2622bb27f78b1119eb9cbd9db0e0c2b16fa099 Author: Mark Johnston AuthorDate: 2023-12-26 01:40:05 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 linux: Check for copyout errors in linux_fixup() This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: olce, dchagin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43104 (cherry picked from commit 3fde275167ce1f1455a03586d29840546d06d97a) --- sys/i386/linux/linux_sysvec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index ab29da91f64a..86e475866026 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -127,11 +127,14 @@ linux_fixup(uintptr_t *stack_base, struct image_params *imgp) argv = base; envp = base + (imgp->args->argc + 1); base--; - suword(base, (intptr_t)envp); + if (suword(base, (intptr_t)envp) != 0) + return (EFAULT); base--; - suword(base, (intptr_t)argv); + if (suword(base, (intptr_t)argv) != 0) + return (EFAULT); base--; - suword(base, imgp->args->argc); + if (suword(base, imgp->args->argc) != 0) + return (EFAULT); *stack_base = (uintptr_t)base; return (0); } From nobody Tue Jan 2 01:13:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwv2PPHz563Fk; Tue, 2 Jan 2024 01:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vwt6v6Jz3b0K; Tue, 2 Jan 2024 01:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X9Wdy7S1RPaiiDv2fPcH0GZ7pdA+BNXSSx62RO4pwso=; b=Y2yfJwJ5rd8YLXkq380Y7q1EvT+aCLJszZ3C73YJObL0PnKrwjSNa9MvDseeVqPXX6Zh8P 9a8Oi6BOMUW7jlNLqutF6ffRLVm1ksD9psacarO/JJTdlmvDSHJ/X/R+JJiQq6Gt2uuku4 11KRjlZDI6akXH9HITI3tNYP66QytX47av9oWYC+qdcegSXq5BFgBGNCq7rh80HqtANqc1 gmuyL7rM+nVDrr1CtB4j90Og6tbWFmVBYNb9dpmS+T+Codn4I/H8HOOS19IW9fNHWpkqlX G1nJ1dxSocI3Zt3CkB+jopxdxM/1167IE19lepdKCj8SEecCeeJkq1IHuqDX9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157983; a=rsa-sha256; cv=none; b=DUreHYm4sHycSZ/PiZgqpuczx/O36n/z7ySFoZY7DWo24D1JsIK5+KBtRceF7tiCGr6mVW nxgGjaEvIcrdUvSmhj4RMVfvpMhYIugdUc4mSUmPKIQR3qSkR5S/3VQoSi8Tos0QubJYxc ow9PQcKlkRtkctEjIX8MHBO1w4LXhwB3TQ9n3lsX+pkv2y1wdk/7HyA+J/dHv6YFABGwH8 ZTzWln33dlEfaY3PBMbFkd3GV4q4H0zb88mlTqjQU91bmBUnOqCmSTVhAAlzT7cClkCZkL sSuoJo6WRsHCETW/uAO6mkQHz/0Til0pjEVYfZAnB29irBh9Cr53NNNRIFgreQ== 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=1704157983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X9Wdy7S1RPaiiDv2fPcH0GZ7pdA+BNXSSx62RO4pwso=; b=UJSJohLn9yHqi77zoy0FoJuX/To5iJ4dAuAUjkt7L5p+y23qqFcb1Rt8jpy1yf8Pwam2Aa VtvdUnDWNaeicdRseq6KyGWC8cURbAQ44CssDmYcFsv0PQhRcuwpSb2BiTB/3w7S+YHrPI brIj+RGiFZX9H8nb1bSeUK+jI8RYePjmOkY06jrDmhMLxCkYoMgrGYP2l7RqDT8cVc+qTH RlwW16yUVT40UySOEyBDMMljdrKGAhRZhmuMOM7weB6g7T2tgmMozQqJNNaCLmWQecbhwG +DxmRVf67nP2tbA4YFlBUWwFyF7ORBTtPWkA7Gwqlce+wqZ3OJPdJ6bseFTloQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwt5zq2zgTd; Tue, 2 Jan 2024 01:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021D2sl054938; Tue, 2 Jan 2024 01:13:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D2e3054935; Tue, 2 Jan 2024 01:13:02 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:02 GMT Message-Id: <202401020113.4021D2e3054935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 76ecdbce7703 - stable/13 - powerpc: Avoid ignoring copyin()'s return value List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 76ecdbce7703d5a7bae90d53cb612a496c87c261 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=76ecdbce7703d5a7bae90d53cb612a496c87c261 commit 76ecdbce7703d5a7bae90d53cb612a496c87c261 Author: Mark Johnston AuthorDate: 2023-12-26 01:40:16 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 powerpc: Avoid ignoring copyin()'s return value A recent change made it possible for cpu_set_upcall() to return an error. Do that here instead of ignoring an error from copyin(). Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43105 (cherry picked from commit bdf03b4bcc4a9aa0be503dbc64415e6b0b845fbc) --- sys/powerpc/powerpc/exec_machdep.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 341b78b018b6..4c7eba0b2965 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1069,6 +1069,9 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, { struct trapframe *tf; uintptr_t sp; + #ifdef __powerpc64__ + int error; + #endif tf = td->td_frame; /* align stack and alloc space for frame ptr and saved LR */ @@ -1096,10 +1099,12 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, tf->srr0 = (register_t)entry; /* ELFv2 ABI requires that the global entry point be in r12. */ tf->fixreg[12] = (register_t)entry; - } - else { + } else { register_t entry_desc[3]; - (void)copyin((void *)entry, entry_desc, sizeof(entry_desc)); + error = copyin((void *)entry, entry_desc, + sizeof(entry_desc)); + if (error != 0) + return (error); tf->srr0 = entry_desc[0]; tf->fixreg[2] = entry_desc[1]; tf->fixreg[11] = entry_desc[2]; From nobody Tue Jan 2 01:13:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vww2H9Sz5638x; Tue, 2 Jan 2024 01:13: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 4T3vww187Yz3ZxD; Tue, 2 Jan 2024 01:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xbgQ7zese76EkqrRjZqseIhTOwdEPmNcBMEyoZMtUUA=; b=n7n6Y3x6ZuKchnEOWmS0nyD2BMHGURQOdHgCZrLWpP5jPqLY4l9NqL2l7GtFei/MXEVIhz 0U1FPxfYcGd2oaBNrbGodO+OccrlFkEqJBKjcqwAQbMZzOKoBS4w2/x9p7qKlL9MiLgu+1 ku+wfjKh7qqAF2dGENb8ct/BB4jS3sdSoZnhL9py1hqJvO9RN0fdOvCTeIawcPnYdRHcri I6NN3SyNlj1xo9JXJ1R9DM4EwzEXvlAT9bxY2CgNWOL132eP0PJ4jwqXi7qpElWjJYZDjn 0MnuQn/iOKXwamovvNcHGjYE79heKJgiedzqCYrHqPBfSBnYnr/xHafjlco0Yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157984; a=rsa-sha256; cv=none; b=JU2VC9fPc501r7r3pTsS+xNV5PdocTJLo/l5uRM0kZFvYAKYqYhISf022eN0ZvItvgsbWM nfgUCJ90VLVHr77oiKbYLaBjFZ3PkBqDRHav7UYRcg0iNNyGNUm5NyzAgsEgC5z7Ans5rC uL5lzisep0e27+xFeYmliMJwYIQ3apuYoUyqM23tpmGNZe+Pt7m83nOsf/NAgA+QEbbcUM Wgxc1oykIeajX/10mfpkbi/FnyjZ0V+OahSnSq4vbsrkCnQsUqHhQfIFJbDlICWGyFZxnz YL4ln9Gc4XLzZFvHc3Y1Z+FOWa2PveXrIaJylzREETGSlRZTq63cKEl0hynOBA== 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=1704157984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xbgQ7zese76EkqrRjZqseIhTOwdEPmNcBMEyoZMtUUA=; b=i6GbUIZ9B+FF/XzPZk7si4VREGvr5ERVSIeiMvpc7BpASQF11eu2V8kXfEEKFFBlCXx5/+ 1igt5lIRvxPXeMA9xO7WNDc6JlOPsRNhFz20PckNrUXQvlwZ9MCbXLYUO1r0edVZfoOdMp otZnroBVYo4JyWGldYaMSs/aeO288SN4BQciFRHxBzeikluXA/RJfDfZ8+mLFxnpFpQgHF qQfcjjSgWzZVns/ZgOh/i3hUG1Z0CRDjrBr8aoeiZXBWV8Lvh+pRcHNuLlC6a/0C5j1K9Z 84eC5l3GqqdBMCWREv+jYH8yGqfLhTvTzw2p0QRe7e0BN3HkMZyK3rYncluYHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwv75M8zgLm; Tue, 2 Jan 2024 01:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021D3fF054986; Tue, 2 Jan 2024 01:13:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D3dP054983; Tue, 2 Jan 2024 01:13:03 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:03 GMT Message-Id: <202401020113.4021D3dP054983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8276e3d3f8f3 - stable/13 - ses: Add error checking for copyout() calls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8276e3d3f8f3cb5ed5258ea39a9423bfb38e3bdb Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8276e3d3f8f3cb5ed5258ea39a9423bfb38e3bdb commit 8276e3d3f8f3cb5ed5258ea39a9423bfb38e3bdb Author: Mark Johnston AuthorDate: 2023-12-26 01:40:33 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 ses: Add error checking for copyout() calls This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: mav, imp, asomers Tested by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43130 (cherry picked from commit 771501e96ffd7e314c338300a351ad76d28a2f69) --- sys/cam/scsi/scsi_enc_ses.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c index bc480dbb0fd7..df06a8a4c22e 100644 --- a/sys/cam/scsi/scsi_enc_ses.c +++ b/sys/cam/scsi/scsi_enc_ses.c @@ -2808,8 +2808,8 @@ ses_get_elm_desc(enc_softc_t *enc, encioc_elm_desc_t *elmd) } if (elmd->elm_desc_len > elmpriv->descr_len) elmd->elm_desc_len = elmpriv->descr_len; - copyout(elmpriv->descr, elmd->elm_desc_str, elmd->elm_desc_len); - return (0); + return (copyout(elmpriv->descr, elmd->elm_desc_str, + elmd->elm_desc_len)); } /** @@ -2825,7 +2825,7 @@ static int ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devnames_t *elmdn) { struct sbuf sb; - int len; + int error, len; len = elmdn->elm_names_size; if (len < 0) @@ -2837,10 +2837,13 @@ ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devnames_t *elmdn) ses_elmdevname_callback, &sb); sbuf_finish(&sb); elmdn->elm_names_len = sbuf_len(&sb); - copyout(sbuf_data(&sb), elmdn->elm_devnames, elmdn->elm_names_len + 1); + error = copyout(sbuf_data(&sb), elmdn->elm_devnames, + elmdn->elm_names_len + 1); sbuf_delete(&sb); cam_periph_lock(enc->periph); - return (elmdn->elm_names_len > 0 ? 0 : ENODEV); + if (error == 0 && elmdn->elm_names_len == 0) + error = ENODEV; + return (error); } /** @@ -2919,9 +2922,9 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *sstr, unsigned long ioc) size = rsize; if (size > sstr->bufsiz) size = sstr->bufsiz; - copyout(str, sstr->buf, size); + ret = copyout(str, sstr->buf, size); sstr->bufsiz = rsize; - return (size == rsize ? 0 : ENOMEM); + return (ret != 0 ? ret : (size == rsize ? 0 : ENOMEM)); case ENCIOC_GETENCID: if (ses_cache->ses_nsubencs < 1) return (ENODEV); @@ -2933,9 +2936,9 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *sstr, unsigned long ioc) size = rsize; if (size > sstr->bufsiz) size = sstr->bufsiz; - copyout(str, sstr->buf, size); + ret = copyout(str, sstr->buf, size); sstr->bufsiz = rsize; - return (size == rsize ? 0 : ENOMEM); + return (ret != 0 ? ret : (size == rsize ? 0 : ENOMEM)); default: return (EINVAL); } From nobody Tue Jan 2 01:13:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwx37kGz562nk; Tue, 2 Jan 2024 01:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vwx21ysz3b0r; Tue, 2 Jan 2024 01:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3t7ob61bgAjBBj4T7/W4wlerqK+fvicXWeABfuURh8I=; b=XWBcSKETIETUPEhR3oClVOLKhgg7cUbp45xXEzFW4OCVnUJn2yZ+/b18+LyEwsVZT7Co85 rfv9b+yp0a0txRdJsbZycwjp178ugacL/ZSej87TjtP2bCaTVGYObrTUnmOyYxmoORUTha 9/MAGcbNgTaM5d+GIiP8rYMwZmAHZTCFbXYdDVlu8hVN5WTqmrElRIoFlBKPGwJzDzkneb XShd3EwtC4wQIfwTsWgrzMRFqckmZ/mpKtwOjeTUpo3NH0cZ2lQylC74LYNFQPbHtfaWd0 wm6Axnrej+3JP0ddEzG76a+N7p26c7Jlkam27zF26244J/M3SxyYR4cRKTTHJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157985; a=rsa-sha256; cv=none; b=sE3MGbHBRlZvNjyulHOJbm9qdQBJvM9cFUBHObliqS69rWNhkbcPQSER911IUFhRjKRe9R edPbLL6kBtjsn3vTG4B+Ydh6gjbW/ThesDgJq6LSlowN1mGMcbp/0wom3J8ur7qcaQg+Fb rX5S+taSVF69na19YDuXD/6u8LbGsvp4nljlKoRysAaWuNh9ix/c66CcNztmdODEsTKgKG jFqee6+bAP6KJP+uBotfTfiO0CQkR64/BBUKCHUdfs0GqV3shtw5PTBwaBfV/cLFTgSVeB RguzIt46JvEJzNk5EKGZJDOCBbGV6wa4FjdYS3Yi1VFFzc9LuvXtHK9UGt40AA== 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=1704157985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3t7ob61bgAjBBj4T7/W4wlerqK+fvicXWeABfuURh8I=; b=wu+ekfLaIvzMfSwk01yvIKH5r+ga7/LvFsWmnEoeD7TM/y0fS6lWRIbGD6+ojCldMV4n5/ dr7QwHOpF/gY+KixicWNoZa/YZgzv1mUu3dZfAS+r68f5Fkz9TItTsphN3C4Bt73BvBAx/ zrh+DwutrIOfhRpEc+YMMOnMsrawtbRS1Nak+3PUQiDaJm3Lqwnt0g4X84dIsEGdHfgXxW aOkbd0M8Y5AdEui0Z9SIW9DykAKZEApFObS2VDwFSWRs3q6SfLrTO3JNa3IHi3T0KovIq0 hJAIxL4AxKGldyPGXmAxLLd6HkXtA4LZZ8VOJ6jiec/DqD9k4lt4DGUZ/E9Meg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwx16d8zgc2; Tue, 2 Jan 2024 01:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021D5Ll055031; Tue, 2 Jan 2024 01:13:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D5xJ055028; Tue, 2 Jan 2024 01:13:05 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:05 GMT Message-Id: <202401020113.4021D5xJ055028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3aa79121f2b8 - stable/13 - sendfile: Explicitly ignore errors from copyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3aa79121f2b8cb070ea9b8a89e6ca8ca967a16f5 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3aa79121f2b8cb070ea9b8a89e6ca8ca967a16f5 commit 3aa79121f2b8cb070ea9b8a89e6ca8ca967a16f5 Author: Mark Johnston AuthorDate: 2023-12-26 01:41:32 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 sendfile: Explicitly ignore errors from copyout() There is a documented bug in sendfile.2 which notes that sendfile(2) does not raise an error if it fails to copy out the number of bytes written. Explicitly ignore the error from copyout() calls in preparation for annotating copyout() with __result_use_check. Reviewed by: glebius, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43129 (cherry picked from commit d0adc2f283ad5db6b568ca533a056c9f635551cd) --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/kern/kern_sendfile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index cd6a4c2dc3df..ee0119dba5af 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2148,7 +2148,7 @@ freebsd32_do_sendfile(struct thread *td, fdrop(fp, td); if (uap->sbytes != NULL) - copyout(&sbytes, uap->sbytes, sizeof(off_t)); + (void)copyout(&sbytes, uap->sbytes, sizeof(off_t)); out: if (hdr_uio) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 8b7a2e7e0ce7..2a34a34067d1 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -1326,7 +1326,7 @@ sendfile(struct thread *td, struct sendfile_args *uap, int compat) fdrop(fp, td); if (uap->sbytes != NULL) - copyout(&sbytes, uap->sbytes, sizeof(off_t)); + (void)copyout(&sbytes, uap->sbytes, sizeof(off_t)); out: free(hdr_uio, M_IOV); From nobody Tue Jan 2 01:13:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwy67zVz56391; Tue, 2 Jan 2024 01:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vwy346gz3bBG; Tue, 2 Jan 2024 01:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QVBnUYEWBYRecLXXOP+l1kyvu6ZD6XRN0VVvnyjtGE8=; b=sdeRZ29TbvRwo311aM3g/YY9UqmQSEuExyg4oFwi3ujf5ejdFD7FjVB/h0WH+MNHhgJ8EI wimR6obnZiw34In+oPaw2ZU0ShOAH0F1xqRc/LIRVl4MVEoukPAqPgK81RTpVOwmzlv28p vgFju36fsgOtlYVRDNWDtlFqbH1nOabYnIu0BBlqBxoaqVZ+GVQjo+8VgWTQeOX4SeGDHO vpfLmoiwGwXB76JI+IR5GG4YrIQQ4RucgEHBhuk1Vmk7KCZFL+7JgNcg0M8D3jCFhOjrLM ElikhOfPEjZEx9TcSZEVWDJKCWBBfcqe3bA+sbQfQSdKs1Nxu9om+6RcD6TmuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157986; a=rsa-sha256; cv=none; b=Tvi+J9fFyVQ+0XTtNU02h5cJ+ZriJJJxJINdSsihj8zXCdcVkjTn1wmMDCmBIcsXTs8OdJ l3T96zHq38bwXp1RID5R+DaASoMHH0w+DYcv3fs8Znzx8nNmipjrPMKrgXagPB/ELvOOCP QJ49kwBbYDQYJgavLL67WLqPfTPw6nf+8ekY7RjfNybuR49SKIeFDmsK56kxlsdJf0WxAL rETF91Wut6Co2f4qayTPvHso0sp/78jEoRFh8MSiRRBfBnjPF5hwNpivOXwgJkooJiYfef XJEK+g3+X4Y3Qu2zLKtE2MvAkTVLrnvUtnFac4t/ZFjxkuP29uk2v5r5icg2/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=1704157986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QVBnUYEWBYRecLXXOP+l1kyvu6ZD6XRN0VVvnyjtGE8=; b=Q/vPeow6mQOPv8eceCqWQy9yE/0Fy4mk5Q9tBuBTHc/0Q0EHcRPbsZIU3PYidwMo34jBnT fnjSiqA9Fsg3NMfbsCjAfbU3yG7eTtpOwtSfZFHcPbWlTwJG6TENfUrd97mgZptUMSOiKA XwnPVYNmPsvCeDpP3A/Lf8i9Hg9zObVijgynmtqZ8xRcW5af27BMW1392dsNf4MVvTH35L wz3HbddNSuE0irId50eyq8OVsW9mnIDjdtrekHSg0fdGin5wL/giXoE/86Ai1TkuOqdrXV Tubi0jEHox2CutkYKUIHU6e/85etRmVIW7VBTgXT1W+mqVnD2VCa6YcxbkApDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwy29vdzgg9; Tue, 2 Jan 2024 01:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021D6ku055088; Tue, 2 Jan 2024 01:13:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D61l055085; Tue, 2 Jan 2024 01:13:06 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:06 GMT Message-Id: <202401020113.4021D61l055085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3ca51fac629d - stable/13 - jail: Ignore errors from copyout() while copying the error string List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3ca51fac629dce5bd02757b2e871cd38fbcb228f Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3ca51fac629dce5bd02757b2e871cd38fbcb228f commit 3ca51fac629dce5bd02757b2e871cd38fbcb228f Author: Mark Johnston AuthorDate: 2023-12-26 01:41:54 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 jail: Ignore errors from copyout() while copying the error string Reviewed by: zlei, jamie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43142 (cherry picked from commit abbc260f74b203646dd108ad4038627fcfb0ded7) --- sys/kern/kern_jail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 9a9371f8591d..8b043687a75b 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1915,7 +1915,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) optuio->uio_iov[errmsg_pos].iov_base, errmsg_len); else - copyout(errmsg, + (void)copyout(errmsg, optuio->uio_iov[errmsg_pos].iov_base, errmsg_len); } @@ -2298,7 +2298,7 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) optuio->uio_iov[errmsg_pos].iov_base, errmsg_len); else - copyout(errmsg, + (void)copyout(errmsg, optuio->uio_iov[errmsg_pos].iov_base, errmsg_len); } From nobody Tue Jan 2 01:13:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vwz5q5tz562f8; Tue, 2 Jan 2024 01:13: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 4T3vwz45wKz3Zst; Tue, 2 Jan 2024 01:13:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJDoD75QCXRuGbUAsFMQQNO0Xfx4Mj7P4bnJw3uM+CQ=; b=yDK3QXUWwWC7q3ys7maB4G/Ec9GTmOKGGTRK1i1z8heiiCuyXatSOK08KB9osyDsj7cWsT IyRHd79fmmflvzpTH8XCaUiGTSE4fcpWZoD0K9k0MdC41e88iRLPJWeEATE2dolCQHbRR3 dxqevXnws81pkB5J0h8Fbj8S+3HeSQ2pbBS5Y+b1yOQaG3ARH4ctdGlMKDDirt++nyVGym 4ac1pDWBHmwGKd/smBq7TvlwhLZ3LKVTUugV3hQhVEYajf7fPk/rhVJKoGuK1gjCOvp81b ycjlLw9AAgsiXY/GA5H6UDVnjMwQwUXrnBZ2vw2ev5RSBtTOEV01nM8/yrC4wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157987; a=rsa-sha256; cv=none; b=amd3+P5gj81D9nXvMjQZaOBmsteVqEuiG86o0UlUMgTi1hflapFJ8Yd+ALbxWx7RBk35xg 5P2JEd4jJF0DSVGIH0uVDzi6jseB6RfLA3nKWhauvA6MD12d/4AdUxyY2yin9kWd3sNiTu fnnsQZi7tXP5nByxbAvRDJDv6qb8KIM3aM7G9v+c9pyNyYPPaAQrh2kBSnn0EGGgqJATBx b8kvLmRWv6o5Awh+i29oUfh8Y40EiRz5PcbfcyefaUSXNME/4fZL6dtQt7zdUwMDZGFmWQ uQMq6o6XPstfz1+Kfw2Albe01G0+JTZC6vAGpNX7Q8/fR89tI4TFgMsQdTAadA== 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=1704157987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJDoD75QCXRuGbUAsFMQQNO0Xfx4Mj7P4bnJw3uM+CQ=; b=WeJlbvTyMaGrWFbKp6GiUhlJ/OwlY/Wu5esrBDqoSs6cuiS/e+dUgKXckTibd+63+AYfFw WFk/0URjc+deOIR9h1qK6LAg0dO7te+fyfqQSdNew9OUMJyu+Kvve9vFKocBgpCK5ZH7lb gYNS1EHsu43MP1NkR+/mOJJBYMqx+GXqPuNUgns2dy+KwMjNVekUn4h/vuI69LdIF9ZDnG 1VfYFbTSdPKvmFfqzVZTLn4D+zgHI/21yJ1lEcawSjdAW3z+FZPZFQR9YtoB/wUuw56o2w 9oiCC4DTOt3t4kUXMypFYsaOAeUfBK+MmLWiwpUL9yc0k/yKUr5QC9+KRtp0ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vwz3CcczgTf; Tue, 2 Jan 2024 01:13: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 4021D7eW055139; Tue, 2 Jan 2024 01:13:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D7wW055136; Tue, 2 Jan 2024 01:13:07 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:07 GMT Message-Id: <202401020113.4021D7wW055136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 637cc1614ca4 - stable/13 - thread: Ignore errors when copying out during thr_exit() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 637cc1614ca4770ba789522c1ccfdd916a185d9a Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=637cc1614ca4770ba789522c1ccfdd916a185d9a commit 637cc1614ca4770ba789522c1ccfdd916a185d9a Author: Mark Johnston AuthorDate: 2023-12-26 01:42:04 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 thread: Ignore errors when copying out during thr_exit() It does not seem reasonable to return to userspace after calling umtx_thread_exit(). This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: olce, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43143 (cherry picked from commit f450277f7a608f26624384e046c1987490c51296) --- sys/kern/kern_thr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index f5787c0be427..22c869e6869a 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -315,8 +315,8 @@ sys_thr_exit(struct thread *td, struct thr_exit_args *uap) /* Signal userland that it can free the stack. */ if ((void *)uap->state != NULL) { - suword_lwpid(uap->state, 1); - kern_umtx_wake(td, uap->state, INT_MAX, 0); + (void)suword_lwpid(uap->state, 1); + (void)kern_umtx_wake(td, uap->state, INT_MAX, 0); } return (kern_thr_exit(td)); From nobody Tue Jan 2 01:13:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vx10XKtz563G3; Tue, 2 Jan 2024 01:13:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vx05D5Hz3b5m; Tue, 2 Jan 2024 01:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wd3hXRLgtbu8po8HoRfa5gX45oQATf48UtmyWkVJRUw=; b=lrgLh9OPg63+ZlG20HGHcVz+qLWHCGI247sACOJpjmbqMplRKHLpChT+6hx12eLhupHtop 76pA5IiwhSgGVUY1FJLrDL11s/2H+hvnaRKxYI2A8MGdrNRtiF4pUY23hUa8nYyUfKNGHP BlLQNG28E94NCl0irueFSjPQUja3kAwpcYmZa8zbxj6MLRajty6CqmT1JbkLqw8n1jQ9kd mlSdZmV8IgX82QRmG5HH/zB6fCEQhoZeR87B5p4zDgZdg+F039ZYIZXRaCtmjEBc+gVDfw yocPkN4ftjokaj1hTpeG5TQH7ABh92t8vFlBo3gClpxy3Zr7FYdRBYPR2Z74zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157988; a=rsa-sha256; cv=none; b=eOv4RmtPSDqh+xO5Uo8nqfbdo0QIdvngfm/xI/wOWTvOaWhjl70VJRciSU9vGLm9lGzyQq sT+vacUBiMv8VvzcRqNWs4CpZ9Ut+bQs07jLRp4gtuxgG9NBQ2hpjichesdEdtsZZsoocv kl0ZyxVx74o4g/1So130ZzmGnn/Juwh/47RI8iF8Jtkpr/Q/Hiin4PKBUJGHjbJQdXD8bh Lrp8mecmWnp00vuHRO/bXXxjDrIvtnwTVgbTNeRGO5Z7KuDSpq6ZacdOjua74/wIwXog1p 6AjRiYPYe30rnNBz3ClFWDFeuXZOsIJwuqXl/EJ4qY97Ah3A/PCSlrnouTRCdg== 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=1704157988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wd3hXRLgtbu8po8HoRfa5gX45oQATf48UtmyWkVJRUw=; b=bZurk9+OR+pN9z6eDdXjLtPYDWCfA1b0yTaOxPDKh8X3WCNdZy4fpo3bnqq82iLKs2Ngvq dnz7KO/9/ZVIJ6Oq2zpQCao5WF3hr8C8rrdi7qPeFFfiZ34Cx7CxChcAEXWzqARMz/lBVx f2xuJZdNnoEdq8rjKztk+nN5cViwq5baGAlhvlWSv+gKSOZPcds8o1/KigYXHZZK+4lVQW GmxD6y6TD9dzNFgMc2ukGqKMzjGabhEJ8lyUDXFGoMsXRCLzULTShQCcK1w/Q6DvFxcXEw HUh19mG5C9GxjbUny+uB9SKSjs4BBw4ojWenL6deWqs7ueOtAlH3fQWtUmOqAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx04L8dzgtH; Tue, 2 Jan 2024 01:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021D8Yn055184; Tue, 2 Jan 2024 01:13:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D8ii055181; Tue, 2 Jan 2024 01:13:08 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:08 GMT Message-Id: <202401020113.4021D8ii055181@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 573bb4875b99 - stable/13 - umtx: Check for errors from suword32() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 573bb4875b9994054dbc00218a3f08763af56c9e Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=573bb4875b9994054dbc00218a3f08763af56c9e commit 573bb4875b9994054dbc00218a3f08763af56c9e Author: Mark Johnston AuthorDate: 2023-12-26 01:42:17 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 umtx: Check for errors from suword32() This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43144 (cherry picked from commit 3379d9b5de4c4876a317d25ca008e66b1111b701) --- sys/kern/kern_umtx.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index de87206af844..94050beee7dd 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2961,7 +2961,14 @@ do_cv_wait(struct thread *td, struct ucond *cv, struct umutex *m, */ error = fueword32(&cv->c_has_waiters, &hasw); if (error == 0 && hasw == 0) - suword32(&cv->c_has_waiters, 1); + error = suword32(&cv->c_has_waiters, 1); + if (error != 0) { + umtxq_lock(&uq->uq_key); + umtxq_remove(uq); + umtxq_unbusy(&uq->uq_key); + error = EFAULT; + goto out; + } umtxq_unbusy_unlocked(&uq->uq_key); @@ -2991,7 +2998,9 @@ do_cv_wait(struct thread *td, struct ucond *cv, struct umutex *m, umtxq_remove(uq); if (oldlen == 1) { umtxq_unlock(&uq->uq_key); - suword32(&cv->c_has_waiters, 0); + if (suword32(&cv->c_has_waiters, 0) != 0 && + error == 0) + error = EFAULT; umtxq_lock(&uq->uq_key); } } @@ -2999,7 +3008,7 @@ do_cv_wait(struct thread *td, struct ucond *cv, struct umutex *m, if (error == ERESTART) error = EINTR; } - +out: umtxq_unlock(&uq->uq_key); umtx_key_release(&uq->uq_key); return (error); @@ -3177,12 +3186,14 @@ sleep: */ rv = fueword32(&rwlock->rw_blocked_readers, &blocked_readers); + if (rv == 0) + rv = suword32(&rwlock->rw_blocked_readers, + blocked_readers + 1); if (rv == -1) { umtxq_unbusy_unlocked(&uq->uq_key); error = EFAULT; break; } - suword32(&rwlock->rw_blocked_readers, blocked_readers+1); while (state & wrflags) { umtxq_lock(&uq->uq_key); @@ -3207,12 +3218,14 @@ sleep: /* decrease read waiter count, and may clear read contention bit */ rv = fueword32(&rwlock->rw_blocked_readers, &blocked_readers); + if (rv == 0) + rv = suword32(&rwlock->rw_blocked_readers, + blocked_readers - 1); if (rv == -1) { umtxq_unbusy_unlocked(&uq->uq_key); error = EFAULT; break; } - suword32(&rwlock->rw_blocked_readers, blocked_readers-1); if (blocked_readers == 1) { rv = fueword32(&rwlock->rw_state, &state); if (rv == -1) { @@ -3361,12 +3374,14 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock, struct _umtx_time *timeo sleep: rv = fueword32(&rwlock->rw_blocked_writers, &blocked_writers); + if (rv == 0) + rv = suword32(&rwlock->rw_blocked_writers, + blocked_writers + 1); if (rv == -1) { umtxq_unbusy_unlocked(&uq->uq_key); error = EFAULT; break; } - suword32(&rwlock->rw_blocked_writers, blocked_writers + 1); while ((state & URWLOCK_WRITE_OWNER) || URWLOCK_READER_COUNT(state) != 0) { @@ -3391,12 +3406,14 @@ sleep: rv = fueword32(&rwlock->rw_blocked_writers, &blocked_writers); + if (rv == 0) + rv = suword32(&rwlock->rw_blocked_writers, + blocked_writers - 1); if (rv == -1) { umtxq_unbusy_unlocked(&uq->uq_key); error = EFAULT; break; } - suword32(&rwlock->rw_blocked_writers, blocked_writers-1); if (blocked_writers == 1) { rv = fueword32(&rwlock->rw_state, &state); if (rv == -1) { @@ -3575,7 +3592,7 @@ again: rv1 = fueword32(&sem->_count, &count); if (rv == -1 || rv1 == -1 || count != 0 || (rv == 1 && count1 == 0)) { if (rv == 0) - suword32(&sem->_has_waiters, 0); + rv = suword32(&sem->_has_waiters, 0); umtxq_lock(&uq->uq_key); umtxq_unbusy(&uq->uq_key); umtxq_remove(uq); From nobody Tue Jan 2 01:13:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vx20Zg2z562tR; Tue, 2 Jan 2024 01:13: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 4T3vx16JBDz3b1n; Tue, 2 Jan 2024 01:13:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUY5EZaTFU9/+OGDYxNLL23Qb9b20LlAnP2WzqH5ywA=; b=tlfhW1sLrgdYuRa491wsfbVop3P4gSaMxsjokI4oAeI2rClxxNGrn0LZ+7F0eRAA/rnYZ7 RLa73FLKppvA21Ypo9gbuSyeMqTw+WFaoStUGKyyLqWPQF+lH9jBEprkdR3l1e2KDfEPbT D57wa6uvH4h3okbKCnRdH6+ipCFV64RvYHUBZOOhIpfCOvXrGjQZwbXx/Yp11uitLLfudF P9X/y5fftJ/xIWup+SWuu422udvuNxy8hhNFMukOX0qw41VwjN5PAvXiZorksxEGp5ILCD hwJ4VcjqKAX8uMlfxmYJ1BL2ucTcolw1cdya+s4US+Vw1Lmy3oCqGEcL1bio8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157989; a=rsa-sha256; cv=none; b=M/HvRuMfllC1puO4yRbujRtScRQFd8uy4A2Letj0tsW3mYhYuO38DpL/JY2HIybUWf4E6N rzFvVeS6BdeElAt3dXJhO6MtD61ds6Ji1gqSge/hu/nqeeSQIR+A+8d9w8bu/V/tdnZruY 5SIcaliFwFjp3zq8HP+wCbHzMpECKoNGGeFN1GmVzsJe4HmQ9n8nPKp/IUoN1JUfVfF29x oUBd9A5s1DylmBrVbWPa4OXx1VBz2JJnHn/MTyadgIcs8k1rUj9jYGZN+4Qbn+audgjgtc 4WBUY03/4YC2PER7e1MwA3ohQKE1O2yEDsCUnsV0DFdG5YwDGL3O/gQFUqiI/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUY5EZaTFU9/+OGDYxNLL23Qb9b20LlAnP2WzqH5ywA=; b=GZVMeam3RiCR3ZL3dHm+eUCNp9b2AnrAgimMtLH4ri51FUNwJe+kTmwc9mQnUfe99qMx/Z qMMf44+9reGhuRPR2IBNIqXwnS3PMtEPK1WgAgkPvKbCfCB84yZIQBAPkGNG8tu1l+z+VI ihwP2/uUvmm6c5j/kTPiMJd7GIS61JgQjEo/GbR9D25hdMCjHWuCn79S49y1FXArjxx8c1 Z5AJcu1d9NDDIvBsbmTX3tgYYG8DX/qaLH3oAQmrJNqxhFE3wn3B2d5Ow3aFOdDLGURTOQ 44WlhLOC8sOBYG4msM7qghpVb1x8VSM0YPBuiGxJIdY1sA+OvXmNtzTzELClug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx15NtMzgRF; Tue, 2 Jan 2024 01:13:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021D9xd055236; Tue, 2 Jan 2024 01:13:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021D9ul055233; Tue, 2 Jan 2024 01:13:09 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:09 GMT Message-Id: <202401020113.4021D9ul055233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f01b5e418745 - stable/13 - mps: Handle errors from copyout() in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f01b5e41874584ffe3547e79bd80c2b20e557176 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f01b5e41874584ffe3547e79bd80c2b20e557176 commit f01b5e41874584ffe3547e79bd80c2b20e557176 Author: Mark Johnston AuthorDate: 2023-12-26 01:42:33 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 mps: Handle errors from copyout() in ioctl handlers In preparation for adding a __result_use_check annotation to copyin() and related functions, start checking for errors from copyout() in the mps(4) user command handler. This should make it easier to catch bugs. Reviewed by: imp, asomers MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D43176 (cherry picked from commit bcf4a7c7ace21a01d10003de9c7692f0887526c1) --- sys/dev/mps/mps_user.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c index 49dc0f05619c..48c2809eadff 100644 --- a/sys/dev/mps/mps_user.c +++ b/sys/dev/mps/mps_user.c @@ -727,9 +727,9 @@ mps_user_command(struct mps_softc *sc, struct mps_usr_command *cmd) } mps_unlock(sc); - copyout(rpl, cmd->rpl, sz); - if (buf != NULL) - copyout(buf, cmd->buf, cmd->len); + err = copyout(rpl, cmd->rpl, sz); + if (buf != NULL && err == 0) + err = copyout(buf, cmd->buf, cmd->len); mps_dprint(sc, MPS_USER, "%s: reply size %d\n", __func__, sz); RetFreeUnlocked: @@ -859,7 +859,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) /* * Copy the reply data and sense data to user space. */ - if ((cm != NULL) && (cm->cm_reply != NULL)) { + if (err == 0 && cm != NULL && cm->cm_reply != NULL) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; @@ -869,8 +869,11 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) __func__, data->ReplySize, sz); } mps_unlock(sc); - copyout(cm->cm_reply, PTRIN(data->PtrReply), + err = copyout(cm->cm_reply, PTRIN(data->PtrReply), MIN(sz, data->ReplySize)); + if (err != 0) + mps_dprint(sc, MPS_FAULT, + "%s: copyout failed\n", __func__); mps_lock(sc); } mpssas_free_tm(sc, cm); @@ -1013,7 +1016,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) /* * Copy the reply data and sense data to user space. */ - if (cm->cm_reply != NULL) { + if (err == 0 && cm->cm_reply != NULL) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; @@ -1023,12 +1026,16 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) data->ReplySize, sz); } mps_unlock(sc); - copyout(cm->cm_reply, PTRIN(data->PtrReply), + err = copyout(cm->cm_reply, PTRIN(data->PtrReply), MIN(sz, data->ReplySize)); mps_lock(sc); + if (err != 0) + mps_dprint(sc, MPS_FAULT, "%s: failed to copy " + "IOCTL data to user space\n", __func__); - if ((function == MPI2_FUNCTION_SCSI_IO_REQUEST) || - (function == MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { + if (err == 0 && + (function == MPI2_FUNCTION_SCSI_IO_REQUEST || + function == MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { if (((MPI2_SCSI_IO_REPLY *)rpl)->SCSIState & MPI2_SCSI_STATE_AUTOSENSE_VALID) { sense_len = @@ -1036,9 +1043,13 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) SenseCount)), sizeof(struct scsi_sense_data)); mps_unlock(sc); - copyout(cm->cm_sense, (PTRIN(data->PtrReply + + err = copyout(cm->cm_sense, (PTRIN(data->PtrReply + sizeof(MPI2_SCSI_IO_REPLY))), sense_len); mps_lock(sc); + if (err != 0) + mps_dprint(sc, MPS_FAULT, + "%s: failed to copy IOCTL data to " + "user space\n", __func__); } } } From nobody Tue Jan 2 01:13:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vx31ZQRz562fD; Tue, 2 Jan 2024 01:13: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 4T3vx30NXzz3b2D; Tue, 2 Jan 2024 01:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wRAid2vbstxc6Kd74d573h+RT6uiEtIDoT1toXg127I=; b=NL54D9fQ2hMF/tJ+OH3eMGMJTBRvhdyD89EevHCu+8eZ9lIH2VOoV22+ZBYO0E6HhfIJg0 e4BsW0zpq+ddDgR85Weng9MIF7IdabEDUiulraeW9LDl9pq1PjDODi0VZXVOnTQrgZKBx5 +l+83e0cjc4aqwADKjvO3fUt4xwu7zn3N2kBZ2zPoNe/0IkL2dBG2XgLR9pONFGkzVyYQW vfUgS9vIEQkeHtryQRQz3AADXJR70zJ6plWTGOa4r+TOp4mm3Y8FZp6St8zJVOLAvvYwlm Gnmuo3BxRNjLdZPP15vz+Qdu+KvEcWZzwUJqvljds3cwItcSWLov+Q/UlNmmNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157991; a=rsa-sha256; cv=none; b=wgvgIqQZXoKSO5JDU0evjTh/emmtQobXThRJXEEuYFM3TJovt++XIf9KkNi10PFOn04STY 3R0Z9QqBua/RuX9ORS8+5LMNX2Uekb5gpddX1PjmHEZ/6DdkG2K6yRp5ERz2fWfAm6pNhp T2VMeg7oknmlQPNzX36+hWhYdJ7Ws/Thw6hxyNT2Qoj4p46AIxUWGheNPa9HXa8cxTkyk/ twLuiOi4wKZCO6nwYM/98LArAR0+Q3rrDkshYlEonh6KbFxRXR8h7jGRNHGEzOC2TzihBf H8EKMomV3+ld5BZ3b28hAI7nXNB2E3iixKKd5rVpbQtbPp1vZK1AcVSctvJJsg== 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=1704157991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wRAid2vbstxc6Kd74d573h+RT6uiEtIDoT1toXg127I=; b=EoEO8+qPusrrHyJvVSzBIuwshMhAwWIe1n1hxCIhQAnO4HYhfvwORfpbjpTGQFn8sfAFaX +F5XyqADsCPC+EhHU6Bw0z02+BBfHffOTBHaeHqnCqDAdWl9zA/yRFX4Mvocuqij8E4OVS lwFQCy7Yp/v316yP4/9s2bl9e+N2W6RUR2LAxvsXwfiKxyULRE20ysFjYtjPkSyDODLK3P ot1PznTV36qbk0pPe5qPNw7RUVZgUh96/XV7J2B7wsALnP/quSrW3519iJ5EezU/ZXDNGV IJ+WqRiA30IkQjkb7XEa0XQb1/ckPowoQMnRWR3dFKcEkfhop+ZtYGQvONE55A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx26SQHzgLn; Tue, 2 Jan 2024 01:13: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 4021DAUn055290; Tue, 2 Jan 2024 01:13:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021DA7a055287; Tue, 2 Jan 2024 01:13:10 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:10 GMT Message-Id: <202401020113.4021DA7a055287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4392ef59412d - stable/13 - mpr: Handle errors from copyout() in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4392ef59412d7954c09283208781f5dbf4cabd24 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4392ef59412d7954c09283208781f5dbf4cabd24 commit 4392ef59412d7954c09283208781f5dbf4cabd24 Author: Mark Johnston AuthorDate: 2023-12-26 01:42:49 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 mpr: Handle errors from copyout() in ioctl handlers In preparation for adding a __result_use_check annotation to copyin() and related functions, start checking for errors from copyout() in the mpr(4) user command handler. This should make it easier to catch bugs. Reviewed by: imp, asomers MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D43177 (cherry picked from commit 68cc77a3b73ffda1e8ac891b9852faca833e11b7) --- sys/dev/mpr/mpr_user.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index f2847ae36d66..5245129ce8c1 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -714,9 +714,9 @@ mpr_user_command(struct mpr_softc *sc, struct mpr_usr_command *cmd) } mpr_unlock(sc); - copyout(rpl, cmd->rpl, sz); - if (buf != NULL) - copyout(buf, cmd->buf, cmd->len); + err = copyout(rpl, cmd->rpl, sz); + if (buf != NULL && err == 0) + err = copyout(buf, cmd->buf, cmd->len); mpr_dprint(sc, MPR_USER, "%s: reply size %d\n", __func__, sz); RetFreeUnlocked: @@ -848,7 +848,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) /* * Copy the reply data and sense data to user space. */ - if ((cm != NULL) && (cm->cm_reply != NULL)) { + if (err == 0 && cm != NULL && cm->cm_reply != NULL) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; @@ -858,7 +858,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) __func__, data->ReplySize, sz); } mpr_unlock(sc); - copyout(cm->cm_reply, PTRIN(data->PtrReply), + err = copyout(cm->cm_reply, PTRIN(data->PtrReply), MIN(sz, data->ReplySize)); mpr_lock(sc); } @@ -1073,7 +1073,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) /* * Copy the reply data and sense data to user space. */ - if (cm->cm_reply != NULL) { + if (err == 0 && cm->cm_reply != NULL) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; @@ -1083,12 +1083,16 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) data->ReplySize, sz); } mpr_unlock(sc); - copyout(cm->cm_reply, PTRIN(data->PtrReply), + err = copyout(cm->cm_reply, PTRIN(data->PtrReply), MIN(sz, data->ReplySize)); + if (err != 0) + mpr_dprint(sc, MPR_FAULT, "%s: failed to copy " + "IOCTL data to user space\n", __func__); mpr_lock(sc); - if ((function == MPI2_FUNCTION_SCSI_IO_REQUEST) || - (function == MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { + if (err == 0 && + (function == MPI2_FUNCTION_SCSI_IO_REQUEST || + function == MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) { if (((MPI2_SCSI_IO_REPLY *)rpl)->SCSIState & MPI2_SCSI_STATE_AUTOSENSE_VALID) { sense_len = @@ -1096,8 +1100,13 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) SenseCount)), sizeof(struct scsi_sense_data)); mpr_unlock(sc); - copyout(cm->cm_sense, (PTRIN(data->PtrReply + - sizeof(MPI2_SCSI_IO_REPLY))), sense_len); + err = copyout(cm->cm_sense, + PTRIN(data->PtrReply + + sizeof(MPI2_SCSI_IO_REPLY)), sense_len); + if (err != 0) + mpr_dprint(sc, MPR_FAULT, + "%s: failed to copy IOCTL data to " + "user space\n", __func__); mpr_lock(sc); } } @@ -1116,7 +1125,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) * the same IOCTL structure and sense buffers can be used for * NVMe. */ - if (function == MPI2_FUNCTION_NVME_ENCAPSULATED) { + if (err == 0 && function == MPI2_FUNCTION_NVME_ENCAPSULATED) { if (cm->nvme_error_response == NULL) { mpr_dprint(sc, MPR_INFO, "NVMe Error Response " "buffer is NULL. Response data will not be " @@ -1130,9 +1139,13 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) sz = MIN(le32toh(nvme_error_reply->ErrorResponseCount), NVME_ERROR_RESPONSE_SIZE); mpr_unlock(sc); - copyout(cm->cm_sense, + err = copyout(cm->cm_sense, (PTRIN(data->PtrReply + sizeof(MPI2_SCSI_IO_REPLY))), sz); + if (err != 0) + mpr_dprint(sc, MPR_FAULT, + "%s: failed to copy IOCTL data to " + "user space\n", __func__); mpr_lock(sc); } } From nobody Tue Jan 2 01:13:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vx41fVzz562tT; Tue, 2 Jan 2024 01:13:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3vx41173z3Zyl; Tue, 2 Jan 2024 01:13:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBew6MCXAk8uqMOZK4Ua2/o8MSAXjWulDP3s3Jfc4o8=; b=Jn4yeDJ1znl/+6ZEy9UxiG+F7Bwf8xrq6su2N8SzOZtZjpX7pNuSruZ6IZr4TqxRLVv8Eo oTPwMUjUznp+l3CtF9qrmUAueqRSq6wcOwJaCxuRhvJuB2/ZfEQsNMrJC9L998UIpvgNUa ppM/AIctSOT+JasS83gZDeNv9Q28zAHvWp63yp4aCLmLO4JIJ1CtnCQe0rO+2q5D/EhJGq Hv4jsi5Ia3BBpTsL4cnyrLxuuMzGQOPJeUraY8u78FhOJtzDlRnJ1JE5LPtxx+OA9ShO23 iP8KCa66udGXKa7jo1at1z56dcTF5t4qWYjwrCDw7qTD+ix//gaE01rFtxiyZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157992; a=rsa-sha256; cv=none; b=OeZc8OVo/pyXrnYbLDR29cgIQUghzEHbCM8/kHgXk8b2+3Wn4mX3DhMZR7QtF0c3Is3eBH 4FIiRlypMrP8AqtF5rtxai3CD829Zmb8sAUekK9wlWNEfZ2YEIHjP4xVXzGrL/WMtqa88v mAZQwnxIDzpbDEilggE04m87kcI5x53/7pdkVBzYAMevTPnbIzbLVb4+3DZ5M1jpjXmdTy 7ScnBNFa3OBLO0HdXMoib8CfG1TXyUFdV5W+G5BO6ll06OvqlvbbdVvOQDzFnRafn3Df7E NjDIQUXbZyrgabAhjwhIFIbxBxc/U79PRZLmwx2OAiKGFpONyT8T8kyYC1lTXQ== 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=1704157992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBew6MCXAk8uqMOZK4Ua2/o8MSAXjWulDP3s3Jfc4o8=; b=bZzu6xdv23/bRAPeb08osSFCPgDaHlALourMNu+f7KvH3EklColWBSGbOCN+moRzR5eY2+ v55gYNV3bo9Ke2gKvuKH9/UD/l+ZKU6ep1XErrApTX4J2TeDQ2KgUejvRnnvt34JoUbgD4 hjCsQIOUlCNuNTT1cA34qHjhVNQy/GMr3YyAtPpsSK6M0j/7F0Ns3Ehi2ca6ePwsZ8LQLa 1AfAH90eV52AWnAzJ5EX1n3rIiJ0SIrYL5+/mkm+B8vXrvhHuKAEYsms4hoJcQsJb8I5Si u3wK9Ss8h+TrH/DO3oLtXgAZSuzKrpo0o0qoikiZec/XSrhEfDE5ybkYmf4qvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx406BWzgtJ; Tue, 2 Jan 2024 01:13: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 4021DB6D055338; Tue, 2 Jan 2024 01:13:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021DBcb055335; Tue, 2 Jan 2024 01:13:11 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:11 GMT Message-Id: <202401020113.4021DBcb055335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c69e922c6217 - stable/13 - gntdev: Handle errors from suword32() in gntdev_alloc_gref() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c69e922c6217717a2ab55215f10f8d6ffd34c2f0 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c69e922c6217717a2ab55215f10f8d6ffd34c2f0 commit c69e922c6217717a2ab55215f10f8d6ffd34c2f0 Author: Mark Johnston AuthorDate: 2023-12-26 01:42:58 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 gntdev: Handle errors from suword32() in gntdev_alloc_gref() Try to copy out output values before handling errors, and check that we did so successfully. In particular, it doesn't seem sensible to ignore errors here, otherwise userspace won't have any way to refer to the allocations. This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: royger MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43145 (cherry picked from commit 6cdff09c0d70f780a738dbd3d87deb3b13ec8446) --- sys/dev/xen/gntdev/gntdev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/xen/gntdev/gntdev.c b/sys/dev/xen/gntdev/gntdev.c index f40a5b2578ec..81c965c54ae5 100644 --- a/sys/dev/xen/gntdev/gntdev.c +++ b/sys/dev/xen/gntdev/gntdev.c @@ -384,6 +384,13 @@ gntdev_alloc_gref(struct ioctl_gntdev_alloc_gref *arg) } } + /* Copy the output values. */ + arg->index = file_offset; + for (i = 0; error == 0 && i < arg->count; i++) { + if (suword32(&arg->gref_ids[i], grefs[i].gref_id) != 0) + error = EFAULT; + } + if (error != 0) { /* * If target domain maps the gref (by guessing the gref-id), @@ -402,11 +409,6 @@ gntdev_alloc_gref(struct ioctl_gntdev_alloc_gref *arg) return (error); } - /* Copy the output values. */ - arg->index = file_offset; - for (i = 0; i < arg->count; i++) - suword32(&arg->gref_ids[i], grefs[i].gref_id); - /* Modify the per user private data. */ mtx_lock(&priv_user->user_data_lock); for (i = 0; i < arg->count; i++) From nobody Tue Jan 2 01:13:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vx53dVMz5635N; Tue, 2 Jan 2024 01:13: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 4T3vx526mrz3b9J; Tue, 2 Jan 2024 01:13:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7H319WPR5U1umV1A6fexL4bmslnw5DqEAJQFqfiEFHw=; b=nfR2kcLM4W+BRuASDU4DiuvdVsEQE8aV09RCyD5O8uFQaHCqWVII0/j66Zr+s8ximW5VQ/ HSs/R1IX6BZUNFzBuoRHg3qMDF+bv+270o+/jK2NI2J0Pau7vfvE2ThJf7GegmK+da1T+1 P/T6dTBs6vGMxG9L6JQck+LcDdHX9xuxqVgjqjaCfx3d3SucGaRvordLlof+l+wisK0XWx 7SXGY1G1jQlpE/y/GJ3jOxAwhMltPCDd/DYm9kjFz4wQEY2Jhp8r6BFamxoWibG8habGBl YeoZMhJlYkPxmcHCtEs2aVjqfzcuwpx0J9oO4S6goCjCNia+BXsB+6S7ulN6xA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157993; a=rsa-sha256; cv=none; b=je7UvvOj+Kw3ZS/tvhRQPyayPfLJlqgYUz8KKNyV156k/4e9Ew0t/q+9t5Tzm06D3VKhGj aPhru74gI6GkeEjYjK+8wuijLrCx3awQUN6mbvQZTO6yG0SaZcByaCgecLU+rjqh4E4E+V OsPzApzmjyNrtSd++YSzFF/KV+Ny8HTnMPVgjPLUGKVBOyVOiR6gLM+rSLtZa25aEv+v1a 5qqp6G2qq5hIH0M54w6mj7mwfMyFcypdxewqFV0bVh6pGzE4vyLoZiyZRJUXtHynbDK8dP YyTusNBGlrUC42CAlo7yFFz1EVhYoAYQuF3E0J+6C4IigMtKxmz57GLC15vvoQ== 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=1704157993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7H319WPR5U1umV1A6fexL4bmslnw5DqEAJQFqfiEFHw=; b=HHPeqPTR88Sh3XxSoPWXJUwPplqdN0f99MNzKri6rueo9Ns1I6R2vAnkJqn653wcjuscn+ 1wxGfeDg7Re4iwUsJ6BYoz56njrnlDcgoHiwpaXt5MwP6JylPfbPtuCfKTMhW/9d2B28kA tWJlVGWoTMmDd4U4INh+1tq33IwHak1c0v8ZR0BBmdiT80Bk5Z43xEdVO06wn+rUwsaWJ/ OX3CbuqFk3EC4K5dznti8rk+ZmTcUPGABXEZLDrABjMI/jp/77e/UwV1wIilC4facDnHh6 SXOPu1WtovZIiwsU0H0BKaoCKBXktWj+wwYHFcIoSAXOuRa+NVk44PeDMcy7GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx510bkzgc3; Tue, 2 Jan 2024 01:13: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 4021DDKE055383; Tue, 2 Jan 2024 01:13:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021DDGc055380; Tue, 2 Jan 2024 01:13:13 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:13 GMT Message-Id: <202401020113.4021DDGc055380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bd8a789e3c28 - stable/13 - geom: Report copyout() errors in g_ctl_ioctl_ctl() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bd8a789e3c28e4f2debf0c511c89fadbc29a34f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bd8a789e3c28e4f2debf0c511c89fadbc29a34f9 commit bd8a789e3c28e4f2debf0c511c89fadbc29a34f9 Author: Mark Johnston AuthorDate: 2023-12-26 01:43:06 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 geom: Report copyout() errors in g_ctl_ioctl_ctl() Despite the name, req->serror is used in some cases to copy non-error messages to userspace. So, report errors when copying out so long as they don't clobber an earlier error. Reviewed by: mav, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43146 (cherry picked from commit bbf221e3e822d15dafb37bd8e200a9864f2636b4) --- sys/geom/geom_ctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c index 33ec28dcd371..bf029e749102 100644 --- a/sys/geom/geom_ctl.c +++ b/sys/geom/geom_ctl.c @@ -556,8 +556,10 @@ g_ctl_ioctl_ctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct th } } if (sbuf_done(req->serror)) { - copyout(sbuf_data(req->serror), req->error, + nerror = copyout(sbuf_data(req->serror), req->error, imin(req->lerror, sbuf_len(req->serror) + 1)); + if (nerror != 0 && req->nerror == 0) + req->nerror = nerror; } nerror = req->nerror; From nobody Tue Jan 2 01:13:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vx64gYpz5635Y; Tue, 2 Jan 2024 01:13: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 4T3vx62tLYz3b6t; Tue, 2 Jan 2024 01:13:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xRfR7ku6LcsIj0hriTJbvA9phipDByCz4UOgxizb8kQ=; b=xa8AGtHwfAeUICOQNkbWlY3F0Xze7rlAlY/fIz5Hx2efaP0hBIjbrcgs0tUiDg4hXVcS8T FDG0cpZvWewhi9qsiweyI7S7JYf2KSPxFSuByGVc0sSUVA2PTr2fDMENOPMdgAh1TjisRP siN+4fFGd9CVbwzvyNSscioXjAhUTSfZsfHfK325SJT35J6QdJV7zLACOnze57qGO5S4OW pbj/xcZUsx3IhIe9ytXuj4cvVJtF9cjVV5W1+SbhDgmmyBiThTdAmcvDLwBoP18LGW3hn4 xSr1tK3t6ZgiZdEwVxYDv3r5dp30Q4XNVp1JjNBnoo5wrXGoFU65Vkvvz3Yo4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157994; a=rsa-sha256; cv=none; b=q4X8xBBV1wEGR68KAw0e4Fra25DwaKDZ4UkYFAKeI/D9Csf9vQ/iO6ADTK0oDtL7LEhuys gsFW7Y+2xuHS9UTiqWKpiW30Staccbdnpn2yfk9yNzyrJnM11ypbtpL/Hj6LZvQpAnGeiM CB74FRXsWXSNPEhjV+dOc/vHgFMOoKozBbWhnUdQdXBQ+4fbvL3g9lYtu9pntGlGBQp6kS t/l4IKAKYfAFQ8tWRIWrSejAnRlx8wrd5MD1oed7xeC0m1hz1Pn2mdEPDzfHp4pSCZbdwC 61HXS35L/hqzEQ4lO0GJXuHqYQ4iMNN+Jdo1iJSJZ7syGqQmt20z9HwaudeVwA== 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=1704157994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xRfR7ku6LcsIj0hriTJbvA9phipDByCz4UOgxizb8kQ=; b=yZT/fugAQ9yXeckruwRY7bU9d5wnc5bwj0yJud2Fx6MJsgK1c5MiG5/fPKmj5EtWLvc/oh UGOAI3FM+E+u3F3Sfj5zBpFIjM2N9tdLZySP/nNU4KWhJ2umVEfduvMLn7iXM8bgvx7XN0 vp7TbRtbCPAbYE4Yq9cHA3qLsuCBKLcQQyoszrfCBlBdlkHZUlWECmrZfmeRVBKAZdM5Sc Dt7e7dfJeoUsndfIJGThSPUO1rkDFeC+D28vmirQeOAhtENWcRTXClpuA/xYwwtdXBiam+ haZ7yWO6QR7QnC1TffOz2/PXYjiSVF2un6whETD28cvAJ+iYdKoRI4Njg97ZQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx61zpNzgc4; Tue, 2 Jan 2024 01:13: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 4021DE25055446; Tue, 2 Jan 2024 01:13:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021DEhh055443; Tue, 2 Jan 2024 01:13:14 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:14 GMT Message-Id: <202401020113.4021DEhh055443@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 96df9d0478ab - stable/13 - nmount: Ignore errors when copying out an error string List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 96df9d0478ab642ba4ee8d89b4c2bef6328aa74c Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=96df9d0478ab642ba4ee8d89b4c2bef6328aa74c commit 96df9d0478ab642ba4ee8d89b4c2bef6328aa74c Author: Mark Johnston AuthorDate: 2023-12-26 01:43:21 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 nmount: Ignore errors when copying out an error string In general we copy error strings as part of reporting an error from lower layers, so if the copyout() fails there's nothing to do since we'd prefer to preserve the original error. This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: olce, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43147 (cherry picked from commit 099d25c354d93d9cd9c9cd261428f5ab0547a194) --- sys/kern/vfs_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 8ad5b34c729d..756ac4789c8c 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -882,7 +882,7 @@ bail: fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); } else { - copyout(errmsg, + (void)copyout(errmsg, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); } From nobody Tue Jan 2 01:13:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vx75dbDz5639J; Tue, 2 Jan 2024 01:13: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 4T3vx73yL5z3bCv; Tue, 2 Jan 2024 01:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jc+EcZ9EZPqYdZxFa7MaaEogMIbT1nkWIULzJZdAylY=; b=jsSa8tY6T/zpymqgInL+8Me5rPMs3+eBy/3cfgHOwU7KM4Ogn03ty6/cVRV82x1fKQepKj 5xA4aBHmwUvPZ7M5UWizn7icBkasGt4iapKg9NrNl58FxKv/16iQwdcf+uxJNMM5Tovzpu QOf62r1ggr6w/VHRpSe36YxzZf1U4raLcU+EV2RILlTZg11r9F9ty1+b5ZxYG9ChH6N3Og WfYA0DvMUQGi3Zzwn4uD0gMIYX/5+gJrIR8c1WcAN5JMRtRdQYpNM+hjAQWVlW5VgGPN/h gxMKrGxkgyiy8MtlTW0q/1XXGyD1+xpVdlnZnYuxLKgLBk/9owyQSgwjlYSWoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157995; a=rsa-sha256; cv=none; b=pLiU1U5pg46XobLPfy04xHj1UPwGy1HQMqTwg/0nkedmAZLx9/a83pSHF9qsjyAcsoG7BI HxQ0CTjyNsUHUEIpD0vKTsyo8Y6fpqPdeoEUAwzOcGZgVGBV5Ypdg2kxBMGgGmFleyZv2n 64suGLgFSnx3zwnjzsXAU8PSNiXM6zib8DEvu+H+QdUnQ7DTqCq323z23f+uu+5YEjYAaC 1j1saT5D1gpKOEdbUb3NlTBZjJCiO+CnB4jz7d4S6/WmEURqK4cBkcRx9ltUJs1xiQXRhF 6z3ocKZfgOq3Y7R+Ude2D8Ts9XjUxHjvPQAXPwkkoQ/CpLRANjyoZZlxGsJ8fQ== 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=1704157995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jc+EcZ9EZPqYdZxFa7MaaEogMIbT1nkWIULzJZdAylY=; b=gn0EUa69WNzILrHtXeF/rOUsmdpBMXi4REpiyTYUhpL+i2sealIT0CweRzMYrIEJjoJ3yJ v3PlsjljEmIkW07q3dLEioURumwUprM9UejeetmjjFjkb1h/h/bhpixrc8bBIXXqMgrlvV Vfd0xsZtvJzUP2S0Js3LDoEK7pJavbHRMvA6LI9SvfYUkmOXLlR/bzzYangrN0uOxYhTKn QIovBFYY7f9bGe97zK7WEVoAp/3ZFDBVgCPR0U2WgMsPq90u9qyTTPuEsZMLjwzVOu5m4J a5DZqgfd6l3vW0h5C9Gea3ST4joge6KrH1lplgTms78tmOY5tWLGNS1FhzJOxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx733DDzgLp; Tue, 2 Jan 2024 01:13: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 4021DFrU055494; Tue, 2 Jan 2024 01:13:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021DF0o055491; Tue, 2 Jan 2024 01:13:15 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:15 GMT Message-Id: <202401020113.4021DF0o055491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5f5da36a3a05 - stable/13 - iscsi: Check for copyout errors in iscsi_ioctl_daemon_receive() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5f5da36a3a05876dfaeee51810913e5558357662 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5f5da36a3a05876dfaeee51810913e5558357662 commit 5f5da36a3a05876dfaeee51810913e5558357662 Author: Mark Johnston AuthorDate: 2023-12-26 01:43:31 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 iscsi: Check for copyout errors in iscsi_ioctl_daemon_receive() Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43148 (cherry picked from commit 74e713804fa4767991c5f20e6b85da4235107122) --- sys/dev/iscsi/iscsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index ec5adf417867..51cfe7aca71d 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1863,17 +1863,17 @@ iscsi_ioctl_daemon_receive(struct iscsi_softc *sc, return (EMSGSIZE); } - copyout(ip->ip_bhs, idr->idr_bhs, sizeof(*ip->ip_bhs)); - if (ip->ip_data_len > 0) { + error = copyout(ip->ip_bhs, idr->idr_bhs, sizeof(*ip->ip_bhs)); + if (error == 0 && ip->ip_data_len > 0) { data = malloc(ip->ip_data_len, M_ISCSI, M_WAITOK); icl_pdu_get_data(ip, 0, data, ip->ip_data_len); - copyout(data, idr->idr_data_segment, ip->ip_data_len); + error = copyout(data, idr->idr_data_segment, ip->ip_data_len); free(data, M_ISCSI); } icl_pdu_free(ip); - return (0); + return (error); } #endif /* ICL_KERNEL_PROXY */ From nobody Tue Jan 2 01:13:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vx90HXKz563Gk; Tue, 2 Jan 2024 01:13: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 4T3vx84lc9z3bGK; Tue, 2 Jan 2024 01:13:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJo6EoB+Ama6o/U8iHcyvsVxi7Q07kq5xSrxgrkxu70=; b=Lh6Mw6xVVDdJbpSqt7/6/z/Z3NmaAtEek3UIWTNQwBkcjF+2yhnGPGvNprR2KM7txBND48 cICgu6DhU0hyaCvJtOxM/ByfepWlm4Wt2pzyHUuGYxxU8LnfcWcAkfhMGkKQp1M0pVxnJ+ kJaHXkVVj7wSczS+IEOxU3OS9t1niXk7jMBRMc5KNSC/X/ZrFew9Ok53AwbO9ZZY2I80E4 cdfoAhpt+Z0SyPUH9NPKtsIMrB47as/zbEM6sNG6tolJyIviWiDZsCB+HhP6V8T1eWsBw6 dZ/Gh54Jfc6uLc54mgTqB0dTqTfbKv64L221fv87MhWmUdYKyquZR9QGCXjFag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157996; a=rsa-sha256; cv=none; b=jcel5FYYj0XsEkZquzdHEA9Bh/tN8xwXD5SYwT3fIsHr71QtQMvLX/gslTy3h1HbRv+uaP Sqos+GXhujkGLr4+D0rWeg1tI2LgaHVnGgKsS9XYJD7cRcGFwu+OikBcg22Det/mWWNSn+ Vh0eErrBw/+w4S70LCfwqSkA2MMAPjg4AccqWmiRoxKtSKiAfCGoYUUANhOWdMun3xiabl fisSjFVOPPKQhtcLkHUI5XYexyj7DbB5gbG6cJxxFPro5ctHO6vbD9FZeiOdhg0kRQmaI4 t8g0vLLGhDZYLKwQqfa1Yx4W7s7kyY65utFnDxuYgl+uWXmj/u6YVGx5ePWS1A== 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=1704157996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJo6EoB+Ama6o/U8iHcyvsVxi7Q07kq5xSrxgrkxu70=; b=F16vjIXy/N0sCraX03osHzn9suSjbm9GIqbMSpsEOUffQiEu5I71Gh36g+UpK4CqNV3gqI 0SRW2GgqhcVwTVluNuVu3FEML2Wb41d+h9UlBwQIG9EwGbddOuFKr2ZGfbYRywknW/H/AI ao3B+q8bqIrS8yGodtRkOaO08n9fP3X/8YGzTKi4cziLHuXgH+N3PWKsab222ryaiJQG9c LDw5sVj8Cdx+Jaa9Qezfl26WM/AdN2xAe+5mzjZrvSLWUA8OFZJLIITkq7grBs2JUcwRo7 GDo5mVmq8nx+4W21FxnVzZT8XV7T8kQa9/ykaGiBccAmDzXC0KYXD+iDcEIO8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx83ryfzggB; Tue, 2 Jan 2024 01:13: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 4021DGgb055546; Tue, 2 Jan 2024 01:13:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021DGf2055543; Tue, 2 Jan 2024 01:13:16 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:16 GMT Message-Id: <202401020113.4021DGf2055543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 736f172567be - stable/13 - compat_freebsd4: Fix handling of errors from subyte() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 736f172567be5f984f1202b388a798b8345d06ad Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=736f172567be5f984f1202b388a798b8345d06ad commit 736f172567be5f984f1202b388a798b8345d06ad Author: Mark Johnston AuthorDate: 2023-12-26 01:43:38 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 compat_freebsd4: Fix handling of errors from subyte() Upon failure, subyte() returns -1, not an errno value. MFC after: 1 week (cherry picked from commit c38df501ce2ed7da128448f815ec627c39fd3bad) --- sys/kern/kern_xxx.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index 8674dbf61361..ae88fc90eb7c 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -374,13 +374,11 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) for(s = version; *s && *s != '#'; s++); for(us = uap->name->version; *s && *s != ':'; s++) { - error = subyte( us++, *s); - if (error) - return (error); + if (subyte(us++, *s) != 0) + return (EFAULT); } - error = subyte( us++, 0); - if (error) - return (error); + if (subyte(us++, 0) != 0) + return (EFAULT); name[0] = CTL_HW; name[1] = HW_MACHINE; From nobody Tue Jan 2 01:13:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3vxB0YqJz563Cq; Tue, 2 Jan 2024 01:13: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 4T3vx967RMz3bP6; Tue, 2 Jan 2024 01:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704157997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=he9grLFCVgot1rIIOBBN9E/kMgqsJvB1GeN+RlOz208=; b=KIGBzySzHiUr2O6jsvT/duRO74j+7O3m85vb1TWzxdUgyrghRqwbhU+n5m+MutNxT0zfMr ngrhJ49r7BuE1xPQb15IFSWUZ5QswcUzzLxosl0DYT3PYXIlX8V0Pc5dYcNoTw8+G1l6Lt 6qhs9C34HVSh26+52h5BKeOxy5ZB5LdJ87EBEoeTke4JXUTmCYI/w9COO+qDeyVH0uHIiv DBcJ+lhsEMySS8QnhHx6UsAsoskEx+RsGDjFY32QWEmMD1roM8BJWKylCPs7djviigHXL+ whID05vGmVcYykJpYgsJI4ZmprHEIyiT+blH9j7cC13Yrs0i0308W1UeGDsJaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704157997; a=rsa-sha256; cv=none; b=cEUUVq3EtGNIN8rJRCl4ElgfWXUhj2mZH86SB85kfdbIqmlDopvcbPQrRS0kpunard+i4m UgNKHdyoTT3r7pYwxFkZvW+qhpUHdZmkZz32wLQO30QPoCcA0Dl+lN4///y+icfx0u+E4r 6aM8AisHszCP03L1ozTLUaWWdoR9u5svhFp5L3cgzeSVWRoWruYeL+cqn8HDIkc1fWec8b P08whVsCct+mi5JuCa4HZfhshQHmkK9YZj+T47X60j7g8gaDJXDZ7KsobJrarOatRlRPWl bE12qpITTAgOx7Y4IyB6Z0OAcO7YhyamYbIYFpqNtJ69m2VganR0oAgrgS8N2A== 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=1704157997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=he9grLFCVgot1rIIOBBN9E/kMgqsJvB1GeN+RlOz208=; b=D1ZwYpUac/jHXZuGLYJMlNolsE+3gSYpgnM60mJf60SrDoJe7Nbk2F+y5vkj95G1xvUCU0 lT0LCx2R3ueMxmOwEYNmT8/eejXR9IVNc/7MJ+BUlDFPTPsphTzuvn4tuHUegjPI7hH5c/ rLW4gUzzW4wcOyfVEZdel+4wTlTRjzT2nTz7zjH61hDPrQvYLcACLqiQwe4XwDOE9PR/6h TbSKZC5oNWJHyV1Jbp1TRtW28S1gA9WSA640XKKdgC8s8PnQT0RZJcTukDtWiis7VsjdB5 IXrHc9nzZQ2hWTMQvhriZsHx6o1QRuO8cdJbb095FvP3DKoPt8IsIiL7wF4EWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3vx95CSqzgv8; Tue, 2 Jan 2024 01:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021DHF6055611; Tue, 2 Jan 2024 01:13:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021DHxW055608; Tue, 2 Jan 2024 01:13:17 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:13:17 GMT Message-Id: <202401020113.4021DHxW055608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 10ba3e4ae8ea - stable/13 - mips: Add a return value to cpu_set_upcall() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 10ba3e4ae8eac4d6c8c99326914693305afccf6c Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=10ba3e4ae8eac4d6c8c99326914693305afccf6c commit 10ba3e4ae8eac4d6c8c99326914693305afccf6c Author: Mark Johnston AuthorDate: 2024-01-02 00:55:27 +0000 Commit: Mark Johnston CommitDate: 2024-01-02 01:12:45 +0000 mips: Add a return value to cpu_set_upcall() This is a direct commit to stable/13. --- sys/mips/mips/vm_machdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c index 48b5ff405628..5f8c85e23da1 100644 --- a/sys/mips/mips/vm_machdep.c +++ b/sys/mips/mips/vm_machdep.c @@ -408,7 +408,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) * Set that machine state for performing an upcall that starts * the entry function with the given argument. */ -void +int cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { @@ -440,6 +440,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, * Setup any other CPU-Specific registers (Not MIPS Standard) * that are needed. */ + return (0); } bool From nobody Tue Jan 2 01:22:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3w7f6BCTz5645q; Tue, 2 Jan 2024 01:22: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 4T3w7f5M7hz4DbF; Tue, 2 Jan 2024 01:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704158542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x1upFqhGpQRX7NVi5CfB6uielNg34SA3qB4uUP77KME=; b=gw5nt2Fhp2niOq0PaNXL7DeX+JB6itaY7Pqke6C7g1lF+suC+13Ytf47P/wgeSNzn6hriG vUkiDYWWnDYkfjY7pM8mx/FqeYVaJTKhTV1BmkcdzUdfaaQ1qwN6t3posBF7TVS80xxUPR Wx7N0w6QE3RB/HCBjzk9toJLqgWmEANzR9+DTBkKTGwKimY2fTlxqILn5Oyhvi1bZFKIrI OsBejKgJ+I8jUSr/gKOldLitflOHVgZt/efV5WoDCmYn8rJiAf6d3hInam/ZlVP6l5EQjp dO6ewJD38UixdSTmv9Ux0+V3BTT2ACJEnGjXqleysSnRWPAD1FwCFpdQQZ8cxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704158542; a=rsa-sha256; cv=none; b=kDABG7acckMFNrajXvEV2/WfRrQkDuer/LxsX8nuYxjrAAfkSFyB2nOoN1c1nHbmIabpoU /Fdng9yKBdwMUs9q6QT/Veq9N8cKJ+azmc+5GdzDFRs54xz3ma1TIQ+16pC6gnZPGkQjsv h9wzEbRWFEbN2kkdc67o6p9Ruf89a1iuudllHsGNVWYeWHdd08uoIOH2l7l7JU/U9Z+WlN FLwvBmaf8z7SOBCbmvTpADWLuOnqFRnvwbSwxJvPnoQrkdcBzV8Wopdbcc3EpdjuDZOJUk rwT+M96bShJmCqJjiUY5JxX8A4JQAgGZWJ32QbSoTfB9p+eyz8HoZT14cPVj6w== 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=1704158542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x1upFqhGpQRX7NVi5CfB6uielNg34SA3qB4uUP77KME=; b=DpGiO8seSNBDh+1pmcxf4AHGg72iIYL0qvy+ByVJAUiKhwfpR7lcqPmXrA5ihsskov1d1K lU1dP/Nc/7pbAyKWLfsvbCt9oxGSu0v69lL+Ss5GlQd2iP6OLLIp8/Zc6cABi0XRGD/605 zW/zzn9roLDu3sxwOv2nhf6B37sjcJi2sNjH8U7XvzDNR7eL/d/2EROUykD2IhIGBSJQr7 ShrDB9bnsDJOh48nuWlNibegMqz9pmlUY5iUljqaYu4Yi2LPR4eF9sAUdcSmYFPW/vA1JC YkmhtsYbWM++/gU76WXGmFO5glCQ+WhOoEPHyvMk5FEgeuiUPKO21hpnt3Wwkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3w7f46FQzh6S; Tue, 2 Jan 2024 01:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021MMt6072603; Tue, 2 Jan 2024 01:22:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021MMip072600; Tue, 2 Jan 2024 01:22:22 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:22:22 GMT Message-Id: <202401020122.4021MMip072600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: dabf1797a76a - stable/14 - nfscl: Fix handling of expired Kerberos credentials (NFSv4.1/4.2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dabf1797a76a7c87b8f38fb300fb03f20cf6f973 Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=dabf1797a76a7c87b8f38fb300fb03f20cf6f973 commit dabf1797a76a7c87b8f38fb300fb03f20cf6f973 Author: Rick Macklem AuthorDate: 2023-12-26 22:33:39 +0000 Commit: Rick Macklem CommitDate: 2024-01-02 01:20:17 +0000 nfscl: Fix handling of expired Kerberos credentials (NFSv4.1/4.2) If the NFS server detects that the Kerberos credentials provided by a NFSv4.1/4.2 mount using sec=krb5[ip] have expired, the NFS server replies with a krpc layer error of RPC_AUTHERROR. When this happened, the client erroneously left the NFSv4.1/4.2 session slot busy, so that it could not be used by other RPCs. If this happened for all session slots, the mount point would hang. This patch fixes the problem by releasing the session slot and resetting its sequence# upon receiving a RPC_AUTHERROR reply. This bug only affects NFSv4.1/4.2 mounts using sec=krb5[ip], but has existed since NFSv4.1 client support was added to FreeBSD. So, why has the bug remained undetected for so long? I cannot be sure, but I suspect that, often, the client detected the Kerberos credential expiration before attempting the RPC. For this case, the client would not do the RPC and, as such, there would be no busy session slot. Also, no hang would occur until all session slots are busied (64 for a FreeBSD client/server), so many cases of the bug probably went undetected? Also, use of sec=krb5[ip] mounts are not that common. PR: 275905 (cherry picked from commit a558130881e9d574dc5f37827fe2284667d5aba8) --- sys/fs/nfs/nfs_commonkrpc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 7ca150d4f54c..e5c658ce76d2 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1047,6 +1047,22 @@ tryagain: NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = ENXIO; } + } else if (stat == RPC_AUTHERROR) { + /* Check for a session slot that needs to be free'd. */ + if ((nd->nd_flag & (ND_NFSV41 | ND_HASSLOTID)) == + (ND_NFSV41 | ND_HASSLOTID) && nmp != NULL && + nd->nd_procnum != NFSPROC_NULL) { + /* + * This can occur when a Kerberos/RPCSEC_GSS session + * expires, due to TGT expiration. + * Free the slot, resetting the slot's sequence#. + */ + if (sep == NULL) + sep = nfsmnt_mdssession(nmp); + nfsv4_freeslot(sep, nd->nd_slotid, true); + } + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + error = EACCES; } else { NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EACCES; From nobody Tue Jan 2 01:44:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3wdW2ZRbz55s3h; Tue, 2 Jan 2024 01:44: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 4T3wdW24fqz4HWY; Tue, 2 Jan 2024 01:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704159887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhu+Sjdvj/eAMaS/F/ZLuCj3ypRNsj7Zrjb/H4S/ItY=; b=fFNYTjPsv7isKe0CYO9D2wwjWNB5+1re6WTTWnuQQPG3rLCJKwC3n37A0W3HHFfxBHuLvR TSCbNSr3A27KpAvhaWbMYvNhKF5RG+AYsjUFCv8/M42aHOTYoDjVt8B0sUitaUny+nqOvF UjriG5qyUXbil5x5RKDnnTMHsKJxdLGR5H/0TEr/SLnXoAEd9cz4P3FQQaEs6zlREV9Gp5 mvMui/usoebwTvhEOvDxtrttNc/YyfQPFMYNyE00TPefJ6izbYe38kuryV6fMI2uYVDdMM F12YxGcmXpKH2Up6aQdlYskd3cygpqL1YE3sRJ3i9TgUwI+Iex2beu5aF9z//A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704159887; a=rsa-sha256; cv=none; b=ruaqkkUzCr20WymRsKcoc64kJjeBh6z1Jh0T1siUtHMFr3yA5bEKig63ryPOqI47CEZatB udDhczEUX8BQARkUzhoeIcaL56myW4BnIVm6VOUKmfvHsYvkPOvjUP/UKm4yAMK1r76mx5 iEvpsqshBw40hB24PxQpXFf3u//amruXUim1bdjTA33sGXuXk+jO1N48HER+StCwy5uFnG 1uo8LLrYKPwlLesiycPMQA17iDyFJKAZ3YEsSvA0euQ+CYINLvQ+RDXYueCR89oLGVuKTO 6GOBn5KIz3g41eIfDebiF6+c9D91nuBSfDlMQyrEc1C92jaFkZBr1P9/CLoVWQ== 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=1704159887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhu+Sjdvj/eAMaS/F/ZLuCj3ypRNsj7Zrjb/H4S/ItY=; b=jcIDeIb6pBrzxQ3ZnQLy2TdxDbEUUHKbnFHZJXHsNZYnwucFLiBYn/Qk3310MBrA/qyWYh 4BX9pFwfQYs+C20vmOYAtiYdlSgawyF724AgUZ785TYaWMWcjficjOPon17qhGpWtM9BzF eshgcMEPN8gZl86BP71x7TWOOyLowzacqsA/RuwRx5juyWGCvyGkDrWrWRbepWJccwxETx lZpFBE3Bewe8utjOxvnu3rZjAc4moXSB66qklHDT10bKj2QXJwRfL/k21ZJ8dcywlpE40k Cy/oERo55slZtpFU2iFvdS/QTqk7mtee7ydHyNdB5zJpFkZzJ7SbizejJxodfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3wdW18Jwzgnq; Tue, 2 Jan 2024 01:44: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 4021il0N005464; Tue, 2 Jan 2024 01:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021ilBm005461; Tue, 2 Jan 2024 01:44:47 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:44:47 GMT Message-Id: <202401020144.4021ilBm005461@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: c85ff48a092e - stable/13 - nfscl: Fix handling of expired Kerberos credentials (NFSv4.1/4.2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c85ff48a092e4c5989f91a4a1ccf99441ffb3170 Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c85ff48a092e4c5989f91a4a1ccf99441ffb3170 commit c85ff48a092e4c5989f91a4a1ccf99441ffb3170 Author: Rick Macklem AuthorDate: 2023-12-26 22:33:39 +0000 Commit: Rick Macklem CommitDate: 2024-01-02 01:41:19 +0000 nfscl: Fix handling of expired Kerberos credentials (NFSv4.1/4.2) If the NFS server detects that the Kerberos credentials provided by a NFSv4.1/4.2 mount using sec=krb5[ip] have expired, the NFS server replies with a krpc layer error of RPC_AUTHERROR. When this happened, the client erroneously left the NFSv4.1/4.2 session slot busy, so that it could not be used by other RPCs. If this happened for all session slots, the mount point would hang. This patch fixes the problem by releasing the session slot and resetting its sequence# upon receiving a RPC_AUTHERROR reply. This bug only affects NFSv4.1/4.2 mounts using sec=krb5[ip], but has existed since NFSv4.1 client support was added to FreeBSD. So, why has the bug remained undetected for so long? I cannot be sure, but I suspect that, often, the client detected the Kerberos credential expiration before attempting the RPC. For this case, the client would not do the RPC and, as such, there would be no busy session slot. Also, no hang would occur until all session slots are busied (64 for a FreeBSD client/server), so many cases of the bug probably went undetected? Also, use of sec=krb5[ip] mounts are not that common. PR: 275905 (cherry picked from commit a558130881e9d574dc5f37827fe2284667d5aba8) --- sys/fs/nfs/nfs_commonkrpc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 29fbb8dc4351..3aa3129ad67f 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1040,6 +1040,22 @@ tryagain: NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = ENXIO; } + } else if (stat == RPC_AUTHERROR) { + /* Check for a session slot that needs to be free'd. */ + if ((nd->nd_flag & (ND_NFSV41 | ND_HASSLOTID)) == + (ND_NFSV41 | ND_HASSLOTID) && nmp != NULL && + nd->nd_procnum != NFSPROC_NULL) { + /* + * This can occur when a Kerberos/RPCSEC_GSS session + * expires, due to TGT expiration. + * Free the slot, resetting the slot's sequence#. + */ + if (sep == NULL) + sep = nfsmnt_mdssession(nmp); + nfsv4_freeslot(sep, nd->nd_slotid, true); + } + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + error = EACCES; } else { NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EACCES; From nobody Tue Jan 2 01:56:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T3wvD6GpKz55t7w; Tue, 2 Jan 2024 01:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T3wvD5ZpWz4JgN; Tue, 2 Jan 2024 01:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704160600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wmYbzJI1e8AmAZHBnh3EGyPwy+gAmNFpTIWxtUKctLQ=; b=UtesNd5ia8lGVZuOJshI5lvcCbwWpIi5chDIN1mFGzmskAdobqx/1nceBF5dcyg0yT1lg/ DCdsJiIe64GNaM7nzgItssM1cRoNX/rSCNAXdwwsztOPJOFmFZ7u20zus+a5Vr3iJXjaRZ sXUP2fbDH5MkTJu63eX3Tmj0cpzhCFmKDF0YJPgFvI7GfKYOburGkRHWgJqDl7lDkFgteS iuKcY5+C21XpWJAo8qe6+cfiIoODw12eLy/PXOY6jiHUuB6fUfkoI5Sa3ZLRhMTHRx/KlD vgvTCvGNbIvH39/MKHHltr2pr+ffGECvVdxVuztyCtIOTlNW8NZpCR4r7AMqEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704160600; a=rsa-sha256; cv=none; b=YPA8ebUssxvLQgHS6Aoi2HlJ5U0Bn5w3C0NmICvOCrW08vMh91/gND9O+CYG3g/ry8JaE+ u3YpyDvt0+vNzxBXL2bzPeO0hvFCxFdgzCztoEbcqCUzoEQfloi5XIknaUgcMJ9l7B3gR+ tb9ulG7je6MCmauLfeYYPWYT7lm1ZAB6UvMbFqNygAlW/4BcPmVsKDRjTMAsSq0gOIMTAw ihzQgYXT3kDRBlZn6kYEfneYjwI/zvJJ5Du6onZKRiP4BmCPegkaP+ZeeLGYrwOkbCHsta AtAowDf4jyvxx36MvFQgR0JoQ4P1GNAjRtLoa7TZSYlZ3j3Czxlk8YmTW8iUlg== 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=1704160600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wmYbzJI1e8AmAZHBnh3EGyPwy+gAmNFpTIWxtUKctLQ=; b=avcvPwVNx4PuckgMFOHtvYUdO4VmkTLjR1RSoSaO2YPTioBoDu57SRVURvsrfjyTBzf8en QzEV55+Sn2vm4Ku1YXdc3iCRcGh06aMz3ePezW69Qq13krPzW84S05ftUau5F2TI1kqstt 9APW7xLPfH+0kTxo8tkQ38szHjeRH9yhNW/WKvk/+HLt1kD+HfGFVdzDlYtGsJdBQXz++/ sVuIBkqydSOkLDh/qUE5vbf+EEnG5q/zEk7YbzrHfzzBzHEGLBOHlZt/WpyTzBchIGZtuq hbZJ3/U5asNCeVcZxV2LSt0nscpvGZj47zn8yLsHfKT9oiqe+5XOrMZIIOkzLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T3wvD4bkNzhgZ; Tue, 2 Jan 2024 01:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4021ueWc022933; Tue, 2 Jan 2024 01:56:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4021ueXj022931; Tue, 2 Jan 2024 01:56:40 GMT (envelope-from git) Date: Tue, 2 Jan 2024 01:56:40 GMT Message-Id: <202401020156.4021ueXj022931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 263ed87413ae - stable/12 - nfscl: Fix handling of expired Kerberos credentials (NFSv4.1/4.2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 263ed87413aece1786df7275cc541dad324c76a5 Auto-Submitted: auto-generated The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=263ed87413aece1786df7275cc541dad324c76a5 commit 263ed87413aece1786df7275cc541dad324c76a5 Author: Rick Macklem AuthorDate: 2023-12-26 22:33:39 +0000 Commit: Rick Macklem CommitDate: 2024-01-02 01:55:14 +0000 nfscl: Fix handling of expired Kerberos credentials (NFSv4.1/4.2) If the NFS server detects that the Kerberos credentials provided by a NFSv4.1/4.2 mount using sec=krb5[ip] have expired, the NFS server replies with a krpc layer error of RPC_AUTHERROR. When this happened, the client erroneously left the NFSv4.1/4.2 session slot busy, so that it could not be used by other RPCs. If this happened for all session slots, the mount point would hang. This patch fixes the problem by releasing the session slot and resetting its sequence# upon receiving a RPC_AUTHERROR reply. This bug only affects NFSv4.1/4.2 mounts using sec=krb5[ip], but has existed since NFSv4.1 client support was added to FreeBSD. So, why has the bug remained undetected for so long? I cannot be sure, but I suspect that, often, the client detected the Kerberos credential expiration before attempting the RPC. For this case, the client would not do the RPC and, as such, there would be no busy session slot. Also, no hang would occur until all session slots are busied (64 for a FreeBSD client/server), so many cases of the bug probably went undetected? Also, use of sec=krb5[ip] mounts are not that common. PR: 275905 (cherry picked from commit a558130881e9d574dc5f37827fe2284667d5aba8) --- sys/fs/nfs/nfs_commonkrpc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index bc38f9aab6b1..3d6ea9efafd0 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -878,6 +878,22 @@ tryagain: } NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = ENXIO; + } else if (stat == RPC_AUTHERROR) { + /* Check for a session slot that needs to be free'd. */ + if ((nd->nd_flag & (ND_NFSV41 | ND_HASSLOTID)) == + (ND_NFSV41 | ND_HASSLOTID) && nmp != NULL && + nd->nd_procnum != NFSPROC_NULL) { + /* + * This can occur when a Kerberos/RPCSEC_GSS session + * expires, due to TGT expiration. + * Free the slot, resetting the slot's sequence#. + */ + if (sep == NULL) + sep = nfsmnt_mdssession(nmp); + nfsv4_freeslot(sep, nd->nd_slotid, true); + } + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + error = EACCES; } else { NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EACCES; From nobody Tue Jan 2 17:00:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Jxk2h5zz55r1g; Tue, 2 Jan 2024 17:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4Jxk27qnz3X60; Tue, 2 Jan 2024 17:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704214810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tBBK/EwU7pvs6ZeVp5akyskSZHZWsymBjLCEnwhAF30=; b=MVDLuw6ZpQfu//Jfd+18jhZgMeEpYUix9RaN0u5euuqdb5FY1PqrRPEmJsd4Rt8FDWdQNT zk1kF9M3Sr77iMRMUK1BM0YWynq4PdfjM95ZcZUlbJJTX7moYxgQrPOf6oW6tKakwYAM3N CNAXc8nYfCgY+pY29bKRjoHrEGmBDFEOvq0Wi0g+z+tAhSBLrQ7rdIgt3seaklD2eiBWs9 tPPJ3ZzHTysGy4B6rwyi7LNLe5jLt2Q89TRyGYXIRAGzrPjf+rY2sMGbmIjJPQ2Bq3t6Xm /hiQRu0wvz4D1h5POND7+5hahmuHCv7auNFZAyxbZK/X9sDNtE4HSlcGTJAEYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704214810; a=rsa-sha256; cv=none; b=TshABnSe0uoc4T8WoYXAoo5hFZft/wHbCi1VBOrrNw/rxz1PJxsPeGYGqZeyEgyvDl2cu8 wSqb3swGrxg9sW818lngx1r4f7DHvUegLQGV6Wqian829rk0n0JY2IBzS3YFhE9oagxMmd CCyB8nTsB+GMN1orjdsPm8QnDcbDjmV6T6PcTxaaYfUvfco1XUVq1oTEJwIFSV2xFrY0av vRoUrA6mHjSX/LfOw7dBbCVQcZkcyFv7HhCjgZHVHJiwL6J8Ee0z9Lw9K899KX2cJlRPyw Ftg7Gk1vr7E8Q/NhD8nfv+gwR6cigTWj/I7Fgqjtv0ZYNcCztuoDfLu5p7gi3g== 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=1704214810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tBBK/EwU7pvs6ZeVp5akyskSZHZWsymBjLCEnwhAF30=; b=Qbx2eMQjtaoAFjietk/VbZ4fEYK2zhslG1CHrJmSi5HnBuHZkL5/h7TeoN7/kO6aUmhApH z5b4XhwHxvQRplQHK7xKp4aa5KV1zOMd5Vj6/TjRqnhMQ1t/Iw2tySJBY2rrCYELE7Andv 4L6pDPBfFfn/gNA43cU98PTs0dHVgyqyvlL7S4E0Dhe7sx8VtOdRE9eUpP14b5uwSiiZQB 3UlorYHA8GiRMkH2+IOaX7+o8qH/g6yAF5KtQC9yilKOFLNPg6fzmqqp/gvS6/wvV1FYG4 WOLcNVdEXFVlROC+u6cl6YKR8D1W/reJK7OIF386hvoIAaERcUkAx8LQMRwbQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Jxk1Bdqz181n; Tue, 2 Jan 2024 17:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402H0AKC039819; Tue, 2 Jan 2024 17:00:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402H0AAq039814; Tue, 2 Jan 2024 17:00:10 GMT (envelope-from git) Date: Tue, 2 Jan 2024 17:00:10 GMT Message-Id: <202401021700.402H0AAq039814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 94671881419f - stable/14 - libc: Centralize non-building of sbrk stubs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 94671881419f0fb8014006266e5505feaf23daeb Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=94671881419f0fb8014006266e5505feaf23daeb commit 94671881419f0fb8014006266e5505feaf23daeb Author: Brooks Davis AuthorDate: 2024-01-02 16:22:13 +0000 Commit: Brooks Davis CommitDate: 2024-01-02 16:22:13 +0000 libc: Centralize non-building of sbrk stubs The actual implementation of sbrk(2) is on top of the undocumented break(2) system call. On powerpc* this means we don't build _sbrk and __sys_sbrk which were neither used nor exposed for linkage. Otherwise it is a no-op. The addition to lib/libc/sys/Makefile.inc is a direct commit to stable/14 in lieu of merging the removal of the sbrk and sstk syscalls. (cherry picked from commit 7893419d492c40ca82b68fca3dcc0f5f7047d39b) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43159 --- lib/libc/aarch64/sys/Makefile.inc | 3 +-- lib/libc/amd64/sys/Makefile.inc | 2 +- lib/libc/arm/sys/Makefile.inc | 2 +- lib/libc/i386/sys/Makefile.inc | 2 +- lib/libc/riscv/sys/Makefile.inc | 2 +- lib/libc/sys/Makefile.inc | 1 + 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/aarch64/sys/Makefile.inc b/lib/libc/aarch64/sys/Makefile.inc index 7cb0544a2997..ae48fd739477 100644 --- a/lib/libc/aarch64/sys/Makefile.inc +++ b/lib/libc/aarch64/sys/Makefile.inc @@ -8,5 +8,4 @@ MDASM= cerror.S \ vfork.S # Don't generate default code for these syscalls: -NOASM+= sbrk.o \ - vfork.o +NOASM+= vfork.o diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc index 32c03ccf2963..658fbd2add50 100644 --- a/lib/libc/amd64/sys/Makefile.inc +++ b/lib/libc/amd64/sys/Makefile.inc @@ -7,4 +7,4 @@ SRCS+= \ MDASM= vfork.S cerror.S getcontext.S # Don't generate default code for these syscalls: -NOASM+= sbrk.o vfork.o +NOASM+= vfork.o diff --git a/lib/libc/arm/sys/Makefile.inc b/lib/libc/arm/sys/Makefile.inc index 398ac494f2bc..3a86936a7b23 100644 --- a/lib/libc/arm/sys/Makefile.inc +++ b/lib/libc/arm/sys/Makefile.inc @@ -4,4 +4,4 @@ SRCS+= __vdso_gettc.c \ MDASM= Ovfork.S cerror.S syscall.S # Don't generate default code for these syscalls: -NOASM+= sbrk.o vfork.o +NOASM+= vfork.o diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc index accdc3367ac8..57a8af428aca 100644 --- a/lib/libc/i386/sys/Makefile.inc +++ b/lib/libc/i386/sys/Makefile.inc @@ -4,7 +4,7 @@ SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \ MDASM= Ovfork.S cerror.S getcontext.S syscall.S -NOASM+= sbrk.o vfork.o +NOASM+= vfork.o MAN+= i386_get_ioperm.2 i386_get_ldt.2 i386_vm86.2 MAN+= i386_set_watch.3 diff --git a/lib/libc/riscv/sys/Makefile.inc b/lib/libc/riscv/sys/Makefile.inc index f1cc8d489553..cd8ba4f11557 100644 --- a/lib/libc/riscv/sys/Makefile.inc +++ b/lib/libc/riscv/sys/Makefile.inc @@ -6,4 +6,4 @@ MDASM= cerror.S \ vfork.S # Don't generate default code for these syscalls: -NOASM+= sbrk.o vfork.o +NOASM+= vfork.o diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 480002f9875e..1acc66c5f726 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -18,6 +18,7 @@ # NOASM= exit.o \ getlogin.o \ + sbrk.o \ sstk.o \ yield.o PSEUDO= _exit.o \ From nobody Tue Jan 2 17:00:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Jxl3QTkz55qqn; Tue, 2 Jan 2024 17:00: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 4T4Jxl2zcqz3X25; Tue, 2 Jan 2024 17:00:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704214811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kOhUgSCJolpk2nXRtZoh7OFLShUDh09dK7B9pdlWPjw=; b=v5FgzRCNvJJTvTcKOEtyMwaK3dJP/GLvGcSXYOF6vgqk/ew0kUqAezq8b9DiTzl1SJQu+7 iv4w7gthYVE3FzBbYpWE2g0gxdRurR1ivxYFusYuOwNpu1/iJdiNmeVY8qUqJ3pHjh9zZ9 gfHqpcI4unFxlzo9AWabJDGQ6uVtAF27Y1ZLOvSg79e2TW0QFWpDumab4Icb1EUqmWCMjz a6euP3Y6YOA8Hf2nM9z6E2TH4YUYcjeQY15ihvhqO4nXhQqK2XaDS09NyY9cFlvx+cu2SJ +OjqHMg7MpNKMCYEznAbiD2E8ocgWv63R5fwjvZjwTMrDiZJ7BSiupEadIK9Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704214811; a=rsa-sha256; cv=none; b=sDTYAwpbZRxaSUlG8Zp+1zwF+A6xIZIVMeX8SxgNw37MFkobNXzBEvQqr3XUT+cQH2DwVS nIaXcwtmbi7J4F7UdD8IlfcIFkV9DG/6WY/tzQlu5dCv0LXwzmPskSKNHM8Zk6LyOM+f15 lRX3ygmUn5byCvhcgP45haiu7EEJH13kDQ8IsJpn3rSPDG4IMuunjU+rKLYNfkJfqNyweC bp/oF5GbBmkvUp8GFMfpYmzVf2WYetsf8sWLM3ntq2L7Hk7NYyn4uDaTltC4ZoN0aHn5Tr gxRVExFVANiRezRiFViBbWLML2WDUrR3/9FUcMbF5ldjUz9oI4OkpkAHbzwEHg== 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=1704214811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kOhUgSCJolpk2nXRtZoh7OFLShUDh09dK7B9pdlWPjw=; b=SJSivarQvSILJ4TzT7L5jfwmwX25rvPI8RJqMoTCCGvBIPPTbtfyVEspOIgLM46at/LT1h qKU/SKfhAI18BhR/0ec5eTIDgbJT0cdeitv1uFAIM2Bwc/+9Cb6v3rADeNZiI2poGkeKpi uVJbgw3+zI+kHOKz3Lh/qvqrGW17RUjg8Xyf0tUiFz4ZNNXgaOEkxRq3A6NADrqXSc463S +xfik7a1rSOJYprClOX4BH5G1sRpDLgXJTvOf0FddmaSKJ3RPVNjmTX31vvtBL/z+Sa3/O A/PRI7vDzPeiQ9XjqTNkoxJy49HY8q8ywWICWq3fCwskv6JobxkEDqllEDj2Fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Jxl1q6pz181p; Tue, 2 Jan 2024 17:00:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402H0BAQ040469; Tue, 2 Jan 2024 17:00:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402H0Buj040459; Tue, 2 Jan 2024 17:00:11 GMT (envelope-from git) Date: Tue, 2 Jan 2024 17:00:11 GMT Message-Id: <202401021700.402H0Buj040459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: d3f8e4bf1cd5 - stable/14 - libc: rename arm and i386 Ovfork.S to vfork.S List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d3f8e4bf1cd563466454e8a84e5d840e22fc8cf6 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d3f8e4bf1cd563466454e8a84e5d840e22fc8cf6 commit d3f8e4bf1cd563466454e8a84e5d840e22fc8cf6 Author: Brooks Davis AuthorDate: 2023-12-06 20:47:50 +0000 Commit: Brooks Davis CommitDate: 2024-01-02 16:58:42 +0000 libc: rename arm and i386 Ovfork.S to vfork.S While this has been Ovfork.S forever on i386 it differs from other syscalls that require wrappers for no obvious reason so fix that. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42909 (cherry picked from commit 0ea469bcd548d29bbbc970325e4fa851d0e4c022) --- lib/libc/arm/sys/Makefile.inc | 5 +---- lib/libc/arm/sys/{Ovfork.S => vfork.S} | 0 lib/libc/i386/sys/Makefile.inc | 4 +--- lib/libc/i386/sys/{Ovfork.S => vfork.S} | 0 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/libc/arm/sys/Makefile.inc b/lib/libc/arm/sys/Makefile.inc index 3a86936a7b23..d5b62d61c90d 100644 --- a/lib/libc/arm/sys/Makefile.inc +++ b/lib/libc/arm/sys/Makefile.inc @@ -1,7 +1,4 @@ SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c -MDASM= Ovfork.S cerror.S syscall.S - -# Don't generate default code for these syscalls: -NOASM+= vfork.o +MDASM= vfork.S cerror.S syscall.S diff --git a/lib/libc/arm/sys/Ovfork.S b/lib/libc/arm/sys/vfork.S similarity index 100% rename from lib/libc/arm/sys/Ovfork.S rename to lib/libc/arm/sys/vfork.S diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc index 57a8af428aca..bbc3497aa5a5 100644 --- a/lib/libc/i386/sys/Makefile.inc +++ b/lib/libc/i386/sys/Makefile.inc @@ -2,9 +2,7 @@ SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \ i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c \ i386_clr_watch.c i386_set_watch.c i386_vm86.c -MDASM= Ovfork.S cerror.S getcontext.S syscall.S - -NOASM+= vfork.o +MDASM= vfork.S cerror.S getcontext.S syscall.S MAN+= i386_get_ioperm.2 i386_get_ldt.2 i386_vm86.2 MAN+= i386_set_watch.3 diff --git a/lib/libc/i386/sys/Ovfork.S b/lib/libc/i386/sys/vfork.S similarity index 100% rename from lib/libc/i386/sys/Ovfork.S rename to lib/libc/i386/sys/vfork.S From nobody Tue Jan 2 17:00:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Jxm62djz55r46; Tue, 2 Jan 2024 17:00:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4Jxm3Kcvz3X6H; Tue, 2 Jan 2024 17:00:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704214812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EU8hPGO4lztIriYT5op6UTaYfk+sP589Zx4C65WJ0tc=; b=SB1FN6Nyct7jfFO28TL3P3Bh4RQFVZ1UghcNrAY0lEyr+6DBGQwOKCN8/DKMxFRQCtAEEO hdkbuBQCn3LeML6Q/K170ifTZpiXDqfzS+Hn/HA8tR9hOiTRW+568CN1y/Qd/WEBtxRlTt x6O4VeEaAABoSnsaIzXkXgAFCDW+hxSs4lDrZnHymc9dz4uVGdHM7rk3zDN7OW68hxNsFD ey81ERt4UXiyvVo/Ovbj5L9b91f8kEyBnHV4Iz5DMzaGVa4arDMcmd4h7Kg8jQXXwnRSQF MH5XbkkY+bdHtg5s6ioaACVlXeP/p7JaU1o4EjI5LUqxs77NIJ5xY9kcZupliA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704214812; a=rsa-sha256; cv=none; b=u+zkG0pTlCfuJQ26S0zOVqomkh181eKzHpTEOKeQEleYX7Jv1oTcILx6wH6fw+NMSSCYf1 oW9AjnUrGEEntLieHbLFbUhd4HSHVGk8LJUrkV0JHDxwqI2uHqRyPK1yGYGp9bTiyb9HxA uMSE1ZxflLphwVYcMTQrYJ7JrdWHiDA8FQCTYW5eCRyk/0JhNh3/tnYoogyTc9xyeXliC4 Rpt4+AKSwMIhc5Ye/xUymFWbNdVOiKvqoiZlHoEmNrdsC768q5f1f1l9p081bp0VLQE1S8 vRX//MQjVf4SeKOu+tIAXElj7dEUTkjLuGTXzImdY3tZ+fRv/m3qD4x4DDW8Mg== 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=1704214812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EU8hPGO4lztIriYT5op6UTaYfk+sP589Zx4C65WJ0tc=; b=VxupRBljeWHqXFGiWsTbdPeDtuevQ74HcYdpBztCC0sOTjtM+Vu4101KER7xLq0TMq/SLc zdQ8MTDJZnYxpU8GXyD8QsbfYHV7BDPsZVjEN+IsHfVCepjPSj7Nj59ZQKQary7BcfEIvr ww4gsHNXF9p3Vz5iqoAtfBpWEphpEixBvYyN+hgd4Jm2zKEGTcwE73OzhOStQYsmWXYpkr HP9JZDaxvIWqcgN664cyC1CCiSI91XJ3UX8ntqootXJygjiak1z6jq/+kkPHZkTKAqCPLU YbhX5+ZtK5kqGIOvnqrRPeea26PKkNszAjybJE59Pd3b8ZlChlYA4VNMKXdsuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Jxm2Nrvz183M; Tue, 2 Jan 2024 17:00:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402H0Cf6041116; Tue, 2 Jan 2024 17:00:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402H0CN6041112; Tue, 2 Jan 2024 17:00:12 GMT (envelope-from git) Date: Tue, 2 Jan 2024 17:00:12 GMT Message-Id: <202401021700.402H0CN6041112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 444024241eec - stable/14 - libc: don't needlessly add vfork.o to NOASM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 444024241eecc17c220f9043dc219958c0c77b45 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=444024241eecc17c220f9043dc219958c0c77b45 commit 444024241eecc17c220f9043dc219958c0c77b45 Author: Brooks Davis AuthorDate: 2023-12-06 20:48:39 +0000 Commit: Brooks Davis CommitDate: 2024-01-02 16:58:54 +0000 libc: don't needlessly add vfork.o to NOASM For architectures where vfork.S was named Ovfork.S this was needed, but it was always pointless here as an entry in either MDASM or NOASM is equivalent. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42914 (cherry picked from commit ec27c0bb3eea73be4db6cd2f275db6c516e12d00) --- lib/libc/aarch64/sys/Makefile.inc | 3 --- lib/libc/amd64/sys/Makefile.inc | 3 --- lib/libc/riscv/sys/Makefile.inc | 3 --- 3 files changed, 9 deletions(-) diff --git a/lib/libc/aarch64/sys/Makefile.inc b/lib/libc/aarch64/sys/Makefile.inc index ae48fd739477..38eb13fb89be 100644 --- a/lib/libc/aarch64/sys/Makefile.inc +++ b/lib/libc/aarch64/sys/Makefile.inc @@ -6,6 +6,3 @@ SRCS+= __vdso_gettc.c \ MDASM= cerror.S \ syscall.S \ vfork.S - -# Don't generate default code for these syscalls: -NOASM+= vfork.o diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc index 658fbd2add50..d4a767c90a5f 100644 --- a/lib/libc/amd64/sys/Makefile.inc +++ b/lib/libc/amd64/sys/Makefile.inc @@ -5,6 +5,3 @@ SRCS+= \ amd64_set_gsbase.c MDASM= vfork.S cerror.S getcontext.S - -# Don't generate default code for these syscalls: -NOASM+= vfork.o diff --git a/lib/libc/riscv/sys/Makefile.inc b/lib/libc/riscv/sys/Makefile.inc index cd8ba4f11557..e4e66ba19bd6 100644 --- a/lib/libc/riscv/sys/Makefile.inc +++ b/lib/libc/riscv/sys/Makefile.inc @@ -4,6 +4,3 @@ SRCS+= __vdso_gettc.c \ MDASM= cerror.S \ syscall.S \ vfork.S - -# Don't generate default code for these syscalls: -NOASM+= vfork.o From nobody Tue Jan 2 17:00:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Jxn5hNVz55qj1; Tue, 2 Jan 2024 17:00:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4Jxn4DPNz3XBl; Tue, 2 Jan 2024 17:00:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704214813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OItNM/xxHd1D8nFwWWzScRHoEPyPPLDpEq89E3JuQDc=; b=aUM/oeZQqTBFXg58hlIIuPy58xeKfZWPfNSmtNb3TBYxnBG8elPdokSeLJ7qe9U9IAZ4pD qNLjrxl2WajBY2a+ns7lofUtp7QMRU4urWLSMgzoxrzKBiE2yWmEabYuzfAJGNuJlA6zFy ZQmObXwxCnLccGSTubpl4NvFGPCzecv2Y+C2cyoUjRev6lzgqIqLjsNEQ7md7N/0pifd// we0efBcGvXC0TtK0mYICLwmmpPoT2TlamB+Avklro1Yj31ebew4vmaoAPcxD5i3fQHnTLp fWkw3kkOIJPkp5AeOC//MiTJ8meFERq013F7Zrtk88Drnu1S+pQ7nZhIKLt33A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704214813; a=rsa-sha256; cv=none; b=QLtR4o/qopO/ans5OQklcF9nRW2tyrt6tT82GMu8wUZITqVzZYZ7kUcx+ijWiaMRdXNDRS uJXJe+tuQROSeseP4W8pPdW8N353pyG8JH4bJnfnp2CLsKp4FJVL574mpjdXVF/C9VUfK0 fbuaiVLJEj3XpoBgZa1rVVVh2dA0Gy3YgHOM2qYqnnOEcyaQQRWIE+yfkK+rFVm3xdiQfT L1jxKUIykDv2ZWPKYlfPYNew62HrN1ATMa4pQjBHf5E0iXO4Oh4Obs4WPxZzsBvtuqcrnX SybliPqQl/u7smjbZh9QwD2I620dK3SqBoD2yahugSaJxAMG6AlP5bTy3/jqaA== 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=1704214813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OItNM/xxHd1D8nFwWWzScRHoEPyPPLDpEq89E3JuQDc=; b=Hv+1PqVa7/cleSZXKZ38dnGnQFLY8fzONRUcz2cF10zFX3q+xecJxz3wzUy8umpqOQS2il /6LMiGA2AIeAS83crUV8sXXY2JLK1VSReCdykpApVjIvaIp7MGBcVsZsdMFHIMl9ORhewW g6aIJdAjDN79ag59E7d4MoIC0hnzmudVtayHlmFVQ5vuVnu9A3AF7ua/A084iIon/Mit9S /3pl/qJISyuR268CBrLmv0rwCt1UNtT48dEFoIz9uBbhnIMtGCEbFG1DA2F0zAV0gqGD74 CghcPxqxp+kC+gFfrUtEVQClo8NDzqiIeJUXwYtu+q2MBmH4jEktKFftnHO6Dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Jxn3KZjz181q; Tue, 2 Jan 2024 17:00: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 402H0DD3041788; Tue, 2 Jan 2024 17:00:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402H0D8Z041784; Tue, 2 Jan 2024 17:00:13 GMT (envelope-from git) Date: Tue, 2 Jan 2024 17:00:13 GMT Message-Id: <202401021700.402H0D8Z041784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 1b0471936f7e - stable/14 - libc: simplify MDASM/NOASM checks List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1b0471936f7e8c30c994ea514cf3396a0b3c6dac Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1b0471936f7e8c30c994ea514cf3396a0b3c6dac commit 1b0471936f7e8c30c994ea514cf3396a0b3c6dac Author: Brooks Davis AuthorDate: 2023-12-06 20:48:46 +0000 Commit: Brooks Davis CommitDate: 2024-01-02 16:59:04 +0000 libc: simplify MDASM/NOASM checks Use boolean evaluation of :M matches and a single if statement. Reviewed by: imp, kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42915 (cherry picked from commit fc0288993cdad8a559fcd2c2166cf95f1fa43745) --- lib/libc/sys/Makefile.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 1acc66c5f726..13769e5bdf19 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -109,11 +109,9 @@ SRCS+=${MDASM} # not declared for no generation of default code (NOASM). Add each # syscall that satisfies these conditions to the ASM list. .for _asm in ${MIASM} -.if (${MDASM:R:M${_asm:R}} == "") -.if (${NOASM:R:M${_asm:R}} == "") +.if !${MDASM:R:M${_asm:R}} && !${NOASM:R:M${_asm:R}} ASM+=$(_asm) .endif -.endif .endfor SASM= ${ASM:S/.o/.S/} From nobody Tue Jan 2 19:05:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4MkB60ngz565bn; Tue, 2 Jan 2024 19:05: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 4T4MkB4S1Yz4JZv; Tue, 2 Jan 2024 19:05:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704222322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8RW5uykesfUDAlkmuuv9i7lgYWhX7P78LDzrgfHSSR8=; b=KyzfDKEDVBk7TRFqXChA8T1XaxF+5q1S06IaM5pCaO9l/eZay5r9GqH57sbnC5WGt2z9wh D30MXo53eO3bzFpHJeKd9/B8HlL+l3mlCiyHLod5CMZfsDBT7DxsyBeQRKMsMDVcfoapdI NbwFQWX8yueEA+gtrmcFXdiMU3S7Vc4uGVZIvYrdvhiee9K/vNct+llNyNZAFLi90/9wsJ dIbzvNReQVKuvF058JGra+2sFBVlGQvE8ovLIR8/llGfB1BxDybWYt29S5pl8eHnHFA9ii SKOV+BGkap/NUSvNL67fskMEtgADQ+P4fqgS+foD73ZKS73F4YjjLdfukIJYzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704222322; a=rsa-sha256; cv=none; b=wzf77vy9Q2rxc64QGVxY+iU5IWBUvrz8jeqTcoM/0tsBYuuEnbgUi5pxX7gRIjPZNdKPxu tbPnyz2ZN6oJ6GagasTns/Ne8MwP8//GFzzh7EO6sQAVbioxhV6OS/0DMBnwraLXMsC/6v /AC1iL4AxKJkegffh+8mVbZepak6m3vveBiCTdGc/nW2q7sjDQ+nSCDeHYZP0JBXH0xr8Y IofzpEz/OBoriq1p/vuQ0355BSxdhHALp8Xo9xsxGen6hl3jQOX1eW4s0q4j0ibo0xBAbo rjugunSAk24CC0chd8L+/UkSNXE1hO3gHgxqq64Z/tE8vaCNkeYxKDXvQVmrBg== 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=1704222322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8RW5uykesfUDAlkmuuv9i7lgYWhX7P78LDzrgfHSSR8=; b=eKqdnmN3MQ0pDhpHTx7/m79b8l4DiOeqMJ0FFaXfInfavXGQLlw8pnilnaIYryJWeQiBNv pVxesdXstNhcasfflK1vNTN6aRIJrw5Q8JR4+8ZkJHbquYNPlvI0tr0++vswGkLiS6xG79 Uxe7+mnh2+D0kK1IPZuzMnw9PfwtTI6PKDdSR6YWsjqtQ/kik3jdSTuAyL6gA4rMm3k/N0 XPXrbXOhjyG/ZPDt3VOodKLchPM+Mk9CwSd8mQepFzkFUQqjdZqXN31psUbutSCMTQvOXJ qVohFtPEM+zatlNZt2Qtsp8PDJs3Ey9r3DGEmpz4GwO/0gUHa58wuNHHSGFT5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4MkB3XTmz1CFV; Tue, 2 Jan 2024 19:05:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402J5Mjb053037; Tue, 2 Jan 2024 19:05:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402J5MST053034; Tue, 2 Jan 2024 19:05:22 GMT (envelope-from git) Date: Tue, 2 Jan 2024 19:05:22 GMT Message-Id: <202401021905.402J5MST053034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 98bac6fb064c - stable/14 - nanobsd: Fix the fix to a typo List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 98bac6fb064ca7536ddb67b845c653b926b699a5 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=98bac6fb064ca7536ddb67b845c653b926b699a5 commit 98bac6fb064ca7536ddb67b845c653b926b699a5 Author: Gleb Smirnoff AuthorDate: 2023-12-21 18:13:44 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-02 19:05:08 +0000 nanobsd: Fix the fix to a typo Submitted by: jlduran@gmail.com Reviewed by: imp, glebius, emaste PR: 275691 Differential Revision: https://reviews.freebsd.org/D43035 Fixes: d8c70d6dfb65218dd3272b34512083621d3ed46d (cherry picked from commit 330089470f56d502c629352b85e11522691e3368) --- tools/tools/nanobsd/defaults.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index d9de03fe72da..55314d7ef78d 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -884,7 +884,7 @@ export_var ( ) { # Don't wawnt a subshell # Call this function to set defaults _after_ parsing options. # dont want a subshell otherwise variable setting is thrown away. set_defaults_and_export ( ) { - : ${NANO_OBJ:=/usr/obj/nanobsd.${NANO_NAME}${NANO_LAYOUT}:+.${NANO_LAYOUT}} + : ${NANO_OBJ:=/usr/obj/nanobsd.${NANO_NAME}${NANO_LAYOUT:+.${NANO_LAYOUT}}} : ${MAKEOBJDIRPREFIX:=${NANO_OBJ}} : ${NANO_DISKIMGDIR:=${NANO_OBJ}} : ${NANO_WORLDDIR:=${NANO_OBJ}/_.w} From nobody Tue Jan 2 19:06:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Mlq00tvz565y5; Tue, 2 Jan 2024 19:06: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 4T4Mlp6d4Pz4KFh; Tue, 2 Jan 2024 19:06:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704222406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GlStfVjDadlkf8AcygazosHxFHzcoeBUkUbq7QH1ZQY=; b=nrAB0L8HmEjltgOTF3RnlSFi75o6wKHNgaUgl7frmZoIo7KMfNRA6kNqX8qlopjhAfOAmr BFriQ0e03pkEHTooi3A+fgNlpop6rhfQRbK+9z/YBjoTa11E/feInNrplamKQjO6XsYmGZ OkswioQOXsOObklIkIBMYhNSXUfE9/P4IrmS3TOI4w+2DCSJ3Abxdwjstth8vJ2H6Lf1tB 6zbtKsnxpfHd13cId6c8VjLXLqozFdsaVac5+seJVtl9Ce+RY04jawyJBLm4B3ndOr8CaV +aytFqO2lekjmW+HMMzXlf/bQDijT/pRhuzJAdMvF9t/e0mCX3B5XSb9Z4e9YQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704222406; a=rsa-sha256; cv=none; b=MW5BBppF7EFaA7kAh8w4euK60PKAvVgie30Qcrp+wTBwP05UNcBBoLB5xHvcvAZMyzv4ZZ wpdzbslbkOI0OAmuKqow9mvxWE8to1+fvOC4UlCdy1ETO5jVPmvOWwuAxvFGomDeBkJUrG 0e/TehQPDxF0+/1cxck3fNTeTAeFpd96CgzTG5Os18oYfbwXHF8CINd4a8/0yzdqimi3cY Ix6xa3G6k4qJRc9DAmNBODq7b0vRbsZCt1PXZ8AP/dGREIpslqPkPspPNohK6/BHYhF4mG q4015c9HYYfoot9JUl7T7lYRrvNpVHoFRTcMv3OxQdBeEwmvMu2tNPrKXVFqeQ== 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=1704222406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GlStfVjDadlkf8AcygazosHxFHzcoeBUkUbq7QH1ZQY=; b=oXFxS4lXhAdrSL78p2vA+RWYGQeLloP33njxglC1XzVBQs0FFctf87sYvUlaA/YrmT4LjD CJf9q5baYOAv9D61utDANlyEbUffuJzbuGV5ax/LVcrC7Sa/z97f5tunTiepbu62jLe652 ia9XBqR+UIJaKZ1gUbp8C7c3dwTkoa6DNiiKucBnNyffWc/bOnOivYQu4Dki78XZBlCuvJ SaqoujnCyM9fXfF062OYXoLnBd6rbtcNy7n+VHlLMLl1E7s4pupiL96PmvMTBL7UNUIsTa Df9/wWi6Yg7uaoQblhdT7+ka/t/ySY5vUXSerzodQ1F00M+N/bHocFIAYNn6Fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Mlp5gd0z1BP7; Tue, 2 Jan 2024 19:06: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 402J6kBL053347; Tue, 2 Jan 2024 19:06:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402J6k7g053344; Tue, 2 Jan 2024 19:06:46 GMT (envelope-from git) Date: Tue, 2 Jan 2024 19:06:46 GMT Message-Id: <202401021906.402J6k7g053344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 943814893bda - stable/14 - tcp: always set tcp_tun_port to a correct value List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 943814893bda5d74d8a2cace0a613dd5733c2845 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=943814893bda5d74d8a2cace0a613dd5733c2845 commit 943814893bda5d74d8a2cace0a613dd5733c2845 Author: Gleb Smirnoff AuthorDate: 2023-12-19 19:24:17 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-02 19:06:31 +0000 tcp: always set tcp_tun_port to a correct value The tcp_tun_port field that is used to pass port value between UDP and TCP in case of tunneling is a generic field that used to pass data between network layers. It can be contaminated on entry, e.g. by a VLAN tag set by a NIC driver. Explicily set it, so that it is zeroed out in a normal not-tunneled TCP. If it contains garbage, tcp_twcheck() later can enter wrong block of code and treat the packet as incorrectly tunneled one. On main and stable/14 that will end up with sending incorrect responses, but on stable/13 with ipfw(8) and pcb-matching rules it may end up in a panic. This is a minimal conservative patch to be merged to stable branches. Later we may redesign this. PR: 275169 Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D43065 (cherry picked from commit 513f2e2e7180202167ca2963d815d2a4c3ac0af9) --- sys/netinet/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9f7e42b582c6..512da877846a 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -640,6 +640,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port) to.to_flags = 0; TCPSTAT_INC(tcps_rcvtotal); + m->m_pkthdr.tcp_tun_port = port; #ifdef INET6 if (isipv6) { ip6 = mtod(m, struct ip6_hdr *); From nobody Tue Jan 2 19:07:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4MmY14Njz565qX; Tue, 2 Jan 2024 19:07:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4MmY0MBRz4KKv; Tue, 2 Jan 2024 19:07:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704222445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDCQd1gc27xRAzUmDoBOftnMc2SFmqtNX0/Za2ppBGo=; b=OB1/IKWPuXqYZ77BbDuDri1VtumiafEM0iilPRrG9Hz3Ncpbr8Zzvr8N4ntVqskmTq3m4J RZlqE/Tf3a+0PJBmEoscdJz2eJHuGGKvFOj+gkHQq9lNoy8o4lDfWZ3tfSR/Q8sN/EPgVz K3qI+sKo7kAhUlQ+nWP8Te+6hT5TMIqrcDYr05OycKPpCQyUSG85B++zw5szRDLIGCzDMW rzbs8GQDRcVEPOV2oRQn1MMvLP574TnmSIZni5BVu6HTuu0j9YvX3YLFf2n6Nm32ePpoWm qtFcFkmu6JjO4iekI7XbflF4luO5ewS9uUAbp+9YAG5Qu/zsJ33iSAUiZhyI6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704222445; a=rsa-sha256; cv=none; b=OO+Yl3QFtY8FykGa05Epw0PdpA9TOr/KB8MoPlAwuG96JkujHVrNmz0V8byuNtzbD8Cle1 fUU1g0SEf5Uydty6hItlNA9zoXnSUQt2Bwcal/muGXNdqS1z/tGs8pgNPUsF2e2bnxgZIr 1acfqdad2ZK7pTR6TlA0y4GPaPd01wiZc5/mq0IsLo3NjggvbnrouDlrit5xyFi8Sx6ocS q6NKXAfVfMsFZSo8Lkhy1V/uivIO0/0PEbd4tYdUhVwpDSzKKW6JNgwsey+RMaRJGG3yTS O6srBuAhlQE5TaMOC3pTMsBrsW1f55A7JlyKPu0f2YkpX9xwS4wLZ+l1z2taIg== 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=1704222445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDCQd1gc27xRAzUmDoBOftnMc2SFmqtNX0/Za2ppBGo=; b=u/H7dnoi+cpSu3SvWtjFswQ5Q/K5R75mOICpvF/5EC4gz1mfxdnN3CG4jJtTei/5OIOci5 t7QTwOE2nY2PLiRqvTSlD4Ru54pLfrGWPugwtcEa0aRHJxu3ZIfrZX4HCMqV7IgPdUA6Ff AQSIihUYIEf4mEHdDO16VwWE3rjl/FfOWQbRbxu+NKthVVMw3lRjUoaBoQnuDrvnAt7UtX 9RElWOH/PM4Otm40DkUSP1s2E8f/v+q6elkJx1tC6d2StkOWnHCWNvfy7vzaX3HB6QCrMx NgN0jbyOErRrHHlK72dJ62XxTDGquWpWFUnpFl8HlPaT693tCLzhSLYDfLHq8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4MmX54n0z1CHX; Tue, 2 Jan 2024 19:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402J7NGi053829; Tue, 2 Jan 2024 19:07:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402J7NNW053826; Tue, 2 Jan 2024 19:07:23 GMT (envelope-from git) Date: Tue, 2 Jan 2024 19:07:23 GMT Message-Id: <202401021907.402J7NNW053826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 7bad06cd0d8b - stable/13 - tcp: always set tcp_tun_port to a correct value List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7bad06cd0d8bf63a47cee1b209fd6c1864fb2da5 Auto-Submitted: auto-generated The branch stable/13 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=7bad06cd0d8bf63a47cee1b209fd6c1864fb2da5 commit 7bad06cd0d8bf63a47cee1b209fd6c1864fb2da5 Author: Gleb Smirnoff AuthorDate: 2023-12-19 19:24:17 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-02 19:07:15 +0000 tcp: always set tcp_tun_port to a correct value The tcp_tun_port field that is used to pass port value between UDP and TCP in case of tunneling is a generic field that used to pass data between network layers. It can be contaminated on entry, e.g. by a VLAN tag set by a NIC driver. Explicily set it, so that it is zeroed out in a normal not-tunneled TCP. If it contains garbage, tcp_twcheck() later can enter wrong block of code and treat the packet as incorrectly tunneled one. On main and stable/14 that will end up with sending incorrect responses, but on stable/13 with ipfw(8) and pcb-matching rules it may end up in a panic. This is a minimal conservative patch to be merged to stable branches. Later we may redesign this. PR: 275169 Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D43065 (cherry picked from commit 513f2e2e7180202167ca2963d815d2a4c3ac0af9) --- sys/netinet/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index d3145881ecf9..9a5b9b05f210 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -690,6 +690,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port) to.to_flags = 0; TCPSTAT_INC(tcps_rcvtotal); + m->m_pkthdr.tcp_tun_port = port; #ifdef INET6 if (isipv6) { ip6 = mtod(m, struct ip6_hdr *); From nobody Tue Jan 2 20:52:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q5r1GnXz56J1J; Tue, 2 Jan 2024 20:52: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 4T4Q5r0pRYz4Xlf; Tue, 2 Jan 2024 20:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewInm8TNQd3T9qaZL7WUEjrDtInAVl4wGBqcOTxYgyU=; b=DNeBVz+tqIS45UTkNe+7UjRF/yCpMC0ZVk1mde88Uw0C9/NwAU277e2zSD3ExuXJpQeYv4 jKilY3afJZLCyUQxa5vOg0LLYtWq33CkKc1uDJFMRRP++TJTG55NR55p07fYfWqRKmzPT+ yZFKnY/g+xnA2aJ7TT/Plm1BkZ6zIspAj2e41W3NqWpaPIH86nf093sa8ihOpvwnsL1ckd 4zPLNe6NoOrqDLUsG5WSWQyxH1n6lBB20DnhFZ+oLKvZtKalkSo87elho11YVBKEuug6j6 oMb1F+HLR1v1JE2z5FXf6MmBnzNvsEhCU7p2JFR520kfOwN4sEz8DKT5UKYwhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228752; a=rsa-sha256; cv=none; b=x/k4+eFnFjujbGAlG9yDNBAxMT+J1kpwTaiX2P8xrsqVZW0IiwM+tdcOgP4FVp0sew8U5L R43iHPC+HpyQJ2D7/s5ATupOdePqbb4oh5aL7SLy91m71bppd1uqI4+fHz8JX92vo7+/cw joruK0L2rClODB4yuJawBjAdq5eorF2Kq1JFQd5OwzJwSr+ezQjjA9RLQOs09mjPQc76L0 nuTP5mAzhY0mf5TlegeV5sFbYzkbotvmpJ5qR7zdoqQ6INAzO+UH3Rvb2iBjdpKIBXMpzQ DQTS0UrXFJolk17RRqVM+tkWMqZOQwxrpY1ok7NTa/0A1RLB0+v0WagdXcgXQg== 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=1704228752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewInm8TNQd3T9qaZL7WUEjrDtInAVl4wGBqcOTxYgyU=; b=T/5IsmP0tmKQPqVBJZ/mLWjSAhOkezSImaZVyb3nzP9XkjVzjUpiV6Ck09gpHn4hMGnL5X 5e26VPVcRO5RRvDSINhlJerixqeSXlfX659TdGuQtChHH0WV/blG6tfbEWQolaBFuySV2B mdGJSgc1jnnOTObINDjOoFEUOJoKTxRYbGnKc0Bz5furJi+pH/a37u+b48uj2ajjxcLpKX ZNyQHJzkXArZE/X5Ck5C3vvh+fComt2MahJXGzt1SpaakwaGEG8ijev+7v0fHyMyd1Ssw7 W0MOHOYlw5glzW2+fvnqOhYf1X87AMeKFt1fWzQTpgv3hajAAKrhfaLFcuyfmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q5q70JKz1Fpn; Tue, 2 Jan 2024 20:52: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 402KqVqt036711; Tue, 2 Jan 2024 20:52:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqVb4036708; Tue, 2 Jan 2024 20:52:31 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:31 GMT Message-Id: <202401022052.402KqVb4036708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2cad2d1a2a1e - stable/14 - cam: Make more self-contained List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2cad2d1a2a1e9add12d83b30b8f8d854e69dfe4d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2cad2d1a2a1e9add12d83b30b8f8d854e69dfe4d commit 2cad2d1a2a1e9add12d83b30b8f8d854e69dfe4d Author: John Baldwin AuthorDate: 2023-10-16 22:44:46 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:36 +0000 cam: Make more self-contained Include in the kernel for struct malloc_type. Reviewed by: ken, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42205 (cherry picked from commit 2e539c6f5aba657c69790d91130ceceeb0b8c38e) --- sys/cam/scsi/scsi_all.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index 937a6632d3be..4842732c8169 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -24,6 +24,7 @@ #include #ifdef _KERNEL +#include #include #else #include From nobody Tue Jan 2 20:52:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q5s2D0dz56Hw7; Tue, 2 Jan 2024 20:52: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 4T4Q5s1nxZz4XgD; Tue, 2 Jan 2024 20:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cBHCWmAi4NfddbNcdqk4DmtrHuTucXh7MC5vyb2eNSA=; b=CwgNHduiFbEwToxioegvjUCJYR7d81d0C3XPwIa3WdUFSrH9wG2LcCGVY2u3ACB7nhlYyL zCSgChQMxJZoKozjOzQrtLYAohu7jQR5ki6NssH9u+R64qXKuFtpFwfOZXCVC5IDBmw8vd nb7exmwrqA8ww4vEVVrSO3Sq6cq5HfRRS9BMMq/g2xgV/XGhQkGTLoS2FVyuhKLwahjMLK 4IPD8c5kNBItapIJJG0TWuglCWymTEtTR6O6fsw08N6a/6VZEdV5dGPbDl8Eoi2cBYFXuy rPH6uy/ucsq65SR0wmRZlUBtzzbc7dg0OwQcSX6MoxNRYrHx5s98yU6pn4Vfow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228753; a=rsa-sha256; cv=none; b=W1LeIz8/msKKPW64HCY6wPPCnR1+QRAUfK0hWeUFbEfiIYuu7T0Y6/F8NTDNYiHE1ktw+c F8O0k0bu3V7OiDAjaK1GetoMyq01acNl2p3AEkdg0ITHRt8d01icF6qpQA51grK/FPDti7 7wUL8Pe06oBS6XAvaGfgY8PvkVkoniJws2jqVna0eMHIWwXFJYkau/fX8GYESQmizPUPYm i2hk/h9h8Q72z7tOhzbi1DE0ZNi3vsmNQRMNobmdS0HSHYEl5kAgegujaAAT5LP64shslv zriFckxrCAw+A+9QeGoHVqD1RXwj8ltC2YDZrpUAO4aFWQwuyUS7KSsKoCCeMA== 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=1704228753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cBHCWmAi4NfddbNcdqk4DmtrHuTucXh7MC5vyb2eNSA=; b=Afrn0h9PGNj/Iu6Cagpfad9G6ekw+wpXrSQha3cUzk0r6F/o2FjIVBKDyjRAoaP822W/AG UeK54Nk11J58J0EABmTXDHGQSrzhEcXppoGpbT2DmJFSZnYNoL8u1at4iF5CcbQO5jK+1T efh1xlxfDdsXN7IjWvH840+63SIZw865dd4OWcqGYB7Ecb8pUQe46T+VcyQ3ZroZid4eLi PUVKy0bHWyF8JSjTK2ayptQulIF+jdP9egFJjU8p+67IDAL+n2ES+5oNDdQoyOL6Nql3fn Xv1QggZTu2fPT9oJ8VWJQPiALiOVG+zwtXIjGb2Tbcw3R/BoyqnVNf3+KyXZXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q5s0skcz1G97; Tue, 2 Jan 2024 20:52: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 402KqXih036753; Tue, 2 Jan 2024 20:52:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqXX8036750; Tue, 2 Jan 2024 20:52:33 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:33 GMT Message-Id: <202401022052.402KqXX8036750@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 46b03fd89887 - stable/14 - ctl: Make ctl.h more self-contained List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 46b03fd89887bd43b7ad25d0cf7c5c5030a9446a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=46b03fd89887bd43b7ad25d0cf7c5c5030a9446a commit 46b03fd89887bd43b7ad25d0cf7c5c5030a9446a Author: John Baldwin AuthorDate: 2023-10-16 22:45:15 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 ctl: Make ctl.h more self-contained Make MALLOC_DECLARE conditional on and forward declare several types. Reviewed by: ken, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42206 (cherry picked from commit 55231cd180692c7299bff65e608dba20013ec0f7) --- sys/cam/ctl/ctl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/cam/ctl/ctl.h b/sys/cam/ctl/ctl.h index 1b7d7ad4ec38..a211e249b2dc 100644 --- a/sys/cam/ctl/ctl.h +++ b/sys/cam/ctl/ctl.h @@ -129,7 +129,9 @@ typedef enum { #ifdef _KERNEL +#ifdef MALLOC_DECLARE /* from malloc.h */ MALLOC_DECLARE(M_CTL); +#endif struct ctl_page_index; @@ -137,9 +139,13 @@ struct ctl_page_index; SYSCTL_DECL(_kern_cam_ctl); #endif +struct cdev; struct ctl_lun; struct ctl_port; struct ctl_softc; +struct ctl_scsiio; +struct sbuf; +union ctl_io; /* * Put a string into an sbuf, escaping characters that are illegal or not From nobody Tue Jan 2 20:52:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q5t5v8mz56HwB; Tue, 2 Jan 2024 20:52: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 4T4Q5t2p4Mz4XM3; Tue, 2 Jan 2024 20:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByWGDZClYn00TV6vMcM4qwJGzWipI+9OhMsCXAsj6Io=; b=wY2/yIk+vLtRIBLkzVtfzhi7UprHWBE3mDbBVU/cH5EnQ67LqzVZKw9aNCFfDISGu8HY/W xdaR2FBVP8d2Vo2Oi/2L3rLatQFA/d8wjkuLc2GC091QJM5zHCA1CBEwAqRg9ce09HkEaa ZtMMxD7uAbnEJO5iwzzbmpsNAGrlskmPnVt1nYCVyOMERnC93rYtdf4tkwgYWtbFEHNLSs la7RwkPeKFcVIGFbKKUD4F8VXbnN0/6MBYiqcQt9/JC/08WtUeKkNTGAA+v3epTRNAAISy bmVEd4DhaEjQ4wo9g/XVyeDZdeYJt3ovtvJvPJ4vZR8wezCwh6fdQcW53sug6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228754; a=rsa-sha256; cv=none; b=H+iF9KAo1UMTSNL5+RYB/q6EPwsa37alRgil7BX3diTNFpD5ateKR+anjph0s5yxUeIU3I vyJaeftxGwKXO+q3sjAIUbevbjF0qWtD7cnL1JtAjIeeCcUaxJ+FZDkurhqO2CpmwKYNHs B53DSGT448gz0BAgu1BNemjGdmaMYS55lD2YUujv1K4QqokLJaRZPO5+ZDVgQeTkNhm4Rl 1wt8xERArf3sWC6T1Z56kR2Kk5FzdViuQ/HmLlrqfA3BgSwJQSxekqxjmU2zxxbVQXG9Of Xs2tluNcVyxsoHxhy+C5qfDoPW9o35ds31I864yHSPv2v4uQr5/vCJabbS/X+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=1704228754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByWGDZClYn00TV6vMcM4qwJGzWipI+9OhMsCXAsj6Io=; b=aNhLM9Fz0NL0rFGzDhwDqpkwxHUXmHp7g7D4oltideRez9Dl2Ry6DxIkf/h/Ab7rJ+iMDc EoOyEdba5qYPovi6qy/JxrOpuQ7wiIwcup0IjxDLBPsNzCEcdgO75aXXqP17u4HuajwdpQ VSQEzL+xQQNz7WjfmJjFuqr8Y0byG1Dz8VRrDJNhWkg09+ZVMxJWpvLJID24kk4MicqCnN uR1YIYC+antoMF8HBL1jfV8Np5WuAtg2ZP7Tp+bWiRLzooEvoepfOveaC5s8fxFA77vl3S DqgfrlQRZ5ODsITLbb6W7rfllga9zFQdiVB9q1tO+xAiHf0ldXuTei+pb0GpqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q5t1sD9z1G1T; Tue, 2 Jan 2024 20:52: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 402KqYaX036795; Tue, 2 Jan 2024 20:52:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqYGE036792; Tue, 2 Jan 2024 20:52:34 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:34 GMT Message-Id: <202401022052.402KqYGE036792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 15601268b99f - stable/14 - ctl: Make ctl_io.h more self-contained List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 15601268b99fae809d5b163a8f94f648833d9c31 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=15601268b99fae809d5b163a8f94f648833d9c31 commit 15601268b99fae809d5b163a8f94f648833d9c31 Author: John Baldwin AuthorDate: 2023-10-16 22:45:43 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 ctl: Make ctl_io.h more self-contained Include for struct scsi_sense_data. Include for queue macros. Reviewed by: ken, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42207 (cherry picked from commit 4efebb3de39a2694169d3032fb6ca567409c2bcb) --- sys/cam/ctl/ctl_io.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h index add8ed2e3ac6..115e336bd354 100644 --- a/sys/cam/ctl/ctl_io.h +++ b/sys/cam/ctl/ctl_io.h @@ -45,6 +45,9 @@ #include #endif +#include +#include + #define CTL_MAX_CDBLEN 32 /* * Uncomment this next line to enable printing out times for I/Os From nobody Tue Jan 2 20:52:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q5v75MCz56JFc; Tue, 2 Jan 2024 20:52: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 4T4Q5v3KNWz4XmB; Tue, 2 Jan 2024 20:52:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j6xU1UcXaLs5gRHmsfGBsreZZmN4RlfNlS9E868i5Fs=; b=CKBF0qC3e2HTeJvn+2tSZhxVLgMzESSnpSjU7fyWR4l75dFmOsgYg4aG6U8eyQS8EwoOMm oTxwy79ecRapK+UjuE/8CnZKic9IjnLZQd5aJw/zqztUIdfdRtyGkb4eT0LymEexoV5RTP aASz4uNCOdH9IshIhGekoRQYsTwyMRoi5v49wonCgkP+omqndMYatPZRlwU2l0U1oUi8VS 7EBZYx+4d0bt7DIeQSbHST4wOGmgPvP19cftHi4RSW8pImX0BWh/iH2mI1rLx9BjSaGNKq rHRDNO36NyPBji5tJCrdbsps/g/ZWrnJb5JRu5d++IebVLAIXWD+ne17QVhepg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228755; a=rsa-sha256; cv=none; b=Ci9IrGZNMyRozoTuu26/f5Bo+Zg6yiqjqE/cL5e3Vcb3DIZPKEFwivelQpKsFMniyRHFwY 2+jWyt34G5t/PcY5z8LwGe7fWHJ1zV9N6OOjKFEeZv03m25tfjCzwdnzOVCj1UNo5KPqt4 AXdqKnlhZa5OSKIUXL0y+mLth9vrVfaysfaTFzJvr74ZUBUSYucX6tlkTEvKHtuFCFHFr4 8ro7ogorbHlXXKFbU3tewi7lryziaIo2pXz7PptD1cO0kUgMWqSyZ8iSa5TCISuiL7uSOQ 2XT6sKAicGkGvGK7wokamORQd8ajHn2lA7UEtPC8BG54O2PmRSXcR/XuG0mutQ== 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=1704228755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j6xU1UcXaLs5gRHmsfGBsreZZmN4RlfNlS9E868i5Fs=; b=y2YCR2/RPN8SwR5Er4yBok98iqdvqrCKezTvi0kLRIbmcjbRwqfkZ/1xYWRu0ZvRQxjukL RnztjhNH2Z1EvteH0X0jox/e6BVopzaB6YJndmr/zaGalzGz289h/mgNCEfAlNjLSWluSw 38cek4IQeNAtuuD15YhsJ9eQBL0vre3a9yNa+UprSQ8ee4Cpw9OhStGFcb4euNQFLd/y+c Hm3+TWjCXn6HqOr/KZHzTQAw3oeP9ayIsk125xVIxthosYOTXgHnND+uoIoQ2JCBkjQvAI 3+b7864lue0SkfLA1x1XzjbnWk228F81BLCJh+ArT2Z9AVcmTD2mzCNOXOw7Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q5v2R7Hz1Fpq; Tue, 2 Jan 2024 20:52: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 402KqZne036837; Tue, 2 Jan 2024 20:52:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqZEI036834; Tue, 2 Jan 2024 20:52:35 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:35 GMT Message-Id: <202401022052.402KqZEI036834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2996e219e491 - stable/14 - ctl: Make ctl_ha.h more self-contained List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2996e219e49114981f65c302511825c0bdb66bec Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2996e219e49114981f65c302511825c0bdb66bec commit 2996e219e49114981f65c302511825c0bdb66bec Author: John Baldwin AuthorDate: 2023-10-16 22:46:11 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 ctl: Make ctl_ha.h more self-contained Include for queue macros Reviewed by: ken, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42208 (cherry picked from commit 10b1a66934b0c1b252369c496952974f980441a4) --- sys/cam/ctl/ctl_ha.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cam/ctl/ctl_ha.h b/sys/cam/ctl/ctl_ha.h index 5a6f6502da8b..49a55e16c547 100644 --- a/sys/cam/ctl/ctl_ha.h +++ b/sys/cam/ctl/ctl_ha.h @@ -37,6 +37,8 @@ #ifndef _CTL_HA_H_ #define _CTL_HA_H_ +#include + /* * CTL High Availability Modes: * From nobody Tue Jan 2 20:52:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q5w5rtpz56J8b; Tue, 2 Jan 2024 20:52: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 4T4Q5w4CD3z4XPh; Tue, 2 Jan 2024 20:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kLVN/oay96v0gxY3IHrTbjDHJWqAPZB76yRjhiCjkQA=; b=kyyMEhqp8TgOYL9H7uLYTIj+ucgC+hC88aeWBrJQgghOeF6iU+c6qMEaJKEEWHohdKVE66 LrjuyR1hR9Q8Y0j0pNeLYEpwJB2kcvPSA/4xeko0MLTtHflkBIbh63AvGlNeM/bLnep1V7 5bnqZGUPkYTILHryguBNNZUtkJtPxZQOTcI+3PKi+Uyl7+UwnRV/+5zPglYAaYx5ySwdOZ Euk/yg7gcTNYBAzIcpIloE4dUKYTYD74lYl6sqCtZ10x6WPlY7BE2MjRCOJCOjEtzJHcY8 YKBhnX1QN3/guv5vCZgsAEhFzUOM3XxXAW1r0121WGDZVXJtuDVGbw82RvfFGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228756; a=rsa-sha256; cv=none; b=TiwV2t7atzo4wq9NVnXk7f6w7cCMymk5M5u2R5dM9xyveziiKDhY7WNSkVh8UlfgD88Hlt HGBsDxCvu5DjwQ1oEc8xlD5gr2Jc2O1IvnitzmI1lBipmvFhOH7QoZ6vIxlnIQ7VSPQWUm DBCSqJLVHiqmlu2pNCMts1RxhXEZ+N4EWxYTtpTkWxOHjJDCiXeuCmcRl/X94zOdNtledf lpM7ATuJAD7/xrYHW6GWGOx74vhO54pOT5102fbzOuRLD3u4YpVVAGPfwtCKEM6i4K9DmQ +hCvifkoU32IzG6YnM0BjRryNxxMspEiRgGeKroRXtaVtMhmQQbHioGIrVrTgw== 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=1704228756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kLVN/oay96v0gxY3IHrTbjDHJWqAPZB76yRjhiCjkQA=; b=wBv94Z1hnQnD4AUXjRTlxgt/IR2h4tsAYv5DteXYS1Gamk/axFQ4c7qreSCwzEHStiLd/Q R/dEKzrhDfoa/zLNeDEjpeKc6rBvkV6VsDqgwbMrX01MV5FrJQpW/fb2BpYIjue+yMjKQd EV6sT/oPbF+kLwxdAv3QgCja095L9Q0fIpe5rhF3YlEGd3bvZLqOdTwvPqKI1eI3p/u+un A6FUbbjKqXNEpxhQFs405eTAuuhWbb91cSWfRvP09Aj8q/ac84kyYHrrx+/BwOjxXvtmO6 iCxAKPEREzjmo+NXgAHELbmho861Xrd+3PWpbInSTV6ggca7aM6T710eo62XFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q5w3K7bz1FmV; Tue, 2 Jan 2024 20:52: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 402Kqamn036886; Tue, 2 Jan 2024 20:52:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqaRJ036883; Tue, 2 Jan 2024 20:52:36 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:36 GMT Message-Id: <202401022052.402KqaRJ036883@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dba59c3567da - stable/14 - ctl: Make ctl_private.h more self-contained List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: dba59c3567da17d3623ee48bf3b5d85de960eef6 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dba59c3567da17d3623ee48bf3b5d85de960eef6 commit dba59c3567da17d3623ee48bf3b5d85de960eef6 Author: John Baldwin AuthorDate: 2023-10-16 22:46:43 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 ctl: Make ctl_private.h more self-contained Include for sysctl context types. Reviewed by: ken, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42209 (cherry picked from commit fc8cf0a8deb8908fb17acc56e96f3f700c05136d) --- sys/cam/ctl/ctl_private.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h index 9a87345015fa..04846f80e913 100644 --- a/sys/cam/ctl/ctl_private.h +++ b/sys/cam/ctl/ctl_private.h @@ -41,6 +41,7 @@ #ifndef _CTL_PRIVATE_H_ #define _CTL_PRIVATE_H_ +#include #include #include #include From nobody Tue Jan 2 20:52:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q5x6L0Vz56HwD; Tue, 2 Jan 2024 20:52: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 4T4Q5x50kwz4XfD; Tue, 2 Jan 2024 20:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFlHUsFcamzFH4UtYB73UVz+92inQgacONLDel0Zy7k=; b=tbLcAoG/1MqPylcgUaNH5E/nPIEoBLEy/I+NTpGuGU/hLEBS24QophudNt5zDG/MdLr79D pcyXRrh6MwOT6Tovmui6a2IRevCKyBOs2p3Iu4/bQ7IG9U5/NhOtrSPXvt3U0ImmIiehDH S0fj1UnblDnQ1zrTcn4dO7uu8YrBJq4N/o4ui0LWw2XxFTj5O6Qe0UU8Kar409z6MEdILa FsGvZzvu+pUe9SLVVn6eKE2D+NaNrQpS0YS/CBR3DupKaZQlx2NHWeU+48wmrxrJZVa587 BauoVlaAR2QSiGMwp+XT+6NkR6uViDIkucOKBwSxaxRrRsqnU7HyUXWs0vrDXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228757; a=rsa-sha256; cv=none; b=DJ6nPGUWqS15y13j6DIr04oRlMYaygcW/qi32FRSq8e8HxIc3up+rWe9ddVF8RkO0o2Knu 2yUADrGC3MlbaogtSN0ytGsuQ5Dd8E6St17WJfPxVwZJBK9GN7G6mUO4wMgUZ5Mmo7IXUG 9dg+URsEpuTVO+4eIAtNO9rEUJqEFWFGVRBhVHKZ3cOcwM+RqGVieIOmmq9ixiksWJ2u5p kk6Uri3yHYUG8zE3D316zMtBneoxnQg3FndklGObmFtRGQY/oNkbhnsJyiCWQx8zuQc43y rVcxX8PJ4wc/NMIamCqPX007ON6zk0oT+wlUBlTAVFR1b0T9RYaaIFvDRr8lmw== 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=1704228757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFlHUsFcamzFH4UtYB73UVz+92inQgacONLDel0Zy7k=; b=TNXmzdfr3BRqKAyNv26lIYSa8bNFrCoImLggmdT/pY/abKJcWjw5LxgwmNa6CeF1zT6w3n 7Q64eozqOvUu4cr5Mm63GE0WK9++c5PdFxG9NhWopTKs9LAg4oo1J9IZUbPObTwmToXl28 O9apIy+gAmbirGDY/AjEYUvikX2nMQ4i0PJS5qkJbzap5XBaZSU62jBCmFZvChN3FlS3AH KlfNrXydIiidqR5fx/Vi0CranY6AP4mm2297Vo5qzni+2htQMmyqu05g6vSK4ohBtrWeFr tFT47LDVsIrif5wE0uEptBZU9G2PU2qujUVuiBcxYi3qlxZJ4f+NZfKMcjAPHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q5x46Qrz1FR3; Tue, 2 Jan 2024 20:52: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 402KqbTb036931; Tue, 2 Jan 2024 20:52:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402Kqbox036928; Tue, 2 Jan 2024 20:52:37 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:37 GMT Message-Id: <202401022052.402Kqbox036928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 950162c4d33a - stable/14 - ctl: Use ctl_io_sbuf in ctl_process_done List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 950162c4d33ab033fe084e152203c2ec149e2b39 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=950162c4d33ab033fe084e152203c2ec149e2b39 commit 950162c4d33ab033fe084e152203c2ec149e2b39 Author: John Baldwin AuthorDate: 2023-10-16 22:47:09 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 ctl: Use ctl_io_sbuf in ctl_process_done This reduces a second copy of (mostly) the same code. Reviewed by: ken, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42210 (cherry picked from commit e846a3e0168f9188a6eccedd52707c63fd83cba2) --- sys/cam/ctl/ctl.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 6faecb0da0a4..a315c5ef7df3 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -13035,25 +13035,7 @@ ctl_process_done(union ctl_io *io) ctl_scsi_path_string(io, path_str, sizeof(path_str)); sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); - sbuf_cat(&sb, path_str); - switch (io->io_hdr.io_type) { - case CTL_IO_SCSI: - ctl_scsi_command_string(&io->scsiio, NULL, &sb); - sbuf_printf(&sb, "\n"); - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "Tag: 0x%jx/%d, Prio: %d\n", - io->scsiio.tag_num, io->scsiio.tag_type, - io->scsiio.priority); - break; - case CTL_IO_TASK: - sbuf_printf(&sb, "Task Action: %d Tag: 0x%jx/%d\n", - io->taskio.task_action, - io->taskio.tag_num, io->taskio.tag_type); - break; - default: - panic("%s: Invalid CTL I/O type %d\n", - __func__, io->io_hdr.io_type); - } + ctl_io_sbuf(io, &sb); sbuf_cat(&sb, path_str); sbuf_printf(&sb, "ctl_process_done: %jd seconds\n", (intmax_t)time_uptime - io->io_hdr.start_time); From nobody Tue Jan 2 20:52:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q5z1kK4z56J6k; Tue, 2 Jan 2024 20:52: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 4T4Q5y61qNz4XhB; Tue, 2 Jan 2024 20:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gyBajBEQaQFXqrENpVBmw0rvGSheIwa20fOPVUj+bA4=; b=EczZuKjybh6w5ShNPCB1yIRzYJFNX8WP4z2a+htXHOuQiBW4s+H/3tc9YMlfyIFF7zQ6QR OL69ZcHVwuznnJVJoykSg+6nlTPuRnPQcMiKrg7NweAZIDJ0SSY5auOFCpjBWsPeaKtdKP QNRHq9VyLqsxVlaCXmMW6zBjG7UVYmECt6Nur6yl6MRfFY4o/Q+VipiMzK1A2d/ajFRF0s EsZ/fxF6UEoouKujZarPF4xim0jx7QvTjFlFMkIMjh0rNpT18lVFlwOULoTGyaowxN6Md2 SvNsY8bWGOrNopjscnn9nEVzFhsQhSpz0YRNA0LPOGU8KDaKgmQkUYmEiUiE9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228758; a=rsa-sha256; cv=none; b=ccoe2vyUenEdvU700icwWEwr4wWbzcfcMKMtJtE57IdvXbVYjhQjXUdBTJBRUq6F9lfVxv 7ucg1Tno/6TyttVWoGl01rsuiLNjJyOgcfup7VVbaQp8UGq/07lnz4aKLE4jZ9O4uRFyJ6 ApxRe2BGnEH/VhLFz7jXPq/TRe6pMSRpSHOi/DWZLT2/jM+r3hVSTlDbHVqQkFSgmu7MbO DuaC4FRSnMsAjH/gxHGoIktruwYCW+MctC6qz1eXMsUYodutmqYPLS6W3frXTfXNKtGbbo /NQswQDp0QHUPhdKiUwA+B0FCcYyy0BX9TaIC4Q7ofQTdV/usdv7HaD8K2RTyg== 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=1704228758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gyBajBEQaQFXqrENpVBmw0rvGSheIwa20fOPVUj+bA4=; b=hiU5RcIgcllhiPGMgB9CferqV/z57+Ga8mBS1A0PMM8k/M9e7lz2UyiIuuZJ3+YhLC7ZDb Au+7kEqdCipO08Li6VtA2GcnVdSQcW05epb9CzvsI9vqZvjN3FAiBEdCTIOUSlkyrJCNEC 2QOdKwXi8+BEE3dXKj+/+5ECGJ8dmH5kjj3CUCVMO7OZNrWlAyv+AHLHclumA+o1udStD/ cTZARoNR75IMXA3EHzC5ny4qf3GuQQyHWsmymOC9528uhybQCVudlU+9u3a3GVM/e2qhrA rKpD6Mc9HgxQx6a7/RKvopFZLVRy2SfMxhZU3ccufWI6RWFBBQU5YeYeN7o1Iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q5y56xBz1FXf; Tue, 2 Jan 2024 20:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402KqcZH036985; Tue, 2 Jan 2024 20:52:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402Kqcah036982; Tue, 2 Jan 2024 20:52:38 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:38 GMT Message-Id: <202401022052.402Kqcah036982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 89806d373aaf - stable/14 - bsdinstall partedit: Avoid potential buffer overflow in newfs_command List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 89806d373aafe4e7a107c118132b34c784d8a816 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=89806d373aafe4e7a107c118132b34c784d8a816 commit 89806d373aafe4e7a107c118132b34c784d8a816 Author: John Baldwin AuthorDate: 2023-10-16 23:25:03 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 bsdinstall partedit: Avoid potential buffer overflow in newfs_command Allocate the buffer holding the newfs command string dynamically (building the string via open_memstream) rather than storing the command into a caller-supplied buffer of unknown length. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42237 (cherry picked from commit ae2fc74fe76ca8b89c5ef0081ef3f4008f83de41) --- usr.sbin/bsdinstall/partedit/gpart_ops.c | 68 +++++++++++++++++++------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index 8b75d2d6d859..65f53f31545f 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -86,12 +86,16 @@ scheme_supports_labels(const char *scheme) return (0); } -static void -newfs_command(const char *fstype, char *command, int use_default) +static char * +newfs_command(const char *fstype, int use_default) { struct bsddialog_conf conf; + FILE *fp; + char *buf; + size_t len; bsddialog_initconf(&conf); + fp = open_memstream(&buf, &len); if (strcmp(fstype, "freebsd-ufs") == 0) { int i; @@ -115,21 +119,21 @@ newfs_command(const char *fstype, char *command, int use_default) choice = bsddialog_checklist(&conf, "", 0, 0, 0, nitems(items), items, NULL); if (choice == BSDDIALOG_CANCEL) - return; + goto out; } - strcpy(command, "newfs "); + fputs("newfs ", fp); for (i = 0; i < (int)nitems(items); i++) { if (items[i].on == false) continue; if (strcmp(items[i].name, "UFS1") == 0) - strcat(command, "-O1 "); + fputs("-O1 ", fp); else if (strcmp(items[i].name, "SU") == 0) - strcat(command, "-U "); + fputs("-U ", fp); else if (strcmp(items[i].name, "SUJ") == 0) - strcat(command, "-j "); + fputs("-j ", fp); else if (strcmp(items[i].name, "TRIM") == 0) - strcat(command, "-t "); + fputs("-t ", fp); } } else if (strcmp(fstype, "freebsd-zfs") == 0) { int i; @@ -153,30 +157,31 @@ newfs_command(const char *fstype, char *command, int use_default) choice = bsddialog_checklist(&conf, "", 0, 0, 0, nitems(items), items, NULL); if (choice == BSDDIALOG_CANCEL) - return; + goto out; } - strcpy(command, "zpool create -f -m none "); + fputs("zpool create -f -m none ", fp); if (getenv("BSDINSTALL_TMPBOOT") != NULL) { char zfsboot_path[MAXPATHLEN]; + snprintf(zfsboot_path, sizeof(zfsboot_path), "%s/zfs", getenv("BSDINSTALL_TMPBOOT")); mkdir(zfsboot_path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); - sprintf(command, "%s -o cachefile=%s/zpool.cache ", - command, zfsboot_path); + fprintf(fp, " -o cachefile=%s/zpool.cache ", + zfsboot_path); } for (i = 0; i < (int)nitems(items); i++) { if (items[i].on == false) continue; if (strcmp(items[i].name, "fletcher4") == 0) - strcat(command, "-O checksum=fletcher4 "); + fputs("-O checksum=fletcher4 ", fp); else if (strcmp(items[i].name, "fletcher2") == 0) - strcat(command, "-O checksum=fletcher2 "); + fputs("-O checksum=fletcher2 ", fp); else if (strcmp(items[i].name, "sha256") == 0) - strcat(command, "-O checksum=sha256 "); + fputs("-O checksum=sha256 ", fp); else if (strcmp(items[i].name, "atime") == 0) - strcat(command, "-O atime=off "); + fputs("-O atime=off ", fp); } } else if (strcmp(fstype, "fat32") == 0 || strcmp(fstype, "efi") == 0 || strcmp(fstype, "ms-basic-data") == 0) { @@ -196,19 +201,19 @@ newfs_command(const char *fstype, char *command, int use_default) choice = bsddialog_radiolist(&conf, "", 0, 0, 0, nitems(items), items, NULL); if (choice == BSDDIALOG_CANCEL) - return; + goto out; } - strcpy(command, "newfs_msdos "); + fputs("newfs_msdos ", fp); for (i = 0; i < (int)nitems(items); i++) { if (items[i].on == false) continue; if (strcmp(items[i].name, "FAT32") == 0) - strcat(command, "-F 32 -c 1"); + fputs("-F 32 -c 1", fp); else if (strcmp(items[i].name, "FAT16") == 0) - strcat(command, "-F 16 "); + fputs("-F 16 ", fp); else if (strcmp(items[i].name, "FAT12") == 0) - strcat(command, "-F 12 "); + fputs("-F 12 ", fp); } } else { if (!use_default) { @@ -216,8 +221,11 @@ newfs_command(const char *fstype, char *command, int use_default) bsddialog_msgbox(&conf, "No configurable options exist " "for this filesystem.", 0, 0); } - command[0] = '\0'; } + +out: + fclose(fp); + return (buf); } const char * @@ -539,7 +547,7 @@ gpart_edit(struct gprovider *pp) const char *errstr, *oldtype, *scheme; struct partition_metadata *md; char sizestr[32]; - char newfs[255]; + char *newfs; intmax_t idx; int hadlabel, choice, nitems; unsigned i; @@ -686,10 +694,11 @@ editpart: } gctl_free(r); - newfs_command(items[0].value, newfs, 1); + newfs = newfs_command(items[0].value, 1); set_default_part_metadata(pp->lg_name, scheme, items[0].value, items[2].value, (strcmp(oldtype, items[0].value) != 0) ? newfs : NULL); + free(newfs); endedit: if (strcmp(oldtype, items[0].value) != 0 && cp != NULL) @@ -1021,7 +1030,7 @@ gpart_create(struct gprovider *pp, const char *default_type, struct ggeom *geom; const char *errstr, *scheme; char sizestr[32], startstr[32], output[64], *newpartname; - char newfs[255], options_fstype[64]; + char *newfs, options_fstype[64]; intmax_t maxsize, size, sector, firstfree, stripe; uint64_t bytes; int nitems, choice, junk; @@ -1122,7 +1131,7 @@ gpart_create(struct gprovider *pp, const char *default_type, /* Default options */ strncpy(options_fstype, items[0].init, sizeof(options_fstype)); - newfs_command(options_fstype, newfs, 1); + newfs = newfs_command(options_fstype, 1); init_allocated = false; addpartform: @@ -1141,9 +1150,10 @@ addpartform: case BSDDIALOG_CANCEL: return; case BSDDIALOG_EXTRA: /* Options */ + free(newfs); strncpy(options_fstype, items[0].value, sizeof(options_fstype)); - newfs_command(options_fstype, newfs, 0); + newfs = newfs_command(options_fstype, 0); for (i = 0; i < nitems(items); i++) { if (init_allocated) free((char*)items[i].init); @@ -1165,8 +1175,9 @@ addpartform: * their choices in favor of the new filesystem's defaults. */ if (strcmp(options_fstype, items[0].value) != 0) { + free(newfs); strncpy(options_fstype, items[0].value, sizeof(options_fstype)); - newfs_command(options_fstype, newfs, 1); + newfs = newfs_command(options_fstype, 1); } size = maxsize; @@ -1318,6 +1329,7 @@ addpartform: else set_default_part_metadata(newpartname, scheme, items[0].value, items[2].value, newfs); + free(newfs); for (i = 0; i < nitems(items); i++) { if (items[i].value != NULL) { From nobody Tue Jan 2 20:52:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q6025xvz56J1Q; Tue, 2 Jan 2024 20:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4Q600Dp3z4XsR; Tue, 2 Jan 2024 20:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uw9fM/wNGpk041/hnWsm386jLo1ybRvERleIzLnq/tU=; b=Jd407KH3Pyy5MCuNz2E94018OglcKyex0TCmYnIvqdJYmmr24+NsGkCgimaPKMUJInY3kL SlZVXy+Krc5HL7U7T2B1kV94nCESxmk/9ZwNRJ3U6nkGY2CXMCeYVT1NXn2kbNmllpFsGw zi4UPh3dcVrwzmm7xTbutvxo83m71+RElhV1J5DT1O4xnofl/kzaCwfkZ+7ncJ51BY4xv1 Rl8rEd8NgA96WUSTuz14EnJOhU4+aOzdOUBSSRIxYwq188FR0O7XXAiCyaKfiRb9bB3505 esTddIHTu0KWOyVqOLJYBL5OX+rlZ5xxkzhAT6oE/ysKciTKUNcC8Q6r82FxQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228760; a=rsa-sha256; cv=none; b=bZhLCkSO79O9V5dnJMPF+rh725bosldjmIc8jOIcTnudJ5Zmp8CiiDsHA6mi6VSeSVlad1 tHw+0AHEBInyH+M6SNGMbbnnxDXeL0Yrvo/HnHd+iMqqUcJGdL99SLC8DYPUVZibjEgbWT biT8LTE5ln/q0F7hSmkngcj0mGsJbMhM/CS7AqljEc2nUUQBs46RGmhOjaSnuB7z4P8VmW YjO4XBefaJkBIxO0lzT7GXdmY/Vjp4VppwRPctQJsISsRAW4e0kmbUBr0YJnzNCMMYdtFv ZmOMifg8pmJC2BKeIaIMhb+zXE2FLMQuWElYodxD4h+2tJ87D8P28rIq7kYsQQ== 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=1704228760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uw9fM/wNGpk041/hnWsm386jLo1ybRvERleIzLnq/tU=; b=VQ7Q6/AcH/+SDOeL9LOA9ZHpGLijXOUrOR204xEh40cMLEfxiy666YSkuvddZeo0EWMLSZ NeGbpaiy87xZxQR/2FTYBOP/6UAMyGdu9nm6Jc84EfqxQ4cec81bVT32gCbtL8Ev6a9q99 lPJSu9vkr/PZV2GeHr/VTLMhEyDgEjX8JagKvC0DVjJoZe+iqMaeWqRCP2trNyQS1xs8oI enXnRVnxMTi5F4MbWkTdZAmj04ErAMkw2FcXBeOhrz78x5u/229UcutyHBfBsNgnb46k7Z M5nQUHfGGYKmsZVVw9Rrj+++XIHtLmFEDOkU/Uf9JJMhdKxS6Rb25EYKOCsiFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q5z69mLz1FXg; Tue, 2 Jan 2024 20:52: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 402KqdTa037036; Tue, 2 Jan 2024 20:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqdwD037033; Tue, 2 Jan 2024 20:52:39 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:39 GMT Message-Id: <202401022052.402KqdwD037033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bb049096be78 - stable/14 - bsdinstall partedit: Replace malloc + sprintf with asprintf List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bb049096be7846625ce7159470153e0bae893b6d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bb049096be7846625ce7159470153e0bae893b6d commit bb049096be7846625ce7159470153e0bae893b6d Author: John Baldwin AuthorDate: 2023-10-16 23:25:15 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 bsdinstall partedit: Replace malloc + sprintf with asprintf This avoids potential bugs with the length passed to malloc not matching the string written via sprintf. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42238 (cherry picked from commit 51749e05e96eb07134a38984a8c06608b20f07ea) --- usr.sbin/bsdinstall/partedit/gpart_ops.c | 10 +++------- usr.sbin/bsdinstall/partedit/partedit.c | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index 65f53f31545f..64a45deb9f8a 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -731,18 +731,16 @@ set_default_part_metadata(const char *name, const char *scheme, } if (newfs != NULL && newfs[0] != '\0') { - md->newfs = malloc(strlen(newfs) + strlen(" /dev/") + - strlen(mountpoint) + 5 + strlen(name) + 1); if (strcmp("freebsd-zfs", type) == 0) { zpool_name = strdup((strlen(mountpoint) == 1) ? "root" : &mountpoint[1]); for (i = 0; zpool_name[i] != 0; i++) if (!isalnum(zpool_name[i])) zpool_name[i] = '_'; - sprintf(md->newfs, "%s %s /dev/%s", newfs, + asprintf(&md->newfs, "%s %s /dev/%s", newfs, zpool_name, name); } else { - sprintf(md->newfs, "%s /dev/%s", newfs, name); + asprintf(&md->newfs, "%s /dev/%s", newfs, name); } } } @@ -779,9 +777,7 @@ set_default_part_metadata(const char *name, const char *scheme, if (strcmp("freebsd-zfs", type) == 0) { md->fstab->fs_spec = strdup(zpool_name); } else { - md->fstab->fs_spec = malloc(strlen(name) + - strlen("/dev/") + 1); - sprintf(md->fstab->fs_spec, "/dev/%s", name); + asprintf(&md->fstab->fs_spec, "/dev/%s", name); } md->fstab->fs_file = strdup(mountpoint); /* Get VFS from text after freebsd-, if possible */ diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 3c5f552a935c..3067efc0ae9b 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -360,8 +360,8 @@ apply_changes(struct gmesh *mesh) TAILQ_FOREACH(md, &part_metadata, metadata) { if (md->newfs != NULL) { char *item; - item = malloc(255); - sprintf(item, "Initializing %s", md->name); + + asprintf(&item, "Initializing %s", md->name); minilabel[i] = item; miniperc[i] = BSDDIALOG_MG_PENDING; i++; From nobody Tue Jan 2 20:52:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q611Bg6z56JFn; Tue, 2 Jan 2024 20:52: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 4T4Q610cGqz4Xy8; Tue, 2 Jan 2024 20:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KM71AnCqSaDoENBl7UjVlKhYL4YS3f+zqXqszVFp8MM=; b=P9hGrdsmhQVf+3E2AyKAGv/ertKwO69RuRhscavMoMUldTeg2lwuFHypqgcMA3IpQjhxyY nb2Pw0ra9vFVfcsOreadrYSOtjUX9gSNRb4xnmoWX4XWD2Q92DnMOPh52Af0DLWU384oNR BapLXRL5Mfd8qfzEanF+75Zt+dA/N/fqsYecQs5JF54qpcswYH+o/6591N+GqIeXEp8sw0 /3CS9eUG/0Cx5+zEKhiB5RmLKq70Pn06t+zrjMPcspUsj9MU9Kp8uf+KCdohhO/boAZjT2 o1mV1vIL6fs3PvsZ+1ljGNVhjqOwm24vk+Spg3wK8hkxmlrYzjjuByO0XMe0Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228761; a=rsa-sha256; cv=none; b=UcxcltmO/nZZ4SZvUD50dtQp927wZOSI/oAncQFQSrY0Sh9sISDmTh7YH19GsyiNNxBOQc mDJPnGmVzEmNrqqK7QstZurQsga1A8UdJp8hkW9QYUJplAyK30XrJQICelgFqKHWMKThqZ wr+A3fkPz5lvsyXgR9tvUXMwbWgMegMiwwsGJAd6pyk5OF9sEVUnWrHr+LQnVr4FjMd0Yo fs8ez+c1rtut9sEG0vmc0UX6zPhcoYI7JRCIpMCJUGI0DvvzSPorv3aw6GSvvEHp+6qNvM /DbMmaZTyDBquHz3L8b74a+dBo1rUNLAuvIFY/vwwOlzPHZ/SF5FLo/lK+xDXw== 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=1704228761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KM71AnCqSaDoENBl7UjVlKhYL4YS3f+zqXqszVFp8MM=; b=aR+nAW/pi5V6NCQK3YewmMarp0H7naJ9PLvTez6KLrblbmwa9OngZEsW9rJHhtNu+xncpn zIjOQiycp3x5g48zdbk5vV+aWnenLJXMnaF3rHfH5NXpGpKNxiAh8xG37U4zimjJqO+YSk U7kvAn6iub5GbVfQFa1Q0oI7M9SGPFxsZMwKXjkiHuL3dB2XCPIGCETkV8g7S9qSLXq61l 9F7sogpyWyTu+rPBTpliidsz56NvwGv8XGKCEyuxL8/k0PvakZb3XzwQDSmH6OA+I8Nk9U H+0ezp2WiOfFGb+eopUid2YI1SS4QbidDRTDzsKpaL8mt+dOpe6ksqOyw+codg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q606p55z1FmX; Tue, 2 Jan 2024 20:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402Kqeew037096; Tue, 2 Jan 2024 20:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqeEL037093; Tue, 2 Jan 2024 20:52:40 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:40 GMT Message-Id: <202401022052.402KqeEL037093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 10415f634193 - stable/14 - bsdinstall partedit: Use asprintf to build wrapper command for newfs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 10415f6341936216197c9bb127e2b579a2189a33 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=10415f6341936216197c9bb127e2b579a2189a33 commit 10415f6341936216197c9bb127e2b579a2189a33 Author: John Baldwin AuthorDate: 2023-10-16 23:25:25 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 bsdinstall partedit: Use asprintf to build wrapper command for newfs Don't abuse the message[] static buffer used elsewhere for error messages to generate the command that actually newfs's each filesystem. Use asprintf to a more aptly-named 'char *command' variable to construct the string instead. This avoids potential bugs from truncation of the command string. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42239 (cherry picked from commit a8676bf367b099dcc97ff61031cbf4ceb5e37899) --- usr.sbin/bsdinstall/partedit/partedit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 3067efc0ae9b..9e25a2b31d1f 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -345,6 +345,7 @@ apply_changes(struct gmesh *mesh) const char **minilabel; const char *fstab_path; FILE *fstab; + char *command; struct bsddialog_conf conf; nitems = 1; /* Partition table changes */ @@ -387,10 +388,11 @@ apply_changes(struct gmesh *mesh) bsddialog_mixedgauge(&conf, "Initializing file systems. Please wait.", 0, 0, i * 100 / nitems, nitems, minilabel, miniperc); - sprintf(message, "(echo %s; %s) >>%s 2>>%s", + asprintf(&command, "(echo %s; %s) >>%s 2>>%s", md->newfs, md->newfs, getenv("BSDINSTALL_LOG"), getenv("BSDINSTALL_LOG")); - error = system(message); + error = system(command); + free(command); miniperc[i] = (error == 0) ? BSDDIALOG_MG_COMPLETED : BSDDIALOG_MG_FAILED; i++; From nobody Tue Jan 2 20:52:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q623LJXz56HwQ; Tue, 2 Jan 2024 20:52:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4Q621kfCz4Xw5; Tue, 2 Jan 2024 20:52:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P8lhF3+QkAYiaej47JlMGst5FRH9LsiGhGsU3vyTA6M=; b=lW5HX0ZbecZLEPEWtfc5xM2qx77g5TBEX4UihYRhyoEMtGKXhpl/0BQfcvdborWKtoDWdr 7Vuh49dYXQYrV/T+03jHQ7RYCmNCow0H1h1mPX+SQ49DhkBdlLvzzH8kkFGXckbv6hRrht KO4fScdZnoi1bIcSeWpltQIzWfYkiyAGB70aUc6e14S7ZHx1Y7ijK/0r3uba77VSAr+GEX l4cP18bqA/NRqbBJ2iEsL7epSZBbsGBIWSjrVicS+EN71tbrtI+7szRguxCHsFNXk6EBhJ INqqq5G4gYnjQl0jOiMcRJhkRJFnHeMGBSYg8NQItZHSP5VUUgRdupfErKdq4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228762; a=rsa-sha256; cv=none; b=WAZVbRDYxgdAoHReNSy9+KxujRqyskdrIwrmhpv9WNpVRzLZSORIKXy2ALaCMJr5nHGJD7 9huudvZESZkvQjshON1FDQpYM8Zo2rA0ID7lzhcH3fu9xqDDz2x4LDdfWr3irTvZqhOU7W TrmR7xn2F9eco7P9DE3eRZEoq68pIwM/Trv65ue99fyi0YOI8RDr6mKZEQef+wYiJR2XSk uWEaUOc41cr9H82T/AQ7pYzVRMCl04Flf4vLoQw82kEfm+EMdtfwrh3R9ghthJK0JtZkbd hHGRm0804LJA8VIGdAqCaTl+LWcw+bXg/llTvXdhLBFBbgcc3oN3p2KhnVlHfQ== 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=1704228762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P8lhF3+QkAYiaej47JlMGst5FRH9LsiGhGsU3vyTA6M=; b=XXJ4AibQXERgd5E+OdD0+/yo/gMtGV6KoADJZxHlbjWcwF9wuTqomdKcUEq3KurXBUMz5x Su1GHfaA2p+u5QAIH+pq97R/S/aA8AOkPlE/X2FEe8+w7aTuGGrhIUUVBF3mWVCQDRFwG3 fqiOANYdmDjmRKndjF8oXyL6YDWKD5CxG5yjMFLSB0ASAW/DapT7r5AMuzVpQCR1KN9zem GmTsR+V8Xc5pAp9ELY5J68DGCoTLy1OSnZRa+SH5zBlYGaxxGjHOE4nHLX7nIm9Ut7XIbC 9RrOlBAjl+cDtRKd5qSspee39RAaHdIZnd+mWBsliKNC1UglY1skCO71yJomwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q620mhKz1G1V; Tue, 2 Jan 2024 20:52:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402KqgD1037153; Tue, 2 Jan 2024 20:52:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqgIT037150; Tue, 2 Jan 2024 20:52:42 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:42 GMT Message-Id: <202401022052.402KqgIT037150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8ff950573c10 - stable/14 - bsdinstall partedit: Use snprintf instead of sprintf for error messages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8ff950573c104d99f4183b27801258566afe546c Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8ff950573c104d99f4183b27801258566afe546c commit 8ff950573c104d99f4183b27801258566afe546c Author: John Baldwin AuthorDate: 2023-10-16 23:25:38 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 bsdinstall partedit: Use snprintf instead of sprintf for error messages When generating a message for a dialog box into a static buffer, use snprintf instead of sprintf to avoid buffer overflows. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42240 (cherry picked from commit 6e8bf24073a1867c4b21bd84438a8b01ce91d82d) --- usr.sbin/bsdinstall/partedit/gpart_ops.c | 37 ++++++++++++++++++++---------- usr.sbin/bsdinstall/partedit/part_wizard.c | 6 +++-- usr.sbin/bsdinstall/partedit/partedit.c | 3 ++- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index 64a45deb9f8a..5c4ec5706c1c 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -62,12 +62,13 @@ gpart_show_error(const char *title, const char *explanation, const char *errstr) while (errmsg[0] == ' ') errmsg++; if (errmsg[0] != '\0') - sprintf(message, "%s%s. %s", explanation, - strerror(error), errmsg); + snprintf(message, sizeof(message), "%s%s. %s", + explanation, strerror(error), errmsg); else - sprintf(message, "%s%s", explanation, strerror(error)); + snprintf(message, sizeof(message), "%s%s", explanation, + strerror(error)); } else { - sprintf(message, "%s%s", explanation, errmsg); + snprintf(message, sizeof(message), "%s%s", explanation, errmsg); } bsddialog_initconf(&conf); @@ -263,7 +264,9 @@ parttypemenu: if (!is_scheme_bootable(items[choice].name)) { char message[512]; - sprintf(message, "This partition scheme (%s) is not " + + snprintf(message, sizeof(message), + "This partition scheme (%s) is not " "bootable on this platform. Are you sure you want " "to proceed?", items[choice].name); conf.button.default_cancel = true; @@ -298,7 +301,9 @@ schememenu: if (!is_scheme_bootable(scheme)) { char message[512]; - sprintf(message, "This partition scheme (%s) is not " + + snprintf(message, sizeof(message), + "This partition scheme (%s) is not " "bootable on this platform. Are you sure you want " "to proceed?", scheme); conf.button.default_cancel = true; @@ -484,10 +489,11 @@ gpart_partcode(struct gprovider *pp, const char *fstype) } /* Shell out to gpart for partcode for now */ - sprintf(command, "gpart bootcode -p %s -i %s %s", + snprintf(command, sizeof(command), "gpart bootcode -p %s -i %s %s", partcode_path(scheme, fstype), indexstr, pp->lg_geom->lg_name); if (system(command) != 0) { - sprintf(message, "Error installing partcode on partition %s", + snprintf(message, sizeof(message), + "Error installing partcode on partition %s", pp->lg_name); bsddialog_initconf(&conf); conf.title = "Error"; @@ -658,7 +664,9 @@ editpart: if (strcmp(items[2].value, "/") == 0 && !is_fs_bootable(scheme, items[0].value)) { char message[512]; - sprintf(message, "This file system (%s) is not bootable " + + snprintf(message, sizeof(message), + "This file system (%s) is not bootable " "on this system. Are you sure you want to proceed?", items[0].value); conf.button.default_cancel = true; @@ -1181,7 +1189,8 @@ addpartform: if (expand_number(items[1].value, &bytes) != 0) { char error[512]; - sprintf(error, "Invalid size: %s\n", strerror(errno)); + snprintf(error, sizeof(error), "Invalid size: %s\n", + strerror(errno)); conf.title = "Error"; bsddialog_msgbox(&conf, error, 0, 0); goto addpartform; @@ -1233,7 +1242,9 @@ addpartform: /* If this is the root partition, check that this scheme is bootable */ if (strcmp(items[2].value, "/") == 0 && !is_scheme_bootable(scheme)) { char message[512]; - sprintf(message, "This partition scheme (%s) is not bootable " + + snprintf(message, sizeof(message), + "This partition scheme (%s) is not bootable " "on this platform. Are you sure you want to proceed?", scheme); conf.button.default_cancel = true; @@ -1248,7 +1259,9 @@ addpartform: if (strcmp(items[2].value, "/") == 0 && !is_fs_bootable(scheme, items[0].value)) { char message[512]; - sprintf(message, "This file system (%s) is not bootable " + + snprintf(message, sizeof(message), + "This file system (%s) is not bootable " "on this system. Are you sure you want to proceed?", items[0].value); conf.button.default_cancel = true; diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c index ba10350029a9..ba01e115bcf4 100644 --- a/usr.sbin/bsdinstall/partedit/part_wizard.c +++ b/usr.sbin/bsdinstall/partedit/part_wizard.c @@ -277,7 +277,8 @@ query: char warning[512]; int subchoice; - sprintf(warning, "The existing partition scheme on this " + snprintf(warning, sizeof(warning), + "The existing partition scheme on this " "disk (%s) is not bootable on this platform. To install " OSNAME ", it must be repartitioned. This will destroy all " "data on the disk. Are you sure you want to proceed?", @@ -367,7 +368,8 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, HN_DECIMAL); humanize_number(neededstr, 7, MIN_FREE_SPACE, "B", HN_AUTOSCALE, HN_DECIMAL); - sprintf(message, "There is not enough free space on %s to " + snprintf(message, sizeof(message), + "There is not enough free space on %s to " "install " OSNAME " (%s free, %s required). Would you like " "to choose another disk or to open the partition editor?", disk, availablestr, neededstr); diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 9e25a2b31d1f..d1ffd09c0d5e 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -436,7 +436,8 @@ apply_changes(struct gmesh *mesh) fstab_path = "/etc/fstab"; fstab = fopen(fstab_path, "w+"); if (fstab == NULL) { - sprintf(message, "Cannot open fstab file %s for writing (%s)\n", + snprintf(message, sizeof(message), + "Cannot open fstab file %s for writing (%s)\n", getenv("PATH_FSTAB"), strerror(errno)); conf.title = "Error"; bsddialog_msgbox(&conf, message, 0, 0); From nobody Tue Jan 2 20:52:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4Q635Dpqz56J1Y; Tue, 2 Jan 2024 20:52: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 4T4Q632dS9z4Xr6; Tue, 2 Jan 2024 20:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EFHBHP6AsE3kQA0341th/0DxpuanZwTw3uFmOPRNEIw=; b=aHM9iEVL6Vs1K9WxfIcwHylG4y6M77HegAlDFNWnm9yYa9yfxAlT9dGXLWal0JpLmpb9F1 ZNTTMD9tjDYTN/iQBHHPT8Xkpl5hVnxFx0ujm5dj9ploxGwqFfTyv+m0+eiIw6upFuuAXU bEtfc2wh9Mtz8AEO77gcxRFHofKynuHyK7patPDC5FGEnfFsApWRkboEFrEWUhz2MphVb2 ILnuf2pgnPszkB5Drc9CuniSNzyYLeqKLErbm+TBZYEpeoAWGdOd+R5pDLyid4iGJvgwD1 tX89Hiznpdi7gMqi7Vnp1ZFqhfD1yqr17Ebp3/jPR3Gq4bihK5TGNTQXoshoFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228763; a=rsa-sha256; cv=none; b=ZcoI/4aq3ER0oMFR3S46KTaglCEKbZD1gQIpwm2nDe963JMq5e4fbF29hTtv5F7GISFjsS uVzJlOcqFRYEvsgexzbxWE6h0oYNJcqzl1yptYUVNl0Eyl7j6t63v4aT2ont/T5S2quU61 G7DM15tXN4mRGg4JoO02bQzcVIWatxxIqfscBA4C90l3BKvEw/BJzv8Q2uqXGN8iF2rpIi JnqyHu85M8hJMgpP+/DfqPx+PrKVqtbH8cWXUqwvO3OZU6j8v0IGrAsu9h1znziCowmklo KtHnLx29A5uohDUqlM+L+7nWSxoszurkurf+y7TACgHdxgmSiKFKJV7cvewJmQ== 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=1704228763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EFHBHP6AsE3kQA0341th/0DxpuanZwTw3uFmOPRNEIw=; b=qL4OSW9LKmlDy+YaOdntllau8mTG6yM1T78xRa6iweWJWVe/VVdCsAyU5boxMyzC2h+S3I XFRQkDNUS/FprA7hM8x9F+Ehv0o3k/3TGopSKJfbKv+NpaMrOG8bCe70nEL+ZP60jlx2Ie of2QcPUaMstjf01TN9z9gzoT7Qd5KotPpBuZU8CriWNBy39StTHyjldeDZOZDF2BRetzkc pSQFNa3UKJru+3XIW9NAFJaAjyZXJeLDzeecDRw64i3xDa/FSWb9Sm7jUrkP6Umvdt/EnZ 9D+h47hPYIHa7pXHeRJTb2VBVfxBSfk49v6EUlzJzV4PQ+Vn1L1fxSzeKBPlrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4Q631l4cz1FmY; Tue, 2 Jan 2024 20:52: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 402KqhmN037201; Tue, 2 Jan 2024 20:52:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqhF5037198; Tue, 2 Jan 2024 20:52:43 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:43 GMT Message-Id: <202401022052.402KqhF5037198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e74b03451f55 - stable/14 - abort2: Generate a core dump List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e74b03451f552088c6d82c51331b5ad8657aa800 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e74b03451f552088c6d82c51331b5ad8657aa800 commit e74b03451f552088c6d82c51331b5ad8657aa800 Author: John Baldwin AuthorDate: 2023-11-14 01:00:52 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 abort2: Generate a core dump Call sigexit rather than exit1 so that a core is generated. If running the SIGABRT handler is desired, this would need to use kern_psignal() instead. In that case a userspace wrapper in libc would be needed to force an exit if the handler doesn't exit. Given that abort2(2)'s intended use case is when userland is in a sufficiently bad state such that it can't safely call syslog(3) before abort(3), a userspace abort2(3) wrapper in libc might be dubious. Reviewed by: Olivier Certner , emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42163 (cherry picked from commit 9b57e30cf5b6036263a1a2551df8574571c6f5a4) --- sys/kern/kern_exit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 965f4a431755..f9445a481d92 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -827,8 +827,9 @@ out: sbuf_finish(sb); log(LOG_INFO, "%s", sbuf_data(sb)); sbuf_delete(sb); - exit1(td, 0, sig); - return (0); + PROC_LOCK(p); + sigexit(td, sig); + /* NOTREACHED */ } #ifdef COMPAT_43 From nobody Wed Jan 3 01:23:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4X6X05l6z56LB8; Wed, 3 Jan 2024 01:23: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 4T4X6W6Vx9z4FDp; Wed, 3 Jan 2024 01:23:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704245011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DcPANmVHmuVKBDYPOAJvbqybnepAliPz5bFzNP6szcs=; b=ooUE3EdhMLJHLHEpz3VaalatyyGS9MIzq3Pm1c9zAXJ25HfVP2VSOExeKOCXO9OUUKEZjF 94ltlX7Yt/FGT9f6bNukp9sccneLw7t9j4q2BeiEJxMr+Is6X1oOufJPlIgN9d8welIOBO 62kyaNtIBQBYuT/lTPAVsFofE9UAORKBIhEBC6HK+3G9hRI/LsdPG2I1HFdh2WiyfybmKV c3BgWG98OkLxnXSFc/LYVTbnHX7NdvquOOypcDjLi8QgI7HwkHskTh7p7pj7HlS7Hxprup O10m2zAgj5Cme0LJLJjuSUwQDAo+dqzvOJehgOgrNW+0J3CKfGeyez3G9k6kEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704245011; a=rsa-sha256; cv=none; b=VmJC2AveUtBSuV3+WSB3SnpXn6kQm7Y3UiwPmpJvbg/PA31tFGTbnXpo1TqJTI/EZaD/Ak PyPsrBCDVcw2uVGOEE3DVb+MYJ8euO/lX4d7llSgPnvk5R9aNCzAMnIY+32l0xAQQqy68I Y0tQkScQsDj2ph5duuPb8ovD9HzOe3hiOdKW9Q/9beb7+NX2l+s4ZNZZk2c24mroTZp3t/ ew6NxWOe3w9Kt1ENG34InRWAEBh6c+OE5xAKPYYDmEuBHkUZ/Ue6XnJSnSwJukMCqRL3NJ VuTk0+UC4vac/P4sQgYRgxywA+/v8ILC8GGyGSXcLpV3MopmcsZKPRFW/kCiZg== 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=1704245011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DcPANmVHmuVKBDYPOAJvbqybnepAliPz5bFzNP6szcs=; b=TKdXpHN5os9xnKtfamR4WuArjkDVXyJ0CbipIHX2PLtz5UARN25dvXf9JTjCW3/688c89m wmGUUAKgNz1wWqSbDBUCENxs8kEAJt0JyKKgqp552kw0xt1dgnwAQsrtSid8PSWYf9pCQV 1azLzr/zPuGMisVEXVTdGz7gNg7Dv7/Y9ptavYfRFJQbpSY2RGELLKoDVrQzXotWrQrapU cbkf780aKoOQNVhbgpopLyjdy6T2qgvhoQDgf6ahbOYaqxC4K+m5vMmI95+UAVX2B990rL Pnk+SaDuUFDLxT8iCegC/ai0bjUq6LUaMaM3dVQEdq00IDZJMc5792VDPjQaTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4X6W5XnHz1PBB; Wed, 3 Jan 2024 01:23: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 4031NV37090093; Wed, 3 Jan 2024 01:23:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4031NVSu090090; Wed, 3 Jan 2024 01:23:31 GMT (envelope-from git) Date: Wed, 3 Jan 2024 01:23:31 GMT Message-Id: <202401030123.4031NVSu090090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 2f3ff6fe1a69 - stable/14 - vfs_vnops.c: Fix vn_generic_copy_file_range() for truncation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2f3ff6fe1a69ad5736e0d1d1575678c846e04402 Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=2f3ff6fe1a69ad5736e0d1d1575678c846e04402 commit 2f3ff6fe1a69ad5736e0d1d1575678c846e04402 Author: Rick Macklem AuthorDate: 2023-12-31 23:55:24 +0000 Commit: Rick Macklem CommitDate: 2024-01-03 01:22:26 +0000 vfs_vnops.c: Fix vn_generic_copy_file_range() for truncation When copy_file_range(2) was first being developed, *inoffp + len had to be <= infile_size or an error was returned. This semantic (as defined by Linux) changed to allow *inoffp + len to be greater than infile_size and the copy would end at *inoffp + infile_size. Unfortunately, the code that decided if the outfd should be truncated in length did not get updated for this semantics change. As such, if a copy_file_range(2) is done, where infile_size - *inoffp is less that outfile_size but len is large, the outfd file is truncated when it should not be. (The semantics for this for Linux is to not truncate outfd in this case.) This patch fixes the problem. I believe the calculation is safe for all non-negative values of outsize, *outoffp, *inoffp and insize, which should be ok, since they are all guaranteed to be non-negative. Note that this bug is not observed over NFSv4.2, since it truncates len to infile_size - *inoffp. PR: 276045 (cherry picked from commit 2319ca6a01816f7fc85d623097c639f239e18c6a) --- sys/kern/vfs_vnops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index e6a4b074b4e5..20632a3c4703 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3363,8 +3363,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, goto out; if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0) holein = 0; - if (holein > 0) - error = vn_getsize_locked(invp, &insize, incred); + error = vn_getsize_locked(invp, &insize, incred); VOP_UNLOCK(invp); if (error != 0) goto out; @@ -3400,7 +3399,11 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, */ if (error == 0) error = vn_getsize_locked(outvp, &outsize, outcred); - if (error == 0 && outsize > *outoffp && outsize <= *outoffp + len) { + if (error == 0 && outsize > *outoffp && + *outoffp <= OFF_MAX - len && outsize <= *outoffp + len && + *inoffp < insize && + *outoffp <= OFF_MAX - (insize - *inoffp) && + outsize <= *outoffp + (insize - *inoffp)) { #ifdef MAC error = mac_vnode_check_write(curthread->td_ucred, outcred, outvp); From nobody Wed Jan 3 01:36:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4XPb3VrWz56MLd; Wed, 3 Jan 2024 01:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4XPb2YJzz4Fh5; Wed, 3 Jan 2024 01:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704245795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QICeL+h1RCNkRxUWplnuLT/jJ/1fiNyJRkXJw5336mI=; b=gMYI3yXIkL3gDLWTqudogzEru4GBl5GPK4ZceYC64O7OWKMI8KJAw3Nv+nr6IrCfV27V7x lO0xwONoTRdRAQ+oy2Vokt1uYgJLs1dr4c5rOGInfiDMQ8MR+YR77ZIsG+7+bg3jNRJW7T Asw0maRV15iDcw9z3RcF3/PeA9zLH8SRf70Q7500a8I1oxh5NYYo0xxv1MgkVrvoYoyCAb 9fPVGK3Yvylousk8f9b2PzTR48psqh0dKO+n4nMgHXd56NZdyNrYbwCrhLWtfRpPWfBxTz 0Vy0jJ0A7oDCjfc3FVPTq6hCzN5m4mvUu8F9F+OvNfovhag1oDc2YBAY9ME7EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704245795; a=rsa-sha256; cv=none; b=C1dZfySi8DgdVgbqd5AW9OwpLgSjDl4ijgE9gYrRSNmZ2DBQMyby+IzC8vkXUAr95Sjb6W 1MbZxvzURiGllLUfAd04J3IRo4gtqR0+M1bjS83/0iRWCdVSe03o+0A0sOFbXub+IkQdW6 NBxaodzecV6HQBxN+KJcIlIVYkqRF+s8FhE3OMOZTR6hJqhxVR4RtWrxtulcBSFQOqPNQ2 MfatqYnslElSQ2owKeWRT3ZQeMw2XVpJmhATG5sRB0uhLVSlP/qEu/5NUBNC+ENeth4VnC nq/tPSv+tS+P+XvL3Llue/CNzuQpFbfxdbVdNFcxN8nnNoBojqZgRr+u8DlxyQ== 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=1704245795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QICeL+h1RCNkRxUWplnuLT/jJ/1fiNyJRkXJw5336mI=; b=fvK2mGqIbaXuIix50o+/GWRrh8wuS23QGUQRmgv1SxV9dnySZFq0YOxTZel5C5fE++1SOr P++4bQaVyuJIuK4hhv1eX3U5ZX2nhyKgwhawUY3VmqJYWRSlTgW4zM79hCOnHhRHtP7AQG npXL0t5WCtuSwixut4KEykc+QBSLPL0wlfDkOnvjHVOAc1SBGbrWMn+PiPCUlgsda6BEYx HWsHaAxpuiSmUM6swIQuQjTEN8oZfQOpqvmbwdyZbmpMET3eLjf4mPA3KqFtK/cXt3P9GP egZGBYC5leYhWzBhuMGhOLtOq/PBkqMwWL+sCo4azlJExwhUvCMmDJGWfrIQoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4XPb1Mcdz1PMd; Wed, 3 Jan 2024 01:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4031aZtH006652; Wed, 3 Jan 2024 01:36:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4031aZIG006649; Wed, 3 Jan 2024 01:36:35 GMT (envelope-from git) Date: Wed, 3 Jan 2024 01:36:35 GMT Message-Id: <202401030136.4031aZIG006649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: e7044084cf81 - stable/13 - vfs_vnops.c: Fix vn_generic_copy_file_range() for truncation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e7044084cf813bfb66cbea8e9278895b26eda5d2 Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=e7044084cf813bfb66cbea8e9278895b26eda5d2 commit e7044084cf813bfb66cbea8e9278895b26eda5d2 Author: Rick Macklem AuthorDate: 2023-12-31 23:55:24 +0000 Commit: Rick Macklem CommitDate: 2024-01-03 01:34:31 +0000 vfs_vnops.c: Fix vn_generic_copy_file_range() for truncation When copy_file_range(2) was first being developed, *inoffp + len had to be <= infile_size or an error was returned. This semantic (as defined by Linux) changed to allow *inoffp + len to be greater than infile_size and the copy would end at *inoffp + infile_size. Unfortunately, the code that decided if the outfd should be truncated in length did not get updated for this semantics change. As such, if a copy_file_range(2) is done, where infile_size - *inoffp is less that outfile_size but len is large, the outfd file is truncated when it should not be. (The semantics for this for Linux is to not truncate outfd in this case.) This patch fixes the problem. I believe the calculation is safe for all non-negative values of outsize, *outoffp, *inoffp and insize, which should be ok, since they are all guaranteed to be non-negative. Note that this bug is not observed over NFSv4.2, since it truncates len to infile_size - *inoffp. PR: 276045 (cherry picked from commit 2319ca6a01816f7fc85d623097c639f239e18c6a) --- sys/kern/vfs_vnops.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index e720ef151c9e..f5961a33f960 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3318,8 +3318,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, goto out; if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0) holein = 0; - if (holein > 0) - error = VOP_GETATTR(invp, &inva, incred); + error = VOP_GETATTR(invp, &inva, incred); VOP_UNLOCK(invp); if (error != 0) goto out; @@ -3355,8 +3354,11 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, */ if (error == 0) error = VOP_GETATTR(outvp, &va, outcred); - if (error == 0 && va.va_size > *outoffp && va.va_size <= - *outoffp + len) { + if (error == 0 && va.va_size > *outoffp && + *outoffp <= OFF_MAX - len && va.va_size <= *outoffp + len && + *inoffp < inva.va_size && + *outoffp <= OFF_MAX - (inva.va_size - *inoffp) && + outsize <= *outoffp + (inva.va_size - *inoffp)) { #ifdef MAC error = mac_vnode_check_write(curthread->td_ucred, outcred, outvp); From nobody Wed Jan 3 01:37:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4XQz5bJVz56M84; Wed, 3 Jan 2024 01:37: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 4T4XQz5581z4GRP; Wed, 3 Jan 2024 01:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704245867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/P0hIzWkh2kPbDQYBSe/4RB+iLSZYMY2Y5JGwG9BWY=; b=r5XAQvpaAX7G7LpaHrUIoKg+qfZkgw4FASXpWsHYWI/9lKcUkdlYcRp8ETxpH4Uq/46LpD gmGwiRO3yPSFpyk8pC0ygDxRHx+Ltd99PvyhX7h9w0OpQl5s5EMrvNdNN5ofcCVYGkMSXq RSIMUNUNGeiu2OM7uy9FIXJvBrOo+1r+zTqBQxdDZ/p5GDUsKJbT/FnnND25rwgs6V487u Oc4qERlGpFN9Pi0OEfGbyjB+TlaQxgNkNpQLxUTvBH/JqSq1QeJH4L9nZEyFhsAqs2yi21 njPUlL3r0EPO1ySPvinBrS87NW/3SrPx3yu7GYEd+1obdsfFY7g1KuXNPIR6JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704245867; a=rsa-sha256; cv=none; b=J8/cIKc4wms9X+nRmE9hQcuTemA0UV9tvkbs/1RJCGSJ/BKYkQc5qBQ5LtqWVP/2DbwqKd kvIg1U3TFFzM0tzRpoF4pSo2x318dV5cDw7JBmRHQlvK8E/HEV9ejyqZUHMqwcn//UI7Wa 1m6db+XcwMxJ5r2N7DT0dxjBi8UlOefr+TaNP4zFue0kj07JNGm9Cdk1irKF3IQGKbHB1h hHtJ4FiufP3jkwTGyqJ8g4Z1V12ckWIPGQPkWIo1dPKIHHfNUa21ZFihVXIQOs/OPNdy9R p495oBvdLFU1Wn/HMLfb4t0e9YXbUjj9Ddy5q2vRluA3penBqhqGGx16V+R+Gg== 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=1704245867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/P0hIzWkh2kPbDQYBSe/4RB+iLSZYMY2Y5JGwG9BWY=; b=lozOa6069KibmkxjpXbYnxUEZv9PBfS/orfuQC+hg4AcsyXene6+/OsLWXtUr2RdYvGTMV oloZm+GZXX8zbv8WxeaSnjfmxkiW8+SSQs3xL64q1DSCYuREvCS8LIufTylnb2tCyUR4sp y9eR+byQ12Z2nJGURcw8hqJdqWMP/XKNoQZMO65FOTc0iSEwJzXf9SvLT2Ghm1heIcgpuU I8uY8lbGuF6djPRlI7pEYIFzqwHy5Ap6d9cDxcsYPHDSHupdi2dKJ6DjQexfQ7So+dG6lq VTCv1ase1L46SgEMsCyGG/8TNX23zcqU/iOoBZFIoZLHPBpLk0HVjtVsnYsaIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4XQz47Yvz1PC9; Wed, 3 Jan 2024 01:37: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 4031blJ4006943; Wed, 3 Jan 2024 01:37:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4031blBP006940; Wed, 3 Jan 2024 01:37:47 GMT (envelope-from git) Date: Wed, 3 Jan 2024 01:37:47 GMT Message-Id: <202401030137.4031blBP006940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 78e1cf110e38 - stable/14 - stand/zfs: Remove read-compatible features List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 78e1cf110e381c683afd1a9ef2006753417031ba Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=78e1cf110e381c683afd1a9ef2006753417031ba commit 78e1cf110e381c683afd1a9ef2006753417031ba Author: Alexander Motin AuthorDate: 2023-11-04 16:26:25 +0000 Commit: Alexander Motin CommitDate: 2024-01-03 01:37:34 +0000 stand/zfs: Remove read-compatible features These features are marked as ZFEATURE_FLAG_READONLY_COMPAT and so irrelevant for read-only pool imports by the loader: "com.datto:resilver_defer", "com.delphix:obsolete_counts", "com.delphix:spacemap_histogram", "com.delphix:zpool_checkpoint", "com.intel:allocation_classes", "org.zfsonlinux:allocation_classes" This should cause no functional changes, just a code cleanup. MFC after: 2 months (cherry picked from commit 939a62d673e6c340ee2b7243074a529919e39196) --- stand/libsa/zfs/zfsimpl.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index b904ead24e1d..253cfd2f16e3 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -113,23 +113,19 @@ typedef struct indirect_vsd { static vdev_list_t zfs_vdevs; /* - * List of ZFS features supported for read + * List of supported read-incompatible ZFS features. Do not add here features + * marked as ZFEATURE_FLAG_READONLY_COMPAT, they are irrelevant for read-only! */ static const char *features_for_read[] = { "com.datto:bookmark_v2", "com.datto:encryption", - "com.datto:resilver_defer", "com.delphix:bookmark_written", "com.delphix:device_removal", "com.delphix:embedded_data", "com.delphix:extensible_dataset", "com.delphix:head_errlog", "com.delphix:hole_birth", - "com.delphix:obsolete_counts", - "com.delphix:spacemap_histogram", "com.delphix:spacemap_v2", - "com.delphix:zpool_checkpoint", - "com.intel:allocation_classes", "com.joyent:multi_vdev_crash_dump", "com.klarasystems:vdev_zaps_v2", "org.freebsd:zstd_compress", @@ -138,7 +134,6 @@ static const char *features_for_read[] = { "org.illumos:skein", "org.open-zfs:large_blocks", "org.openzfs:blake3", - "org.zfsonlinux:allocation_classes", "org.zfsonlinux:large_dnode", NULL }; From nobody Wed Jan 3 01:37:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4XR06SBWz56MN6; Wed, 3 Jan 2024 01:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4XR062w1z4G7r; Wed, 3 Jan 2024 01:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704245868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qfZS2O5hheJQATx/lK2reDLz1pEqG2adKKl7lJ9eUK4=; b=Lmd/+zbJCXXImc1KZ9ufEaU70NMxND+L+5BRrBqFFza12rPOoRn53IAS4tvNqzPR1Yj91O 5OeQXdXoQwo755BxrBpJJnHQ0qGNGWoLz6kSrU8XzOQRGlwg9/zlDjx2f0/5l8Qf1UXiui iy1/RL54d8lp6lGIQnhEYGpJeCQsdaZLWwEAAI24OW7mUUcc19UBtABqzF3VqOXCMCiTAq Du4ywcurE+se5WJSYe45jl4m8/S2iUFFgACuQmmS0nkXQmS5GHhEh1KpGMiwIbdHx2OncF xcT1J124DJn7syEg6+k7dw8yvfZaPGxc8mIeOAaLnV5coxu2yY0E9DR9hv0hyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704245868; a=rsa-sha256; cv=none; b=ilg9cSEhV9WXLVlQOXSWJlEmV4Q3M6X1FjbbOZkJBuG9u1eT94RLcuYq6htgRJ+Y+9NKKL bLvTW38s2KaWayIpq4eqvSuqFV/EA+8vZW90yqq0mIizuoG/b1v19fggiFJos4FZG9dQ42 HPBlDn9WLjD5Qh/47lMOY5X0M0M2UlmMNM5Cyul6J1kB87t05oVZh3GywGIYnCAyntTOqt SlMrlPTSvlfYNxNWI3c8UooK3+GbJFaX/jRCjzmyu64Nk/o86GVbG0BvFHNI2sjZBIhQRB mZz94eP4zr74lVxs2gqsxN1od/n2hl0aK4Ok8VzaCwRs25H7vOfC1JUz0+EXFw== 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=1704245868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qfZS2O5hheJQATx/lK2reDLz1pEqG2adKKl7lJ9eUK4=; b=KQWHR9Xbp5u4jT5cCYkkmYwG88MIFYUr6SBky4nlTKu3/620iza8LsAF1IbWVk9VNGFPXy 0KUUxSuBZo8pBI/wJOFAwuGIexIIAbTePc4yYIJOs8/Q6KTJ9Yh++GqntslxmBlhIB1tIL h1ZBm6DSQavWgk5CvB26KovV+tusjReS1GAlkEH36qiN1wjkeb4wntTWif52C/yPaZ5YOt IWOWBEESgJW4QyHFIZMevsxLVPtAPsZxokiOHpnvApdwpxS6TbjDcnGqx9+lBNn8NKLjdB GokFRjgZHT8faMZfNn3/5l9i/8UqRZEt9adLbaONX8imT9e1hQzAfHKQXlnVgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4XR058B4z1PMf; Wed, 3 Jan 2024 01:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4031bm2t006988; Wed, 3 Jan 2024 01:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4031bmfQ006985; Wed, 3 Jan 2024 01:37:48 GMT (envelope-from git) Date: Wed, 3 Jan 2024 01:37:48 GMT Message-Id: <202401030137.4031bmfQ006985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 5791b17844b2 - stable/14 - stand/zfs: Remove one more read-compatible feature List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5791b17844b2ea34d600a8e29d0062f5aa18896a Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=5791b17844b2ea34d600a8e29d0062f5aa18896a commit 5791b17844b2ea34d600a8e29d0062f5aa18896a Author: Alexander Motin AuthorDate: 2023-11-04 17:04:33 +0000 Commit: Alexander Motin CommitDate: 2024-01-03 01:37:34 +0000 stand/zfs: Remove one more read-compatible feature This feature is marked as ZFEATURE_FLAG_READONLY_COMPAT and so irrelevant for read-only pool imports by the loader: "com.delphix:spacemap_v2" This should cause no functional changes, just a code cleanup. I'm sorry, missed it in previous commit. MFC after: 2 months (cherry picked from commit c2588f5e066bbeb37e6bbdd5faf14320c60c1cbd) --- stand/libsa/zfs/zfsimpl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 253cfd2f16e3..ed9c3753dd19 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -125,7 +125,6 @@ static const char *features_for_read[] = { "com.delphix:extensible_dataset", "com.delphix:head_errlog", "com.delphix:hole_birth", - "com.delphix:spacemap_v2", "com.joyent:multi_vdev_crash_dump", "com.klarasystems:vdev_zaps_v2", "org.freebsd:zstd_compress", From nobody Wed Jan 3 01:40:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4XVD6kgcz56MNJ; Wed, 3 Jan 2024 01:40: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 4T4XVD6DfKz4GlW; Wed, 3 Jan 2024 01:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704246036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NOLcMnVBQ87tymESMANGgbot1q+2b4VzpVCmBoNiwZA=; b=PSmYEB8vOYU4Cc3egYG3oWNLjMmddiAxnoMAiqpJFL2Y0sbbjSQf7O8afbNMNRwYCK4/WZ HUN2mw66slZVVYzno6zjwoa7qIXr4lzx5h61gYclTscGAstxNgU7BE8Ogp8qhLq8vmWdwY OrHtamejck95KPLkJqMxGYIh7LzSsZwJQDQqGHrXuuTS+RywXgsPSpJ08eCQGvjtuwGol1 1Nvnza5SyjTZhkVtSLQSqd+6vVLnnk1XwTkRj3EJf8NLwIV85IoBuRm6OrGglhqAOhdz10 Vg9RhYcf4my/qIJwwBI0Eajejb47nD+oB6m/MOUom4PruOeUxrli/bVn5zE2vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704246036; a=rsa-sha256; cv=none; b=M5u1PZk00ixc/1PGu+c6khuVv9NQpzRhENNq5+jHCTn2Sqi0VzVqyCsHNCobzCdMF814xz 2EICqUTfA0Fy9ITMgeanT/zcWn2vPavZQ0bvHTyblbyQonDcooJGX87ouxouXjaCW/xCYW JlRxmQEmXa9SawHqwKS4tDJIdXrZRfyombqmsW/qevrB8C+mShdrrqz4k4JI3uKYKG0onq EQCQhkW3SosqbbMasKbVWycdaIEBGX33kldbLcxucZs2B3zaghdOSFjNEdGM9AhJwdJgsN BlSNiTlvepnhA4eC9A+OtSdaC2F7OL2Por0p2oOYqwlOf2jcB4c0x5LcMaWQJw== 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=1704246036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NOLcMnVBQ87tymESMANGgbot1q+2b4VzpVCmBoNiwZA=; b=xoq96g1nhP/s9Z7sHv2ijN6Vmc+Uua7+vDQV2VD0EXSCzKImUM0dP7ohWsMZ7sSHcf6YeD /UwN2Iaee5eFYbJEeaMRK7piruGhxjx3cD6I3+Yl5kOFMh9bQ+GFcwTPesvQ9n6Eoe7qAx NAZQE3lZx/Si6gv2f/czPN6deTsqqvDow7Euew2dhLEhSXOipw0S6dYc4kctdKuP0XTO6O 2/iP+WhpJ76coIdHYTTXnoiBZ5yTJbFhN5mIBab4dwu4c/VlaUDeGfTwNe4PKq3FvP+vKm i3MirCMrgdaHyk92SNReEmsU0vex1JT/qHhiIuxH/a268TZ5MeZZpQoc8HNqrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4XVD5K9lz1PMj; Wed, 3 Jan 2024 01:40: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 4031ea2G016004; Wed, 3 Jan 2024 01:40:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4031ea9Y016001; Wed, 3 Jan 2024 01:40:36 GMT (envelope-from git) Date: Wed, 3 Jan 2024 01:40:36 GMT Message-Id: <202401030140.4031ea9Y016001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 78c98588c950 - stable/14 - nvme: Add some bits from NVMe 2.0c spec. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 78c98588c9507e708deba5fe58ae550e01759824 Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=78c98588c9507e708deba5fe58ae550e01759824 commit 78c98588c9507e708deba5fe58ae550e01759824 Author: Alexander Motin AuthorDate: 2023-12-27 18:50:54 +0000 Commit: Alexander Motin CommitDate: 2024-01-03 01:40:31 +0000 nvme: Add some bits from NVMe 2.0c spec. MFC after: 1 week (cherry picked from commit b46c7b1ed4e5307c689df72ea8a0b69e02456905) --- sys/dev/nvme/nvme.h | 26 +++++++++++++++++++++++++- sys/dev/nvme/nvme_ctrlr.c | 8 ++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index e9b1b32c3777..3e39803f68ab 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -91,6 +91,8 @@ #define NVME_CAP_HI_REG_CSS_NVM_MASK (0x1) #define NVME_CAP_HI_REG_BPS_SHIFT (13) #define NVME_CAP_HI_REG_BPS_MASK (0x1) +#define NVME_CAP_HI_REG_CPS_SHIFT (14) +#define NVME_CAP_HI_REG_CPS_MASK (0x3) #define NVME_CAP_HI_REG_MPSMIN_SHIFT (16) #define NVME_CAP_HI_REG_MPSMIN_MASK (0xF) #define NVME_CAP_HI_REG_MPSMAX_SHIFT (20) @@ -99,6 +101,12 @@ #define NVME_CAP_HI_REG_PMRS_MASK (0x1) #define NVME_CAP_HI_REG_CMBS_SHIFT (25) #define NVME_CAP_HI_REG_CMBS_MASK (0x1) +#define NVME_CAP_HI_REG_NSSS_SHIFT (26) +#define NVME_CAP_HI_REG_NSSS_MASK (0x1) +#define NVME_CAP_HI_REG_CRWMS_SHIFT (27) +#define NVME_CAP_HI_REG_CRWMS_MASK (0x1) +#define NVME_CAP_HI_REG_CRIMS_SHIFT (28) +#define NVME_CAP_HI_REG_CRIMS_MASK (0x1) #define NVME_CAP_HI_DSTRD(x) \ (((x) >> NVME_CAP_HI_REG_DSTRD_SHIFT) & NVME_CAP_HI_REG_DSTRD_MASK) #define NVME_CAP_HI_NSSRS(x) \ @@ -109,6 +117,8 @@ (((x) >> NVME_CAP_HI_REG_CSS_NVM_SHIFT) & NVME_CAP_HI_REG_CSS_NVM_MASK) #define NVME_CAP_HI_BPS(x) \ (((x) >> NVME_CAP_HI_REG_BPS_SHIFT) & NVME_CAP_HI_REG_BPS_MASK) +#define NVME_CAP_HI_CPS(x) \ + (((x) >> NVME_CAP_HI_REG_CPS_SHIFT) & NVME_CAP_HI_REG_CPS_MASK) #define NVME_CAP_HI_MPSMIN(x) \ (((x) >> NVME_CAP_HI_REG_MPSMIN_SHIFT) & NVME_CAP_HI_REG_MPSMIN_MASK) #define NVME_CAP_HI_MPSMAX(x) \ @@ -117,6 +127,12 @@ (((x) >> NVME_CAP_HI_REG_PMRS_SHIFT) & NVME_CAP_HI_REG_PMRS_MASK) #define NVME_CAP_HI_CMBS(x) \ (((x) >> NVME_CAP_HI_REG_CMBS_SHIFT) & NVME_CAP_HI_REG_CMBS_MASK) +#define NVME_CAP_HI_NSSS(x) \ + (((x) >> NVME_CAP_HI_REG_NSSS_SHIFT) & NVME_CAP_HI_REG_NSSS_MASK) +#define NVME_CAP_HI_CRWMS(x) \ + (((x) >> NVME_CAP_HI_REG_CRWMS_SHIFT) & NVME_CAP_HI_REG_CRWMS_MASK) +#define NVME_CAP_HI_CRIMS(x) \ + (((x) >> NVME_CAP_HI_REG_CRIMS_SHIFT) & NVME_CAP_HI_REG_CRIMS_MASK) #define NVME_CC_REG_EN_SHIFT (0) #define NVME_CC_REG_EN_MASK (0x1) @@ -132,6 +148,8 @@ #define NVME_CC_REG_IOSQES_MASK (0xF) #define NVME_CC_REG_IOCQES_SHIFT (20) #define NVME_CC_REG_IOCQES_MASK (0xF) +#define NVME_CC_REG_CRIME_SHIFT (24) +#define NVME_CC_REG_CRIME_MASK (0x1) #define NVME_CSTS_REG_RDY_SHIFT (0) #define NVME_CSTS_REG_RDY_MASK (0x1) @@ -143,6 +161,8 @@ #define NVME_CSTS_REG_NVSRO_MASK (0x1) #define NVME_CSTS_REG_PP_SHIFT (5) #define NVME_CSTS_REG_PP_MASK (0x1) +#define NVME_CSTS_REG_ST_SHIFT (6) +#define NVME_CSTS_REG_ST_MASK (0x1) #define NVME_CSTS_GET_SHST(csts) (((csts) >> NVME_CSTS_REG_SHST_SHIFT) & NVME_CSTS_REG_SHST_MASK) @@ -616,7 +636,11 @@ struct nvme_registers { uint64_t bpmbl; /* Boot Partition Memory Buffer Location */ uint64_t cmbmsc; /* Controller Memory Buffer Memory Space Control */ uint32_t cmbsts; /* Controller Memory Buffer Status */ - uint8_t reserved3[3492]; /* 5Ch - DFFh */ + uint32_t cmbebs; /* Controller Memory Buffer Elasticity Buffer Size */ + uint32_t cmbswtp;/* Controller Memory Buffer Sustained Write Throughput */ + uint32_t nssd; /* NVM Subsystem Shutdown */ + uint32_t crto; /* Controller Ready Timeouts */ + uint8_t reserved3[3476]; /* 6Ch - DFFh */ uint32_t pmrcap; /* Persistent Memory Capabilities */ uint32_t pmrctl; /* Persistent Memory Region Control */ uint32_t pmrsts; /* Persistent Memory Region Status */ diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 5a57bbbd53af..55573669562c 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1416,15 +1416,19 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) ctrlr->cap_hi = cap_hi = nvme_mmio_read_4(ctrlr, cap_hi); if (bootverbose) { device_printf(dev, "CapHi: 0x%08x: DSTRD %u%s, CSS %x%s, " - "MPSMIN %u, MPSMAX %u%s%s\n", cap_hi, + "CPS %x, MPSMIN %u, MPSMAX %u%s%s%s%s%s\n", cap_hi, NVME_CAP_HI_DSTRD(cap_hi), NVME_CAP_HI_NSSRS(cap_hi) ? ", NSSRS" : "", NVME_CAP_HI_CSS(cap_hi), NVME_CAP_HI_BPS(cap_hi) ? ", BPS" : "", + NVME_CAP_HI_CPS(cap_hi), NVME_CAP_HI_MPSMIN(cap_hi), NVME_CAP_HI_MPSMAX(cap_hi), NVME_CAP_HI_PMRS(cap_hi) ? ", PMRS" : "", - NVME_CAP_HI_CMBS(cap_hi) ? ", CMBS" : ""); + NVME_CAP_HI_CMBS(cap_hi) ? ", CMBS" : "", + NVME_CAP_HI_NSSS(cap_hi) ? ", NSSS" : "", + NVME_CAP_HI_CRWMS(cap_hi) ? ", CRWMS" : "", + NVME_CAP_HI_CRIMS(cap_hi) ? ", CRIMS" : ""); } if (bootverbose) { vs = nvme_mmio_read_4(ctrlr, vs); From nobody Wed Jan 3 04:48:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4cfp0fT1z54cJ2; Wed, 3 Jan 2024 04:48: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 4T4cfn62S3z3C5t; Wed, 3 Jan 2024 04:48:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKLmfaa4+1BTgkWpVnNobGRNsL7an4cfmXKd/GcPUac=; b=g0X3z2WYY0qauNx9vZ3NOKhpjhNnVhmCwyiNNIxaWSk49ymBRqneAU4PdJn1pSIx2Pj2YN ccxSnIsG4Z+tTA5EzLmJjJn9s60fOIwmkdY7UjHA1fXxWpBJpu41xXmjY7nRFsB5dzrQBn WwgYYzBnr+swcIpc7AM0FXYe8Ui2Tx5xcUFRGM2+FrQXD1xaKyh2Fs9BsPZseQ4YB7HpKs EjyQkLh8zBmAWf8V6f3CjLXBpgMKo5mgyTBQiyM0MPak4KGlDye1/8yyFHpqY9RfnQ+APX eR9jXZeZd9e5CeVco46lGlrgAkqa732Wintk/7Oe/49h9LQulnr7s6qbll8Dzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKLmfaa4+1BTgkWpVnNobGRNsL7an4cfmXKd/GcPUac=; b=jp7hQbHpfRU1Uhm0fvBDW1DUtO2it4jLpXxrLPDiMFTKhRPo1/cawxKhK6g02UpbJELLBq cGVb5e3qnnTghFee/goxycmUf1TrtbWgkQRtZsaIMPUabyzn7ZZ2jvY9S0+GMeg1cKrAji yo8U2yV5UQWDhYWYDjJKUW/wVyzEvxEJMicSttI7zZuHvF+HdgR9bswcLojbqJiyn3HG6e ZRndiGa/2tvVACfI1G+ptRmMkyTy+8RgdF5sisvbeMpjGs1xzH7aFX9+M17ABIP6mKPdJh PbW6+SxsuXrKwa7PjLDT5fRG16TjPkNh0TOWjjx85slk9BTsRNH2k5V+hhkNVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704257297; a=rsa-sha256; cv=none; b=pLydBmdsUQ5tDuOoO/6dXH5uWgYXNnTF9u7j99oRamNpxxor7Pfyr5Y4K/nOTcHwkoBABu ql6tIGJTAPWcwkTjMFkfp1RWPhZpuID1WUjogCM3gIpA3n2VrsrRy6+KxAMXO1VM0B8G8B immxN0A3M1LifjQWgMaPme+a+JtbYZ9CVx3b5BI6dIPHaH7Vc8gyQrYcWXDspCpVg90CHQ 4QRNSnKiAIDo90nm5Xq7Db6e3bAPTHqWTceadwGECrcOpAATvQnZSomXgi9d/IpB15pCfT Z1DGB8K9VFeSL041gCyRoTwmff3XKWcJtl7NDMIMU5rU7wKNEs3WGD64+51igg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4cfn55QmzWj4; Wed, 3 Jan 2024 04:48:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4034mH2f025973; Wed, 3 Jan 2024 04:48:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4034mHCL025970; Wed, 3 Jan 2024 04:48:17 GMT (envelope-from git) Date: Wed, 3 Jan 2024 04:48:17 GMT Message-Id: <202401030448.4034mHCL025970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: bafbd6445e5d - stable/13 - loader: provide a features table for binary compatibility advertisement List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: bafbd6445e5d434b4d99e9e6e550f169e033c24f Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=bafbd6445e5d434b4d99e9e6e550f169e033c24f commit bafbd6445e5d434b4d99e9e6e550f169e033c24f Author: Kyle Evans AuthorDate: 2023-12-08 21:36:06 +0000 Commit: Kyle Evans CommitDate: 2024-01-03 04:47:26 +0000 loader: provide a features table for binary compatibility advertisement liblua now provides a loader.has_feature() function to probe the loader binary for features advertised. name => desc mappings are provided in loader.features to get a list of all of the features loader *can* support. core.hasFeature is provided as a shim to loader.has_feature so that individual consumers don't need to think about the logic of the loader module not providing has_feature; we know that means the feature isn't enabled. The first consumer of this will be EARLY_ACPI to advertise that the loader binary probes for ACPI presence before the interpreter has started, so that we know whether we can trust the presence of acpi.rsdp as relatively authoritative. In general, it's intended to be used to avoid breaking new scripts on older loaders within reason. This will be used in lua as `core.hasFeature("EARLY_ACPI")`, while the C bits of loader will `feature_enable(FEATURE_EARLY_ACPI)`. Reviewed by: imp (cherry picked from commit 1631382cf2820245cc72965498ff174bb548dd63) --- stand/liblua/lutils.c | 48 ++++++++++++++++++++++++++++++++++++++++ stand/libsa/Makefile | 2 +- stand/libsa/features.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ stand/libsa/libsa.3 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ stand/libsa/stand.h | 15 +++++++++++++ stand/lua/core.lua | 9 ++++++++ stand/lua/core.lua.8 | 9 +++++++- 7 files changed, 197 insertions(+), 2 deletions(-) diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c index db0a8cc73e7f..6c2cceeff3c3 100644 --- a/stand/liblua/lutils.c +++ b/stand/liblua/lutils.c @@ -76,6 +76,25 @@ lua_has_command(lua_State *L) return 1; } +static int +lua_has_feature(lua_State *L) +{ + const char *feature; + char *msg; + + feature = luaL_checkstring(L, 1); + + if (feature_name_is_enabled(feature)) { + lua_pushboolean(L, 1); + return 1; + } + + lua_pushnil(L); + lua_pushstring(L, "Feature not enabled"); + return 2; +} + + static int lua_perform(lua_State *L) { @@ -553,6 +572,7 @@ static const struct luaL_Reg loaderlib[] = { REG_SIMPLE(parse), REG_SIMPLE(getenv), REG_SIMPLE(has_command), + REG_SIMPLE(has_feature), REG_SIMPLE(perform), REG_SIMPLE(printc), /* Also registered as the global 'printc' */ REG_SIMPLE(setenv), @@ -580,6 +600,33 @@ static const struct luaL_Reg iolib[] = { }; #undef REG_SIMPLE +static void +lua_add_feature(void *cookie, const char *name, const char *desc, bool enabled) +{ + lua_State *L = cookie; + + /* + * The feature table consists solely of features that are enabled, and + * their associated descriptions for debugging purposes. + */ + lua_pushstring(L, desc); + lua_setfield(L, -2, name); +} + +static void +lua_add_features(lua_State *L) +{ + + lua_newtable(L); + feature_iter(&lua_add_feature, L); + + /* + * We should still have just the table on the stack after we're done + * iterating. + */ + lua_setfield(L, -2, "features"); +} + int luaopen_loader(lua_State *L) { @@ -591,6 +638,7 @@ luaopen_loader(lua_State *L) lua_setfield(L, -2, "machine_arch"); lua_pushstring(L, LUA_PATH); lua_setfield(L, -2, "lua_path"); + lua_add_features(L); /* Set global printc to loader.printc */ lua_register(L, "printc", lua_printc); return 1; diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 6af49cdbdfd1..89e7a67f7e41 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -13,7 +13,7 @@ LIB?= sa # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c abort.c assert.c bcd.c environment.c \ - getopt.c gets.c globals.c \ + features.c getopt.c gets.c globals.c \ hexdump.c nvstore.c pager.c panic.c printf.c strdup.c strerror.c \ random.c sbrk.c tslog.c twiddle.c zalloc.c zalloc_malloc.c diff --git a/stand/libsa/features.c b/stand/libsa/features.c new file mode 100644 index 000000000000..23dce2b13b60 --- /dev/null +++ b/stand/libsa/features.c @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2023 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include + +#include "stand.h" + +static uint32_t loader_features; + +#define FEATURE_ENTRY(name, desc) { FEATURE_##name, #name, desc } +static const struct feature_entry { + uint32_t value; + const char *name; + const char *desc; +} feature_map[] = { + FEATURE_ENTRY(EARLY_ACPI, "Loader probes ACPI in early startup"), +}; + +void +feature_enable(uint32_t mask) +{ + + loader_features |= mask; +} + +bool +feature_name_is_enabled(const char *name) +{ + const struct feature_entry *entry; + + for (size_t i = 0; i < nitems(feature_map); i++) { + entry = &feature_map[i]; + + if (strcmp(entry->name, name) == 0) + return ((loader_features & entry->value) != 0); + } + + return (false); +} + +void +feature_iter(feature_iter_fn *iter_fn, void *cookie) +{ + const struct feature_entry *entry; + + for (size_t i = 0; i < nitems(feature_map); i++) { + entry = &feature_map[i]; + + (*iter_fn)(cookie, entry->name, entry->desc, + (loader_features & entry->value) != 0); + } +} diff --git a/stand/libsa/libsa.3 b/stand/libsa/libsa.3 index a6f30051c8df..7643423b342a 100644 --- a/stand/libsa/libsa.3 +++ b/stand/libsa/libsa.3 @@ -497,6 +497,66 @@ Attempts to open and display the file .Fa fname . Returns -1 on error, 0 at EOF, or 1 if the user elects to quit while reading. .El +.Sh FEATURE SUPPORT +A set of functions are provided to communicate support of features from the +loader binary to the interpreter. +These are used to do something sensible if we are still operating with a loader +binary that behaves differently than expected. +.Bl -hang -width 10n +.It Xo +.Ft void +.Fn feature_enable "uint32_t mask" +.Xc +.Pp +Enable the referenced +.Fa mask +feature, which should be one of the +.Li FEATURE_* +macros defined in +.In stand.h . +.It Xo +.Ft bool +.Fn feature_name_is_enabled "const char *name" +.Xc +.Pp +Check if the referenced +.Fa name +feature is enabled. +The +.Fa name +is usually the same name as the +.Li FEATURE_* +macro, but with the FEATURE_ prefix stripped off. +The authoritative source of feature names is the mapping table near the top in +.Pa stand/libsa/features.c . +.It Xo +.Ft void +.Fn "(feature_iter_fn)" "void *cookie" "const char *name" "const char *desc" "bool enabled" +.Xc +.Pp +The +.Fa cookie +argument is passed as-is from the argument of the same name to +.Fn feature_iter . +The +.Fa name +and +.Fa desc +arguments are defined in the mapping table in +.Pa stand/libsa/features.c . +The +.Fa enabled +argument indicates the current status of the feature, though one could +theoretically turn a feature off in later execution. +As such, this should likely not be trusted if it is needed after the iteration +has finished. +.It Xo +.Ft void +.Fn "feature_iter" "feature_iter_fn *iter_fn" "void *cookie" +.Xc +.Pp +Iterate over the current set of features. +.El .Sh MISC .Bl -hang -width 10n .It Xo diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index d19d42d37f10..e4e7c76fea7a 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -498,6 +498,21 @@ extern void *reallocf(void *, size_t); */ caddr_t ptov(uintptr_t); +/* features.c */ +typedef void (feature_iter_fn)(void *, const char *, const char *, bool); + +extern void feature_enable(uint32_t); +extern bool feature_name_is_enabled(const char *); +extern void feature_iter(feature_iter_fn *, void *); + +/* + * Note that these should also be added to the mapping table in features.c, + * which the interpreter may query to provide details from. The name with + * FEATURE_ removed is assumed to be the name we'll provide in the loader + * features table, just to simplify reasoning about these. + */ +#define FEATURE_EARLY_ACPI 0x0001 + /* hexdump.c */ void hexdump(caddr_t region, size_t len); diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 8a481ee0b782..358705ac7ace 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -382,6 +382,15 @@ function core.boot(argstr) loader.perform(composeLoaderCmd("boot", argstr)) end +function core.hasFeature(name) + if not loader.has_feature then + -- Loader too old, no feature support + return nil, "No feature support in loaded loader" + end + + return loader.has_feature(name) +end + function core.isSingleUserBoot() local single_user = loader.getenv("boot_single") return single_user ~= nil and single_user:lower() == "yes" diff --git a/stand/lua/core.lua.8 b/stand/lua/core.lua.8 index 39ae2166d442..e1752475f942 100644 --- a/stand/lua/core.lua.8 +++ b/stand/lua/core.lua.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 21, 2018 +.Dd December 28, 2023 .Dt CORE.LUA 8 .Os .Sh NAME @@ -145,6 +145,13 @@ due to a boot environment change or a potential change in either .Ic kernel or .Ic kernels . +.It Fn core.hasFeature featureName +Checks whether the named +.Fa featureName +is enabled in the current loader. +This is specifically used for detecting capabilities of the loaded loader +binary, so that one can reasonably implement backwards compatibility shims if +needed. .It Fn core.kernelList Returns a table of kernels to display on the boot menu. This will combine From nobody Wed Jan 3 04:48:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4cfp4jmDz54cWQ; Wed, 3 Jan 2024 04:48: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 4T4cfp2yDkz3C8K; Wed, 3 Jan 2024 04:48:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zFJpxZW/q9lSgmoYaF5CfxwjybCrZ+jm39CCsDLyl3o=; b=hx3uRgx95W0RoRU8XuHtsh0rAQmaB+SKqe6wZoCto4jZOGl8Rr+tHTfn+qGI7qpayZNvmu 2QzHzoDkROnURjfkT36ueBlyx1JcubG+LdPxWoFu/IzPdhGRFCM9bmdDAv1zIRtZixbgfY i3ZBGBC8r6ufnbiQqdkwAKzwGbitqc9hqfH0RXMdCAiEsFb2yUE22pStZZmlCHuhKThVun 1TGh5XU6xXONrCGDlI3TfihOPB/MYs4AVYHvxyYb4aMEviT60D2d7nMLyKbH6K5KLTI4fs 26N5OIlgPE/nYsS3mCvweBlu4fVNoWY2ydsTtUZ0QY0LIB/X5PSSPJMDr7N+sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zFJpxZW/q9lSgmoYaF5CfxwjybCrZ+jm39CCsDLyl3o=; b=ui5QcBeNE6lXASmkJZqmRPHWEcvscYHAQqMBbfZ5OIWGK/qDcCmim4Se5Vl6aAJDB74ROH XoFOE0Skx8yFkex1dudZYwMUtl8/29InMzB1F2hb0tVNMGb0uuNO9rAxBQXTYmBvOkXNR8 NtXm/cMdwM7Vph72PBuFLXT4UGsfrRBUD7Vbztu17zagowvbuM/zSS5SaFs+A1St5Iek57 7f4Dqd3Li1p009Q8/vCKJaHYI8LYwMxVta1TtdbKkXElNFdpvZHLOxbYdMknugSrupI3NV hq4UXZynN9xXm+3CC3sCTgG5aMfzc3/0HC4Ks0akw0a1T6egVAP0bLjgAhB8Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704257298; a=rsa-sha256; cv=none; b=mgFnwRLOqb9MI1i9TNi/URtorUFATR4ladBR5ujUCejPl9yuK0T5+d0wC7xAyXzO11cx6b wMkWKb+q9du3H5sEVKWv+h05Xh2tJIwixHnvevAtBd4cvmmv5k9mUm0Yay7TEjIYIzurkl JCTXI4khmq49ntnWq1+mlUKXC5EDJQp6axZMfRFNk9STugliDprxfCRuH4NLllG3dACmnl cDWY0dWrHtVi5h4qklExmeQk/kr3TpK3754DEgUq/tIi8v2ITAODYG0iEGJhgjsPQNi5/8 VQnYy9F2yXCOPw7Ic2bvh3GkcdQdP6aXx+8SWr+s6U24yzoemv/xiu7XkiGRaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4cfp1jYqzWkt; Wed, 3 Jan 2024 04:48: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 4034mIhs026016; Wed, 3 Jan 2024 04:48:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4034mI2R026013; Wed, 3 Jan 2024 04:48:18 GMT (envelope-from git) Date: Wed, 3 Jan 2024 04:48:18 GMT Message-Id: <202401030448.4034mI2R026013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: ee0e6ac14776 - stable/13 - kdump: use print_mask_arg0 appropriately List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: ee0e6ac14776ca4c131d2178e790a3c4d85c682f Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ee0e6ac14776ca4c131d2178e790a3c4d85c682f commit ee0e6ac14776ca4c131d2178e790a3c4d85c682f Author: Kyle Evans AuthorDate: 2023-12-13 16:49:03 +0000 Commit: Kyle Evans CommitDate: 2024-01-03 04:47:27 +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 (cherry picked from commit a206524709bdfbd577bcfe76676da80b8250f84c) --- 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 4938f83d215f..70d039e387d4 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -880,7 +880,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; @@ -946,14 +947,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; @@ -1411,7 +1412,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 Jan 3 04:48:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4cfr1r9Gz54cTB; Wed, 3 Jan 2024 04:48: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 4T4cfr0T34z3CJR; Wed, 3 Jan 2024 04:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qgc5QQn4ftLt6dt7pyFGBFw5LY/0oPaSoxThFIzchdc=; b=e4vmTmPo49yMUK1V5ymh2iJw6nBi9UT/kMZZyf/9sK6c8am//E8IpvsBQsKimKyApSPYsM sowQx+1sUX+VgxnHt38V46kjAAi2b5c32M9GNiFIZ2fs5Bn3kxXrLR+IPS0UW1USKjDVEZ 3y48lerXvJfOe7uuJuedhF43A6CZn2xqjiLe2Dc9rMU0p1hIE1aBLY4Znz4VFuhBkXV23c tJUoWlXDFJtesMs+UhKg5aoFJkmnaTFY4aAmFw2T2PgS+8H8hNtg6IP/sjB6uBuv9qqN8m 8LpMPvkpiMmAsDTIvSpxBtnqo9hCLypq11KG8Z2GZSuxGYhGYF3FSgkEAJBZeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qgc5QQn4ftLt6dt7pyFGBFw5LY/0oPaSoxThFIzchdc=; b=bMmwhFsYP/sGE1scam4nD6OZOmXJxGwK0Nihij5qcxIhvzwkji/BbfRznYJL0qMXYTW9ZS DNdwhehbrMEZVudqeAIjFgtfPjiHOuzO5Gt+s3QC6sKQ/D0NyhRntf9LSrwi8/jPe+AOlD O69kgfhv+8DpLp6oTYW93B5m9qry7yOaYH9p212DNhW61eXpusWZdTqNpk2aOjRDRoienT Knn+OrBZTJ5DtOI4TMvcj5O6TfPkoCdo7NiNHNlevTEDdGqb6q0lBJT3xACZHH0pMYkzxN xDQV9ZJEKJCvklLrL5mhEBGq4SltSmPoEGNNKZ8pf1daFDp8qjHZhdl7Q3nS9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704257300; a=rsa-sha256; cv=none; b=jDTWmSPcPC/Ba+87m8vGLtgfs0aqiiX8402SvimM46vP+m0CjvDhrOhBuIDpo+pJ6Kfr9J oFOa22jb4qgzitXqIx1YhOs7YLs70yQMYA0Kw8OImOkmusKO41x/GeQga6R0nBtfpEc7eC xJjJU7cRUaIt9UyGSWQAQ9U/DXBCNmCElNyuUAwHsaTU+zN2uwEqYlsUlgWamjNwulWyqI +ZsDC3PjIXZUOWx6mIaok3dA7/lDYhSMyQMNahkSaLhgObxjOu/tOex13bVWR2LwEvtlWM roFpy1czhTlOEmRqPl/BR46Cy3ddbY7I9dw+r1INCIpDHtEdQf44KLsGwu9aLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4cfq6hn7zWkv; Wed, 3 Jan 2024 04:48: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 4034mJvw026215; Wed, 3 Jan 2024 04:48:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4034mJBs026212; Wed, 3 Jan 2024 04:48:19 GMT (envelope-from git) Date: Wed, 3 Jan 2024 04:48:19 GMT Message-Id: <202401030448.4034mJBs026212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 566ac8bc76a6 - stable/14 - loader: provide a features table for binary compatibility advertisement List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 566ac8bc76a65c4bfc02632ac45d5fcac1cef994 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=566ac8bc76a65c4bfc02632ac45d5fcac1cef994 commit 566ac8bc76a65c4bfc02632ac45d5fcac1cef994 Author: Kyle Evans AuthorDate: 2023-12-08 21:36:06 +0000 Commit: Kyle Evans CommitDate: 2024-01-03 04:47:21 +0000 loader: provide a features table for binary compatibility advertisement liblua now provides a loader.has_feature() function to probe the loader binary for features advertised. name => desc mappings are provided in loader.features to get a list of all of the features loader *can* support. core.hasFeature is provided as a shim to loader.has_feature so that individual consumers don't need to think about the logic of the loader module not providing has_feature; we know that means the feature isn't enabled. The first consumer of this will be EARLY_ACPI to advertise that the loader binary probes for ACPI presence before the interpreter has started, so that we know whether we can trust the presence of acpi.rsdp as relatively authoritative. In general, it's intended to be used to avoid breaking new scripts on older loaders within reason. This will be used in lua as `core.hasFeature("EARLY_ACPI")`, while the C bits of loader will `feature_enable(FEATURE_EARLY_ACPI)`. Reviewed by: imp (cherry picked from commit 1631382cf2820245cc72965498ff174bb548dd63) --- stand/liblua/lutils.c | 48 ++++++++++++++++++++++++++++++++++++++++ stand/libsa/Makefile | 2 +- stand/libsa/features.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ stand/libsa/libsa.3 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ stand/libsa/stand.h | 15 +++++++++++++ stand/lua/core.lua | 9 ++++++++ stand/lua/core.lua.8 | 9 +++++++- 7 files changed, 197 insertions(+), 2 deletions(-) diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c index d6c9051f9039..79a3dc9188c2 100644 --- a/stand/liblua/lutils.c +++ b/stand/liblua/lutils.c @@ -76,6 +76,25 @@ lua_has_command(lua_State *L) return 1; } +static int +lua_has_feature(lua_State *L) +{ + const char *feature; + char *msg; + + feature = luaL_checkstring(L, 1); + + if (feature_name_is_enabled(feature)) { + lua_pushboolean(L, 1); + return 1; + } + + lua_pushnil(L); + lua_pushstring(L, "Feature not enabled"); + return 2; +} + + static int lua_perform(lua_State *L) { @@ -553,6 +572,7 @@ static const struct luaL_Reg loaderlib[] = { REG_SIMPLE(parse), REG_SIMPLE(getenv), REG_SIMPLE(has_command), + REG_SIMPLE(has_feature), REG_SIMPLE(perform), REG_SIMPLE(printc), /* Also registered as the global 'printc' */ REG_SIMPLE(setenv), @@ -580,6 +600,33 @@ static const struct luaL_Reg iolib[] = { }; #undef REG_SIMPLE +static void +lua_add_feature(void *cookie, const char *name, const char *desc, bool enabled) +{ + lua_State *L = cookie; + + /* + * The feature table consists solely of features that are enabled, and + * their associated descriptions for debugging purposes. + */ + lua_pushstring(L, desc); + lua_setfield(L, -2, name); +} + +static void +lua_add_features(lua_State *L) +{ + + lua_newtable(L); + feature_iter(&lua_add_feature, L); + + /* + * We should still have just the table on the stack after we're done + * iterating. + */ + lua_setfield(L, -2, "features"); +} + int luaopen_loader(lua_State *L) { @@ -593,6 +640,7 @@ luaopen_loader(lua_State *L) lua_setfield(L, -2, "lua_path"); lua_pushinteger(L, bootprog_rev); lua_setfield(L, -2, "version"); + lua_add_features(L); /* Set global printc to loader.printc */ lua_register(L, "printc", lua_printc); return 1; diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 57340709873b..a1b9bc32e025 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -13,7 +13,7 @@ LIB?= sa # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c abort.c assert.c bcd.c environment.c \ - getopt.c gets.c globals.c \ + features.c getopt.c gets.c globals.c \ hexdump.c nvstore.c pager.c panic.c printf.c strdup.c strerror.c \ random.c sbrk.c tslog.c twiddle.c zalloc.c zalloc_malloc.c diff --git a/stand/libsa/features.c b/stand/libsa/features.c new file mode 100644 index 000000000000..23dce2b13b60 --- /dev/null +++ b/stand/libsa/features.c @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2023 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include + +#include "stand.h" + +static uint32_t loader_features; + +#define FEATURE_ENTRY(name, desc) { FEATURE_##name, #name, desc } +static const struct feature_entry { + uint32_t value; + const char *name; + const char *desc; +} feature_map[] = { + FEATURE_ENTRY(EARLY_ACPI, "Loader probes ACPI in early startup"), +}; + +void +feature_enable(uint32_t mask) +{ + + loader_features |= mask; +} + +bool +feature_name_is_enabled(const char *name) +{ + const struct feature_entry *entry; + + for (size_t i = 0; i < nitems(feature_map); i++) { + entry = &feature_map[i]; + + if (strcmp(entry->name, name) == 0) + return ((loader_features & entry->value) != 0); + } + + return (false); +} + +void +feature_iter(feature_iter_fn *iter_fn, void *cookie) +{ + const struct feature_entry *entry; + + for (size_t i = 0; i < nitems(feature_map); i++) { + entry = &feature_map[i]; + + (*iter_fn)(cookie, entry->name, entry->desc, + (loader_features & entry->value) != 0); + } +} diff --git a/stand/libsa/libsa.3 b/stand/libsa/libsa.3 index a6f30051c8df..7643423b342a 100644 --- a/stand/libsa/libsa.3 +++ b/stand/libsa/libsa.3 @@ -497,6 +497,66 @@ Attempts to open and display the file .Fa fname . Returns -1 on error, 0 at EOF, or 1 if the user elects to quit while reading. .El +.Sh FEATURE SUPPORT +A set of functions are provided to communicate support of features from the +loader binary to the interpreter. +These are used to do something sensible if we are still operating with a loader +binary that behaves differently than expected. +.Bl -hang -width 10n +.It Xo +.Ft void +.Fn feature_enable "uint32_t mask" +.Xc +.Pp +Enable the referenced +.Fa mask +feature, which should be one of the +.Li FEATURE_* +macros defined in +.In stand.h . +.It Xo +.Ft bool +.Fn feature_name_is_enabled "const char *name" +.Xc +.Pp +Check if the referenced +.Fa name +feature is enabled. +The +.Fa name +is usually the same name as the +.Li FEATURE_* +macro, but with the FEATURE_ prefix stripped off. +The authoritative source of feature names is the mapping table near the top in +.Pa stand/libsa/features.c . +.It Xo +.Ft void +.Fn "(feature_iter_fn)" "void *cookie" "const char *name" "const char *desc" "bool enabled" +.Xc +.Pp +The +.Fa cookie +argument is passed as-is from the argument of the same name to +.Fn feature_iter . +The +.Fa name +and +.Fa desc +arguments are defined in the mapping table in +.Pa stand/libsa/features.c . +The +.Fa enabled +argument indicates the current status of the feature, though one could +theoretically turn a feature off in later execution. +As such, this should likely not be trusted if it is needed after the iteration +has finished. +.It Xo +.Ft void +.Fn "feature_iter" "feature_iter_fn *iter_fn" "void *cookie" +.Xc +.Pp +Iterate over the current set of features. +.El .Sh MISC .Bl -hang -width 10n .It Xo diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index d19d42d37f10..e4e7c76fea7a 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -498,6 +498,21 @@ extern void *reallocf(void *, size_t); */ caddr_t ptov(uintptr_t); +/* features.c */ +typedef void (feature_iter_fn)(void *, const char *, const char *, bool); + +extern void feature_enable(uint32_t); +extern bool feature_name_is_enabled(const char *); +extern void feature_iter(feature_iter_fn *, void *); + +/* + * Note that these should also be added to the mapping table in features.c, + * which the interpreter may query to provide details from. The name with + * FEATURE_ removed is assumed to be the name we'll provide in the loader + * features table, just to simplify reasoning about these. + */ +#define FEATURE_EARLY_ACPI 0x0001 + /* hexdump.c */ void hexdump(caddr_t region, size_t len); diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 8a481ee0b782..358705ac7ace 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -382,6 +382,15 @@ function core.boot(argstr) loader.perform(composeLoaderCmd("boot", argstr)) end +function core.hasFeature(name) + if not loader.has_feature then + -- Loader too old, no feature support + return nil, "No feature support in loaded loader" + end + + return loader.has_feature(name) +end + function core.isSingleUserBoot() local single_user = loader.getenv("boot_single") return single_user ~= nil and single_user:lower() == "yes" diff --git a/stand/lua/core.lua.8 b/stand/lua/core.lua.8 index 39ae2166d442..e1752475f942 100644 --- a/stand/lua/core.lua.8 +++ b/stand/lua/core.lua.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 21, 2018 +.Dd December 28, 2023 .Dt CORE.LUA 8 .Os .Sh NAME @@ -145,6 +145,13 @@ due to a boot environment change or a potential change in either .Ic kernel or .Ic kernels . +.It Fn core.hasFeature featureName +Checks whether the named +.Fa featureName +is enabled in the current loader. +This is specifically used for detecting capabilities of the loaded loader +binary, so that one can reasonably implement backwards compatibility shims if +needed. .It Fn core.kernelList Returns a table of kernels to display on the boot menu. This will combine From nobody Wed Jan 3 04:48:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4cfq5fLyz54cLR; Wed, 3 Jan 2024 04:48:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4cfq3zWZz3CJM; Wed, 3 Jan 2024 04:48:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XtKaIL24bcIRtJcNwEjjNtsyBvr7pJaqOfdvVjHyEsw=; b=yUq2HthXI9MH3u+t1xJtqwIzRMHPG9QnhvDwp/8sFj7IvJmC89BPTqjIdSiRTOBlZw6gkG WJhkg2VXR2mm8c5xN5W/dfFtCqXEhpBlEEuNLbLRgK/ARiVIy0dkZTM+lfBSkicvLov2ZE 5xLHqaEAbAziL2vU8UZcScwEcIVpw66fp0UzdqQzn2ok2uLuudvbL0gnPVuSkrZz4KJQxS 35wWRv7INnFveCZf3FDEpcoCnQqI/rkzzSUdMS5QBM3aoakvE1XJf6gajfA78vOf+2S76Q szDkG20YKCMDFubjstSTusp7KqL0hpZu7IKd794vHZtGVAe8/1J1zEdiOzj19A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XtKaIL24bcIRtJcNwEjjNtsyBvr7pJaqOfdvVjHyEsw=; b=JoCXRvJcAZYCV/jU9MFzjtgL6akDq1d0WkMSKMJLSSiTKsW1M4NqipT2fAB3rFizgEcYsy 7esm6j+06KT/bMi/qFHuhy9tt6d7zDvfUouj2s9QCqNO/5cvIRXKVmjR+dGKnmSJqeoXy8 FKcOSA6MXjSmTcpeaUKEPOPOEZLHS/E4RATlnjzEtMC9zeGe5yCytLIb43bmJsWlhAGbdQ mpX4DJdvZaBKX/q0ghqYYtp2GVnxXgJ562mLr7zNoch9THCUQIz7IHw9XLJwfUS3y1Vz9u 0EByaUS8K653nTTmH3xrfN8zk/9Tf2A/3XO1FSwbEzuyv6tnnX5dw59yYuaLoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704257299; a=rsa-sha256; cv=none; b=maBG8af6MV1JFbZ62TXTeinKvPRRHHJ0DTUyQSnOWKdZpeC3V+erK9AwkJCTKCNu2GrG+X kd13kDjKUf98JKW0ux8xNeM7wasiANHYhLVpaDwmPP7aNEEP3xtxR3zoxx/mHB0ThfTVjn +nFT1FC6C2W6kbSMv+sAmD3WmtbymIJ+CGZrM9u4ptZ9yQp32pt1fauYGvJfr2icOCnbV5 hiqOKuQvpleAEeJpgXnLcb88AEXZLxIlBSK+F9g1gWzR/2mSZxOGrwp+rclJLiSFVCjmQc MeTfIROHRyjq1n3ljX6jRioYtNBtt25AgjrWxs3v/2n3tuRlP8lofcsyOQs69A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4cfq2lczzWvD; Wed, 3 Jan 2024 04:48: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 4034mJaC026089; Wed, 3 Jan 2024 04:48:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4034mJor026086; Wed, 3 Jan 2024 04:48:19 GMT (envelope-from git) Date: Wed, 3 Jan 2024 04:48:19 GMT Message-Id: <202401030448.4034mJor026086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 1b959537ed3a - stable/13 - loader: lua: remove the default kernel if it doesn't exist List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1b959537ed3a8d8dd300c8867fc0e34f062fafa9 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1b959537ed3a8d8dd300c8867fc0e34f062fafa9 commit 1b959537ed3a8d8dd300c8867fc0e34f062fafa9 Author: Kyle Evans AuthorDate: 2023-12-13 16:52:14 +0000 Commit: Kyle Evans CommitDate: 2024-01-03 04:47:27 +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 (cherry picked from commit d04415c520b031fb8eb93cb252e4acee66149c87) --- 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 358705ac7ace..747f8c1f0fcf 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -204,17 +204,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 @@ -242,6 +243,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. @@ -270,8 +273,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 Jan 3 04:48:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4cfs5zWcz54ccQ; Wed, 3 Jan 2024 04:48: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 4T4cfs1TpMz3BxZ; Wed, 3 Jan 2024 04:48:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lYHCRrWuqMS3ZFV17XtHaNoqwQwhctCmfVGsyO+tRrg=; b=lMOVgHUxf1DH0TuuCoUkf+0k4e7Jlnyt3OucSiCEt+C2ZzRxLfRd3KCOCOXgJBo8Wj5j5a VeRRVH2kEWqqgHYuplGSXQoIOHTSNPYbqNh8o6QvJyqGo7roZySk9bvxx+e3CLgOtaFK/b v5ZLSlGfOhFy0McJz18aIdO8xwVXln6onvRTp+d3opilNpkTaCy4dXpmFYMVw2CX10TNVA SD3JUfqKK/HZs5o7qUxJCggKYZsCOO/+ruSmtXoIN+eTvGTy+PVfFYGF4zAFOVZONbnSBz LGjjrR2KObM7wAMfkYvR9rAMEf90ni3rLpMcfJiTgIP51wWW8I4KCjUxsuxK4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lYHCRrWuqMS3ZFV17XtHaNoqwQwhctCmfVGsyO+tRrg=; b=S4hYrEg9gLCpTjSNJDh5+0yLQPQPl/i9thZG+BiD5//PFhoeMLjEdp9sj4ulu+Y/Wtjq9P SHbEpMpo2qLyNHhHsyHtaHNxYGkHfsKFsbvX0XbIJ5N6TkJe2HbbrCJZXCy3L7V+GJUR1Q +7BzYQUqHHuKhO2bpAZfP5eDgvmh4M8Dk8Ad7si9n2qyL5sLhcwgJkdqUpq0bzrXqQRNi6 EV49q4KVU00+cp7FDaDQNnVpyo1iSTH8bZ5kLaR4HapwOp7qqh4djdLB9gV5LBtNtMyzcq Un3ld0lbo6aT4Qi9s8mNPFR/ZW7Qi/FlHR8zcRUN7kmHbITSan7sCaUgLYwmXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704257301; a=rsa-sha256; cv=none; b=faawWfAJ+BTduv3jD60AMSGrKk5Hf8bWNly240iMDzQ2O8bJTPbmXC9c+h06n+79eT21oj HJDRxVWpYzAmg/90EEnicDH1zH/Jcs6ez5v8NGAFkk1ZbfrolBjFnlEYfGCdAMddI1sXZM wEuFEQavEAm/R5Xc2U+JwdqniF5LJtdlghezQwOTeafkSH3G6dzySbvZoRrXnOK88/lrLJ lAnaSg62FMqnxBrHmhr30OpE0hWFZbE6EOFlxutDkXEGDcRnTVq8FpWJ0ORokc/c5BVpPL lmaUiMx01QdmNAcowtpWLkkEs40sfvsX5a1Jd3nHhVEYqjMtpg9lBanDp75bCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4cfs0YhXzWvF; Wed, 3 Jan 2024 04:48: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 4034mKEV026287; Wed, 3 Jan 2024 04:48:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4034mKKo026284; Wed, 3 Jan 2024 04:48:20 GMT (envelope-from git) Date: Wed, 3 Jan 2024 04:48:20 GMT Message-Id: <202401030448.4034mKKo026284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 346112fe3d7a - stable/14 - kdump: use print_mask_arg0 appropriately List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 346112fe3d7ad77001e815e87c74996f8f04cb25 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=346112fe3d7ad77001e815e87c74996f8f04cb25 commit 346112fe3d7ad77001e815e87c74996f8f04cb25 Author: Kyle Evans AuthorDate: 2023-12-13 16:49:03 +0000 Commit: Kyle Evans CommitDate: 2024-01-03 04:47:21 +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 (cherry picked from commit a206524709bdfbd577bcfe76676da80b8250f84c) --- 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 cb8f5ff1f537..078b8a364db8 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -934,7 +934,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; @@ -1000,14 +1001,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; @@ -1465,7 +1466,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 Jan 3 04:48:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4cft43rRz54cZ6; Wed, 3 Jan 2024 04:48: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 4T4cft2X0Qz3C0p; Wed, 3 Jan 2024 04:48:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9WxOlzu2qZeMR6wdvuXY+xX2tRCFYD3RH7u0iGD1kto=; b=I0BkkPcm+CbsZZsZVaRkSZdnniw1lw5YSVKknCyuj9i0G3wEg0O0vlN6psxXNIlzUgBh8P 0ZG++ZZ/Sury61y8fl2dQyGtxWkc/aGoZcW7GZ0J5aLXlDxGrEp2qmBaV3B3ySYZOX4diT 0S89QTpt7pmLNjjzM7jZvPh+DHElLlzBuJe8iCrlL4etjnnwjt28XZ49QRxiibxdfozlw2 yKGVxjrPLPs0IJMJ24NXk0atSkbiMNpZlyBTiH9oCjDTFehjpL8XpxZQEwJwPto3gGNYAr paeokItBqxUnsY4eYlNIOrZbwBP2Td1J2o6Wri16UZXy/P6uRVlUUhQIebxEJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9WxOlzu2qZeMR6wdvuXY+xX2tRCFYD3RH7u0iGD1kto=; b=CA5hgV+nl5Vs6pQjtCXNBTwIQ4bT17RpQxshFv65z8rNzePD1+wbURZQmZjgt7d39fG7P2 tm+3BSAx5urlrTg4t8vyZgo1cpuwhcdXlbGDnrsm6YjZ3OuzxoR6MfQEiCa9KmqOx1FQyN ZPd5xQuuEfNLCF2DtkfkrXtN65W5Tz9VcVzvgvr3mnesmB9xS+qjsj/HvkxFRi324xwmXh Vh+PjIXbzB7ZaQeOFYvMNVWHU75xAm6oF41yCy4vOq4IU714q38/RdUVK+Fqk0/a+jezXn bPvgMItaz11ZizXMumPw82+4vhiOwX4BHQybQkNmsCSL5pI8SIvy8M7xa2Q5aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704257302; a=rsa-sha256; cv=none; b=IZvu1bPxytf5hObyAGQO1+h+8gMoPQqCLu5eZ8/6xoIYGLYrjRW93UBIfNQwu5JiY1u8qi soIBUe/Q7LAzJu9Ey5Y0WOjWNCLrfHfyDV7yuxh57t/1Q+zdsu7IW8LMORjrynjSQmMxyE PYjGopOchG/3dH9KhXt3GXeUWi5+CRQK6d84AKDDSCpMNHpCNOnRiw/8Y8E7DIdGGYIBpV jhGPnKHbLwaynFWQvCz0yo29aVWf2CPZ5XBpfPivWmOLy00PZkR2j7qes9FUMF8Snppodl ey7BesDag0lasLgsIBQlTeIxly3BiG4qd9TIkgr0JBT4IgBDFe+0PG7PdVJBug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4cft1d0nzWvG; Wed, 3 Jan 2024 04:48:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4034mMtG026344; Wed, 3 Jan 2024 04:48:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4034mMQO026341; Wed, 3 Jan 2024 04:48:22 GMT (envelope-from git) Date: Wed, 3 Jan 2024 04:48:22 GMT Message-Id: <202401030448.4034mMQO026341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 15b946de9917 - stable/14 - loader: lua: remove the default kernel if it doesn't exist List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 15b946de99174bef635b4a79e58d28f6c69825e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=15b946de99174bef635b4a79e58d28f6c69825e5 commit 15b946de99174bef635b4a79e58d28f6c69825e5 Author: Kyle Evans AuthorDate: 2023-12-13 16:52:14 +0000 Commit: Kyle Evans CommitDate: 2024-01-03 04:47:21 +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 (cherry picked from commit d04415c520b031fb8eb93cb252e4acee66149c87) --- 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 358705ac7ace..747f8c1f0fcf 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -204,17 +204,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 @@ -242,6 +243,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. @@ -270,8 +273,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 Jan 3 04:48:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4cfv4lWwz54cR3; Wed, 3 Jan 2024 04:48:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4cfv3Xrhz3CPW; Wed, 3 Jan 2024 04:48:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71W1228l0tufRK5FrkaOgk+6k+feNM5abbU0cl/wQqY=; b=p+uVScyecKDw+xG0OYKAaZCgu9NDq4Xku7QkGKDlvrJouq1sX7ubxVeqLW4g8FOjmUhYSh XoV3s0HTrOE7V/JUHTI/0LQXqmgWt/MlfO4NtqZtRZtoasKqkc6gh7gKen1dGdLBLY/zdG rwkXg+fKY3EopSObLin0tbvnj2hx4/QCR3I8vX87i0ZIRt42PP8/K/opErfUNJkWH14spb myyHYcb8KuS6OLKqHEP7IcI7OgPdF1SSZWw/jmreagLzwCxIOyTuZR6L1QU3y6F1DXvGWd 6BeyZDV7dGT90TBCF9oNPhen/ynigYmWkEBnGn99knmzWfgTnjzYMo21BMUDMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704257303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71W1228l0tufRK5FrkaOgk+6k+feNM5abbU0cl/wQqY=; b=l2TvVBwVoF1ChS3S+16X9Hos+A+ZeuuCx9rwnVMXZpCCQ95sInXb58mJFQGBsDYD9Ekfbs vXexPZukReODlFUYKDswLazxeZ7+syw4ugETBPRgQ4/X2zuL5IvBEZ0G4EDmRpGxquseQw 8CRnkUXtkVNluB7hPywODb6eu3+vE8tIjUKM8npeZVfULkeES7+IKoc+0PODTSwUzjmyLi OnjyEVfp011zU09ZijqPdpbVVteo9Ro2ngF7XxMDe9M4+2hhHDhrWU9tA39AX/jMTf33MB kTDALCRGru40XLB54PNjFMQdjF8OV1f1CK9BKy2egQWijm9sgDtU1DaG7TLelA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704257303; a=rsa-sha256; cv=none; b=KGOiOXUmQY00BGrXGcTglI+2v1CFIDC/i2SLd8qEqRbzgz98BHdG5Vg5GWRzNDr8AA0jWO MBvrQb61uRiTGnf28jwfK8I3sYfwGRaxcPZed9cZGD+Iv62SwpxmPpvpl9breQ/SBRtd5g UoVRGPIaBtKUkG0yOpmq8Sd4X/IC3EGjQuz0hNWp66t3jvcDkfHVa+8oOwk9S07bodXrPl b2cwoYkNGklzqBlzDZMcoUcj0RfIXaBLIKHmLQ+oWc+Q/30dZjYOuatmZ8xNaaKvyPoGRd 27qnGpHKp5fMJPukdmrK9lPlxUj6/L3HYho9qcZQB7ZtPqKhkSpFy67KhZgf5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4cfv2dmbzX0g; Wed, 3 Jan 2024 04:48:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4034mNkj026392; Wed, 3 Jan 2024 04:48:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4034mNTr026389; Wed, 3 Jan 2024 04:48:23 GMT (envelope-from git) Date: Wed, 3 Jan 2024 04:48:23 GMT Message-Id: <202401030448.4034mNTr026389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: bcfe05c6b683 - stable/14 - calendar: correct the search order for files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bcfe05c6b6835d359025fb27f064c6aab537e7b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=bcfe05c6b6835d359025fb27f064c6aab537e7b4 commit bcfe05c6b6835d359025fb27f064c6aab537e7b4 Author: Kyle Evans AuthorDate: 2023-12-18 05:53:03 +0000 Commit: Kyle Evans CommitDate: 2024-01-03 04:47:22 +0000 calendar: correct the search order for files Include files that don't begin with a '/' are documented to search the current directory, then /usr/share/calendar. This hasn't been accurate for years, since e061f95e7b9b ("Rework calendar(1) parser") rewrote a lot of this. Stash off the cwd before we do any chdir()ing around and use that to honor the same order we'll follow for the -f flag. This may result in an extra lookup that will fail for the initial calendar file, but I don't think it's worth the complexity to avoid it. While we're here, fix the documentation to just reference the order described in FILES so that we only need to keep it up to date in one place. Reviewed by: bapt Sponsored by: Klara, Inc. (cherry picked from commit 0a82cd4f101c5eb8533a0049aaa3f06f005cf8af) --- usr.bin/calendar/calendar.1 | 7 +++---- usr.bin/calendar/io.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/usr.bin/calendar/calendar.1 b/usr.bin/calendar/calendar.1 index 898ef8fb4a3d..3b1e6a420d15 100644 --- a/usr.bin/calendar/calendar.1 +++ b/usr.bin/calendar/calendar.1 @@ -27,7 +27,7 @@ .\" .\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 .\" -.Dd July 31, 2022 +.Dd December 17, 2023 .Dt CALENDAR 1 .Os .Sh NAME @@ -215,9 +215,8 @@ succeeding lines. .Pp If the shared file is not referenced by a full pathname, .Nm -searches in the current (or home) directory first, and then in the -directory -.Pa /usr/share/calendar . +searches in the same order of precedence described in +.Sx FILES . .Pp Blank lines and text protected by the C comment syntax .Ql /* ... */ diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 5390882305a0..d407addd9b89 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; #include #include #include +#include #include #include #include @@ -115,9 +116,11 @@ trimlr(char **buf) static FILE * cal_fopen(const char *file) { + static int cwdfd = -1; FILE *fp; char *home = getenv("HOME"); unsigned int i; + int fd; struct stat sb; static bool warned = false; static char calendarhome[MAXPATHLEN]; @@ -127,6 +130,34 @@ cal_fopen(const char *file) return (NULL); } + /* + * On -a runs, we would have done a chdir() earlier on, but we also + * shouldn't have used the initial cwd anyways lest we bring + * unpredictable behavior upon us. + */ + if (!doall && cwdfd == -1) { + cwdfd = open(".", O_DIRECTORY | O_PATH); + if (cwdfd == -1) + err(1, "open(cwd)"); + } + + /* + * Check $PWD first as documented. + */ + if (cwdfd != -1) { + if ((fd = openat(cwdfd, file, O_RDONLY)) != -1) { + if ((fp = fdopen(fd, "r")) == NULL) + err(1, "fdopen(%s)", file); + + cal_home = NULL; + cal_dir = NULL; + cal_file = file; + return (fp); + } else if (errno != ENOENT && errno != ENAMETOOLONG) { + err(1, "open(%s)", file); + } + } + if (chdir(home) != 0) { warnx("Cannot enter home directory \"%s\"", home); return (NULL); From nobody Wed Jan 3 14:48:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4syx5cz0z562m8; Wed, 3 Jan 2024 14:48:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4syx4zQcz4TM0; Wed, 3 Jan 2024 14:48:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704293289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LuXw6Ysb8EPMuU3TiwAYKRAE4FaKNQSf+HUYzY0k1/g=; b=dV/u3c4+JZm96ttGaHq9zr3y5XdaqsDXE4Ic8/bQ74zavdD+ZiO/DSCHR6TVK22LGldl8W kqSvaqoXZKUFhSb7P/ADwObwqU3ETnxyUCDjXfyZRa5wVT7CNbc9zOOthx4AjpMc2PTHiQ 3nBF0Eo5V4WRL4EA97BuJjIskJJ8ZjxEQ37Npdtm1d0p1BTqtJlRxkbkphsuwoOwf5h5hy K5FkJQfR5Dvgsy2GyCOt2HbkoTwQ8JjsnHpW2KPaRkV6O2xjhOYqNEUFtat0kJwxDxPgHg dW6dCJOF37i+7m6JtpvdJWj7ybpEjdHvd+1yCAHXSyI/2dbyhHoXSuauUDvERw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704293289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LuXw6Ysb8EPMuU3TiwAYKRAE4FaKNQSf+HUYzY0k1/g=; b=H/P79S/7RXZSIEiolptXxVwV1tv1xnNSeivdgDDr9SjV9GgapK3wcstsM8/wzhlztgI2Pc tsPiOywkfTOnjJTxwLFYzXdKPF/6FElupeVbo8G7dia/IRAZoweRBKeBugeMBkg1Ub1G3H m6h5eNjWuoXE7Bi26SXd610J5/nOgxc0nRl4jQm3hjjChu28WJKDsRE9Ongb36tULVS/2+ gNmAS3yac3Zt141V6ckDi7XFpow35jmMqE23Uvxeeu3DzZqjsTCkEM77weYx8hMJfBxJul KE5pEjIYbfpLAeVVXoXqkoBAPqIR2kosX0u4Gc4u4pMeHjQBtWlOUpUcux9Y0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704293289; a=rsa-sha256; cv=none; b=FHGS3oSU9tfLOCqdD8MIF+8tbqK2wvDQkVDmBcpIFtiT28oCqsJhjgBmC4Rtb09PIZarlX WMaNL7kzPMMgS2v5UQY5Qm7UO5xMunr4VsHxOOlKA3BKv6DRSDKLmiirP7TxhMSMvL5Fgb Vi8v8x2scL1QVbQsj1kgEsOwXJFcVKsl4THMyqKs79g088PYaHyQKFew0lPjcFgWcl9UNi HaUSc4mGCTpVEOnz0gf9Awd5qS7zORPaOzapO6uS+HZudmku5SHWFcYv1n0d/mGPKIDoBj DCcjIfDKFferk0UxCAPfNxk//u7SVDrNEgMtn9lxp6I6DDEc3y18Votg4SFBKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4syx3xLSzpgM; Wed, 3 Jan 2024 14:48:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403Em9ej031938; Wed, 3 Jan 2024 14:48:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Em9rD031935; Wed, 3 Jan 2024 14:48:09 GMT (envelope-from git) Date: Wed, 3 Jan 2024 14:48:09 GMT Message-Id: <202401031448.403Em9rD031935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 31a363933e9a - stable/14 - camcontrol: Add a sense subcommand List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 31a363933e9a2513c92b803030c38b26c385348f Auto-Submitted: auto-generated The branch stable/14 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=31a363933e9a2513c92b803030c38b26c385348f commit 31a363933e9a2513c92b803030c38b26c385348f Author: Kenneth D. Merry AuthorDate: 2023-12-28 21:23:16 +0000 Commit: Kenneth D. Merry CommitDate: 2024-01-03 14:47:12 +0000 camcontrol: Add a sense subcommand As the name suggests, this sends a SCSI REQUEST SENSE to a device, and prints out decoded sense information. It can also print out a hexdump of the sense data. sbin/camcontrol/camcontrol.c: Add the new sense subcommand. sbin/camcontrol/camcontrol.8: Document camcontrol sense. Sponsored by: Spectra Logic Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D43225 (cherry picked from commit 40a492d38ee10ecf9d9a099c5cdecc072e24d2d1) --- sbin/camcontrol/camcontrol.8 | 17 +++++- sbin/camcontrol/camcontrol.c | 122 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 1 deletion(-) diff --git a/sbin/camcontrol/camcontrol.8 b/sbin/camcontrol/camcontrol.8 index 3bbd81dab033..ec9af63be63d 100644 --- a/sbin/camcontrol/camcontrol.8 +++ b/sbin/camcontrol/camcontrol.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 1, 2023 +.Dd December 28, 2023 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -51,6 +51,12 @@ .Op device id .Op generic args .Nm +.Ic sense +.Op device id +.Op generic args +.Op Fl D +.Op Fl x +.Nm .Ic inquiry .Op device id .Op generic args @@ -488,6 +494,15 @@ Send the SCSI test unit ready (0x00) command to the given device. The .Nm utility will report whether the device is ready or not. +.It Ic sense +Send a SCSI REQUEST SENSE command (0x03) to a device. +The decoded sense (or hexdump) is printed to stdout. +.Bl -tag -width 4n +.It Fl D +Request descriptor sense instead of fixed sense. +.It Fl x +Do a hexdump of the returned sense data. +.El .It Ic inquiry Send a SCSI inquiry command (0x12) to a device. By default, diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 9417943afcb3..555a67001443 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -111,6 +111,7 @@ typedef enum { CAM_CMD_DEVTYPE, CAM_CMD_AMA, CAM_CMD_DEPOP, + CAM_CMD_REQSENSE } cam_cmd; typedef enum { @@ -233,6 +234,7 @@ static struct camcontrol_opts option_table[] = { {"epc", CAM_CMD_EPC, CAM_ARG_NONE, "c:dDeHp:Pr:sS:T:"}, {"timestamp", CAM_CMD_TIMESTAMP, CAM_ARG_NONE, "f:mrsUT:"}, {"depop", CAM_CMD_DEPOP, CAM_ARG_NONE, "ac:de:ls"}, + {"sense", CAM_CMD_REQSENSE, CAM_ARG_NONE, "Dx"}, {"help", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, {"-?", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, {"-h", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, @@ -279,6 +281,9 @@ static int print_dev_mmcsd(struct device_match_result *dev_result, #ifdef WITH_NVME static int print_dev_nvme(struct device_match_result *dev_result, char *tmpstr); #endif +static int requestsense(struct cam_device *device, int argc, char **argv, + char *combinedopt, int task_attr, int retry_count, + int timeout); static int testunitready(struct cam_device *device, int task_attr, int retry_count, int timeout, int quiet); static int scsistart(struct cam_device *device, int startstop, int loadeject, @@ -840,6 +845,114 @@ print_dev_nvme(struct device_match_result *dev_result, char *tmpstr) } #endif +static int +requestsense(struct cam_device *device, int argc, char **argv, + char *combinedopt, int task_attr, int retry_count, int timeout) +{ + int c; + int descriptor_sense = 0; + int do_hexdump = 0; + struct scsi_sense_data sense; + union ccb *ccb = NULL; + int error = 0; + size_t returned_bytes; + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'D': + descriptor_sense = 1; + break; + case 'x': + do_hexdump = 1; + break; + default: + break; + } + } + + ccb = cam_getccb(device); + if (ccb == NULL) { + warnx("couldn't allocate CCB"); + return (1); + } + + /* cam_getccb cleans up the header, caller has to zero the payload */ + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); + + bzero(&sense, sizeof(sense)); + + scsi_request_sense(&ccb->csio, + /*retries*/ retry_count, + /*cbfcnp*/ NULL, + /*data_ptr*/ (void *)&sense, + /*dxfer_len*/ sizeof(sense), + /*tag_action*/ task_attr, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ timeout ? timeout : 60000); + + if (descriptor_sense != 0) { + struct scsi_request_sense *cdb; + + cdb = (struct scsi_request_sense *)&ccb->csio.cdb_io.cdb_bytes; + cdb->byte2 |= SRS_DESC; + } + + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (arglist & CAM_ARG_ERR_RECOVER) + ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; + + if (cam_send_ccb(device, ccb) < 0) { + warn("error sending REQUEST SENSE command"); + cam_freeccb(ccb); + error = 1; + goto bailout; + } + + /* + * REQUEST SENSE is not generally supposed to fail. But there can + * be transport or other errors that might cause it to fail. It + * may also fail if the user asks for descriptor sense and the + * device doesn't support it. So we check the CCB status here to see. + */ + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + warnx("REQUEST SENSE failed"); + cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); + error = 1; + goto bailout; + } + + returned_bytes = ccb->csio.dxfer_len - ccb->csio.resid; + + if (do_hexdump != 0) { + hexdump(&sense, returned_bytes, NULL, 0); + } else { + char path_str[80]; + struct sbuf *sb; + + cam_path_string(device, path_str, sizeof(path_str)); + sb = sbuf_new_auto(); + if (sb == NULL) { + warnx("%s: cannot allocate sbuf", __func__); + error = 1; + goto bailout; + } + + scsi_sense_only_sbuf(&sense, returned_bytes, sb, path_str, + &device->inq_data, scsiio_cdb_ptr(&ccb->csio), + ccb->csio.cdb_len); + + sbuf_finish(sb); + printf("%s", sbuf_data(sb)); + sbuf_delete(sb); + } +bailout: + if (ccb != NULL) + cam_freeccb(ccb); + + return (error); +} + static int testunitready(struct cam_device *device, int task_attr, int retry_count, int timeout, int quiet) @@ -9869,6 +9982,7 @@ usage(int printlong) " camcontrol devlist [-b] [-v]\n" " camcontrol periphlist [dev_id][-n dev_name] [-u unit]\n" " camcontrol tur [dev_id][generic args]\n" +" camcontrol sense [dev_id][generic args][-D][-x]\n" " camcontrol inquiry [dev_id][generic args] [-D] [-S] [-R]\n" " camcontrol identify [dev_id][generic args] [-v]\n" " camcontrol reportluns [dev_id][generic args] [-c] [-l] [-r report]\n" @@ -9957,6 +10071,7 @@ usage(int printlong) "Specify one of the following options:\n" "devlist list all CAM devices\n" "periphlist list all CAM peripheral drivers attached to a device\n" +"sense send a request sense command to the named device\n" "tur send a test unit ready to the named device\n" "inquiry send a SCSI inquiry command to the named device\n" "identify send a ATA identify command to the named device\n" @@ -10021,6 +10136,9 @@ usage(int printlong) "-f format specify defect list format (block, bfi or phys)\n" "-G get the grown defect list\n" "-P get the permanent defect list\n" +"sense arguments:\n" +"-D request descriptor sense data\n" +"-x do a hexdump of the sense data\n" "inquiry arguments:\n" "-D get the standard inquiry data\n" "-S get the serial number\n" @@ -10491,6 +10609,10 @@ main(int argc, char **argv) case CAM_CMD_DEVTYPE: error = getdevtype(cam_dev); break; + case CAM_CMD_REQSENSE: + error = requestsense(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout); + break; case CAM_CMD_TUR: error = testunitready(cam_dev, task_attr, retry_count, timeout, 0); From nobody Wed Jan 3 15:32:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4txn3gDwz5670V; Wed, 3 Jan 2024 15:32: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 4T4txn3ClJz4Yjv; Wed, 3 Jan 2024 15:32:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704295933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BxA1UyCH2yJlmf83y9TQzqpTZ3eku/jW8fDPtZjZszU=; b=B7eRetf3QbuyZraKTPO3y7bpGjboyrjjJtaSjs1M6mKaSkGFILlUQr44qoNgqxTh5v/ewq oX1AzjGqTCj1YswgfJQNsNb8jQMLczhtCGs4XM5CQya6nMc/gmps8j77DL7JPQombmmJg1 C4Y7cAFBN6Kzf8+9y+AUVg+vaZ5OoGzRKAwLn78nHPVaZAzoJ0ikZKMIAKNBvib2/wGhW1 fMji0qXnlxGWcsvzd6RB3rGt6xpQ7UEfDCznpwaJXolTPTEGSSoBnPs4mGiZuNXlmw/iJm S70AUBQZP4su7qSi+EFsggV699SZYLCjpk4DTtuhOWLyMsbrQDLgVa7MqAOrqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704295933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BxA1UyCH2yJlmf83y9TQzqpTZ3eku/jW8fDPtZjZszU=; b=vS1ne2IL1DcJbU/PtNXwWcA6+p/3boAacDH3VngqQU0UdRYhAYxOirgtFL4yct0m6ZVvIo na+Q/RGS3zbcgmU0+OWZIkCuHXBpb6FtffJPvIbi+/jLgMfAdLiQety3XReAyiUKAWKSr+ wpYfOoqeS1FpfWL8M2lzh8E3XdUZxEbFZhhL/0I+BWbuXRarPS4LN40NqCHU4yjOkGKHBj rkBhQguSswCuJUCa9KwYpBivhYFSPgTbRw8PU6jM/kK+xotEswtiTmqVd2mvQi9gMHX7rE f76WfZ99bcetYxx8YwCbLyH0zCeFw16GF9uQkYsL/oXLc/DOor07q3rTvghGcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704295933; a=rsa-sha256; cv=none; b=d3RNzuzBJr2h+5wLNINIVY3MRRZnT9RJH+Jc9Cs94cSIWev5XMyq6Ko7fcE4PSereqv5So OmPggHLyG3THr5jelCBHYHEK5Tw2QD8tPewzBotCzWuEEJBIPLjYyydV/ohU9zbPLAYq/v 7DBoJZ8ch8bIX0NEHFD4bA63dAkDP+YyohQJJ+v0uR/FAlw146WeuL0gD9patInPNC5o/g Gf4/gkKaClBcdct7v9J/EyeEkdsewx74G6MpZ23wepoCO7gOtk4c6GWDGCMvGwjHoi0gVZ yz+VpkJH0UAeZaajCaMa2HS97XKPbah0p3PCeXi8cNghOUhsAplgxBaTCq7xBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4txn2K39zqv6; Wed, 3 Jan 2024 15:32: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 403FWDvb011654; Wed, 3 Jan 2024 15:32:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403FWDIv011626; Wed, 3 Jan 2024 15:32:13 GMT (envelope-from git) Date: Wed, 3 Jan 2024 15:32:13 GMT Message-Id: <202401031532.403FWDIv011626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 658a9820b0bf - stable/13 - camcontrol: Add a sense subcommand List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 658a9820b0bfbf8b0197850bf58b812ee1ae720c Auto-Submitted: auto-generated The branch stable/13 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=658a9820b0bfbf8b0197850bf58b812ee1ae720c commit 658a9820b0bfbf8b0197850bf58b812ee1ae720c Author: Kenneth D. Merry AuthorDate: 2023-12-28 21:23:16 +0000 Commit: Kenneth D. Merry CommitDate: 2024-01-03 15:31:38 +0000 camcontrol: Add a sense subcommand As the name suggests, this sends a SCSI REQUEST SENSE to a device, and prints out decoded sense information. It can also print out a hexdump of the sense data. sbin/camcontrol/camcontrol.c: Add the new sense subcommand. sbin/camcontrol/camcontrol.8: Document camcontrol sense. Sponsored by: Spectra Logic Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D43225 (cherry picked from commit 40a492d38ee10ecf9d9a099c5cdecc072e24d2d1) --- sbin/camcontrol/camcontrol.8 | 17 +++++- sbin/camcontrol/camcontrol.c | 124 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 139 insertions(+), 2 deletions(-) diff --git a/sbin/camcontrol/camcontrol.8 b/sbin/camcontrol/camcontrol.8 index 9f8c8c2c1151..fc5ba3a9f20c 100644 --- a/sbin/camcontrol/camcontrol.8 +++ b/sbin/camcontrol/camcontrol.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 1, 2023 +.Dd December 28, 2023 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -51,6 +51,12 @@ .Op device id .Op generic args .Nm +.Ic sense +.Op device id +.Op generic args +.Op Fl D +.Op Fl x +.Nm .Ic inquiry .Op device id .Op generic args @@ -481,6 +487,15 @@ Send the SCSI test unit ready (0x00) command to the given device. The .Nm utility will report whether the device is ready or not. +.It Ic sense +Send a SCSI REQUEST SENSE command (0x03) to a device. +The decoded sense (or hexdump) is printed to stdout. +.Bl -tag -width 4n +.It Fl D +Request descriptor sense instead of fixed sense. +.It Fl x +Do a hexdump of the returned sense data. +.El .It Ic inquiry Send a SCSI inquiry command (0x12) to a device. By default, diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 309f79b5a232..71b2a318ccfe 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -108,7 +108,8 @@ typedef enum { CAM_CMD_MMCSD_CMD = 0x00000029, CAM_CMD_POWER_MODE = 0x0000002a, CAM_CMD_DEVTYPE = 0x0000002b, - CAM_CMD_AMA = 0x0000002c, + CAM_CMD_AMA = 0x0000002c, + CAM_CMD_REQSENSE = 0x0000002d, } cam_cmdmask; typedef enum { @@ -226,6 +227,7 @@ static struct camcontrol_opts option_table[] = { {"zone", CAM_CMD_ZONE, CAM_ARG_NONE, "ac:l:No:P:"}, {"epc", CAM_CMD_EPC, CAM_ARG_NONE, "c:dDeHp:Pr:sS:T:"}, {"timestamp", CAM_CMD_TIMESTAMP, CAM_ARG_NONE, "f:mrsUT:"}, + {"sense", CAM_CMD_REQSENSE, CAM_ARG_NONE, "Dx"}, {"help", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, {"-?", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, {"-h", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, @@ -273,6 +275,9 @@ static int print_dev_mmcsd(struct device_match_result *dev_result, #ifdef WITH_NVME static int print_dev_nvme(struct device_match_result *dev_result, char *tmpstr); #endif +static int requestsense(struct cam_device *device, int argc, char **argv, + char *combinedopt, int task_attr, int retry_count, + int timeout); static int testunitready(struct cam_device *device, int task_attr, int retry_count, int timeout, int quiet); static int scsistart(struct cam_device *device, int startstop, int loadeject, @@ -834,6 +839,114 @@ print_dev_nvme(struct device_match_result *dev_result, char *tmpstr) } #endif +static int +requestsense(struct cam_device *device, int argc, char **argv, + char *combinedopt, int task_attr, int retry_count, int timeout) +{ + int c; + int descriptor_sense = 0; + int do_hexdump = 0; + struct scsi_sense_data sense; + union ccb *ccb = NULL; + int error = 0; + size_t returned_bytes; + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'D': + descriptor_sense = 1; + break; + case 'x': + do_hexdump = 1; + break; + default: + break; + } + } + + ccb = cam_getccb(device); + if (ccb == NULL) { + warnx("couldn't allocate CCB"); + return (1); + } + + /* cam_getccb cleans up the header, caller has to zero the payload */ + CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); + + bzero(&sense, sizeof(sense)); + + scsi_request_sense(&ccb->csio, + /*retries*/ retry_count, + /*cbfcnp*/ NULL, + /*data_ptr*/ (void *)&sense, + /*dxfer_len*/ sizeof(sense), + /*tag_action*/ task_attr, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ timeout ? timeout : 60000); + + if (descriptor_sense != 0) { + struct scsi_request_sense *cdb; + + cdb = (struct scsi_request_sense *)&ccb->csio.cdb_io.cdb_bytes; + cdb->byte2 |= SRS_DESC; + } + + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (arglist & CAM_ARG_ERR_RECOVER) + ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; + + if (cam_send_ccb(device, ccb) < 0) { + warn("error sending REQUEST SENSE command"); + cam_freeccb(ccb); + error = 1; + goto bailout; + } + + /* + * REQUEST SENSE is not generally supposed to fail. But there can + * be transport or other errors that might cause it to fail. It + * may also fail if the user asks for descriptor sense and the + * device doesn't support it. So we check the CCB status here to see. + */ + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + warnx("REQUEST SENSE failed"); + cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); + error = 1; + goto bailout; + } + + returned_bytes = ccb->csio.dxfer_len - ccb->csio.resid; + + if (do_hexdump != 0) { + hexdump(&sense, returned_bytes, NULL, 0); + } else { + char path_str[80]; + struct sbuf *sb; + + cam_path_string(device, path_str, sizeof(path_str)); + sb = sbuf_new_auto(); + if (sb == NULL) { + warnx("%s: cannot allocate sbuf", __func__); + error = 1; + goto bailout; + } + + scsi_sense_only_sbuf(&sense, returned_bytes, sb, path_str, + &device->inq_data, scsiio_cdb_ptr(&ccb->csio), + ccb->csio.cdb_len); + + sbuf_finish(sb); + printf("%s", sbuf_data(sb)); + sbuf_delete(sb); + } +bailout: + if (ccb != NULL) + cam_freeccb(ccb); + + return (error); +} + static int testunitready(struct cam_device *device, int task_attr, int retry_count, int timeout, int quiet) @@ -9920,6 +10033,7 @@ usage(int printlong) " camcontrol devlist [-b] [-v]\n" " camcontrol periphlist [dev_id][-n dev_name] [-u unit]\n" " camcontrol tur [dev_id][generic args]\n" +" camcontrol sense [dev_id][generic args][-D][-x]\n" " camcontrol inquiry [dev_id][generic args] [-D] [-S] [-R]\n" " camcontrol identify [dev_id][generic args] [-v]\n" " camcontrol reportluns [dev_id][generic args] [-c] [-l] [-r report]\n" @@ -10007,6 +10121,7 @@ usage(int printlong) "Specify one of the following options:\n" "devlist list all CAM devices\n" "periphlist list all CAM peripheral drivers attached to a device\n" +"sense send a request sense command to the named device\n" "tur send a test unit ready to the named device\n" "inquiry send a SCSI inquiry command to the named device\n" "identify send a ATA identify command to the named device\n" @@ -10070,6 +10185,9 @@ usage(int printlong) "-f format specify defect list format (block, bfi or phys)\n" "-G get the grown defect list\n" "-P get the permanent defect list\n" +"sense arguments:\n" +"-D request descriptor sense data\n" +"-x do a hexdump of the sense data\n" "inquiry arguments:\n" "-D get the standard inquiry data\n" "-S get the serial number\n" @@ -10533,6 +10651,10 @@ main(int argc, char **argv) case CAM_CMD_DEVTYPE: error = getdevtype(cam_dev); break; + case CAM_CMD_REQSENSE: + error = requestsense(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout); + break; case CAM_CMD_TUR: error = testunitready(cam_dev, task_attr, retry_count, timeout, 0); From nobody Wed Jan 3 15:34:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4tzy6gqPz566nV; Wed, 3 Jan 2024 15:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4tzy5s5fz4Z7F; Wed, 3 Jan 2024 15:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704296046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x+84gRZo0ibSF+fyZffQl7PhDLkm//bfKQA2wZc9fWY=; b=H//zCnzfzd6sff2pKFHjmUTw1YeJEMzuFEPa8SzlhiVySQyTzZXr59MpYITJ07icRkSC6C Wdv3b8ZRfU3P61QwCRQoFUKErO7FBzAb/MS7vzxSmfmBvdFG/DjAtlBSTUvigwGxkp7SvR UBdp/kv/Iv3A7uwosi+vGEmbrTYeMAvsS4voj1V84LCxInbw1bBoEtPAqP/MHnn7JN10at dAxLju1YcqdAMea5clZKoJXcYodKzSPVYltbWgszV+AjT4yBpFy+smFXpWxQQTRCTn8fiR MDjq+Zm9ARHB3GS0/v5fESeogDOOj/AXB5uYJ2o8YBFdjr0hvahgxn6p62KubA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704296046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x+84gRZo0ibSF+fyZffQl7PhDLkm//bfKQA2wZc9fWY=; b=WM2i9wSeQeIXWcW9A7Cn9xUsNnX+akp44sI4/3qJiaQO07trfF3nxGWVeDY7KBAdtk0Sxt O2w2kogyA2F55Hi3L3eqG+AYdaOg+afDNTrUm0RjoAh0zmLjGHQ5wbKX5czq9Ml1ERYzPf /Yr8IwXIZ+SBMirIA+Q4qar2ZSrhI8gQ5AbU6juwh8UTJrncCEfdfNUAKwyM59edVSnTqS p8S4E7QalMo3j6UQRLitmKrlBHI+ncvFMelj9wtxs+umpnXAOZDBl7Hg37I3U+343NYA8M QwjC5siSvsKUhSu1zBEb82gWzpKIweI2cPay2y5/NQBiIng0ZRHDRD9oIf9O7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704296046; a=rsa-sha256; cv=none; b=xs6fcZAIEpCnsTaK7F56qEw8a5qZ8BcS5+bgxd/4/RudV2LviayfJL1Ro3acw3eyHx/e2A 4/RlS832J3Er0ARph47J6ItoCWRy8GTPkzlcFFyEi/UAgKDzxfj97NDIMPCPYon/Cr6kFw F9oRUfZSyxo1raHVkx0tmNuUgu3XYhgx0pOkGYB5FB10iNn7Z4Ad/iz07weFtivFEOaqtb BhxiF4aBe5H8EOmR3mwxi02bCMDwsD4lBE7TaQ6pSDxVMHdokqe6xMysesC7ytCKki+2pQ 8+URlvjmeLPJhIIiHxG3UKvVNrisb9qNnjeqEBPqPiRYl00lFRgPBzKsQl5nYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4tzy4x6pzr0L; Wed, 3 Jan 2024 15:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403FY6T3014669; Wed, 3 Jan 2024 15:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403FY61r014666; Wed, 3 Jan 2024 15:34:06 GMT (envelope-from git) Date: Wed, 3 Jan 2024 15:34:06 GMT Message-Id: <202401031534.403FY61r014666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Kenneth D. Merry" Subject: git: ce6c84abe6c2 - stable/14 - camcontrol: add support for Toshiba drive firmware update List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ce6c84abe6c2bc70c547dfa4ff6ed33917138f1d Auto-Submitted: auto-generated The branch stable/14 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=ce6c84abe6c2bc70c547dfa4ff6ed33917138f1d commit ce6c84abe6c2bc70c547dfa4ff6ed33917138f1d Author: Kenneth D. Merry AuthorDate: 2023-12-29 19:23:51 +0000 Commit: Kenneth D. Merry CommitDate: 2024-01-03 15:33:12 +0000 camcontrol: add support for Toshiba drive firmware update Thanks to Toshiba for providing the SCSI spec for their latest generation drives so I could confirm how they operate. The firmware download works in a pretty standard way, so this is a straightforward table addition. sbin/camcontrol/camcontrol.8: Document that Toshiba drives are supported for fwdownload, and that it was tested on TOSHIBA MG10SFA22TE 22TB drives. sbin/camcontrol/fwdownload.c: Add TOSHIBA to the known SCSI vendors list for fwdownload. Sponsored by: Spectra Logic (cherry picked from commit cd95f18c477ca30c3ba6f98577d321f56b1e8439) --- sbin/camcontrol/camcontrol.8 | 2 ++ sbin/camcontrol/fwdownload.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/sbin/camcontrol/camcontrol.8 b/sbin/camcontrol/camcontrol.8 index ec9af63be63d..065dfbe8a1b4 100644 --- a/sbin/camcontrol/camcontrol.8 +++ b/sbin/camcontrol/camcontrol.8 @@ -1700,6 +1700,8 @@ Tested with Constellation ES (ST32000444SS), ES.2 (ST33000651SS) and ES.3 (ST1000NM0023) drives. .It SmrtStor Tested with 400GB Optimus SSDs (TXA2D20400GA6001). +.It TOSHIBA +Tested with 22TB MG10SFA22TE SAS drives. .El .Pp .Em WARNING! WARNING! WARNING! diff --git a/sbin/camcontrol/fwdownload.c b/sbin/camcontrol/fwdownload.c index 25b98c804e3e..cfb8b70ccb76 100644 --- a/sbin/camcontrol/fwdownload.c +++ b/sbin/camcontrol/fwdownload.c @@ -84,6 +84,7 @@ typedef enum { VENDOR_SAMSUNG, VENDOR_SEAGATE, VENDOR_SMART, + VENDOR_TOSHIBA, VENDOR_ATA, VENDOR_UNKNOWN } fw_vendor_t; @@ -213,6 +214,8 @@ static struct fw_vendor vendors_list[] = { 0x8000, 0x07, 0x07, 0, 1, FW_TUR_READY, WB_TIMEOUT, FW_TIMEOUT_DEFAULT}, {VENDOR_SMART, "SmrtStor", T_DIRECT, 0x8000, 0x07, 0x07, 0, 1, FW_TUR_READY, WB_TIMEOUT, FW_TIMEOUT_DEFAULT}, + {VENDOR_TOSHIBA, "TOSHIBA", T_DIRECT, + 0x8000, 0x07, 0x07, 0, 1, FW_TUR_READY, WB_TIMEOUT, FW_TIMEOUT_DEFAULT}, {VENDOR_HGST, "WD", T_DIRECT, 0x1000, 0x07, 0x07, 1, 0, FW_TUR_READY, WB_TIMEOUT, FW_TIMEOUT_DEFAULT}, {VENDOR_HGST, "WDC", T_DIRECT, From nobody Wed Jan 3 15:35:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4v1d2n0mz566dC; Wed, 3 Jan 2024 15:35: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 4T4v1d0Sbcz4ZN5; Wed, 3 Jan 2024 15:35:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704296133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7FO997iV8MP7e7/uV6//6JMB5Thj/4VrWbWpaba8Z5Y=; b=GkXLa746eNh0sp1DX325Ldwh6aRZIuNqvi6Bdtf3pPAxrf+aXnCnAhwYq2ysY7ANQvMOdE M0KKOsF3CKX7VSRAabTO/f9SSg5w7MfDxeWPmojYQx6t9a+f9VFiE4k0wJ2UEWB+SuY0DZ 92eXl/UloKwwIo3UB3HEvgrO43jtX1qwY5HWzSrsQP1/HwC27tKLAfETp4uwLfgoborgqH 91XUZXhvX9HQX8Rtq/6jVVgC52vpmzYJk6DxDc8xDiB5FOcGZC4gsSv+ISytASAT6H1xIz BdQGsrlEz9VwJVqkvOX/aTbT90KBtVbQIR9IOXyz8zQKcTG6IQf7X1i314fJMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704296133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7FO997iV8MP7e7/uV6//6JMB5Thj/4VrWbWpaba8Z5Y=; b=WSe02bUfOsMnAEdg0twhalYuJTdKy2Z1uT8yCuJb2RphKiSFU85/g9E2VFdRp4/BsA9s7J zUNCdKliPOD5BhHAPDgh+mfBFNo8h+CCbXsuFPQYt+1sSdwCRHU8TPwM6rxhDMoS1tV61G YNHxMH+GZtFp+mWWrJAJQTWSurXoY1zSOibfo37lWPG1HFejHkHuUFcz96bMmgCH3Jt3VB bjbWo8QdQQiQ6O7wNbHTon9XQxjzQte0IbtaGUiUdCLqvHM5CKcNK2RtPZVyNR65SPfwF1 JKgLoeFqMGnSUFa7VqAmM4uuEJmQ3SRD0rhFaM2mn7j2e8jKJjIuIZy0YXF2Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704296133; a=rsa-sha256; cv=none; b=GjFTJin9Lnm4u6H2snSIZo4QFW8xJvAjqojx7lX+gZuzovHWyPYCiahJocoyedbvcT3NjW 99i04NWlJuzSVpqGlVM7JqbPVTGvgyT+VTZJW+5Shl7Puhfi5TL8c+2JFiXkhcbcK5Ty1K H5ObNW2HwMwpD9KQRBL5SmID8XQpap4MzeIadKIne6ajzsU5fnQOPoR4M+WTqvOGwpjSQh Rt/PLRJsrUpmGfxzpqSe/Sj3d9viKfJp//AR1zdZtWU8zD1ZhP4EAzywWSDCWAPL/Hlb/u niKmenC2ETyVjwmuyK+MAd71pbbHlTSguWkhBP/9XXGOQkS9M9RQJfcC5+yQkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4v1c6dr6zrBJ; Wed, 3 Jan 2024 15:35: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 403FZW38015012; Wed, 3 Jan 2024 15:35:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403FZWHq015009; Wed, 3 Jan 2024 15:35:32 GMT (envelope-from git) Date: Wed, 3 Jan 2024 15:35:32 GMT Message-Id: <202401031535.403FZWHq015009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 789a2b4e5c7d - stable/13 - camcontrol: add support for Toshiba drive firmware update List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 789a2b4e5c7d88c424346fd326c475c31993d801 Auto-Submitted: auto-generated The branch stable/13 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=789a2b4e5c7d88c424346fd326c475c31993d801 commit 789a2b4e5c7d88c424346fd326c475c31993d801 Author: Kenneth D. Merry AuthorDate: 2023-12-29 19:23:51 +0000 Commit: Kenneth D. Merry CommitDate: 2024-01-03 15:34:27 +0000 camcontrol: add support for Toshiba drive firmware update Thanks to Toshiba for providing the SCSI spec for their latest generation drives so I could confirm how they operate. The firmware download works in a pretty standard way, so this is a straightforward table addition. sbin/camcontrol/camcontrol.8: Document that Toshiba drives are supported for fwdownload, and that it was tested on TOSHIBA MG10SFA22TE 22TB drives. sbin/camcontrol/fwdownload.c: Add TOSHIBA to the known SCSI vendors list for fwdownload. Sponsored by: Spectra Logic (cherry picked from commit cd95f18c477ca30c3ba6f98577d321f56b1e8439) --- sbin/camcontrol/camcontrol.8 | 2 ++ sbin/camcontrol/fwdownload.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/sbin/camcontrol/camcontrol.8 b/sbin/camcontrol/camcontrol.8 index fc5ba3a9f20c..e19a222a1cf7 100644 --- a/sbin/camcontrol/camcontrol.8 +++ b/sbin/camcontrol/camcontrol.8 @@ -1693,6 +1693,8 @@ Tested with Constellation ES (ST32000444SS), ES.2 (ST33000651SS) and ES.3 (ST1000NM0023) drives. .It SmrtStor Tested with 400GB Optimus SSDs (TXA2D20400GA6001). +.It TOSHIBA +Tested with 22TB MG10SFA22TE SAS drives. .El .Pp .Em WARNING! WARNING! WARNING! diff --git a/sbin/camcontrol/fwdownload.c b/sbin/camcontrol/fwdownload.c index c91bb138bc7b..192ddd128836 100644 --- a/sbin/camcontrol/fwdownload.c +++ b/sbin/camcontrol/fwdownload.c @@ -84,6 +84,7 @@ typedef enum { VENDOR_SAMSUNG, VENDOR_SEAGATE, VENDOR_SMART, + VENDOR_TOSHIBA, VENDOR_ATA, VENDOR_UNKNOWN } fw_vendor_t; @@ -213,6 +214,8 @@ static struct fw_vendor vendors_list[] = { 0x8000, 0x07, 0x07, 0, 1, FW_TUR_READY, WB_TIMEOUT, FW_TIMEOUT_DEFAULT}, {VENDOR_SMART, "SmrtStor", T_DIRECT, 0x8000, 0x07, 0x07, 0, 1, FW_TUR_READY, WB_TIMEOUT, FW_TIMEOUT_DEFAULT}, + {VENDOR_TOSHIBA, "TOSHIBA", T_DIRECT, + 0x8000, 0x07, 0x07, 0, 1, FW_TUR_READY, WB_TIMEOUT, FW_TIMEOUT_DEFAULT}, {VENDOR_HGST, "WD", T_DIRECT, 0x1000, 0x07, 0x07, 1, 0, FW_TUR_READY, WB_TIMEOUT, FW_TIMEOUT_DEFAULT}, {VENDOR_HGST, "WDC", T_DIRECT, From nobody Wed Jan 3 15:45:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4vDz5G7Kz567n6; Wed, 3 Jan 2024 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4vDz4nPxz4bMh; Wed, 3 Jan 2024 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704296723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFrPrqBlGdwX1xm5/sqGc+BiV6iLGTLihTzpUzIW9XY=; b=KpRbriUcTcIkmfvcB6Pii9r37B8U3gBCrp0J8WTJ6RMleT3X+2MqAFH5RhdNS5aCTo7TuK Ff1SP52dccnX5+a1TH3V2LnfDZ/b52W9l529g8dp9k5DzjpXYnJcQi5kbX7XbnyNycycsx l0iiywlqNa6QSlFO65OEvkj1H/4NV+wG4Ppdnh8PAZY2P8tdLNqFdR5ruYTwtQfudQy39C t2CPWbpvV94Sxeu1H1MWNthYTZw7sy9vVkRtCeDAuYVXMDRHE/rEJI30S8zMsvUVxhq+ZF udcxbqXZ4sppFSe/zW5N7L48ZoMjwbianJ//j1RQ6YSPCUf5T7WopHDWY3Yjxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704296723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFrPrqBlGdwX1xm5/sqGc+BiV6iLGTLihTzpUzIW9XY=; b=Gsn4NRDuOxXlDC1dpPGjcX2pWHVYifMPCVo4A8YJCSm1Ib+hH37YRjHk5mWevrdQIVHIJO wMNQ2FyJnz6+YA9yW62mN+HyIK552x0xx6zeryEeVZ9RmsK3gt2SwHR12lDOF1SeiyoUZ2 KaAAxZ1sqf77kfIncbU2gpnhg6AsoU2NoHfarTL50CXP/5sBgBplqogYi2Mg392tP52yev FGfojwImEE2tMMFs0gzw6706ocdexBv37XIGrVeiUR1mkruIjHZOhNV0Vpw+OGSba+rEiv KxPQJz5itqNbahT5scz9XDrlY241FLGV/QqUrg5naoO/WT8cOty9q9hZ0keI2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704296723; a=rsa-sha256; cv=none; b=NVit/+i1Gac+Ym1m7pLEUbXnye373BuyyRyg16qvhJVeEhrjy+OCILuauTzwIAQ98V4F8n AAPqOOqDfwO5gnuiTlcxuePhhcCl36pdd6Pv6QucUXXxV2uJMnZZGjFpr4xg6vK5tr6fgG ZaLbPH+QmWRRwhd1xZ03iEAzgg+WQrd4suVbUwAVpCrE8Xib9QynxIGCASl1YJk2FiWnra xmftbdea+P0JH6Q7DXSBHL0mFrG6FeTG/xEr20FZ2FjB3HP1ZKT9FecmtRTH1w5/uVKBvn aC45Twqjqzk8UlsoeSLvi44hmlN3l7pctoY6597RlX6S7MuZJhorQ3S06wWTRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4vDz3qktzqk6; Wed, 3 Jan 2024 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403FjNXZ031500; Wed, 3 Jan 2024 15:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403FjNYW031496; Wed, 3 Jan 2024 15:45:23 GMT (envelope-from git) Date: Wed, 3 Jan 2024 15:45:23 GMT Message-Id: <202401031545.403FjNYW031496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 71cfc19e024b - stable/13 - vfs_vnops.c: Fix cherry-pick of e7044084cf81 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 71cfc19e024bd68caf6bd2a4ec2e2e4fececf12d Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=71cfc19e024bd68caf6bd2a4ec2e2e4fececf12d commit 71cfc19e024bd68caf6bd2a4ec2e2e4fececf12d Author: Rick Macklem AuthorDate: 2024-01-03 15:40:15 +0000 Commit: Rick Macklem CommitDate: 2024-01-03 15:40:15 +0000 vfs_vnops.c: Fix cherry-pick of e7044084cf81 Oops, my bad. When I did the cherry-pick of e7044084cf81 I missed changing outsize to va.va_size. This direct commit fixes it. PR: 276045 --- sys/kern/vfs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f5961a33f960..be3739f41086 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3358,7 +3358,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, *outoffp <= OFF_MAX - len && va.va_size <= *outoffp + len && *inoffp < inva.va_size && *outoffp <= OFF_MAX - (inva.va_size - *inoffp) && - outsize <= *outoffp + (inva.va_size - *inoffp)) { + va.va_size <= *outoffp + (inva.va_size - *inoffp)) { #ifdef MAC error = mac_vnode_check_write(curthread->td_ucred, outcred, outvp); From nobody Wed Jan 3 17:49:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0l2pQ5z56MVZ; Wed, 3 Jan 2024 17:49: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 4T4y0l2H2qz4rFh; Wed, 3 Jan 2024 17:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q7L28aYI3Y8/Hfl3IwAnF9ckRyv1LdkexiS6RRR3eMA=; b=sAJS9TDXuR2GX3FWY6gO3jO+ExSlsrbmWt64PIYaJpZychC4EtISP+yFnHvKzN0Y524B+m zJkuldqK4Rzk4newkiXVSDbItNtWzxlOaVeJgFNNy0zynd4lnFBL9ohSlmfZRKr0pRz0GR A9nKhC8/jqGOmBkSt4viNIrgcy8vRfoHp/h0LHvuItjUrmSGpBB7d70erdZtwuxhyy4Id1 KFZVyDxgJz/94V+rUh3joYQltmcTbbnkKHEhoP9XCBtxdxoM2LyD+IrXn4WhHl56zNyzMB +mBkD8/qfS2x+WtxiV4Qoniygs/1POb62FIjqQzx9pbkpYtXbh70sfRk3G1tww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q7L28aYI3Y8/Hfl3IwAnF9ckRyv1LdkexiS6RRR3eMA=; b=j/8QdWViFloWQhlL9Gd5K4yKLek8oWf1WkSSJipCwQGGZZTcgMHcoqHKecMSr2EuqPBTdI JDkndNFwcCpvDp/RwbfKoRJ4ApYPJ5xZDv1XaGdtiyjyyxSdnd0xbydAUp1pE8HVoSLdGU NdGkxl5dmg95J8hLbf7nz2CbsnUtjookHiYl9Hu1tsOfjFBU6AoKxwcTRfgIg7G4aDUe0I F7XgTXbmdmkjVqLoFHaj1J/4Drl2Cg0xOgk7OOIpSBuVnhQM9Ve3MpVFzMVOtVEpkqFOEJ mhqadQ3aw1Dh5gxZylILfgUtQrlX8XQYJAreYhV3czRHqu4QhP/FC3ADQ5QXiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304199; a=rsa-sha256; cv=none; b=BgEe6eGUMkoU7YtnpYCcJ90IrOeMr3kZ3JvnhJ8Fya8HWFwWCxGtOoQwURC1xmgY2NY0vh BcHaWVrhoGUR2C/IYaTJ8hhW6XFlM8zTXDiQiKpSW30hNfPO8cYDbsYPUzfAb7vLG/902Z 9Vjdg4+VV1uWbLd9ESYV/oGtXpFqm2mwHhJdAOrXq2y6v7sdLB1S4t5W0/6nVIKXvTh6SD Xjwji/SawAr8zttw9koT1OJ+zbU5cLHzYp2LQ0Mp0m4k0lMwuKD824JnerTYkifEcBCoaT kNJKPYE6dLYPOiHcg/V72qCWYJc2po6NY6dvkx2MmkPhyYaIQEOr3xXJcsuJ5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0l1KSBztvK; Wed, 3 Jan 2024 17:49: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 403HnxEw034706; Wed, 3 Jan 2024 17:49:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403HnxSG034703; Wed, 3 Jan 2024 17:49:59 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:49:59 GMT Message-Id: <202401031749.403HnxSG034703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 415aab2abb75 - stable/14 - Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 415aab2abb75f855dbe1413ff10f1fe0a9a6a5e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=415aab2abb75f855dbe1413ff10f1fe0a9a6a5e2 commit 415aab2abb75f855dbe1413ff10f1fe0a9a6a5e2 Author: John Baldwin AuthorDate: 2023-11-15 02:34:45 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:47 +0000 Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser): [libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++ These are changes to allow GCC 13 to successfully compile the runtimes stack. Reviewed By: ldionne, #libc, #libunwind, MaskRay Spies: MaskRay, zibi, SeanP, power-llvm-team, mstorsjo, arichardson, libcxx-commits Differential Revision: https://reviews.llvm.org/D151387 Reviewed by: imp, dim, emaste Differential Revision: https://reviews.freebsd.org/D42578 (cherry picked from commit ab43851b0c7bd5f21ade72c3cae3d3ee09eb8891) --- contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 +- contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index ea85e23b8065..4c063e134d8e 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cv) +#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC) template struct remove_cv { using type _LIBCPP_NODEBUG = __remove_cv(_Tp); diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h index e96cc6523b71..1956ac3e5a43 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cvref) +#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC) template using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); #else From nobody Wed Jan 3 17:50:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0m3k47z56MVc; Wed, 3 Jan 2024 17:50: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 4T4y0m3CjRz4rXq; Wed, 3 Jan 2024 17:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KAh8FfvlHfsHR2I9UhWyL1ViDBSCaCLv19/dGMV0+Zw=; b=XYDAi2Yx0yQsgdERFXeEXMB+loYBKpoUYUHePPdvo/cyqrJ/MHsoB9ei2TKGhnwPR94K8B H3QUpSTdaRKon3N9/FkPy9ATlHrWlpmt3FR5oLnrBRfXgzINd1VoxJ9gu1JyOTMNmPz4PT CjoXuifVxkqEFasqOw5h/EKGN63qigH8KDLfBNse28SIIjYAXWSFsTT/8k129zQLHLd3bH 9gqpRDZ7T/YAktewgQ3SGqgEE7FglbY9Qi8OdBzY7mU+loFLdFAF2kuISJMch+JfKI9OCr 3Qy4T0SFO7AakrrderzJFco1BvaOs3dKEeTfLFYV8o4uv9Jw/lsqk1zkPmPpeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KAh8FfvlHfsHR2I9UhWyL1ViDBSCaCLv19/dGMV0+Zw=; b=aIEKXQl5oQb1LgboknUquoDAb/EboItR7Y5l/KFmNXHf7qFUv0vs0R64vyrJUjvBQC7tTj s7VHWsmmOJHEzLlukl9lLMu7Qh9SFwlRVDU4siBl3w68fFbiyxaXZZuIBokfdIvy23ogiU 44AWPZYrP0UTrkk2IM5XIdEgN0gCIOrhC/Mx0W0GquhmY9d/kfkTJF6SeJ+KDpVQTric8A SA4UO3Up5+l3T/2HRP3uF4GYshwTIZfletTuA5sMW1p6Iaq/06s5lXwjgwRns+NcS+tGeO NEwPakemHFIVKXdA/geHR3LhQEazP3mGzmVELvWuSTwR2Bsqk/oBX9a6CFCtMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304200; a=rsa-sha256; cv=none; b=XdTrWKq+lKuGPpDNYR2sqOTkAKnvkkSTl0FgqzxLzX1dkFasRm+WpFyA4Xe9RlZ6bqU9mS WBEjz93YqfMMZk2Lt21dDuSxi5I9sQddqUB9S9MhJlw8amuooImTLUlFrOYQKfmZY5Hffz OyHY4t4NOTIWIyWtSgIDEUuACgVqSuy0qE0Jliu09bS3+T/fIQKZsJToU3vGBV8XedK0yv soHaxr77KKxkphR0Rq+vD04jsskACT0gbV2IxZJ2oO86sOi/YsJy5nrBM7bJfcn9Gw28Ky fGORmKODrpteSf6LtYMMByx6RZL7gJvwuGaWrYA2CFuE8itdoaFfB924J+Rdxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0m22XhztvL; Wed, 3 Jan 2024 17:50: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 403Ho0G8034851; Wed, 3 Jan 2024 17:50:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho0bV034836; Wed, 3 Jan 2024 17:50:00 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:00 GMT Message-Id: <202401031750.403Ho0bV034836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1dcd99610434 - stable/14 - libcasper: Neuter false positive -Wuse-after-free warnings from GCC 13 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1dcd9961043444b1a8a14c4fd36826e454fae0c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1dcd9961043444b1a8a14c4fd36826e454fae0c5 commit 1dcd9961043444b1a8a14c4fd36826e454fae0c5 Author: John Baldwin AuthorDate: 2023-11-15 02:34:01 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:47 +0000 libcasper: Neuter false positive -Wuse-after-free warnings from GCC 13 GCC 13 incorrectly thinks a call to free after a failed realloc is a use after free. lib/libcasper/services/cap_grp/cap_grp.c: In function 'group_resize': lib/libcasper/services/cap_grp/cap_grp.c:65:17: error: pointer 'buf' may be used after 'realloc' [-Werror=use-after-free] 65 | free(buf); | ^~~~~~~~~ lib/libcasper/services/cap_grp/cap_grp.c:63:19: note: call to 'realloc' here 63 | gbuffer = realloc(buf, gbufsize); | ^~~~~~~~~~~~~~~~~~~~~~ Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42576 (cherry picked from commit b7f7cc25c01aeacaafb86ebcffdeb258b7933b08) --- lib/libcasper/services/cap_grp/Makefile | 3 +++ lib/libcasper/services/cap_netdb/Makefile | 3 +++ lib/libcasper/services/cap_pwd/Makefile | 3 +++ 3 files changed, 9 insertions(+) diff --git a/lib/libcasper/services/cap_grp/Makefile b/lib/libcasper/services/cap_grp/Makefile index b46f3bfdaa47..0f722e3979f9 100644 --- a/lib/libcasper/services/cap_grp/Makefile +++ b/lib/libcasper/services/cap_grp/Makefile @@ -40,3 +40,6 @@ MLINKS+=cap_grp.3 cap_grp_limit_fields.3 MLINKS+=cap_grp.3 cap_grp_limit_groups.3 .include + +# GCC 13 complains incorrectly about free after failed realloc: GCC bug #110501 +CFLAGS.cap_grp.c+= ${NO_WUSE_AFTER_FREE} diff --git a/lib/libcasper/services/cap_netdb/Makefile b/lib/libcasper/services/cap_netdb/Makefile index 36c57103b414..653aa21c9b32 100644 --- a/lib/libcasper/services/cap_netdb/Makefile +++ b/lib/libcasper/services/cap_netdb/Makefile @@ -29,3 +29,6 @@ MLINKS+=cap_netdb.3 libcap_netdb.3 MLINKS+=cap_netdb.3 cap_getprotobyname.3 .include + +# GCC 13 complains incorrectly about free after failed realloc: GCC bug #110501 +CFLAGS.cap_netdb.c+= ${NO_WUSE_AFTER_FREE} diff --git a/lib/libcasper/services/cap_pwd/Makefile b/lib/libcasper/services/cap_pwd/Makefile index be6b4b21070f..4e0e6db6f86d 100644 --- a/lib/libcasper/services/cap_pwd/Makefile +++ b/lib/libcasper/services/cap_pwd/Makefile @@ -40,3 +40,6 @@ MLINKS+=cap_pwd.3 cap_pwd_limit_fields.3 MLINKS+=cap_pwd.3 cap_pwd_limit_users.3 .include + +# GCC 13 complains incorrectly about free after failed realloc: GCC bug #110501 +CFLAGS.cap_pwd.c+= ${NO_WUSE_AFTER_FREE} From nobody Wed Jan 3 17:50:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0n5F9Xz56MPP; Wed, 3 Jan 2024 17:50: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 4T4y0n3Kqqz4rd7; Wed, 3 Jan 2024 17:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QPWTD+zs4xw8FAHbDalH8bS0PIfnUpFqN8YoCnlXrMw=; b=enj4kSH3tdW+nhfQvQiow7d7jY04LaJ9yh1wdFOqM/4DZP5ZTSQYy5N+HLzYY0/pVHS9ds J/v8gGgEe6SNl3R2fZadMibz9LJvgQYjVFTscWegNGNmcU/ria7NyHLO+I2f7+M16oA694 Tq4CdAh7iV6wVz1K+pNUV9zoIoo4QNx8TJwwmFdVeExC/Mk32oTN2wGgtycFJZfAPp7YRW fM70wBJbXFQt/zaMIAqpamdahVDmIAdnWAY8IbZdS0KgHWEIDr68OSEFbbYMxQrS4VY/wm NkGvUIBECBTd3wk2YFPmJVorDmr6v++HXqaK/VI22sJAEYMqTidOlymK6uQ0hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QPWTD+zs4xw8FAHbDalH8bS0PIfnUpFqN8YoCnlXrMw=; b=RQodRTtXk+y2Q/3PpEhcxSW0festB5YY+03s5mrfLqpahThL2JfYaPPzRcIUQZXuMEeCtg ADZ9yCrZxt/s5XqEpUyY0tUy0sLPoaajWZbhJOMLSE0CZrP3Q/qVgX6L2GKcRnvpT6KQs6 R2V5+EgrXDd3kFdlYG5Ohn2zqDkrRZQ4TXvwt1nuCR7ogQI5yyGl4GCFhG97c08cZX291u dgP3adaTYaCui7jgen+ynedEPub/XG/uOZBmTBfewM4MESIb6bNUiSutwTQHMpr72GbBG1 ipatgSv0ooZH2AkWQQJPsoVTeZB7PZC0f1lbw8rT1tGDDN2ee+/0whn1yFZQTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304201; a=rsa-sha256; cv=none; b=Q/fR0ZD+AGOVpFiLLgHToxPT2PtfFUp0EmPe7BtA495z2p6+8Z80Fh2QXF3b155Q56Baew 62DjoBCrE1wXXF/m/pkqDtKjJArACTFEdUtXTtT9gTaY5WV9XTZ08ic/agujV9ePfCGJFm YBHcsq1mtBElNARrZ/KXs9ixm2e0SKJzqNeN8ZA/6ptrT9u3vlTOsB33qpxhZvFpWbodhU 07PPcSeoDdTv+lxFaTc8VZI4kNidmk14IVxOoYRAnY9K+O3JN+QuyJKOhcROcMQWwUrhOM WHGMpL+5FPsjR1flVVqIVnwgaHcFO7ivRQFCgF0m5gNTBe+J5/hj3QlIxlk/xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0n2MvRzvCW; Wed, 3 Jan 2024 17:50: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 403Ho1Hf036638; Wed, 3 Jan 2024 17:50:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho10d036634; Wed, 3 Jan 2024 17:50:01 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:01 GMT Message-Id: <202401031750.403Ho10d036634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f7180e5d69cd - stable/14 - libgpio: Fix type mismatch for gpio_pin_[gs]et List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f7180e5d69cd371b1904c1654e32a50cc9f301fb Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f7180e5d69cd371b1904c1654e32a50cc9f301fb commit f7180e5d69cd371b1904c1654e32a50cc9f301fb Author: John Baldwin AuthorDate: 2023-11-15 02:34:21 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 libgpio: Fix type mismatch for gpio_pin_[gs]et Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42577 (cherry picked from commit 0355ecace82cce8322e5fcdf48f751d253792ce3) --- lib/libgpio/libgpio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libgpio/libgpio.h b/lib/libgpio/libgpio.h index b493d63dc9e2..35651ecd8cca 100644 --- a/lib/libgpio/libgpio.h +++ b/lib/libgpio/libgpio.h @@ -81,8 +81,8 @@ int gpio_pin_set_flags(gpio_handle_t, gpio_config_t *); /* * GPIO pin values. */ -int gpio_pin_get(gpio_handle_t, gpio_pin_t); -int gpio_pin_set(gpio_handle_t, gpio_pin_t, int); +gpio_value_t gpio_pin_get(gpio_handle_t, gpio_pin_t); +int gpio_pin_set(gpio_handle_t, gpio_pin_t, gpio_value_t); int gpio_pin_toggle(gpio_handle_t, gpio_pin_t); /* * Helper functions to set pin states. From nobody Wed Jan 3 17:50:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0p5Vxhz56MPT; Wed, 3 Jan 2024 17:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4y0p4S10z4rhy; Wed, 3 Jan 2024 17:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ntoifN2hnWmkarADUF8XQKK0D/i5cciV+O7C4Wu3IyI=; b=cGPRHLz8MCiywqQ/ZVd3YER3eGAwRmu0mAqvgT+53nrx4VvkKC5oh5RNwRWUIccC99zCHW sAlFangiG59TRVm11fia4AjtoAEBReevus8PGNLpMMDVsdssW8kCODgQ2d7FyGUkIWprxF 85tpKK+LuGzcjm/ufp6bihlDoYpVE/uCJrUqbKiVrUyQYoQ3FCmINFsAN7FIZPXLFhIqhY Lc4vhA+xRFcST4DKP7/LOaKtq8IdrVnODFhQ5IRWh2VSnRUB3hZ10pw6SEZmWWfAiq102L tG4awazu1Afk15NnM1VtJAJNeOYD9LcOc01pe+PoTvduGuboAowA0on3Taqg0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ntoifN2hnWmkarADUF8XQKK0D/i5cciV+O7C4Wu3IyI=; b=qWNFhjUN3y40j5ad7NvIHld90SZ4kSRX8JC2MHkQzjSi4U8OUu8AWAAxi4IsK3/BRI2mkZ sZi8QvqAMKCEytVvrrEL5V8+zCuwXusK7rKSAU55IYyuKZB0NJNQnZKUrDcd3vqH91YGy1 jBbcxs2LZ2Duf1yfDsdxlMJM9NVJPHrTpyNGKy/AlQpJ7PZNvcdK55HD+KwcWkSZr689Q7 3Old92SIplNBTwJP35EOGtwV12/QvWvB0P5K9FFE3wp9fpJoFYJKnLC7bCi/+EnGqIOEMP Kh8lP0sIA4M4G60v/5Y19pKl4kCd3eCPke5XFt1qFXULP2TbNEoOvtbQIUHqcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304202; a=rsa-sha256; cv=none; b=PGNvsfRL+SFm/xGVUbPD4+fELqM9eUlSb2FKy5KJo8/zxif5TiPsm8tvQlOXK5zQjtXln4 C1vKJQ/z/qwMRkHVNNxjGVRh6dHn4EjloqwdGUJElSexbE/BDfu73j6kWU7KaJo6lBLika vhzC6xy5k89XEEUj1sEthU6dAmjd9fyz/fj42odY6ZWigYB+SY3JWE0nCmlnz5/5goaz0Y bv314gvCMB7+8XkkMsX4LWSNSl/5U4j0HfQLqWVAY/yC/H9ds8Wb46uNMSpOH3aQsBjvh0 Afo0J/N22tTjMYjTN0euaeEIutCWEamHF821mZju6IeusumiKae1l95AqRTEpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0p3PfsztvM; Wed, 3 Jan 2024 17:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403Ho2x0036925; Wed, 3 Jan 2024 17:50:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho21m036920; Wed, 3 Jan 2024 17:50:02 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:02 GMT Message-Id: <202401031750.403Ho21m036920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c2d4e8d4e9a7 - stable/14 - bsd.sys.mk: Disable -Wdangling-reference for GCC 13+ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c2d4e8d4e9a7b217e25fa9a20c560ed1e98ba236 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c2d4e8d4e9a7b217e25fa9a20c560ed1e98ba236 commit c2d4e8d4e9a7b217e25fa9a20c560ed1e98ba236 Author: John Baldwin AuthorDate: 2023-11-15 02:35:04 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 bsd.sys.mk: Disable -Wdangling-reference for GCC 13+ GCC raises this warning for libc++'s istream. It raises false positives in other cases as well (GCC bugs 109640, 109642, 109671). Warning from : /usr/include/c++/v1/istream:1464:34: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 1464 | const ctype<_CharT>& __ct = std::use_facet >(__is.getloc()); | ^~~~ /usr/include/c++/v1/istream:1464:71: note: the temporary was destroyed at the end of the full expression 'std::__1::use_facet >(std::__1::ios_base::getloc() const())' 1464 | const ctype<_CharT>& __ct = std::use_facet >(__is.getloc()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42579 (cherry picked from commit 28fc837b70372a1a99c28ef4f74325bce711960a) --- share/mk/bsd.sys.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 2b1a3e103b89..7d0e632973e4 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -234,6 +234,13 @@ CXXWARNFLAGS+= -Wno-literal-suffix \ -Wno-error=unknown-pragmas .endif +# GCC 13.1.0 +.if ${COMPILER_VERSION} >= 130100 +# These warnings are raised by headers in libc++ so are disabled +# globally for all C++ +CXXWARNFLAGS+= -Wno-dangling-reference +.endif + # GCC produces false positives for functions that switch on an # enum (GCC bug 87950) CWARNFLAGS+= -Wno-return-type From nobody Wed Jan 3 17:50:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0r0Zr8z56MMX; Wed, 3 Jan 2024 17:50: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 4T4y0q4y2Mz4rfq; Wed, 3 Jan 2024 17:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7efjMlkfU+6Sz4Rzb2GXNKNkR44i6PRIf5VPjLsGsws=; b=od1xG49AVfMJe0nOCa5jONsCOgqiO7/SbGme772lu3lvFQee6k2UesUhJwmDG08spJJ4fk 056ZE5hmATs3JS6VYGBrUQ2UT+fMDCIeqRGVHWWzGTsssyo/vl64m4J2avGS0TPNFOzJ2E CkaKU/AxBa3ZJq9/sGf+MCmAJK0u1cIaE8FDhsbnwgU+ljtK3Ae2/2NOJscwx8w503q8kM 57DI6KwOOUWSENysEOtrhAl+yh8wXYEebNfXPbweFcQxSa+hQXGlg6mkTwy6E+CvwPFTT1 XMrGfBgJ3CBrEpuWQ3NR4pwRHi2XNlpOBWOMWZ4ARXgDzbOsvS9ZxlHNvUlriA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7efjMlkfU+6Sz4Rzb2GXNKNkR44i6PRIf5VPjLsGsws=; b=pM9srkcVkZ3zR954wGURZwswKXViEbB5KQyN1CWnWbqDOOQeaaJDc5Zwnyv3G94x78JGaq uQOv2iZm70QK8kxZPyxb6aqx6wogbDeTNtLJOMXvXLfnQCmf9bO0h6g1MNzuSD3HSqw1+x yVU7oPq0E0YxyriKLd9GzM1UvBaxVn6JG3qea0300imw3Nl4BM3KNZg1hHbDWnc2ttIP4C 3AStYTT/gc/R5KITdBLgByJMme45WhWZVLMuI0SKXEPKIV2mdOGVm8UAVcTEm6oFdTxdVV PtK7vM/El0HH1RooaqvvyUefqdbAHl6tHkbHPbRLfqXmrXbydBMvUvdv+RW9mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304203; a=rsa-sha256; cv=none; b=yzuZDrsp/GNGYGscRtuBcRVCux+bSrjMpj+qsCJx0xxL0lOQIQbAPZLuniDjqd0rQgrfQ1 TJ08fcu4a07jP1vX5NkMGOzfWV8GK28RL8FBfLHd19xxXe8tyRL9AnWPTkclgzuUa8Rbr8 ECVYi+e9VFkx1uePjdOMNEhT9GTeD1tcMeFMytEGDJP1clcv5MJb3/UfJatysT3/Iqj7zx ZsEoypPZpHWf9RFzzgQ++ZA8Q0Mgmh3ST/ILNXqSVQsW+El2Bk+nwnLTKeCl6zLWOE3fm/ bPdaPU7n6aL3aIcRvmqVhBT+Lp/9tqgIq4REYMsrmbrvq4hgXV3Ne24+YrQDWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0q3zrqzvLv; Wed, 3 Jan 2024 17:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403Ho3nM037212; Wed, 3 Jan 2024 17:50:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho3h3037207; Wed, 3 Jan 2024 17:50:03 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:03 GMT Message-Id: <202401031750.403Ho3h3037207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3a54d200ae87 - stable/14 - makefs cd9660: Unexpand a few TAILQ macros List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3a54d200ae8773f263281fcc2075e7dcebf3d3fc Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3a54d200ae8773f263281fcc2075e7dcebf3d3fc commit 3a54d200ae8773f263281fcc2075e7dcebf3d3fc Author: John Baldwin AuthorDate: 2023-11-15 02:35:27 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 makefs cd9660: Unexpand a few TAILQ macros Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42580 (cherry picked from commit c06962057bedb3f1ed8c3560c1d1147dbf04ba68) --- usr.sbin/makefs/cd9660.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index cc56421a873c..7ce9a3b6cbb2 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -1516,10 +1516,10 @@ cd9660_generate_path_table(iso9660_disk *diskStructure) TAILQ_INSERT_HEAD(&pt_head, n, ptq); /* Breadth-first traversal of file structure */ - while (pt_head.tqh_first != 0) { - n = pt_head.tqh_first; + while (!TAILQ_EMPTY(&pt_head)) { + n = TAILQ_FIRST(&pt_head); dirNode = n->node; - TAILQ_REMOVE(&pt_head, pt_head.tqh_first, ptq); + TAILQ_REMOVE(&pt_head, n, ptq); free(n); /* Update the size */ From nobody Wed Jan 3 17:50:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0r70GXz56MMZ; Wed, 3 Jan 2024 17:50: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 4T4y0r5RNwz4rdt; Wed, 3 Jan 2024 17:50:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnHnYBLEzGyq/PQtCMmD3JdRnPP+XIF0wRmfV3tSnFU=; b=rSnI8xefSUqe2RYqFascV+9pfuuxRV3KhAj76TgJ33LTsYGIqJ8EJpFzncBcaXxSPYkFNC +ouGXROozOhb/svTAlh4D7E0djHbGYVQptMKqHIriPaBVQSxsTz7YslaikK2LXNgAXrbWG 0dbFRoGo3NfEY/bc2P3sjJv+f3HeZwzXjYIhGUjOzjQ742Nm5bqtqElNFEYUsRg0GTKl6j g/xs1/5vm1F6pSK2Ou+MB5GwGmA+kjBTFyT8VObx9lmMz1ij3VgiV9e32PSPBDdrn+9bnR +H7jhrySyyVTDbTcs/4ctcYkvjRgx1jXO4cwj5ZyVoTMmeaMHm1+43ki5fgTLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnHnYBLEzGyq/PQtCMmD3JdRnPP+XIF0wRmfV3tSnFU=; b=g5Uyqfvti/aQKll4bBHMKW7XnfsSyux3vrvUeYN0u3fdCMSiZqZe+GB1wPJGeE+PtjnMfN QCo/e/AltTh5RROBrmqKl4tjJVZEEXZsDkeDkWUb8Rt0MOo6rxhuTR/hi3huG7zbXEDcjx h1zv9668SlIqEOMYZ28zO8G2HoNGzCfl85r5ja+Eg+OlzOoyA4hCUC3IGDW4Kdst4ZNxxC +cbiLGdBNk+aIF+zTcElSXTS6lt9t4hWnG9QQRUXpfDfrTHuQOP+mOWLcUKWlJUxZR2Bsq re/EIMxNZfs3lANQ6Irtw8PWRXP8xDStOHBwn+Ww3T65cZWfLIK4ypSc/YyP1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304204; a=rsa-sha256; cv=none; b=uNhN9I/aAbmlFZ68dfjI6YecQbWZ3zn3aL0TNic4LVHzxaNQL+HM+utJBfhsqASgpezmIx VpzJSDICsR8kvOhNfrJMM3vOPgTk7T8ghT0pDonQq8ijHdhs92jw82BddarDUEgsRVhbYs oQ0TNiqWmzysQzV+YCW4CrgMhjqf73Drj3BEaioStDGnqEn10qG3jRXwxIha76aYXmsQsR iE8bIKP73hcpQhh/7gkyy0sTzjCEWnwFxAM6Gs76Ht69mN/+qATsnjetMYAv1eknr/xWsA ek9sapL81+gGktiYv/GexIdrZc8imOvm0jwDAQyRWHvbcFbjuzZLjlDqzvos3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0r4YY8ztsb; Wed, 3 Jan 2024 17:50: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 403Ho46r037494; Wed, 3 Jan 2024 17:50:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho4IG037489; Wed, 3 Jan 2024 17:50:04 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:04 GMT Message-Id: <202401031750.403Ho4IG037489@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 23cd7dfee413 - stable/14 - makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 23cd7dfee4131c85099ea63ebe6ebf290bc867c4 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=23cd7dfee4131c85099ea63ebe6ebf290bc867c4 commit 23cd7dfee4131c85099ea63ebe6ebf290bc867c4 Author: John Baldwin AuthorDate: 2023-11-15 02:35:44 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table This function temporarily stores a pointer to an on-stack variable (a TAILQ_HEAD of a temporary list) into a global variable (*n). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42581 (cherry picked from commit 5fc8ed9313609fbafe505deaea253e6bde5ac165) --- usr.sbin/makefs/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index 9c690fa7e704..c0f4469d29f1 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -49,4 +49,9 @@ LIBADD= netbsd util sbuf HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +# cd9660_generate_path_table adds a global variable to an on-stack +# TAILQ which temporarily stores a pointer to the on-stack TAILQ head +# in the global +CWARNFLAGS.cd9660.c+= ${NO_WDANGLING_POINTER} + .include From nobody Wed Jan 3 17:50:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0t0LGwz56MS3; Wed, 3 Jan 2024 17:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4y0s627Zz4rv8; Wed, 3 Jan 2024 17:50:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E79WuL3y9labEkJ5HeBpSyKKtcZYXbz4I3CT1p01eNM=; b=hwwdTAzM/Z7shCcKNuJhPRuaPqZZBy2DoqPOtdGpw1Vc329N0jUvwLZD9ESEs7kC2WoYgP dwdgeROWesNM+IxgEiYoDqDsEMs/b1HiPGUMa4vvnVbVI4XVnXQ+YxeMQi3CcTt0Yv8TSh 9iy+fXHe3aLmPhAMbzOktuE5yTxjva60yZ7+RzcUj/zfBeKe7CR15QOy9n2zIsF45YWtoN PTp5/HRtsHXASwUEjQMZ9GJnDUfaOz4kTgaSKM0+Leb7ADJQz4fukJT0cKU/JdwWdXixmu MKvj60F2r/FFA9axpUHPOvkES36Ya2KmjKUu5pdgw0ySHyDE5HAg4cJ5IIf9hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E79WuL3y9labEkJ5HeBpSyKKtcZYXbz4I3CT1p01eNM=; b=RIwrwX8LoWbdQE8eHs/wjSQ/fJOwkih5ubRuFlB9IvKO5yjhCQ4CQqKY507djAAKgL8ZMr taMDIxFZCgDDh1iIxyDEr5XuwPn1M1jYwE7Ba3p8yO1I2AxvCQJXJEAejbXxslGmu7/S51 kb0G4fpK3aHT0cYWISYkfKWmEWImJJSY0rKjS9gv4Dcz/zfybGVcbq/yWu2sOUA6Z9gMzO vKnaJQmeLKM82tR3zyZc+wN66DqG1/BcW0yXwVPlUS7TOHn8LxFm/vCKZfvwoLvsvr4W/q 02iTBDBC2WK0eMYqgwX5DYe/LqBrtA1A70jX2WFP2s7dVFJpjpxxUR0BxEq1MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304205; a=rsa-sha256; cv=none; b=TV+T3Kz0lLBuSuoUwTAjwV5/kDSaPDaikfxsmJj/ThM8+6OimPeAJ1Rf36pQg26rTdCa/Q vJ7Zxo2oMHpc1ZZLSrQbs7BYFV5itUXwQdcKUoe7kO98U99Bb1tn7CWmQJuV1y0i0/F97V hG1fjcD0pXVIOWjPqtH0WydEmZCb+zQthZJytwZwujzz8/Fy9z/hvSWvsEc7e1Qta3Gkkg TM3hdgGQ2apRml5ATK/pUEc953tlyFrViDsCf+XuX3EZ41ByQQAYY1IOVbIcEzSWlcEkgV JBTmrnbIoWKlfyDMRpvLZARiJS6/bLLQN+iefU5dATehcMysdlMdltl2AWzfgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0s58Tjztsc; Wed, 3 Jan 2024 17:50:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403Ho5Q1037789; Wed, 3 Jan 2024 17:50:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho5KL037785; Wed, 3 Jan 2024 17:50:05 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:05 GMT Message-Id: <202401031750.403Ho5KL037785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1d491430732e - stable/14 - snmp_wlan: Fix a couple of type mismatches in function prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1d491430732e7d171fd6b19ae3492111c5544a47 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1d491430732e7d171fd6b19ae3492111c5544a47 commit 1d491430732e7d171fd6b19ae3492111c5544a47 Author: John Baldwin AuthorDate: 2023-11-15 02:36:03 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 snmp_wlan: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42582 (cherry picked from commit cc61bf9eccd46592704f3e7bc189c94ccae8f524) --- usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c index e5a6e0653b39..b129e42b9d85 100644 --- a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c +++ b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c @@ -68,8 +68,8 @@ static uint32_t wlan_cryptocaps_to_snmp(uint32_t); static uint32_t wlan_htcaps_to_snmp(uint32_t); static uint32_t wlan_peerstate_to_snmp(uint32_t); static uint32_t wlan_peercaps_to_snmp(uint32_t ); -static uint32_t wlan_channel_flags_to_snmp_phy(uint32_t); -static uint32_t wlan_regdomain_to_snmp(int); +static enum WlanIfPhyMode wlan_channel_flags_to_snmp_phy(uint32_t); +static enum WlanRegDomainCode wlan_regdomain_to_snmp(int); static uint32_t wlan_snmp_to_scan_flags(int); static int wlan_config_snmp2ioctl(int); static int wlan_snmp_to_regdomain(enum WlanRegDomainCode); From nobody Wed Jan 3 17:50:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0v1X3yz56MXn; Wed, 3 Jan 2024 17:50: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 4T4y0t6fSMz4rpg; Wed, 3 Jan 2024 17:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HWFlpLyQCIXUSwHKhhuHn97b3ZFAksP0n8GTlws+5N4=; b=Mkmr5FhjudRt8SvKgBFemK/eTO1gAnQ4Tac8Bl5LpLpX7IGiEhrqZySyPD/CVu9RC+y6uS htZrq0YMLju+d1Q+3N7J2iETlflwvVbzyKwUFF6/P5Dm6kYUZagqI78rWPu1O/inZM66K3 3Wngx5NLEupI2OK8k9u/FShXbuIW/nsBa/MzljuNwjGm+RR1Us+XED2DAhlZYObK3ohUYl T4AUwOyly29yDTLRJVyR7ilFEOdrXO9RK6cy763XI89U2O4WO7qmMRH02w8s+e6uB1tIfp LKDi9cRMMeF0c0X28u38sFNvqhhW+lJeywCHLSzSll/3nStzdZxkxlN9mX39AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HWFlpLyQCIXUSwHKhhuHn97b3ZFAksP0n8GTlws+5N4=; b=GxXfBw4KaAQubaMQl5YkSFVLQ5PYvQNbyHBbzigYc3nK2Y0Bnpd/3kYhb7rqSLCWSRgg+f rjZr/RCFgF/fkN5FSoYnVflcDinyPeoRVtUi+TPEKR9gRpmmKfmgc4m/NsaSPbc2omJoCR N9zQvNUXtFB7jnI6Bgj4iebV5EWwY6OrG68xJOBRTecaDRLjCEoduHOnF0KmdVyHvYUnrD Fdavccf+Xwh00J/ANCgpXaYBfgsh0qU+WBA6Jg0hO5XtuaTncDaZ50gsgZXc42OZD+Szxk ORvn2TPDtA265vHmrbWql4V4rQPw7uKqZCoI1h/pbBSnT/pO5sUb7i9BS2j82w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304206; a=rsa-sha256; cv=none; b=FsPQZEBUdnT9OFpJH7RQi54mbYgWnfvwEvjirVSbFzDwqYwjPMIyGEtJrpnxzyVcF11I7j /+R0lmuOQ6akYdN4T+CYXPGnGxHbomW2UyQ0KO0ihWkKYlXwK5GCba4vzdSvQ/xgU/49s7 4NJHDPAdfZeK2FTCgyI7guzkZZVx4SdI0FC5hmvT8pLjgsv1rQ5FpgTmfaMP6AQp0sWUxZ ldmhMlIBulkb61mwHolBQ/7LDhq2XU1u5Aa5EV5qSIW700qQsU3bdrwGAuMI8+dNtUK4t6 bym08sR+D4J5bRD69gS72JEVkwbVYuGM+CseRU9w7fVXAsesGhj7sPV77vzD1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0t5mBMztWv; Wed, 3 Jan 2024 17:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403Ho6fr038079; Wed, 3 Jan 2024 17:50:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho6sh038074; Wed, 3 Jan 2024 17:50:06 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:06 GMT Message-Id: <202401031750.403Ho6sh038074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2012748bd723 - stable/14 - pkg: Allocate a suitably-sized string for the local ABI List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2012748bd723d05e75de4519ae6eae0f40eba96a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2012748bd723d05e75de4519ae6eae0f40eba96a commit 2012748bd723d05e75de4519ae6eae0f40eba96a Author: John Baldwin AuthorDate: 2023-11-16 00:53:53 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 pkg: Allocate a suitably-sized string for the local ABI Previously the local ABI string was written to an on-stack buffer and the pointer to that buffer was saved in a global before the function returned. This had two issues: c[ABI].val pointed to a no-longer-valid on-stack buffer after config_init returned, and the string could potentially be truncated. Fix both of those by changing pkg_get_myabi to return a pointer to a string allocated by asprintf. Note that the allocated string is left in the global config array until it is implicitly freed on process exit. Reported by: GCC 13 -Wdangling-pointer Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42623 (cherry picked from commit fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced) --- usr.sbin/pkg/config.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c index a2b005eca835..ce3a11cf8c81 100644 --- a/usr.sbin/pkg/config.c +++ b/usr.sbin/pkg/config.c @@ -144,32 +144,35 @@ static struct config_entry c[] = { } }; -static int -pkg_get_myabi(char *dest, size_t sz) +static char * +pkg_get_myabi(void) { struct utsname uts; char machine_arch[255]; + char *abi; size_t len; int error; error = uname(&uts); if (error) - return (errno); + return (NULL); len = sizeof(machine_arch); error = sysctlbyname("hw.machine_arch", machine_arch, &len, NULL, 0); if (error) - return (errno); + return (NULL); machine_arch[len] = '\0'; /* * Use __FreeBSD_version rather than kernel version (uts.release) for * use in jails. This is equivalent to the value of uname -U. */ - snprintf(dest, sz, "%s:%d:%s", uts.sysname, __FreeBSD_version/100000, + error = asprintf(&abi, "%s:%d:%s", uts.sysname, __FreeBSD_version/100000, machine_arch); + if (error < 0) + return (NULL); - return (error); + return (abi); } static void @@ -453,10 +456,9 @@ config_init(const char *requested_repo) char *val; int i; const char *localbase; - char *env_list_item; + char *abi, *env_list_item; char confpath[MAXPATHLEN]; struct config_value *cv; - char abi[BUFSIZ]; for (i = 0; i < CONFIG_SIZE; i++) { val = getenv(c[i].key); @@ -512,7 +514,8 @@ config_init(const char *requested_repo) finalize: if (c[ABI].val == NULL && c[ABI].value == NULL) { - if (pkg_get_myabi(abi, BUFSIZ) != 0) + abi = pkg_get_myabi(); + if (abi == NULL) errx(EXIT_FAILURE, "Failed to determine the system " "ABI"); c[ABI].val = abi; From nobody Wed Jan 3 17:50:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0w10NQz56MXq; Wed, 3 Jan 2024 17:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4y0w07LLz4rjv; Wed, 3 Jan 2024 17:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAx8NnArwL3O6y3RyMnGwezKX/An6MmIpFPFxxiTd10=; b=QLpIvG06HGVSfd3vzoVb+O/RUKlw40UHv7rREMDw26GXeVxB4RFtpgMv2ZbxFopgbaRBPo cQXhkpFPQ2OgNMTUJtYJcyom9tfHx5ytjMtNS0ev0k6M1Vyn/2bvbkQZKmT+DZkJKtqiZp +JLRFEcGkFbw1gKZ4CxmWSFRLx2x4htNYN3Z5zA5f8PUwIZ7xC1mGWNlt/jeVrH3osSjWm FRwerxcb3yPiEx8faicSrImP4knPjiKApWlDfsIxy26c8UCNMtq2B7/p5szAfXUPq78aWc m6eNt1IJ9s1+S08mPL6FvPSD3qAHzVVfMqf6ylE7jYTDVoF9xoU7U/uDjORrMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAx8NnArwL3O6y3RyMnGwezKX/An6MmIpFPFxxiTd10=; b=uCDsvEfC+V9uKN089FFaJGJykUmtkQf4gT5I91zt6JgRaHNYb+UCRzUJpnVWG8Mk2PVKRc D08DzDiMFTFuZn4dHciNppmaYnuwlarZPmMNL6/+5C6Ps1H6A00zfL0EtbxBXclmUjiyLo QSntCGB7Qzlgv3D3rHkQggvUIK104EOoNzjChSNfjU3d2mvhZCz1QJLJyFVDdITrsYc1BD 2TC33aYqEyT36WK0kCDHwqQEfSNeVHh0NC3p5XcUW4ueFdl35V8KdfP93zAP2sRhyA5x/0 RKtHvRvIIwMzmLduZmUqUclPzlzs5oGt16vXf+Tf5/mr2iUd23XUwbITx+mdEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304208; a=rsa-sha256; cv=none; b=FT/TK5bpblcIdORzUdltD/HxwXj3dgnvZrZZRTqKY9KVFj+hL1TaZp+oYo8Rgm0XpO4NL0 qmfU7+V9Cxv91KryjATZT5K/N56wX0+nuxgVIy3dg5Ir2y6hMgebMzgDAZfDIdmOKcEON4 d2Jgu4rooctKszC+fDKZPYW1dJWy9u/DoMp6zrKSNeeO+ggzBgdwSbJ6zh2kq5WRsflIlj seicaRpNYkN9kn0ZIFMgqlwZUG9lLb9L3cNGet3rInpWt/VVI60PrLBZTOqScgbfIXFhcO 6XRZce4rI4lUSnCi6Ykp2ReYsy5I2t0mafeZSOk1lumqCF3xa8lBdzcHqIdixw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0v6M5LzvLw; Wed, 3 Jan 2024 17:50: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 403Ho7g5038375; Wed, 3 Jan 2024 17:50:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho7ZI038371; Wed, 3 Jan 2024 17:50:07 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:07 GMT Message-Id: <202401031750.403Ho7ZI038371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6a1b9033d81c - stable/14 - ath_hal: Fix a couple of type mismatches in function prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6a1b9033d81c7ea612f8b50a4bbb823721529955 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6a1b9033d81c7ea612f8b50a4bbb823721529955 commit 6a1b9033d81c7ea612f8b50a4bbb823721529955 Author: John Baldwin AuthorDate: 2023-11-15 02:36:32 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 ath_hal: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42584 (cherry picked from commit 1e65df68403acac2231dda161fd12e62f888a031) --- sys/dev/ath/ath_hal/ar5210/ar5210.h | 2 +- sys/dev/ath/ath_hal/ar5211/ar5211.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/ath_hal/ar5210/ar5210.h b/sys/dev/ath/ath_hal/ar5210/ar5210.h index e3524eda6965..567fea567cba 100644 --- a/sys/dev/ath/ath_hal/ar5210/ar5210.h +++ b/sys/dev/ath/ath_hal/ar5210/ar5210.h @@ -278,7 +278,7 @@ extern HAL_BOOL ar5210SetKeyCacheEntry(struct ath_hal *, uint16_t entry, extern HAL_BOOL ar5210SetKeyCacheEntryMac(struct ath_hal *, uint16_t, const uint8_t *); -extern HAL_BOOL ar5210SetPowerMode(struct ath_hal *, uint32_t powerRequest, +extern HAL_BOOL ar5210SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode, int setChip); extern HAL_POWER_MODE ar5210GetPowerMode(struct ath_hal *); diff --git a/sys/dev/ath/ath_hal/ar5211/ar5211.h b/sys/dev/ath/ath_hal/ar5211/ar5211.h index 45fe7e366190..08396ed85dcb 100644 --- a/sys/dev/ath/ath_hal/ar5211/ar5211.h +++ b/sys/dev/ath/ath_hal/ar5211/ar5211.h @@ -304,7 +304,7 @@ extern HAL_BOOL ar5211SetKeyCacheEntry(struct ath_hal *, uint16_t entry, extern HAL_BOOL ar5211SetKeyCacheEntryMac(struct ath_hal *, uint16_t, const uint8_t *); -extern HAL_BOOL ar5211SetPowerMode(struct ath_hal *, uint32_t powerRequest, +extern HAL_BOOL ar5211SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode, int setChip); extern HAL_POWER_MODE ar5211GetPowerMode(struct ath_hal *); From nobody Wed Jan 3 17:50:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0x1ZCBz56MHY; Wed, 3 Jan 2024 17:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4y0x0w97z4rvq; Wed, 3 Jan 2024 17:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aBq6cr7bKIzWDHc4sRHCFHc/0Zk2GGaMZYaYBHHXdwM=; b=Ks+21rPgVKjccDyTSY+asWrn1fDJevgbHRLCmmnoWcxown05XCVJAsTvDtCqZuPPSzqqPF sqIAAGtWdZnu3kb6KwMerMxdtDjegqz21jCcHp+VyBKOtY2xBoMBrZrOp3Fn1yWdG19BZi 8kz7d7zlWWywSu6NL1pdd1fRMkH967jLojVJuyD6cxSHPRQCLpVC9abcOLrTRHjYexFfqP aveLGCHBN8RO9u5sLJjs8Rh7OURenGEBfkD0InokmaCK28+kRgAKKs9MskQ69WUi7/ssi7 lFc7qtSDFkg7I2w8EusW91wxXeSuu76k9JfaO54MvADeediqCGzJLfdJFyeRVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aBq6cr7bKIzWDHc4sRHCFHc/0Zk2GGaMZYaYBHHXdwM=; b=RJ58B8gzZALrsyMqxgldju2hVjRu+2gmcrKhRJLvDx6trgvZO/rhwxvo6PVzI2gNi3kN9t WwIbPj44RFqeczRvHfJCWiqOomxx1RHEO0b3VEa37m/D+P7BVqXY58hcz4q2jF4QKUIR7s BBtqmadOIqttZyPjW7xPreEHBszZ3OlOWzzydi1+ZBeYpZJ8ylpYwK6qDGCKqNgHQk1mz3 0nSvxCbmjqiFEjj1Emo8KOoEjJMayDNkf5kAJ2skbZiC5yovSY1TpRnEU3r270RwDy5heI RfYhXaV0NjrkK37AxTh5gogTfXEbaFMrMteP0TxKKhBTcp/A8kT8SHavXqBlTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304209; a=rsa-sha256; cv=none; b=mfltAcIVCWbD/hSH/TLfSAB4znFtOqrcng7a4PlAcG8xxhaxaIESUKK6G7gAsm1H1nj47K 8Gb8iJ6IWVr1T4GoghqcNxkZ32imtRdYuXUUdAXyhEK9Y4jA5dgR8zjJ+R1tyjfn4Cw8x2 BQBTkaJKPELtXdTVqUoOaudw/InbcWnrC7pJcshxnu11kzKZf0ME1Jsk6cXg2QoEgMam1X BU3n1PqN5XOlSOTq5xeL2BpZ63EyJfZJI9CjFmVUMW2Xxrl52V/IR+WjFcwZ8KzUKJG3XK Oxy0UwoSVWtL62v1UxOwfvSKn0j2JN4NnNwLspP7yiLLDGmSXENgxx/l7qZDRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0w71lQzv0s; Wed, 3 Jan 2024 17:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403Ho8hZ038663; Wed, 3 Jan 2024 17:50:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho853038659; Wed, 3 Jan 2024 17:50:08 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:08 GMT Message-Id: <202401031750.403Ho853038659@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: df8d325b8d62 - stable/14 - ocs: Fix a couple of type mismatches in function prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: df8d325b8d62863368702289264f8fc016699fd1 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=df8d325b8d62863368702289264f8fc016699fd1 commit df8d325b8d62863368702289264f8fc016699fd1 Author: John Baldwin AuthorDate: 2023-11-15 02:36:48 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 ocs: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42585 (cherry picked from commit 7aa5b2a9e7f5f3cd33e72cb1e95790fe7637f10f) --- sys/dev/ocs_fc/ocs_hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_hw.c b/sys/dev/ocs_fc/ocs_hw.c index 186b04b8b129..cfb9d4f8f536 100644 --- a/sys/dev/ocs_fc/ocs_hw.c +++ b/sys/dev/ocs_fc/ocs_hw.c @@ -7759,7 +7759,7 @@ ocs_hw_get_active_profile_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_get_active_profile(ocs_hw_t *hw, ocs_get_active_profile_cb_t cb, void* ul_arg) { uint8_t *mbxdata; @@ -7856,7 +7856,7 @@ ocs_hw_get_nvparms_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_get_nvparms(ocs_hw_t *hw, ocs_get_nvparms_cb_t cb, void* ul_arg) { uint8_t *mbxdata; @@ -7953,7 +7953,7 @@ ocs_hw_set_nvparms_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_set_nvparms(ocs_hw_t *hw, ocs_set_nvparms_cb_t cb, uint8_t *wwpn, uint8_t *wwnn, uint8_t hard_alpa, uint32_t preferred_d_id, void* ul_arg) { @@ -8118,7 +8118,7 @@ ocs_hw_set_active_profile_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_set_active_profile(ocs_hw_t *hw, ocs_set_active_profile_cb_t cb, uint32_t profile_id, void* ul_arg) { uint8_t *mbxdata; From nobody Wed Jan 3 17:50:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0y3xscz56MVn; Wed, 3 Jan 2024 17:50: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 4T4y0y1Qqkz4rsT; Wed, 3 Jan 2024 17:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUElhK05aqPbANr6Fm7Y41Qq+HUZd22Jkp2ACj4oGlM=; b=RrtR15C0T8/Ve9zlubrCKOzp/TRu5a0iC2tX83+VtY69mIyVPJ8ui7HbirywHZXhvVUMMY Mu4au8mbj5ePvUGZeLhXwiRA7iy7iaNuEvEuV1OSAS8XNghbrX6+UvAdgMjGT0AyBihFzz HTHxmzmfZGIze2A+RS3nUAeS0+q/cKN+jX5pk9/B9y49+MG/NY0y+kWa50o+Ze1nPzCj99 kxYajBVewEgNUDP6NPtPYS62O3OZ0Ju9ETxy9jLawW7zvIoxPkjSy1NC93QkCv+j7q0vaX 4uDi3kpCSdSpFLhVhF8iomgv2baaFCS6MSrv4WBMqMJMUFaYViqumrCo3H6blA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUElhK05aqPbANr6Fm7Y41Qq+HUZd22Jkp2ACj4oGlM=; b=Ca8KCh1X4ZkmTlKBGk5mLy232k2B8DTGwpZwsCEGEuxV77b3HpUzCnpUw/SR2rIxKXaZMc 8ttdmZdmoqDuE/Xxiiz4J9iwXQLD+Bp7c8x5ajv//VDLjImo9CfxyxXdkpzYGDBh/l8MUf YY+xHASsmVuiTtL2uTKcCL0JwDIR03Y+1Fj/SU22MYtMBXr6YwDxFM0T2jQMTF4qHxk/oC 7A+XwPxcd4ekweB1ivG37gLYjRn0C8q1x1wX7OAN4oCl5BtZfdE8yKaKlDNROAWLD4hPbe FnDJFUa+I3XZgSoLgEwGwCkizm/WRn6NG7l2Se/qWjUiO2lANe3Mx445yxY9xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304210; a=rsa-sha256; cv=none; b=q8zd4iTJUVbNVxQ2odKk+HqRj0CzD5fehlFuytDtVDtTdPaDrHcYAwe+zzfXt9EzoxOD5P Bcaoac/Yxdn7SeFSoMJTpC3ST/+z2y37EX+nRkej5BlAC2yK0lpmg6mSz6hPdubOYPlPwf xOR1YPxsB8Z4DlULFD0lui5mqy4VoAO6QPliNh5h/daICjHOnoS6rAYd3feIkImY6CmRL0 2QPayQplPnVsAaEBEWTegdupAUDrWf5VBZr9IkuV4Lw2I2q721cTIjsWimcTFooKYXh1yz hRRFyEjGBSwTSd7x1rMH0BKfI8IFov4Ub0IYY9Fnr0GiT2JWrpcFDFYVKUxRpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0y0YDsztWw; Wed, 3 Jan 2024 17:50: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 403Ho9Wi039266; Wed, 3 Jan 2024 17:50:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Ho93g039257; Wed, 3 Jan 2024 17:50:09 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:09 GMT Message-Id: <202401031750.403Ho93g039257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: fd3190c2da0f - stable/14 - sys: Disable -Walloc-size-larger-than for GCC 9+ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: fd3190c2da0fa34139888ed0f82fb49f8011ab47 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fd3190c2da0fa34139888ed0f82fb49f8011ab47 commit fd3190c2da0fa34139888ed0f82fb49f8011ab47 Author: John Baldwin AuthorDate: 2023-11-15 02:37:25 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 sys: Disable -Walloc-size-larger-than for GCC 9+ By default this warns about sizes larger than PTRDIFF_MAX passed to malloc (rather than SIZE_MAX). This doesn't trigger deterministically, but it does trigger for kmalloc() of struct_size() in iwlwifi's iwl_configure_rxq even when struct_size() is changed to use PTRDIFF_MAX. NB: struct_size() in Linux caps the size at SIZE_MAX, not PTRDIFF_MAX via size_mul(). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42587 (cherry picked from commit ede077bf2a259c23923d1ab1231dc8c4577e6672) --- sys/conf/kern.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index dcaacbf831cb..6cc22a44f51e 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -76,6 +76,7 @@ CWARNEXTRA+= -Wno-error=packed-not-aligned .endif .if ${COMPILER_VERSION} >= 90100 CWARNEXTRA+= -Wno-address-of-packed-member \ + -Wno-alloc-size-larger-than \ -Wno-error=alloca-larger-than= .if ${COMPILER_VERSION} >= 120100 CWARNEXTRA+= -Wno-error=nonnull \ From nobody Wed Jan 3 17:50:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y0z3pT8z56Mgl; Wed, 3 Jan 2024 17:50: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 4T4y0z266qz4rnM; Wed, 3 Jan 2024 17:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YyxWeVp2mwrjjeo6EuDy1iDaY3pXQUL2Yqm832VTasc=; b=CZ+wEHNt/8hTg4GnX04sx9G1RVogOE0bPYB9DI/Z088N97t0AAKSU2NyCHrsAzEGxIrJI/ gvczvZIx9kkhwM4vw3ICB08o3CgL2FHYFQPh5JtWkotP5Pxd6WYbGT+0PTYxgWYjEkdWw8 YLp3ff+itE9PJL9+GFAAihb2xiLyWp1E0P0zW1b0+2zU3BhcH3Zi5w7hbTKtJ1x1r5vVEE V0r8hC48nI3Vxp0gKT1oaYplYNcXJdpLFF8vchnkLR+YfsKikosTr6rROlENcji7RKQunF 5TaINxBQCAZlqoqbzm2hqoRm1UbkoWkBkR0+MKFDyBeI5nRIX7BIKE/VyQJg/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YyxWeVp2mwrjjeo6EuDy1iDaY3pXQUL2Yqm832VTasc=; b=gaIJQ99MnWrWLk5KkP+85k/fz8VYO2fIDLO+4vVLhv/xgsqsrlQj3TU64SNCSioYUiwir4 uxynuAhR7SaQzz6wwt8cHw8PlUtR5x5U4UxZ0e5DtUY9o+xbLBiiZOUktmfGGLzYwbS1X9 D/qlPZ15SniLZ2blvr2ohDkk79omBBYYZcWsMSKX6H3rtNsxUWf160wz5UzPpFPMzsOVTP H6G+JOhif7wDq6oM8Dv4Yg1NQMPMkKGiLcMBcOR905Cj4D2UuaFEAhNXqcVv7bjOSkrRpR 6v94W19eFoUmM6kZrZmEKks6f0A1Gqc5PudSTezrYuInk49TUi6k88ruUM/+Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304211; a=rsa-sha256; cv=none; b=bBeHXWAzHoi98xcRFYyJJuQzZCPBOxscJsMhoB8VTflmpi5vrd7VbMZBR0r11dexZ5cs03 mrCymrqqRN8Q5SYPz29wOvQFy+9UCYsSkFTS08Wtxv29Uor1kGWhb0bmEYJ7Fq65odzbKg 6LXw50yNN0ZEVXUc+VGrsTQbZ7Y5vTWGTi2ZhQDzz3YpyLyWMimhsxEP5w21pBz31MJ0Vv 6pBFB+RCB9pSXTUAGHpRSp4yZCGV0r1rxlsZj0Zf3e6x77580vRYE/uWWk03SqtGXMWJ5r 7SyzMJgQVpoiprG4UZfpvrQX+GyRBAVstZXkYEughWyiqOZaw3cL7E7mOb6Cgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y0z1CmPzvLx; Wed, 3 Jan 2024 17:50: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 403HoB9v039937; Wed, 3 Jan 2024 17:50:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403HoBWB039931; Wed, 3 Jan 2024 17:50:11 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:11 GMT Message-Id: <202401031750.403HoBWB039931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bf63f0e7e3ff - stable/14 - qlnx: Fix a couple of type mismatches in function declarations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bf63f0e7e3ffc07bc9de3601cc1d396417051821 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bf63f0e7e3ffc07bc9de3601cc1d396417051821 commit bf63f0e7e3ffc07bc9de3601cc1d396417051821 Author: John Baldwin AuthorDate: 2023-11-15 02:37:06 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:43:48 +0000 qlnx: Fix a couple of type mismatches in function declarations Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42586 (cherry picked from commit be909a79a8e2506b49ed81f9bd8115512dd613a4) --- sys/dev/qlnx/qlnxe/ecore_l2.c | 6 ++++-- sys/dev/qlnx/qlnxe/ecore_sriov.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/ecore_l2.c b/sys/dev/qlnx/qlnxe/ecore_l2.c index 487b56629009..ee7d225540d0 100644 --- a/sys/dev/qlnx/qlnxe/ecore_l2.c +++ b/sys/dev/qlnx/qlnxe/ecore_l2.c @@ -2240,7 +2240,8 @@ ecore_configure_rfs_ntuple_filter(struct ecore_hwfn *p_hwfn, return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL); } -int ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, +enum _ecore_status_t +ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, struct ecore_queue_cid *p_cid, u16 *p_rx_coal) @@ -2275,7 +2276,8 @@ int ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, return ECORE_SUCCESS; } -int ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn, +enum _ecore_status_t +ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, struct ecore_queue_cid *p_cid, u16 *p_tx_coal) diff --git a/sys/dev/qlnx/qlnxe/ecore_sriov.c b/sys/dev/qlnx/qlnxe/ecore_sriov.c index 65df523bb83e..e1198f91e497 100644 --- a/sys/dev/qlnx/qlnxe/ecore_sriov.c +++ b/sys/dev/qlnx/qlnxe/ecore_sriov.c @@ -4925,7 +4925,7 @@ bool ecore_iov_is_vf_started(struct ecore_hwfn *p_hwfn, } #endif -enum _ecore_status_t +int ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn, int vfid) { struct ecore_wfq_data *vf_vp_wfq; From nobody Wed Jan 3 17:50:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4y1d55zSz56MdZ; Wed, 3 Jan 2024 17:50: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 4T4y1d3Qdpz4v1f; Wed, 3 Jan 2024 17:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t+rzkKBVlGKNaOcVIdxSZQqKId/8C7DxNV5xnPo2O/U=; b=NZm8yHn9PP9cWp/LHbX8xGHgC6UO1BssWVnuazaK7Gu5ksHe9WxTxnTj2vB20X3YIMGYoT R9SDnizEdg04rRHp8/+PIDbArV2/YV68yxhguP4oXOFZOJl1p13R2Z7RNun0JOsAglsSCa zfiEvc2BM9pFdDcHXIwms7WJPHBNbMtEbFrHujmUUDEG1RpGf0lze8O0RnkvXUJaZwGFY1 6j9OzhBa+eeK3+pdkSUfEHdZgTXH5W9+G7V3eOKSlijUh7IZXhLGj8CRUPvDw3ClgmK5eu TfLq3IbcQm938dxKamBIDNHv3uQm2jZ/vaBAwa1+dpzC1OuubjGygN3elona4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704304245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t+rzkKBVlGKNaOcVIdxSZQqKId/8C7DxNV5xnPo2O/U=; b=J7IzgJ0mEHYw+7rCCjJSkjUQVw+FkMWV9x6LmWdn+c7lP51JBQd9pO7f2y2EZOKeroXyW+ ODEYNzwNVIM4sZNrGKaZbjBvqW/esIJBhF8UJKPMNiB5JlNR3YBJWad7oV69LZ9RVpQxFN bLwAoauHU9I1fEFs8y851T48jMENkawOFgB0qFBdaS1Xlcun5T6eBLR6O6VqMEjLQkndPT 2lo4yhh6S8lAz4dojZHeAlQKkL1WvfptT5hzAd3B7Owj/dIgjXr5vPSKZz7X3SjfBt+c4N gw78F6+pWs55Z0tS0DPR2nj9SrCZz4ANwivN5NZowhgRczXP7uAoXK67vhlAnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704304245; a=rsa-sha256; cv=none; b=HWQMBdj+uSjaDNnlFgW+Aa+8PpuyNl58hSW+iz/EikCV/T1ZeKZqAR2ZUIhLpIPmRT/4Qv n29/EcsAngpTdHhV6Fbd0psl3HSBQzDICLyOZ6zId2lnIxoj4zGD2dY0i2khx+es/VEVJU Was7XGL6vA9DnHVTlFHw1p6AxSdYDMCk0H80F3kr55QpDxHDFBuKdhDw38PcAQwntkApx3 FkePoG+BQ6qjl1H3JnA9BlyuJrTZZm5xit5ujwvB5jmDrui43qM6jm8JiKR5tyJj6/jQ6g 7nNgPAINu7PdAuP+KzQYEnXJt0GxlpAxY7VOEFqEWYLzoYGMsDdgD3vqbDBokw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4y1d2TTGztsj; Wed, 3 Jan 2024 17:50: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 403Hojc4044106; Wed, 3 Jan 2024 17:50:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403HojZA044103; Wed, 3 Jan 2024 17:50:45 GMT (envelope-from git) Date: Wed, 3 Jan 2024 17:50:45 GMT Message-Id: <202401031750.403HojZA044103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dbeb3fd25d17 - stable/14 - Cirrus CI: Add manual jobs for amd64 and aarch64 using GCC 13 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: dbeb3fd25d17927c35305c7edd256252c7c8fa6d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dbeb3fd25d17927c35305c7edd256252c7c8fa6d commit dbeb3fd25d17927c35305c7edd256252c7c8fa6d Author: John Baldwin AuthorDate: 2023-12-07 22:32:08 +0000 Commit: John Baldwin CommitDate: 2024-01-03 17:50:29 +0000 Cirrus CI: Add manual jobs for amd64 and aarch64 using GCC 13 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42840 (cherry picked from commit 9101746a6cce90314ad03c7ff06398a5f68d0cc7) --- .cirrus.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 345e7ab148bb..3086ee23262b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -53,6 +53,15 @@ task: TOOLCHAIN: amd64-gcc12 TOOLCHAIN_PKG: ${TOOLCHAIN} EXTRA_MAKE_FLAGS: -s + - name: amd64-gcc13 World and kernel build and boot smoke test (manual) + only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' + trigger_type: manual + env: + TARGET: amd64 + TARGET_ARCH: amd64 + TOOLCHAIN: amd64-gcc13 + TOOLCHAIN_PKG: ${TOOLCHAIN} + EXTRA_MAKE_FLAGS: -s - name: aarch64-gcc12 World and kernel build and boot smoke test (manual) only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' trigger_type: manual @@ -62,6 +71,15 @@ task: TOOLCHAIN: aarch64-gcc12 TOOLCHAIN_PKG: ${TOOLCHAIN} EXTRA_MAKE_FLAGS: -s + - name: aarch64-gcc13 World and kernel build and boot smoke test (manual) + only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' + trigger_type: manual + env: + TARGET: arm64 + TARGET_ARCH: aarch64 + TOOLCHAIN: aarch64-gcc13 + TOOLCHAIN_PKG: ${TOOLCHAIN} + EXTRA_MAKE_FLAGS: -s - name: amd64-gcc12 World and kernel build and boot smoke test (FreeBSD repo) only_if: $CIRRUS_REPO_FULL_NAME == 'freebsd/freebsd-src' env: From nobody Wed Jan 3 20:33:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51dD4DGVz56f4C; Wed, 3 Jan 2024 20:33: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 4T51dD3HTWz4Mm4; Wed, 3 Jan 2024 20:33:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zSvnPe/DnRa9iyblx2odWom1e2jEhfrzgKVjwQo9CZo=; b=WTLNDcWI0DWMIUmAIyEMCdIc6kOnxVaDmrp10nK2YVqIny2kTKSugDTMbyUcDTBIYGC0b2 4sjrKJskngY4RwdtnH0uyb2WpMRpcHIXlm27lluQWCVLFu93bWu/ke1bsOw2+sbcPCOSb0 oYycDCVYt0wNeF1TxQ6ZKZA/u5su7jPkHnZuzaete7b9moddjUXx2lsdSKG84sZeBlBaBn 97cMuNHfM1+MSEKQT4vPZ8DOZoB+TYiQTtMccbjblrB91+oK7SLz2rPzhBiNemNj1GBH3R PgfLlOpqbTNaOBcbVvzmaFqIYGyL47wZ7Rjxd/CsCyD68Hizv6AtldbME14XXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zSvnPe/DnRa9iyblx2odWom1e2jEhfrzgKVjwQo9CZo=; b=Y2bAao0xJ5F/NU+jyigaXlhoA3wCb9bSbvQwX3DF9G3RU9n58wFDOGD/IxRX/yj8g/yFWo pp/11yZDQzwfWoACq7EV9KlCQzhMtyqXjJ3zSwBRhpTWpt5M+sqRdHHB9WHA5rKdrZ23fr sbWbY/OHKGZpWnGQTRIY0Pz4YeOjd+bOzR4EFobfO8qK37yF/o5xxU+TvD880p0NyKDV/2 tUU3oqgCb0IBvVmaZoJbmNgBPUVzDjGyN0JhfiFCdkUmarIrsmBeCKR1E/mJiTrxv/RTmo JQLgruWn0zSdQQnOHNWpAv0ZLDhs6J49rv3/iFib0i7blNH6jfSJIFRAsSJsaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314000; a=rsa-sha256; cv=none; b=nbKgc+N7G+fSnZOaPQu4L7imTWC+zBM9m7+5UU2ljYe88HMa4mvWizLSdiArTk8mjkRQ63 BkJd3lqoBfHQrF+moBHyCmuiIZC4V5PIefELNnUXGNw30Lrq+sY6IELwRI+/ck6Uwy3cFq Uxu9EWw23EsZyTaxgtze6V4iPxgAa2AuKV1jDU7fhqAgIuZiyCXM0uifJbeRQTkHMiW+cd PH4BfOqFpNlkkL7mZX6l1LFCNB+QYTzbXVPMnVHH5HiQuKAFxhQUnACZiMb0Ry6x5Nx38v MoCYzOrEXIXPGt9FIYwU9AWBnDqnQp7HEdiy5xyJMwfkWy9I39tvnHxonUhvLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51dD2KnNz103D; Wed, 3 Jan 2024 20:33: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 403KXKCS020541; Wed, 3 Jan 2024 20:33:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KXKLB020538; Wed, 3 Jan 2024 20:33:20 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:33:20 GMT Message-Id: <202401032033.403KXKLB020538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b636e35bb724 - stable/14 - vfs mount: Consistently use ENODEV internally for an invalid fstype List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b636e35bb724b9c777fed6c7cf4a713d14316f36 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b636e35bb724b9c777fed6c7cf4a713d14316f36 commit b636e35bb724b9c777fed6c7cf4a713d14316f36 Author: John Baldwin AuthorDate: 2023-11-18 19:08:34 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:18:44 +0000 vfs mount: Consistently use ENODEV internally for an invalid fstype Change vfs_byname_kld to always return an error value of ENODEV to indicate an unsupported fstype leaving ENOENT to indicate errors such as a missing mount point or invalid path. This allows nmount(2) to better distinguish these cases and avoid treating a missing device node as an invalid fstype after commit 6e8272f317b8. While here, change mount(2) to return EINVAL instead of ENODEV for an invalid fstype to match nmount(2). PR: 274600 Reviewed by: pstef, markj Differential Revision: https://reviews.freebsd.org/D42327 (cherry picked from commit 3eed4803f943e2937325e81140b88e2e8eea8deb) --- sys/kern/vfs_init.c | 4 +++- sys/kern/vfs_mount.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index c57e1471e356..64263caaef98 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -149,8 +149,10 @@ vfs_byname_kld(const char *fstype, struct thread *td, int *error) loaded = (*error == 0); if (*error == EEXIST) *error = 0; - if (*error) + if (*error) { + *error = ENODEV; return (NULL); + } /* Look up again to see if the VFS was loaded. */ vfsp = vfs_byname(fstype); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index c42fcfa7537b..c36fda4e8a9e 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -996,7 +996,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) jail_export = false; error = vfs_domount(td, fstype, fspath, fsflags, jail_export, &optlist); - if (error == ENOENT) { + if (error == ENODEV) { error = EINVAL; if (errmsg != NULL) strncpy(errmsg, "Invalid fstype", errmsg_len); @@ -1086,7 +1086,7 @@ sys_mount(struct thread *td, struct mount_args *uap) vfsp = vfs_byname_kld(fstype, td, &error); free(fstype, M_TEMP); if (vfsp == NULL) - return (ENOENT); + return (EINVAL); if (((vfsp->vfc_flags & VFCF_SBDRY) != 0 && vfsp->vfc_vfsops_sd->vfs_cmount == NULL) || ((vfsp->vfc_flags & VFCF_SBDRY) == 0 && From nobody Wed Jan 3 20:33:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51dF4rthz56f4G; Wed, 3 Jan 2024 20:33: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 4T51dF4DCBz4MdW; Wed, 3 Jan 2024 20:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fmMp6S86/pIb9iRMME46+zwxvEeqBAOMQ9jM86AaWzA=; b=mAz7sDIyAAenDFefpd6V+yMJobJABE6STg0aAoiE+1NKkabqRuVkTc5ht0eCG+7iws0WfM Mg+zMYMe0lG9u1eN8C2PGa+VZVyurxfz5iIBZjvt+anMV+DlQdLhD1KiGYTErcY+F9ECBm Mu8/DHCXNRj4PUXKr6P9/o5Nbn9OaB7MXhI/pL3pkEyt0MZNyDqxxeBPcZxqsy/XTx9QCd GQNKKDxYlAaMDWnbAkpDEK7QZVDY7strJqRTr+CrKSOMju67rw4h2uTrW2S/AVZzzVvjHh xO/S3m4/X+KNA1nsrlT8zKy8uN2dPcoxtUJrEonEZbVo4up/7QwZuH8arAp3RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fmMp6S86/pIb9iRMME46+zwxvEeqBAOMQ9jM86AaWzA=; b=e6ouXrkTxa4OdzO6FrbPRU5hsuzOxlL/UD9yQD0Pg3D7J+xwTxwTxBRQ/3u+nSmUFeSCGk y/uRe7SSfA9NakOJvRF+LdZbz1sAp6XjZD8LB5SZoQofgl3LZ2Jfs19QzHg6NWj1yIMjJq d2eru10CwaJRbMMaPqpsPjsCpEJrcGSTjw7sgmSvN8hIANY7ZBU+uLgOZHuOlXRyFL+112 Pe+ZDCQ5xNq3g+2dKWLyzDRFv6RAz6lriGFTx2UvBe+1YW3q6qw0Ps7V3YNRaab+p1XnYG PQU+omLxhz/MvfNNgg+pMW1F/iJ4zFfnBo4Lwgtynsz8ejT6pETCJS0SXNevGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314001; a=rsa-sha256; cv=none; b=r5YLEjvr3Xc5bcaUqVb0rFY+AkslsfsbKB3WlbZloxNLJfFF6JNzDvByEnsespVCOKEI+T mWbOG+2EH44PgPxPWsLuAiFMrzYwvPEPo6jM6J4cv3sx+UQZRsFADvJPd1sMLTr6JUpSfV o2K5I16hXYivReWsZqJRgIMq/oZfLf5UIXmtLr34hsHJQpXOhSrzqO8ub26gL20zJhCV7b tBdVWbSsT9y8Ku/vQA9n00cGTbGeCdmMYhUm2nNfxJ6kXQgeuMXGujik3vSSTOF7bMpBUI acde9Lzjzdl2U6UWMLCy0mWUtJXdG65XvZLuy0sExJ7CslqP8kHcNW/13L21XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51dF3J59z10gB; Wed, 3 Jan 2024 20:33: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 403KXLIa020601; Wed, 3 Jan 2024 20:33:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KXLMf020598; Wed, 3 Jan 2024 20:33:21 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:33:21 GMT Message-Id: <202401032033.403KXLMf020598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 904ebc903cbe - stable/14 - bsdinstall zfsboot: Don't override ZFSBOOT_FORCE_4K_SECTORS if it is null. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 904ebc903cbe4f528a7e65f694d11cbdebcc353a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=904ebc903cbe4f528a7e65f694d11cbdebcc353a commit 904ebc903cbe4f528a7e65f694d11cbdebcc353a Author: John Baldwin AuthorDate: 2023-11-18 19:18:29 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:18:50 +0000 bsdinstall zfsboot: Don't override ZFSBOOT_FORCE_4K_SECTORS if it is null. Only set a default value of 1 if the shell variable is unset. This allows installer scripts to disable the variable. PR: 274513 Reported by: Albin "a12l" Otterhäll Differential Revision: https://reviews.freebsd.org/D42319 (cherry picked from commit de82aed1192470574a08d3e479d81c4c1280487a) --- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index a671841b15e5..e7fd59d5c8b3 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -71,7 +71,7 @@ f_include $BSDCFG_SHARE/variable.subr # # Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors? # -: ${ZFSBOOT_FORCE_4K_SECTORS:=1} +: ${ZFSBOOT_FORCE_4K_SECTORS=1} # # Should we use geli(8) to encrypt the drives? From nobody Wed Jan 3 20:33:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51dG6WBrz56f9Q; Wed, 3 Jan 2024 20:33: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 4T51dG5HP9z4MjT; Wed, 3 Jan 2024 20:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGbhwwfxQFVioYpocsoRPZG+f1vewgmOEeuJSbIysU8=; b=rWpQJuCQD/BR61KTjjGwmSjKynP610dyzv47Ono/X+y/hOtJDAHjGOyfk+8XqpbuWH5cAG dPf/LT9z6OPIk7fui26Fgg1l3GIXCsj7ZpUAB8qC3bmO76WLOvRb5S3cUNvJJecqe1uPkN xxAGoKYV9+OmHyDdKJvxA4yQhWOU9x9bjlX8zAHzq1h0obh452YNxEZP8OHhyEH4A7ZirJ owd0EG2IdMKIXpAomtzIgO1HYNvNUiMyEHYg2pVXiCyOVlEgPIUM2E5WflfnzR9agE+8Mo Nwpa6GFzExTegQn9d5BUV4tEddtghqNXOFnmrDNM0ueRqiwEUoVwyaaDzYGLvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGbhwwfxQFVioYpocsoRPZG+f1vewgmOEeuJSbIysU8=; b=Y2joHe9KYgSbhPb/4C2qxrsVivQU6PhEt0UCq3wbz2mtsiNHUgmbbpLnuJQmU/Oa7BmBzN 9wCmAxTQ2nEr40REwhzUEFubE/uXhtytx/MDrNvMcoquX4CEJxGwXk6DYqBmsD/R5ySQUp WByBxB1TBiCbBjiyMj3AwE8VIkMpqx0Rqmfn5Z4YW4jHaqd+xoWtQeU2G7rMLhcAa8lIAm wJPP1tvOwTJVHtV32p2gvmuXupn1Lu63sW6mlU24AmduF3FnqWLOoS7sElrXn1V/elTp0I YdOH+r4Nzvg/hLboavCpXLzdC9zM1UPevR8Fzv1TYbgBdxsbM4LdryPxx9bD1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314002; a=rsa-sha256; cv=none; b=b/3eIdt+1X3tTWa13fVBTjMQ6WnVaVAHwNOzKNt+eRoGhfZ/Fg3hTGQJ3ok5q0VlfcE5Gm dePWKMFw3G+0DiEXVp+Mcs8EvOLa/2NpNPlqnLkubS6EhEozwDRF1T5bQjhd6Xe/daErnS h24l5q8sv/2XhvLjYBfHy1e3CQ0M5E6JSvUW0xyArz6suacljHxPbu55LdBnC9N8Dr4w9S 0g06G8spi92Sx6y5aBC348SA4YIn1ZCM5mdtSg++tuBSftvOzG8PZILWj8Rr2XrS4m1Vxe 7emGVfUR3iRi+KfZkwEWkzB3FrXPCWAFP6xojtDW8OLvwSOkqYtjTXWjtlozdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51dG4Jttz10VY; Wed, 3 Jan 2024 20:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403KXMRk020647; Wed, 3 Jan 2024 20:33:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KXMcl020644; Wed, 3 Jan 2024 20:33:22 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:33:22 GMT Message-Id: <202401032033.403KXMcl020644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bbfd69760203 - stable/14 - bsdinstall.8: Clarify the description of ZFSBOOT_FORCE_4K_SECTORS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bbfd69760203a7ee0532e96cbb7e69ec6ee7118b Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bbfd69760203a7ee0532e96cbb7e69ec6ee7118b commit bbfd69760203a7ee0532e96cbb7e69ec6ee7118b Author: John Baldwin AuthorDate: 2023-11-18 19:31:07 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:18:56 +0000 bsdinstall.8: Clarify the description of ZFSBOOT_FORCE_4K_SECTORS This variable does not set the exact sector size of the pool, but controls the minimum sector size. The sector size of the underlying disks can always be larger than the minium controlled by this knob. PR: 274513 Reported by: Albin "a12l" Otterhäll (cherry picked from commit 84f773037ee4fc78585501a2ce2f5398f0bae9f4) --- usr.sbin/bsdinstall/bsdinstall.8 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 77da9622d4d7..c8bf143322ae 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -23,7 +23,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 18, 2023 +.Dd November 18, 2023 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -433,8 +433,11 @@ or raidz3 (RAID-Z3 Triple Redundancy RAID). Default: .Dq stripe .It Ev ZFSBOOT_FORCE_4K_SECTORS -Indicates either the pool will use 4K or 512 sectors. -If this variable is not empty, 4K sectors will be used. +Controls the minimum sector size of the pool. +If this variable is not empty, the minimum sector size is 4K. +If this variable is empty, the minimum sector size is 512. +Note that the sector size of the pool will always be at least +the sector size of the backing disks. Default: .Dq 1 .It Ev ZFSBOOT_GELI_ENCRYPTION From nobody Wed Jan 3 20:45:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51vJ3qbGz56fvs; Wed, 3 Jan 2024 20:45: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 4T51vJ3NqWz4PLy; Wed, 3 Jan 2024 20:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYUeceX4e4/3/SyKCT/7TRkwIa97c//G7hx4YMuoF9s=; b=LugaP9clM4W/2t9DpMcI5g8xMHQ8RrOfaZeEIsxUSWd+HyJFywX50FK3mKAst4Ohe/O/s+ +QA9G5r1ynaXa550mA0i4MIvrRRUJyBC0EnzZJL+FSPL+ilXt3c6tdVYjOLbl+dwHMH2p2 PC9Iprwi1tGgKBWiZkpAThSQeBKUAg9xcZ4XQVIvoohHTuHG5EW1GEbz4frhsrskVnyQ6m IyWmyK31bZ4sF7+UgibIa5RrkdoFyHr0FFNxTHiFXSK61e4XlV6FnUKERqd6GTnLMY09/C dvgltj9/GRxQ2M+XXFNzPpELytL2x6m6DhA3hwSKQ5xnJiYNQuVFxWA1HCQCqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYUeceX4e4/3/SyKCT/7TRkwIa97c//G7hx4YMuoF9s=; b=wjGxgCC4p3aQB8FTGeUe7pzvUkqmj8cqFbifYrQpkX8KCIYwhDHyO/xYjwtQwXx+mRY/kH d7qCCI+I0OkXZ42Xqz8zP5moyAXBZDplgfl0CnPpdUcG70H7pnSMVZFa8uhLECKJ3dGnHd f/QMfHDW8s2LKXA5iAHQ/4k8cREEebkmeaBhxzKot7vfCYxmeZy9v2i5MpO/ri2msdIoIJ J480pU+laCOmAFVbr1UJBpsvTIU8ibNfS+Tw8pC9d0fZFW3UFjF4yEJGvlBJuPwXoWDqxz NJ8gipfAyPU1yfHVGUpDvDw17o9rELQhphy+m5zV/+Z/ONH+x4Wpo9jl2fqClA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314732; a=rsa-sha256; cv=none; b=nuQaGubfdnhmSi39H98S3p5teLvwnhrjWab0oO8V9cc8k4J3fLBFOds/Z9MvvsYoQfCTjN IDzWBTFJ7AAAkMVs2RFNDXHkTwBu3TNQQ0lKZN7iiZdAz62kZ/60rbx6JhnTnQ0pdgDJon Zw2AHC1cU418qcYQmZAiU7V9YmeUGKYIfyfc1o8rLCnWu4BzdNV5831Pr2GyvMB2YjQfX4 U/iObp1VD8nBxvRzHRJLMr0D9CRMMVVmGNyNM5osANGsoKDNAgdY0jI39uAAwBSYClwMjE P/TM0NKZ5hy4gTWu8VXFJq/4rLQ8mjs/hjpqBJKJSEaTidiCdcf3OhNU+8Ji9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51vJ2Rxlz10pb; Wed, 3 Jan 2024 20:45: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 403KjWrW037307; Wed, 3 Jan 2024 20:45:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KjWqM037304; Wed, 3 Jan 2024 20:45:32 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:45:32 GMT Message-Id: <202401032045.403KjWqM037304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a4c3fdf96d15 - stable/14 - gpiobus: Use bus_generic_rl_* methods List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a4c3fdf96d154377f65571c3a3d5e58048f8ef92 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a4c3fdf96d154377f65571c3a3d5e58048f8ef92 commit a4c3fdf96d154377f65571c3a3d5e58048f8ef92 Author: John Baldwin AuthorDate: 2023-11-22 17:06:22 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:33:51 +0000 gpiobus: Use bus_generic_rl_* methods Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42715 (cherry picked from commit a19ed3495d5556281ea39995d962b93a637183f0) --- sys/dev/gpio/gpiobus.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index be2fef549460..65e8d1a775fe 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -755,24 +755,6 @@ gpiobus_hinted_child(device_t bus, const char *dname, int dunit) } } -static int -gpiobus_set_resource(device_t dev, device_t child, int type, int rid, - rman_res_t start, rman_res_t count) -{ - struct gpiobus_ivar *devi; - struct resource_list_entry *rle; - - dprintf("%s: entry (%p, %p, %d, %d, %p, %ld)\n", - __func__, dev, child, type, rid, (void *)(intptr_t)start, count); - devi = GPIOBUS_IVAR(child); - rle = resource_list_add(&devi->rl, type, rid, start, - start + count - 1, count); - if (rle == NULL) - return (ENXIO); - - return (0); -} - static int gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { @@ -1075,7 +1057,9 @@ static device_method_t gpiobus_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_config_intr, bus_generic_config_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - DEVMETHOD(bus_set_resource, gpiobus_set_resource), + DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_alloc_resource, gpiobus_alloc_resource), DEVMETHOD(bus_release_resource, gpiobus_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), From nobody Wed Jan 3 20:45:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51vK4yzqz56fkS; Wed, 3 Jan 2024 20:45: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 4T51vK4397z4PmN; Wed, 3 Jan 2024 20:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=in2LyiGVs3MFOUHxv92jTh3JPoQcfb0DRG3rQ9qddzw=; b=q1fmmPJS/dpFBVkUAPrCqqWv11iKg508oid6fCgjAZpPDcf1JhAnCLsc4PYJ3h5Gfw+v7W DB/NTHN6MVPdL8SnHLqWgiwBws5BRPHH//rWb+pYuBWsHIvDKutGpdb3sNgtIRSAjci2AR 4apv1jAT6BBl8BqXcrthllIaEyD2JQoQH+ROD0e9f2j2jEA/0KLAA0mbMlbBqAjGouyV07 4pXr1fPVWU5WeWO7I3Z1u6M/AQRfsSL83JBZ54a3pcakkSJOPjfb7Qekb8lfX+kQ77GSaF FBfx7W8Mly//uiTxsZ1t/su83Ud8P3UeRKudyxti6CoG3DfW7h1fNqqh2KVy3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=in2LyiGVs3MFOUHxv92jTh3JPoQcfb0DRG3rQ9qddzw=; b=x5Z6/3r1B8kyrhFapt9oAh6G2bM4nXHaxj+4CnKK2u/OqOdEhElrlGcle/qd5Y/Yyj+XA8 zgnTzddAnQwNchcEDSsVsuRIrDGOD/GabCdibB+y0HinLDuoejSqZMCjln1xRVUSg1RAa/ 7vucQJtvmoVXT1FPjrA/cEkPY9GgypzfRlfkhoIdL/sJNOKhYrH//yzMGdY8cByvh81ota 68tPj9Bv386N93fIn4e46aNX5Q3uFYDqVJa/vKB6kyEy2VgSG72CJaCR9aUKd4CqsHmFmL 9Dpr3qa7iJqmnS2JzOYUdfh4zNhjNPTVZXiyIRX56i8Ou20AOz3bLQ5GIenXOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314733; a=rsa-sha256; cv=none; b=sdk2Ywj0aJ2v4DSaK/GF5RMr5mSxeMWMRwZOl9LnfM+4QMgsld4rvwFAwkIL2RjY/vZppe 8uouL0S+S9iOHtmC0UJnCNg/VREluJS0U6z1pX6n87LdoJolqsp7pEWdygAelR1XNJ44/p /hbGfD8NWbRA1oJnhnljnIvbgDB8VCdwbBxSZ+1m6Ymgn1gA0J1+7BAbgPrg15GAUeMcZu w3ma9qZOYeddAgY3WBZxMMSu+yB/Uy9lAvWqfbThPCemnaSmdQsAB93GBFV1DUZIuQh5Za Z1R1PQsJ4B/iI0HlJLbBX+WmY9pk4F1N3ffKl2u9CT/XJFlVEqCnJmMkHpJWFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51vK36czz10mn; Wed, 3 Jan 2024 20:45: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 403KjXQX037352; Wed, 3 Jan 2024 20:45:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KjXXa037349; Wed, 3 Jan 2024 20:45:33 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:45:33 GMT Message-Id: <202401032045.403KjXXa037349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 30ead05708ae - stable/14 - arm64/amd64/riscv nexus: Use bus_generic_rl_* List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 30ead05708ae4fc488cb2afa3924a329fab7c7ba Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=30ead05708ae4fc488cb2afa3924a329fab7c7ba commit 30ead05708ae4fc488cb2afa3924a329fab7c7ba Author: John Baldwin AuthorDate: 2023-11-22 17:06:33 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:33:59 +0000 arm64/amd64/riscv nexus: Use bus_generic_rl_* Reviewed by: mhorne, imp Differential Revision: https://reviews.freebsd.org/D42716 (cherry picked from commit ecf2106c0701e522b8c643f8ea37550b3e58ba57) --- sys/arm64/arm64/nexus.c | 16 +--------------- sys/riscv/riscv/nexus.c | 18 +++--------------- sys/x86/x86/nexus.c | 48 +++--------------------------------------------- 3 files changed, 7 insertions(+), 75 deletions(-) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index b9871f0e9b3a..2394ad912391 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -112,7 +112,6 @@ static bus_deactivate_resource_t nexus_deactivate_resource; static bus_get_resource_list_t nexus_get_reslist; static bus_map_resource_t nexus_map_resource; static bus_release_resource_t nexus_release_resource; -static bus_set_resource_t nexus_set_resource; #ifdef SMP static bus_bind_intr_t nexus_bind_intr; @@ -139,7 +138,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), - DEVMETHOD(bus_set_resource, nexus_set_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif @@ -433,19 +432,6 @@ nexus_get_reslist(device_t dev, device_t child) return (&ndev->nx_resources); } -static int -nexus_set_resource(device_t dev, device_t child, int type, int rid, - rman_res_t start, rman_res_t count) -{ - struct nexus_device *ndev = DEVTONX(child); - struct resource_list *rl = &ndev->nx_resources; - - /* XXX this should return a success/failure indicator */ - resource_list_add(rl, type, rid, start, start + count - 1, count); - - return (0); -} - static int nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index 48878807bb7e..2e693e6cf655 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -86,7 +86,6 @@ static bus_alloc_resource_t nexus_alloc_resource; static bus_deactivate_resource_t nexus_deactivate_resource; static bus_get_resource_list_t nexus_get_reslist; static bus_map_resource_t nexus_map_resource; -static bus_set_resource_t nexus_set_resource; static bus_release_resource_t nexus_release_resource; static bus_config_intr_t nexus_config_intr; @@ -113,9 +112,11 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_map_resource, nexus_map_resource), - DEVMETHOD(bus_set_resource, nexus_set_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_describe_intr, nexus_describe_intr), @@ -395,19 +396,6 @@ nexus_get_reslist(device_t dev, device_t child) return (&ndev->nx_resources); } -static int -nexus_set_resource(device_t dev, device_t child, int type, int rid, - rman_res_t start, rman_res_t count) -{ - struct nexus_device *ndev = DEVTONX(child); - struct resource_list *rl = &ndev->nx_resources; - - /* XXX this should return a success/failure indicator */ - resource_list_add(rl, type, rid, start, start + count - 1, count); - - return (0); -} - static int nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index c90a8d252845..4896271b92bd 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -101,12 +101,9 @@ static bus_activate_resource_t nexus_activate_resource; static bus_adjust_resource_t nexus_adjust_resource; static bus_alloc_resource_t nexus_alloc_resource; static bus_deactivate_resource_t nexus_deactivate_resource; -static bus_delete_resource_t nexus_delete_resource; -static bus_get_resource_t nexus_get_resource; static bus_get_resource_list_t nexus_get_reslist; static bus_map_resource_t nexus_map_resource; static bus_release_resource_t nexus_release_resource; -static bus_set_resource_t nexus_set_resource; static bus_unmap_resource_t nexus_unmap_resource; #ifdef SMP @@ -145,12 +142,12 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), - DEVMETHOD(bus_get_resource, nexus_get_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), - DEVMETHOD(bus_delete_resource, nexus_delete_resource), + DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), - DEVMETHOD(bus_set_resource, nexus_set_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), @@ -645,45 +642,6 @@ nexus_get_reslist(device_t dev, device_t child) return (&ndev->nx_resources); } -static int -nexus_set_resource(device_t dev, device_t child, int type, int rid, - rman_res_t start, rman_res_t count) -{ - struct nexus_device *ndev = DEVTONX(child); - struct resource_list *rl = &ndev->nx_resources; - - /* XXX this should return a success/failure indicator */ - resource_list_add(rl, type, rid, start, start + count - 1, count); - return (0); -} - -static int -nexus_get_resource(device_t dev, device_t child, int type, int rid, - rman_res_t *startp, rman_res_t *countp) -{ - struct nexus_device *ndev = DEVTONX(child); - struct resource_list *rl = &ndev->nx_resources; - struct resource_list_entry *rle; - - rle = resource_list_find(rl, type, rid); - if (!rle) - return (ENOENT); - if (startp) - *startp = rle->start; - if (countp) - *countp = rle->count; - return (0); -} - -static void -nexus_delete_resource(device_t dev, device_t child, int type, int rid) -{ - struct nexus_device *ndev = DEVTONX(child); - struct resource_list *rl = &ndev->nx_resources; - - resource_list_delete(rl, type, rid); -} - static int nexus_get_cpus(device_t dev, device_t child, enum cpu_sets op, size_t setsize, cpuset_t *cpuset) From nobody Wed Jan 3 20:45:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51vL6Qrxz56g1G; Wed, 3 Jan 2024 20:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T51vL57JMz4Pbl; Wed, 3 Jan 2024 20:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pKgmtfNJ7Oy/Rz+j7hHg459e5VWQrrWmm1x0H/lgRPE=; b=f8l6SdIoiRUeQa4JJrRFkft7Ve6CZTgr1ylFl34ARk7hiHGQiWoYv+2rlWcealuUCkk7DJ g39k/vr00kqBfF2bcWX3km+i3LMJyMN2Q9GGq9+HhpjiIYiIsPT4rFTRn0poJw694IER23 6sCNzZgkRKGN3v9aeLw8D/scNDzVt3FfES/LO4YFZs0Ygx+mzSNLHm4bGSys+0PtX809s/ YdWDPyluvdR34X5P3kYhdkqcvh9vCDJLJlOGn0in5LK0OdAlfTkmCBzSvFD+phHiiJshpZ uAfK0m4HpUGxEojIodgf/gkJ6bN7vSUzGvMgh9iwbt+0qqXtTipsusu7hcx4tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pKgmtfNJ7Oy/Rz+j7hHg459e5VWQrrWmm1x0H/lgRPE=; b=kPwHGz1iboQE/MMMovVcGRTBPqVghHLsdWX9tgQK5ghSpNWY4vsNpFzwlgCr3haj1CUap8 d0X2+zzZEZ4SBMfjpKplW78PyhFTidIRMmdFGXakGQlBHeIEPebZXbXWxAfFPzXrjHrlKu 0mzFeMrzTXM3Z49EJ9plzsOJtunpJkR8jmTcIdWHDC3iSfVFGoEq7CV/lzceD1sKcqW0q2 OFKQ9M7a3TXddjWx7r7dJ6DqgJwJLLkHlhL7yTkl9JyxX1Ghnkgen9rFCWM+S2XLl6ZXFE OOegk3rlcnKntuZvA87mLW/GSCC2abpEbwMKw1HSZ+EOH93jHW/l5phdM1PJ5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314734; a=rsa-sha256; cv=none; b=fdKMPJPpw8/AT2gu4l00rOa4z9DTmP8/4gkq1bd/j3haAqaoYYlxWTRJs+GOh4qJ61OWct toB/dpfVJopnuPbFD9xdeFgP0vNMUrzOzDCuffk/bV1pcXAIEvLT9mfyLcc1qJ4fcwDWeK 2NMr7yDJLejKSnoOAUnTdFN84hsV2M2ZH3a7cgmUi2flSSctjJayIS5aVxQotyDxWAxX7O E0aV9rqde3XIMuFO4S6VeG3RkT0Fnu0UZtRHwR6QcaSFSoOuNo00vXc3m5tiQaA0/i6bHp RbvB+V4uoH1K+miALvfhqJGXC2nqAskaNTnjoqWyHx6CrIAelEpubv3lQiHIUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51vL47HHz10yf; Wed, 3 Jan 2024 20:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403KjYQA037399; Wed, 3 Jan 2024 20:45:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KjYDk037396; Wed, 3 Jan 2024 20:45:34 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:45:34 GMT Message-Id: <202401032045.403KjYDk037396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d9c1d04ad59e - stable/14 - new-bus: Add resource_validate_map_request function List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d9c1d04ad59ebc0ee33883f0f6b681206677414b Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d9c1d04ad59ebc0ee33883f0f6b681206677414b commit d9c1d04ad59ebc0ee33883f0f6b681206677414b Author: John Baldwin AuthorDate: 2023-11-23 17:06:24 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:34:11 +0000 new-bus: Add resource_validate_map_request function This helper function for BUS_MAP_RESOURCE performs common argument validation. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42723 (cherry picked from commit 19f073c612afa0111d216e5ccab9525bfc97ec32) --- sys/kern/subr_bus.c | 31 +++++++++++++++++++++++++++++++ sys/sys/bus.h | 6 +++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 8caab20cf709..1a73df25ff34 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2715,6 +2715,37 @@ resource_init_map_request_impl(struct resource_map_request *args, size_t sz) args->memattr = VM_MEMATTR_DEVICE; } +int +resource_validate_map_request(struct resource *r, + struct resource_map_request *in, struct resource_map_request *out, + rman_res_t *startp, rman_res_t *lengthp) +{ + rman_res_t end, length, start; + + /* + * This assumes that any callers of this function are compiled + * into the kernel and use the same version of the structure + * as this file. + */ + MPASS(out->size == sizeof(struct resource_map_request)); + + if (in != NULL) + bcopy(in, out, imin(in->size, out->size)); + start = rman_get_start(r) + out->offset; + if (out->length == 0) + length = rman_get_size(r); + else + length = out->length; + end = start + length - 1; + if (start > rman_get_end(r) || start < rman_get_start(r)) + return (EINVAL); + if (end > rman_get_end(r) || end < start) + return (EINVAL); + *lengthp = length; + *startp = start; + return (0); +} + /** * @brief Initialise a resource list. * diff --git a/sys/sys/bus.h b/sys/sys/bus.h index fc07cf70f78a..88ae4000004b 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -317,6 +317,8 @@ struct driver { KOBJ_CLASS_FIELDS; }; +struct resource; + /** * @brief A resource mapping. */ @@ -341,12 +343,14 @@ void resource_init_map_request_impl(struct resource_map_request *_args, size_t _sz); #define resource_init_map_request(rmr) \ resource_init_map_request_impl((rmr), sizeof(*(rmr))) +int resource_validate_map_request(struct resource *r, + struct resource_map_request *in, struct resource_map_request *out, + rman_res_t *startp, rman_res_t *lengthp); /* * Definitions for drivers which need to keep simple lists of resources * for their child devices. */ -struct resource; /** * @brief An entry for a single resource in a resource list. From nobody Wed Jan 3 20:45:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51vN26Bvz56fkX; Wed, 3 Jan 2024 20:45: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 4T51vM60QQz4PMR; Wed, 3 Jan 2024 20:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nlB0uatRuDhQw7GSA0rnFAQizxJsUE8tteVmr8uoGI0=; b=Qs0r4wEYXZz5lfbnxVBLJvPBFfpA5Gy3xW60uarF8Z+6Zead9WG/Xn4s1i8qynvR7oZWvO RTbQoFNy76QdS6wIDbEArl51zyj3OxMwU645SO3DqEMQTATB2XpIN9gJltdiOuqFfYSxQz OCtU+DBJAv5sdi8bIksmv9HRkPlF8lDL1hhcfP/n13IAYdT6+4EqCJO4lhVNz/GaaxBc+Q NQybuPrCYl8nomXyx7BrwOdN4mrxegP8Kqvp8OUk3UGG6lHs9uPG54HEhl1XutBt+G1g/g taHnvl+I4Y+2SdRhdi7Y68c4eqePIQDAI1Sz83Ja2P6IoOVZMQBpQlB02AAttg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nlB0uatRuDhQw7GSA0rnFAQizxJsUE8tteVmr8uoGI0=; b=SMPq5Q8dvjct4R2G1O2QqZv/zvGraqDxuVXRfGiXz4t0Y0x9fCoLkcL+GhzdDxhi2St3pm XlCEIsjkIxs+OKPkffpHYv7jdFExej0l3kODlGtiskSVrX9tSaI/OsruH3BFyzcYuvjMLD DSHSIub/9X0EON57Dp+aW5DLhRlZwCN9jC5cdKEvOXUIRBwpV+YxQwP74BQkeWyrXvL5cT sLaa/ybqs7LtgnOlbvowTsv3wLciokQaMewB5VcaWhfCQd9Ucy6UzEuypq/MxTqzdBtIp7 dTjae4X7oAniMnzrjJRkOHm7hdZ107TMRL1O8m6zPulk5YZzCmZMu3zG6f2sPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314735; a=rsa-sha256; cv=none; b=hG5ER9Eft8JD96L/Q+8bkAjeiLnQWS0+2BNcXUMrsPHtbGAI7cWykaRaDS4WmWa3l5S4hO 1G2qgZvG2XRmLAZNeZrpKqHGda1knXX3IA8lK1CY4Ka9/8OcYzWm1BWxscB37RTRgBkITi 7RiW/L/L9pKcSdC5Tcrr6P1A6pucAO2MLEMCGq4ac/BmXq6MfkzGJ+I0RuO7baMdfWQdaT mhULqNKpdLe7/YOem7GBYH15kOhZIh7o9kzwnoqvEWxhkDOoekVULEzAnznXkSAAQN9rSy 2tRlhH9+m2gBnm2GaVG/BC4NT7UDIGexvY0m+KdZi5afU0Hy+ve3PxgkM0AQwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51vM56Msz10yg; Wed, 3 Jan 2024 20:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403KjZQV037438; Wed, 3 Jan 2024 20:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KjZBV037435; Wed, 3 Jan 2024 20:45:35 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:45:35 GMT Message-Id: <202401032045.403KjZBV037435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3125b3e82c73 - stable/14 - nexus: Use resource_validate_map_request List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3125b3e82c732c65c4e0f3dd230b10e9b21e3af8 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3125b3e82c732c65c4e0f3dd230b10e9b21e3af8 commit 3125b3e82c732c65c4e0f3dd230b10e9b21e3af8 Author: John Baldwin AuthorDate: 2023-11-23 17:06:37 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:34:20 +0000 nexus: Use resource_validate_map_request Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42724 (cherry picked from commit b887b665ebc044f246d261e8af543765b846ed38) --- sys/arm64/arm64/nexus.c | 18 +++++------------- sys/powerpc/powerpc/nexus.c | 22 +++++----------------- sys/riscv/riscv/nexus.c | 18 +++++------------- sys/x86/x86/nexus.c | 18 +++++------------- 4 files changed, 20 insertions(+), 56 deletions(-) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 2394ad912391..25d23f74d92b 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -460,7 +460,8 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, struct resource_map_request *argsp, struct resource_map *map) { struct resource_map_request args; - rman_res_t end, length, start; + rman_res_t length, start; + int error; /* Resources must be active to be mapped. */ if ((rman_get_flags(r) & RF_ACTIVE) == 0) @@ -476,18 +477,9 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, } resource_init_map_request(&args); - if (argsp != NULL) - bcopy(argsp, &args, imin(argsp->size, args.size)); - start = rman_get_start(r) + args.offset; - if (args.length == 0) - length = rman_get_size(r); - else - length = args.length; - end = start + length - 1; - if (start > rman_get_end(r) || start < rman_get_start(r)) - return (EINVAL); - if (end > rman_get_end(r) || end < start) - return (EINVAL); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); map->r_vaddr = pmap_mapdev_attr(start, length, args.memattr); map->r_bustag = &memmap_bus; diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c index 03f16dfa9de0..c5f460baf44e 100644 --- a/sys/powerpc/powerpc/nexus.c +++ b/sys/powerpc/powerpc/nexus.c @@ -353,9 +353,9 @@ static int nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, struct resource_map_request *argsp, struct resource_map *map) { - struct resource_map_request args; - rman_res_t end, length, start; + rman_res_t length, start; + int error; /* Resources must be active to be mapped. */ if (!(rman_get_flags(r) & RF_ACTIVE)) @@ -371,21 +371,9 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, } resource_init_map_request(&args); - if (argsp != NULL) - bcopy(argsp, &args, imin(argsp->size, args.size)); - - start = rman_get_start(r) + args.offset; - if (args.length == 0) - length = rman_get_size(r); - else - length = args.length; - - end = start + length - 1; - if (start > rman_get_end(r) || start < rman_get_start(r)) - return (EINVAL); - - if (end > rman_get_end(r) || end < start) - return (EINVAL); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); /* * If this is a memory resource, map it into the kernel. diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index 2e693e6cf655..936db3e548e9 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -424,7 +424,8 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, struct resource_map_request *argsp, struct resource_map *map) { struct resource_map_request args; - rman_res_t end, length, start; + rman_res_t length, start; + int error; /* Resources must be active to be mapped. */ if ((rman_get_flags(r) & RF_ACTIVE) == 0) @@ -440,18 +441,9 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, } resource_init_map_request(&args); - if (argsp != NULL) - bcopy(argsp, &args, imin(argsp->size, args.size)); - start = rman_get_start(r) + args.offset; - if (args.length == 0) - length = rman_get_size(r); - else - length = args.length; - end = start + length - 1; - if (start > rman_get_end(r) || start < rman_get_start(r)) - return (EINVAL); - if (end > rman_get_end(r) || end < start) - return (EINVAL); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); map->r_vaddr = pmap_mapdev(start, length); map->r_bustag = &memmap_bus; diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index 4896271b92bd..54c655c4fafd 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -458,7 +458,8 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, struct resource_map_request *argsp, struct resource_map *map) { struct resource_map_request args; - rman_res_t end, length, start; + rman_res_t length, start; + int error; /* Resources must be active to be mapped. */ if (!(rman_get_flags(r) & RF_ACTIVE)) @@ -474,18 +475,9 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, } resource_init_map_request(&args); - if (argsp != NULL) - bcopy(argsp, &args, imin(argsp->size, args.size)); - start = rman_get_start(r) + args.offset; - if (args.length == 0) - length = rman_get_size(r); - else - length = args.length; - end = start + length - 1; - if (start > rman_get_end(r) || start < rman_get_start(r)) - return (EINVAL); - if (end > rman_get_end(r) || end < start) - return (EINVAL); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); /* * If this is a memory resource, map it into the kernel. From nobody Wed Jan 3 20:45:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51vP2vyWz56fvt; Wed, 3 Jan 2024 20:45: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 4T51vN71FHz4PcN; Wed, 3 Jan 2024 20:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eEDIsG7HrwmVJ1szMlr5rybraZNgghUIyw5sG+0GREI=; b=g6UUBlv9FUGP+8Ecyp1BeSYRm1tyR6gK9qUq/Px8AV42sby5RqR/NmC42uLtu2GYg+potq r7E3Shloa3Ojbqe+6RgtwrAN5PPFH1J8LkTmq5VbQFxaQ5YjFlv65xb6M+2ylPeP2aTE5H GgpQ7JkDOmW3oF9EEjWVP0LuDtirxJIPoYk05Haggik/Mq/IFrmyH+h2KFd94rl9FEPBbL sOXJUQOX/DCaLCet5Isz/7ako4eZe/xgTmY+2pcoHwARXu9cbckKfEAvmwSmUzS+XtbYcf SA/NVAL/8bu+O+ltLHdEZsobitDA6q+VP3LX3Oie/Me/rBBlWAmuWeVJVvW2yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eEDIsG7HrwmVJ1szMlr5rybraZNgghUIyw5sG+0GREI=; b=GYGz42r2WNLQ7hzOhJyYIP9QQIlwmKIkV4/8UsOD+d6Xe2e9D5RqSf+4dYDbDnOt55fT2W Etuwv+rcW7exfzfbGY+hacsgHznMQX58o/EIAcZ/Dkp04SV95YGWToUhnyd6TAd/ZEl/vI Tau5dM3R1s787gzj7JSQiYc8QBscGn96V6ApJ9uA3Ofb7dkVH/7VWfL+hBYsY7vowzn6jN x6bLY+ut1w9hPkMsptT3xG88fN3lAlrZUtB1NSDo5FSkEichaKtumeV/ewe4KnkHEKvSS9 Qftkflj6MQp31iSeryVnLM3Hd0dliGdgVaD9G6vE0IaH7cj/kPQItE5JYx46ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314737; a=rsa-sha256; cv=none; b=uVDEH00Cv1UmzQPeLDhiybbb4LG42Sbyvw5HD7uE4JWm2LNkANs/5oc3ZX120KeXEWy1r7 d9853uB31krKR8rligr8uJFaIZCdlni9XacBlhA7TSQ7l3IIX6wvVjwaKAeGEnbpdKA6R+ jgy6rQy+amR5p/p2/9xePt939HT/KUInPawnr+Ch2AmgiLVx0VxZrOanMSVqRx3L6bC9oO UivJ/T/TYHspZo9M1jPEuiVoz0bzLwF9YrsR/9TujDfbOOhlfhN82tNHipU+DRfEghkBZy Ut8zNyh5mBzzjzPn++KPCI13jboOM54qT1MpgMxH9q2Pp+JYd+dtgH7cih0XDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51vN66k1z10yh; Wed, 3 Jan 2024 20:45: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 403KjacP037477; Wed, 3 Jan 2024 20:45:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403Kja0c037474; Wed, 3 Jan 2024 20:45:36 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:45:36 GMT Message-Id: <202401032045.403Kja0c037474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 19cfade3f392 - stable/14 - arm64/riscv nexus: Implement bus_unmap_resource List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 19cfade3f3924a7b5bc23d919e280db7f303ffd0 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=19cfade3f3924a7b5bc23d919e280db7f303ffd0 commit 19cfade3f3924a7b5bc23d919e280db7f303ffd0 Author: John Baldwin AuthorDate: 2023-11-23 17:06:51 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:34:28 +0000 arm64/riscv nexus: Implement bus_unmap_resource Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42725 (cherry picked from commit 71cfd330fc008187ff41db795ae5e6372bf802ab) --- sys/arm64/arm64/nexus.c | 17 +++++++++++++++++ sys/riscv/riscv/nexus.c | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 25d23f74d92b..5bd9b15dde2c 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -112,6 +112,7 @@ static bus_deactivate_resource_t nexus_deactivate_resource; static bus_get_resource_list_t nexus_get_reslist; static bus_map_resource_t nexus_map_resource; static bus_release_resource_t nexus_release_resource; +static bus_unmap_resource_t nexus_unmap_resource; #ifdef SMP static bus_bind_intr_t nexus_bind_intr; @@ -139,6 +140,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif @@ -492,6 +494,21 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, return (0); } +static int +nexus_unmap_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map *map) +{ + + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + pmap_unmapdev(map->r_vaddr, map->r_size); + return (0); + default: + return (EINVAL); + } +} + #ifdef FDT static device_method_t nexus_fdt_methods[] = { /* Device interface */ diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index 936db3e548e9..d92ad7861ae9 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -87,6 +87,7 @@ static bus_deactivate_resource_t nexus_deactivate_resource; static bus_get_resource_list_t nexus_get_reslist; static bus_map_resource_t nexus_map_resource; static bus_release_resource_t nexus_release_resource; +static bus_unmap_resource_t nexus_unmap_resource; static bus_config_intr_t nexus_config_intr; static bus_describe_intr_t nexus_describe_intr; @@ -118,6 +119,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_setup_intr, nexus_setup_intr), @@ -456,6 +458,20 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, return (0); } +static int +nexus_unmap_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map *map) +{ + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + pmap_unmapdev(map->r_vaddr, map->r_size); + return (0); + default: + return (EINVAL); + } +} + static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, pcell_t *intr) From nobody Wed Jan 3 20:45:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51vQ1s08z56fvv; Wed, 3 Jan 2024 20:45: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 4T51vQ0vcmz4Phn; Wed, 3 Jan 2024 20:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/7xGfJ33esA48bY3HhfVMw2nd7k0w5l1h4LaC0Vojpc=; b=MQ5iHfNgJFpn9rDB7ORGZ54vAafP/RnpAT67pksGhQsFPd9kJgc3dfv/16Yr/UZwPqU45e I2U0emvb2as8VL7+w4wAYEYVpxvbVui+nBAOssjlBU51JDAhLOdSV9kW9H/dLO3cWWzT8h IqN2LAnSqxtoe4VT7q53H3nzyyB98h6UguBsjWcG3ZIFMFOTnT04EZD6EsJx5o/6Fi+JDV n+cnr/HwLG8AV7FYyzH0QLBV98kKFZphlVXGExo+CwQ5p6SlnTCA/8Xnr1E+BNKIACLIZZ ArhvFZLIbQ2ERKcPPWB/+91e6fLIf4aG/vgXegqR7lSqjEi+BcyqE55qN88eCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/7xGfJ33esA48bY3HhfVMw2nd7k0w5l1h4LaC0Vojpc=; b=Gyo+hJoO47xRiYkAJK0WqsvA/Yn6EUi0SDuFvq/fjf3pdsIVTtBISoJxY6K+ZSCPXWFbz5 E5A5my/ntDfvAKgYQwosODxKIuBMsGmtalSJjvZMlvGcUOaAgAsNr+zZnbtho+ZJ6FbOiI CNywuaFL46Ovf8V52mP0ejYtzDAxq5srWdfdEUFlPDyhT+xfZNbfGfDz1rHgY+j2DVmBfu RgIoRz1kmWNOCTDkAJ2KuxGLPZ/Dna/9xoR/joUNEZsmR85sn4b9LNxgtMz93esJ+62dJP HKAxVdiixexC2pN0cLT20S0MdRHNbjtO5uGkxeaBWB0ERU61fOaHnBfmUpbVIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314738; a=rsa-sha256; cv=none; b=jxE0xFLVl5jilmS0r55Wrwz8iifbMSKBfmeur4DqZP5I0o73NvRppJso4B2MdkCezDBVEg Xob2uPCWlN0Wd9Z+qRZJlA09KBR2ggaEUADHFIlBGr3Ib+r0t/yyFngVYpKHYUJsKQtgOO OCOXJ5bfzB7KLlsP0vmuh79iQLljti1EKMyVnZbkFfDq9Qxda9f79BYDQCED7L5GFBvIBL 3dq9v0u5glm7/flScOfhQ1gk+p45utHha9oDjmbfm568QLwxkks2TFbiQZ0VbEMcDO3pMH lrp68119hEuzAfKty1/jCEV1S/+VqQB0VfWGXiL2jY9FfyIQLinVQOsKfmvrtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51vQ01jyz101Z; Wed, 3 Jan 2024 20:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403Kjbn1037519; Wed, 3 Jan 2024 20:45:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KjbZ9037516; Wed, 3 Jan 2024 20:45:37 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:45:37 GMT Message-Id: <202401032045.403KjbZ9037516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dfa6fdec56fe - stable/14 - ehci_ps3: Remove unused struct definition. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: dfa6fdec56fece6f466410d6e58d79fe6e9a1b64 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dfa6fdec56fece6f466410d6e58d79fe6e9a1b64 commit dfa6fdec56fece6f466410d6e58d79fe6e9a1b64 Author: John Baldwin AuthorDate: 2019-09-30 16:18:10 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:34:35 +0000 ehci_ps3: Remove unused struct definition. (cherry picked from commit 3578000a6f505148c5e0ecf5be9d644ed07a81bc) --- sys/powerpc/ps3/ehci_ps3.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/powerpc/ps3/ehci_ps3.c b/sys/powerpc/ps3/ehci_ps3.c index 2b0864506e76..00408fde0a62 100644 --- a/sys/powerpc/ps3/ehci_ps3.c +++ b/sys/powerpc/ps3/ehci_ps3.c @@ -62,11 +62,6 @@ #include "ps3bus.h" -struct ps3_ehci_softc { - ehci_softc_t base; - struct bus_space tag; -}; - static void ehci_ps3_post_reset(struct ehci_softc *ehci_softc) { From nobody Wed Jan 3 20:45:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T51vR3xsBz56fw1; Wed, 3 Jan 2024 20:45: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 4T51vR1gsQz4PyK; Wed, 3 Jan 2024 20:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQK1mjyhITJ9OYre/U/g3xB+yNAnDjq7lDcllpHZOjc=; b=D9+MwZpBpQCzhCBaBIXVdd03sWFA78lqmwEljw32fCV/ZCz3B/F9o0ieaE/OJlono1mY3J D9WUgUbKjV19K0UV2MBacZc71pIGcwnxhaeQXI/ayHCH2l6u3wqCjHl8qXpY87lH8jrdxh bpomvd1x9NJ+risf1X/KScEjT8P3A4aAMkS5okxX0cGYK1bkkpMbiJEij3rCfa9sJekESo pHgzfrzFSOxtzmxofPbodpnEIwCSQ+not1fbFl6YU0ue870wOJLckVJLXSjiTybiWPhL9f YecYixrosM67SIYihe7L8PYf4B3faaMcVNDg/u2n1GDCHzJdJZ9srfJ+gFpwWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQK1mjyhITJ9OYre/U/g3xB+yNAnDjq7lDcllpHZOjc=; b=IckBCr/iSRPa+vv5tF84Rxb4WzYnsZJhuxwD9UDY4J+Wu0BeRDGSz0iA39El0RXeYqmCwH NdeKXOx7o1eck482Z65wdUshZ9h9Z4OocDJdcTEQ7dNT14ilQ7LB9nItl55XJQyWLFI2d+ IO6DRXfBtkXH8AN4LIRz/C+QmbjyLYouXNa6x3Fc/7fohzS8lyujnHQtTaV9S3vWmpYOhZ GK5vW9PKrKofd3yRCkqOy5mdmwnIBTrKMX0YYx8pJ9iWxbjWJvVTBXUMBhczEx71ZoVy70 A96gCZ0SQx1sq3YILhHs9Mhs+o4JkoMjOVP8XvPxiRfLWQ1Wzi7BAroXqVyr1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314739; a=rsa-sha256; cv=none; b=XhLNsVreg3fUJCXmNLhUU0aT5S/twKdkrjJPtBQNpwrdnSq9X/how1XIA/vT1EFDFrB0DB i3paU5WJJqmdYNZvM5u4BfWtAhjR44cqPwVO1yTDjzbQY5JS7opytRGo2DD0YJKKTbMSMO zmEVONzc7ZtIALEilSWaYrwWHn3Id/3g2m5HUfGVFj+CsB6HiFwlFp60CBPhIcr7yVXT15 oDYESh2dgfIVg3FibSgFIfgYGZ9LcPFiy8G42ULQ7WhpC/lp/wHUt3d/gHCJeainyA0CVI MMl5EOKv/DAmzizQZwfmNJvE2FlU1wO3wh3UCxOEAl0tdOKlQjAf09RcccCZTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T51vR0ncwz10Wl; Wed, 3 Jan 2024 20:45: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 403KjdfC037567; Wed, 3 Jan 2024 20:45:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KjdtL037564; Wed, 3 Jan 2024 20:45:39 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:45:39 GMT Message-Id: <202401032045.403KjdtL037564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: cb2ef37beffc - stable/14 - etc/mtree: Remove entry for /usr/tests/usr.sbin/mixer List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: cb2ef37beffce4a0bd5dbd98b96305df2abe451a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cb2ef37beffce4a0bd5dbd98b96305df2abe451a commit cb2ef37beffce4a0bd5dbd98b96305df2abe451a Author: John Baldwin AuthorDate: 2023-11-23 20:17:41 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:34:50 +0000 etc/mtree: Remove entry for /usr/tests/usr.sbin/mixer These were removed when the new mixer(3) library was imported, and I missed updating the mtree file when I added the entries to ObsoleteFiles.inc. Fixes: 903873ce1560 Implement and use new mixer(3) library for FreeBSD. (cherry picked from commit 7aa3bf6952b2c7d1b02d3a67e7f51b96fcf52b50) --- etc/mtree/BSD.tests.dist | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index c7a8a4ee27dc..04f179a7632d 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1173,8 +1173,6 @@ .. makefs .. - mixer - .. newsyslog .. nmtree From nobody Wed Jan 3 22:02:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cL37DDz56nZS; Wed, 3 Jan 2024 22:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T53cL2Xn8z4YGq; Wed, 3 Jan 2024 22:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHxoXZDTqFpa766I39bp86Ymr9s0cB1yZ7QaeSOdouM=; b=t0ZBgQy6rDSZ2A+dmYh6QsjshPlkEjoWf7KJIM1qYNuTarAmDRuj/j+TQ1ZOrLepiBzNLE BcVtO3MyIuxZmLJkClY9A+tVV3K6sXI9EjFUGicE6sYF7FdzVqiRd02Om2tsaWRw9pckv3 NWrASA02Nova5TyrhohAA3DYFx9qzrzp7xOAHb+WJKDHwLR4pTxKb4Av5pp2FQsVM+GlS3 eiK2vxuVZ+NFLUHhJF4YFCsigX0rAGzi+s+IN5zNeA1fAf/ExI6o60V6x/EEQtFNPmMZwW NJEP1EO+8n8U2vBj6tet83thRGSzL4UWKVAiDPAzXDtco36voHBG1HreHAX4jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHxoXZDTqFpa766I39bp86Ymr9s0cB1yZ7QaeSOdouM=; b=enTyZyGWzDvyUwYaPolt4eWrvIY9JuzsnBvpcozecOTphDtNQtgciGDdzau8tObwC5aSJ5 sWTeGrY6hV7n4xAM1PZ5sBHbwl9Z+cRtNooJ+ypxgJuV+vQvS4g3d2iWoc469ioDvmYbGu O3z/FqJiFWk3rA7CB9AqVr55KA6Y9RnjqNxIFtNyret9HFDdMHM1tc0rp+3aEfseot6kQJ EeU2uF1Ty8Shy8At1T62wcG1OLCWH4oztPR+EL4ZH1g5giwLLnHQxm+tkPuRj3GC0mzRyR +FIeNwt1U+5gDWTDRJ4R7GEBlFKM6kU6px7qtBZ1EEQ43bRN/F4Gq7LwHB2rng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319362; a=rsa-sha256; cv=none; b=OCGJFvnxkKSXCEzMuP5ni4fV464cCeRucktbHeh+FW+wTS9plBD0AsZ7J9His+iUnwQUDW JyQFdOGyFgxuaKBIzE43qLSdhDUw3z6GTikSOfvvTMhoA4pcyRwty/6IsCG5Bh/wRYp58c RnH62QEG9wajsNXWM0tEOZRVgalxJvppV9p4Y2a60SVa2d++k1MqoPm2VdNDXvK2fYbsNS WEs6RKEH5A9FxSvrzxUaSB/9FwiX21z7IDy/gBLC0LJLHMYiCRV2ZeCxuA8VurUiP9g0KA BxkjeGhpJQx+8LA3iDuAZa+1erSQRCscXkbt6OhOUtnukURjWyn4gNYbCQqkBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T53cL1ZVDz136y; Wed, 3 Jan 2024 22:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403M2g3j072477; Wed, 3 Jan 2024 22:02:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2gSG072474; Wed, 3 Jan 2024 22:02:42 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:42 GMT Message-Id: <202401032202.403M2gSG072474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a6d562d415c2 - stable/14 - new-bus: Add a comment for bus_generic_get_domain List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a6d562d415c2f2bb26931d0cf79af2ca770be0da Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a6d562d415c2f2bb26931d0cf79af2ca770be0da commit a6d562d415c2f2bb26931d0cf79af2ca770be0da Author: John Baldwin AuthorDate: 2023-11-24 18:33:57 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:47:02 +0000 new-bus: Add a comment for bus_generic_get_domain (cherry picked from commit 00b3cde596dd3945d56aa12f2a4957b2910e1ee3) --- sys/kern/subr_bus.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 1a73df25ff34..571e90b52dfc 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4201,6 +4201,13 @@ bus_generic_child_present(device_t dev, device_t child) return (BUS_CHILD_PRESENT(device_get_parent(dev), dev)); } +/** + * @brief Helper function for implementing BUS_GET_DOMAIN(). + * + * This simple implementation of BUS_GET_DOMAIN() calls the + * BUS_GET_DOMAIN() method of the parent of @p dev. If @p dev + * does not have a parent, the function fails with ENOENT. + */ int bus_generic_get_domain(device_t dev, device_t child, int *domain) { From nobody Wed Jan 3 22:02:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cM3gMRz56nZV; Wed, 3 Jan 2024 22:02: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 4T53cM3DNyz4YBb; Wed, 3 Jan 2024 22:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6HvQ6ipebvCZKeRoSD9SOUytRYHnGjqe2EJ7mb7FWk=; b=J9tj1Oq4WjOuZi4/tL/YBBd2/Ppd4kGxEndTbCXb226RS9+HtD8J21GZOzMBMcyXeSCBnR 3p+f3N4ptvIHJz1hxppMBCO0o+SZVpJEyS1IYbPbfRrmPWPMhezmFFKvcDhtU/oWmKNGfV qDX3XxnH4BbswIhaHYCsKFv7cxWMlLi1q0jUqFUUrrMp2iY+1YgOySrheKVzc/Vh+hjhH6 J3+KEz+BPgSUgBGuJRT2wcdUukaq6vu53szX3yorvMoXvGu/CJZRvGG4Pd0xjPy3+VZQ5J xhKkl9q8bfGu8mrJ7h3oQoJqfUUinVvqs+Uk6WRLmPQX+WSlo7mGdK9ykW/oHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6HvQ6ipebvCZKeRoSD9SOUytRYHnGjqe2EJ7mb7FWk=; b=uE+2Vi3jPSKggha6/s+KFZeXVCqScxBYPYy/TSExs+LMyHVsWHbyN1YUHNlzz/BIVjzyjN fzP/QFdvUwp2MxfQ4XywAByXxpROn2h5nehlcXd68yGzJx8VLVh4idJF/293hv6JS/bto+ h0V8HwFy9NzxcL9zA1cuGfTE0aJX29qGPnBHfE8GandqUY+dCj1pYyenlqb39tGzi3DlTj G+UxxJ11vCCDP99Bk6x4y9ViNzmdFr/NCGs9bkx9bBou1SWaOs2h2eO1yDuNC5rrTp8TzI 5Kq6Y6eQnQdQ9Er5dud5+7C2aDcS8B40rWrtNWPRhTryNaqfmyDa07GbZZ3MUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319363; a=rsa-sha256; cv=none; b=QItlX9z9NhWrROxart/ZIDXYEFRE1e5DWDGZakcKuEmS11z6txywR8UWiwMFoaqmh0O4MM XF3PRyhBAU85KOehGLk+WEbEAx2xpfQ8+v9V59vV364Gjfc0UE24ZAnixbgMLDaOavMBTW Zc0+yZ4LymSFIDi3hdRSMGvn6TWgmN5Rn77en3NIqqoN3yex+yX+6u5uyOpanYz6SKCv91 7Ww77Od+9Vitkl1/62iludWaYwzeXiVOXGlqyNRUOmdh1Tv5+5DCkZMN/P/4kcu7uT2zVe U45p4E0hh+bDUNf/4Oc+uQRcQbOwMhBwobO+ivYKVnozCO44NNdIRlkNbX/ymw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T53cM2Hbgz1370; Wed, 3 Jan 2024 22:02: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 403M2h05072539; Wed, 3 Jan 2024 22:02:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2h8j072536; Wed, 3 Jan 2024 22:02:43 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:43 GMT Message-Id: <202401032202.403M2h8j072536@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0962b9d08676 - stable/14 - newbus: Add a set of bus resource helpers for nexus-like devices List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0962b9d0867602eed41361f1982ce8f6b967064b Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0962b9d0867602eed41361f1982ce8f6b967064b commit 0962b9d0867602eed41361f1982ce8f6b967064b Author: John Baldwin AuthorDate: 2023-11-24 17:28:00 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:47:08 +0000 newbus: Add a set of bus resource helpers for nexus-like devices These routines can be used to implement bus_alloc/adjust/activate/deactive/release_resource on bus drivers which suballocate resources from rman(9) resource managers. These methods require a new bus_get_rman method in the bus driver to return the suitable rman for a given resource type. The activate/deactivate helpers also require the bus to implement the bus_map/ummap_resource methods. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42739 (cherry picked from commit 751615c538446ea0384f8faa9cb2508670c3799a) --- sys/kern/bus_if.m | 24 ++++++++ sys/kern/subr_bus.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/bus.h | 17 ++++++ 3 files changed, 198 insertions(+) diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m index 7bd08fb713f8..7078683911b8 100644 --- a/sys/kern/bus_if.m +++ b/sys/kern/bus_if.m @@ -77,6 +77,12 @@ CODE { { return (0); } + + static struct rman * + null_get_rman(device_t bus, int type, u_int flags) + { + return (NULL); + } }; /** @@ -622,6 +628,24 @@ METHOD struct resource_list * get_resource_list { device_t _child; } DEFAULT bus_generic_get_resource_list; +/** + * @brief Return a struct rman. + * + * Used by drivers which use bus_generic_rman_alloc_resource() etc. to + * implement their resource handling. It should return the resource + * manager used for the given resource type. + * + * @param _dev the bus device + * @param _type the resource type + * @param _flags resource flags (@c RF_XXX flags in + * ) + */ +METHOD struct rman * get_rman { + device_t _dev; + int _type; + u_int _flags; +} DEFAULT null_get_rman; + /** * @brief Is the hardware described by @p _child still attached to the * system? diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 571e90b52dfc..4c44c264a5c0 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4189,6 +4189,163 @@ bus_generic_rl_alloc_resource(device_t dev, device_t child, int type, start, end, count, flags)); } +/** + * @brief Helper function for implementing BUS_ALLOC_RESOURCE(). + * + * This implementation of BUS_ALLOC_RESOURCE() allocates a + * resource from a resource manager. It uses BUS_GET_RMAN() + * to obtain the resource manager. + */ +struct resource * +bus_generic_rman_alloc_resource(device_t dev, device_t child, int type, + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + struct resource *r; + struct rman *rm; + + rm = BUS_GET_RMAN(dev, type, flags); + if (rm == NULL) + return (NULL); + + r = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, + child); + if (r == NULL) + return (NULL); + rman_set_rid(r, *rid); + + if (flags & RF_ACTIVE) { + if (bus_activate_resource(child, type, *rid, r) != 0) { + rman_release_resource(r); + return (NULL); + } + } + + return (r); +} + +/** + * @brief Helper function for implementing BUS_ADJUST_RESOURCE(). + * + * This implementation of BUS_ADJUST_RESOURCE() adjusts resources only + * if they were allocated from the resource manager returned by + * BUS_GET_RMAN(). + */ +int +bus_generic_rman_adjust_resource(device_t dev, device_t child, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + struct rman *rm; + + rm = BUS_GET_RMAN(dev, type, rman_get_flags(r)); + if (rm == NULL) + return (ENXIO); + if (!rman_is_region_manager(r, rm)) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); +} + +/** + * @brief Helper function for implementing BUS_RELEASE_RESOURCE(). + * + * This implementation of BUS_RELEASE_RESOURCE() releases resources + * allocated by bus_generic_rman_alloc_resource. + */ +int +bus_generic_rman_release_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ +#ifdef INVARIANTS + struct rman *rm; +#endif + int error; + +#ifdef INVARIANTS + rm = BUS_GET_RMAN(dev, type, rman_get_flags(r)); + KASSERT(rman_is_region_manager(r, rm), + ("%s: rman %p doesn't match for resource %p", __func__, rm, r)); +#endif + + if (rman_get_flags(r) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, r); + if (error != 0) + return (error); + } + return (rman_release_resource(r)); +} + +/** + * @brief Helper function for implementing BUS_ACTIVATE_RESOURCE(). + * + * This implementation of BUS_ACTIVATE_RESOURCE() activates resources + * allocated by bus_generic_rman_alloc_resource. + */ +int +bus_generic_rman_activate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + struct resource_map map; +#ifdef INVARIANTS + struct rman *rm; +#endif + int error; + +#ifdef INVARIANTS + rm = BUS_GET_RMAN(dev, type, rman_get_flags(r)); + KASSERT(rman_is_region_manager(r, rm), + ("%s: rman %p doesn't match for resource %p", __func__, rm, r)); +#endif + + error = rman_activate_resource(r); + if (error != 0) + return (error); + + if ((rman_get_flags(r) & RF_UNMAPPED) == 0 && + (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) { + error = BUS_MAP_RESOURCE(dev, child, type, r, NULL, &map); + if (error != 0) { + rman_deactivate_resource(r); + return (error); + } + + rman_set_mapping(r, &map); + } + return (0); +} + +/** + * @brief Helper function for implementing BUS_DEACTIVATE_RESOURCE(). + * + * This implementation of BUS_DEACTIVATE_RESOURCE() deactivates + * resources allocated by bus_generic_rman_alloc_resource. + */ +int +bus_generic_rman_deactivate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + struct resource_map map; +#ifdef INVARIANTS + struct rman *rm; +#endif + int error; + +#ifdef INVARIANTS + rm = BUS_GET_RMAN(dev, type, rman_get_flags(r)); + KASSERT(rman_is_region_manager(r, rm), + ("%s: rman %p doesn't match for resource %p", __func__, rm, r)); +#endif + + error = rman_deactivate_resource(r); + if (error != 0) + return (error); + + if ((rman_get_flags(r) & RF_UNMAPPED) == 0 && + (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) { + rman_get_mapping(r, &map); + BUS_UNMAP_RESOURCE(dev, child, type, r, &map); + } + return (0); +} + /** * @brief Helper function for implementing BUS_CHILD_PRESENT(). * diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 88ae4000004b..2ec735659452 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -499,6 +499,23 @@ int bus_generic_rl_set_resource (device_t, device_t, int, int, rman_res_t, rman_res_t); int bus_generic_rl_release_resource (device_t, device_t, int, int, struct resource *); +struct resource * + bus_generic_rman_alloc_resource(device_t dev, device_t child, int type, + int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, + u_int flags); +int bus_generic_rman_adjust_resource(device_t dev, device_t child, int type, + struct resource *r, rman_res_t start, + rman_res_t end); +int bus_generic_rman_release_resource(device_t dev, device_t child, + int type, int rid, + struct resource *r); +int bus_generic_rman_activate_resource(device_t dev, device_t child, + int type, int rid, + struct resource *r); +int bus_generic_rman_deactivate_resource(device_t dev, device_t child, + int type, int rid, + struct resource *r); int bus_generic_shutdown(device_t dev); int bus_generic_suspend(device_t dev); From nobody Wed Jan 3 22:02:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cN5gvtz56nqK; Wed, 3 Jan 2024 22:02: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 4T53cN42NNz4YT5; Wed, 3 Jan 2024 22:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nQEax8zVElTc6tSJAqdTOIOhZHhc1c286f0eIEgURwE=; b=xxyJvRXKqFRTYMyMNvoEzuDRF9rsf7WbRVMuxG0z7MrJEVqAAqeW3FifyvLuQkvE7AUVNb EUmaPbwIECiSvKIUTDD0xDroUi7lZgSpJX+rjaMQx/S18JRKjrtk/F0efrJa3PGcreXmep Ptc5Uw+O/hTvld78+xkHD/PaqEHlfBJwGk3l4PnpJVyX/76R5DCRyZNd9JwRtLOAp3dPaT 8k29iKLZGDlUpl/jiiyVWHdOv9LazhQwS0ukvpZEaRFLBAc0sXKn0WWBa66nw5cAQigmM6 MZEQJLqsq+D2Mr5/JAzGJsh9s0214D1dDquvlclksK1pucJwIsf5Qbg8yAMuag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nQEax8zVElTc6tSJAqdTOIOhZHhc1c286f0eIEgURwE=; b=Ego9SrH9whylWv1E21PA6U95Bkd+zjCLWCo7XBae5Afcj5kis1/whHj01GbG5wHqsSMDXM b3omJDn5fltAn90CloWPxTPizoY3Ea3Om/lviKp0XrP4DlnrNSpQSSr488Q9/IItNoFsM1 m8c657TxSKmXL+KJDv2R9JzgL5Sne6YlzJPokbm0vpyPHlcXc+BsC8Xyx4x+urbMoPQzJW uNdRaycPB4MX/wBc1F8ajBQ3a6pc8XvvbqCVXzyLfQqdRCxBzWXVzp8kr0sVnF6+ydSkOv Gm+aNB1xYWKfn555y3gMUBfRGuQe9RRyo30wHqBOgE8WsYEh0fSY0vMHzQBNng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319364; a=rsa-sha256; cv=none; b=VgAzkTb8RAIdLT/MjWjClTfpbxLWhoei19Bhw1QX4sm0WdyO5yJvz9ISMPIC9OuZxzZaV/ R5WdJog+4X+/klDg1Q3pKdvZXskiiziXcLNXrYDl7nfl1K/QBeolQl2ZU53bZfxJinaRqY kkARQLETVbb+P6VfFJKt5gtfrQH5YxtMG3e2QqBCeKeq17HafaFjcrpQBbQx2j1sJ6JSei mx4G7a0xSlWA2CAfmaSX3GxsBsUxEsv7EvBe5Suq5des+U5Y3op09eNyEMSYSM50jvvoqG /UiehD7tYa27ZjO4hYizO9MqF89j3VOSVqtamvTsTM8IKAFJoixLMdoRTuvp+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 4T53cN32FSz12qm; Wed, 3 Jan 2024 22:02: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 403M2iMa072584; Wed, 3 Jan 2024 22:02:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2ifQ072581; Wed, 3 Jan 2024 22:02:44 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:44 GMT Message-Id: <202401032202.403M2ifQ072581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0c7aa9afb163 - stable/14 - new-bus: Add comments for resource_*_map_request* List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c7aa9afb1633f1fc068dc043732c18e18facb2a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0c7aa9afb1633f1fc068dc043732c18e18facb2a commit 0c7aa9afb1633f1fc068dc043732c18e18facb2a Author: John Baldwin AuthorDate: 2023-11-24 18:33:57 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:47:18 +0000 new-bus: Add comments for resource_*_map_request* Requested by: mhorne (cherry picked from commit 46971d38de334a9418e2b66b37cea7d051b6731a) --- sys/kern/subr_bus.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 4c44c264a5c0..4d21382f2de7 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2707,6 +2707,15 @@ device_set_unit(device_t dev, int unit) * Some useful method implementations to make life easier for bus drivers. */ +/** + * @brief Initialize a resource mapping request + * + * This is the internal implementation of the public API + * resource_init_map_request. Callers may be using a different layout + * of struct resource_map_request than the kernel, so callers pass in + * the size of the structure they are using to identify the structure + * layout. + */ void resource_init_map_request_impl(struct resource_map_request *args, size_t sz) { @@ -2715,6 +2724,18 @@ resource_init_map_request_impl(struct resource_map_request *args, size_t sz) args->memattr = VM_MEMATTR_DEVICE; } +/** + * @brief Validate a resource mapping request + * + * Translate a device driver's mapping request (@p in) to a struct + * resource_map_request using the current structure layout (@p out). + * In addition, validate the offset and length from the mapping + * request against the bounds of the resource @p r. If the offset or + * length are invalid, fail with EINVAL. If the offset and length are + * valid, the absolute starting address of the requested mapping is + * returned in @p startp and the length of the requested mapping is + * returned in @p lengthp. + */ int resource_validate_map_request(struct resource *r, struct resource_map_request *in, struct resource_map_request *out, From nobody Wed Jan 3 22:02:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cP6xsJz56nbv; Wed, 3 Jan 2024 22:02: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 4T53cP58fqz4YTL; Wed, 3 Jan 2024 22:02:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K8A3NmUgSxRE0zyB3gxHbjbgi1YJPXh6xItytdXVKh0=; b=W8U13EJebEZmJ5i6ksArUBRN20ZKAYIIGxFJbWIPjUvRymdyUTRIhVFnV4lRjuapf/y1tE 4J6Zf8e+xWv7MKru+CW1IzlNEE/pTjserlv63kLKWHbMyherp/6LAGQaqGUqPoVG4j/qwQ 0EearRWrjybfuuhuTtmzS0XGzCU1IMXdkMn8fVvJhStoU1q3j28dBhSISTWNuLThFv/PXM K601yC8jqQdohktX6epyP7QpI3N2CerRh3NuoEk/RCxWkVP8xd40XOoJKOYX2pUUmG7A7W m2HK4W38QDnLI3GHBPeQFlYdFKb9j8ek/mgXwyIw/0D9yG4c8Gi3oF5tGHJ5PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K8A3NmUgSxRE0zyB3gxHbjbgi1YJPXh6xItytdXVKh0=; b=T1Vvf12NNOZdZqTbP/PLsCAM4FyC0lv4/LnkiOr6T8RQe1JESW4nPCmHrn+9irbRvOtxr1 kWntosdT0Odb8YRI2R6u1IP+rqJCds4/6WmLFS3V0/JgjsI1CwYaaI7x4X3bpvS9VMC09p FH0GSGUDofdhOC78SZpRf1ExE2y3n/Vibm7HdZcdpS02/gQ31AeqlCh7QqpPSRoAh05C+l PUQNnxEZ8UGah5px7+IFiiDnupPRjkEh+rYEG8O+pFkJ9Wd7IQFDs6dXMCd7XKZ6zWUFSd Iqob2Xyjr3TcVIzKqnYq5zMwvTki3tP11VRPhikk6ljyHP6zVityn784aBuSnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319365; a=rsa-sha256; cv=none; b=QV4hPdZbmBWqQacBf4EV/9FC/xa0SdQoI3F7OnSzIHwuXMtjR9g03LvVx5ng85jxDoIVJf CXU980boNALM0BjEDiq67kC3221NlnhArjQ7KtIH7H58m5iwWmxr2Wy021OGLIaAtahetU pt8w3WitMKDrlUsD8Iy+Y16VWB66+lBgdKliT7xpGuGMSKztP1jxlbNYppl3Cn+vbHWu0O OyjwAKZ+MI6ioU+6dbxzMHSJbGnHrzwSv+BaAWW+czeS/f6bUOJQhBOLTiHVNBlfXBR/bI jKfOEUOqV0zWCpMsDlrLQptA4F2Gy0HNrJw8d9XlH6rikjRg61L2MHG5MQa74g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T53cP4GQyz12Wc; Wed, 3 Jan 2024 22:02: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 403M2jMM072639; Wed, 3 Jan 2024 22:02:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2jIA072636; Wed, 3 Jan 2024 22:02:45 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:45 GMT Message-Id: <202401032202.403M2jIA072636@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 92991e8f8d31 - stable/14 - new-bus: Disable assertions for rman mismatches for activate/deactivate List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 92991e8f8d319981c7f9b0ad1fc3855b6dfdfe3a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=92991e8f8d319981c7f9b0ad1fc3855b6dfdfe3a commit 92991e8f8d319981c7f9b0ad1fc3855b6dfdfe3a Author: John Baldwin AuthorDate: 2023-11-25 18:32:19 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:47:24 +0000 new-bus: Disable assertions for rman mismatches for activate/deactivate Bus drivers which use an rman to sub-divide a resource allocated from a parent bus should handle mapping requests (and activate/deactivate requests) for those sub-allocated resources by doing a subset mapping of the resource allocated from the parent (and then using this to handle activate/deactivate requests). However, not all bus drivers which use internal rmans (such as acpi(4) and pci_pci(4)) do that since not all nexus drivers support bus_map/unmap. Eventually bus drivers should be updated to do this properly at which point these assertions can be reenabled. Reported by: delphij, kib (cherry picked from commit ed88eef140a1c3d57d546f409c216806dd3da809) --- sys/kern/subr_bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 4d21382f2de7..040b3556d156 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4305,12 +4305,12 @@ bus_generic_rman_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { struct resource_map map; -#ifdef INVARIANTS +#ifdef INVARIANTS_XXX struct rman *rm; #endif int error; -#ifdef INVARIANTS +#ifdef INVARIANTS_XXX rm = BUS_GET_RMAN(dev, type, rman_get_flags(r)); KASSERT(rman_is_region_manager(r, rm), ("%s: rman %p doesn't match for resource %p", __func__, rm, r)); @@ -4344,12 +4344,12 @@ bus_generic_rman_deactivate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { struct resource_map map; -#ifdef INVARIANTS +#ifdef INVARIANTS_XXX struct rman *rm; #endif int error; -#ifdef INVARIANTS +#ifdef INVARIANTS_XXX rm = BUS_GET_RMAN(dev, type, rman_get_flags(r)); KASSERT(rman_is_region_manager(r, rm), ("%s: rman %p doesn't match for resource %p", __func__, rm, r)); From nobody Wed Jan 3 22:02:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cR2lbTz56nwB; Wed, 3 Jan 2024 22:02: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 4T53cQ66y3z4YZK; Wed, 3 Jan 2024 22:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3FQgezOnrBxNdb3hzT1wEzIba5n5D0Ao0Y90tElrVFw=; b=WvrJAwDUWKUPhcC0Hof7CpNJxtruaH3HsFzIEtgHI/TRb4DDER9BUt9wmq/GXCMxuxp9qV 4ClmQMOMSh/4Xyviey0c4xLrnwlqNZ5Rxy+4zPGXJ2WAaEpCDzHCVkaETiWsZU866QK7rR 2jqTRMKuZUQ4+ulRRn/bSYRSIidTWmnWAxIOgZXAUYEL5xDda42E0+u8aXMOTA4Z7xR+0l AANu4HdgPbHFBIOdeD/iijEHZ7pAb/LowvyPUIy1hlWPWpiNhJO1ZoFFHqr/Yzwl7E6MhY 2GrCMZ0TC6D1Dkso989eNSkELwp6fwPz+pJFam/Sqx72lAq9WoAF1aFLhoTVvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3FQgezOnrBxNdb3hzT1wEzIba5n5D0Ao0Y90tElrVFw=; b=clL6W390Lacp6wfZaU9z1szt3XTtCwbg0zGvYaR+esQUjQFyfFncm1kuo7+lUlSjy/U5hx Mp8qxWpyzOF2NHX7IneGPa0LL3JjoyLGR95u/xw0MEPJLlcxIdUnH9oW9iYs6sU3ZqjPX/ Z4HBqp5YmdyxReNTLv4cr0FWXVt2E9wg+K7Xpczs1qtcU7K7Bp2al2lBM9zrdi2NRib9n5 clAEdw1vnCaE4ePeeknbAowKkrYewho+W4jONZnIVaBz5g6cNQZIh6QhU7RnBeGDs/AvS4 5KfTSVvlykkN/5VPotmXkwmGHXAY8EgrSlcajbbqj2a4buckX+qroJxzVmFVzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319366; a=rsa-sha256; cv=none; b=EUoL5GZqx3ZcyZ7ExP4ReRCZJBdrNxT3nY4F5JY43eU9OEs4o0Ov6o6LH5drJsf4XbIJ93 7KLhYtQ9hY6Ua9vrSj1Ooo50FSojkURb93560VhoBNEgZTZ6gZefYAuMVDMAcEpOPipA0T Ld2O/clPSNOStqRbNjt1YQTMHwdFYIH9kd0WiH8IY5/DzaXnSmu3Fbz/Zo6sXAQJ7ETBbu pxLueo6gH8Wk2aEo7TTJ6D04YZyyUZecvRMTKfilQCB57kvO9zs71RLdtV9boNyBtez+c9 LUyNjXrcadK+xqncrIDHmGTdXLLZjt7pI5vFJ27tZGQnVT/24pFm828S17Mf5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T53cQ5F4Jz1371; Wed, 3 Jan 2024 22:02: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 403M2kDh072679; Wed, 3 Jan 2024 22:02:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2kJN072676; Wed, 3 Jan 2024 22:02:46 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:46 GMT Message-Id: <202401032202.403M2kJN072676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9d2b2ab93cac - stable/14 - x86 nexus: Use bus_generic_rman_*_resource List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9d2b2ab93cac73dff24a461fe130738fa928347a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9d2b2ab93cac73dff24a461fe130738fa928347a commit 9d2b2ab93cac73dff24a461fe130738fa928347a Author: John Baldwin AuthorDate: 2023-11-24 17:28:10 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:48:20 +0000 x86 nexus: Use bus_generic_rman_*_resource Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42740 (cherry picked from commit a03a335a801246dfb95ccf35ec3f64b9fe968874) --- sys/x86/x86/nexus.c | 110 +++++----------------------------------------------- 1 file changed, 9 insertions(+), 101 deletions(-) diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index 54c655c4fafd..9b05758a6cbf 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -97,13 +97,10 @@ static device_attach_t nexus_attach; static bus_add_child_t nexus_add_child; static bus_print_child_t nexus_print_child; -static bus_activate_resource_t nexus_activate_resource; -static bus_adjust_resource_t nexus_adjust_resource; static bus_alloc_resource_t nexus_alloc_resource; -static bus_deactivate_resource_t nexus_deactivate_resource; static bus_get_resource_list_t nexus_get_reslist; +static bus_get_rman_t nexus_get_rman; static bus_map_resource_t nexus_map_resource; -static bus_release_resource_t nexus_release_resource; static bus_unmap_resource_t nexus_unmap_resource; #ifdef SMP @@ -138,15 +135,16 @@ static device_method_t nexus_methods[] = { /* Bus interface */ DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), - DEVMETHOD(bus_activate_resource, nexus_activate_resource), - DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), + DEVMETHOD(bus_activate_resource, bus_generic_rman_activate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_rman_adjust_resource), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_rman_deactivate_resource), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), + DEVMETHOD(bus_get_rman, nexus_get_rman), DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), DEVMETHOD(bus_map_resource, nexus_map_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_release_resource, bus_generic_rman_release_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), #ifdef SMP @@ -328,7 +326,7 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) } static struct rman * -nexus_rman(int type) +nexus_get_rman(device_t bus, int type, u_int flags) { switch (type) { case SYS_RES_IRQ: @@ -354,10 +352,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_int flags) { struct nexus_device *ndev = DEVTONX(child); - struct resource *rv; struct resource_list_entry *rle; - struct rman *rm; - int needactivate = flags & RF_ACTIVE; /* * If this is an allocation of the "default" range for a given @@ -376,81 +371,8 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, count = rle->count; } - flags &= ~RF_ACTIVE; - rm = nexus_rman(type); - if (rm == NULL) - return (NULL); - - rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == NULL) - return (NULL); - rman_set_rid(rv, *rid); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv)) { - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); -} - -static int -nexus_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, rman_res_t start, rman_res_t end) -{ - struct rman *rm; - - rm = nexus_rman(type); - if (rm == NULL) - return (ENXIO); - if (!rman_is_region_manager(r, rm)) - return (EINVAL); - return (rman_adjust_resource(r, start, end)); -} - -static int -nexus_activate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r) -{ - struct resource_map map; - int error; - - error = rman_activate_resource(r); - if (error != 0) - return (error); - - if (!(rman_get_flags(r) & RF_UNMAPPED) && - (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) { - error = nexus_map_resource(bus, child, type, r, NULL, &map); - if (error) { - rman_deactivate_resource(r); - return (error); - } - - rman_set_mapping(r,&map); - } - return (0); -} - -static int -nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r) -{ - struct resource_map map; - int error; - - error = rman_deactivate_resource(r); - if (error) - return (error); - - if (!(rman_get_flags(r) & RF_UNMAPPED) && - (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) { - rman_get_mapping(r, &map); - nexus_unmap_resource(bus, child, type, r, &map); - } - return (0); + return (bus_generic_rman_alloc_resource(bus, child, type, rid, + start, end, count, flags)); } static int @@ -523,20 +445,6 @@ nexus_unmap_resource(device_t bus, device_t child, int type, struct resource *r, return (0); } -static int -nexus_release_resource(device_t bus, device_t child, int type, int rid, - struct resource *r) -{ - int error; - - if (rman_get_flags(r) & RF_ACTIVE) { - error = bus_deactivate_resource(child, type, rid, r); - if (error != 0) - return (error); - } - return (rman_release_resource(r)); -} - /* * Currently this uses the really grody interface from kern/kern_intr.c * (which really doesn't belong in kern/anything.c). Eventually, all of From nobody Wed Jan 3 22:02:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cS18gDz56nsq; Wed, 3 Jan 2024 22:02: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 4T53cR6ndtz4YWx; Wed, 3 Jan 2024 22:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QBvmykGuZmoIYZL1z7kx0HVH3AcP52L0dIw0NUWd+/U=; b=ylJBkyVGOR0sAEmyg7Xe1rFnFEYEtLhqoUy5HBP0pettVWYWBGo54hjgoZHZXq0Tjrx/9u m3fEYbrMi9+ijhMeCvIXPCTs1jxRWh8jgamdvFG5ZWBUDIcJ2zquqYX6iGXxiERdW2l4A+ sv9ajWGDmuHuQ6gU6XbIkH874bB56Ic6ttSpvmekTNK8APE7X3DL4sTOiC5K1EpowaewXj ZjC1VWenI1yyUOIbzwedQG+pnsOIQtZRItfBfgruOGEv8F/uWrUXtNLubt7nyVE5cZpQGK 0wyRqfHX2E3qDUfB0cY5p7M5AQHxTF/ZcuWE4pBV+VJKHh9m6Fz69tKqAyKvfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QBvmykGuZmoIYZL1z7kx0HVH3AcP52L0dIw0NUWd+/U=; b=YZu6Aq5GvMSCyIBLxQ7FwI1U8Joukj41/qVxW+xuISn9Qk0L9mVSQA27XHJLD32CUubCvG a9CKGTyl2KFuHipq6REAgWdM1BrsOge+JpZTNc0U/I5RUJpc3yzP64dZ/LogvaKib3LVa8 vhglk/ZT3lG1buNv+3q0bPQtImsc9kcZKJ+oK1XeLomhkMnHrqlFI6Ys2kKx4iBnxzct9A 7CG2nmVZlmpzFSZfac/tnNjLhcZsgRnwejzLDDBwjrY5lrHez0kloc2KXClHIgP21VP3fW pTtA6GMa3m/wGLYBHClgv1No4w7LSOhKv0LRIK9womgYHuYF5x8j3vAtxdmAkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319368; a=rsa-sha256; cv=none; b=S//50PyNGxwA60XEpOU1pFJxHtl28fLLhdLXg7ccJyzagxGFcSQpU+l5vm0LQxIatrj/8y PL6BHuw0OvN8VQ2UFu9EGHvfupgoloO3EH2EGVpdVLujpP1wtG52ECbw65ML18YgrI/Y2B p+LGqebniTBE3cLXOEtTBHRxhbTm2ofMRBLVyaVbAH0H/XlRsMRx5WHTvr9Ij9YIv5/vfr s/y9Lonf2yiisi8kdJmq1zsT1ODqK8PN2IY4ZCmmj/F7LpOQkHwZcDR3xzMhR3Y9hOfl+s 0eWBp7Vcqr/AdqG+Hjd5QOasoGGv0if3waOns4gZ62929ydY541B+A0bzE40yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T53cR5nzdz12Xj; Wed, 3 Jan 2024 22:02: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 403M2l83072720; Wed, 3 Jan 2024 22:02:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2l5t072717; Wed, 3 Jan 2024 22:02:47 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:47 GMT Message-Id: <202401032202.403M2l5t072717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 25d378703a1b - stable/14 - aarch64 nexus: Use bus_generic_rman_*_resource List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 25d378703a1b5349784e9d77fbbb8b6cf6f430c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=25d378703a1b5349784e9d77fbbb8b6cf6f430c5 commit 25d378703a1b5349784e9d77fbbb8b6cf6f430c5 Author: John Baldwin AuthorDate: 2023-11-24 17:28:19 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:48:28 +0000 aarch64 nexus: Use bus_generic_rman_*_resource Custom activate/deactivate_resource methods are still needed to handle IRQ resources. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42741 (cherry picked from commit 658501d25930bcf24839f3308ee1da971145c018) --- sys/arm64/arm64/nexus.c | 123 +++++++++++++++--------------------------------- 1 file changed, 37 insertions(+), 86 deletions(-) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 5bd9b15dde2c..f97bf635446e 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -106,12 +106,11 @@ static bus_add_child_t nexus_add_child; static bus_print_child_t nexus_print_child; static bus_activate_resource_t nexus_activate_resource; -static bus_adjust_resource_t nexus_adjust_resource; static bus_alloc_resource_t nexus_alloc_resource; static bus_deactivate_resource_t nexus_deactivate_resource; static bus_get_resource_list_t nexus_get_reslist; +static bus_get_rman_t nexus_get_rman; static bus_map_resource_t nexus_map_resource; -static bus_release_resource_t nexus_release_resource; static bus_unmap_resource_t nexus_unmap_resource; #ifdef SMP @@ -133,12 +132,13 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_activate_resource, nexus_activate_resource), - DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_rman_adjust_resource), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), + DEVMETHOD(bus_get_rman, nexus_get_rman), DEVMETHOD(bus_map_resource, nexus_map_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_release_resource, bus_generic_rman_release_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), #ifdef SMP @@ -213,6 +213,21 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) return (child); } +static struct rman * +nexus_get_rman(device_t bus, int type, u_int flags) +{ + + switch (type) { + case SYS_RES_IRQ: + return (&irq_rman); + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (&mem_rman); + default: + return (NULL); + } +} + /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. @@ -222,10 +237,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct nexus_device *ndev = DEVTONX(child); - struct resource *rv; struct resource_list_entry *rle; - struct rman *rm; - int needactivate = flags & RF_ACTIVE; /* * If this is an allocation of the "default" range for a given @@ -244,70 +256,8 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, count = rle->count; } - switch (type) { - case SYS_RES_IRQ: - rm = &irq_rman; - break; - - case SYS_RES_MEMORY: - case SYS_RES_IOPORT: - rm = &mem_rman; - break; - - default: - return (NULL); - } - - rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == NULL) - return (NULL); - - rman_set_rid(rv, *rid); - rman_set_bushandle(rv, rman_get_start(rv)); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv)) { - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); -} - -static int -nexus_adjust_resource(device_t bus __unused, device_t child __unused, int type, - struct resource *r, rman_res_t start, rman_res_t end) -{ - struct rman *rm; - - switch (type) { - case SYS_RES_IRQ: - rm = &irq_rman; - break; - case SYS_RES_MEMORY: - rm = &mem_rman; - break; - default: - return (EINVAL); - } - if (rman_is_region_manager(r, rm) == 0) - return (EINVAL); - return (rman_adjust_resource(r, start, end)); -} - -static int -nexus_release_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) -{ - int error; - - if (rman_get_flags(res) & RF_ACTIVE) { - error = bus_deactivate_resource(child, type, rid, res); - if (error) - return (error); - } - return (rman_release_resource(res)); + return (bus_generic_rman_alloc_resource(bus, child, type, rid, start, + end, count, flags)); } static int @@ -415,8 +365,10 @@ nexus_activate_resource_flags(device_t bus, device_t child, int type, int rid, rman_deactivate_resource(r); return (err); } + return (0); + default: + return (EINVAL); } - return (0); } static int @@ -438,23 +390,22 @@ static int nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - bus_size_t psize; - bus_space_handle_t vaddr; - - if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { - psize = (bus_size_t)rman_get_size(r); - vaddr = rman_get_bushandle(r); + int error; - if (vaddr != 0) { - bus_space_unmap(&memmap_bus, vaddr, psize); - rman_set_virtual(r, NULL); - rman_set_bushandle(r, 0); - } - } else if (type == SYS_RES_IRQ) { + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_deactivate_resource(bus, child, type, + rid, r)); + case SYS_RES_IRQ: + error = rman_deactivate_resource(r); + if (error) + return (error); intr_deactivate_irq(child, r); + return (0); + default: + return (EINVAL); } - - return (rman_deactivate_resource(r)); } static int From nobody Wed Jan 3 22:02:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cT1stnz56nwF; Wed, 3 Jan 2024 22:02: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 4T53cT0ql6z4YZv; Wed, 3 Jan 2024 22:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xGEVZQRVeRXQyQ79tNNxN7ahLEekSsIUeJU6ZpT+Gmk=; b=bYVgMtQ4FgNk4DBLb4WEdTdFdcKRZHKKJ6rWA9Z2O4BAiMpF8Zhh/259Nny1xvKyBq+qJj WsUnIDCn1P/hQPO6p7J2Iu14VrpXOGpuyj70I9QU/m2nhphFVFZSgHYfZrn2+DFPXwQaV7 3TwKmUU68MDDQlqCt38/fy3O0vmX8dxceiUlU6l6yuELbRzSKpkmOkdv6KXpSs6n9bov4h bqiTEZ0hOQbftsrKp62A8IKEqGuYgjUIFsVAvmXxHt+2hL8CL0HDyD19zeiHsLeLEx2aKN ugQ6IsanK8jF4lOJ7XorRXwU+Rp7GPdlJija3qzjae/r0P+tQmA81H2r8e4Qgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xGEVZQRVeRXQyQ79tNNxN7ahLEekSsIUeJU6ZpT+Gmk=; b=PCIqjhnrtUp7v9KHTYlh8jUWv9ubLQ6jPqNLi5y+eS6/IM3wmbfrha4U4VwihFvSy5IbI8 CqWulftULj0+M+sdXkh98dZ9V+vRvvVG0355ob4PnkYTBWl7PtE6MesVbjybBoNezujo3L Z9sqq8U5UP2BLVd/0F/3/xnjT1NvVn3f1a/08LVefyXdkItG4RRBYC8XLl+XYAon4wuuLI ulx1bfLSaKTsMg32aWrwSlCD5SKgTRbvNWLDAZuT1pySch8X94rNGcz67seXC/2uLoX9n7 kQnWQtFty0Cz8JVCGD777IF/h8t/+CHqR3CrSvG5TKyCppuyYnMdbTTRMgS+RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319369; a=rsa-sha256; cv=none; b=SoOWlGYHlm2UY07bY7kmtyNRx5J3bBFCnI5MLaOMgO6Am++Z5CjE+m1j4VduBKYhYRS+f6 4wqzi6JCYCCmZ2yGmygT1vXIniuagWtNRPD1YeO4nCHWIvMcMAcTcX0AXeclvh/eKCJPK6 D0fUhusDrdD0nqtdpPq9NaO1zk/W+HlenIcvozUOU26NLKqPDP2+V2LR51HsUDBZd9LRF2 h5ulJTR50D0Rw+6ZASxNTyfIrGnIUDEnvaNIcAnf5am+qLRIKwgDf3dD6MaGvvrbLr+KDG iysihQxMJKdOmNq5424RujfvBWr2GfDiob5OTjigJjuJyzDaYfdzc2bLJ739lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T53cS73Kzz12Xk; Wed, 3 Jan 2024 22:02: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 403M2mOx072772; Wed, 3 Jan 2024 22:02:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2mbD072769; Wed, 3 Jan 2024 22:02:48 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:48 GMT Message-Id: <202401032202.403M2mbD072769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: efdbdfa9fdbc - stable/14 - aarch64 nexus: Fix a mismerge in nexus_activate_resource List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: efdbdfa9fdbc10f2cce6389d0b8a8814f0f10ea0 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=efdbdfa9fdbc10f2cce6389d0b8a8814f0f10ea0 commit efdbdfa9fdbc10f2cce6389d0b8a8814f0f10ea0 Author: John Baldwin AuthorDate: 2023-11-24 22:00:33 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:48:35 +0000 aarch64 nexus: Fix a mismerge in nexus_activate_resource Fixes: 658501d25930 aarch64 nexus: Use bus_generic_rman_*_resource (cherry picked from commit 5622f52c98cda7df1faef11d847e04500158e107) --- sys/arm64/arm64/nexus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index f97bf635446e..5b09accd2589 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -365,10 +365,8 @@ nexus_activate_resource_flags(device_t bus, device_t child, int type, int rid, rman_deactivate_resource(r); return (err); } - return (0); - default: - return (EINVAL); } + return (0); } static int From nobody Wed Jan 3 22:02:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cV4P7dz56npM; Wed, 3 Jan 2024 22:02: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 4T53cV1cF1z4YdC; Wed, 3 Jan 2024 22:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WoTlYICpXW2wFCntt+HoZ7UdWnq+ObleRw4ZCvNyDiM=; b=Pi96il5ujiVOOR0Tdbf+xfOwu2c9X3C2CxwAmQOlCSlvQuRwouOoyKQBTeNOiZkYpVOh8P wLriX4eMFngRyO1+RINamEx8daMa8lXb38yNuXAStJauf9gYDIRfz10xxFRgv535VztY4x zKRvbTZmEGxy170C2vucS8TCIJB9NBdAwt/jmyRrIcttT0KmDh7KInJjKNIZ4KQtDGErD4 11+FI5NL6bQsyS1PuwmsHnYNYrvzrqPicNYyQY+Bzzd1JrrjKp4YvMux5lmsclVodoOrmz SzKcgIi97OqroGRVW+5C2YNOBOiOP00i4tf3gQ1yyTJot9lQVKEP6gyTzWQjbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WoTlYICpXW2wFCntt+HoZ7UdWnq+ObleRw4ZCvNyDiM=; b=yzuTFwQzi9x+gAQpRqBaWlU4vSUCDSC4Txy/y8j1XXq8XOZlwAA8xkVvQwAWsxSWVz7U27 nhHtUjSSaXMba34/D3xPyhSCxqDuMPUilv29Iq5h7/vICH7ZBYghg9ElpVEyDhWTVntHM7 KoFfuUikeh5NCwfni/MUKrKe1ljCS19d7u55wdk7Sr8aHKYXTluuW1iwfPv86fZvT1c48s c5kQ1eeWNCmyP8XPvmEk3lREdBxuJhh62NsOwLPNFwn/HeqYpF2MStZH11+aXVdGyQQFak 79QPvGVQqa/qJholr96nZ+glD5mvS+iWvR3/+oQQGUON/67IpcL74wH2RKh4+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319370; a=rsa-sha256; cv=none; b=KpINmo1gDbw//KcVE/WVpThBR7iQg19USJ9gWA4hHONEe3MVSbbWDRlowxMGdTpob5LlH5 BmJ5PjVOOmV5EJVcEn1fWx7U7xBq9fhayUcxwXzv8o2yD0wgKWpEvoBki+GIBUWG7jCPiM FjrunrgCH8HBBvc4xEWVHWJgtAz7qqN/zo2NdHa2s6eJvkMmYcr4OkBo0dRCEFZic3GlOq uvCSP9eJIIJb+WwIzMm6W8wuKm7WIAfFiJjjH/ZhXiX9CqGiqFiDp3tJb21fKxjNg8++rQ taGl6q9Wd+Pya5S/lBKZEauXqXYXQR5D7Bus+lhnnbVm1bFvDya00+YiuBe7tA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T53cV0jGdz12qn; Wed, 3 Jan 2024 22:02: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 403M2ovq072811; Wed, 3 Jan 2024 22:02:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2of1072808; Wed, 3 Jan 2024 22:02:50 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:50 GMT Message-Id: <202401032202.403M2of1072808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c24913c90417 - stable/14 - riscv nexus: Use bus_generic_rman_*_resource List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c24913c904174374a378ed9c0825f1a38736a379 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c24913c904174374a378ed9c0825f1a38736a379 commit c24913c904174374a378ed9c0825f1a38736a379 Author: John Baldwin AuthorDate: 2023-11-24 17:28:28 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:48:42 +0000 riscv nexus: Use bus_generic_rman_*_resource Custom activate/deactivate_resource methods are still needed to handle IRQ resources. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42742 (cherry picked from commit f8709c826be977471df5663833f291f43d93d54c) --- sys/riscv/riscv/nexus.c | 158 ++++++++++++++++-------------------------------- 1 file changed, 51 insertions(+), 107 deletions(-) diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index d92ad7861ae9..f710e6826c21 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -81,12 +81,11 @@ static bus_add_child_t nexus_add_child; static bus_print_child_t nexus_print_child; static bus_activate_resource_t nexus_activate_resource; -static bus_adjust_resource_t nexus_adjust_resource; static bus_alloc_resource_t nexus_alloc_resource; static bus_deactivate_resource_t nexus_deactivate_resource; static bus_get_resource_list_t nexus_get_reslist; +static bus_get_rman_t nexus_get_rman; static bus_map_resource_t nexus_map_resource; -static bus_release_resource_t nexus_release_resource; static bus_unmap_resource_t nexus_unmap_resource; static bus_config_intr_t nexus_config_intr; @@ -110,15 +109,16 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_activate_resource, nexus_activate_resource), - DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_rman_adjust_resource), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), + DEVMETHOD(bus_get_rman, nexus_get_rman), DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_release_resource, bus_generic_rman_release_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_describe_intr, nexus_describe_intr), @@ -207,6 +207,21 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) return (child); } +static struct rman * +nexus_get_rman(device_t bus, int type, u_int flags) +{ + + switch (type) { + case SYS_RES_IRQ: + return (&irq_rman); + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (&mem_rman); + default: + return (NULL); + } +} + /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. @@ -216,10 +231,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct nexus_device *ndev = DEVTONX(child); - struct resource *rv; struct resource_list_entry *rle; - struct rman *rm; - int needactivate = flags & RF_ACTIVE; /* * If this is an allocation of the "default" range for a given @@ -238,70 +250,8 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, count = rle->count; } - switch (type) { - case SYS_RES_IRQ: - rm = &irq_rman; - break; - - case SYS_RES_MEMORY: - case SYS_RES_IOPORT: - rm = &mem_rman; - break; - - default: - return (NULL); - } - - rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == NULL) - return (NULL); - - rman_set_rid(rv, *rid); - rman_set_bushandle(rv, rman_get_start(rv)); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv)) { - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); -} - -static int -nexus_adjust_resource(device_t bus __unused, device_t child __unused, int type, - struct resource *r, rman_res_t start, rman_res_t end) -{ - struct rman *rm; - - switch (type) { - case SYS_RES_IRQ: - rm = &irq_rman; - break; - case SYS_RES_MEMORY: - rm = &mem_rman; - break; - default: - return (EINVAL); - } - if (rman_is_region_manager(r, rm) == 0) - return (EINVAL); - return (rman_adjust_resource(r, start, end)); -} - -static int -nexus_release_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) -{ - int error; - - if (rman_get_flags(res) & RF_ACTIVE) { - error = bus_deactivate_resource(child, type, rid, res); - if (error != 0) - return (error); - } - return (rman_release_resource(res)); + return (bus_generic_rman_alloc_resource(bus, child, type, rid, + start, end, count, flags)); } static int @@ -357,37 +307,29 @@ static int nexus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - struct resource_map map; - int err; - - if ((err = rman_activate_resource(r)) != 0) - return (err); + int error; - /* - * If this is a memory resource, map it into the kernel. - */ switch (type) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: - if ((rman_get_flags(r) & RF_UNMAPPED) == 0) { - err = nexus_map_resource(bus, child, type, r, NULL, - &map); - if (err != 0) { - rman_deactivate_resource(r); - return (err); - } - - rman_set_mapping(r, &map); - } + error = bus_generic_rman_activate_resource(bus, child, type, + rid, r); break; case SYS_RES_IRQ: - err = intr_activate_irq(child, r); - if (err != 0) { + error = rman_activate_resource(r); + if (error != 0) + return (error); + error = intr_activate_irq(child, r); + if (error != 0) { rman_deactivate_resource(r); - return (err); + return (error); } + break; + default: + error = EINVAL; + break; } - return (0); + return (error); } static struct resource_list * @@ -402,23 +344,25 @@ static int nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - bus_size_t psize; - bus_space_handle_t vaddr; - - if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { - psize = (bus_size_t)rman_get_size(r); - vaddr = rman_get_bushandle(r); + int error; - if (vaddr != 0) { - bus_space_unmap(&memmap_bus, vaddr, psize); - rman_set_virtual(r, NULL); - rman_set_bushandle(r, 0); - } - } else if (type == SYS_RES_IRQ) { + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + error = bus_generic_rman_deactivate_resource(bus, child, type, + rid, r); + break; + case SYS_RES_IRQ: + error = rman_deactivate_resource(r); + if (error != 0) + return (error); intr_deactivate_irq(child, r); + break; + default: + error = EINVAL; + break; } - - return (rman_deactivate_resource(r)); + return (error); } static int From nobody Wed Jan 3 22:02:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T53cW4X9yz56npR; Wed, 3 Jan 2024 22:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T53cW2hxFz4Ywh; Wed, 3 Jan 2024 22:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGWfpL3U2a/iTooHTOs3XRwuysQaMHI85giOAVDO+s4=; b=kYsm+oImm4XwmwKIkKInn1oRlbmdUBREoVMRPLg+hy/7+WlHzqUll/q8rdIfPSomHWIGOX 7MHXRevXjfMYWyoBqZuRfhCWlafhWLgdbDeg0AanfuwIQPcWdtQZTVxsxiV9H0YjlLfXh9 FMQIFJP6HLpWPuMoBBm9/MGnO1whpH3wHX3K5Spq6HW9Y41NGLnNk4O+c20gaZxc1YBu/E 6OJLpowvCfUQMmuMoHeBxWl8EWcf6JuQa0+R8hA08OkQudw74ePJ9GzDZNOT3vppMKBtFR Ut0F+TiFaRnExtHjV/DE0cPPgjd3UnQ3jdYWBNPMh0pGyIZBEvod5YbFa+z4ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGWfpL3U2a/iTooHTOs3XRwuysQaMHI85giOAVDO+s4=; b=y33LS9hr1Tof1FlDJAvH+K59Hr8CZAmrYudUiCgm8kGxHAu0gKwuIPnZwk7fU6735uRFib JpGGBTpkWoSOCYsCzH3FXz5Q7kaGP0cI/4bXOwV4sldLKV6crJBde3v7oVmRK/xJmG0en/ BpmNnBVTIzy9JW0SpBZZBLWdJpPJcsD2R2ygfhC+BLVnoHLCfQ/LHwgpBCeAS9JzS+Vi+C Kvr2qhCo8WLok90PLMvmPiMFAUG5J0cMz8vac1MS0KAc08LYDi66UHpek8SnHUXOy7lyyX m0j9hHHztwBbfaydujRYJtsAnASasWppAfV9lZLGhB2dL6E4d91pt0q/ltYqyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319371; a=rsa-sha256; cv=none; b=i2HsukGpJK8C1T7ihQ85mThwkhafkG47eoKMsJb8AKKkxAalrsPi++TRSnIrpR0ebLonN9 LoM4qPEJzDmnnJiN7SkSkYMJea6wRTkvz6pQMdzX35S5wDFa8jIROvCn8USf5SoYOp7UH0 l+iJlpgkntHq1kA/lgD1Fwy6TwRyDeKYl2x5WxE+ei/Cx9IHoXTin+x9wGsuuKGS9a8IA2 2UqzZIgJHH6YNUWppnQI4SGUbd8Boye2OOjtOpT7kCFkt36/SwZAPzjAtNtRcaeaqH6Uuk XevGX8obSWmEPRMozWi3XbP+ysxKjsqgAFdXT/4UkeqQ5Ov5gUoJt4Df2PMwMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T53cW1n1Gz12wL; Wed, 3 Jan 2024 22:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403M2pTx072864; Wed, 3 Jan 2024 22:02:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2pAk072861; Wed, 3 Jan 2024 22:02:51 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:51 GMT Message-Id: <202401032202.403M2pAk072861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8247b328ef0e - stable/14 - riscv nexus: Sort bus_set_resource in DEVMETHOD table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8247b328ef0e2eea93815c4e33b2463dc5be66e0 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8247b328ef0e2eea93815c4e33b2463dc5be66e0 commit 8247b328ef0e2eea93815c4e33b2463dc5be66e0 Author: John Baldwin AuthorDate: 2019-09-11 07:39:37 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:48:50 +0000 riscv nexus: Sort bus_set_resource in DEVMETHOD table (cherry picked from commit 7bf9223ca958aed45a998890f351afaae67550fe) --- sys/riscv/riscv/nexus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index f710e6826c21..06dc6412b885 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -117,8 +117,8 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_get_rman, nexus_get_rman), DEVMETHOD(bus_map_resource, nexus_map_resource), - DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_release_resource, bus_generic_rman_release_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_describe_intr, nexus_describe_intr), From nobody Thu Jan 4 03:54:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5CQq1KTtz55VQX; Thu, 4 Jan 2024 03:54: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 4T5CQq0mdNz4HdN; Thu, 4 Jan 2024 03:54:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704340499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ne8dnMw4q/IzmRsK9tenj5S1YTXelPzP8Ks/8L0AlPc=; b=l9hf2clXgz0XHI+kd1opwqRGiPYu27mNf2vv54jcg71yppim8MVrSJjUjz6voun66s8GDk lBeevoracGrpYAzlWSYrstZtQNsiR/VfKZl/QCwp8GRST6BB/dmrAlYjew0opFRnr74bCt QNd1v54MlkgkPW2mrZ1oidEZhZgMxMdAHka8rqQ1i65LEZTbKnXaq0GbSXIu9AvuMIhX0k TUmnp55Cc8Yh6Kq8ZIco0HiI65uPips2FTIHcOolH52g0NrYFzPUYshgna5zoimFudFhQ7 XCLZt9GsWD91AjtvlZDi4ltLCcqNWVWgAlYvalv5bU5fmMeum0+3wOja54CrHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704340499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ne8dnMw4q/IzmRsK9tenj5S1YTXelPzP8Ks/8L0AlPc=; b=GRewm3r0VrGGNgkx79cjxt98+6whIyna2mtdIe1R+mz+zj2vvmD6EGp5+mpvDUnFoeClIb zhS6v291h2S54UlgF+rEp0lVGZ3N8GUiNvmtwxIKCcfrzHqoxRVo1WdWfeKMBNPbVHO0eh LwjLmjyG0glvPJ+O+2oU3ZBimLrkzQ5aS4FQMbRsctZUFd4mPfjtQMGqudQHkaRLwv17Vp ICGfTVcSUJzQRfDFivoMc14a+BMcJ/bisVUcyatI5RyYO8TGbd2bifWKUhr99CzpzDYYc7 ZdrCS/cCD89KS3My9B90y4QggGcYjq9petBMZwY88oONfSNTOP1uMRqnv1JCGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704340499; a=rsa-sha256; cv=none; b=plfhMMnrNAal4YIIoOOp3mhr3b5VR83D31XIyj4W5RSw4bTGs2mAp0kpvz62C05oEFdi2X DdVBQVw9XlXsB543HESI6tiXHtgNJAXzoDAIdkV8YS5u9KbDFCZtxEpdmzjbp9O/qPGOqU YX6nFKe154g0492CtFIy/03XqiMkfZT4DrErLsnArqNLyRlDCUVtcv6B3QFebUcoMBHHfZ iBQ/FWjfzkc4oepAVRLY2/3lStGSv4EIgDluWG3jrtLbSpwIsDaff3soVZgGtx3vktGFqp dxLQ7u9fKrB5yq/NCZybc+DZnBjfnLGpNhhin7XVJsBWI9MF1mB41bbXPzLa5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5CQp6vR2z1CQ9; Thu, 4 Jan 2024 03:54: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 4043swjk059773; Thu, 4 Jan 2024 03:54:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4043sww8059770; Thu, 4 Jan 2024 03:54:58 GMT (envelope-from git) Date: Thu, 4 Jan 2024 03:54:58 GMT Message-Id: <202401040354.4043sww8059770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 915edb4ecb86 - stable/13 - iommu: fix build on stable/13 with the DDB option List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 915edb4ecb86a197a5a1d297bed819b3163558f3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=915edb4ecb86a197a5a1d297bed819b3163558f3 commit 915edb4ecb86a197a5a1d297bed819b3163558f3 Author: Konstantin Belousov AuthorDate: 2024-01-04 03:54:17 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-04 03:54:17 +0000 iommu: fix build on stable/13 with the DDB option Sponsored by: The FreeBSD Foundation --- sys/dev/iommu/iommu_gas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 4b6141b981da..cd48fcd613ee 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -1092,7 +1092,7 @@ iommu_debug_dump_gas(struct iommu_domain *domain) } } -DB_SHOW_COMMAND(iommu_domain, iommu_domain_show) +DB_SHOW_COMMAND(iommu_domain, iommu_domain_show1) { struct iommu_domain *domain; From nobody Thu Jan 4 13:47:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5Sb36SWgz56R03; Thu, 4 Jan 2024 13:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5Sb35RD1z45cL; Thu, 4 Jan 2024 13:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t/9bAOY3kxxnzJVExvo5ma4MPpOW22OuzHo9KCnAGVk=; b=XW/AV03dsHl9rMo+6p9pol3ZEsn7z/7PTKp0VhS6CG2Ewvj7hGrVEI4sWX1RTAPBE5qzoJ hJSnIs8DCviqKL+vjGX5a2UlZOFoVogEjihYG/RS4ZbA4NbfqK+DL26AYVdEJ8Fj4ux0eE faM7SiEmhFPOMGOb1hCwisGq2y3gym7DuLzYE6WYL01mbyCRROPzTWKTN9z6pHXUk1ef0n WCl7/0bvJA3781WVusG3e70sY8fAtqpxlSykJHZid944sLAl2zoG+WB4fOQZoHK9+vVCnC krviqg6z0zDNLPf+eV5OCFF7QJEWPDVpuPfli7UpHupsxMUGMAX8EPUyXaP19w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t/9bAOY3kxxnzJVExvo5ma4MPpOW22OuzHo9KCnAGVk=; b=QgGVDyM6E7N3mR4Y1l79nEVg72rMWfxt7YTBcC2VFCoFb7XFmSExNjg1H3YRNWhtgPbH/6 i/aGleYyIizkKnwYl/x+0F90OjXHIWV4lsdoAiAwvu3xZ2AG1UhE/kBZemcMtpFxcqKG2v 2Ot7mCs2kzsUbiyYy5XoRxFs2Cr3AunY03+1vYDXreiFahKWTetZHmiONVFiqWo5yfojCW QgqrzAOJmdt4DCtsCxnsJP3M6JNTVp9YwEVqhRHFmfmmObr6jNh1WFUUGspsMu5kJMQwje nxW6zO5ZNKdbtH1n6NTeva35w8CSeGuzxz6Yxnz+DOHxEuQ/DUN9hAhm+jguig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376079; a=rsa-sha256; cv=none; b=X637E2KOIeT2rKQOu6cW9QnvV/EHG/aUL3QZMsr0vIy7DjDFl941/rEkqq1YMrxXs5bzWE hOfLNCwDLfLmz1R4P6h76P5n8ki+sIfOdxnFMQdZ5T1iZAbjqIVVOusrGNbs1XvsyZPTQm fHYQyoVCn6Gu97D3zDbFkxe8nzCDFKJTb86vzVsoUwYE7zd6U6LotU5QLqnY5ARiTZWG0D L4Y/lnZOOKurJAUaGRYvEMmnRBNIsjfXcv3Dzdowwq1CTeRyS/JXhgU2eqIiC02vEMjTaf eSnrFcx/Prn/aP8/AtFVM1nhbFaylYHBNBFcnZlNj9lOm8gADjjmmALLuGKAEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5Sb34Bt1zGLy; Thu, 4 Jan 2024 13:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 404Dlx5g049573; Thu, 4 Jan 2024 13:47:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404DlxXx049568; Thu, 4 Jan 2024 13:47:59 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:47:59 GMT Message-Id: <202401041347.404DlxXx049568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0328de3def9c - stable/14 - linux: Check for copyout errors in ioctl handlers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0328de3def9cf24590b7e5262d35bde3a5e42447 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0328de3def9cf24590b7e5262d35bde3a5e42447 commit 0328de3def9cf24590b7e5262d35bde3a5e42447 Author: Mark Johnston AuthorDate: 2023-12-27 15:13:15 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:13 +0000 linux: Check for copyout errors in ioctl handlers In preparation for annotating copyin() and friends with __result_use_check. Reviewed by: dchagin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43199 (cherry picked from commit b9924c202fc34004d4164cdc50f88d8fcef26279) --- sys/compat/linux/linux_ioctl.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index d0bc8708ebf0..41c43f1ef8e6 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -1449,7 +1449,7 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args) if (!error) { lth.cdth_trk0 = th.starting_track; lth.cdth_trk1 = th.ending_track; - copyout(<h, (void *)args->arg, sizeof(lth)); + error = copyout(<h, (void *)args->arg, sizeof(lth)); } break; } @@ -1611,7 +1611,8 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args) if (error) { if (lda.type == LINUX_DVD_HOST_SEND_KEY2) { lda.type = LINUX_DVD_AUTH_FAILURE; - copyout(&lda, (void *)args->arg, sizeof(lda)); + (void)copyout(&lda, (void *)args->arg, + sizeof(lda)); } break; } @@ -1771,9 +1772,10 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args) struct linux_old_mixer_info info; bzero(&info, sizeof(info)); strncpy(info.id, "OSS", sizeof(info.id) - 1); - strncpy(info.name, "FreeBSD OSS Mixer", sizeof(info.name) - 1); - copyout(&info, (void *)args->arg, sizeof(info)); - return (0); + strncpy(info.name, "FreeBSD OSS Mixer", + sizeof(info.name) - 1); + return (copyout(&info, (void *)args->arg, + sizeof(info))); } default: return (ENOIOCTL); @@ -3214,7 +3216,9 @@ linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args) error = fo_ioctl(fp, VIDIOC_TRY_FMT, &vformat, td->td_ucred, td); bsd_to_linux_v4l2_format(&vformat, &l_vformat); - copyout(&l_vformat, (void *)args->arg, sizeof(l_vformat)); + if (error == 0) + error = copyout(&l_vformat, (void *)args->arg, + sizeof(l_vformat)); fdrop(fp, td); return (error); @@ -3283,7 +3287,9 @@ linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args) error = fo_ioctl(fp, VIDIOC_DQBUF, &vbuf, td->td_ucred, td); bsd_to_linux_v4l2_buffer(&vbuf, &l_vbuf); - copyout(&l_vbuf, (void *)args->arg, sizeof(l_vbuf)); + if (error == 0) + error = copyout(&l_vbuf, (void *)args->arg, + sizeof(l_vbuf)); fdrop(fp, td); return (error); From nobody Thu Jan 4 13:48:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5Sb526Zwz56R7b; Thu, 4 Jan 2024 13:48:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5Sb46BDmz45WH; Thu, 4 Jan 2024 13:48:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAwJNPoFcB6S7nmYyWyeniHDqqylclwnk5KaHLxlQEk=; b=rthuTOYQpG15fwnAQOvPrUDzSDG/yDx3VRTm1Vh/08IsPpOkoxvKyWIzRN9+NdSe5HfjzB p3dLE5Uq87l8pyRgdh4jusEKlWZvGIJmKchrIEqUYuFtfrsYtYQn3vy/yh2YfZCRrKGTwp S+n6vANUsCvtMOcYMBfC33Oj/KyXZaxVxN4QmVeBTdu7AtkUMNFKyfjZymc5C9J+MLk/hn 6hl4jPjnEUKR6FLvtFwkXOG1DK8rlg7QdfjjbuTsY5izjs5j2sH8g9PUOdwEgEP1hLLBtc mqJQnc5bSZhqsVvlRTa7jg+3RnCtm1eOZfVHPNmu56FnolKZXw3uyIEJ5jFnrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAwJNPoFcB6S7nmYyWyeniHDqqylclwnk5KaHLxlQEk=; b=WMGBORHBIVNpTJLagTBH9yhzr7hyEKik8iLEvaG0kTBazpioL42wOcgh/ChiKxwYKdmVra GzdSOYKY5MqWCDT375rkBOPfKzsJne68uHeIkmKFk+t5UXECHkouF1SIm/yjrLHVGOdBex 56hSpiCW9S5mr01dUpgblSM+wdhg8hRDkSxzOeRiMY3D4qKgzjwlOAK6bHrbICFuL+191M gOKc6qYPrl3jwRMdMjIjKzMiQz8LzDd7HPzZTz88mVGZRum7Ff8Me4prT6oy2xpGFHC3f9 BPXiaJh5F0jtmqxuetTSvuR/AH4XNxO1x7uSekQBOW7ou4CP9ZSJZ++v5+/gqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376080; a=rsa-sha256; cv=none; b=EHX1+FgblCmNvGGZoTGRrH3M2wDm3QgvdKfyYO/+Yg6IUojXMUO58XGroLSgzj6SQsd+9s g7l3hxg0+ldh5at+IOqY2PfQekEgc6PAKNtcvCprn52+8etrtmD1M3kWWpfWrYxLBvXPDL IuaXmY6vL7JxcFB+rqMPDrQSxWH+fwFJdugYSv2tuhbS2VI4LPCS5tRcAf5i36Dzsf9xbn 7ohz/wXbVtp8p0CLQLlEAo3i62QaLA6W/E7HI7gIVmAN3ZA3ih7DZNb0uscc2A2f2iWn1O mwMdR5l+SIf0lv5c4PhaZQ2bfzMdoSCOws1wxqz4YKKF3Ku3fpXHOw28Jps8Sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5Sb45FwhzGK6; Thu, 4 Jan 2024 13:48:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 404Dm0Nb049646; Thu, 4 Jan 2024 13:48:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404Dm0Tu049643; Thu, 4 Jan 2024 13:48:00 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:48:00 GMT Message-Id: <202401041348.404Dm0Tu049643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3e53fec0027e - stable/14 - fb: Explicitly handle errors when getting or setting a colour palette List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3e53fec0027e79e10b1024a42e0ba8fa1aa6bc18 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3e53fec0027e79e10b1024a42e0ba8fa1aa6bc18 commit 3e53fec0027e79e10b1024a42e0ba8fa1aa6bc18 Author: Mark Johnston AuthorDate: 2023-12-27 00:00:14 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:13 +0000 fb: Explicitly handle errors when getting or setting a colour palette In the VESA driver, simply ignore errors. It is not clear to me how to return them to userspace. This is in preparation for annotating copyin() and related functions with __result_use_check. MFC after: 1 week (cherry picked from commit ddc8576d297937a1395f47550a8f5b1fac79afc2) --- sys/dev/fb/vesa.c | 16 ++++++++-------- sys/dev/fb/vga.c | 24 ++++++++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c index ee3409dfa755..e1cca3a70725 100644 --- a/sys/dev/fb/vesa.c +++ b/sys/dev/fb/vesa.c @@ -1698,12 +1698,12 @@ get_palette(video_adapter_t *adp, int base, int count, b = g + count; error = vesa_bios_save_palette2(base, count, r, g, b, bits); if (error == 0) { - copyout(r, red, count); - copyout(g, green, count); - copyout(b, blue, count); + (void)copyout(r, red, count); + (void)copyout(g, green, count); + (void)copyout(b, blue, count); if (trans != NULL) { bzero(r, count); - copyout(r, trans, count); + (void)copyout(r, trans, count); } } free(r, M_DEVBUF); @@ -1729,12 +1729,12 @@ set_palette(video_adapter_t *adp, int base, int count, return (1); bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; - r = malloc(count * 3, M_DEVBUF, M_WAITOK); + r = malloc(count * 3, M_DEVBUF, M_WAITOK | M_ZERO); g = r + count; b = g + count; - copyin(red, r, count); - copyin(green, g, count); - copyin(blue, b, count); + (void)copyin(red, r, count); + (void)copyin(green, g, count); + (void)copyin(blue, b, count); error = vesa_bios_load_palette2(base, count, r, g, b, bits); free(r, M_DEVBUF); diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c index eb081ae533d7..9851838aa8f3 100644 --- a/sys/dev/fb/vga.c +++ b/sys/dev/fb/vga.c @@ -2854,6 +2854,7 @@ get_palette(video_adapter_t *adp, int base, int count, u_char *r; u_char *g; u_char *b; + int error; if (count < 0 || base < 0 || count > 256 || base > 256 || base + count > 256) @@ -2863,19 +2864,26 @@ get_palette(video_adapter_t *adp, int base, int count, g = r + count; b = g + count; if (vga_save_palette2(adp, base, count, r, g, b)) { - free(r, M_DEVBUF); - return ENODEV; - } - copyout(r, red, count); - copyout(g, green, count); - copyout(b, blue, count); + error = ENODEV; + goto out; + } + error = copyout(r, red, count); + if (error != 0) + goto out; + error = copyout(g, green, count); + if (error != 0) + goto out; + error = copyout(b, blue, count); + if (error != 0) + goto out; if (trans != NULL) { bzero(r, count); - copyout(r, trans, count); + error = copyout(r, trans, count); } +out: free(r, M_DEVBUF); - return 0; + return error; } static int From nobody Thu Jan 4 13:48:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5Sb60lnpz56Qsj; Thu, 4 Jan 2024 13:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5Sb56tHZz45qG; Thu, 4 Jan 2024 13:48:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jf9d2u7bxM4OGKbm7+wW9F3iANpWqYMXfzR7qUUt+Is=; b=O1iQ8lcmNjtbVGA17XzWI8/S7RYohs5utgS0U79USneQjYkHwerU6SvtY5zS2d2SMeZ379 /BoyT+pFTawIR3Uf3twaywhvrUT2LEDTPNh4LsczP0vC0dkQLs6E5SgPNm3mih71svFQHv 0BYQ9VSZgDQkYL2klthp4BoU9I2/A1sL+iLsu+h8BW1803NI+kOOVFCXi0EoXdxwclS1Td zrlky3+bK+8CFEvZU0mNAl3xFHdYxYu3UnGUqlmA6IWI/8R/0UQn8UjGXaYmxvt88NXOf+ 1J6ICoJFS5QXn/ADmrBr9Wxqgw0mi0Cv2Z35b9GxPXGQ90v4rpwGh7SNeYdzvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jf9d2u7bxM4OGKbm7+wW9F3iANpWqYMXfzR7qUUt+Is=; b=Ux7UkbyeLZNMbLAeMiMApsrCV2YdX6qBrL76Ta3+kfTc0XkkZGFzq6inxDxHT7lAXpeeko gwjvRO2pUrTh9Sieb9rPjPeDGZvympqnbeeIByIb/c2/18vEb8sUjy2iOZ+UpBXnIYUp3M NIwWzUOPBGp0fCT+wA1rfsiPojTAXGnBPiGC0sYRiwdeHiZ50nVMgdjgby7hDhouLq2eOf 5cMHHcZ3h3Nb50i3WpleCfKzyHA9nmKJPlcNppp6ToVwQ+Lrgb5buO4IZnWJut3IDi4zQE xEjTeQvI/9OAfXcipAHlancmvq9EbhE9PQWEbkIqo/99Fh6LGiVylA7qPQYK/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376082; a=rsa-sha256; cv=none; b=tmFOKVdqnA6Cubyvdh6Zytwxtj68xphMqdi5nbNLdjFP4to3zyS4wCOvHF+FccxMQxsIvc aAtnLiVug41Z0Rklo14MfpLJne9faCp/fxM5U7c7Jg5yeNe2ztfOY2zNxpGmqLw8jJap6E 0G3i6J1+C6RCLrsAkVbmNoW2BQ50YamVvkfcIUEEyiEfILOKKHngE2zivfab/rHe0Gi69x itxDSuj1OJv75pVPXDL4+2yI67s2I03uQautqEAVmS8HxEZ2m96i53pY2WPeMyLYK5TJ5h L4RzF3v4ehJwWx7UVRKqWV/HFVOn9OXbGxlTEuvxAXB9n8YLr63CMHKV1KIorA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5Sb55zNZzGPX; Thu, 4 Jan 2024 13:48: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 404Dm1rQ049688; Thu, 4 Jan 2024 13:48:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404Dm1Ot049685; Thu, 4 Jan 2024 13:48:01 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:48:01 GMT Message-Id: <202401041348.404Dm1Ot049685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: aa545f18d384 - stable/14 - netmap: Ignore errors in CSB_WRITE() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aa545f18d384d2e925dcc8de8f7ad7fb73e66dc1 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aa545f18d384d2e925dcc8de8f7ad7fb73e66dc1 commit aa545f18d384d2e925dcc8de8f7ad7fb73e66dc1 Author: Mark Johnston AuthorDate: 2023-12-27 15:13:29 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:13 +0000 netmap: Ignore errors in CSB_WRITE() The CSB_WRITE() and _READ() macros respectively write to and read from userspace memory and so can in principle fault. However, we do not check for errors and will proceed blindly if they fail. Add assertions to verify that they do not. This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: vmaffione MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43200 (cherry picked from commit 99efa2c88d93c6272a8f54b18d18d0fd9d60f137) --- sys/dev/netmap/netmap_kern.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h index 24f741084a8d..8618aaf82299 100644 --- a/sys/dev/netmap/netmap_kern.h +++ b/sys/dev/netmap/netmap_kern.h @@ -2450,8 +2450,19 @@ void netmap_uninit_bridges(void); #define CSB_READ(csb, field, r) (get_user(r, &csb->field)) #define CSB_WRITE(csb, field, v) (put_user(v, &csb->field)) #else /* ! linux */ -#define CSB_READ(csb, field, r) (r = fuword32(&csb->field)) -#define CSB_WRITE(csb, field, v) (suword32(&csb->field, v)) +#define CSB_READ(csb, field, r) do { \ + int32_t v __diagused; \ + \ + v = fuword32(&csb->field); \ + KASSERT(v != -1, ("%s: fuword32 failed", __func__)); \ + r = v; \ +} while (0) +#define CSB_WRITE(csb, field, v) do { \ + int error __diagused; \ + \ + error = suword32(&csb->field, v); \ + KASSERT(error == 0, ("%s: suword32 failed", __func__)); \ +} while (0) #endif /* ! linux */ /* some macros that may not be defined */ From nobody Thu Jan 4 13:48:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5Sb71vYDz56R04; Thu, 4 Jan 2024 13:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5Sb70sBsz45cM; Thu, 4 Jan 2024 13:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ysWutvo9WBVrqSmDYNA3hXij8/Kw16jM667vXkNd7jg=; b=sU7YKMOWYCNzTjPcH2xMNAlfTZhftY72pPiO7+86xkB73Vxj6ApFOkS6ULw3bkJjRhfc41 2KofI2yRtOh2CKc4DpulNlbddupnT0TEM5uB8j7zT/Q1oarfPIMZHjr77scklaqBeIyGzh cakkVgP1NsNVXfGnhSd/Bs/LHM/f6ZOQkBVzucQGXM17A1HwXnUjXk3+xS8mxogYw+ObZD t/HVZPrNnQAl17RUB+P9WduH3nFbpNRX6t0f8RL8Qy6oDlmwtCJDaqTo+xjB3XjlEX9ZWq U4KRpJvupmh0NbCNjPGmdsYEWTjjIbh2mk+L6lI6HJBSaURtRQPK+IcMtQGEeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ysWutvo9WBVrqSmDYNA3hXij8/Kw16jM667vXkNd7jg=; b=tm2+J3eUEXMBKn0twnqg0NeBzTZ5yeGSmxc3452749rY7+/I8b0phdE4a7KbETgM/LoLvx 5wROf9PT5mmCyG5dEdwut7hh2GkBqCIvasWDaA6nePq5oz8dJIE4t/uUD3ZwJ/xICemEmF kOtC1dfv3irTMsGwU7ZkmfVoeLwBzR3wrHqliWVnePG/+12/CaB9Y4imm+OKHpHPP0QHKO mIUMSdER2vYfobzJhOXnaRTzAqnnbIDl/4YSVhDWfRE5ff9eX5yMISG5oYlexeGDgMt34b uDXAlTDXtzUXAVef1cxuI4TwAGM0+o3GqFxtWG4653icesepabuJbIGltfwslg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376083; a=rsa-sha256; cv=none; b=sj/cqCEIlxN5iNJ9fy0ETDgiVc9dYRbL7X+Y1KtASxd4y+Dd3qTmB+WuFIbZrOMjXM/HtH q39NIVe/NSfcQ+Ri7zsZ2kgItvb6r5nbkG1E5zAw0jRSoEIzQ3X4RGpDOAw/W5GXRpPpmb BAqe2ksUPoLHJikPpJy44hAyRLfSibdAVBiW9cYyXvXW0OAbxpQIuDjsxvdfQ0l0pW70sR 1DXwv33fpDVIcEE9t/o0tzKyr3y43HoIA0JzYXFUkIaRp8UnvslLcI9Wwsm3FwPiFZt4bm 59BBa+IZUZG6BjZ5pYJJg4aRBXLTJo5vth3Zt50MU9OWKul2Zf+FM4xBbzoBvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5Sb672fWzGPY; Thu, 4 Jan 2024 13:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 404Dm2Qo049736; Thu, 4 Jan 2024 13:48:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404Dm2iV049733; Thu, 4 Jan 2024 13:48:02 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:48:02 GMT Message-Id: <202401041348.404Dm2iV049733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1e7389419122 - stable/14 - hptmv: Handle errors from copyout() in hpt_set_info() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1e73894191229aa896b99348a31cfa93260c08de Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1e73894191229aa896b99348a31cfa93260c08de commit 1e73894191229aa896b99348a31cfa93260c08de Author: Mark Johnston AuthorDate: 2023-12-27 00:00:01 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:13 +0000 hptmv: Handle errors from copyout() in hpt_set_info() This is in preparation for annotating copyin() and related functions with __result_use_check. MFC after: 1 week (cherry picked from commit b4a9e6d81447c46c7bae56dc798097d9d3a4c495) --- sys/dev/hptmv/hptproc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/hptmv/hptproc.c b/sys/dev/hptmv/hptproc.c index 136b9c59a02a..8f9fffdc5af1 100644 --- a/sys/dev/hptmv/hptproc.c +++ b/sys/dev/hptmv/hptproc.c @@ -338,13 +338,13 @@ hpt_set_info(int length) if (err==0) { if (piop->nOutBufferSize) - copyout(ke_area + piop->nInBufferSize, (void*)(ULONG_PTR)piop->lpOutBuffer, piop->nOutBufferSize); + err = -copyout(ke_area + piop->nInBufferSize, (void*)(ULONG_PTR)piop->lpOutBuffer, piop->nOutBufferSize); - if (piop->lpBytesReturned) - copyout(&dwRet, (void*)(ULONG_PTR)piop->lpBytesReturned, sizeof(DWORD)); + if (err == 0 && piop->lpBytesReturned) + err = -copyout(&dwRet, (void*)(ULONG_PTR)piop->lpBytesReturned, sizeof(DWORD)); free(ke_area, M_DEVBUF); - return length; + return err == 0 ? length : err; } else KdPrintW(("Kernel_ioctl(): return %d\n", err)); From nobody Thu Jan 4 13:48:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5Sb84BChz56Qtk; Thu, 4 Jan 2024 13:48: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 4T5Sb825Zwz45WQ; Thu, 4 Jan 2024 13:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CAj6zI3RZIuWkJ0TdyjXGszBRJIUSm+KBBobcd9MOuU=; b=ooSq+GDR8rntyh+e8GC3qGl+SGHgWcY7pgGmy/epG84DSQISGmrAAGLrq0e382GkCNAG2X SvCCWdz3kCBsOZyw4HYIFok4P3IZ8X837t7vk4swV1Bpcp/r6oEgTXC9wShbd1pnprL2NG SbSXgSiFvRS0Grbw3pEupN0UWpjxVbXcboh8ULU/tkq6r0nmXwSCXMiCzVCAlwrfMOYkVu C0xTvOM7q8JQjCpG4jTYtbG01fGeXrwJIrAiar1ZLK/jaNvhLqdq28oethEeoMCv4XxYyb nWesba3ICGRTA/IjhWFNGLulUTtPw2nFOknRS4JkGh8f+xyHl8tPYbCiwNE+Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CAj6zI3RZIuWkJ0TdyjXGszBRJIUSm+KBBobcd9MOuU=; b=NcrxCP2/tA8n/+5ly2HY/bZej2V6geRIrO9rwoA54WElA74B6UKal54+vHicJ5jXRPTLgz bwYume1ITyAr7X/qbH0YcOeSkLFrYVShZHAGwtbX8kqlT/47cRHCuStWvd8dtiOGnuE2VP Ak/E4ZMUEHAZHLoaIgqVlKGjVD4ui6E8G40jefI+N9WU6hh3hwhaVpx6kQe6OSvwQafX7X F2DuqfIzgGpLakLQM1BlmTk1WC0a2le65tiUfnNGIeOrd+T8eVlUgEdBKG70Ql5JeAW4Nu r9JTl4UEd5nGBVpy29JxHK0ryxHUQN8a69G70dZ1SA0uomZd50+J8c8AJmHu3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376084; a=rsa-sha256; cv=none; b=vrhIgcTJVcWzXSi1ukBIiGHAKyDtSND6rV+S27ZgUjsiWJ+9G3T6gznzEeNP65kr3lDeNb QjXE/O0u+SncADwWLxtgWntC4u8d5z7QSdDavhmpeRtp1SyP0o2kGpcwVqMII0yqZnAMjp vPjDGZr45yp2BprSPZPVX8O5ZKk4lwwOurt8wB5iTy7yCUzvgZVSviF12vrFoFXbBz1jv1 1Rc/GAMDHAHT+i4U+vMP2xxg/giU5NADUG2BV3hzfzl9y+J1SgSXKSIUWtNGDzfx+a+HzO sq48m45l/IlfRUjPJk8TAJ0rjTaAGvvUeLwwLAB9fZRyB56VIGChDTKtqxYntw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5Sb80z5RzFhT; Thu, 4 Jan 2024 13:48: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 404Dm47R049785; Thu, 4 Jan 2024 13:48:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404Dm42L049782; Thu, 4 Jan 2024 13:48:04 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:48:04 GMT Message-Id: <202401041348.404Dm42L049782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9fcacb1e6869 - stable/14 - tdfx: Handle errors from copyin() and copyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9fcacb1e6869eec4b8de67e072c64036d074249b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9fcacb1e6869eec4b8de67e072c64036d074249b commit 9fcacb1e6869eec4b8de67e072c64036d074249b Author: Mark Johnston AuthorDate: 2023-12-26 23:59:21 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:13 +0000 tdfx: Handle errors from copyin() and copyout() This is in preparation for annotating copyin() and related functions with __result_use_check. MFC after: 1 week (cherry picked from commit 2873d841f81cdc205135370875d3d71a3402e90a) --- sys/dev/tdfx/tdfx_linux.c | 5 +++-- sys/dev/tdfx/tdfx_pci.c | 48 +++++++++++++++++++++++------------------------ 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/sys/dev/tdfx/tdfx_linux.c b/sys/dev/tdfx/tdfx_linux.c index 56d52753e950..2a51ab6d1cc6 100644 --- a/sys/dev/tdfx/tdfx_linux.c +++ b/sys/dev/tdfx/tdfx_linux.c @@ -59,8 +59,9 @@ linux_ioctl_tdfx(struct thread *td, struct linux_ioctl_args* args) if (error != 0) return (error); /* We simply copy the data and send it right to ioctl */ - copyin((caddr_t)args->arg, &d_pio, sizeof(d_pio)); - error = fo_ioctl(fp, cmd, (caddr_t)&d_pio, td->td_ucred, td); + error = copyin((caddr_t)args->arg, &d_pio, sizeof(d_pio)); + if (error == 0) + error = fo_ioctl(fp, cmd, (caddr_t)&d_pio, td->td_ucred, td); fdrop(fp, td); return error; } diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index 5aa0d9785e27..d73ec841f333 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -511,20 +511,16 @@ tdfx_query_fetch(u_int cmd, struct tdfx_pio_data *piod) switch(piod->port) { case PCI_VENDOR_ID_FREEBSD: if(piod->size != 2) return -EINVAL; - copyout(&tdfx_info->vendor, piod->value, piod->size); - return 0; + return -copyout(&tdfx_info->vendor, piod->value, piod->size); case PCI_DEVICE_ID_FREEBSD: if(piod->size != 2) return -EINVAL; - copyout(&tdfx_info->type, piod->value, piod->size); - return 0; + return -copyout(&tdfx_info->type, piod->value, piod->size); case PCI_BASE_ADDRESS_0_FREEBSD: if(piod->size != 4) return -EINVAL; - copyout(&tdfx_info->addr0, piod->value, piod->size); - return 0; + return -copyout(&tdfx_info->addr0, piod->value, piod->size); case PCI_BASE_ADDRESS_1_FREEBSD: if(piod->size != 4) return -EINVAL; - copyout(&tdfx_info->addr1, piod->value, piod->size); - return 0; + return -copyout(&tdfx_info->addr1, piod->value, piod->size); case PCI_PRIBUS_FREEBSD: if(piod->size != 1) return -EINVAL; break; @@ -552,22 +548,18 @@ tdfx_query_fetch(u_int cmd, struct tdfx_pio_data *piod) case 1: ret_byte = pci_read_config(tdfx_info[piod->device].dev, piod->port, 1); - copyout(&ret_byte, piod->value, 1); - break; + return -copyout(&ret_byte, piod->value, 1); case 2: ret_word = pci_read_config(tdfx_info[piod->device].dev, piod->port, 2); - copyout(&ret_word, piod->value, 2); - break; + return -copyout(&ret_word, piod->value, 2); case 4: ret_dword = pci_read_config(tdfx_info[piod->device].dev, piod->port, 4); - copyout(&ret_dword, piod->value, 4); - break; + return -copyout(&ret_dword, piod->value, 4); default: return -EINVAL; } - return 0; } static int @@ -578,6 +570,7 @@ tdfx_query_update(u_int cmd, struct tdfx_pio_data *piod) u_int8_t ret_byte; u_int16_t ret_word; u_int32_t ret_dword; + int error; /* Port vals, mask */ u_int32_t retval, preval, mask; @@ -627,17 +620,23 @@ tdfx_query_update(u_int cmd, struct tdfx_pio_data *piod) * at once to the ports */ switch (piod->size) { case 1: - copyin(piod->value, &ret_byte, 1); + error = copyin(piod->value, &ret_byte, 1); + if (error != 0) + return -error; preval = ret_byte << (8 * (piod->port & 0x3)); mask = 0xff << (8 * (piod->port & 0x3)); break; case 2: - copyin(piod->value, &ret_word, 2); + error = copyin(piod->value, &ret_word, 2); + if (error != 0) + return -error; preval = ret_word << (8 * (piod->port & 0x3)); mask = 0xffff << (8 * (piod->port & 0x3)); break; case 4: - copyin(piod->value, &ret_dword, 4); + error = copyin(piod->value, &ret_dword, 4); + if (error != 0) + return -error; preval = ret_dword; mask = ~0; break; @@ -678,8 +677,7 @@ tdfx_do_pio_rd(struct tdfx_pio_data *piod) /* Write the data to the intended port */ workport = piod->port; ret_byte = inb(workport); - copyout(&ret_byte, piod->value, sizeof(u_int8_t)); - return 0; + return copyout(&ret_byte, piod->value, sizeof(u_int8_t)); } static int @@ -703,10 +701,12 @@ tdfx_do_pio_wt(struct tdfx_pio_data *piod) } /* Write the data to the intended port */ - copyin(piod->value, &ret_byte, sizeof(u_int8_t)); - workport = piod->port; - outb(workport, ret_byte); - return 0; + int error = -copyin(piod->value, &ret_byte, sizeof(u_int8_t)); + if (error == 0) { + workport = piod->port; + outb(workport, ret_byte); + } + return error; } static int From nobody Thu Jan 4 13:48:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5SbB67f4z56RB1; Thu, 4 Jan 2024 13:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5SbB3mZdz45lm; Thu, 4 Jan 2024 13:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MzwGBWNS95w9ghTLa2LY8xYGP8GH7XcK/Ncbo02jwTk=; b=hWF+VD09bIt59XdQb1kvNk4NPkTcckya1Bj9m9VYggtkt5HQEzaIdntUpw7IhmK/x/xP9k Ke68Mj9DDOZqrz06OajG8X7n+9mU0tfxemtWzF8OS/P32vv/4uwGyrSbF5hhiXqoLThhu4 Et4aC0i4bl9J/O08T2ruYOyh4DZWOfjGjzfeMCZL4MGlT+68xoJDhiOIP3QppNju10oqid MjRNiNkkJ7SRoi53n0r0kL3hDIEfaXNBcyDZmykBgkYM2nI9PXChK5AZQPtyA4jvr5Lvg2 VFcDwKkwgbQInpvbfr4XJZggmOUxCGZsBcKNriDY245FbsAVVVrVfp0M66gv6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MzwGBWNS95w9ghTLa2LY8xYGP8GH7XcK/Ncbo02jwTk=; b=CyZfhYT0+b9VFv/OJOwdOOmMmnunj30+/6HSb7Z3s7Gqcm9gMpWVYcASjF9ggWzUkZPx3f F7g+OXrkVsN4NclaYA1hHx3Es/2WYv2AzPT4CDLOjtkiWE1zhy5ZanOiu58X0I2SnFg36z vFrLxmFVc2LXOFAR/qMmlvtf/98V7K1y9gueOzy7X6kJCPt+MuyyGvrt6MfVrCa57mTNPy y5IKdeqpmFTq7hkj9l2SV+6uuJvAf5SjfweRWwMT96qYEZpc7H6L+kl6jg1Osd/u7XDW0M ApZoY/Wq5UF1FfdkDSsIrmPEd2LSiVxG2f18QRCkZg2I4l1dFyijAb06CsyTcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376086; a=rsa-sha256; cv=none; b=SIwUIGamAO+SHDaogMG1BuICei2Vq+JPm7T9H6xqXl5gj3qtZk/EUvhzbH+UTuJYUlhgAm yRqoPRN64spf4AjAGEvKt2oagCGbyIzI3sknt7vxxSLVkUl8CKD8WupuWMKO62aBbcWnhI CkoEJ7t61G4CQ1gUIOuvujkIUtMpkQmvpyXdHo/KxrIPuj24ogLpMXHbKDBI8Cr41USzLG l7zQXfZ6SSIY2+xm4nQiBqUB6d3YPouSO7BbUihIRl3gA8Uvq6grpvkQaExBPSaIATEoCi 3mlrEfXqK42Sa2c6q4DtgdsvChd+9b25qXfv5H2Z+/TVqlisz/Gtko0LzNYJ9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5SbB2sVVzGPZ; Thu, 4 Jan 2024 13:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 404Dm6Af049883; Thu, 4 Jan 2024 13:48:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404Dm6x9049880; Thu, 4 Jan 2024 13:48:06 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:48:06 GMT Message-Id: <202401041348.404Dm6x9049880@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 34f0ee9d5ac0 - stable/14 - atrtc: Add a required include List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 34f0ee9d5ac05c8d42952d506e3ea95692be1089 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=34f0ee9d5ac05c8d42952d506e3ea95692be1089 commit 34f0ee9d5ac05c8d42952d506e3ea95692be1089 Author: Mark Johnston AuthorDate: 2023-12-28 20:16:39 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:18 +0000 atrtc: Add a required include PR: 275867 MFC after: 1 week (cherry picked from commit c63dda466a5ba6a9ec0a5de18f9180683f9af982) --- sys/x86/isa/atrtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c index 45fd00c64da2..7c42cc28566e 100644 --- a/sys/x86/isa/atrtc.c +++ b/sys/x86/isa/atrtc.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include From nobody Thu Jan 4 13:48:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5Sb941YLz56R9x; Thu, 4 Jan 2024 13:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5Sb92fS0z45lY; Thu, 4 Jan 2024 13:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tESDQLtLeuq7s9RJWm9PGPMnRvxS2h54XYaKwGY/zFE=; b=oGqjkSz/LXk51IDhuU700vSqJvHCxTp0i6T/V3R03SoQJ4GrFClyU0bLF1VQurfdaU69/A z6iUOqcs5m7RP/qSjQBlqrKRmPLSoUlartW3nI7Ah42c0nl+Tq6EReh2Btz35WkAvU3l// PK5Jj97lBD+pDZVuNHciWGJ9hnL0yZokWO8YBtm3kFCLQUnC4bat1uMNWSMZJDcmQ9VJIP s9+lsbp8ovbSxxuDpRw61GlRv+O0clj7iEQvYO44LVEL3UnedfB4M9SrvkKPo+/qv9yq6+ TvKE60iEj0KYb6HVRf5vyXXQLfDgXJbQzmqoUs3ZCZvU0scDC6l4jPtryTWnxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tESDQLtLeuq7s9RJWm9PGPMnRvxS2h54XYaKwGY/zFE=; b=xLhIe3PL3hzDpk4y5hJ/0G7RjPjLgHdanqM4gfu5z5d0CRwtQ9S3pXB1joq++z815GbNB/ a7MRvwRF+RqWvAdeNX7PyNsD65Z2MT7iogjYIlsnn7EY7xfEY9frMETFIk5XegDjQlQ3cA Bg1eYvSMwPJCJ6VnQeDXirsi/Px1vnWqagy2tUjf8sF6FKC7FFOznmfGnMSUQ1Td1KX5BH qcHFTltaSk8Ei3R3fqukCRKKdEU9eAw9jB555H3EV8PmxDz+F78IB5G7zxAwTgKAq9Sha5 MMzy6TgCrfUeZHD/vB3KhJ/+mMn+LyN1ZDHHC6DDgULV/z2G9qAgKo5bvsXDyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376085; a=rsa-sha256; cv=none; b=TOfNYE31NYCf5Jb3u3KByoe9MeVqZ4QydDSjFQX05fSU4pIorEX5g3xKuE581GjPlOxdG4 crTuzaZ2c2qDZ/ROGIEAERimmy4K8JAqd7A5E/fwlOXpQfZqJwhhkExeWWiryzjaKHklSN ck89KEVKMcWsFCbFojjzrUIbHNIS7pRxIxrHemNNDrR+ceVJUl95fj0KmaSe+W7p9LVOTt 3lpYV2xdC+kiaXFxMLp3srWgb5suYwriRHznV5Z0WkmOrJJ3fqIRhJyDu8xsFGtDCkpq1w iCAJVhtCK5dBJPKuxyl7iU++rBMTYtG+Mx1dvYiZPOUJQpthJb4B9AdxmK5T/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5Sb91ltGzGM0; Thu, 4 Jan 2024 13:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 404Dm5OP049833; Thu, 4 Jan 2024 13:48:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404Dm5rD049830; Thu, 4 Jan 2024 13:48:05 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:48:05 GMT Message-Id: <202401041348.404Dm5rD049830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2c840bedd6bb - stable/14 - ti: Handle errors from copyin() and copyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2c840bedd6bbbbe679163a6a9740fd9762d4d945 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2c840bedd6bbbbe679163a6a9740fd9762d4d945 commit 2c840bedd6bbbbe679163a6a9740fd9762d4d945 Author: Mark Johnston AuthorDate: 2023-12-26 23:58:24 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:13 +0000 ti: Handle errors from copyin() and copyout() This is in preparation for annotating copyin() and related functions with __result_use_check. MFC after: 1 week (cherry picked from commit 916273680b6d6439a117d6cf8c2d7423234bc1c0) --- sys/dev/ti/if_ti.c | 56 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index 4d7f43f080cb..6f88862d8009 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -502,11 +502,13 @@ ti_copy_mem(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, int segptr, segsize, cnt; caddr_t ptr; uint32_t origwin; - int resid, segresid; + int error, resid, segresid; int first_pass; TI_LOCK_ASSERT(sc); + error = 0; + /* * At the moment, we don't handle non-aligned cases, we just bail. * If this proves to be a problem, it will be fixed. @@ -548,7 +550,7 @@ ti_copy_mem(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, */ origwin = CSR_READ_4(sc, TI_WINBASE); - while (cnt) { + while (cnt != 0 && error == 0) { bus_size_t ti_offset; if (cnt < TI_WINLEN) @@ -573,11 +575,13 @@ ti_copy_mem(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, TI_UNLOCK(sc); if (first_pass) { - copyout(&sc->ti_membuf2[segresid], ptr, + error = copyout( + &sc->ti_membuf2[segresid], ptr, segsize - segresid); first_pass = 0; } else - copyout(sc->ti_membuf2, ptr, segsize); + error = copyout(sc->ti_membuf2, ptr, + segsize); TI_LOCK(sc); } else { if (first_pass) { @@ -597,7 +601,7 @@ ti_copy_mem(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, } else { if (useraddr) { TI_UNLOCK(sc); - copyin(ptr, sc->ti_membuf2, segsize); + error = copyin(ptr, sc->ti_membuf2, segsize); TI_LOCK(sc); ti_bcopy_swap(sc->ti_membuf2, sc->ti_membuf, segsize, TI_SWAP_HTON); @@ -605,8 +609,11 @@ ti_copy_mem(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, ti_bcopy_swap(ptr, sc->ti_membuf, segsize, TI_SWAP_HTON); - bus_space_write_region_4(sc->ti_btag, sc->ti_bhandle, - ti_offset, (uint32_t *)sc->ti_membuf, segsize >> 2); + if (error == 0) { + bus_space_write_region_4(sc->ti_btag, + sc->ti_bhandle, ti_offset, + (uint32_t *)sc->ti_membuf, segsize >> 2); + } } segptr += segsize; ptr += segsize; @@ -616,7 +623,7 @@ ti_copy_mem(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, /* * Handle leftover, non-word-aligned bytes. */ - if (resid != 0) { + if (resid != 0 && error == 0) { uint32_t tmpval, tmpval2; bus_size_t ti_offset; @@ -649,7 +656,7 @@ ti_copy_mem(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, */ if (useraddr) { TI_UNLOCK(sc); - copyout(&tmpval2, ptr, resid); + error = copyout(&tmpval2, ptr, resid); TI_LOCK(sc); } else bcopy(&tmpval2, ptr, resid); @@ -667,21 +674,22 @@ ti_copy_mem(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, */ if (useraddr) { TI_UNLOCK(sc); - copyin(ptr, &tmpval2, resid); + error = copyin(ptr, &tmpval2, resid); TI_LOCK(sc); } else bcopy(ptr, &tmpval2, resid); - tmpval = htonl(tmpval2); - - bus_space_write_region_4(sc->ti_btag, sc->ti_bhandle, - ti_offset, &tmpval, 1); + if (error == 0) { + tmpval = htonl(tmpval2); + bus_space_write_region_4(sc->ti_btag, + sc->ti_bhandle, ti_offset, &tmpval, 1); + } } } CSR_WRITE_4(sc, TI_WINBASE, origwin); - return (0); + return (error); } static int @@ -689,7 +697,7 @@ ti_copy_scratch(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, caddr_t buf, int useraddr, int readdata, int cpu) { uint32_t segptr; - int cnt; + int cnt, error; uint32_t tmpval, tmpval2; caddr_t ptr; @@ -715,7 +723,7 @@ ti_copy_scratch(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, cnt = len; ptr = buf; - while (cnt) { + while (cnt && error == 0) { CSR_WRITE_4(sc, CPU_REG(TI_SRAM_ADDR, cpu), segptr); if (readdata) { @@ -756,18 +764,20 @@ ti_copy_scratch(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, "%#x (tmpval)\n", segptr); if (useraddr) - copyout(&tmpval, ptr, 4); + error = copyout(&tmpval, ptr, 4); else bcopy(&tmpval, ptr, 4); } else { if (useraddr) - copyin(ptr, &tmpval2, 4); + error = copyin(ptr, &tmpval2, 4); else bcopy(ptr, &tmpval2, 4); - tmpval = htonl(tmpval2); - - CSR_WRITE_4(sc, CPU_REG(TI_SRAM_DATA, cpu), tmpval); + if (error == 0) { + tmpval = htonl(tmpval2); + CSR_WRITE_4(sc, CPU_REG(TI_SRAM_DATA, cpu), + tmpval); + } } cnt -= 4; @@ -775,7 +785,7 @@ ti_copy_scratch(struct ti_softc *sc, uint32_t tigon_addr, uint32_t len, ptr += 4; } - return (0); + return (error); } static int From nobody Thu Jan 4 13:48:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5SbD050vz56R0F; Thu, 4 Jan 2024 13:48:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5SbC4MFRz461v; Thu, 4 Jan 2024 13:48:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u/zCt7MEz6Q0aqhx4BRsZoHRHEP6jkqKCIKkHLumYXc=; b=aKRlo8+0L3w+gHTSnNCrJSqcYy4RHdYU+SuaWn6oKeffY/eSDbvmQ+hLRWI4tCKRq9bC8U 3G9PopnWGSuPOl79YXol/QxLNKenah9PKDkr87Sk0OgP4RhAMXiCwMry5oSM7sRK/gAFNv 408eNkwn7747hBe8sY/S6lqlBz+8/FivOEqMhU0E90mtyBEFUmXsmtoJzCxPd4iKGHAUdy Fwg3RBV8tPpfOZNu9/b/pfZGLgiuk04Su5N1d4vGvtvB77y/FSlFkvqBT406KO3oSnEM3w +ngP0NZh5hjYEorBpCFemN0n+ScPLzBmDPucUO6qWcYtzSMLoJb6h/SgGO0cGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u/zCt7MEz6Q0aqhx4BRsZoHRHEP6jkqKCIKkHLumYXc=; b=chl9Jxfkewu+gnzE8sIKZnkgxP754zrC4QdSVHQ51kXEw9cfmmPzD/JadPK1kE67vWQ9iF G1b635AofujgUjZ33y9VatfTahigfVmaW5TIqWZtqazjHKY0o8i5cZzFAfpLbUGDzfmN8Y 4iHyprU274JCrr/t4Zi0MkX5EjjtETsP0e/4gEeQK0HfnGbW3gMjQhaVKuiENFAhrHnDvW lW1FBE4P6bYsFDoEe27RQSga+lUvfKl8gdLPvcZrB5AXLacy9K6P97MWA0tLN1mVfirMDe O5+6QDHrowrnxdm75YlY9oV2BNoEfzt9EsVU3FJxNhJQJckpLB3Io6nkTO3bRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376087; a=rsa-sha256; cv=none; b=BxEcQeGersbJsfBQgV7UfjiZ8IZuLwjnf360l4m7IqtP2Ivg51sOzvUxqjLRv64hkpNMMC IkTRB62IuGC2hc2n/3KLsVInQxE6vqgrWNFzxROfzqwjJuLQJT86Nlt2kjcbtFRGsy9elQ lWY66VNCEoLjIHidhtCSNiGSwIN7CWdkm6fOGdCSnD0j9H/zOr2n/cJbgr/MC4E8wTLgYr EB9KyVJVhBDsbwecq7a6GSWcH1GiNO90LGhl5JG3O8z6uq/7jZYaZ8Hpx0kboQCTQZagiC 6BneuTYVjRMKLfWWwdSEMGDOnmCK5288TPknvd/ObyodFNLU8szG+XlkAupEiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5SbC3T0JzGRt; Thu, 4 Jan 2024 13:48: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 404Dm70E049934; Thu, 4 Jan 2024 13:48:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404Dm7gK049931; Thu, 4 Jan 2024 13:48:07 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:48:07 GMT Message-Id: <202401041348.404Dm7gK049931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9fcacefa3812 - stable/14 - sa: Check for errors from copyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9fcacefa381276db6f19ab21992aff7237f8e6c1 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9fcacefa381276db6f19ab21992aff7237f8e6c1 commit 9fcacefa381276db6f19ab21992aff7237f8e6c1 Author: Mark Johnston AuthorDate: 2023-12-27 21:28:28 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:26 +0000 sa: Check for errors from copyout() This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: ken MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43203 (cherry picked from commit 4d3c234d8eb32f903d630b371208a0a931d3d5fe) --- sys/cam/scsi/scsi_sa.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index 78b22ba7eba1..07b917daa0c0 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -1495,8 +1495,12 @@ saparamsetlist(struct cam_periph *periph, struct mtsetlist *list, bailout: if (need_copy != 0) { if (error != EFAULT) { + int error1; + cam_periph_unlock(periph); - copyout(params, list->params, list->param_len); + error1 = copyout(params, list->params, list->param_len); + if (error == 0) + error = error1; cam_periph_lock(periph); } free(params, M_SCSISA); From nobody Thu Jan 4 13:48:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5SbF07D0z56R2p; Thu, 4 Jan 2024 13:48:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5SbD5V2Wz466y; Thu, 4 Jan 2024 13:48:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DCW3rNOsQ1tZbjOsKGUyk42y+xszjLIOSEgxLiUP+80=; b=ucOzfUgW6P0yHjUeLQ9LmohhxbH+86KQ1WW6Y6GJKQiSIjcubTyt/D6abzhF03SQyLFM/Q yyih2AYl8qbOm8qbYmKEQlUKBv2ADHKo/rZsn7Lk5OPZfubxxCX60vkAFcwIyMUuSvp7Ll 4ao42x6aIB0uxKsy9nuI/4pFfFV8zEy7g5P7gQ5xhAzO7symSQfuUatqFY/RNhFedZEgtk /C+nLA4P7HIa4zxzRmrkmNFO3jYPH/j97SfjC6jgi/TnBhS4emN+8SN+Q+8uc8IBJsTiAr KP4BLKtn347LMRw545wFVGeYU4lUyfswAixWT5uI96Cv3JckGL9hWIL8GfWl3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DCW3rNOsQ1tZbjOsKGUyk42y+xszjLIOSEgxLiUP+80=; b=jHc5jX5bU2CWUGgaxoOPpPoJEo3b4Y06sTPt3qJwPr2jAIHn2vOqpnxYOGQFbCEDICmiII xW+MP5lhr4pUu5JhhtSoAAuNpJtG+vSIN8RXBzvxPOIIm5KrFIZQHpQUOBubHdMTKYxbzF OTzHIIUiFYkBJ41SE9P0rTiGpPvk5Fnaa/L16G2l3Bv9NQSTtDZo88Pt91SHTaWIQ0qlIz JeN6Sr/99rhniljREqMGXVcIavaiBhshgIilonndw0cqirDBsSFgt3e4IeMefIVGngIj7w 6Juqy2VRqGCUCa1Z5bluM6KCM/3iwi3MjXN5HLd+WRpEnN0mWP5oebRW6vcXZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376088; a=rsa-sha256; cv=none; b=Pm2xJ6IoWOKnJ9g9CFOcsluRVkmte/UKd2L0sjYdSPuNFexeI1iYyVaN/zt8ndNe8zm6L3 roWRm8fY5Jqpd5q2vxn4g6GmoAEwwIpjZtkp78tP4sPyiJ2iSE+jkmSHEXhTRbowCendgf WSVZdiruhlToAzZczlp5kvK70Z9gVd1pPSy3r7K9ePDoAOaqodpz4FLoXePB1ZSRvd62yc pxUWa5UmriTVS+dhzXZ7HExGNMR08T6SSeFsVekOCn9hPRU4vftatYszTvQx47WpAOzbOV RCvEahYOwoRoMlWwsjSYZ7Ed16bw8YZyU/JhTbiyA5p60FJGVYPc9vh3mprWyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5SbD4b4hzGK7; Thu, 4 Jan 2024 13:48:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 404Dm8MH049979; Thu, 4 Jan 2024 13:48:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404Dm8mU049976; Thu, 4 Jan 2024 13:48:08 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:48:08 GMT Message-Id: <202401041348.404Dm8mU049976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 55205beabb0f - stable/14 - sa: Make sa_param_table[] const and static List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 55205beabb0fb5dbd7c73e5632f70a6eeacd2909 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=55205beabb0fb5dbd7c73e5632f70a6eeacd2909 commit 55205beabb0fb5dbd7c73e5632f70a6eeacd2909 Author: Mark Johnston AuthorDate: 2023-12-27 21:40:12 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:42:35 +0000 sa: Make sa_param_table[] const and static No functional change intended. Reviewed by: ken, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43204 (cherry picked from commit 46a6cfee1bb61145717166a3bbbd8dbad27fbf36) --- sys/cam/scsi/scsi_sa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index 07b917daa0c0..aaf79b74a509 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -633,7 +633,7 @@ static struct sa_prot_map *safindprotent(char *name, struct sa_prot_map *table, int table_ents); static int sasetprotents(struct cam_periph *periph, struct mtparamset *ps, int num_params); -static struct sa_param_ent *safindparament(struct mtparamset *ps); +static const struct sa_param_ent *safindparament(struct mtparamset *ps); static int saparamsetlist(struct cam_periph *periph, struct mtsetlist *list, int need_copy); static int saextget(struct cdev *dev, struct cam_periph *periph, @@ -1356,7 +1356,7 @@ typedef enum { SA_PARAM_TYPE_NODE } sa_param_type; -struct sa_param_ent { +static const struct sa_param_ent { char *name; sa_param_type param_type; int (*set_func)(struct cam_periph *periph, struct mtparamset *ps, @@ -1367,7 +1367,7 @@ struct sa_param_ent { {"protection.", SA_PARAM_TYPE_NODE, sasetprotents } }; -static struct sa_param_ent * +static const struct sa_param_ent * safindparament(struct mtparamset *ps) { unsigned int i; @@ -1403,7 +1403,7 @@ saparamsetlist(struct cam_periph *periph, struct mtsetlist *list, int i, contig_ents; int error; struct mtparamset *params, *first; - struct sa_param_ent *first_ent; + const struct sa_param_ent *first_ent; error = 0; params = NULL; @@ -1444,7 +1444,7 @@ saparamsetlist(struct cam_periph *periph, struct mtsetlist *list, first = NULL; first_ent = NULL; for (i = 0; i < list->num_params; i++) { - struct sa_param_ent *ent; + const struct sa_param_ent *ent; ent = safindparament(¶ms[i]); if (ent == NULL) { From nobody Thu Jan 4 13:49:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5ScY4t1jz56R3T; Thu, 4 Jan 2024 13:49: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 4T5ScY2zdrz48l3; Thu, 4 Jan 2024 13:49:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpknvwzOENiRDwClNYdxkVjwvG5o9SIYE/b0JTyelSA=; b=NLZlt+qGMwRuNJHr6MxihfKMFKDgqHrgAaoiPa6tBpuMrvd0cKRPrFu3fw4gdYN1eq+GlY uRbyXuIw9U/dDsSrZ7lQFlBUovb5z5vJxkxddPGT7xbOuu48QTbZOEOIgnLzKC2VgDxsPs 9UHaJR3lrWtoCv3REZ93H6pQh9U+EQzX1RExjP+bIm1kOLYZDk4YLYr2nOJekTKKQq/7pi u4hN4GtcSBvMvOu/+0nC+UY2BKQtT153F9PlhPG38CNtxapQcMXQdCgBxUiAHNE2ATYXVC g+gk3gG6mrNpOv/rd4bOVBRdaL0i2QvSI7s3rqMYMwTComD0F7ZASOGCkg77BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704376157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpknvwzOENiRDwClNYdxkVjwvG5o9SIYE/b0JTyelSA=; b=U+n9YBDvwC2MX8mwGddVdcIcjlpg426MzIfEt+UMtNmKliup3LVu2V2UjVv8P/uCs6Z171 aiao9PpYmXpUC+aYnjVSiKd6e7nFRX33r2hC5zGZ86xGG8N5iV25YwqZnoZXT9aWtaw+SL 5qMaG8nPIJ899EDsk2DuvFBUw/Oib6y2uZU9ldUWLBnfk/D727nl3juzeaWSn11/9fiUg1 jYjyFJzmCj473rbF/Dty4b1DURca7iZEDEJNsCCjJWMKtU1BDEd2QS3aVyMvqCbCBSjkIS xZhtNQOtmGCrCkwHyARaltgMjyBwq8iOP41AJRaBbOMoWsz5VxB9YDcjST8W5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704376157; a=rsa-sha256; cv=none; b=SKrcHkCWCuZKGfz8YwexmHrEmeikvJqk5pSp0kmcxCqT0j0JJeR2AL+F9v+m4xmZwaDJBT jLKKXl3Je3feGy/I0RpfjQRURhbZKstpSZyme/vMGAqLlgVxLb0G7/kneLttOCBcChPk66 /06bIR4XA3RnaDiF+9FJpnXzgeU/JRAYrqRZfBKRyY8c+YxMNzdkk6JUDjzkmAKLUy/snO NA99FyvgwerylTFG5Aow/W+yPOjQzhKo3HZ3aeL1mO2+CQS3J2kU2ahVIQrb2OM3jUp7HW Yu6yp0Fv/EwAYUOGyV2zWtfEKdfrEKtukQlX5Qa3hTNPI1Tz2wG9ScRpOTQupg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5ScY23cCzGFd; Thu, 4 Jan 2024 13:49:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 404DnHv6050351; Thu, 4 Jan 2024 13:49:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404DnHOu050348; Thu, 4 Jan 2024 13:49:17 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:49:17 GMT Message-Id: <202401041349.404DnHOu050348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d32f39bd5fbf - stable/13 - atrtc: Add a required include List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d32f39bd5fbfa1b2af7cdb2b665b97c30ca4cf30 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d32f39bd5fbfa1b2af7cdb2b665b97c30ca4cf30 commit d32f39bd5fbfa1b2af7cdb2b665b97c30ca4cf30 Author: Mark Johnston AuthorDate: 2023-12-28 20:16:39 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:49:06 +0000 atrtc: Add a required include PR: 275867 MFC after: 1 week (cherry picked from commit c63dda466a5ba6a9ec0a5de18f9180683f9af982) --- sys/x86/isa/atrtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c index 1e8c9b9c6bbc..102f93feeadf 100644 --- a/sys/x86/isa/atrtc.c +++ b/sys/x86/isa/atrtc.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include From nobody Fri Jan 5 00:22:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgW3llDz55fT4; Fri, 5 Jan 2024 00:22: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 4T5kgW3J1Hz4dKD; Fri, 5 Jan 2024 00:22:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cTaru4oACzE2GIMYlpqM71bHupNknSYS+wfpLeukjaY=; b=GeFMISI6+5gU+j9gHV4YfS3e18PbAfIhIKHsxromMiLiQSUoUOMSGMTGy2n7qDfhi19/jz yMk7Lgmc8yjiafsNuTnBHtiHerKv6juHJXbIaJxJmwNXQtYOp6EcDUrj8NrY0gqWH3t5g1 LORwdhwc9G91aaNOcsziR5JgqaikAapteJsFRjMW0gdd+3TwvsZnaJ2fcNvMAcT6goc1mn 6GtaWhlTS2b9dqrEn4pic1+7zUM3ZFghcXG5PK22krN2MZ2YiN1FVZLWqTg3WWKOi/iL6/ LLPC9R4Ns5kfdGcPbV7nWXbN0FGlE6aCFuYY28yfMCZQccOID5HLY8hzeEx4IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cTaru4oACzE2GIMYlpqM71bHupNknSYS+wfpLeukjaY=; b=YpsOIMzEzFg0IdK9L4Dav3arsxels2i4DIrmZOSXdCiKz2ShwDR5hunjyPsA7KBsj2j36W ofbce1zNkipvyJ+DEx9I/TjA4LQa2DI9L4duxPsSUSiqZ8lA9GlXpPQAzvZVsQE5GJllFV OTXvOZbrK958z+esvnExJbRLWCCy4PhwFRged42Ed3suwmKHXZCLjTx1NB6GT7Gc5kN+mq wFJBC/qMYiYmZL1lt2ueIaNXDgBaV6WL7PPc7UdMH7MFUN+HKGw37ZKkPOMlGMgmZanq2D bdilCgVWGsBzaDBVc+J/MpBX2rO4jY85KTO4SWzl1vT0kBO6ZSRRqPjjUVe9Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414167; a=rsa-sha256; cv=none; b=wct0evO/kBuhpCD4G6WxFMZ553i0jqNOhOoc3/Heqcz82C0An/4I838fkz0JrNf8KlE+AM 9KzEhFW68/RGvwtBCN3vd6QlcSc8AhU/XkR2kGwSMcYAyUOhMBHK4hCViKx+DHH6/Awa7p fw5zat40b20JmSA2tEMitaI5Ezb3xdu7SdDLvzmCZr3AvOduzK5VKqK2yQ8HzJHyXwzR2M Io7xuacVxRewpu61EeGYRnuU98kV2c1VxkdfSk2165dnnJFRhS8TicGS6jpJ3W/Fu4KGwb i3Ni94lJX0/P26E8M8Yw4D1XUKU2W/1zKZQVP3u9EtMfH71baBrSAHmSH+aZFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgW2LrMzbsX; Fri, 5 Jan 2024 00:22: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 4050Mluf024896; Fri, 5 Jan 2024 00:22:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050Ml6v024893; Fri, 5 Jan 2024 00:22:47 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:22:47 GMT Message-Id: <202401050022.4050Ml6v024893@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1309b3fd0113 - stable/14 - agp_amd64: Use rather than bare prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1309b3fd01138c7a65a22c2297f261be3d313f0e Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1309b3fd01138c7a65a22c2297f261be3d313f0e commit 1309b3fd01138c7a65a22c2297f261be3d313f0e Author: John Baldwin AuthorDate: 2023-11-29 18:31:16 +0000 Commit: John Baldwin CommitDate: 2024-01-04 23:13:26 +0000 agp_amd64: Use rather than bare prototypes Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42826 (cherry picked from commit 71ac18a84df2771fb9bd91e2349eae91602c4e46) --- sys/dev/agp/agp_amd64.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/agp/agp_amd64.c b/sys/dev/agp/agp_amd64.c index 7ad974f698e9..a123e6f3bbfd 100644 --- a/sys/dev/agp/agp_amd64.c +++ b/sys/dev/agp/agp_amd64.c @@ -47,12 +47,9 @@ #include #include #include +#include #include -/* XXX */ -extern void pci_cfgregwrite(int, int, int, int, uint32_t, int); -extern uint32_t pci_cfgregread(int, int, int, int, int); - static void agp_amd64_apbase_fixup(device_t); static void agp_amd64_uli_init(device_t); From nobody Fri Jan 5 00:23:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgq4Y6Pz55fWw; Fri, 5 Jan 2024 00:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5kgq2PnLz4ddr; Fri, 5 Jan 2024 00:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/UgCICwu8jIvoo4fw+aJrwm0lxxng36Q4GJtTSyIGJU=; b=uaVNlLI2x/tKPr2/3Zye2VOCLrxqndcdiI+n29o+EBvW1OyQ46FRFg7s+M3BW7dkS7THwO 5orWL4UCyIrznPAgM4/Y6Nyiv8oYcKfMovfubzdbWUoKgFyQKsp6Hym0J5QxYQ9djHdmwm mJl2+5lIgiiWgMmqtvxwYx8baS1bPdoQI27Azkkf11rTU/8ogO+EYiJyGNXAqY5mHmO3Jn toOAOnQM5UDqLmdS63szVvfLaqLlfmMRYLnK7r1lsdBm2CITS+ihZbUn945JzFcbBT/Qpy harxNY8fo2OKuxrgIlrr+TyzRRNbvcrM/RNJ6kB2Do3D7AA/Cntku3/CaPdBgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/UgCICwu8jIvoo4fw+aJrwm0lxxng36Q4GJtTSyIGJU=; b=cL2c5AhRgIeGZKkHm9r9kWqO+PUzBDYMOb+kNIEB18Mz8XIV7LNWU/1lMSwDZ4YJ2ZXq4n i/atOwvW8qjpngUVbTaXKa9pXN5JLjA9Ve8Kugabpo3OWrI7PPxiq4fMNOW2MQuBmCOGkx emfE59YjidzLv7wdsa7UJba2FXEUEwTPOll+FBfIDW7+NGyVMyldqBMn/dwKrDxTlcJVEs g0bNBUBipZu5rhUMf+hpOnXG8JHwHl/cFqVhexaJNNIfptOVK0EYssS5KMQVarq4YP44pN i8DURf9l652i5zaPpqRzaDDPIJseoj2BPmLy1wdtGlcA7ph1oM2IkwYXRs2iiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414183; a=rsa-sha256; cv=none; b=GgPGlB0vI0O9LLPyN4OL4Xcr7yCp/yWIjWU/VTF0VL232y1mVu94tknbwDQXmD4S+Pi9yS 2uI8aBt5otz3c1u2R/MMezw4uOXV+g5hwADx/R09ek8HEzrovTGV/Ul5pw54tf9OCv3W+G qJ0ZIy6TELvtHTOQuNQH3VcATUBS7EWnQQlgrA7x+L6EeZ/JjUCzEooyUuk/Tc/qnRuP4u cQx0cjh7qtzvtth8jhw2e4y5sBS1pa13UzV9Jdqev3LGLZrOGp8xmleXQvvWsHUK3HUrCM rAZgds9IbRb56w+Rnn9lKmgqLjsV7ycvVN2VWJoEolr8GZlKOI/zWQdsU9xFnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgq1V70zbf8; Fri, 5 Jan 2024 00:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4050N3wO025155; Fri, 5 Jan 2024 00:23:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050N30j025152; Fri, 5 Jan 2024 00:23:03 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:03 GMT Message-Id: <202401050023.4050N30j025152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e427f47865c4 - stable/13 - agp_amd64: Use rather than bare prototypes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e427f47865c4b73e16e90af1b407858e0d46a03a Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e427f47865c4b73e16e90af1b407858e0d46a03a commit e427f47865c4b73e16e90af1b407858e0d46a03a Author: John Baldwin AuthorDate: 2023-11-29 18:31:16 +0000 Commit: John Baldwin CommitDate: 2024-01-04 23:13:39 +0000 agp_amd64: Use rather than bare prototypes Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42826 (cherry picked from commit 71ac18a84df2771fb9bd91e2349eae91602c4e46) --- sys/dev/agp/agp_amd64.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/agp/agp_amd64.c b/sys/dev/agp/agp_amd64.c index eeaf6b59ea93..a2b6ffab95ea 100644 --- a/sys/dev/agp/agp_amd64.c +++ b/sys/dev/agp/agp_amd64.c @@ -47,12 +47,9 @@ #include #include #include +#include #include -/* XXX */ -extern void pci_cfgregwrite(int, int, int, int, uint32_t, int); -extern uint32_t pci_cfgregread(int, int, int, int, int); - static void agp_amd64_apbase_fixup(device_t); static void agp_amd64_uli_init(device_t); From nobody Fri Jan 5 00:23:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgr5Y92z55fJ5; Fri, 5 Jan 2024 00:23: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 4T5kgr3g99z4dSw; Fri, 5 Jan 2024 00:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=07avkOBc3SgKoshmH582t8Czy1HIbDUDZgQu+nxQzFM=; b=U8JHRTJTK+R5ytBn1/tadEXagOZ5jnjM/orAn4kOsym70fMzFBTui8p391JMXhx470PElU qqT82mxI3zRoJ1E/l4rKDYFN/65UhSWTrJFEP+7X4TI5PD77VnOqJlW/upR2oyyrJ2ZPND Cy41mc8I/8GN1pz1tLQgbO3S0hNDrptAxu0CPZIUxoyBcCdaiwzTjZP/idFtDR9xafDIGi RB0QlocYQNlxJBYrzIkdljFuLtmISlhwnQrHHEhYhtI6VI3knEWDtVpmGi5lIT/s3tpR5C MhR8ABNRO1WCidCPskdHV5G/C3zzL2AXW1iAgM1px/QsPeBqese4rbUMG9Qjfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=07avkOBc3SgKoshmH582t8Czy1HIbDUDZgQu+nxQzFM=; b=Qs4JAJvoXj7I154m9UxaoXF3qPKvPIxj5tWoPGk4tIfgq8/S3wji9mTTyVxw0l75ZjpCJk FXEm62NNheSUsp+D60LsGCpsKBLgt2gMYHIZsF0ji2WBedDzfHkkIMpbG4jGvrSOj9pkjp Bt9QaKmPWh2XbqeEpRVYHg4whPFzJ+RcHA7B/xbSh9VeYjDUSlNwNv6sILtO62113lvAbN 8Khu+3XVL86tPf+GcEZLb+/Bl99XGMV5XtSZukCipZgj/SLE+/lgaWlqkIq0evZJ7WyP5B JXQ1MnLTHiZPIN87nw36PG7Uw4O14ny8AKheNAWB/YjM63WIzp4Xnh4QALjpsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414184; a=rsa-sha256; cv=none; b=qqhpvz9lVIxolKLZQNPOiR1chAKBD8q6MucetDbyooOtRPoDS0ocUParwhjwUzS6hiuZow phlwcJCakVk6YMP0rddSK0t7c4PAZU1+bNxTI5nozkWbVb6HQtxhBW8EOU0Ky6tmsBlUjH +/6mXk9bZA8WzE6o3IQhS8Q7VsaoLFf/dcSQ4GTqpYVqR0feA870eXgfgp85UD6F9IQeJE NSB5RNoJrOJRIxCZRjVtCNB4lM3TQmkh36sYwiaIHHQs2LufYm5rDRTbKYOk+ILBQgKGWr +ys+xW/Ex/RoNrFU+Pd9qg4RAacl7psApJEDXleTMGmudIN0Rb4c/hBhq5xxrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgr2ltBzZn1; Fri, 5 Jan 2024 00:23: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 4050N4uQ025214; Fri, 5 Jan 2024 00:23:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050N42W025210; Fri, 5 Jan 2024 00:23:04 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:04 GMT Message-Id: <202401050023.4050N42W025210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3c9405052568 - stable/13 - bsdinstall: Replace correct, but fragile, string builder with open_memstream. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3c9405052568fcc33ed815b0913aab432b2cb912 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3c9405052568fcc33ed815b0913aab432b2cb912 commit 3c9405052568fcc33ed815b0913aab432b2cb912 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2024-01-04 23:16:48 +0000 bsdinstall: Replace correct, but fragile, string builder with open_memstream. The old one triggered a false positive -Warray-bounds from GCC (the compiler assumed len was always 0), but it was also fragile with manually computed lengths paired with strcat vs using a string builder. Differential Revision: https://reviews.freebsd.org/D40658 (cherry picked from commit f66a8328c3effcb4fbd7807b798d0288b865421d) --- usr.sbin/bsdinstall/partedit/scripted.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/scripted.c b/usr.sbin/bsdinstall/partedit/scripted.c index 08cabf4e0989..69fba8f2cfa8 100644 --- a/usr.sbin/bsdinstall/partedit/scripted.c +++ b/usr.sbin/bsdinstall/partedit/scripted.c @@ -194,23 +194,26 @@ int parse_disk_config(char *input) int scripted_editor(int argc, const char **argv) { - char *token; - int i, error = 0, len = 0; + FILE *fp; + char *input, *token; + size_t len; + int i, error = 0; - for (i = 1; i < argc; i++) - len += strlen(argv[i]) + 1; - char inputbuf[len], *input = inputbuf; - strcpy(input, argv[1]); + fp = open_memstream(&input, &len); + fputs(argv[1], fp); for (i = 2; i < argc; i++) { - strcat(input, " "); - strcat(input, argv[i]); + fprintf(fp, " %s", argv[i]); } + fclose(fp); while ((token = strsep(&input, ";")) != NULL) { error = parse_disk_config(token); - if (error != 0) + if (error != 0) { + free(input); return (error); + } } + free(input); return (0); } From nobody Fri Jan 5 00:23:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgt0DdWz55fGN; Fri, 5 Jan 2024 00:23:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5kgs4n0Dz4dXv; Fri, 5 Jan 2024 00:23:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9ZByZXH2UMwFpJBq4MIJbyowEiHJeK888Z7nlOrtWc=; b=fvK20fsoI2u436QhtWIk6L9peqIUHia6/u3SxU+rUctVbpPqyKdWBV4ZKbxg4+CDqzOQQ3 vc4G0KZ8hZWcIepzHnP2hn1D1can29qkn+ko0gj3EaSDDIl9lyzV8OnVcvd16RlsSkTyiK /N0TY3SUuIPYv5HZ81wl+3dH3T5HC9CygNLH+b5A9/1wZEMx13HH+uyPj1al/aSQpCe0xK QTGTyrThvy5XRKqzYs92lWgyIlbQ14OxrIe04AfhCM58s2P1QnbicooegMSVQ81JesQxoL QaND6svii4Kh1eJdO8DXtHtu8BuOHYLMSdsH362lZkbZIsQW91Xrj9TvVJY5RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9ZByZXH2UMwFpJBq4MIJbyowEiHJeK888Z7nlOrtWc=; b=VhTWWlQqVQRA3DpxOCBq0YBjNvIEhAB17Mnb3l7RLp/VVal4yWGa8Bja+m/fQUr57Lrwhl 374zn6pGJRfPbE76n2jonwIHFaAyFIadeIq/IuJXYJCY/T+mUULANYUAIoE7kGQdYjZSYU chbefmECS8FW/DLJpxe8+4oE6fdnic/Gp2D9tHxQ51V/8+VUvLEtocREr8AbdSoH6Vouj/ 8qm2BT4ZdXDgHV7E7Lozt+0PonNUVkmnZkKHOmYm/LETjRHzqa2wQhYkBErThD+K26HRiY RTtRi6VDDy1jJTw2gzYTXx5DXYpJcYYMtNTnGJqRW4jHE25UjKjgOJRFGn8Xlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414185; a=rsa-sha256; cv=none; b=EIB5DTlTcNO8b9LuQgo1OXLgDYWQy3ReVzzeWezkdRiyObetRsDHaypUZJAoluSf/PGWok KG3kZyHbAFANBKnqwCA3JCBVD40wXqxpC2iYbTnMM8OH8SN3u6jl+inXFehAWnkU9FH6gU u08GcrfyzdnLQjWhB66hAOi+0prkSNowrG02cKvTvxoHc8LcjRI6iIHQkdVogGDIgz4be7 LrZCsAQVtaPmU4xIvLZKezOfyM5XrslMg1zqB+2mzwg5jI/8fV5TZqS48vwE7RFowLC5Zq SuQ6mI/drcEiDNs+PpVAIqdB+LuSQmYMM/WgpQ+VkZ9D41jh7Rffb+ZJ5KbYlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgs3ml9zbp7; Fri, 5 Jan 2024 00:23:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4050N51A025257; Fri, 5 Jan 2024 00:23:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050N5oi025254; Fri, 5 Jan 2024 00:23:05 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:05 GMT Message-Id: <202401050023.4050N5oi025254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 70f7bf34e3b4 - stable/13 - bsdinstall: Handle errors from geom_gettree. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 70f7bf34e3b4d0934c8c38ff49852eb6be343ac5 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=70f7bf34e3b4d0934c8c38ff49852eb6be343ac5 commit 70f7bf34e3b4d0934c8c38ff49852eb6be343ac5 Author: John Baldwin AuthorDate: 2023-06-28 18:11:00 +0000 Commit: John Baldwin CommitDate: 2024-01-04 23:42:26 +0000 bsdinstall: Handle errors from geom_gettree. geom_gettree probably never fails, and if it does there isn't much of a fallback other than aborting partitioning. However, a few places were checking the return value and not doing anything with it triggering a unused-but-set-variable warning. Checking the errors resolves the warning. While here, check for errors in other places that weren't checking for them at all, remove a spurious double call (the second call overwrote the mesh structure leaking all the pointers from the first), and close a few resource leaks on error paths. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D40779 (cherry picked from commit 23099099196548550461ba427dcf09dcfb01878d) --- usr.sbin/bsdinstall/partedit/part_wizard.c | 40 +++++++++++++++++++----------- usr.sbin/bsdinstall/partedit/partedit.c | 22 ++++++++-------- usr.sbin/bsdinstall/partedit/scripted.c | 34 +++++++++++++++++-------- 3 files changed, 62 insertions(+), 34 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c index 2380e4d1f1b8..db689fd223d7 100644 --- a/usr.sbin/bsdinstall/partedit/part_wizard.c +++ b/usr.sbin/bsdinstall/partedit/part_wizard.c @@ -58,31 +58,37 @@ part_wizard(const char *fsreq) startwizard: error = geom_gettree(&mesh); + if (error != 0) + return (1); dlg_put_backtitle(); - error = geom_gettree(&mesh); disk = boot_disk_select(&mesh); - if (disk == NULL) + if (disk == NULL) { + geom_deletetree(&mesh); return (1); + } dlg_clear(); dlg_put_backtitle(); schemeroot = wizard_partition(&mesh, disk); free(disk); + geom_deletetree(&mesh); if (schemeroot == NULL) return (1); - geom_deletetree(&mesh); dlg_clear(); dlg_put_backtitle(); error = geom_gettree(&mesh); + if (error != 0) { + free(schemeroot); + return (1); + } error = wizard_makeparts(&mesh, schemeroot, fstype, 1); - if (error) - goto startwizard; free(schemeroot); - geom_deletetree(&mesh); + if (error) + goto startwizard; return (0); } @@ -280,11 +286,13 @@ query: if (strcmp(scheme, "MBR") == 0) { struct gmesh submesh; - geom_gettree(&submesh); - gpart_create(provider_for_name(&submesh, disk), - "freebsd", NULL, NULL, &retval, - choice /* Non-interactive for "Entire Disk" */); - geom_deletetree(&submesh); + + if (geom_gettree(&submesh) == 0) { + gpart_create(provider_for_name(&submesh, disk), + "freebsd", NULL, NULL, &retval, + choice /* Non-interactive for "Entire Disk" */); + geom_deletetree(&submesh); + } } else { retval = strdup(disk); } @@ -304,7 +312,7 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, struct gmesh submesh; char swapsizestr[10], rootsizestr[10]; intmax_t swapsize, available; - int retval; + int error, retval; if (strcmp(fstype, "zfs") == 0) { fsname = fsnames[1]; @@ -350,12 +358,16 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, humanize_number(rootsizestr, 7, available - swapsize - 1024*1024, "B", HN_AUTOSCALE, HN_NOSPACE | HN_DECIMAL); - geom_gettree(&submesh); + error = geom_gettree(&submesh); + if (error != 0) + return (error); pp = provider_for_name(&submesh, disk); gpart_create(pp, fsname, rootsizestr, "/", NULL, 0); geom_deletetree(&submesh); - geom_gettree(&submesh); + error = geom_gettree(&submesh); + if (error != 0) + return (error); pp = provider_for_name(&submesh, disk); gpart_create(pp, "freebsd-swap", swapsizestr, NULL, NULL, 0); geom_deletetree(&submesh); diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 2ae71338d099..0f341cbaba12 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -60,9 +60,10 @@ sigint_handler(int sig) struct gmesh mesh; /* Revert all changes and exit dialog-mode cleanly on SIGINT */ - geom_gettree(&mesh); - gpart_revert_all(&mesh); - geom_deletetree(&mesh); + if (geom_gettree(&mesh) == 0) { + gpart_revert_all(&mesh); + geom_deletetree(&mesh); + } end_dialog(); @@ -209,16 +210,17 @@ main(int argc, const char **argv) if (prompt == NULL) { error = geom_gettree(&mesh); - if (validate_setup()) { - error = apply_changes(&mesh); - } else { - gpart_revert_all(&mesh); - error = -1; + if (error != 0) { + if (validate_setup()) { + error = apply_changes(&mesh); + } else { + gpart_revert_all(&mesh); + error = -1; + } + geom_deletetree(&mesh); } } - geom_deletetree(&mesh); - free(items); end_dialog(); return (error); diff --git a/usr.sbin/bsdinstall/partedit/scripted.c b/usr.sbin/bsdinstall/partedit/scripted.c index 69fba8f2cfa8..fdfdc2d10014 100644 --- a/usr.sbin/bsdinstall/partedit/scripted.c +++ b/usr.sbin/bsdinstall/partedit/scripted.c @@ -75,6 +75,8 @@ part_config(char *disk, const char *scheme, char *config) scheme = default_scheme(); error = geom_gettree(&mesh); + if (error != 0) + return (-1); if (provider_for_name(&mesh, disk) == NULL) { fprintf(stderr, "GEOM provider %s not found\n", disk); geom_deletetree(&mesh); @@ -96,16 +98,22 @@ part_config(char *disk, const char *scheme, char *config) if (strcmp(scheme, "MBR") == 0) { struct gmesh submesh; - geom_gettree(&submesh); - gpart_create(provider_for_name(&submesh, disk), - "freebsd", NULL, NULL, &disk, 0); - geom_deletetree(&submesh); + + if (geom_gettree(&submesh) == 0) { + gpart_create(provider_for_name(&submesh, disk), + "freebsd", NULL, NULL, &disk, 0); + geom_deletetree(&submesh); + } } else { - disk= strdup(disk); + disk = strdup(disk); } geom_deletetree(&mesh); error = geom_gettree(&mesh); + if (error != 0) { + free(disk); + return (-1); + } /* Create partitions */ if (config == NULL) { @@ -132,6 +140,10 @@ part_config(char *disk, const char *scheme, char *config) NULL, 0); geom_deletetree(&mesh); error = geom_gettree(&mesh); + if (error != 0) { + free(disk); + return (-1); + } size = type = mount = NULL; } @@ -142,8 +154,8 @@ finished: return (0); } -static -int parse_disk_config(char *input) +static int +parse_disk_config(char *input) { char *ap; char *disk = NULL, *scheme = NULL, *partconfig = NULL; @@ -183,9 +195,11 @@ int parse_disk_config(char *input) if (disk == NULL || strcmp(disk, "DEFAULT") == 0) { struct gmesh mesh; - geom_gettree(&mesh); - disk = boot_disk_select(&mesh); - geom_deletetree(&mesh); + + if (geom_gettree(&mesh) == 0) { + disk = boot_disk_select(&mesh); + geom_deletetree(&mesh); + } } return (part_config(disk, scheme, partconfig)); From nobody Fri Jan 5 00:23:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgv1j27z55fPR; Fri, 5 Jan 2024 00:23: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 4T5kgv08Srz4dY7; Fri, 5 Jan 2024 00:23:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vv2HB+CxDw3siQmzq6mbRZH2paKhmC1g07B98m658Fs=; b=POBHLJKalfNuIJoK3NZOFt16r6A09B6XNYDKlbtX2w83xQY1QU5LHwD1AzeCNbPwbYdVxz 48ZWUDrKDqAeWUTVVLQBJO5HwxylShja2kmU5lOe/bNG2wSe/DoZLS5FNk9WlLitoS6ITf xUGaUKqfb2iUoqVOJ7B/YICGDsZBWOKh61KwXr1mEhry1g5GgE3AU/Ieiu/3cggSGpQI3F mwp6My2jbgYefS5rmsVxMxU3mh3DHoKzEkugr8p1gE8YlURvn+23O3c0QVVnfCTOYMGqkx QA4V4kP1KUGdwvsuM4jcZl7N39OOdMfL5odPAFSuFChdT0AjAsiQpsQpHt3OGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vv2HB+CxDw3siQmzq6mbRZH2paKhmC1g07B98m658Fs=; b=Wv1AyliYb9x3rKHPYxoCQQrRjndTNUKn2DjeuCJ6V6y4paPE+STzvdYC1cpqH2XGnW2F5W 1PvSJjXy70V7pK7KfpfhuHyOtnd3Fqq3wwPOz7Pk4as0UU9f9tNRYG4ecjEWbQsQoE2Lcm WTTbkGeGMFSiPmAjyX6/jWEz6wCP5ifgGQj/8iUFDfeMZE70r0FN3+Pnv/jCCTOJ3SS6Tw 39DyZu0lPN3KcHoN2umNVV8APEjNWN+jZu1CViJsYHOU764/WaAtgZS1xt3f9psDYxTS/w SnvxhpujYiL9v3ZzW+X8jCPJz3fqE6MVlTODqph9A8pIYlgzXwzP/BQBfb3QJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414187; a=rsa-sha256; cv=none; b=sJQUWgTB2Fti6Re2YX4BPbCWvoPOQyB5l8yzuNXtnCZFa+6IcsMjXisn0bvLCWSOV1pxu9 LkbQcI7CIl+oloSegRsEL9LUyGm6Q1/dl9eO6Bgib96N2Wq6sodsbIlKDc+8W33/d/kfsL fJyBXDeRGFfQxU3sUGHs4j52kfh7PEm/SDTfw5xymTZY2MA7t93OiRcBu5KcBRSaV+gocS 3Omd9axVOt1EgaTYvYSlZCkBC9h6SY9jvzO74sgQt5egCYiikYpO3Z8mL+njKw5MOKpC8+ WPNw4oCaJVewmWIOToT32d/jJpx9E7Yh66rTK6ZvjvUiMIcNlUOKccj2ZkajkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgt4kZbzbp8; Fri, 5 Jan 2024 00:23:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4050N6nB025305; Fri, 5 Jan 2024 00:23:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050N6gw025302; Fri, 5 Jan 2024 00:23:06 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:06 GMT Message-Id: <202401050023.4050N6gw025302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c81bdb499868 - stable/13 - bsdinstall partedit: Apply changes from scripted installs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c81bdb4998683aa6b795b6e1cb294be6f493329d Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c81bdb4998683aa6b795b6e1cb294be6f493329d commit c81bdb4998683aa6b795b6e1cb294be6f493329d Author: John Baldwin AuthorDate: 2023-10-16 22:13:31 +0000 Commit: John Baldwin CommitDate: 2024-01-04 23:43:33 +0000 bsdinstall partedit: Apply changes from scripted installs I got a check inverted in a previous cleanup commit and as a result partedit was only applying GEOM changes (and generating an /etc/fstab) if it got an error reading the current GEOM mesh. Instead, it needed to do those actions if it succeeded in reading the mesh. The lack of /etc/fstab meant that bsdinstall mount didn't mount anything in a scripted install. PR: 273723 Reported by: Andrey Fesenko Reported by: Michal Nowak Reviewed by: cognet, brooks Fixes: 230990991965 bsdinstall: Handle errors from geom_gettree. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42236 (cherry picked from commit 5307bbcc038f878b4b3714f03a2c824a0caeba4f) --- usr.sbin/bsdinstall/partedit/partedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 0f341cbaba12..ffc809507b08 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -210,7 +210,7 @@ main(int argc, const char **argv) if (prompt == NULL) { error = geom_gettree(&mesh); - if (error != 0) { + if (error == 0) { if (validate_setup()) { error = apply_changes(&mesh); } else { From nobody Fri Jan 5 00:23:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgw1zBXz55fLl; Fri, 5 Jan 2024 00:23:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5kgv6jykz4dh8; Fri, 5 Jan 2024 00:23:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWfXbSKygoViMBKsQNeVf/5h/v+rl7060E3mMMFYwjU=; b=cXB2jZMNJXkUz5oZH+F83QRAHqrsdd2A0Uzk2nI50BczIiaq/1+p37QCb6H6/hRuKgrwU1 +of9mVFMjMADYOKTN8/ACx872RiCrLB1lLnntHbMi5yRLJwaOpiA+yr1uKm/91S6HY7FpW LlveHCoEuMZebG1nyvoUQqVd4jblNLzj+DcI9l0Chjp+Lqc1SRLnyRZxX54me7VD7xiFZj PXQD27sQ3ukqeKOMZ+363kexHLz2k0R2Lch5bebLWOYoNBeCAKEm+nR/l/F5p8Xf8JminZ dWxXk2tU3rKQMGS9FW4GvQS6865xDoZTF6d2CMWwOHwjZee9enKzeZq9gnvcPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWfXbSKygoViMBKsQNeVf/5h/v+rl7060E3mMMFYwjU=; b=g0XoRiMDoG0IYVAZZOgbpNGeN0yGhrYTpHKkEuDEkXokvKzC1BZBRBuP06NVPytvRF/due m7mWun0zQjzbt6Cd1vr8s6B5k7lb7vEj7l/jgeurI2hw2aL0Xniz9IdmaGbb8qevPy/AJm GZ46BAK9oiDNbJ6iolCuJmPzl9ZgDH97X6uFaaoKfOnroKl1Iz2+jf/4Pxx9kliemMAJVz EFEYbJ5KWUd/21SByMQjdnNj9ZL2NHFdt0tyyKaj0ab1JE9+L07ycxKJgYfLNSNDGMYQ4v OV4iwv028KtwMoomuNiwadc+uYUr3MDRg2fvkpZGs3vJP+xhNXAOOXWHcWUWCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414187; a=rsa-sha256; cv=none; b=APHXaLZqdRbG154HjkwxQm+h0EDrCy4ri2iBUOd4vB2XRM6N37QkvfITEKqCzL4NWOHsAV N5ubaTBYzT4zTwn6xPVZdm2twllZD7z1c73hE22fAweXc3NPobwWSouVpyXEc8bXF7dBAA V93Z/Q6Amhw8YSFmtS2Z0uk0ryuYxd9PTxHXaH74kOgj5VEc8PEVrtg7WwHTkZJ+J2mtly 19fFSkmbzGyhAD1Ui1D8Mqe1Vxh5FZcU5bxBT0Py9sHLcsoIOsDXYQKXfYyooQJ6sQ+rGK tJoSL04MzL9gaVTRVsYJpsi101lAN5w4m4Bcw1cb8y2Wf4k78o6AV5lJcD9QUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgv5Xjvzbp9; Fri, 5 Jan 2024 00:23: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 4050N70K025360; Fri, 5 Jan 2024 00:23:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050N7mn025356; Fri, 5 Jan 2024 00:23:07 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:07 GMT Message-Id: <202401050023.4050N7mn025356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a78807a2fa0e - stable/13 - bsdinstall partedit: Avoid potential buffer overflow in newfs_command List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a78807a2fa0e2d81954e984883477c9b567b8617 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a78807a2fa0e2d81954e984883477c9b567b8617 commit a78807a2fa0e2d81954e984883477c9b567b8617 Author: John Baldwin AuthorDate: 2023-10-16 23:25:03 +0000 Commit: John Baldwin CommitDate: 2024-01-04 23:51:34 +0000 bsdinstall partedit: Avoid potential buffer overflow in newfs_command Allocate the buffer holding the newfs command string dynamically (building the string via open_memstream) rather than storing the command into a caller-supplied buffer of unknown length. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42237 (cherry picked from commit ae2fc74fe76ca8b89c5ef0081ef3f4008f83de41) --- usr.sbin/bsdinstall/partedit/gpart_ops.c | 70 +++++++++++++++++++------------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index 368ef9b14727..331cbc4ffba6 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -78,9 +78,15 @@ scheme_supports_labels(const char *scheme) return (0); } -static void -newfs_command(const char *fstype, char *command, int use_default) +static char * +newfs_command(const char *fstype, int use_default) { + FILE *fp; + char *buf; + size_t len; + + fp = open_memstream(&buf, &len); + if (strcmp(fstype, "freebsd-ufs") == 0) { int i; DIALOG_LISTITEM items[] = { @@ -103,21 +109,21 @@ newfs_command(const char *fstype, char *command, int use_default) nitems(items), items, NULL, FLAG_CHECK, &i); if (choice == 1) /* Cancel */ - return; + goto out; } - strcpy(command, "newfs "); + fputs("newfs ", fp); for (i = 0; i < (int)nitems(items); i++) { if (items[i].state == 0) continue; if (strcmp(items[i].name, "UFS1") == 0) - strcat(command, "-O1 "); + fputs("-O1 ", fp); else if (strcmp(items[i].name, "SU") == 0) - strcat(command, "-U "); + fputs("-U ", fp); else if (strcmp(items[i].name, "SUJ") == 0) - strcat(command, "-j "); + fputs("-j ", fp); else if (strcmp(items[i].name, "TRIM") == 0) - strcat(command, "-t "); + fputs("-t ", fp); } } else if (strcmp(fstype, "freebsd-zfs") == 0) { int i; @@ -141,30 +147,31 @@ newfs_command(const char *fstype, char *command, int use_default) nitems(items), items, NULL, FLAG_CHECK, &i); if (choice == 1) /* Cancel */ - return; + goto out; } - strcpy(command, "zpool create -f -m none "); + fputs("zpool create -f -m none ", fp); if (getenv("BSDINSTALL_TMPBOOT") != NULL) { char zfsboot_path[MAXPATHLEN]; + snprintf(zfsboot_path, sizeof(zfsboot_path), "%s/zfs", getenv("BSDINSTALL_TMPBOOT")); mkdir(zfsboot_path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); - sprintf(command, "%s -o cachefile=%s/zpool.cache ", - command, zfsboot_path); + fprintf(fp, " -o cachefile=%s/zpool.cache ", + zfsboot_path); } for (i = 0; i < (int)nitems(items); i++) { if (items[i].state == 0) continue; if (strcmp(items[i].name, "fletcher4") == 0) - strcat(command, "-O checksum=fletcher4 "); + fputs("-O checksum=fletcher4 ", fp); else if (strcmp(items[i].name, "fletcher2") == 0) - strcat(command, "-O checksum=fletcher2 "); + fputs("-O checksum=fletcher2 ", fp); else if (strcmp(items[i].name, "sha256") == 0) - strcat(command, "-O checksum=sha256 "); + fputs("-O checksum=sha256 ", fp); else if (strcmp(items[i].name, "atime") == 0) - strcat(command, "-O atime=off "); + fputs("-O atime=off ", fp); } } else if (strcmp(fstype, "fat32") == 0 || strcmp(fstype, "efi") == 0 || strcmp(fstype, "ms-basic-data") == 0) { @@ -184,26 +191,29 @@ newfs_command(const char *fstype, char *command, int use_default) nitems(items), items, NULL, FLAG_RADIO, &i); if (choice == 1) /* Cancel */ - return; + goto out; } - strcpy(command, "newfs_msdos "); + fputs("newfs_msdos ", fp); for (i = 0; i < (int)nitems(items); i++) { if (items[i].state == 0) continue; if (strcmp(items[i].name, "FAT32") == 0) - strcat(command, "-F 32 -c 1"); + fputs("-F 32 -c 1", fp); else if (strcmp(items[i].name, "FAT16") == 0) - strcat(command, "-F 16 "); + fputs("-F 16 ", fp); else if (strcmp(items[i].name, "FAT12") == 0) - strcat(command, "-F 12 "); + fputs("-F 12 ", fp); } } else { if (!use_default) dialog_msgbox("Error", "No configurable options exist " "for this filesystem.", 0, 0, TRUE); - command[0] = '\0'; } + +out: + fclose(fp); + return (buf); } const char * @@ -509,7 +519,7 @@ gpart_edit(struct gprovider *pp) const char *errstr, *oldtype, *scheme; struct partition_metadata *md; char sizestr[32]; - char newfs[255]; + char *newfs; intmax_t idx; int hadlabel, choice, junk, nitems; unsigned i; @@ -650,10 +660,11 @@ editpart: } gctl_free(r); - newfs_command(items[0].text, newfs, 1); + newfs = newfs_command(items[0].text, 1); set_default_part_metadata(pp->lg_name, scheme, items[0].text, items[2].text, (strcmp(oldtype, items[0].text) != 0) ? newfs : NULL); + free(newfs); endedit: if (strcmp(oldtype, items[0].text) != 0 && cp != NULL) @@ -981,7 +992,7 @@ gpart_create(struct gprovider *pp, const char *default_type, struct ggeom *geom; const char *errstr, *scheme; char sizestr[32], startstr[32], output[64], *newpartname; - char newfs[255], options_fstype[64]; + char *newfs, options_fstype[64]; intmax_t maxsize, size, sector, firstfree, stripe; uint64_t bytes; int nitems, choice, junk; @@ -1078,7 +1089,7 @@ gpart_create(struct gprovider *pp, const char *default_type, /* Default options */ strncpy(options_fstype, items[0].text, sizeof(options_fstype)); - newfs_command(options_fstype, newfs, 1); + newfs = newfs_command(options_fstype, 1); addpartform: if (interactive) { dialog_vars.extra_label = "Options"; @@ -1092,9 +1103,10 @@ addpartform: case 1: /* Cancel */ return; case 3: /* Options */ + free(newfs); strncpy(options_fstype, items[0].text, sizeof(options_fstype)); - newfs_command(options_fstype, newfs, 0); + newfs = newfs_command(options_fstype, 0); goto addpartform; } } @@ -1104,8 +1116,9 @@ addpartform: * their choices in favor of the new filesystem's defaults. */ if (strcmp(options_fstype, items[0].text) != 0) { + free(newfs); strncpy(options_fstype, items[0].text, sizeof(options_fstype)); - newfs_command(options_fstype, newfs, 1); + newfs = newfs_command(options_fstype, 1); } size = maxsize; @@ -1250,6 +1263,7 @@ addpartform: else set_default_part_metadata(newpartname, scheme, items[0].text, items[2].text, newfs); + free(newfs); for (i = 0; i < nitems(items); i++) if (items[i].text_free) From nobody Fri Jan 5 00:23:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgx5wX3z55fPT; Fri, 5 Jan 2024 00:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5kgx0MWKz4dsj; Fri, 5 Jan 2024 00:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OkuyBEU5t9Zm7z/EdbN+I0kAxyEIs/bqOP3szrSNzw4=; b=ZBT6zP2Dhh6f35Pzd9rEt066aDRo+9GYtzHrfCGQeIzMt4nw9NA2BfvJ/to/bh3LjdQbav ofTCeQvjdmtrKs+OlcPCnKTK5f/0olpmJ7z1JffvoGYmWzrDB59AaAO3DJ1MHxeVGU7Ozi Ae2HbmVqreDmrwy8fUPchHGkgiJlkdfKm2UhgBxkufpSJDqmBkctAyXYD/Rc1axFTDhSIq ohW8JbfoFDiiwEhUvKI+WCDdmErH58YiLtPacx8pacxVYYs/skk4zj00m4IiAlHJRN73U0 UDt2MuS3twY+I7BXt8cp1NmtqbS9tYAU+55CtfzDkzBGDvDlidJuEuExo0yUEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OkuyBEU5t9Zm7z/EdbN+I0kAxyEIs/bqOP3szrSNzw4=; b=ELwbU6qxmoCukpYedWG79KKu+r9kil7MuiGdyQUxe0v0TYiWpZZnLMYOw1kHZeHkYPaySr JXiWXpH9l4BdlW09uFad8Vd4zbfuU/aCiDdD7sF5ncsOrpIfduy/xDUiJerQaUoXUMXxuT tXVVEH1iQzw289xv6zooqNpaDiBe/Pr7IMrB81YmTrmsvcUITxsZHNo3QhgP3t1CsoDXRT DFOwLmlQ6egqymYvhC0E1g27vDc63I/F62cfeX5oP4OVVAnVSiMODQz7x3ZGQrzdVOZ95W GrWrDJEuf26/UKUG4YnJ5hZ3hGJ3cWb0wU1T2TpHyW7xIcdfw923Fu673mjgIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414189; a=rsa-sha256; cv=none; b=c/I7eq5jfkv1rC5k/W0Au/1zpOw6KMYNPQSnPCDwoBoHJmbk397Wn7NHh1PSwrXoMcR3ME 8PyvEzRRC4L16p8Afb5zYopiCjD+NGKFx0tA0nvf+2OWXAz4UNxJ2O/c23ZnSDKWygoqq9 2VpLojJonemYKOLWoNB5wQlCy29QWqk6aEy+Po2TS2A8kMDzO1tOo4Q9sBfvCp11IFQr4c yngsaGu/HUFjk6xZ7XLZT2Ho38fd+sx+GSrJ7BPez27Q8FYaKYkkutdmdieglyl+a4MYuv cQr44Clo29gTzZZ3nFw3i/VLO1DfTG0VxoEWtIrENYwHspikjPt8xWdJ0DoJjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgw6HLfzbpB; Fri, 5 Jan 2024 00:23:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4050N8No025414; Fri, 5 Jan 2024 00:23:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050N8qH025411; Fri, 5 Jan 2024 00:23:08 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:08 GMT Message-Id: <202401050023.4050N8qH025411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 653e8fb20e84 - stable/13 - bsdinstall partedit: Replace malloc + sprintf with asprintf List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 653e8fb20e8452de2c83c6f87dd3d0779f8eba3b Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=653e8fb20e8452de2c83c6f87dd3d0779f8eba3b commit 653e8fb20e8452de2c83c6f87dd3d0779f8eba3b Author: John Baldwin AuthorDate: 2023-10-16 23:25:15 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:08:25 +0000 bsdinstall partedit: Replace malloc + sprintf with asprintf This avoids potential bugs with the length passed to malloc not matching the string written via sprintf. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42238 (cherry picked from commit 51749e05e96eb07134a38984a8c06608b20f07ea) --- usr.sbin/bsdinstall/partedit/gpart_ops.c | 10 +++------- usr.sbin/bsdinstall/partedit/partedit.c | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index 331cbc4ffba6..bc45a0f2d383 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -697,18 +697,16 @@ set_default_part_metadata(const char *name, const char *scheme, } if (newfs != NULL && newfs[0] != '\0') { - md->newfs = malloc(strlen(newfs) + strlen(" /dev/") + - strlen(mountpoint) + 5 + strlen(name) + 1); if (strcmp("freebsd-zfs", type) == 0) { zpool_name = strdup((strlen(mountpoint) == 1) ? "root" : &mountpoint[1]); for (i = 0; zpool_name[i] != 0; i++) if (!isalnum(zpool_name[i])) zpool_name[i] = '_'; - sprintf(md->newfs, "%s %s /dev/%s", newfs, + asprintf(&md->newfs, "%s %s /dev/%s", newfs, zpool_name, name); } else { - sprintf(md->newfs, "%s /dev/%s", newfs, name); + asprintf(&md->newfs, "%s /dev/%s", newfs, name); } } } @@ -745,9 +743,7 @@ set_default_part_metadata(const char *name, const char *scheme, if (strcmp("freebsd-zfs", type) == 0) { md->fstab->fs_spec = strdup(zpool_name); } else { - md->fstab->fs_spec = malloc(strlen(name) + - strlen("/dev/") + 1); - sprintf(md->fstab->fs_spec, "/dev/%s", name); + asprintf(&md->fstab->fs_spec, "/dev/%s", name); } md->fstab->fs_file = strdup(mountpoint); /* Get VFS from text after freebsd-, if possible */ diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index ffc809507b08..0f116d2c716a 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -349,8 +349,8 @@ apply_changes(struct gmesh *mesh) TAILQ_FOREACH(md, &part_metadata, metadata) { if (md->newfs != NULL) { char *item; - item = malloc(255); - sprintf(item, "Initializing %s", md->name); + + asprintf(&item, "Initializing %s", md->name); items[i*2] = item; items[i*2 + 1] = "Pending"; i++; From nobody Fri Jan 5 00:23:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgy6Knfz55fRB; Fri, 5 Jan 2024 00:23: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 4T5kgy1K54z4dfd; Fri, 5 Jan 2024 00:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wJ9cw3vKfDRCMQzUontnZSPT86prTW6WCxR7obrIr/c=; b=b5hs4Yn+HBbkEFysUdkU9OpJZdhLBikLtHBlcpQbDHhO0R5FiuEj9y05xsd7iPnZfhgUYD favIIiTCF+fIUbxLNXbHkDjmDMYCb2NFDDYLcEQVwdi+0+24yVZtfKScp59+1oC1Cq0cQi ZKkL6iHk+MTeLvPBN15+h5QfO8idV/g8BNeA/1HuIVY49HBykNaPDv8Nk6zRk9PS10DTcE kHpnBmctgb79OA+XnQRqk0vHSp1KTFHgGK0DPUU6INgzqwoL1jxnznU/l6TsfA5XOUmp4O ESESrvmHuqeoZATOWYlbneUZNnkUZbiwUicLUKU7E2F/2JjiD46GFU4s6XHJpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wJ9cw3vKfDRCMQzUontnZSPT86prTW6WCxR7obrIr/c=; b=cRQMAq6nRjxDOU8+tz3xSdLGg+hmOb4jaBeVGfWMYxNhm3Jsj0ZNZIfAWm5WG9sfIrRC29 AZriHBrZyqZeubbOMAxOWr66hmPkzgJAkSrPddqJwB/SNEyJZ2cVW+8G/g+Eu3q3L0lSgw GgcpRY7aylTWjMMGpJ+NcKPw0E2gLhNxCNFddgCBoPd+ElEG5aNrg8uPhJgX4zuXqKkNu4 yCGITBRrYLomFgSqvAWosN3piw19e8URQo1kFj5HTPxYvG80jj0GRGPjQpSpV5+4Kn7o2Y BfROZJN7E7+wGOxp3ijIvLZfIYPwdRGOQaFfPAfavyMSY4yR9wjHt13qrClv4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414190; a=rsa-sha256; cv=none; b=auKiMJZXGQ1yuFMt5GxRxeVJSKp4eRQ5CNZkJHVhWQMBMicT8AQ9HuFIfhiMOXPlMAdGmI 4kCWmE6JQ0hClOcfqKd2PACLBgbyLZq1Yg5Pj3ffu28l7tSFQHB28w1oYoj18RbmqNtl6a 4hYGR1z+Fs72djb8h1iyvV5kIeWwt0kFHz14f+BPP1GvEsDWts5DnLwWEiVg6CFjaJ7vl/ ZSigYWn39NDefBx1W425wqNpp2foC3RkKJpfVYAN0Paw/+CQzm6iAcVQJT3BIhsojEaMxs PkNRhjBG8RmNPp5P9sr7UCfMwsN3cbJ1iSmhm0YyIGky+ajFRjXrXSS2AVjKow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgy0Qrczbf9; Fri, 5 Jan 2024 00:23: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 4050N9Ms025475; Fri, 5 Jan 2024 00:23:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050N9Vn025472; Fri, 5 Jan 2024 00:23:09 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:09 GMT Message-Id: <202401050023.4050N9Vn025472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a403492f96be - stable/13 - bsdinstall partedit: Use asprintf to build wrapper command for newfs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a403492f96be71caa46e887bec58be5091d0c8f8 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a403492f96be71caa46e887bec58be5091d0c8f8 commit a403492f96be71caa46e887bec58be5091d0c8f8 Author: John Baldwin AuthorDate: 2023-10-16 23:25:25 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:11:11 +0000 bsdinstall partedit: Use asprintf to build wrapper command for newfs Don't abuse the message[] static buffer used elsewhere for error messages to generate the command that actually newfs's each filesystem. Use asprintf to a more aptly-named 'char *command' variable to construct the string instead. This avoids potential bugs from truncation of the command string. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42239 (cherry picked from commit a8676bf367b099dcc97ff61031cbf4ceb5e37899) --- usr.sbin/bsdinstall/partedit/partedit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 0f116d2c716a..c8961d03c5cc 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -336,6 +336,7 @@ apply_changes(struct gmesh *mesh) const char **items; const char *fstab_path; FILE *fstab; + char *command; nitems = 1; /* Partition table changes */ TAILQ_FOREACH(md, &part_metadata, metadata) { @@ -374,10 +375,11 @@ apply_changes(struct gmesh *mesh) dialog_mixedgauge("Initializing", "Initializing file systems. Please wait.", 0, 0, i*100/nitems, nitems, __DECONST(char **, items)); - sprintf(message, "(echo %s; %s) >>%s 2>>%s", + asprintf(&command, "(echo %s; %s) >>%s 2>>%s", md->newfs, md->newfs, getenv("BSDINSTALL_LOG"), getenv("BSDINSTALL_LOG")); - error = system(message); + error = system(command); + free(command); items[i*2 + 1] = (error == 0) ? "3" : "1"; i++; } From nobody Fri Jan 5 00:23:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kgz4ZpZz55fJ9; Fri, 5 Jan 2024 00:23: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 4T5kgz2cpLz4dw9; Fri, 5 Jan 2024 00:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7MwXsdTheipnxBHKBfB+chs0oxN4VySubizqV5hHFE=; b=P6JIxsrDHAnZ4if1WGUUEMhIdtCTHj6huYjfpCpyjWUyA9o/sN5Q0FI6U216m+FTgax3Uc ak/QyNyOYAoWpCtVcD3RymjwK2iHcSoFp1kLoyieS1530e08Fsf2NzFDIcnKsV1QCYsOqL i8ed8aCTpf3fe14wkl+6v74aGiPE9k1RIivNSTQZTz/4zT0FBI6Z9/GNDH/YCpZnwn6fzU x84dUnRzosAKxkheyvk5CHst4JDjTs4lJ52SPXWTg+rVDASpbmIwLPYhNHSf+eVJQK21h7 SBDW6ExMA0no4RseCFRX7/nBMQqgGEgjqf2ISF3CHORZXkJN90bStIheV9HPhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7MwXsdTheipnxBHKBfB+chs0oxN4VySubizqV5hHFE=; b=mieH1Wsw4xzDPPdsffIQBlqaiF1J8dWSUetzAYLW8BiXsYJcYSq31kMnojx47q4OlTBhMz 8T5BrnEzkO0QTXV67+85bHS6FsoZifxVEzQN/aIunEYu0QR8G9GzKEPL875+z64dUaeSen D8RoxdZneEqEo7rLVgVfzDu3oup3NKtzO4/wrWOBxPXye/MiCUEkAXZnK13Ud2E4LekYpF jdDFEoWoTcdbrUCqVr36295HDuaaGBS1mxv8wd6O/2N3T42WnWvBnEIyAONfKn9kPaY+rm GIq46jKXXmSKQO/zcxhiPcphtN4DBRVrA11gP7mw7xT2BkN9vNP0NR35bcR4Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414191; a=rsa-sha256; cv=none; b=vvC7vifo6oP/W5vL1fTU9j5JG4mhBvHnjUaqZ3dW91d/M8zWn/0hQ0ozuVt1ScuyheyGVE htk4O1coCF/2tJ5G6J4LJEA4Soah2B/ClouZC2MirhlLO/6bn3BK5OUD9EL2Q8TJS0DHS+ b+uyM+pV6W47IWar4GHA8EuiRRO4hMgg2qPQi3PeqORcL6n46GWcej8f/a3o6znhlvfMIc LD7djHnpuWSzsYo4TaPeww86wVZeoSas3dWRPnG7UJz7ipcXCTYCqDzfsD2UPCbk/LOqdO CFS6ID1EucRNXnMmdLq0gRf1ueE43IAw0A2aYTboxIKflzezO6+AT/v9xahR4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kgz1YdjzbpC; Fri, 5 Jan 2024 00:23: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 4050NBAX025533; Fri, 5 Jan 2024 00:23:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050NBJB025530; Fri, 5 Jan 2024 00:23:11 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:11 GMT Message-Id: <202401050023.4050NBJB025530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 91a736d7016f - stable/13 - bsdinstall partedit: Use snprintf instead of sprintf for error messages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 91a736d7016f26b2ec2e64553c2183555cc077d1 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=91a736d7016f26b2ec2e64553c2183555cc077d1 commit 91a736d7016f26b2ec2e64553c2183555cc077d1 Author: John Baldwin AuthorDate: 2023-10-16 23:25:38 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:16:24 +0000 bsdinstall partedit: Use snprintf instead of sprintf for error messages When generating a message for a dialog box into a static buffer, use snprintf instead of sprintf to avoid buffer overflows. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42240 (cherry picked from commit 6e8bf24073a1867c4b21bd84438a8b01ce91d82d) --- usr.sbin/bsdinstall/partedit/gpart_ops.c | 37 ++++++++++++++++++++---------- usr.sbin/bsdinstall/partedit/part_wizard.c | 6 +++-- usr.sbin/bsdinstall/partedit/partedit.c | 3 ++- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index bc45a0f2d383..7ab5e16c063b 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -56,12 +56,13 @@ gpart_show_error(const char *title, const char *explanation, const char *errstr) while (errmsg[0] == ' ') errmsg++; if (errmsg[0] != '\0') - sprintf(message, "%s%s. %s", explanation, - strerror(error), errmsg); + snprintf(message, sizeof(message), "%s%s. %s", + explanation, strerror(error), errmsg); else - sprintf(message, "%s%s", explanation, strerror(error)); + snprintf(message, sizeof(message), "%s%s", explanation, + strerror(error)); } else { - sprintf(message, "%s%s", explanation, errmsg); + snprintf(message, sizeof(message), "%s%s", explanation, errmsg); } dialog_msgbox(title, message, 0, 0, TRUE); @@ -245,7 +246,9 @@ parttypemenu: if (!is_scheme_bootable(items[choice].name)) { char message[512]; - sprintf(message, "This partition scheme (%s) is not " + + snprintf(message, sizeof(message), + "This partition scheme (%s) is not " "bootable on this platform. Are you sure you want " "to proceed?", items[choice].name); dialog_vars.defaultno = TRUE; @@ -276,7 +279,9 @@ schememenu: if (!is_scheme_bootable(scheme)) { char message[512]; - sprintf(message, "This partition scheme (%s) is not " + + snprintf(message, sizeof(message), + "This partition scheme (%s) is not " "bootable on this platform. Are you sure you want " "to proceed?", scheme); dialog_vars.defaultno = TRUE; @@ -458,10 +463,11 @@ gpart_partcode(struct gprovider *pp, const char *fstype) } /* Shell out to gpart for partcode for now */ - sprintf(command, "gpart bootcode -p %s -i %s %s", + snprintf(command, sizeof(command), "gpart bootcode -p %s -i %s %s", partcode_path(scheme, fstype), indexstr, pp->lg_geom->lg_name); if (system(command) != 0) { - sprintf(message, "Error installing partcode on partition %s", + snprintf(message, sizeof(message), + "Error installing partcode on partition %s", pp->lg_name); dialog_msgbox("Error", message, 0, 0, TRUE); } @@ -626,7 +632,9 @@ editpart: if (strcmp(items[2].text, "/") == 0 && !is_fs_bootable(scheme, items[0].text)) { char message[512]; - sprintf(message, "This file system (%s) is not bootable " + + snprintf(message, sizeof(message), + "This file system (%s) is not bootable " "on this system. Are you sure you want to proceed?", items[0].text); dialog_vars.defaultno = TRUE; @@ -1122,7 +1130,8 @@ addpartform: if (expand_number(items[1].text, &bytes) != 0) { char error[512]; - sprintf(error, "Invalid size: %s\n", strerror(errno)); + snprintf(error, sizeof(error), "Invalid size: %s\n", + strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); goto addpartform; } @@ -1170,7 +1179,9 @@ addpartform: /* If this is the root partition, check that this scheme is bootable */ if (strcmp(items[2].text, "/") == 0 && !is_scheme_bootable(scheme)) { char message[512]; - sprintf(message, "This partition scheme (%s) is not bootable " + + snprintf(message, sizeof(message), + "This partition scheme (%s) is not bootable " "on this platform. Are you sure you want to proceed?", scheme); dialog_vars.defaultno = TRUE; @@ -1184,7 +1195,9 @@ addpartform: if (strcmp(items[2].text, "/") == 0 && !is_fs_bootable(scheme, items[0].text)) { char message[512]; - sprintf(message, "This file system (%s) is not bootable " + + snprintf(message, sizeof(message), + "This file system (%s) is not bootable " "on this system. Are you sure you want to proceed?", items[0].text); dialog_vars.defaultno = TRUE; diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c index db689fd223d7..90dba58383e2 100644 --- a/usr.sbin/bsdinstall/partedit/part_wizard.c +++ b/usr.sbin/bsdinstall/partedit/part_wizard.c @@ -251,7 +251,8 @@ query: char warning[512]; int subchoice; - sprintf(warning, "The existing partition scheme on this " + snprintf(warning, sizeof(warning), + "The existing partition scheme on this " "disk (%s) is not bootable on this platform. To install " "FreeBSD, it must be repartitioned. This will destroy all " "data on the disk. Are you sure you want to proceed?", @@ -338,7 +339,8 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, HN_DECIMAL); humanize_number(neededstr, 7, MIN_FREE_SPACE, "B", HN_AUTOSCALE, HN_DECIMAL); - sprintf(message, "There is not enough free space on %s to " + snprintf(message, sizeof(message), + "There is not enough free space on %s to " "install FreeBSD (%s free, %s required). Would you like " "to choose another disk or to open the partition editor?", disk, availablestr, neededstr); diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index c8961d03c5cc..599d2b2ec234 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -421,7 +421,8 @@ apply_changes(struct gmesh *mesh) fstab_path = "/etc/fstab"; fstab = fopen(fstab_path, "w+"); if (fstab == NULL) { - sprintf(message, "Cannot open fstab file %s for writing (%s)\n", + snprintf(message, sizeof(message), + "Cannot open fstab file %s for writing (%s)\n", getenv("PATH_FSTAB"), strerror(errno)); dialog_msgbox("Error", message, 0, 0, TRUE); return (-1); From nobody Fri Jan 5 00:23:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kh26rDFz55fTM; Fri, 5 Jan 2024 00:23: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 4T5kh25Dtdz4dtb; Fri, 5 Jan 2024 00:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u9Hjf8ArRgyYR9Qlselp/jhYvFyHYRBIj95cBceaDaw=; b=YNy5qImikV3+a0wsUZLnN3isXknz/YSOSdsGlZD/cR71VI4zS5cgBWWl65jmewOXm0x7u9 pmk6hx0PfJykFJWZJmkoyJ9hy+7LHyCdQVsDPmoMOWi3k9L2w1VhkPw/6koZtyeJXkBwYm Vg0cp5HCsTwXCuuRHhJJxfQyPh5/IsGh47Nk+D9CluMuEU3b4iXcQ/6kGQ8ijmQs2GZQmn U0+uybg9Ib5h9XONv9ou9KfhdDWSTsrEEJ2b+EpyQUEDxhWOfxrdP9Tn1BE+Fzja1oF+se uDJOJecR0qePaoN+0UUgdwnlQo8DCEhdZbK8FDG3W6lQTHpQwNTf8ATVyLx7MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u9Hjf8ArRgyYR9Qlselp/jhYvFyHYRBIj95cBceaDaw=; b=GgjkNBs/TXjPPEt+7ERn+iF6g5+mvzELcJTyHnhc9GvSx1hx5DZ4Hd63PAj8wKPGJ+C3nb YC61xFZJB2ESxBEoYDNUJd9yzNoRjFftbB4nhQR0Byv82cccNHTxgPMZjn8HueEJzBufWb 0g3gjcFfvDWJEtp6vGBacHov6nUW3vpp82b2hsPsgnAJSGY47id7AR2GhY51+ftzeeRFsD giyL7Jk8MR8KwLiUZjBUsti7S8rtD+ToumODTK8EFjMCiyCsXmmLF4tUzglaZrYtUTpk2r SSwuXklzyzixUGXcUAYlasZkOmWC1QIz8vsupbiK2ZhccAT5Xb9oEzxdMAIoIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414194; a=rsa-sha256; cv=none; b=MhEmtXBxLsOE2q4avw4jaHd/myKss7jHPoXEU1tT8hwwVSPWiOqCZSQCYVyRA8bhWK8v1Q di65ksVDdFAkM6qlRWo77ch/G0DJc+pdCyczx6QDETwjmXbR61ZgJDhhCvrrUTFOvPFmW3 ohQOMTnhRVV8RvTmFxGvyiHU4HM/t2JSqF8L5esLbeGr9Skn2nePzFz1LgNYq5kxUqRBFb 7Ml0u3CFY5nGwpi99sJmzGYjWEe2umOaok3m4o2IfXRMjVSAl5XeJ66ksmdm7JwfWIb2RC 2ozyY0WhqfYRILs/UFvIZncHJO556Y5bJjFJVkCuyPeVjH9+MNpAgCtgMGf29g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kh24KnBzbCq; Fri, 5 Jan 2024 00:23: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 4050NE4H025695; Fri, 5 Jan 2024 00:23:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050NEgx025692; Fri, 5 Jan 2024 00:23:14 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:14 GMT Message-Id: <202401050023.4050NEgx025692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a463db46a11c - stable/13 - bsdinstall zfsboot: Don't override ZFSBOOT_FORCE_4K_SECTORS if it is null. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a463db46a11ce84da39206c493ab0c4c02c29eb1 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a463db46a11ce84da39206c493ab0c4c02c29eb1 commit a463db46a11ce84da39206c493ab0c4c02c29eb1 Author: John Baldwin AuthorDate: 2023-11-18 19:18:29 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:21:59 +0000 bsdinstall zfsboot: Don't override ZFSBOOT_FORCE_4K_SECTORS if it is null. Only set a default value of 1 if the shell variable is unset. This allows installer scripts to disable the variable. PR: 274513 Reported by: Albin "a12l" Otterhäll Differential Revision: https://reviews.freebsd.org/D42319 (cherry picked from commit de82aed1192470574a08d3e479d81c4c1280487a) --- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 7028ee9ced91..bd7db75dc5e5 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -66,7 +66,7 @@ f_include $BSDCFG_SHARE/variable.subr # # Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors? # -: ${ZFSBOOT_FORCE_4K_SECTORS:=1} +: ${ZFSBOOT_FORCE_4K_SECTORS=1} # # Should we use geli(8) to encrypt the drives? From nobody Fri Jan 5 00:23:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kh05Fjyz55fTJ; Fri, 5 Jan 2024 00:23: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 4T5kh03S4xz4dwL; Fri, 5 Jan 2024 00:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuKz+bt4Z5/aaTvePOIYD2UNnFR7ahz/LjzKubLiPD4=; b=OsTZ5m6CZygJoNOdNOz9l7wvz0YdsgDZFlsNQsmcInXLH7eogW6DyfRJDjwWrVH46bkfUb 0SEhqTzuRVn1dHIqlgGLWZ2TmhKf4ZGkwXhFwFhVyLH5X8+MAuwpcKGOxO3QYkOKWAe9CL g2eP4L2oP0o5z+MVR7dStXAjZE/rgtb1hSTVDJ3eL2xOiNrJytACWL7k4FNrUuYXb/MhuG CvFj6UTU4Nab38T7JOv2MINhXKhOtD2tpSUxK2fRt64MjiOf3Zt2BhuKLb+QTXEgh7Ocv3 YsUpEKGtDPrieWodTTBRGYjI2xFhdeRudeSM+YaitxGWCVE/80+jWqXP7TndAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuKz+bt4Z5/aaTvePOIYD2UNnFR7ahz/LjzKubLiPD4=; b=rMqglnKzoWHX0Jt4t3/PBwLIc6M/bpxZvm4kYM7LCRLlAe4OJRTnroMF011TNjc2PjYDTe CwS+ccSMkqN1qqYBJik1YMgcp3gpPOi+GTV9rq6s3qXNuTyE/kbLXKBm4BGWxWqCSBAmAg JDaie32WIZNGrwxoXMSpTJ1lNbcHpi8mUhnOlFP0zNI106yTQpzyVYpODwWuDiut/ld0hM UcEMrlf+xDNSRPGMDjflAg102J+7IfrvFT3/xllGkN9TzmgrVWsLnUqeXWA9e4PzyPzTS0 EL53p0kyv1iLCayhxUEouN+xwf5rL006W6SKESg44eDuI9zyh+QDhhwnutJXPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414192; a=rsa-sha256; cv=none; b=L08l2ZTsk+lCdys0zbHOjvLbQsJpDnzjS1VSFl6eAuYCkDy11TVJk8zaUeReVQsAh3Dzwb h4HrrVy/UTMWDtnvU7rb7SZl0EA7gkUgjd3GbYD0IF7mL9mjXsPWJYzfZ8zNbiH9EjmVW/ oIp8+s9FNH5e7WRpzGiUWpA+hu0iJGCnMLhlKsXbxLlHT5Z7MwGN9CsxTy7DOaVdZltO3L 4BJiCMkUMa5HH+bs9b0sRRLH0e1PccBKHYCWSS7ePJiKkzc5cCRbLeAueOce1gAqrF9kgD 32OocvmHfKsLDvM8eJ9kZP/8mGAdCrrEfX9D0nFMmiK85ihFS/l1k55fYp7X0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kh02YkbzbfB; Fri, 5 Jan 2024 00:23: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 4050NCAF025584; Fri, 5 Jan 2024 00:23:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050NCep025581; Fri, 5 Jan 2024 00:23:12 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:12 GMT Message-Id: <202401050023.4050NCep025581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2f47321e3f96 - stable/13 - bsdinstall: Filter out devices that cannot be opened List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f47321e3f96d80bf4fbfad8c2482b93197e03cb Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2f47321e3f96d80bf4fbfad8c2482b93197e03cb commit 2f47321e3f96d80bf4fbfad8c2482b93197e03cb Author: Brad Davis AuthorDate: 2022-05-13 14:33:21 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:18:53 +0000 bsdinstall: Filter out devices that cannot be opened Devices that cannot be opened are most likely the install media and should not be listed as destinations. Reviewed by: allanjude Approved by: allanjude Differential Revision: https://reviews.freebsd.org/D34879 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 964ad27f1e48ec28247142cfe6afdfa1f8bd3182) --- usr.sbin/bsdinstall/partedit/part_wizard.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c index 90dba58383e2..b790e8b3c4d4 100644 --- a/usr.sbin/bsdinstall/partedit/part_wizard.c +++ b/usr.sbin/bsdinstall/partedit/part_wizard.c @@ -131,6 +131,16 @@ boot_disk_select(struct gmesh *mesh) continue; if (strncmp(pp->lg_name, "cd", 2) == 0) continue; + /* + * Check if the disk is available to be opened for + * write operations, it helps prevent the USB + * stick used to boot from being listed as an option + */ + fd = g_open(pp->lg_name, 1); + if (fd == -1) { + continue; + } + g_close(fd); disks = realloc(disks, (++n)*sizeof(disks[0])); disks[n-1].name = pp->lg_name; From nobody Fri Jan 5 00:23:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kh21dYYz55fRJ; Fri, 5 Jan 2024 00:23: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 4T5kh14cgNz4dgG; Fri, 5 Jan 2024 00:23:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UVKQOBEtHhRQ56Q4O5J+sw/nxFQTtvaK6lD2ImPLfhQ=; b=Zq3n4uNtdoclzilwDi8zwEse8+9fQ0Oe1gTSeMZ/Zzyc7K7K+nUtdcuHR1z4YtMxJxTCZG dDz4OKUMkGleBa9Yo2KpmU0d4Xbrue3Wh9IeeuoMykwcJEf4pMoytEu/52hYo9ih6ocZED Jo4gJEhaWttttE73h9ZzdZKruVm6O6kWbj0MA6mH0vv5AKqmHolDFBnI0b4AFt6VoRtQMX CVZTs59aLm+PR2dc4n0Aec5MGXO4qPiyF8IXhKYPPCozHRZqvsr0bB25JoXqsNzg1iLaUw Px5fKGxpusPRzuVm1VIGwOS9Pauz4MZmp4zTLUE1IZS+yeKZ7zQeNwt4PvtMKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UVKQOBEtHhRQ56Q4O5J+sw/nxFQTtvaK6lD2ImPLfhQ=; b=ZanlUclyB5qkxibjXxMb7YH+zBfq/IX6NsMpDuHZXeB9qHZ7aUSiNtoF9KCt9ebT5QhNAe KyUwAk0GTJStUYjlMHSTRonLZKzv/sYhSO6pAT2Xi6TD2vGJUSdkVm/texasnPpaYVw+Ew CBNJZisMjivBuy87jAehW2qs8I1cF4dsF4kTQnhpdNmDCi40evOjlj9A1EAHVO4tIBbxaC wIDvqOnPTVhXvKcEBcclFLZxH4N7NqdsvVAVPJyYmAqWD5wzOCCzTXUhhojjMrAecfeqqA c1lUF6PzfXMCI0DZMwdTJu+iuoeacCWmidJnPJqs7DuLx+aaeavUdf6yPX6/TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414193; a=rsa-sha256; cv=none; b=l4OdmJcMdLSrKJIho0bUVgmnMYAYEIRLU9TIqk51MgzjIF2eYuo4Pe73/hzHCSKW1XZksO t5B3wq3D8g+QzbnCx2c0x5lTZxZu+Ulbfqbh1/C/0UXhC3onrQGAxHtUpcpshZYdADB+0G RjNk+F53ZevZgBH8cxqZKD/BH0Od6YQjmofufmnSN8p3BV+oIagBDmD8StuV8Mko7mTQCM A5yhvkGvMRrEyaiPvx001vvqHqeCMBpfYRyTNNE1l1bd2vtzaCE9Wy6uuN9OwEyTugzOT4 Yrzxiuy8OetF+sAbUQEt37fVpS0hz+4+s9XRGL0rBCQmxMhTZAPSvgs9IBTnzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kh13YtbzbqS; Fri, 5 Jan 2024 00:23: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 4050ND55025635; Fri, 5 Jan 2024 00:23:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050NDRF025632; Fri, 5 Jan 2024 00:23:13 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:13 GMT Message-Id: <202401050023.4050NDRF025632@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e0f29ad461d8 - stable/13 - bsdinstall: add missing init of fd variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e0f29ad461d8473ad96c37e5d494833958f72844 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e0f29ad461d8473ad96c37e5d494833958f72844 commit e0f29ad461d8473ad96c37e5d494833958f72844 Author: Brad Davis AuthorDate: 2022-05-13 15:06:02 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:20:33 +0000 bsdinstall: add missing init of fd variable Missed breaking this commit into smaller pieces Approved by: kp (cherry picked from commit 2c4499dcd72a335a72341492e37f859eed422a6f) --- usr.sbin/bsdinstall/partedit/part_wizard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c index b790e8b3c4d4..52f9ba9f9a5c 100644 --- a/usr.sbin/bsdinstall/partedit/part_wizard.c +++ b/usr.sbin/bsdinstall/partedit/part_wizard.c @@ -104,7 +104,7 @@ boot_disk_select(struct gmesh *mesh) const char *type, *desc; char diskdesc[512]; char *chosen; - int i, err, selected, n = 0; + int i, err, fd, selected, n = 0; LIST_FOREACH(classp, &mesh->lg_class, lg_class) { if (strcmp(classp->lg_name, "DISK") != 0 && From nobody Fri Jan 5 00:23:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kh45W8mz55fRL; Fri, 5 Jan 2024 00:23: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 4T5kh36V8Pz4f2R; Fri, 5 Jan 2024 00:23:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpotea2zrXpL8K/sBhRW9QCHSY+/F8kt1w9+SDM4KsY=; b=b5j8RJEznQ0HtpyHZGcgIlBq9NRmTacv2bLk62WEnootheUBtHE+MbigQVSC3YruXRVRFG lV/jarvA3+1+4xOAScsNaMF8496ZQ6gYDYrVAbEcIFIUxIvbi+f1BmFXYt+ua8slo3Nt86 oawm13KfTHZ/b7cfzgDPJreDyGqs7hDRPZ9e52fpX0mtyeYhNxIquj0vwYcsMDuHBgBObX xERkYHmTh+EM+LG/QrnF7vI+R6JYqZ+x5tC105t+bjv3Ws4qyGeAwsflIOmD77v+Y0vzFQ PcEliE6Un0mCvwaA0q9ulo0MlMm4TDuTFpNnXndWXZShD1EpfVYzlbYaseQzAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpotea2zrXpL8K/sBhRW9QCHSY+/F8kt1w9+SDM4KsY=; b=K2dVGUz70Rxh30+ICqISXLnDdfvtITV9fMkRXTD8LeFAlGu2J8b8MvP7+fTBqKcohTeuH+ cWLznPozyP30bisZbrrmRuKFJ1YPgjaZFV5MJ+QYlN2UzJx1Fs41aT1Z6ov2bQPTHpic2n xQYZ0syAtiBp6osNibV7FIT92IdUhyVBBJMEjXujk6SkB0L2amTKmH9h6X7lRabWzb6OZ9 BwAcoFYjP8F5CoAWEyOYUhhGpdjyr1foDnmKPXG2y7o1UgMZ4pFszcWFxhTDrz0tdwfWVD bcylURy9YWyMDV59JzHvYuBWqRNaBvGY6nfkX8awqZU/jiM72ahD5awKXiKXQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414195; a=rsa-sha256; cv=none; b=EIFLELrMU9av7NMaNfYaM5skrH4gsT+I0n78D6g1rBBuU5BMTAI0roWme1xBGhHfPMqHLJ 2ktJ61PDyBPQ4FZjG43Z8UETH7Gg4mxrf+FCpRDRcfDnPOKb3H3bYDf5pZXan1jFivNwUG XEf0CT0/hhrN+I8F0cJf8PJstQRtjRaZA5MKC8DF/PCQ29PVcuuwZuYVgglepljR3xk0i/ +W8MMWmNaxnEPzeBDKRQVQ6FWM3zDES7NP/Qii1o/mn7XfSU39co497NqJsAkgQFsYCbb/ Vxv9wUfGmQ/egOu8sEdY44ValZgC1gLUmorvOvZfg3mfj09sMviwYCsudUtOJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kh35ZWjzbGt; Fri, 5 Jan 2024 00:23: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 4050NFbj025740; Fri, 5 Jan 2024 00:23:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050NFA2025737; Fri, 5 Jan 2024 00:23:15 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:23:15 GMT Message-Id: <202401050023.4050NFA2025737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 57238e6d0371 - stable/13 - bsdinstall.8: Clarify the description of ZFSBOOT_FORCE_4K_SECTORS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 57238e6d03710a040ad420f0632ba07076372ec5 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=57238e6d03710a040ad420f0632ba07076372ec5 commit 57238e6d03710a040ad420f0632ba07076372ec5 Author: John Baldwin AuthorDate: 2023-11-18 19:31:07 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:22:09 +0000 bsdinstall.8: Clarify the description of ZFSBOOT_FORCE_4K_SECTORS This variable does not set the exact sector size of the pool, but controls the minimum sector size. The sector size of the underlying disks can always be larger than the minium controlled by this knob. PR: 274513 Reported by: Albin "a12l" Otterhäll (cherry picked from commit 84f773037ee4fc78585501a2ce2f5398f0bae9f4) --- usr.sbin/bsdinstall/bsdinstall.8 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 2fbad48ecad4..7862cc241a10 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -23,7 +23,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 18, 2023 +.Dd November 18, 2023 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -424,8 +424,11 @@ or raidz3 (RAID-Z3 Triple Redundancy RAID). Default: .Dq stripe .It Ev ZFSBOOT_FORCE_4K_SECTORS -Indicates either the pool will use 4K or 512 sectors. -If this variable is not empty, 4K sectors will be used. +Controls the minimum sector size of the pool. +If this variable is not empty, the minimum sector size is 4K. +If this variable is empty, the minimum sector size is 512. +Note that the sector size of the pool will always be at least +the sector size of the backing disks. Default: .Dq 1 .It Ev ZFSBOOT_GELI_ENCRYPTION From nobody Fri Jan 5 00:28:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5kns0m6kz55ftv; Fri, 5 Jan 2024 00:28: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 4T5kns0DS8z4hf9; Fri, 5 Jan 2024 00:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PiKMWZ+tm0ueXP6w/Qj+xKXh5oNfQDVDpqT522V48VE=; b=efKYg6LcMNJ0REafw2EUOt5XoLFmgUBnCyJUoL+IIge1JDYQp1dCAwVVjhp3Js2334Z1c7 DuhbS2fxFoG0joh4WXb4zwt1CvE5cL3+UZEtle9O3/Y98yxWTQP6JLI7s1uP2P/oMeruhk ygCMyPRJbt9qerlFfNRvRNpyED3VBnauvE7xio1QWM8Xshm10YBVnbTQJ7TTbGk5W5cdnh yqwzRJ4n+Nn7XCUZuUp0GqolJSyKlaao3JUCIiDFAMtKQZvF4xhXDuvernHigOc15yuKGV B4QkCvUUFW+zQg939WAFgyMTtnXKahDjtOp1Ijlmmi2iSM9lASmX2RrtVhjB2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PiKMWZ+tm0ueXP6w/Qj+xKXh5oNfQDVDpqT522V48VE=; b=eM9M8uAsFNScxViR80RznVVBjvyCaVzJYWrggjhXHqRKXrc36JpOlHwZeUz7V0ldw3RFwD FRpaVq8ykQ4yEMoYzuuHfi5z4cIKy2/ygZb0yfUpAnXJwFRM7Y6rQfNJ54axqkXKs40/HY EQxmcfqOAMRTTKL5ncljOyD/onmdPOiyd8WptroR8at1D/b0cxnCa5Wwll7ERT0hdsk+7O jdwjM4I4QrEzAhO1ZRVElnjSBgGNsDXNlulczNBNhTkIUMPDdXTYVRLs2YyhasX2wwNmY/ 7KS1E/AeSLloWYRbXb8nxyDKiIj3m8bIclyqwubswcX9SQWlnENxnGjG39/VlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414497; a=rsa-sha256; cv=none; b=heBPDFWrMeIho7rf3b3dNn1VgwbCcH9QNYBgEpR+/w2FEX6lUgk3M4EXhwG3xrBkzE3BDI Lz+jIrr0vrWnypjDJ69d3UzEY7+b5w971plHPZHT54FG6Mftz9ikTXhoPaiHiRo+JahWal y9Am0fGXhFsX90d2T6Y4/U/p23TZW4z0ho14iB4rtFSS8rPcpaS3+RJKhXAiattqZAeTvM XXHzdMok+wpJDVfca53J+kD/+hK2iOu4GVT0avPJiJcph4y+cvWdpQAcula47kqxgmcIrj NtT+L+Vpu08I7Oon/sWouFvd0dVEiFoYo1Vy8W1J3w0GyswzTb9FiDzRSGBpdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5knr6PMZzbvx; Fri, 5 Jan 2024 00:28: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 4050SGxr026641; Fri, 5 Jan 2024 00:28:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050SGtY026638; Fri, 5 Jan 2024 00:28:16 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:28:16 GMT Message-Id: <202401050028.4050SGtY026638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6d80d20a64a4 - stable/14 - vmm: refactor event reflection in AMD SVM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6d80d20a64a414782ab2e06ec0603bb40ecfbf41 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6d80d20a64a414782ab2e06ec0603bb40ecfbf41 commit 6d80d20a64a414782ab2e06ec0603bb40ecfbf41 Author: Bojan Novković AuthorDate: 2023-12-07 22:40:28 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:24:36 +0000 vmm: refactor event reflection in AMD SVM This patch refactors AMD SVM event reflection to allow events to be propagated to userland, rather than always reflected into the guest. This is necessary to implement some capabilities that request VMEXITs when a specific exception occurs (e.g. VM_CAP_BPT_EXIT). Reviewed by: jhb Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D42405 (cherry picked from commit 78c1d174a1e13c6522bd4d663225fc9cbabc329d) --- sys/amd64/vmm/amd/svm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index 33ab2eeaedf4..a502632f6ed6 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -1442,11 +1442,12 @@ svm_vmexit(struct svm_softc *svm_sc, struct svm_vcpu *vcpu, info1 = 0; break; } - KASSERT(vmexit->inst_length == 0, ("invalid inst_length (%d) " - "when reflecting exception %d into guest", - vmexit->inst_length, idtvec)); if (reflect) { + KASSERT(vmexit->inst_length == 0, + ("invalid inst_length (%d) " + "when reflecting exception %d into guest", + vmexit->inst_length, idtvec)); /* Reflect the exception back into the guest */ SVM_CTR2(vcpu, "Reflecting exception " "%d/%#x into the guest", idtvec, (int)info1); @@ -1454,8 +1455,8 @@ svm_vmexit(struct svm_softc *svm_sc, struct svm_vcpu *vcpu, errcode_valid, info1, 0); KASSERT(error == 0, ("%s: vm_inject_exception error %d", __func__, error)); + handled = 1; } - handled = 1; break; case VMCB_EXIT_MSR: /* MSR access. */ eax = state->rax; From nobody Fri Jan 5 00:28:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5knt1QHcz55ftx; Fri, 5 Jan 2024 00:28: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 4T5knt0xWTz4hn7; Fri, 5 Jan 2024 00:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OXcVnwbQVK2eG8eJ/cb/XG2ByJoUjKnnhhDy4PPHdQI=; b=cyTtxRu9mrW+uYzkChLj0gkbJqwIqWJtnzY4WyucV0cYYTAQpAYpW9H6MEvOUnKNXEZIJ8 CPIS+XtA06p5NyRZyEbZ93fbgP9yeMI5cfkQg7ZZifx2/XVB9nTk+XUVhCq8I25+VN1yWx maUEcGO4wwhQ0SG5I+6G0R5g4Po3m7nOHeJABW8yAZ5ZxbirmTiIsBbqSxunN15dUBWEmx il6ab6yx2sJ6xpmunXNrMR/3qhR/3O5S8YOFy1CqUrZfd+UN0x4sg+08dI6UcWThabrqPE 9cBEfoOMyGWIu5ab30LTYk0AMG1IEvOKIPaoTwhKVy5OsTKtXzQ4Ywr5Xtn/Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OXcVnwbQVK2eG8eJ/cb/XG2ByJoUjKnnhhDy4PPHdQI=; b=er6eI7iA0luugnhkqzSpfdbreOXlfyrU/iTqWBIx610tnSxF74oxrSzOhp5eeKHDb8bUAn C2R30cQlDSvcebAqdKeGpNeqV6UtSfNpWTcgYPJii1wfFrhAiS8PX1dje3Z3eNXxs9vyfH +GaeS+MA4TWe6XMVBQVsGoOEZDNyjFoZ8I1oL3Qe0WGPVS+9iY0pX10BmqbdHjsxGYkKHp 2Ph4JiwAyTfLCQ7Fz+48f8xCTl1crYC3I0FBTrh1M/Si5qNyqdLOazaAAF9c/0ScZdHSSf sbkGpAGiVK0rFb9jQhKJpddHnXRrG96EElP9NHffWoqf7Zf7caSxYlPTvAE/2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414498; a=rsa-sha256; cv=none; b=l8qqg76jcOL1QXvFAfF4WnIJYZFN+7iG1UK3fXBTaNDD7un9Msl9zksWfPAKKXV1lHQgaD S0qN0AgvYWSC75dYik2c4H0k75Qka7xrpAKFuprC5ihHPOYTp1pmsERpCaTIEmwLbtROSD oZFYEKiTFPWZ1Hwh0uSf8k2P55pR1cw/JdOqidlnE5AVcMzsvPy49Pa3SkhHykGUQBR/Bu LX8TYAkRcI/AudVfbsEA9gRrHseTj7KsWf9epq77NBkfQerkcZ75CRR928TtGpp91FAr0B dVihSRX7UrZP9AJ+AUtSOlyv2q5cErz6XPnp+T4gFzReMdotK9Mboc+kuMeSSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5kns75cjzbsY; Fri, 5 Jan 2024 00:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4050SHXC026690; Fri, 5 Jan 2024 00:28:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050SHhs026687; Fri, 5 Jan 2024 00:28:17 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:28:17 GMT Message-Id: <202401050028.4050SHhs026687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3613a2806667 - stable/14 - vmm: enable software breakpoints for AMD CPUs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3613a28066674aead5487d67952d50c6b228578b Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3613a28066674aead5487d67952d50c6b228578b commit 3613a28066674aead5487d67952d50c6b228578b Author: Bojan Novković AuthorDate: 2023-12-07 22:46:31 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:25:22 +0000 vmm: enable software breakpoints for AMD CPUs This patch adds support for software breakpoint vmexits on AMD SVM. It implements the VM_CAP_BPT_EXIT used to enable software breakpoints. When enabled, breakpoint vmexits are passed to userspace where they are handled by the GDB stub. Reviewed by: jhb Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D42295 (cherry picked from commit 231eee17d2905682014b71d1f01719003b13bd91) --- sys/amd64/vmm/amd/svm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index a502632f6ed6..ec0cde31aaad 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -1421,6 +1421,12 @@ svm_vmexit(struct svm_softc *svm_sc, struct svm_vcpu *vcpu, break; case IDT_BP: + vmexit->exitcode = VM_EXITCODE_BPT; + vmexit->u.bpt.inst_length = vmexit->inst_length; + vmexit->inst_length = 0; + + reflect = 0; + break; case IDT_OF: case IDT_BR: /* @@ -2333,6 +2339,9 @@ svm_setcap(void *vcpui, int type, int val) if (val == 0) error = EINVAL; break; + case VM_CAP_BPT_EXIT: + svm_set_intercept(vcpu, VMCB_EXC_INTCPT, BIT(IDT_BP), val); + break; case VM_CAP_IPI_EXIT: vlapic = vm_lapic(vcpu->vcpu); vlapic->ipi_exit = val; @@ -2366,6 +2375,9 @@ svm_getcap(void *vcpui, int type, int *retval) case VM_CAP_UNRESTRICTED_GUEST: *retval = 1; /* unrestricted guest is always enabled */ break; + case VM_CAP_BPT_EXIT: + *retval = svm_get_intercept(vcpu, VMCB_EXC_INTCPT, BIT(IDT_BP)); + break; case VM_CAP_IPI_EXIT: vlapic = vm_lapic(vcpu->vcpu); *retval = vlapic->ipi_exit; From nobody Fri Jan 5 00:28:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5knv71wPz55g2y; Fri, 5 Jan 2024 00:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5knv44Ttz4hwM; Fri, 5 Jan 2024 00:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hxBux4t7VCT+EBOJ966TDvq+YlykdekpSGDXDedsCTo=; b=puCEYZAEKalM1Wtatpf8OsPaha4sZV8m4dAFhLT7N+e+/jn9aSoaHi0dg6dKT0LzAApKrv KiXXQS/3u3xyHjcwhKmHKHYeVmW/5WqUXdryM6PeBnUPEp42ZqeXBk9v/UK25lmrvh6ga2 pbxkDbwT2q6P3kTYvAywQeKcrLxelSa1QiSIhwdprqShhfcLBLabZhAoF2XlMoMebdsQcv YtmImGTJOxCruETpGw2lYJ2ubCnToX2Y4C6QAuANU5GGN4KMGES2xxWfxUz0cJwlxTi3+H W3D8fOXrJ4AsYSoSvkwaGW2pdMZ6JxYGFo/2MdIMJ/gtNAmcwU9YBnnxuy/6ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hxBux4t7VCT+EBOJ966TDvq+YlykdekpSGDXDedsCTo=; b=O5cE+O8t11m+vws2V2+r+m3tvdxWUJ0Qbdq+pJU01Q/VZwhbyjzHWYAzvGU0zZI0Mp+fA7 UwGL0t4Fvd5dwyn3zvtv7DO9XgB7Agga7kSwFysHTx1fY3TfoeLl3MpYHMyRurVtTNruy9 fqOb1jRiXMfjmA2yoy/x5X9IMIXdLB0vSnpoZgmt9lzV3l3FoP/UTWG0/Etvi+jaJz41Ht 3vVhWPNIpQLL12Pbl04ljZuFayvkW6iVTt2kbAs1aLzBr5Lzc38OmQ5voW1y+OD+ibsAav +gB81FChvEoz2Xw6wvQ4nwNP+xeKBCUtsA6kVgaYB+NxdV3OAmJBzU5yCK74lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414499; a=rsa-sha256; cv=none; b=YMWtdPLq4hhpfGRgsMeQcw+ZExyuIRlhkJOPvaGeR6pvLrdrjLYGq0mWmj2Gd0qmtviaYZ TCa9SCAip15rd3Nv0ulBg78x5b3utfM/fWjFziQPLB6eek+IY9wxXeP3BK6h2LZniaGjW0 NcoLNSfR9+gqCXE5S82uSHx3VgtSHvobCRcWGEVyo3Un3pGLtoY8PAJ4NGaLi39XodZ3Vs iR1erw2bQzEC2rW0IC2aHXbjVFOIEeCn5rnMXNnNg90nGFixTK/aBH9BFwi4ueWhNsqUo8 DJY9W1yBnhOmvOOavoqVq6J1x1GxXQAjQ3PN5hQeuGwHBX5kEoDO0Hs6Zb1Ugw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5knv13S5zbfN; Fri, 5 Jan 2024 00:28: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 4050SJEx026737; Fri, 5 Jan 2024 00:28:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050SJQd026734; Fri, 5 Jan 2024 00:28:19 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:28:19 GMT Message-Id: <202401050028.4050SJQd026734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8da9183dcdd3 - stable/14 - vmm: implement single-stepping for AMD CPUs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8da9183dcdd328c54df527e90f50dc41aafd9c33 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8da9183dcdd328c54df527e90f50dc41aafd9c33 commit 8da9183dcdd328c54df527e90f50dc41aafd9c33 Author: Bojan Novković AuthorDate: 2023-12-07 23:00:31 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:25:41 +0000 vmm: implement single-stepping for AMD CPUs This patch implements single-stepping for AMD CPUs using the RFLAGS.TF single-stepping mechanism. The GDB stub requests single-stepping using the VM_CAP_RFLAGS_TF capability. Setting this capability will set the RFLAGS.TF bit on the selected vCPU, activate DB exception intercepts, and activate POPF/PUSH instruction intercepts. The resulting DB exception is then caught by the IDT_DB vmexit handler and bounced to userland where it is processed by the GDB stub. This patch also makes sure that the value of the TF bit is correctly updated and that it is not erroneously propagated into memory. Stepping over PUSHF will cause the vm_handle_db function to correct the pushed RFLAGS value and stepping over POPF will update the shadowed TF bit copy. Reviewed by: jhb Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D42296 (cherry picked from commit e3b4fe645e50bfd06becb74e52ea958315024d5f) --- sys/amd64/include/vmm.h | 8 +++ sys/amd64/vmm/amd/svm.c | 151 +++++++++++++++++++++++++++++++++++++++++- sys/amd64/vmm/amd/svm_softc.h | 8 +++ sys/amd64/vmm/vmm.c | 37 +++++++++++ 4 files changed, 202 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index 2b18e1c97dd6..273a1a46ba04 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -495,6 +495,7 @@ enum vm_cap_type { VM_CAP_RDTSCP, VM_CAP_IPI_EXIT, VM_CAP_MASK_HWINTR, + VM_CAP_RFLAGS_TF, VM_CAP_MAX }; @@ -643,6 +644,7 @@ enum vm_exitcode { VM_EXITCODE_VMINSN, VM_EXITCODE_BPT, VM_EXITCODE_IPI, + VM_EXITCODE_DB, VM_EXITCODE_MAX }; @@ -732,6 +734,12 @@ struct vm_exit { struct { int inst_length; } bpt; + struct { + int trace_trap; + int pushf_intercept; + int tf_shadow_val; + struct vm_guest_paging paging; + } dbg; struct { uint32_t code; /* ecx value */ uint64_t wval; diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index ec0cde31aaad..1507377a0cfe 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -131,7 +131,7 @@ static VMM_STAT_AMD(VMEXIT_VINTR, "VM exits due to interrupt window"); static int svm_getdesc(void *vcpui, int reg, struct seg_desc *desc); static int svm_setreg(void *vcpui, int ident, uint64_t val); - +static int svm_getreg(void *vcpui, int ident, uint64_t *val); static __inline int flush_by_asid(void) { @@ -1282,6 +1282,8 @@ exit_reason_to_str(uint64_t reason) { .reason = VMCB_EXIT_ICEBP, .str = "icebp" }, { .reason = VMCB_EXIT_INVD, .str = "invd" }, { .reason = VMCB_EXIT_INVLPGA, .str = "invlpga" }, + { .reason = VMCB_EXIT_POPF, .str = "popf" }, + { .reason = VMCB_EXIT_PUSHF, .str = "pushf" }, }; for (i = 0; i < nitems(reasons); i++) { @@ -1419,7 +1421,69 @@ svm_vmexit(struct svm_softc *svm_sc, struct svm_vcpu *vcpu, errcode_valid = 1; info1 = 0; break; - + case IDT_DB: { + /* + * Check if we are being stepped (RFLAGS.TF) + * and bounce vmexit to userland. + */ + bool stepped = 0; + uint64_t dr6 = 0; + + svm_getreg(vcpu, VM_REG_GUEST_DR6, &dr6); + stepped = !!(dr6 & DBREG_DR6_BS); + if (stepped && (vcpu->caps & (1 << VM_CAP_RFLAGS_TF))) { + vmexit->exitcode = VM_EXITCODE_DB; + vmexit->u.dbg.trace_trap = 1; + vmexit->u.dbg.pushf_intercept = 0; + + if (vcpu->dbg.popf_sstep) { + /* + * DB# exit was caused by stepping over + * popf. + */ + uint64_t rflags; + + vcpu->dbg.popf_sstep = 0; + + /* + * Update shadowed TF bit so the next + * setcap(..., RFLAGS_SSTEP, 0) restores + * the correct value + */ + svm_getreg(vcpu, VM_REG_GUEST_RFLAGS, + &rflags); + vcpu->dbg.rflags_tf = rflags & PSL_T; + } else if (vcpu->dbg.pushf_sstep) { + /* + * DB# exit was caused by stepping over + * pushf. + */ + vcpu->dbg.pushf_sstep = 0; + + /* + * Adjusting the pushed rflags after a + * restarted pushf instruction must be + * handled outside of svm.c due to the + * critical_enter() lock being held. + */ + vmexit->u.dbg.pushf_intercept = 1; + vmexit->u.dbg.tf_shadow_val = + vcpu->dbg.rflags_tf; + svm_paging_info(svm_get_vmcb(vcpu), + &vmexit->u.dbg.paging); + } + + /* Clear DR6 "single-step" bit. */ + dr6 &= ~DBREG_DR6_BS; + error = svm_setreg(vcpu, VM_REG_GUEST_DR6, dr6); + KASSERT(error == 0, + ("%s: error %d updating DR6\r\n", __func__, + error)); + + reflect = 0; + } + break; + } case IDT_BP: vmexit->exitcode = VM_EXITCODE_BPT; vmexit->u.bpt.inst_length = vmexit->inst_length; @@ -1545,6 +1609,42 @@ svm_vmexit(struct svm_softc *svm_sc, struct svm_vcpu *vcpu, case VMCB_EXIT_MWAIT: vmexit->exitcode = VM_EXITCODE_MWAIT; break; + case VMCB_EXIT_PUSHF: { + if (vcpu->caps & (1 << VM_CAP_RFLAGS_TF)) { + uint64_t rflags; + + svm_getreg(vcpu, VM_REG_GUEST_RFLAGS, &rflags); + /* Restart this instruction. */ + vmexit->inst_length = 0; + /* Disable PUSHF intercepts - avoid a loop. */ + svm_set_intercept(vcpu, VMCB_CTRL1_INTCPT, + VMCB_INTCPT_PUSHF, 0); + /* Trace restarted instruction. */ + svm_setreg(vcpu, VM_REG_GUEST_RFLAGS, (rflags | PSL_T)); + /* Let the IDT_DB handler know that pushf was stepped. + */ + vcpu->dbg.pushf_sstep = 1; + handled = 1; + } + break; + } + case VMCB_EXIT_POPF: { + if (vcpu->caps & (1 << VM_CAP_RFLAGS_TF)) { + uint64_t rflags; + + svm_getreg(vcpu, VM_REG_GUEST_RFLAGS, &rflags); + /* Restart this instruction */ + vmexit->inst_length = 0; + /* Disable POPF intercepts - avoid a loop*/ + svm_set_intercept(vcpu, VMCB_CTRL1_INTCPT, + VMCB_INTCPT_POPF, 0); + /* Trace restarted instruction */ + svm_setreg(vcpu, VM_REG_GUEST_RFLAGS, (rflags | PSL_T)); + vcpu->dbg.popf_sstep = 1; + handled = 1; + } + break; + } case VMCB_EXIT_SHUTDOWN: case VMCB_EXIT_VMRUN: case VMCB_EXIT_VMMCALL: @@ -2346,6 +2446,50 @@ svm_setcap(void *vcpui, int type, int val) vlapic = vm_lapic(vcpu->vcpu); vlapic->ipi_exit = val; break; + case VM_CAP_RFLAGS_TF: { + uint64_t rflags; + + /* Fetch RFLAGS. */ + if (svm_getreg(vcpu, VM_REG_GUEST_RFLAGS, &rflags)) { + error = (EINVAL); + break; + } + if (val) { + /* Save current TF bit. */ + vcpu->dbg.rflags_tf = rflags & PSL_T; + /* Trace next instruction. */ + if (svm_setreg(vcpu, VM_REG_GUEST_RFLAGS, + (rflags | PSL_T))) { + error = (EINVAL); + break; + } + vcpu->caps |= (1 << VM_CAP_RFLAGS_TF); + } else { + /* + * Restore shadowed RFLAGS.TF only if vCPU was + * previously stepped + */ + if (vcpu->caps & (1 << VM_CAP_RFLAGS_TF)) { + rflags &= ~PSL_T; + rflags |= vcpu->dbg.rflags_tf; + vcpu->dbg.rflags_tf = 0; + + if (svm_setreg(vcpu, VM_REG_GUEST_RFLAGS, + rflags)) { + error = (EINVAL); + break; + } + vcpu->caps &= ~(1 << VM_CAP_RFLAGS_TF); + } + } + + svm_set_intercept(vcpu, VMCB_EXC_INTCPT, BIT(IDT_DB), val); + svm_set_intercept(vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_POPF, + val); + svm_set_intercept(vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_PUSHF, + val); + break; + } default: error = ENOENT; break; @@ -2382,6 +2526,9 @@ svm_getcap(void *vcpui, int type, int *retval) vlapic = vm_lapic(vcpu->vcpu); *retval = vlapic->ipi_exit; break; + case VM_CAP_RFLAGS_TF: + *retval = !!(vcpu->caps & (1 << VM_CAP_RFLAGS_TF)); + break; default: error = ENOENT; break; diff --git a/sys/amd64/vmm/amd/svm_softc.h b/sys/amd64/vmm/amd/svm_softc.h index e92d3c2e734c..0fd2303a7242 100644 --- a/sys/amd64/vmm/amd/svm_softc.h +++ b/sys/amd64/vmm/amd/svm_softc.h @@ -36,6 +36,12 @@ struct svm_softc; +struct dbg { + uint32_t rflags_tf; /* saved RFLAGS.TF value when single-stepping a vcpu */ + bool popf_sstep; /* indicates that we've stepped over popf */ + bool pushf_sstep; /* indicates that we've stepped over pushf */ +}; + struct asid { uint64_t gen; /* range is [1, ~0UL] */ uint32_t num; /* range is [1, nasid - 1] */ @@ -54,6 +60,8 @@ struct svm_vcpu { struct asid asid; struct vm_mtrr mtrr; int vcpuid; + struct dbg dbg; + int caps; /* optional vm capabilities */ }; /* diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 74fa83ea18d9..f399f876717d 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -1765,6 +1765,40 @@ vm_handle_reqidle(struct vcpu *vcpu, bool *retu) return (0); } +static int +vm_handle_db(struct vcpu *vcpu, struct vm_exit *vme, bool *retu) +{ + int error, fault; + uint64_t rsp; + uint64_t rflags; + struct vm_copyinfo copyinfo; + + *retu = true; + if (!vme->u.dbg.pushf_intercept || vme->u.dbg.tf_shadow_val != 0) { + return (0); + } + + vm_get_register(vcpu, VM_REG_GUEST_RSP, &rsp); + error = vm_copy_setup(vcpu, &vme->u.dbg.paging, rsp, sizeof(uint64_t), + VM_PROT_RW, ©info, 1, &fault); + if (error != 0 || fault != 0) { + *retu = false; + return (EINVAL); + } + + /* Read pushed rflags value from top of stack. */ + vm_copyin(©info, &rflags, sizeof(uint64_t)); + + /* Clear TF bit. */ + rflags &= ~(PSL_T); + + /* Write updated value back to memory. */ + vm_copyout(&rflags, ©info, sizeof(uint64_t)); + vm_copy_teardown(©info, 1); + + return (0); +} + int vm_suspend(struct vm *vm, enum vm_suspend_how how) { @@ -1933,6 +1967,9 @@ restart: case VM_EXITCODE_INOUT_STR: error = vm_handle_inout(vcpu, vme, &retu); break; + case VM_EXITCODE_DB: + error = vm_handle_db(vcpu, vme, &retu); + break; case VM_EXITCODE_MONITOR: case VM_EXITCODE_MWAIT: case VM_EXITCODE_VMINSN: From nobody Fri Jan 5 00:28:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5knw4jtzz55g4h; Fri, 5 Jan 2024 00:28: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 4T5knw2xBXz4hwd; Fri, 5 Jan 2024 00:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+py28czMQZWD8x9SS0taiPsPscuaQkC+tfsd9Hz+6k=; b=dDyULmJUzUK7WWFpp23/fxDWYZyoDPrF39wIvjBp4fcAqhx5LhD1sO0yMP9Bnbu7VKInQD iDXY4iTvM6bu3/x1gM3U/HTqxAb9hd5lZQ6K4PYaNX2PGNhTIHuunYVCnX2qoSFjqTqXdz Bueg7kuNd5TMwZPinfqrby8ufIZdT6RCCQtDqGira8IMGifAJANJJjWKpps5q1R42Hm6RG IPkYv42sz0FxkjA4WHkT8ijeu4nfxUhgu8smOUmBzgDT6nWfy+P9BZzGiw0CmdWme4WEEN XnPJ3TnfHd+l/ORG6MsvLKLZCCcojVfuSZI3l55EU9YoCRMwKDM1KVKSdjOqeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+py28czMQZWD8x9SS0taiPsPscuaQkC+tfsd9Hz+6k=; b=Haz5sX6OmuyXtfePlHpoDTgdrntk8uKM5zbdcihvQRMx9u2x4mKsa+sSkXKu4/1UTRc2hD yiYmZKv75H8z3fDIr+J0oC3PK2yVhq8WSrzEJzei/4a3RXXQqnCQWxXfOBF7ZNEBcD/MEa QDrAq1HRsTbrrXeDVer9P7E2I9zC8mJ5zk9RViM19VrXide8hhUIJPiYH0mvstf5r+JKhI 9q6za3VDHz89bajBHAeNOEfzI3Yc4fCR5m/gNeRVrJkHF52qBThRgSWyKjxmsFJa9qkm4N bFmHztG2Wh7cHPv01QvV5rLHe0Nyt6iyHMalJu2AzXvwSxwYeQaOZrTP/iX/sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414500; a=rsa-sha256; cv=none; b=BJCAgZFX6zONo/gRvPRWBxr2ujI9/shlCZ/Ffvdtj8L/Ri2JpED6x/k1VPdWkmf7QZFw5K TyG811Zjf1YONA++pJojjGITdxqKaOrBAb8rX5XFzshAOZ1KYyrYmUww5CvwKmuoZtPxKz hhmj2Siv9iDyOSNLVvU+JrJ0U2wnPb9Io391MjkqOKY4qUDKE2oRe1YxWZFTTnhQC5kDyZ I+HUEZEVR5WAbR2eXP/hR++M7XmHKmLptJ/+UprIZz4dEmHf6l4P3nQ27/X5f/wh+woz7w 1MBUQ4uDCQ4kHNKRXhHcwLEpQcMIKJZ/mq72iQB0tkc32vo9CRoVpPse34RYhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5knw21hLzbvy; Fri, 5 Jan 2024 00:28: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 4050SKxF026790; Fri, 5 Jan 2024 00:28:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050SKHM026787; Fri, 5 Jan 2024 00:28:20 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:28:20 GMT Message-Id: <202401050028.4050SKHM026787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b879ddc755b7 - stable/14 - vmm: implement VM_CAP_MASK_HWINTR on AMD CPUs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b879ddc755b7eb36e1cd2468f9b55ddb3088c850 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b879ddc755b7eb36e1cd2468f9b55ddb3088c850 commit b879ddc755b7eb36e1cd2468f9b55ddb3088c850 Author: Bojan Novković AuthorDate: 2023-12-07 23:08:58 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:25:49 +0000 vmm: implement VM_CAP_MASK_HWINTR on AMD CPUs This patch implements the interrupt blocking VM capability on AMD CPUs. Implementing this capability allows the GDB stub to single-step a virtual machine without landing inside interrupt handlers. Reviewed by: jhb, corvink Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D42299 (cherry picked from commit 181afaaaee0025f948346fe8b9ec5356a0cdef97) --- sys/amd64/vmm/amd/svm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index 1507377a0cfe..3fda9454090b 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -1725,6 +1725,10 @@ svm_inj_interrupts(struct svm_softc *sc, struct svm_vcpu *vcpu, int vector, need_intr_window; int extint_pending; + if (vcpu->caps & (1 << VM_CAP_MASK_HWINTR)) { + return; + } + state = svm_get_vmcb_state(vcpu); ctrl = svm_get_vmcb_ctrl(vcpu); @@ -2446,6 +2450,10 @@ svm_setcap(void *vcpui, int type, int val) vlapic = vm_lapic(vcpu->vcpu); vlapic->ipi_exit = val; break; + case VM_CAP_MASK_HWINTR: + vcpu->caps &= ~(1 << VM_CAP_MASK_HWINTR); + vcpu->caps |= (val << VM_CAP_MASK_HWINTR); + break; case VM_CAP_RFLAGS_TF: { uint64_t rflags; @@ -2529,6 +2537,9 @@ svm_getcap(void *vcpui, int type, int *retval) case VM_CAP_RFLAGS_TF: *retval = !!(vcpu->caps & (1 << VM_CAP_RFLAGS_TF)); break; + case VM_CAP_MASK_HWINTR: + *retval = !!(vcpu->caps & (1 << VM_CAP_MASK_HWINTR)); + break; default: error = ENOENT; break; From nobody Fri Jan 5 00:28:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5knx5MLhz55gFf; Fri, 5 Jan 2024 00:28: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 4T5knx3xG0z4hfs; Fri, 5 Jan 2024 00:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LHVP6BIWeKa0aEYRUWcb01S20WiQV71B8B+ROIf2cko=; b=Ro9F1weNj7pVH50mBGMbjcgXmbL+DZBLIvZooJyE7TTLAE46JmeNqhCmKJiBNFPoE5EkGa CGE37GBGo+YNqiEa9N4wwNHJvORGZHpdszfQGL94Pg3kehdH5ZKMrZTH3+eM4lRrlV8UVp vu022ecT1AwcmHKIvb69UN/86nwGiEsl+9G2Mzru/k+o8k02qWiVQbGLfrKUk7LCjUddcC EngekbbKo2HZxa5kmJr+OZunDTp+AGXeG0XQDH17195mbgncd0XCMa3bjYRy/nXTEWMO7V VDpPR/R/RNz+X7Rg28CZpVWY9QY1Ukb6uO+0ZVTX0Dw8hoQ4+Qp+muGJJUkEZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704414501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LHVP6BIWeKa0aEYRUWcb01S20WiQV71B8B+ROIf2cko=; b=Q3fKIWMZrCF8xvtMMjnr9Xb6FhmUyylcw8xtGFqKZgyDuXpIe71YYAvVcVlfoYU2ih+Vrq 3FPbXOgkJbB/Y7ju05GSN1lm8fO9JVwaujaRyLWHBLVAx+CPrroun0zH4FA+d4CYbkVAUr ssZdOlf+0d5QM937Ii6/UFeimeq76BwWl/1Za6sPDBFGC0G30fsi+jtvu28YOGsHHymVjf b7G7aXdgW5v5gtZBVd8Pvc83Xypv6TBSNC4yyPBPHWHurLeRELTKmGU1N6eCCE2qFLsUBV /Yiqhd/5bs7ve9CWo96MxULxfW7ig/ZePMUy3xoIEvgKuZ90EzujyVwm2lfV7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704414501; a=rsa-sha256; cv=none; b=JFHs7uH8INCZpiC6qJQojKYFCbKIWoYGQvE/o81bg2uKzUAjcF4PHzug9u3uJyGpIAEIv8 syM1TyvTv7xcBJDd8bzgy74e8Zm/zs2a0wJ9KI3j3a5/QDPH/tcfbQLJRYKtitgbJuKUee bncJgmvoOpkp2ck3KoDCemHTlHTkQH8d1u35VZVB6YiEOlQDbJXydegBKiSs7y5NKn4eVt VTzIhjCNmZGvKmGpctTE5TxqAELWnTwYw8CbFEr8drTzFiO+sGEuzN5jDZGnOdT8oNpgKz RHeJyPtd1hYGKpD4l8fk7dCxv7kEUFZGOiAXuTphrNAVt3KfovQF6SUmCGzeqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5knx32W1zbH4; Fri, 5 Jan 2024 00:28: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 4050SL1n026845; Fri, 5 Jan 2024 00:28:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050SLvQ026842; Fri, 5 Jan 2024 00:28:21 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:28:21 GMT Message-Id: <202401050028.4050SLvQ026842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 791e4d689520 - stable/14 - bhyve: refactor gdbstub to enable single-stepping on AMD CPUs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 791e4d68952029e026b2a03b41f830386d5f9d71 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=791e4d68952029e026b2a03b41f830386d5f9d71 commit 791e4d68952029e026b2a03b41f830386d5f9d71 Author: Bojan Novković AuthorDate: 2023-12-12 23:28:59 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:26:28 +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 (cherry picked from commit ca96a942cafb58476e10e887240e594e7923a6e8) --- 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 a6c0700308e7..9748f7d82b44 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -744,6 +744,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. @@ -798,10 +835,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); } } @@ -836,26 +870,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) { @@ -870,6 +902,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) { @@ -941,11 +1001,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 Fri Jan 5 00:48:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5lFJ2z3vz55j6p; Fri, 5 Jan 2024 00:48: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 4T5lFJ2RLHz4q2x; Fri, 5 Jan 2024 00:48:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KqlnRrcufTxyDSatnCS4JtSHX4FXr+WGQONaK7xZQoM=; b=GGNYfL4WZFgiSiiHwpIFmoTGDCGptW1NMB8ZRP0rT3f98E8b3kNP4mGVhYrBVXlvLaTB5s lZlenxpPLaqUdxa6FjoaSmk3Jfq5FWriyHPp6uvxk1QYC9m54mrNViccqpRbwE+Fj2oqbw h/7KlyJfK8FOV7wrJuk/9aYzUihccUpRbmYzwo8Ea68J4i4cexhfKIPDYzyWGVOgJDCqi9 g12Tsdk/ommfFR5/khG8HtOdeo7mIGzyPU7pD2BzJXaDHYB0VFNLGh15jDE70DL4EYVfiL HLzFWRwMm9A0+novaRM9FO0hHra1AbOxnY1vqKO7BDXvI6Mi0joFm6aZ77Z1zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KqlnRrcufTxyDSatnCS4JtSHX4FXr+WGQONaK7xZQoM=; b=gg6HpUSZiA9Y6DLCGWEBqydtfpce7TKJ0I/S2msCQk7fVosaOSS19mtdzWzix11KP0UQiK t3UD+lEekRlVM8eGd6eOnaUCn7NApX1Bl4ATS3rpjueGzi0Mdp+kHEvIcsR4ZT/WagIsaD lvrAXp0ploiq3oGgeEjD2jBJ3LTkXchPQb7HWW55sQ47nu400+iVeVWSUtzVYBWu9RmBEW PwdESdCrxqSjLd898kD9kFD1r/d2MDr3/Zq4vl39+fZMv8YqrgeNliVTja9q2q91C3ShYL O4hrxrgxwMT3u5vfzfqgvYFWKohrg52/Rfq7XbriH/I0dhGsjfPC6XgO2VXROQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704415716; a=rsa-sha256; cv=none; b=IrJZ9LzhyoeGwwBjQ671JUaje3lvFT4zfTf0L/Ql5x9siDqMrX3gXdXNG+cGEsg/VcK1zQ 6Po55+EbRYs1IqXesnL5o2/XmEQ2eg7Ciinj5+3Yw6CvfszYx6FQ7Te6XS9kHdT50nHkO2 i2mtu1/p4+aj8B9cpdVqzvF086NrXbAFLv1NVaB7BrqtqHBuwsD3L6wjs9cZ6ylOR/IqOl iviw+uttS8NLifQ7279fDJSzoWQO/fRQvWwwHfvlP+sIRWMQsRfsPKfLEu7OjkdvDpuH18 jjStwP2eBnqbTNmdxH9d/OxHT+srll4ybm2Z8L9CV/PIb1Nd6+UqGxZsrz2F7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5lFJ1TSfzcDf; Fri, 5 Jan 2024 00:48: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 4050maU4060486; Fri, 5 Jan 2024 00:48:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050ma5I060483; Fri, 5 Jan 2024 00:48:36 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:48:36 GMT Message-Id: <202401050048.4050ma5I060483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b33f2155d340 - stable/14 - kldxref: Add a copyright and license statement to ef.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b33f2155d3404909313e052ba767930c4150841d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b33f2155d3404909313e052ba767930c4150841d commit b33f2155d3404909313e052ba767930c4150841d Author: John Baldwin AuthorDate: 2023-12-12 23:29:43 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:28:31 +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 (cherry picked from commit 087c4c90d193c1401613e1e13fa99db8de52c8f0) --- 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 Fri Jan 5 00:48:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5lFK4GyFz55jM7; Fri, 5 Jan 2024 00:48: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 4T5lFK3WMxz4q7g; Fri, 5 Jan 2024 00:48:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FON3T7ryM1SqiTuecCRcRs4liJPqQzqA19vzS3VhR/8=; b=xxLvhw5Yqg9WVwm1sGgligx1lzW8BDB44yAkxJ6ncunJm617IMpGyDMpZf0mrbnK6Z80eV R9bWCdyzWJWvUvybVDJXs2P1u1/Y8CBFh5TN6PXV04jCxDtkzdHAbuIVJgNR5dTfNfwovX MoNRw1mgu+850Kch2hgwH+ckcRn08gdBYJZtLhGN2dsYyZgFGjr3VVW4nQo5R2hr7xYGIK Bb/p41xYQcAgcXM1ydDzh4UFdeBclx8ILlcpMQrTEi5TT6nSARWaU9uwOMQOOsSu/GRfrz 555p3L/f4CtEsWiqXGEIk+5VUMEQS8jApxc0FbNV/o8dAjL/Au9lcMrP6sUtrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FON3T7ryM1SqiTuecCRcRs4liJPqQzqA19vzS3VhR/8=; b=A14yY50abvqWkxHQqPxy6g8ESJ72mTu2b/lhX6IjAIXHTKXEZYuwgmd3qH3B8NLa0jaW77 q3JiK10zceQm9+TR4A4Z6eNMuYRGHCpq3mA+Ec/EywO5IhSxLWX3AaVR7RXsBKk62Ov/0Y pDA+Iy1qOM/fajjHOl8NKuDgg2htgOSS34bLuw3i0aIFgPRDVgHi3/BqFYcwpgAuqnm9TC FNL/wNmDNXt2/OZkNO6zVdaDfI025FIzhquhDuHBDKtLLzqUJozWRHJY7M++UoGI2v/SAb pniZrchE7TmGvphop2CK31F7loBdxTEDNQLDKIrHmUREDIxfGecilpT2UHcKKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704415717; a=rsa-sha256; cv=none; b=nyzcS04oWtd0Ncqqp4Fs9H+hSrJiljbpFMvnKHYJ0as+QsxUReKRw23QPJCleOi8ic9PcH oO54kYlz2UH8cnObhBg0KBgEuvo3c97hPFcDO/wRf2XC3jZ8eqMj07g3XRq5mK+aZvgoi7 +bJiIhvH36glnfi5tDQbMG7uA6tbX/eX6Dljc4NjQXfNLW5y1JQAFano/CfY+m4E0XOdPg hhkD+NeqlfHl9AybYU9k0+8nE1NWT0JTMRU+yvj6dRcqx3szvuoqL3B79aJKFw91LYjxgL fp0hHE1M27bgT/HOFgXwd6znFup0iwR/yeNAFMYiI34pOlziUokae5WH9ii1XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5lFK2cjSzc0N; Fri, 5 Jan 2024 00:48: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 4050mb83060527; Fri, 5 Jan 2024 00:48:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050mbHj060524; Fri, 5 Jan 2024 00:48:37 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:48:37 GMT Message-Id: <202401050048.4050mbHj060524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a697425ccc48 - stable/14 - Stop #defining FREEBSD_ELF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a697425ccc48d8a5ca3106b014feee4b3b397c21 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a697425ccc48d8a5ca3106b014feee4b3b397c21 commit a697425ccc48d8a5ca3106b014feee4b3b397c21 Author: John Baldwin AuthorDate: 2023-12-12 23:30:00 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:28:48 +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 (cherry picked from commit 4a3cf5f329d69076aa9d093d596eb0ee82d917f5) --- 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 9f3b015fef7e..bd9ab9e7ec5b 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -35,7 +35,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 86e0fb2b5d22..6906e08f5f36 100644 --- a/stand/common/load_elf_obj.c +++ b/stand/common/load_elf_obj.c @@ -35,7 +35,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 a7243bc634fd..e4b3e961a4f0 100644 --- a/stand/common/reloc_elf.c +++ b/stand/common/reloc_elf.c @@ -33,7 +33,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 Fri Jan 5 00:48:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5lFM0Mn2z55jNy; Fri, 5 Jan 2024 00:48: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 4T5lFL4d69z4qDP; Fri, 5 Jan 2024 00:48:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lzS66TU4MwEFfBYSmcbCBdI+XnARD+gcxAeM+qQFsxk=; b=CuMkniuk1lhgR22vb7qoJROI4C4euiLEVOeJioajyVVrWOv29sAC78SnIqQq0oKJzbfXSx ChAxxCT/EQdpOOlEmeCpw7J6vLPLYN0cNdml0QfMz6U4sCBt0KsG6Iam45Qn/7/StArzJw 9gvatgrBz8YRXqYJ5DmLP5lH87AzAy4Sm/aQTTeFntCFLCRicwK73Wo8cjCI0eb8Et5naJ AUyK7Fo5gW20BauUmDbczxDqvgDW4KTufIOwzfaKXQzdFuXgVwxFP5b9QUNaLHfDSD2pNH 35qSFg0pl+QwXDsfetv+0EmyURdZTGdt+/56OYj186/soBwlDMEb6DvkpQJ6Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lzS66TU4MwEFfBYSmcbCBdI+XnARD+gcxAeM+qQFsxk=; b=ldb9ZIYwuNpR8CTD6Glz82VCqNzP9RjG7HjpHmfFYjIk/Szlp0wRXdoUZ2FRHfjKv2gaY4 y68ld3BAcqCpGrS1i9By268uj56GMHDymFObpi4CI6FpP2uSou2un08HBxIor8gPjSGcMG lRsO/vGdBphvsCWpnH4OdKiMGVUEcOB0ST0FoUqW5zzBM8MfUSAp7sppq9ZgZsTajAh8pb TqIrTnqsF2Q4KUhQAmN8kqIDYGfJ3klF7rTjGRotBoMlBHknsUV7NiSfd9xu55PgTfgWKj lQsgpTfmmtQbn2vBhasYU6FJa74DXdSog4LgC1f5fFKxkdm5Le4Hc9AYdPvGIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704415718; a=rsa-sha256; cv=none; b=vEGMFfsXINOFYQJCOkDdoMWhS44mNvL+tXaP2IQMku2iY5SxBitH8QfxRWw/dGozld1YG3 Yj20PyN/NzadFo2zwwMtUqVG66s/0r/YZyOsyh/b24pHpyQ36iWDHHVkL8mGGdWAo9LXYS K21MBEPNHSOOX+f2yrWojYwuHHQ8Eakv7lzMVtnzN1M0K9QocahQ5IdEqnaAKqFF9O4hr6 m3FOJpW3p5dsZddiNnfkfMygWzmmOyNa4GsAa6qN3vVX93GKHQoEo3bYKBvMpIJH9/+K+Q pDvv3Who5SdBf1pO7yFRvA5obpoIbA+XwrQRF4I27A/I7Hw3Qx3xAZrNxOdy4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5lFL3h3jzcRw; Fri, 5 Jan 2024 00:48:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4050mct2060582; Fri, 5 Jan 2024 00:48:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050mc5j060579; Fri, 5 Jan 2024 00:48:38 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:48:38 GMT Message-Id: <202401050048.4050mc5j060579@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e7b9d03df180 - stable/14 - OptionalObsoleteFiles.inc: Add libnss_tacplus_p.a as an old profiled library List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e7b9d03df180c5fab1baeb0c428ded3787542b31 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e7b9d03df180c5fab1baeb0c428ded3787542b31 commit e7b9d03df180c5fab1baeb0c428ded3787542b31 Author: John Baldwin AuthorDate: 2023-12-28 22:20:54 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:29:43 +0000 OptionalObsoleteFiles.inc: Add libnss_tacplus_p.a as an old profiled library Noticed this was still present after upgrading a 12.x stable host to 14.0 stable. (cherry picked from commit e7300a8f638e6eb801953c0fb9e53d99308dc3f0) --- tools/build/mk/OptionalObsoleteFiles.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index c62c5cb6fc4c..c6e95f616e70 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -6881,6 +6881,7 @@ OLD_FILES+=usr/lib/libncurses_p.a OLD_FILES+=usr/lib/libncursesw_p.a OLD_FILES+=usr/lib/libnetgraph_p.a OLD_FILES+=usr/lib/libnetmap_p.a +OLD_FILES+=usr/lib/libnss_tacplus_p.a OLD_FILES+=usr/lib/libnv_p.a OLD_FILES+=usr/lib/libnvpair_p.a OLD_FILES+=usr/lib/libopencsd_p.a From nobody Fri Jan 5 00:48:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5lFQ6YVjz55j6r; Fri, 5 Jan 2024 00:48:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5lFQ3TRXz4qNG; Fri, 5 Jan 2024 00:48:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hfE6Dlgo/t/FgmqglPWC3XrCKxovtLjp3nkKBDeWuuo=; b=G4+1SycLqeiyre6oN8RWnGd/RLM04YsDsaBwJXttbuLUdYEdXj1DznY7mCtGPIgP+kAwTY eIO3NxmNtsurrmzmlLnRfpljaNTeZFfdZ+YEU7DMc7lXgJATd9YedL+5LVhJDqaEJL0pYJ PXekHgU08BxDdvsane/zRoRQ0HiAj63s+HpMhNf3ek0gQkwJxkmzmJKmLQScR/ZUK4JBdU 5sA8Rr0cFe3UsvBYZ3wxhOaVIiuwRXJb0A3uBczXDpcWxtwTdLZfXuxBmDVzZuRvdraFY2 bVxaffKPw6vyTV/qvrPFL57kr3suzM3nDi4cw7e46gvNz9ddeDCkwKF7YLqbGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hfE6Dlgo/t/FgmqglPWC3XrCKxovtLjp3nkKBDeWuuo=; b=RuMwRr2AewqKKVp5+0JmasTHi9zbYN+wPXL2IizaKIUv6gu5I0XjDYoWX5EqIqlif0ma5K J6zMqn9JLV3EcG7lh4Eu0PTc1EvVM6xqulljooJ+wExoG9Wh4gfSa8jw+9qnkGB0Aw1jRD 3h+YD6qfQud6EEqSKojsP5cyjQtfTq8/RSzq70/cTKQGTngsBoTWgNhbgaKvOmq6/YqfTt kmQ4sIrbyb+acerx0CSrvN+j7Kn3A2X8C+S6SHmIF224cmczgeI/qgMwDL9wS+1BsXUtbQ ZUa7I0sxtUZl4slrwN7p9JbjNccOhpNjjPlt3oGp3i1cj//yS+N8hM1yNPNU9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704415722; a=rsa-sha256; cv=none; b=XVoTlEch3N08plSGAAb5VfYQ83sRtFp4shk9DmKQpo/Ix0aJUYDNy2jotbt1s4Cr7SrCGK 33yFi5dphFsvq2NWQmNM6c23oyzl2f5VBblK6xv2O+nAdIkgR1f9vHQlJFdPt2RDwrDmLa ll4gaRxjFCslKFXcDDmbSNlpSrnjAIQaA9ij8QxIzsC1ekP3VPuYqjlo5FpseE/PF+9xjT +YoYP8oYYoRlYHOzVkloMirhDrSwqqqwq7N8WIkqGuGs61FGlrnUTP1CrHZWGe4s1zWjwM /Fc4FBPnwBMmKYbSWyy0rF/ppKcpXb+BM+z0sx0+Ywzx+rs0Igob+TjQlcNpkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5lFQ2JF1zcH6; Fri, 5 Jan 2024 00:48:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4050mgJf060756; Fri, 5 Jan 2024 00:48:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050mgsd060753; Fri, 5 Jan 2024 00:48:42 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:48:42 GMT Message-Id: <202401050048.4050mgsd060753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: de09d07a10bd - stable/13 - kldxref: Add a copyright and license statement to ef.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: de09d07a10bd7dd2d9399c41e2406f78ccbc3ff7 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=de09d07a10bd7dd2d9399c41e2406f78ccbc3ff7 commit de09d07a10bd7dd2d9399c41e2406f78ccbc3ff7 Author: John Baldwin AuthorDate: 2023-12-12 23:29:43 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:28:39 +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 (cherry picked from commit 087c4c90d193c1401613e1e13fa99db8de52c8f0) --- 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 Fri Jan 5 00:48:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5lFR6NKmz55jSF; Fri, 5 Jan 2024 00:48: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 4T5lFR4CFFz4q42; Fri, 5 Jan 2024 00:48:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gpYm8KMlX31mwM/RBFyfoBDuLOpjGxFZKCFGPsGxS6o=; b=pD+qa5h9E4/qdrlUAYHB2itau9otocl6WPh8udUXxYARS6Ahmme5avFKquGoGQCWp2l38A GNu2lMiBPvBnYxxfPw0bmmifwSpoRxgVmj1vqlSj/djllLmVwQOB4776lSfAzfzFIE+/A/ BvpeTbgzY7BWG5IDIVAEnQfkg7AchLh9nRWNvtmu+FAxrSrJUmuSo8LeWoJQfDn8lanrP8 okx1LzAHEkCPZjo/c3clzf0sJVuE4Rodr98C7F2bcDaielu11YadPEsL9LLSQR1cw//pwd loQiLgOkdFWqLxXffGg5Zl8scHPG62AMayw0o7RxUdMvqk2oQ00hI7aq2mzAVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gpYm8KMlX31mwM/RBFyfoBDuLOpjGxFZKCFGPsGxS6o=; b=LEjLf3FXORGJ/TbLTWR4M3+LEspkx1UdP1s8sCWDrgGNmMLSyU/uYlR68rGN2kP3i+eXte vFC/TbIDWWJN3ekUqN+dsdR7/x0ht+uo9IG1WJJzxZz1WsQFLPbmgol/8WLtM+62kX2qov 4icmd1raTFRjht6x08a8pY5NqnKHEzfRrkOo8XXfJe8Tebdj7Um2eKvroNrrInMuaFIOGe rnTIdEyzCQJNC0AsJ0mwNUK1vgZVFvc2g2acRdxk/OVfroLlHdq3KIj5cgqfdY2FFd8lTi 9hQehUKWxjpscVdjccFiMTQS27FNo178a1vl1dXkFuVgnvPtG6ACA4RbM20bmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704415723; a=rsa-sha256; cv=none; b=M90T2o/ONvPmY/6bJI95V9HHFVuOdUyMqsQJrbAmg3TmlUkL+2UPC/dk9M/MVn9dLOrJ0F TnH4QDJaWKvylBUD/vD+QE2LG3gw19Bt1VZLJjwEuGcJLHqatdM+fkkwLghFtGvHnmSEIR ePB5fHkRJZbc+ODAavWs9E7kNi2Rr12iGgT+XfwC1uINxEcmZg8mk0g5cjuXyXbXuPVS4n R5nPkqq76CMwr+QH0P0Ek4K3U75BHzyPvy05oDNVc2oOVX6BVYc1bm2zVNLbt/F2xWo/+i V2Ci4qfpVLZEEcfzp/EJk1zOg/SgEUbN+E52LIS0WfFQvZYGEk7BU//QeUkfaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5lFR3JtqzbtT; Fri, 5 Jan 2024 00:48: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 4050mhxj060797; Fri, 5 Jan 2024 00:48:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050mhhM060794; Fri, 5 Jan 2024 00:48:43 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:48:43 GMT Message-Id: <202401050048.4050mhhM060794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7da77f0266f1 - stable/13 - Stop #defining FREEBSD_ELF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7da77f0266f19696ae1221215f9c9998e686f90c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7da77f0266f19696ae1221215f9c9998e686f90c commit 7da77f0266f19696ae1221215f9c9998e686f90c Author: John Baldwin AuthorDate: 2023-12-12 23:30:00 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:28:53 +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 (cherry picked from commit 4a3cf5f329d69076aa9d093d596eb0ee82d917f5) --- 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 ee862f650329..b95adf82fe9b 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -31,7 +31,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 9f3b015fef7e..bd9ab9e7ec5b 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -35,7 +35,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 86e0fb2b5d22..6906e08f5f36 100644 --- a/stand/common/load_elf_obj.c +++ b/stand/common/load_elf_obj.c @@ -35,7 +35,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 47435dd78f6c..02e030016e17 100644 --- a/stand/common/reloc_elf.c +++ b/stand/common/reloc_elf.c @@ -33,7 +33,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 154cf90a597f..f91571a4ef11 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 Fri Jan 5 00:48:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5lFS6yf0z55jP6; Fri, 5 Jan 2024 00:48: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 4T5lFS4xKTz4qNl; Fri, 5 Jan 2024 00:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zcFLKbMBd2McfbQ/tADGKvCWO+9AJRMn7ZWUa4qp8Xo=; b=yhYcgbZFvwIkaT72Lhe2y25Fh0HRumY2K8oQxfIY9sKoH8Ps+PnU+s43wnDQhwUXFURTpu lK0DY+tquPsO419n8/OWOxfoySIC29lWGRowNQPoryfiRFRgaD5qh5UnlBnd12ybvozIKm G8bIHM+d5516dbyPTdhEETVRlUQxGlQnNCHLTN8yq5ujKc1mAHZxM/m2yOQwuOocJzcRd7 +E87u45PpRJQSyJZ3bIucmPDfZUQYZyTIZWFZnHBhmV/Vko0xFi4Ed3I9GI6F6sQxBmnxu B8HyzuOx8j6J733RlSN7TUYeda5lBBH2WCi+vlU5hFq/0pQWsZMKfVoahSVI/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704415724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zcFLKbMBd2McfbQ/tADGKvCWO+9AJRMn7ZWUa4qp8Xo=; b=jWOXDr/NLvkpCg5bZCSJ+vhdfvaBidSH0ukTjyDpFN5wYzyTdSdYjo6VcIxJd9ueHdft7L ScrzgazSzS8py8WFP9OyFTpqop2m/cgr9aFKjc+x/pnZJi2mYt0cuadd20/cIuPwhxKkFQ tktTJGCK5QRs/RXBUg3jfBCFHwYTh6TSbhVoBtSYPEx20S8xaL3taMS4kuHBfGnVgcJGg8 n6soqv3rNfYUTeT8icPO63dbtv7pDM91phmo/gc76HKRcBrSPplUz1fo2GrRa0c6GDQDcK N4FYkKMggijoloFe11ATFBu3PzoNSXRj8y/1qHGvZXIvgvCFcCgboQExbHynQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704415724; a=rsa-sha256; cv=none; b=N14YT2X71jqxoVyCPogPtIZ6bwP8Vph8nD52mSBO60ry06RPa5YOCgsklIWT+f8oTbatYp c82LUh4nuxMNQLJ62/ifNwVIhuOHk8ox/Ss6LJc2u8TFT8QAY8z+ZlnlUfbNjrtyaFByq+ KjwvAsRjntRz8mrEtmKU4lHvZ7R6hnxUogK+nmo4gsDJr12fdgFt1nGiucBcyleuP7TLz4 /j/8b1SgAhOVaVM/CuyWnNALzDnLH2lihVTPo5woHS/XLEUrqqc39ZK+CtrEgh2sc6nW32 65MvpqWFtnSp07Zu2jj9MuUrFOj2kwD+6XTFpx8u9KVSBSjcPsHMYBXTCBgZPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5lFS42nnzc3w; Fri, 5 Jan 2024 00:48: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 4050miTw060849; Fri, 5 Jan 2024 00:48:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4050mi1t060846; Fri, 5 Jan 2024 00:48:44 GMT (envelope-from git) Date: Fri, 5 Jan 2024 00:48:44 GMT Message-Id: <202401050048.4050mi1t060846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c1d1fab090e6 - stable/13 - OptionalObsoleteFiles.inc: Add libnss_tacplus_p.a as an old profiled library List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c1d1fab090e64024b9e7f859d0849014e726696d Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c1d1fab090e64024b9e7f859d0849014e726696d commit c1d1fab090e64024b9e7f859d0849014e726696d Author: John Baldwin AuthorDate: 2023-12-28 22:20:54 +0000 Commit: John Baldwin CommitDate: 2024-01-05 00:31:57 +0000 OptionalObsoleteFiles.inc: Add libnss_tacplus_p.a as an old profiled library Noticed this was still present after upgrading a 12.x stable host to 14.0 stable. (cherry picked from commit e7300a8f638e6eb801953c0fb9e53d99308dc3f0) --- tools/build/mk/OptionalObsoleteFiles.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 498e90d57e91..749ca117a49e 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -7516,6 +7516,7 @@ OLD_FILES+=usr/lib/libncursesw_p.a OLD_FILES+=usr/lib/libnetgraph_p.a OLD_FILES+=usr/lib/libnetmap_p.a OLD_FILES+=usr/lib/libngatm_p.a +OLD_FILES+=usr/lib/libnss_tacplus_p.a OLD_FILES+=usr/lib/libnv_p.a OLD_FILES+=usr/lib/libnvpair_p.a OLD_FILES+=usr/lib/libopencsd_p.a From nobody Fri Jan 5 08:18:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5xDz472Sz56Tjq; Fri, 5 Jan 2024 08:18: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 4T5xDz3cmGz44XG; Fri, 5 Jan 2024 08:18:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2IJKhXn1n7Kxg5i9OhIfxqZGfh5hPK8Ih+1CBliap7o=; b=UMozlaeEE+j1LUzlHZZbsfjXGFYkROj1PWR6jgFw16KtFIpq9mEiRAAvjHReM02fXiCkOI CgznmD2/CVUxF6XYRkZgHQ/hYx3R0gIFvcmUbobvCUfe03mQRnP8xNlW341QKNqSuoiOwR KhVSxTZR/7nWc88uzoRfYQurDxCNtpzs/PVYue+1hrq9PREjiJEdcooUS3TZtrUuvOirqB wOwE+IMnS/U/fRtOVARRK4ttq1n1xt2JhA/2G8z1T3eL0+jV1oV+OURVX+pM02nwV9TgKG Hv9UTLRbI4vPNViBPksTccRtheR5FP/cTbqT5IKvUoLtHW5f/gFcSCXCoWKx8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2IJKhXn1n7Kxg5i9OhIfxqZGfh5hPK8Ih+1CBliap7o=; b=HIYTnw2oAg/LAYRZsr7e3s/sgPBJHcUyRjg/p8otRzEALTzg4FDX0+3fRhcXMY7gMxFJ7r vDDlisTrLXpbU6NW5DFUnVVtwZA+VHBao0BOEEQeKvjrJiSoEr7KkQAvKH59hDbNj9AomT cMY6WUFQnxcN9TsaVcT+8aIIpvGod9mIMsNbnW1WJNR8vFJfgTTBUiP9U65ZHD7rFalK92 6135ZkC6S3p9lc8NfaxXgSJzER7Go3qzmTL2JfDZ3LMFRy8M9HyFj2itL3xveVJM/tNeca kGLbFXBZPmhoTCt7fm540nl/gULz+tnxe8YsTV8P6sBQBnbTOzf2alye9W4zYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704442739; a=rsa-sha256; cv=none; b=aNdP+sjI6dhnPad2I2vHamJs1M1BDSZwq3XhK0fAJ0G9sadrolmiFIcaFCS+L4HiZ3l2Qk vuid4tHb1vU5+mMJCpwe7n8qyM1tF/F9vkIbHWn2/OJSRLPlpMWGzzyYEfZxvK1TqQxze/ 084rR55sNzpKvwmZMt8hsGRmbt/4dl/eTalR0G8h+Zh19y5Z3p+aMVuOW5xeaBSHsWFww0 lbRoeI6oH1xs77Jz23/EXHfeyzgyTnZ5LNrKyEeVP5bR+YHqSzuaQTxoqUcZ4Ed5/TfhCH 5aJ3yypyAUgpXcygBdaR3QPqtG1PJt49dtcqGq5Xxmp3sjHwfD8X5Y9x30HC/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5xDz2ZgtzqVt; Fri, 5 Jan 2024 08:18: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 4058IxaS015955; Fri, 5 Jan 2024 08:18:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4058Ixgx015952; Fri, 5 Jan 2024 08:18:59 GMT (envelope-from git) Date: Fri, 5 Jan 2024 08:18:59 GMT Message-Id: <202401050818.4058Ixgx015952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: c3c8d1f55d4b - stable/14 - improve handling of shell metacharacters in filenames List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c3c8d1f55d4be3a39696e5692425ae1d9c36bf77 Auto-Submitted: auto-generated The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=c3c8d1f55d4be3a39696e5692425ae1d9c36bf77 commit c3c8d1f55d4be3a39696e5692425ae1d9c36bf77 Author: Wolfram Schneider AuthorDate: 2023-12-27 17:35:08 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-05 08:18:01 +0000 improve handling of shell metacharacters in filenames PR: 275967 MFC after: 1 week (cherry picked from commit c4368d03e52c7c97d583ee6b81a59510d371ffbb) --- usr.bin/man/man.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index b18895a91d96..87594699b2c2 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -143,8 +143,8 @@ check_cat() { if exists "$1"; then use_cat=yes catpage=$found - setup_cattool $catpage - decho " Found catpage $catpage" + setup_cattool "$catpage" + decho " Found catpage \"$catpage\"" return 0 else return 1 @@ -169,8 +169,8 @@ check_man() { # cat page found and is newer, use that use_cat=yes catpage=$found - setup_cattool $catpage - decho " Using catpage $catpage" + setup_cattool "$catpage" + decho " Using catpage \"$catpage\"" else # no cat page or is older unset use_cat @@ -342,10 +342,10 @@ man_display_page() { ret=0 else if [ $debug -gt 0 ]; then - decho "Command: $cattool $catpage | $MANPAGER" + decho "Command: $cattool \"$catpage\" | $MANPAGER" ret=0 else - eval "$cattool $catpage | $MANPAGER" + eval "$cattool \"$catpage\" | $MANPAGER" ret=$? fi fi @@ -370,7 +370,7 @@ man_display_page() { pipeline="mandoc $mandoc_args | $MANPAGER" fi - if ! eval "$cattool $manpage | $testline" ;then + if ! eval "$cattool \"$manpage\" | $testline" ;then if which -s groff; then man_display_page_groff else @@ -383,10 +383,10 @@ man_display_page() { fi if [ $debug -gt 0 ]; then - decho "Command: $cattool $manpage | $pipeline" + decho "Command: $cattool \"$manpage\" | $pipeline" ret=0 else - eval "$cattool $manpage | $pipeline" + eval "$cattool \"$manpage\" | $pipeline" ret=$? fi } @@ -476,10 +476,10 @@ man_display_page_groff() { fi if [ $debug -gt 0 ]; then - decho "Command: $cattool $manpage | $pipeline" + decho "Command: $cattool \"$manpage\" | $pipeline" ret=0 else - eval "$cattool $manpage | $pipeline" + eval "$cattool \"$manpage\" | $pipeline" ret=$? fi } From nobody Fri Jan 5 08:20:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5xGD5jtGz56TrV; Fri, 5 Jan 2024 08:20: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 4T5xGD5CxKz453F; Fri, 5 Jan 2024 08:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZaqouuMUIHIuuyv/snZ1zrOsN9OAi3hJ4ko4/gvXrA=; b=fLkfjeWZPpjn1p3j3Xm8g5CNHzkBGFrQaBUUqYvWHhnaxqZkFmdSM0Eayx7ACHl6oLMKko 0ntJbdsAHdCi4AyXMW/FVApJyBi7ICjvnOqzBMjcuqZRB4yxuqfGF4peRobV3LZ01cfx8p m8i0Uml197EoHu1sXO6xukVvjmGv5o2/u9UPrymhKIVil0mENkYETrFnG5W8fY0hMO6Wq0 iZWCyRrNcpVgSi1ABbSLKZ7lgGunWyd2vmMQ5BzA+a6UGtMg09XYJ5+sanHNjNUWQ/SWBZ Uyod67u1KoqmXGEdbV1dl3uCVb6KIqBtoEddcq8752JzQDVERoBwfbY0yTRhag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZaqouuMUIHIuuyv/snZ1zrOsN9OAi3hJ4ko4/gvXrA=; b=wT6ipoKfcmaUGr8dPxHDUZGqiAS6/17bchBG1OOm++YORJbtcPgcXow6J/iLnP+q7EVAas QcTSj6x6IsRqLfMfaKo//EFj4KNss1NuwnF8AoS2zpxc0/Epcz6PJSi8tOcrlOt8fS8/C5 DnkUPBHtq842YhN4XbJVXN4tWKBtnJhQ37Z0VrrS9h9Xr/aH1wPL0YbLrEao63cL+/DsXz w0cKW7sAZrKgFzi3DxY+9FJv5C9nCm9eJyX4Hd/iabEG06pzLI1A20+GsCQm/8alVu+zUx fQQYIuw6cEyQaCjmj8o4TRrGE11XFgDEdgn0IJAgbUACfEtSPKf3qSLFctOk8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704442804; a=rsa-sha256; cv=none; b=UjbPiI+GNR1mZnOBr6O5W3XSkyK4IVbwijOeyMVSy8UcVUtArOEXDOK+cXEjBUvGX1gqp4 gbVpedITfQwsdDzvgFQD6o93qVRn0vAXjQVRKZGMBOOClKVoUR0+Rp24E3N8gLDRxMIaKU JoPa9dz75wFcDyy247F+X5TN407Wg5Kn/EGptRmozXtLti+KPfLfl/A1t9a3AWkC46GB8E 19+oq5TxE9slcagaW+C3Z1hIZsdqALkUG1JoGxsPaKvtndR0+3g+MKzLaU6lSssFJQ+KAO 2pZlho3BVsmNjGHAx4eTDBYrsfI7JbHQ6vC4OdgZX4UNjbqEA1Utv3PbamfnUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5xGD4HNqzqhD; Fri, 5 Jan 2024 08:20: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 4058K4Qv018844; Fri, 5 Jan 2024 08:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4058K4Ii018840; Fri, 5 Jan 2024 08:20:04 GMT (envelope-from git) Date: Fri, 5 Jan 2024 08:20:04 GMT Message-Id: <202401050820.4058K4Ii018840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: 05daf917987e - stable/13 - improve handling of shell metacharacters in filenames List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 05daf917987e2e5e29fa0f8a4bfb519f6d2ec953 Auto-Submitted: auto-generated The branch stable/13 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=05daf917987e2e5e29fa0f8a4bfb519f6d2ec953 commit 05daf917987e2e5e29fa0f8a4bfb519f6d2ec953 Author: Wolfram Schneider AuthorDate: 2023-12-27 17:35:08 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-05 08:19:10 +0000 improve handling of shell metacharacters in filenames PR: 275967 MFC after: 1 week (cherry picked from commit c4368d03e52c7c97d583ee6b81a59510d371ffbb) --- usr.bin/man/man.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 96040c533de5..ed5724d64678 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -118,8 +118,8 @@ check_cat() { if exists "$1"; then use_cat=yes catpage=$found - setup_cattool $catpage - decho " Found catpage $catpage" + setup_cattool "$catpage" + decho " Found catpage \"$catpage\"" return 0 else return 1 @@ -144,8 +144,8 @@ check_man() { # cat page found and is newer, use that use_cat=yes catpage=$found - setup_cattool $catpage - decho " Using catpage $catpage" + setup_cattool "$catpage" + decho " Using catpage \"$catpage\"" else # no cat page or is older unset use_cat @@ -317,10 +317,10 @@ man_display_page() { ret=0 else if [ $debug -gt 0 ]; then - decho "Command: $cattool $catpage | $MANPAGER" + decho "Command: $cattool \"$catpage\" | $MANPAGER" ret=0 else - eval "$cattool $catpage | $MANPAGER" + eval "$cattool \"$catpage\" | $MANPAGER" ret=$? fi fi @@ -345,7 +345,7 @@ man_display_page() { pipeline="mandoc $mandoc_args | $MANPAGER" fi - if ! eval "$cattool $manpage | $testline" ;then + if ! eval "$cattool \"$manpage\" | $testline" ;then if which -s groff; then man_display_page_groff else @@ -358,10 +358,10 @@ man_display_page() { fi if [ $debug -gt 0 ]; then - decho "Command: $cattool $manpage | $pipeline" + decho "Command: $cattool \"$manpage\" | $pipeline" ret=0 else - eval "$cattool $manpage | $pipeline" + eval "$cattool \"$manpage\" | $pipeline" ret=$? fi } @@ -451,10 +451,10 @@ man_display_page_groff() { fi if [ $debug -gt 0 ]; then - decho "Command: $cattool $manpage | $pipeline" + decho "Command: $cattool \"$manpage\" | $pipeline" ret=0 else - eval "$cattool $manpage | $pipeline" + eval "$cattool \"$manpage\" | $pipeline" ret=$? fi } From nobody Fri Jan 5 08:21:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5xHg1XKjz56TmS; Fri, 5 Jan 2024 08:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T5xHg15MSz45LT; Fri, 5 Jan 2024 08:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4fCYrdqHXmga/5gc9phtcZwUT41E9cBIjuu8+wK93U=; b=vtpTlM3kkVRMXV4A/6wVHLMOE0b9SdPKTgrtLzpox17a/r7tXUvJNx4uCUbK80po/WRp/z h5bWtf2ihgcm/P3HM1heaSihWdKqMqUGakcFOknLpJaC73Q+HwQruWe3B/0ShqLTQhtd9Z 4mzGTyzzKKBCdQ/yUkWD3sUQ+Us+j3i4kgpS6kCJGQ54UMCr/cf8q2nJQpcvt1hUO5DD5Z BAlvdheJy6obpmIOHu9lvPB/cEwp6UdsL6XMOh3jdFBKrqFjfMWDE5Bt/UnW5hcU6lA3W/ FLiLXPpaoJavtXiYq3E+3ixUBycDd/xhOX3Crbu4ExEuJm/dJJ+clrmOog7TSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4fCYrdqHXmga/5gc9phtcZwUT41E9cBIjuu8+wK93U=; b=l3Hnj2Q7rk6egrv4DqD2DGJeFQfJRUhQz0w66RBXT8klQBVpQqvI6g3D6Mtt7ATdl726OI EF/BcB4W4pyvRezKoeoZVTbjWOB2M3d2x/8orTpW2XBcM17J3bzuKU/jjOLUrCYTtT9hMH 1RfJ9OUqMJ7T2roqzHVqJHyj6f+zR1axpj0iDzn3qE0fsh8JRavqF8d7bsVBYsRyVlefIa Je0u5y4s5oI4ucf/GNGCfK5VUYbuBuNdjKAuGmZJ3bLqv4nB1P1VY+WhUpjvjkV5mKdCT0 0beWf1YmNxQGn2yWR8a16/ZxxXnDxxgP0/uPt5FJAYlO5ZuANUBKJmEr3eQtTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704442879; a=rsa-sha256; cv=none; b=KmRNNn3m5FSa4xywPPI4Y2VDw/Sx2BJ2+E35++H3S5utXmrELEDkXjQkbDFHZut4mhfejn yK/tTJ6h+P5FyDk8oU9T5nXtmJPACbf2lRBDzAv2aZNeai9VG0+E30lFE3EsiCWRn39nqw KkaK5+CMx4mMSH73BRJ6MbadBgXATv0QwCIXW96FIlu+ghIRwra5U0YzSNUfv020JkY5cN ED8ZoZsSCeGdhBcOhcUmYNLFe+I0pqpLmtGSM5kYwztreQa14ATQNZu70Uh2vEZk4nOosD EWrI8ngYhEMNApc8NP03NGIwiAPIOJgUr0w6MVlbzWHThHA1u6uheb/l5jrmRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5xHg08hpzqH6; Fri, 5 Jan 2024 08:21: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 4058LIgk028041; Fri, 5 Jan 2024 08:21:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4058LIOY028038; Fri, 5 Jan 2024 08:21:18 GMT (envelope-from git) Date: Fri, 5 Jan 2024 08:21:18 GMT Message-Id: <202401050821.4058LIOY028038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: d93d7230fa70 - stable/14 - support spaces in filenames List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d93d7230fa708a8e86b68d9d70f403ff8b8a6050 Auto-Submitted: auto-generated The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=d93d7230fa708a8e86b68d9d70f403ff8b8a6050 commit d93d7230fa708a8e86b68d9d70f403ff8b8a6050 Author: Wolfram Schneider AuthorDate: 2023-12-28 10:50:29 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-05 08:21:05 +0000 support spaces in filenames PR: 275978 MFC after: 1 week (cherry picked from commit 789480702e490818244af11279868ba4f3dabe6b) --- usr.bin/man/man.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 87594699b2c2..66af46a36243 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -158,14 +158,14 @@ check_man() { if exists "$1"; then # We have a match, check for a cat page manpage=$found - setup_cattool $manpage - decho " Found manpage $manpage" + setup_cattool "$manpage" + decho " Found manpage \"$manpage\"" if [ -n "${use_width}" ]; then # non-standard width unset use_cat decho " Skipping catpage: non-standard page width" - elif exists "$2" && is_newer $found $manpage; then + elif exists "$2" && is_newer $found "$manpage"; then # cat page found and is newer, use that use_cat=yes catpage=$found @@ -308,7 +308,7 @@ man_check_for_so() { # We need to loop to accommodate multiple .so directives. while true do - line=$($cattool $manpage | head -1) + line=$($cattool "$manpage" | head -1) case "$line" in .so*) trim "${line#.so}" decho "$manpage includes $tstr" @@ -338,7 +338,7 @@ man_display_page() { # just zcat the catpage and we are done. if [ -z "$tflag" -a -n "$use_cat" ]; then if [ -n "$wflag" ]; then - echo "$catpage (source: $manpage)" + echo "$catpage (source: \"$manpage\")" ret=0 else if [ $debug -gt 0 ]; then @@ -496,8 +496,8 @@ man_find_and_display() { decho "Found a usable page, displaying that" unset use_cat manpage="$1" - setup_cattool $manpage - if man_check_for_so $manpage $(dirname $manpage); then + setup_cattool "$manpage" + if man_check_for_so "$manpage" "$(dirname \"$manpage"")"; then found_page=yes man_display_page fi @@ -516,7 +516,7 @@ man_find_and_display() { # Check if there is a MACHINE specific manpath. if find_file $p $sect $MACHINE "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -530,7 +530,7 @@ man_find_and_display() { # Check if there is a MACHINE_ARCH # specific manpath. if find_file $p $sect $MACHINE_ARCH "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -543,7 +543,7 @@ man_find_and_display() { # Check plain old manpath. if find_file $p $sect '' "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -560,7 +560,7 @@ man_find_and_display() { # Nothing? Well, we are done then. if [ -z "$found_page" ]; then - echo "No manual entry for $1" >&2 + echo "No manual entry for \"$1\"" >&2 ret=1 return fi @@ -1040,8 +1040,8 @@ do_man() { do_full_search "${REGEXP}" fi - for page in $pages; do - decho "Searching for $page" + for page in "$pages"; do + decho "Searching for \"$page\"" man_find_and_display "$page" done From nobody Fri Jan 5 08:21:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T5xHz2PWyz56VB6; Fri, 5 Jan 2024 08:21: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 4T5xHz1jBhz45Y6; Fri, 5 Jan 2024 08:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3EwlNyRUKeSg6e66gXqfr7NwsePlIfVVODwsK1LOU8=; b=HU3PkcSDQwUiGNOKBGcn/Z+BKtqsjh7qYsTyIlaSu6YOXdUmcQ4qUXHPAmTP5geDd2M1Hf ZoSQqX3CWIYj80iJ+LcgIYW0rDD/yJVDdyJ8I0FDlB/y1vQjkGIduSA427gEJrDm4ZrRHj ScA9JHrkIQz4Y114Dqt0rgUn6aMFKbudsMIh/1gG6khL9rDk01TScFtn9ppZr82gtmZoqe El+KS8jcg6Hv0b0Ho4DTPAcYcqb4H5YhoEkquEa6k/p4f2NicAvTLZi8y44r9084DduqSP bkPFifrMknk5YySuUL0d5+XHu9NDRpJa6nk/ES3O980kk/d8xV/iHLIGZUu/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3EwlNyRUKeSg6e66gXqfr7NwsePlIfVVODwsK1LOU8=; b=ihK0Aqkqrgp0SlBC/+4WaIGPqqoDpgLf1pGTQHpRC46NbQ6yzGn/EGasaA8FSOWd1AmBus PDGhWJ5PqW7QA+xWWfkz0YtxLNW3Wv929AOJH1pUaZc9iH1mPFkGiiJ8bbeeMkhDmGSdOX Mbal8dzQ9hbAJLNK5kMbdpmRqP08W43zeEciHddooRNDssBNce4MRLcIoVPUhwV4igf5ng 00qqczhEm6HfqTyGzTs9wg+mj9kg+96dxHBE2Yv9UHovXQryvDLKxU3Qn5nExhuUEaDEdF 6FU6+WIvrHE1CRKVyTXKQJJNu/O2wem63ccXfm9ZYtXDV6lv6Dh3PwoKb8siIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704442895; a=rsa-sha256; cv=none; b=I5SsVheHf2797bbSLHGxOxeRlrVPZWBOdBegzPKH6F1Oi+WrIYYoPdqaFnHrFs4dIEjgbx R1d8c8bnwe0xPPdQOpNFV1Fv3CHOSpkVSJ3ZUazl8xqT52lU/6M6T41YTRD4wXk3KkoeKt ywoIGuWJYu1E9tTLd/Ww1aPjqdjAd/ZkXm/ZRjf2HHXPcIfQUc/Vy77biSSHwnSL2hFM2N 47Up6qnNpVUKldQVtMSzkpYVxzSqAu0pTZTgDD5+H18KbK+nv0s9CT2WTDFaq4oSRn6tdT 6P5PB4lT2L1YSnTqhkaAXsvhjoyfUUnmUdUhnI/+CwxiNck8Ra3W25JGj+Cgww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T5xHz0m4Hzqdl; Fri, 5 Jan 2024 08:21: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 4058LZxB031674; Fri, 5 Jan 2024 08:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4058LZqd031671; Fri, 5 Jan 2024 08:21:35 GMT (envelope-from git) Date: Fri, 5 Jan 2024 08:21:35 GMT Message-Id: <202401050821.4058LZqd031671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: 5e78db7b45ed - stable/13 - support spaces in filenames List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5e78db7b45ede9b8799fa0d293d282842aa00cc0 Auto-Submitted: auto-generated The branch stable/13 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=5e78db7b45ede9b8799fa0d293d282842aa00cc0 commit 5e78db7b45ede9b8799fa0d293d282842aa00cc0 Author: Wolfram Schneider AuthorDate: 2023-12-28 10:50:29 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-05 08:21:29 +0000 support spaces in filenames PR: 275978 MFC after: 1 week (cherry picked from commit 789480702e490818244af11279868ba4f3dabe6b) --- usr.bin/man/man.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index ed5724d64678..114ea9d7a0b2 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -133,14 +133,14 @@ check_man() { if exists "$1"; then # We have a match, check for a cat page manpage=$found - setup_cattool $manpage - decho " Found manpage $manpage" + setup_cattool "$manpage" + decho " Found manpage \"$manpage\"" if [ -n "${use_width}" ]; then # non-standard width unset use_cat decho " Skipping catpage: non-standard page width" - elif exists "$2" && is_newer $found $manpage; then + elif exists "$2" && is_newer $found "$manpage"; then # cat page found and is newer, use that use_cat=yes catpage=$found @@ -283,7 +283,7 @@ man_check_for_so() { # We need to loop to accommodate multiple .so directives. while true do - line=$($cattool $manpage | head -1) + line=$($cattool "$manpage" | head -1) case "$line" in .so*) trim "${line#.so}" decho "$manpage includes $tstr" @@ -313,7 +313,7 @@ man_display_page() { # just zcat the catpage and we are done. if [ -z "$tflag" -a -n "$use_cat" ]; then if [ -n "$wflag" ]; then - echo "$catpage (source: $manpage)" + echo "$catpage (source: \"$manpage\")" ret=0 else if [ $debug -gt 0 ]; then @@ -471,8 +471,8 @@ man_find_and_display() { decho "Found a usable page, displaying that" unset use_cat manpage="$1" - setup_cattool $manpage - if man_check_for_so $manpage $(dirname $manpage); then + setup_cattool "$manpage" + if man_check_for_so "$manpage" "$(dirname \"$manpage"")"; then found_page=yes man_display_page fi @@ -491,7 +491,7 @@ man_find_and_display() { # Check if there is a MACHINE specific manpath. if find_file $p $sect $MACHINE "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -505,7 +505,7 @@ man_find_and_display() { # Check if there is a MACHINE_ARCH # specific manpath. if find_file $p $sect $MACHINE_ARCH "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -518,7 +518,7 @@ man_find_and_display() { # Check plain old manpath. if find_file $p $sect '' "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -535,7 +535,7 @@ man_find_and_display() { # Nothing? Well, we are done then. if [ -z "$found_page" ]; then - echo "No manual entry for $1" >&2 + echo "No manual entry for \"$1\"" >&2 ret=1 return fi @@ -973,8 +973,8 @@ do_man() { fi man_setup - for page in $pages; do - decho "Searching for $page" + for page in "$pages"; do + decho "Searching for \"$page\"" man_find_and_display "$page" done From nobody Fri Jan 5 11:57:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T624m6Qv3z56w5c; Fri, 5 Jan 2024 11:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T624m5ymSz4QLN; Fri, 5 Jan 2024 11:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704455832; h=from:from:reply-to:subject:subject: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+0PJ6AyiMsXBhs7KAhpoWj4s1tdazgG7jtahblxhdw=; b=tbhCkUlrlvk2ZJ3d/0z43W1qcOuvYb66wWvs17zJW3JLOArSoEmpx6dp8+lFAresH34QqV UFk7X5GYedSMTjtE6RsMidF5crf0cp4c2lp9KUJilF5hon+rA/uY6cshZWrxhSEtdloMe2 pZKg22k3Nd6n9yYxhXhIspMJ00EmUcjUjIaJFTu4pi7XXJTqfPsCQOpGBK48WHD9cEk+j+ 9UUU0BUokmZYdYFRMGmi8hsqNuvMiFq5BV8RqmlvaCWPrI1Wt2UnU0yNcCysZN5WEY4Rg9 JJIlJwe/u2jTY9dMaejkHqF6TLrv+8Gx47YqHah/vnoG2S4ys1v8hBkoMdRUTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704455832; h=from:from:reply-to:subject:subject: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+0PJ6AyiMsXBhs7KAhpoWj4s1tdazgG7jtahblxhdw=; b=lwGyg2/VO1nhrOu1kYy29lz+s2V9/uRON22iHD+DtoTaWsZszb9+7BnoS34GzJzwNuVU5x L4X/GyVvk11PemU0s4GhavuFo77DNkToQ1ilr1FYcfsJgYUKxycW45sO5cBbf07XANLHw9 cwIPPU+qYuOjwtidB9pMPAkk2vu/9ObxuRm0HCFLydewxMJrf7OnL+RIfGOAbtrJLAExom egpdlGl5nmfQxSr+pg7T/qGVtTX2xYB7NELmTOEttvjLG79kqofNzRUGrOht9QfykjtVhy 0i9naGLrZ3eDi/nHwkqG9sod5xyugpB6c6DCfea5EO8URopqYzs1qPsWAa0lMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704455832; a=rsa-sha256; cv=none; b=h1mSoyGn+CjQe6IxYoI5F3kyyaAgKVA1A7dnkM/XolHL8Fck5u4CpPrA+6iId5O0CM7Uiz kg6SE00blblKwhiSwB4tiP6vxgS+TZp+HqEl2dRuob0lWaofGYO39Wr2S0ecgDdfGmHpe0 4k5w3243sOn+nw40/2ro/LyTqr8x75bzz7fuL2+SQwFzW/8r9+Osm3McB8T72ceubuSaev kbqVbLyetBaUlT97Xi8GtRrYWpNgMELdty4Dce/mnpgGkbv7DubjMS526ZbFTmtSJOrdot l2FP8u5GWwZ0Vs8W8WwqvbJCNa08lwlVeHAoyIcX5J+9PmiYnCdnQeKxWBnfKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T624m50w8zwCC; Fri, 5 Jan 2024 11:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 405BvCfm084962; Fri, 5 Jan 2024 11:57:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 405BvCDo084959; Fri, 5 Jan 2024 11:57:12 GMT (envelope-from git) Date: Fri, 5 Jan 2024 11:57:12 GMT Message-Id: <202401051157.405BvCDo084959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Gmelin Subject: git: c2299997ce17 - stable/13 - libifconfig: Fix bridge status member list List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c2299997ce174e6b1ec3ad14bb10c19b64942609 Auto-Submitted: auto-generated The branch stable/13 has been updated by grembo: URL: https://cgit.FreeBSD.org/src/commit/?id=c2299997ce174e6b1ec3ad14bb10c19b64942609 commit c2299997ce174e6b1ec3ad14bb10c19b64942609 Author: Michael Gmelin AuthorDate: 2023-12-20 20:21:55 +0000 Commit: Michael Gmelin CommitDate: 2024-01-05 11:56:18 +0000 libifconfig: Fix bridge status member list When this functionality was moved to libifconfig in 3dfbda3401abea84da9, the end of list calculation was modified for unknown reasons, practically limiting the number of bridge member returned to (about) 102. This patch changes the calculation back to what it was originally and adds a unit test to verify it works as expected. Reported by: Patrick M. Hausen (via ML) Reviewed by: kp Approved by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43135 (cherry picked from commit 3d36053ca6d6a17d408c8f92c504e6135dc9d8df) --- lib/libifconfig/libifconfig_bridge.c | 2 +- tests/sys/net/if_bridge_test.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/libifconfig/libifconfig_bridge.c b/lib/libifconfig/libifconfig_bridge.c index e4db90f373d6..2a9bbc35858b 100644 --- a/lib/libifconfig/libifconfig_bridge.c +++ b/lib/libifconfig/libifconfig_bridge.c @@ -111,7 +111,7 @@ ifconfig_bridge_get_bridge_status(ifconfig_handle_t *h, free(bridge); return (-1); } - if (members.ifbic_len <= len) + if ((members.ifbic_len + sizeof(*members.ifbic_req)) < len) break; } if (buf == NULL) { diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index 8abe5d3cf7da..b9540c79faaa 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -516,6 +516,33 @@ gif_cleanup() vnet_cleanup } +atf_test_case "many_bridge_members" "cleanup" +many_bridge_members_head() +{ + atf_set descr 'many_bridge_members ifconfig test' + atf_set require.user root +} + +many_bridge_members_body() +{ + vnet_init + + bridge=$(vnet_mkbridge) + ifcount=256 + for _ in $(seq 1 $ifcount); do + epair=$(vnet_mkepair) + ifconfig "${bridge}" addm "${epair}"a + done + + atf_check -s exit:0 -o inline:"$ifcount\n" \ + sh -c "ifconfig ${bridge} | grep member: | wc -l | xargs" +} + +many_bridge_members_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "bridge_transmit_ipv4_unicast" @@ -528,4 +555,5 @@ atf_init_test_cases() atf_add_test_case "mac_conflict" atf_add_test_case "stp_validation" atf_add_test_case "gif" + atf_add_test_case "many_bridge_members" } From nobody Fri Jan 5 23:42:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6Kl00YHnz56QGn; Fri, 5 Jan 2024 23:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6Kkz6qBMz4kKJ; Fri, 5 Jan 2024 23:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704498172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKVivvNTH0Ch62yLSbMyZiGGaD6AtjH9ZT5uCrx4FUw=; b=LLj0USqGrbB0m65B6QAd53xSCQrpoKYwWYnOhhQDv7UOaMr+v04mpT4TFjDW35V2LBN5RX 2fSE5v3tyRFJEwl3/vIgYWFPILVyNBIT/fAfywaDCs7s/gmoTf81hSHGz0hY59J+YKll2U 0LZtzE4S1PEE1OikygbysrOIYGZhm8XsiSXrqtOSuGT9wT8CxELG2GbrDjgz4LR5VtAggY t3mCph5Qp97wR4ti07cAGehnl4jBbJw2cpiaCpIlBUbvP+eqKmEXkDYOPp63+9rNDviXOd qJ1JOUW4lvzba6wdnWT0N1sdNF8Gpc+IomZduGMk12PwlVX8qmyxgxyKXc76Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704498172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKVivvNTH0Ch62yLSbMyZiGGaD6AtjH9ZT5uCrx4FUw=; b=qMpmWKCBZLI9nkagsnoPoWbD8hOKONM35OkBPo3OmDnGDNQaG23UWcxmC0liOt9R7LaFcA Rx/N3NXmmPm1SUNx8OXIe+bKtGAWCILdqYhkmWR+In2Svv5MNINwss05pJMcedUWap6T2H aYK4VrWfBht+2rasfodeA4lC91wOufV9ECppKRH3Lz7fqsb6HmnQ8E5WN5Mso+9O1lMFBa SIYnGEJKzXnN26ZLqhTWAnRLu2A7ql9x4qQY9qtusNzAi+ubmrXSnCK4ytQS1ifjIPz2C9 TLKeXan4LGQ/KqNUxQMzWP5X5OTTeYEclkdyFeHAvJnWMLAKRiaUg6d/DSwLZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704498172; a=rsa-sha256; cv=none; b=lni2r4QrjVpra3g0gA1kJlhchlNDxOdM+/2xc5EJKp8jwlPHNl4cE+i42Zkfd87Kg3TPna ERru/u8VqdxJs1dgMfJ0ITx9wucM1RpXDl6ZPTNJZLj6JaBLSReND1xTB9CYCq5x7wsHRN k2Yb6jWC1W5jkxVn4quiEvplcgJjHNQqt17nOu6LIJt+OKdiQ0v4x5DpmCHJCB1xBQCofC +rgpZJctDHExqqHLsl4h0CdYRq63zg26PuSXZihlAeH0OFuB+E0MPk/P4GJK3dog0P3VDn yvWMHO2hQxsAz0yLFOXvkueGbdpqDCSHZUEa7QL3TpwuF4X8nqWXF6NeYXwEQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6Kkz5vH7zHtM; Fri, 5 Jan 2024 23:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 405NgpVb081183; Fri, 5 Jan 2024 23:42:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 405NgpCZ081180; Fri, 5 Jan 2024 23:42:51 GMT (envelope-from git) Date: Fri, 5 Jan 2024 23:42:51 GMT Message-Id: <202401052342.405NgpCZ081180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c39254c8f233 - stable/14 - ssh: ban user/hostnames with most shell metacharacters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c39254c8f23379709b8e2a68dc64477d2885f1d4 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c39254c8f23379709b8e2a68dc64477d2885f1d4 commit c39254c8f23379709b8e2a68dc64477d2885f1d4 Author: Ed Maste AuthorDate: 2024-01-05 18:12:09 +0000 Commit: Ed Maste CommitDate: 2024-01-05 23:42:30 +0000 ssh: ban user/hostnames with most shell metacharacters Cherry-picked from OpenSSH commit 7ef3787c84b6: This makes ssh(1) refuse user or host names provided on the commandline that contain most shell metacharacters. Some programs that invoke ssh(1) using untrusted data do not filter metacharacters in arguments they supply. This could create interactions with user-specified ProxyCommand and other directives that allow shell injection attacks to occur. It's a mistake to invoke ssh(1) with arbitrary untrusted arguments, but getting this stuff right can be tricky, so this should prevent most obvious ways of creating risky situations. It however is not and cannot be perfect: ssh(1) has no practical way of interpreting what shell quoting rules are in use and how they interact with the user's specified ProxyCommand. To allow configurations that use strange user or hostnames to continue to work, this strictness is applied only to names coming from the commandline. Names specified using User or Hostname directives in ssh_config(5) are not affected. feedback/ok millert@ markus@ dtucker@ deraadt@ OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9 --- crypto/openssh/ssh.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/ssh.c b/crypto/openssh/ssh.c index ec5c36091d29..ea459ffc007e 100644 --- a/crypto/openssh/ssh.c +++ b/crypto/openssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.594 2023/09/03 23:59:32 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.599 2023/12/18 14:47:44 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -624,6 +624,41 @@ ssh_conn_info_free(struct ssh_conn_info *cinfo) free(cinfo); } +static int +valid_hostname(const char *s) +{ + size_t i; + + if (*s == '-') + return 0; + for (i = 0; s[i] != 0; i++) { + if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL || + isspace((u_char)s[i]) || iscntrl((u_char)s[i])) + return 0; + } + return 1; +} + +static int +valid_ruser(const char *s) +{ + size_t i; + + if (*s == '-') + return 0; + for (i = 0; s[i] != 0; i++) { + if (strchr("'`\";&<>|(){}", s[i]) != NULL) + return 0; + /* Disallow '-' after whitespace */ + if (isspace((u_char)s[i]) && s[i + 1] == '-') + return 0; + /* Disallow \ in last position */ + if (s[i] == '\\' && s[i + 1] == '\0') + return 0; + } + return 1; +} + /* * Main program for the ssh client. */ @@ -1116,6 +1151,10 @@ main(int ac, char **av) if (!host) usage(); + if (!valid_hostname(host)) + fatal("hostname contains invalid characters"); + if (options.user != NULL && !valid_ruser(options.user)) + fatal("remote username contains invalid characters"); options.host_arg = xstrdup(host); /* Initialize the command to execute on remote host. */ From nobody Sat Jan 6 19:25:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzQ3Qk7z571HC; Sat, 6 Jan 2024 19:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6qzQ2y7Bz3wrR; Sat, 6 Jan 2024 19:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fj2o2OMzelv4+EZ5TcCzo+MpOXA54KQCz4WfwUJu6T0=; b=ppIfIxGicI4yaWML3g0EJIrz2dcwjH/r2uQihC0t/BVMvbv46lmv1m80G+bIXgDpYYm6n5 BlobBHonxPWtNZSFEWz4DEwkxd+n3u9hh/RzfBl8AqlNMXCArfY5J3lKOD/uePqussUs3V CixkcxBxW80eAoUGEUJ/ykAITCvEKawDH2cQo/OO4d+IMEf7+yd2ejhiirJDvOjHdgs0NH DBnDUtyqsiGdv86sbsgVHiEnU6+L9GuU5B9SUt373So24XgAoJCZHVepFxTH/XVdOgEx4z 6KtcvDN03carffYGTg83TjLuA+YYbHM7peSgd91VnPTzEHKZOQhtMn3R0G02/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fj2o2OMzelv4+EZ5TcCzo+MpOXA54KQCz4WfwUJu6T0=; b=D6iVdUCL2yx14amSXIMEcINLMlRXLrqZI0uYzUVHENPKF3v8G+j3IQkr8HaIdLzk7WTsXj n8EaefPg7X2kkeCsy5yQvxlAjGUE3hwRNd8DxEGB9QDMqEL3FhmQk9awqgT5EwKbUT7wy+ eNxuHIcpqhxOiohGernv9uhM+Ll7xiZltkQC3DuDC97RD7AIsI8rwOhVmGGsj88enoCcjr nDEjGjq2lOgKgM31xmqrgWOFcWB0n2lAsieTgRsYOmcin6Fv789iN2TdBcprraHJwWkmsA iIdMJZZ3KPkrO1MMCiHTxXlvWlHa/sbH9jyD8NRqyOkhNFSXiGVgsCJYNHWygg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569122; a=rsa-sha256; cv=none; b=QtwQB7SYnzSYRSN3Zd0NhnFpCyo7wTv0DOPNfzLvu5Bjjojv5lU4BGV7IV2TrErMuG/q9k UUnIIbrerxGjO3V09v5CGYY22BOOPy+3zH/x95WN+3VsQuqo31xQddRglIdXtTB0rqdSng R0SsYuzOeFowKI0M9H1MV0Ww25ylhFgCAbIhIoIPUH3DzMciZR3n9gEiJnyhpbFt2cXI87 g0JLLzIcdjcCh7wQnVbtPSSPH26qpv8dKfDTez1yEPmf1xytMFQlkb6pwsOEYYkAEK53l5 XRanAxtm35cMgKcbJflI/Z61JDMm7SwWh9o/URg52PHjUS9kAybS2jNhe63wng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzQ1sk0ztDN; Sat, 6 Jan 2024 19:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 406JPMXk064754; Sat, 6 Jan 2024 19:25:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPM9c064751; Sat, 6 Jan 2024 19:25:22 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:22 GMT Message-Id: <202401061925.406JPM9c064751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: da11f6868e1e - stable/13 - iflib(9): Revert ancillary changes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da11f6868e1e29a6cf42911fa1d80fb655ecac92 Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=da11f6868e1e29a6cf42911fa1d80fb655ecac92 commit da11f6868e1e29a6cf42911fa1d80fb655ecac92 Author: Marius Strobl AuthorDate: 2024-01-05 21:31:02 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 21:31:02 +0000 iflib(9): Revert ancillary changes In main, 7ff9ae90f reverted 09f6ff4f, i. e. support for cloning pseudo interfaces along with "ancillary changes" part of the original commit. As these latter were never actually used, this change turns the macros into spares in stable/13, too. Thus, when the bits gets reused in main such commits can be merged without conflicts. --- sys/net/iflib.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/sys/net/iflib.h b/sys/net/iflib.h index da6dc23aefd4..a444a4937a3c 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -350,22 +350,10 @@ typedef enum { * Driver needs frames padded to some minimum length */ #define IFLIB_NEED_ETHER_PAD 0x100 -/* - * Packets can be freed immediately after encap - */ -#define IFLIB_TXD_ENCAP_PIO 0x00200 -/* - * Use RX completion handler - */ -#define IFLIB_RX_COMPLETION 0x00400 -/* - * Skip refilling cluster free lists - */ -#define IFLIB_SKIP_CLREFILL 0x00800 -/* - * Don't reset on hang - */ -#define IFLIB_NO_HANG_RESET 0x01000 +#define IFLIB_SPARE7 0x200 +#define IFLIB_SPARE6 0x400 +#define IFLIB_SPARE5 0x800 +#define IFLIB_SPARE4 0x1000 /* * Don't need/want most of the niceties of * queue management From nobody Sat Jan 6 19:25:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzR4HgBz571MT; Sat, 6 Jan 2024 19:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6qzR3pK2z4vkq; Sat, 6 Jan 2024 19:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kVXgu3KdsKK4cNsqkeFXd/r9WMRme77fRVyZ1nPBHIU=; b=lmSbd6FOTIMRXj3UHEE/SaVl8jx5yK0xwvaS3YO7vha/UssoVo507rLaPHnu5TIlbzz8gR r8+dL3sl0sJ9yhXkQMpD30Qz3JpcPytwmiwtEhEbIgzF1TkURgJPuHi6LtxQnZYQU3KGry lpZuauP72KHFMH+2z3Qfpxqfc7bzQ4jlMRbR21FSv+FarBG24MlnZlGIS0x2+r+qjo3wr/ 5hhRLJ0aHRtoE23QuvGDFPXoUirY6oksYHxIj9EIsdmyOwOj7x/39ojIEOcJ9Q0EzNA6f/ XPgSs1++Qn3sjAUVeIq4pMOFxjs16BAjMIIZ2TlIRbsIbRTNo+eBkE+4npeT9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kVXgu3KdsKK4cNsqkeFXd/r9WMRme77fRVyZ1nPBHIU=; b=SYKnbmwe88rUxBGl9/wcjE6PgjumPviL+FL+ofcO6n1QCCu6Z4pRFDKTG/4XeDnpuhAfjw tSEympyDtNixNTZ3T3fmdvjmerb5MoMGKumGs0KjVlKdXHXBInYQq2Uutkk+CBDFuPmzMm jGZYNXiqy6yjOZZRx9Zs30PCIWTBEj7z9/XUzI9TkCQ1eJyTx1Cw8KZhJOGNPIB5HA/1Jv f8s3UZ7TP+6Xph6px345qoJb3pklVqNVje3zNdK9wlThNQ/Lt49cpq7JH8NL1aBizajmnL 4+sgAYUnOAHdjWDcSjT2u5Q3bnSKfa3YtR0qRo3LBad3hRFJNzw2XX/2qqGUaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569123; a=rsa-sha256; cv=none; b=MlStPVkLOFPLJno2qg2fb45e8ZVNnf8gMypcsiOYRaeSz1oYEyav4uJnQiQw3BWA+vhMJN fdxpOz7h14BzDjbnLBbmWBj+JmbDIBkkQnExjwHoqF5pfNlVn6fuUfGkMkSaOw/0Ca8Cb+ emMWFwndcAx3BlEI4vZ43QueJBCE7Zbe5TPjrxZzIPaEssE9eRqEy+TTvEG1HmqZl38Oh+ zwAa68DiAE700G11RUJS4W0CMd+ziXwhBNvK75xlBIlnTnRh5V67ID5JUCNW/leQk9SHB0 a3n6O/9T2rzJgATcWE49FZLXUpm5bhSz4XTPRxKmT+g4IMRKHklnoPsr4KQIdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzR2tC1ztrH; Sat, 6 Jan 2024 19:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 406JPN6f064805; Sat, 6 Jan 2024 19:25:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPNtI064802; Sat, 6 Jan 2024 19:25:23 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:23 GMT Message-Id: <202401061925.406JPNtI064802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: c1c5c54b6219 - stable/13 - targets: Catch up with the removal of sparc64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c1c5c54b62193654ba65ec0acf1799238a9c4c3f Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=c1c5c54b62193654ba65ec0acf1799238a9c4c3f commit c1c5c54b62193654ba65ec0acf1799238a9c4c3f Author: Marius Strobl AuthorDate: 2023-08-06 19:51:01 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 21:52:03 +0000 targets: Catch up with the removal of sparc64 (cherry picked from commit ba3c1f5972d7b90feb6e6da47905ff2757e0fe57) --- targets/pseudo/userland/Makefile.depend | 7 ------- targets/pseudo/userland/misc/Makefile.depend | 1 - 2 files changed, 8 deletions(-) diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend index f8db2d4b8e9c..5a63b348869f 100644 --- a/targets/pseudo/userland/Makefile.depend +++ b/targets/pseudo/userland/Makefile.depend @@ -829,13 +829,6 @@ DIRDEPS.mips= \ sbin/bsdlabel \ sbin/fdisk -DIRDEPS.sparc64= \ - sbin/bsdlabel \ - sbin/sunlabel \ - usr.sbin/eeprom \ - usr.sbin/ofwdump \ - usr.sbin/sade - DIRDEPS.powerpc= \ usr.sbin/nvram \ usr.sbin/ofwdump diff --git a/targets/pseudo/userland/misc/Makefile.depend b/targets/pseudo/userland/misc/Makefile.depend index b4c58bce4abc..40ad7160b2b8 100644 --- a/targets/pseudo/userland/misc/Makefile.depend +++ b/targets/pseudo/userland/misc/Makefile.depend @@ -84,7 +84,6 @@ DIRDEPS.arm= ${_sys_boot_fdt} ${_sys_boot_efi} DIRDEPS.arm64= ${_sys_boot_fdt} ${_sys_boot_efi} DIRDEPS.i386= ${DIRDEPS.x86sys} ${_sys_boot_efi} DIRDEPS.powerpc= ${_sys_boot_fdt} stand/libsa32 stand/ofw stand/uboot -DIRDEPS.sparc64= stand/ofw ${_sys_boot_zfs} .endif DIRDEPS+= ${DIRDEPS.${MACHINE}:U} From nobody Sat Jan 6 19:25:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzS6wPJz571Pq; Sat, 6 Jan 2024 19:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6qzS4v5gz3wtr; Sat, 6 Jan 2024 19:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P90wIuMquYea01rmA0htLUh00MOgfUoomD0ZlE0hW4k=; b=vvSofn81XmQoPuJBH2/ZHeNTGw1tXZYudrp/ubfpNZpiUFx88NDEVB6ysUDnsSr/oQghtv cSvPSZ9SayA9th3Ouw0dUrSeO6M0LYH8AJ9wwbTfMl7ER/93Zhw51Vmn0yMLu3D4f/PooP XxPn6Th0xRvdJTPhzoP5WaSPHO9EC6L33fRUzjKdM+oERqW5gmlt0L1JZO47Sqj8R7r+Co tByNwUzt19380p2aFmNhJjDCrv90wq0XPG3F64fKcFExmR++prywvYerj0PHnHnefOoj2b dQQOS0On86ljHgCc9+0+VHnBZizy4UQDhcQmOQnvMc2Qy/jFL76GA+674uH3iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P90wIuMquYea01rmA0htLUh00MOgfUoomD0ZlE0hW4k=; b=Nahctq6DEO8wMQ7A1JD6b4g3iB2CNI2tMPZQ9t34jOh0G2NlPzDtiNxNIJEyO88NEcd7Rt MOiPWNd6K2tt+kspGHdmu5WkPdorsdhMI5t7HFdAwQrwlAhL701cXXUSsFJFhPB/TjrFW+ X6T42nMYDjM9HvPafMWLVC/onIFQ3553/aNWkJBwexoH9t58ChNdkIPhdHPp3bstGXkLL3 pRD+cgSewNEEpEWl7DHEO/RHVyBPz/l6HZ2PNi+hYIksBP7JlJl0CNriVGh0XLdehcMH/Z Sm+ogKzn+u20oYskIFPoL/SWkmxgy3NTaFzWhiK49Edr5oFKoXZH4iIRRaNbuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569124; a=rsa-sha256; cv=none; b=XAeRpfRKI0MLYWDMAXTcNuGl6DxdzBr4uaMmNZmCNjSu0YK8Ni7zok2K0WBBJ3Ho+GAcna XTpOJM1YdUYmbyHrxtTZ56NMCIVlQ+Eka4SipqZ3HXIRfI66dYqWefZFFpX++usEcl6Qkr M8H7IRNagT55F/oXxsWPsn3+++3hxMl9QnOQRDXu1lkE53fm6sLY17ND/q+CqzPVxTiuCy y+woZ719YfqriEaN88l0wO+lNXof5eTDqwBzXPODVBppSUFFRSWZTbz1Amt8Y5xyBodKxy GH9ZaX4/EjVtlyWBZsCP9S5QD7ZZhRnnUklvVYMmdx983jseZCeuXpWG9C6RjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzS3rhZztHV; Sat, 6 Jan 2024 19:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 406JPOsx064850; Sat, 6 Jan 2024 19:25:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPO6C064847; Sat, 6 Jan 2024 19:25:24 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:24 GMT Message-Id: <202401061925.406JPO6C064847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: ac0db253f944 - stable/13 - exit1(): Reword comment regarding init workaround List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ac0db253f94487305b4274372a18da79abeaf7a3 Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=ac0db253f94487305b4274372a18da79abeaf7a3 commit ac0db253f94487305b4274372a18da79abeaf7a3 Author: Marius Strobl AuthorDate: 2023-08-06 19:54:57 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 21:53:04 +0000 exit1(): Reword comment regarding init workaround There are other relatively common reasons why init might get killed during reboot, the workaround was really not sparc64-specific. (cherry picked from commit 96c76d930656f13d3c041dc8d8f2fc3dd1e5e05a) (cherry picked from commit 28b36ecf990fc28a935ab2ce75f7504721c3a7ea) --- sys/kern/kern_exit.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index bfa3e70f878e..bd820aae8197 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -237,10 +237,11 @@ exit1(struct thread *td, int rval, int signo) p = td->td_proc; /* - * XXX in case we're rebooting we just let init die in order to - * work around an unsolved stack overflow seen very late during - * shutdown on sparc64 when the gmirror worker process exists. - * XXX what to do now that sparc64 is gone... remove if? + * In case we're rebooting we just let init die in order to + * work around an issues where pid 1 might get a fatal signal. + * For instance, if network interface serving NFS root is + * going down due to reboot, page-in requests for text are + * failing. */ if (p == initproc && rebooting == 0) { printf("init died (signal %d, exit %d)\n", signo, rval); From nobody Sat Jan 6 19:25:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzV1P52z571CC; Sat, 6 Jan 2024 19:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6qzT5Sw5z3wjw; Sat, 6 Jan 2024 19:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1tNWJesTkxZYlpnYnY6qRHUMeOUvUuofIEvbD3JNlSQ=; b=ue4Lqiu+6Qro/Dw2SgxkMAziEbRNp0f9V7RcVV8RyGWrAE/n78OjatDX29kOUCRlzUZt4B E55VBe5SLzc9dTnmWey2dlaxfetA8vUKRiFulX/UFpu6MTgl4Kn0SpngdPK47ERLCmkrKy /ltQKtcSq7xAUWFXvh1OtbIMfT2yUFbcPn4mWRqJoEvSboZr+b+zKcpaL0zmuJREP+g7Ex J9DnHCJqQwM1+UXxAuV5pzyykfX0vrBDY+A2pMbHOZgxtm2dBaKyz1Tt1n5td5LaOKjBjN prCZAAHsrQiYAb+Pb4ju5uBeHgl9FfRtK2f9xJY5boegfQ6EPyXL+e6nhlFaTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1tNWJesTkxZYlpnYnY6qRHUMeOUvUuofIEvbD3JNlSQ=; b=aVjcLdQUvKz6sboQ9iAGh2wwRsK7LydxvpIoL5yjb8nlZN1bG34jGbnvq0ZBQu+1PA/Dg7 gOYqpBKI8eMHPuK8MPXvKN5gkb/hKPW6tmG92sczUNSTMi+JzMxmGKDdW8m1QK4WOIgk10 V3l0IZn+Z3AzPJcVl5j5Belvbk7cwXGIRbbRtJBkNvP90AIblydBjkZh/2mjuEA+SyfRwY R/F5sGfJt6KmDvuhStMuYjsU1tD5mARoDsGrSxEVwudnLcmMdWeCfcIUDEbOLqjqvmBnAM NEQo6V6ABng+pzzg1HxQXBlWLCupReQTLSlOUoTh9t+qmH9aS7FPbz0w7bmn0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569125; a=rsa-sha256; cv=none; b=limbb9qD0fl08OU+TuGSPPgZijK0r/6/eqaC/pqUed8OuBvoaC/rct/h/YJydsG+BvIar/ wILsgPsn6fELVfdd0bGIACSlA72uSdQHXHKmhyWEkWrd6qzZhvz0IElbEJCPQshLWRdY+d A1nfdIqL3ItpadJrhUU8ITUcOzxmwt5FTiEuJ8IAnG6KY7+BggVneCjtFRPRvwLbS5xC/W ot7+qVfXS2hi7W3XQe6PGH0jIejmk7Ydi+bycKiX8l+nbCTaUfitKh40xQR9fxZK52BfZR waacLvfHxOuBo9khi9G/gVHJlQpooENLi/JWnJH0dq4bkKQvDqKsca562f6kVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzT4YvDztXB; Sat, 6 Jan 2024 19:25: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 406JPPR7064898; Sat, 6 Jan 2024 19:25:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPPJa064895; Sat, 6 Jan 2024 19:25:25 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:25 GMT Message-Id: <202401061925.406JPPJa064895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: a66193c913d6 - stable/13 - nanobsd: Remove remainder of sparc64 support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a66193c913d6cc4a6287b133470d0f29920078ae Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=a66193c913d6cc4a6287b133470d0f29920078ae commit a66193c913d6cc4a6287b133470d0f29920078ae Author: Marius Strobl AuthorDate: 2023-08-06 20:01:17 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 21:56:17 +0000 nanobsd: Remove remainder of sparc64 support Fixes: 25a66f1fb177 nanobsd: remove sparc64 embedded example (cherry picked from commit 76e3b8f54f59e6bfc318dd99c8abcc5adabc10e0) --- tools/tools/nanobsd/embedded/common | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/tools/nanobsd/embedded/common b/tools/tools/nanobsd/embedded/common index d42f0d96605d..8aaf9cee7f75 100644 --- a/tools/tools/nanobsd/embedded/common +++ b/tools/tools/nanobsd/embedded/common @@ -551,10 +551,6 @@ std_powerpc64 ( ) { NANO_ENDIAN=big } -std_sparc64 ( ) { - NANO_ENDIAN=big -} - # # QEMU settings for the standard environments # From nobody Sat Jan 6 19:25:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzW0BKpz5718V; Sat, 6 Jan 2024 19:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6qzV64k3z3wb2; Sat, 6 Jan 2024 19:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=npmYXiJ9/D+33o/KQ1/Z92kgmAu3HmfkWXtZUV1L4l0=; b=OoYT/6SOGUQg+tf7RF651B67zyezRmcgxdRs2Ppy1zp0WtPzSWWvVpqFPQiyZv8ZbBLrwg tbVIciD+398HzUU4oZ8OXLAnoojnpauWPQ7gHduAtFANn4ffbQfg7WQzdaMZ1djFolwQt6 DIgUriXY79x+tKoTmG1l6s97zgxGTV8l/I0/aqm/NSryTrhpw8qSCCVypJtDAE6fIC5IfV OL3xyfv3OnV/qwu4cU+N3EGAog4n/DKT70GbR7LXvoLwb9gAYlKtVjWolrsQG+htdQCRDL tTGImQJHP0rH7Y8q0BbHsujnlpcoxX7g3GjMTsSVaU4X7rafK5EhHSVlrNL7rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=npmYXiJ9/D+33o/KQ1/Z92kgmAu3HmfkWXtZUV1L4l0=; b=QfLANkZ9huLypHIILXFCjRk8Rke2Bvk3+eJZ17O+BddW7YeD2SS8jftqxw/7DrTII4zkek dWyajlBTT/z/Znj0VHFt8/6vLGzWewnz04+CC11QQZoc9xUqH7PlBYlXCSTriZrcuZ13BI pE+UpFlgtWZSRb28DNqG20FMtRQnN55aLHIZCIm/tzctnHwYX1nHGWQPzs/CFLnfFjMEIm xQciy0HN3r4oFjDnRiS8i1G7cDSkHeofYd/aALVIivae5NeWcOhZMivocyF7KJ6/+xbFQy bD6E9cnG3tBOoNdovZ/Z0Uy1f458tlvudMBzH4SbN6O/O3b1n2dtyae2RFxwiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569126; a=rsa-sha256; cv=none; b=sWPc1OIEMAaWAcYR8mcYmL6kO0ix1wLNUZnXzm29wsJiD9ed68lgajP1feLKVU4R9vCKgQ aONbeiwKMZLB2S1Mq2BdF20gytHz6ZxGGgS4xGSW3kRt+w9jpp2ZzXp45eeFyk2pz5ahEq HZlantIy6cBN7hayjVR6FPrQ5i+gZicmClok/11kv2FdGURKsQwKud6E1Ts2kIWYaZxfIz kJ9aLYTUvu4EPRso8WCXiLx5isMZ0wXfYEVSn3us39sQS9N3s4D4KHcw8bw6pbjlYPeuuj 4eWotTS+tosE4EqKPXUPy+DrmqSpEYj+pFzVxt5xPof5k3zSCfWw7vW5qNOp3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzV5BWZztSv; Sat, 6 Jan 2024 19:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 406JPQJC064947; Sat, 6 Jan 2024 19:25:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPQfm064944; Sat, 6 Jan 2024 19:25:26 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:26 GMT Message-Id: <202401061925.406JPQfm064944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: f35b3d1171f6 - stable/13 - mergemaster(8): Remove support for sparc64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f35b3d1171f69ae76b6c1dad7da547cc33006eb6 Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=f35b3d1171f69ae76b6c1dad7da547cc33006eb6 commit f35b3d1171f69ae76b6c1dad7da547cc33006eb6 Author: Marius Strobl AuthorDate: 2023-08-06 20:07:29 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 21:58:23 +0000 mergemaster(8): Remove support for sparc64 (cherry picked from commit 9ec7a595ed2c7631ef916d9f5818ccd5c5d327c8) --- usr.sbin/mergemaster/mergemaster.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh index b22affc4c343..9220cfd38b47 100755 --- a/usr.sbin/mergemaster/mergemaster.sh +++ b/usr.sbin/mergemaster/mergemaster.sh @@ -780,7 +780,7 @@ CONFIRMED_UMASK=${NEW_UMASK:-0022} # Warn users who still have old rc files # for file in atm devfs diskless1 diskless2 network network6 pccard \ - serial syscons sysctl alpha amd64 i386 sparc64; do + serial syscons sysctl alpha amd64 i386; do if [ -f "${DESTDIR}/etc/rc.${file}" ]; then OLD_RC_PRESENT=1 break @@ -806,7 +806,7 @@ case "${OLD_RC_PRESENT}" in *) mkdir -p /var/tmp/mergemaster/old_rc for file in atm devfs diskless1 diskless2 network network6 pccard \ - serial syscons sysctl alpha amd64 i386 sparc64; do + serial syscons sysctl alpha amd64 i386; do if [ -f "${DESTDIR}/etc/rc.${file}" ]; then mv ${DESTDIR}/etc/rc.${file} /var/tmp/mergemaster/old_rc/ fi From nobody Sat Jan 6 19:25:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzX1wFVz571HK; Sat, 6 Jan 2024 19:25: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 4T6qzW6pjsz3wq4; Sat, 6 Jan 2024 19:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a4HXB5UR7TAao2R1A5lF1t5YjzZf5cLhT4/eZAFi7dI=; b=MsBvshl/B9+R3tvUUF6oyF1K13a/9nN6Ugf3akfk7vR8gpwVVYpwMAl5i2uG1G4zqM/fDl +Ifv6ydOlBi8t9Op/l66u0Vzjg++wvXe4cmq4HYQv43ZdiUEIyPAbBXv7sDBIhldpgT/Om wSIKW5ejROwncPN4Od417ZyAJw5zrS9WN2NeBQ8JGSd1ECDar19iWpng8QgtZ8SocSoaki n1W7IlluUOdDzNUi7UufU9fGZ/7ZtysH7LuKy9f3L+4ublB/iwh83m0MNeFAhHeLNW+jZF YYCCF5pFGnY9VAcE7EuLPnVRi0IEGnSN0Wta1T0JCBIBx9H6JqGjMxuL+gSknA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a4HXB5UR7TAao2R1A5lF1t5YjzZf5cLhT4/eZAFi7dI=; b=PpEeJCwLe8/mscFsReszLZ7AdR2Qf4Y25cHx+BPcE9pC3oRjnQZVC3+zIoNuZebIWO4dD4 KUoYu2JNTvCpEx6gWTf/ijLPfwDGZYYOd2S9X8JtGDvA7UmngRVikrc2gtbRQ+pZkU26oi HdXdxEN2VuCUqx3SLN9iuB9+qdRg3Ep3L0Ii9f4R5zH8S7vuyXZfMMW7txLewusB2yPiSy 3V5xy8LAvK5JL9NyV1S9dvAy6zA6AguXi2FXkYnPwEFLj711zGfHcXTjScYF6cdy9dUUlZ tRIF4t7vGYL9vuhPAbV8ZEoo2x3xv4oF+7WfAEXE4L3lqh63ilssny2cLOB4aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569128; a=rsa-sha256; cv=none; b=H6FKBypzsDxurXBqS0NSpsEkt0oSbgvSL0QvSW2dhe+ilIISuHvAM0zXZRbT6yylrtbVzk wq7iRYicrKJvnGJcd3y22Hkepk4fNBJLz/pCLJuksJ82JS1ZCxuQ/KAjG97t2ux0680on/ 0SRvEhnaF6jSrhdA92Ds3sVZd6sZwOgyQAmgnao//nmEA4yUYNsKmT+8YATKKihHN1MWeL so3MGQ7+rlYH841y9bI6cXP2O26mVqMi/+h8z8rkw1mGJI/PqGyWEwIr1Hz5mWmSyQq/OS OQfqwUtH6Zz1BnKBstxapuumY+BEgEW/GpJz5xttqQCKpX7HwKNwdWhWAdx3jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzW5vnpzth8; Sat, 6 Jan 2024 19:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 406JPRZW064992; Sat, 6 Jan 2024 19:25:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPRae064989; Sat, 6 Jan 2024 19:25:27 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:27 GMT Message-Id: <202401061925.406JPRae064989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: 5153206df0f2 - stable/13 - iflib drivers: Constify PCI ID LUTs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5153206df0f29d682cdcad97b67d182b00204ccd Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=5153206df0f29d682cdcad97b67d182b00204ccd commit 5153206df0f29d682cdcad97b67d182b00204ccd Author: Marius Strobl AuthorDate: 2023-08-16 16:49:34 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 22:48:03 +0000 iflib drivers: Constify PCI ID LUTs Since d49e83eac3baf16a22b1c5d42e8438b68b17e6f9, iflib(9) is ready for this change. While at it, make isc_driver_version strings (static) const where not apparently un-const on purpose, too. This reduces the size of the amd64 GENERIC by about 10 KiB. (cherry picked from commit 51e235148a4becba94e824a44bd69687644a7f56) Conflicts (drivers missing in stable/13): sys/dev/enetc/if_enetc.c sys/dev/enic/if_enic.c --- sys/dev/axgbe/if_axgbe_pci.c | 2 +- sys/dev/bnxt/bnxt.h | 2 +- sys/dev/bnxt/if_bnxt.c | 4 ++-- sys/dev/e1000/if_em.c | 8 ++++---- sys/dev/iavf/iavf_drv_info.h | 2 +- sys/dev/ice/ice_drv_info.h | 2 +- sys/dev/igc/if_igc.c | 2 +- sys/dev/ixgbe/if_ix.c | 4 ++-- sys/dev/ixgbe/if_ixv.c | 4 ++-- sys/dev/ixl/if_ixl.c | 2 +- sys/dev/mgb/if_mgb.c | 2 +- sys/dev/vmware/vmxnet3/if_vmx.c | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c index 5f5be18b162d..cd498bf1b5d7 100644 --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -137,7 +137,7 @@ static struct resource_spec axgbe_pci_mac_spec[] = { { -1, 0 } }; -static pci_vendor_info_t axgbe_vendor_info_array[] = +static const pci_vendor_info_t axgbe_vendor_info_array[] = { PVID(0x1022, 0x1458, "AMD 10 Gigabit Ethernet Driver"), PVID(0x1022, 0x1459, "AMD 10 Gigabit Ethernet Driver"), diff --git a/sys/dev/bnxt/bnxt.h b/sys/dev/bnxt/bnxt.h index 78b7e4ca6bf5..2b5c16e263d7 100644 --- a/sys/dev/bnxt/bnxt.h +++ b/sys/dev/bnxt/bnxt.h @@ -206,7 +206,7 @@ #define BNXT_MIN_FRAME_SIZE 52 /* Frames must be padded to this size for some A0 chips */ -extern char bnxt_driver_version[]; +extern const char bnxt_driver_version[]; typedef void (*bnxt_doorbell_tx)(void *, uint16_t idx); typedef void (*bnxt_doorbell_rx)(void *, uint16_t idx); typedef void (*bnxt_doorbell_rx_cq)(void *, bool); diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c index db8b4125e5bd..b7c71e70a576 100644 --- a/sys/dev/bnxt/if_bnxt.c +++ b/sys/dev/bnxt/if_bnxt.c @@ -67,7 +67,7 @@ * PCI Device ID Table */ -static pci_vendor_info_t bnxt_vendor_info_array[] = +static const pci_vendor_info_t bnxt_vendor_info_array[] = { PVID(BROADCOM_VENDOR_ID, BCM57301, "Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller"), @@ -303,7 +303,7 @@ static driver_t bnxt_iflib_driver = { */ #define BNXT_DRIVER_VERSION "2.20.0.1" -char bnxt_driver_version[] = BNXT_DRIVER_VERSION; +const char bnxt_driver_version[] = BNXT_DRIVER_VERSION; extern struct if_txrx bnxt_txrx; static struct if_shared_ctx bnxt_sctx_init = { .isc_magic = IFLIB_MAGIC, diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 8cf130048128..b0870fd3f2b3 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -36,8 +36,8 @@ /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.7.8-fbsd"; -char igb_driver_version[] = "2.5.19-fbsd"; +static const char em_driver_version[] = "7.7.8-fbsd"; +static const char igb_driver_version[] = "2.5.19-fbsd"; /********************************************************************* * PCI Device ID Table @@ -49,7 +49,7 @@ char igb_driver_version[] = "2.5.19-fbsd"; * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } *********************************************************************/ -static pci_vendor_info_t em_vendor_info_array[] = +static const pci_vendor_info_t em_vendor_info_array[] = { /* Intel(R) - lem-class legacy devices */ PVID(0x8086, E1000_DEV_ID_82540EM, "Intel(R) Legacy PRO/1000 MT 82540EM"), @@ -214,7 +214,7 @@ static pci_vendor_info_t em_vendor_info_array[] = PVID_END }; -static pci_vendor_info_t igb_vendor_info_array[] = +static const pci_vendor_info_t igb_vendor_info_array[] = { /* Intel(R) - igb-class devices */ PVID(0x8086, E1000_DEV_ID_82575EB_COPPER, "Intel(R) PRO/1000 82575EB (Copper)"), diff --git a/sys/dev/iavf/iavf_drv_info.h b/sys/dev/iavf/iavf_drv_info.h index ed8e05fe9727..5a84a30662a8 100644 --- a/sys/dev/iavf/iavf_drv_info.h +++ b/sys/dev/iavf/iavf_drv_info.h @@ -66,7 +66,7 @@ const char iavf_driver_version[] = "3.0.26-k"; * to most-generic entry; e.g. PVIDV_OEM()s for a device ID must come before * the PVIDV() for it. */ -static pci_vendor_info_t iavf_vendor_info_array[] = { +static const pci_vendor_info_t iavf_vendor_info_array[] = { PVIDV(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF, "Intel(R) Ethernet Virtual Function 700 Series"), PVIDV(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF, diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h index f258650760bc..41598923dc94 100644 --- a/sys/dev/ice/ice_drv_info.h +++ b/sys/dev/ice/ice_drv_info.h @@ -85,7 +85,7 @@ const uint8_t ice_rc_version = 0; * to most-generic entry; e.g. PVIDV_OEM()s for a device ID must come before * the PVIDV() for it. */ -static pci_vendor_info_t ice_vendor_info_array[] = { +static const pci_vendor_info_t ice_vendor_info_array[] = { PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_BACKPLANE, "Intel(R) Ethernet Controller E810-C for backplane"), PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP, diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 82fb0d72070b..3e05d1a7b957 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -46,7 +46,7 @@ * { Vendor ID, Device ID, String } *********************************************************************/ -static pci_vendor_info_t igc_vendor_info_array[] = +static const pci_vendor_info_t igc_vendor_info_array[] = { /* Intel(R) PRO/1000 Network Connection - igc */ PVID(0x8086, IGC_DEV_ID_I225_LM, "Intel(R) Ethernet Controller I225-LM"), diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index b1cba9f24929..e265fa77ba4b 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -45,7 +45,7 @@ /************************************************************************ * Driver version ************************************************************************/ -char ixgbe_driver_version[] = "4.0.1-k"; +static const char ixgbe_driver_version[] = "4.0.1-k"; /************************************************************************ * PCI Device ID Table @@ -56,7 +56,7 @@ char ixgbe_driver_version[] = "4.0.1-k"; * * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } ************************************************************************/ -static pci_vendor_info_t ixgbe_vendor_info_array[] = +static const pci_vendor_info_t ixgbe_vendor_info_array[] = { PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, "Intel(R) 82598EB AF (Dual Fiber)"), PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, "Intel(R) 82598EB AF (Fiber)"), diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index 956acf46ee24..fe23ea226348 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -45,7 +45,7 @@ /************************************************************************ * Driver version ************************************************************************/ -char ixv_driver_version[] = "2.0.1-k"; +static const char ixv_driver_version[] = "2.0.1-k"; /************************************************************************ * PCI Device ID Table @@ -56,7 +56,7 @@ char ixv_driver_version[] = "2.0.1-k"; * * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } ************************************************************************/ -static pci_vendor_info_t ixv_vendor_info_array[] = +static const pci_vendor_info_t ixv_vendor_info_array[] = { PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF, "Intel(R) X520 82599 Virtual Function"), PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF, "Intel(R) X540 Virtual Function"), diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index 23d8fc1c6cbb..c52d5ad287ba 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -63,7 +63,7 @@ * ( Vendor ID, Device ID, Branding String ) *********************************************************************/ -static pci_vendor_info_t ixl_vendor_info_array[] = +static const pci_vendor_info_t ixl_vendor_info_array[] = { PVIDV(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710, "Intel(R) Ethernet Controller X710 for 10GbE SFP+"), PVIDV(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B, "Intel(R) Ethernet Controller XL710 for 40GbE backplane"), diff --git a/sys/dev/mgb/if_mgb.c b/sys/dev/mgb/if_mgb.c index e3806300ed9a..7ac93ec020c4 100644 --- a/sys/dev/mgb/if_mgb.c +++ b/sys/dev/mgb/if_mgb.c @@ -86,7 +86,7 @@ #include "ifdi_if.h" #include "miibus_if.h" -static pci_vendor_info_t mgb_vendor_info_array[] = { +static const pci_vendor_info_t mgb_vendor_info_array[] = { PVID(MGB_MICROCHIP_VENDOR_ID, MGB_LAN7430_DEVICE_ID, "Microchip LAN7430 PCIe Gigabit Ethernet Controller"), PVID(MGB_MICROCHIP_VENDOR_ID, MGB_LAN7431_DEVICE_ID, diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c index cd313b5b8084..4f2c8cb7f3cc 100644 --- a/sys/dev/vmware/vmxnet3/if_vmx.c +++ b/sys/dev/vmware/vmxnet3/if_vmx.c @@ -77,7 +77,7 @@ #define VMXNET3_VMWARE_VENDOR_ID 0x15AD #define VMXNET3_VMWARE_DEVICE_ID 0x07B0 -static pci_vendor_info_t vmxnet3_vendor_info_array[] = +static const pci_vendor_info_t vmxnet3_vendor_info_array[] = { PVID(VMXNET3_VMWARE_VENDOR_ID, VMXNET3_VMWARE_DEVICE_ID, "VMware VMXNET3 Ethernet Adapter"), /* required last entry */ From nobody Sat Jan 6 19:25:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzY3LXvz571HM; Sat, 6 Jan 2024 19:25: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 4T6qzY0lj4z3wnP; Sat, 6 Jan 2024 19:25:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7MieNWwvZS18TeBAZ6XLTNTroTTnxroAlffX3vi0BQg=; b=pvSG3C8rKrMBNNDrPytxr3ZKK0la2XYNzcxbXZ9JWzYja/GfJQHGlnIQkhlm4rmqC7cZoh jOkAGqVcwRsxY88r06aJ+RNaJ9HITCP1gMGkkkxg0lCaZReErIFSqZebI0vvvVA01M8hIc kDryRlwSQ892/OwEVHwmH7vE53O4gYp8hT39LEXS23nqfgjWy004x3KFShVHFWnpL61GMq FjvH9jPMjShAPUjjj2efw5oJEtmxDLfZWr8Sq0sETc38N3ClawwXwwa0GwDdySDehq0IK5 +VgcPUGqdnueE1qFhcUsFCCZoxO9o32G+0yE4LMKXDgxBsqmMRlHDvOmCa673w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7MieNWwvZS18TeBAZ6XLTNTroTTnxroAlffX3vi0BQg=; b=gC2FRjQau53sn5UE6meYE/dZmPjZ/feOL911+ECAxpu+fNnFJuSJ/P7mxc/baGwIIUEWyV I271NXlvFTkFZycSuBH0a2Ea3yj+QbRstIbtWEu4+kKreBerRi2gfvuoNu6xbnN8ejPuDL AKjkpuvI3KQvFP5zN8NOZVPk/rt4xIDJml04XTcElXFR2AoT0LKVBfsYIcJ6V3QkksvLff XxyhtaXtBOqoqcHOLRgAQJl6HWMO4B27Fo+j1IStM2aZZvfs7k226kGEaw8F7CqYcmjnKn XSk6Ca8IsLPeLmVAaU20g7dmJScyYb0Fta1qu6WGW6BM5G7Q9o6BmwYx9/p5QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569129; a=rsa-sha256; cv=none; b=jIwNli8F8VVGjnIysqyAiJc2fjD8ssBJv4cPz06cNHaFBWXSoqMRGFTWRq2o3VC9WKfz+m 47xjPzpIXXkrhvYFWyrKOI8PyBIMAdWHnW4jxphbSy2Peug8glYAHUuuH2/VVEPZr9VTM0 Js6MX2tV3nXE4Xao3KZYJoCPB9fLxf1DoH+wbaNwRPsZ4mAMFYN71LnkcLxNIvL01F9FG+ W6mcO4kIuAz4gpMFpRv9Ng80Xo6MAd3sVwXktHyThREFbvwdA9xvBolR6B6++Ni+AAZlID jnG0Kv2OD5YXPpR0POUUzT5S9IR7uOrAqU2ueGInXTgpolk0i5YC/s59qDlh5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzX6yq7ztXC; Sat, 6 Jan 2024 19:25: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 406JPSUa065040; Sat, 6 Jan 2024 19:25:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPSgp065037; Sat, 6 Jan 2024 19:25:28 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:28 GMT Message-Id: <202401061925.406JPSgp065037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: e7550f26f306 - stable/13 - sym(4): Add __diagused to nseg of getbaddrcb() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e7550f26f306730304b9c94f4936076be6357e99 Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=e7550f26f306730304b9c94f4936076be6357e99 commit e7550f26f306730304b9c94f4936076be6357e99 Author: Marius Strobl AuthorDate: 2023-08-18 14:29:10 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 22:48:34 +0000 sym(4): Add __diagused to nseg of getbaddrcb() The parameter is only used when compiling with INVARIANTS. (cherry picked from commit ae6d4963589418f2116ddc8cabcf93dd2f4bbf3b) --- sys/dev/sym/sym_hipd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index 50c52f46dca6..8517d79124b0 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -569,7 +569,8 @@ static void sym_mfree(void *ptr, int size, char *name) * BUS handle. A reverse table (hashed) is maintained for virtual * to BUS address translation. */ -static void getbaddrcb(void *arg, bus_dma_segment_t *segs, int nseg, int error) +static void getbaddrcb(void *arg, bus_dma_segment_t *segs, int nseg __diagused, + int error) { bus_addr_t *baddr; From nobody Sat Jan 6 19:25:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzZ56C0z571FB; Sat, 6 Jan 2024 19:25: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 4T6qzZ4Xqcz3ww3; Sat, 6 Jan 2024 19:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BKM2GEP5IltrgdZ8vmwt4G8TxoN1wAM4vHk84OLYXjs=; b=iHG7dBSH9i+bUDoHEixodnNQ1aigCZ9uk28/6tzFHTLO+0H1qFScm4Vs/5GtOlOAMFCVvh /sIzJXb67P7wdbH4QMxMCmESRd8NGbt3rrwE9Q8iO7fPzQbDeUV6Jn+YXA57HiRvCc/OqJ wh1xomRA7VpHKz8tRBFd+Yvi4ZiDHzKsSZsXz/7je3QGq1kvW9b2tnRG+CbnyssKDwrTI/ zzE1+COefTZ9qg2o5YsrbSq0xwfhbpokGIP9dOFQTG7tLYxMGQAhEoHemSvIh1c166xqHE eaV7dbMJYQbp3OF2j7lLOFzwB0BQseFa1JAJEnNUzV1YEc0Eb19iC+g2XTUYhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BKM2GEP5IltrgdZ8vmwt4G8TxoN1wAM4vHk84OLYXjs=; b=e0WEy9D7zEdh9Gz6/HKwSS4wYBOrXJeoua1Gpe/rvrh9lXapwxexq44iKrzEfFD066lGgA DMNKD3kyg+hA/Nqy94b4R9TwnmWOFG/px0KnwBYqrminC1PZNmSXGsikmerjgWQAe5TqDH aKzZERz548JjlTj3HT0FYzSo0iARsBPRw/4QtT26M8Q1/5SfUq2hNjsICOwIyyTatxSoyM vIHolRktxyTN6Doje8qgiHT5hpB61F65G0gqAjVcUZRZehtrrngvRbTRKUHTz30xwMZ7gV bl09EM40telxuKIcK7f9s/w02jAx3PVbN/CigIEwy54PQ7SR5dxCWzDXN3jIiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569130; a=rsa-sha256; cv=none; b=ukhE+CbPn+p1Js6AUx67YjEEzPPo+JQkXmYnlYxo5+fKoOG58xRwxxP1pAJxAdhRAZYWAi gru1C7b2HfDzjP23qJjq0lwuadCnd3Zd6Tuq3tTQ+hseSmVRLQeZ8FllP6ubWkw1AgbasZ QrL8y5T/01MvgScVBnPAogdelWNDapOspXy6CUXouUUSlgt+PtpHtJy/sAVBfAghNTEW12 FXhTzhg5QXy9K0kDaJRMlh36YyQR+6DJC8DF9v8aYjQOYThA9g1lt39qVzws/Cfnq0sKOX T5HWR1ssUx9bBI+lIK1kFYEBBtYsVbI176U1g9mClY+LHv0f0XWJ5NTgy78xgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzZ0wHGzth9; Sat, 6 Jan 2024 19:25: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 406JPUiV065101; Sat, 6 Jan 2024 19:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPUj7065098; Sat, 6 Jan 2024 19:25:30 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:30 GMT Message-Id: <202401061925.406JPUj7065098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: bc85442bf6c9 - stable/13 - tcp_fill_info(): Change lock assertion on INPCB to locked only List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bc85442bf6c9effcea7d7ef24651998b35c04dc9 Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=bc85442bf6c9effcea7d7ef24651998b35c04dc9 commit bc85442bf6c9effcea7d7ef24651998b35c04dc9 Author: Marius Strobl AuthorDate: 2023-08-22 17:03:42 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 22:48:34 +0000 tcp_fill_info(): Change lock assertion on INPCB to locked only This function actually only ever reads from the TCP PCB. Consequently, also make the pointer to its TCP PCB parameter const. Sponsored by: NetApp, Inc. (originally) (cherry picked from commit 8c6104c48ea3f0ffaabeb9784b0f2327db04e7af) Conflicts (due tue missing 9eb0e832): sys/dev/cxgbe/tom/t4_tom.c sys/netinet/tcp_offload.c sys/netinet/tcp_usrreq.c --- sys/dev/cxgbe/tom/t4_tom.c | 4 ++-- sys/netinet/tcp_offload.c | 4 ++-- sys/netinet/tcp_offload.h | 2 +- sys/netinet/tcp_usrreq.c | 8 ++++---- sys/netinet/toecore.c | 2 +- sys/netinet/toecore.h | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index c423ca011977..b1982341f4d5 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -817,12 +817,12 @@ fill_tcp_info(struct adapter *sc, u_int tid, struct tcp_info *ti) * the tcp_info for an offloaded connection. */ static void -t4_tcp_info(struct toedev *tod, struct tcpcb *tp, struct tcp_info *ti) +t4_tcp_info(struct toedev *tod, const struct tcpcb *tp, struct tcp_info *ti) { struct adapter *sc = tod->tod_softc; struct toepcb *toep = tp->t_toe; - INP_WLOCK_ASSERT(tp->t_inpcb); + INP_LOCK_ASSERT(tp->t_inpcb); MPASS(ti != NULL); fill_tcp_info(sc, toep->tid, ti); diff --git a/sys/netinet/tcp_offload.c b/sys/netinet/tcp_offload.c index 71a5d51b5f22..b04251712580 100644 --- a/sys/netinet/tcp_offload.c +++ b/sys/netinet/tcp_offload.c @@ -185,12 +185,12 @@ tcp_offload_ctloutput(struct tcpcb *tp, int sopt_dir, int sopt_name) } void -tcp_offload_tcp_info(struct tcpcb *tp, struct tcp_info *ti) +tcp_offload_tcp_info(const struct tcpcb *tp, struct tcp_info *ti) { struct toedev *tod = tp->tod; KASSERT(tod != NULL, ("%s: tp->tod is NULL, tp %p", __func__, tp)); - INP_WLOCK_ASSERT(tp->t_inpcb); + INP_LOCK_ASSERT(tp->t_inpcb); tod->tod_tcp_info(tod, tp, ti); } diff --git a/sys/netinet/tcp_offload.h b/sys/netinet/tcp_offload.h index 855c28e01385..8f299f57fd33 100644 --- a/sys/netinet/tcp_offload.h +++ b/sys/netinet/tcp_offload.h @@ -43,7 +43,7 @@ void tcp_offload_input(struct tcpcb *, struct mbuf *); int tcp_offload_output(struct tcpcb *); void tcp_offload_rcvd(struct tcpcb *); void tcp_offload_ctloutput(struct tcpcb *, int, int); -void tcp_offload_tcp_info(struct tcpcb *, struct tcp_info *); +void tcp_offload_tcp_info(const struct tcpcb *, struct tcp_info *); int tcp_offload_alloc_tls_session(struct tcpcb *, struct ktls_session *, int); void tcp_offload_detach(struct tcpcb *); diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index df322b03a59a..7e9c871df87a 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -129,7 +129,7 @@ static int tcp6_connect(struct tcpcb *, struct sockaddr *, #endif /* INET6 */ static void tcp_disconnect(struct tcpcb *); static void tcp_usrclosed(struct tcpcb *); -static void tcp_fill_info(struct tcpcb *, struct tcp_info *); +static void tcp_fill_info(const struct tcpcb *, struct tcp_info *); static int tcp_pru_options_support(struct tcpcb *tp, int flags); @@ -1631,11 +1631,11 @@ out: * constants -- for example, the numeric values for tcpi_state will differ * from Linux. */ -static void -tcp_fill_info(struct tcpcb *tp, struct tcp_info *ti) +void +tcp_fill_info(const struct tcpcb *tp, struct tcp_info *ti) { - INP_WLOCK_ASSERT(tp->t_inpcb); + INP_LOCK_ASSERT(tp->t_inpcb); bzero(ti, sizeof(*ti)); ti->tcpi_state = tp->t_state; diff --git a/sys/netinet/toecore.c b/sys/netinet/toecore.c index 7ccff2c3eeed..4bb5f706de06 100644 --- a/sys/netinet/toecore.c +++ b/sys/netinet/toecore.c @@ -182,7 +182,7 @@ toedev_ctloutput(struct toedev *tod __unused, struct tcpcb *tp __unused, } static void -toedev_tcp_info(struct toedev *tod __unused, struct tcpcb *tp __unused, +toedev_tcp_info(struct toedev *tod __unused, const struct tcpcb *tp __unused, struct tcp_info *ti __unused) { diff --git a/sys/netinet/toecore.h b/sys/netinet/toecore.h index 8a25a95799d5..6523c3a110fc 100644 --- a/sys/netinet/toecore.h +++ b/sys/netinet/toecore.h @@ -106,7 +106,7 @@ struct toedev { void (*tod_ctloutput)(struct toedev *, struct tcpcb *, int, int); /* Update software state */ - void (*tod_tcp_info)(struct toedev *, struct tcpcb *, + void (*tod_tcp_info)(struct toedev *, const struct tcpcb *, struct tcp_info *); /* Create a TLS session */ From nobody Sat Jan 6 19:25:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzb3lN6z571Q0; Sat, 6 Jan 2024 19:25: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 4T6qzb2tx8z3ww7; Sat, 6 Jan 2024 19:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wj3hWvkuR6LsauI0hZE3IjNFCTt8MuUk4o2DEvaSfDE=; b=uyYCzQqyGrmPTta9cBQtIx0gL0SSEe+3HKUAsusSGhv5UfanCvSMusCUmkfgysfiGzvw9m o+Dcr6IIy7o7j6zcBd3nfKj+aLj2BEjuoH6SehyRwcRRTZkGl2sZ8+H27eTxIIniDpUlGU 61sdZDABzPZ4cQyPHlCPyeL5gtGRjZatYEQdgK68s64eOScTDWXxbaPgbyF7gXxh6YHrGW 84gNtzoZel9hUWJH6ZdGv/fWiNTvQ2wBNBVMbTfg/g1Was3kqP+G1wN3QPiwYsjLmix3jl CzlvswrjwnJ8+SmoieUoYBrchJ0e14D2D5kCIu8QAC9o6qtHo/zNBz4nM2FIsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wj3hWvkuR6LsauI0hZE3IjNFCTt8MuUk4o2DEvaSfDE=; b=m229JPHLaJ8opvwONW1wUnpXECNLTebKKMRpvrmaMCzQTeR6+AgwW5MAImHQdAXBiqOKpr ZVfaG9m6a0CGl255li03BXN+9nOx/Bbss6ZGC+OBg63Jt/ZMAqdQFFVRoMPwZYkTzZetx0 ZPPDDQwFJQC8gIy3XHoB179sC/yK+Q/b2nTdExTy+H7Kij5eBlcXnvha34aNBrtNtxwNz/ 5BkZKevPUV0+7wLzDbLT9IJCorLa+d8NTFlFJl6MsDqcJf0GfobqzR1FphF1EypDbYgyyn cRnXEEqrI5Y2tNWAiQoozBKIZTJj507bMamrGDWECNslRDn98xY6VgGq2llxcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569131; a=rsa-sha256; cv=none; b=JIZZ8kMTIe7m98hfo4hSAdASx35RAOuuhHRJj9kWHjaVapU/VY0Vie/FoSUiVm5UMAeuxu QRB2naMKrz4xA06FrRjK/xvCphtT3QPWq1h9+peGKxjm8uRGcOsQ7nV9vRkl8vE0cNycJB Cb1soj9iVb4lWUxyhFrpdUA68qNdc19bgl2QYmIPES72PSpKWvpvBbyIHCKCd+PcfKaUi+ pQEbjOnDkHtflaGaYz3Nfp7aOICXgOqVhA5ysSJurekKFkg3sKo2emdu3faOFMaajhhY7U DhhvxE35qmowc85Dt6VhG7xlGYA7oSmP7OQLe7L+utBuu4NYoioxX/9Z61LAPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzb1v78ztrJ; Sat, 6 Jan 2024 19:25: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 406JPV3O065148; Sat, 6 Jan 2024 19:25:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPVed065145; Sat, 6 Jan 2024 19:25:31 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:31 GMT Message-Id: <202401061925.406JPVed065145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: 03d636e4bf57 - stable/13 - tcp: reserve tcp_info counters for AccECN List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 03d636e4bf574775290934ef31e7a00b0eb52603 Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=03d636e4bf574775290934ef31e7a00b0eb52603 commit 03d636e4bf574775290934ef31e7a00b0eb52603 Author: Richard Scheffenegger AuthorDate: 2022-11-04 09:18:41 +0000 Commit: Marius Strobl CommitDate: 2024-01-05 22:48:34 +0000 tcp: reserve tcp_info counters for AccECN Marking all new fields unused (__xxx). No functional change. Reviewed By: tuexen, rrs, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D37016 (cherry picked from commit 3708c3d370f26af0841cd3e97bf569d39c42953b) --- sys/netinet/tcp.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index febd96d47efe..16307161e6ac 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -388,8 +388,18 @@ struct tcp_info { u_int32_t tcpi_rcv_ooopack; /* Out-of-order packets */ u_int32_t tcpi_snd_zerowin; /* Zero-sized windows sent */ + /* Accurate ECN counters. */ + u_int32_t __tcpi_delivered_ce; + u_int32_t __tcpi_received_ce; /* # of CE marks received */ + u_int32_t __tcpi_delivered_e1_bytes; + u_int32_t __tcpi_delivered_e0_bytes; + u_int32_t __tcpi_delivered_ce_bytes; + u_int32_t __tcpi_received_e1_bytes; + u_int32_t __tcpi_received_e0_bytes; + u_int32_t __tcpi_received_ce_bytes; + /* Padding to grow without breaking ABI. */ - u_int32_t __tcpi_pad[26]; /* Padding. */ + u_int32_t __tcpi_pad[18]; /* Padding. */ }; /* From nobody Sat Jan 6 19:25:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6qzc6d7gz571Q3; Sat, 6 Jan 2024 19:25: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 4T6qzc3bScz3x6L; Sat, 6 Jan 2024 19:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZNa+ZoW4aeSKQWqy8uq4Hx6uafNv9/IW7rS6tfNY2A=; b=sPL/dkp4paVxFLU02PxdZnF5+F8LFIxs3e3ojVxjZYoqEpq+Y8LP9i2wdAg4jSZ4l0vsNS Hv3IF7Nd2i4COFwB/vFGl+QpY8lsAlY6IsQ4dTqFpa9aSjes6ocMnuwh5ieFMwz9dqYvK1 xWFLaAwWlhR8nFXo8jaJ9dQK/nDmMaG1MeAJc9E9uahsABbD7zOUJimigPMYx8NWfpA7du xvneJtqwKQLNwnVngDmZY/ditclwhtZIZV0ZBG1q2lm5JY4KGhjR3e7S+LCLXQ1szrCXW1 Lb7V6k8dOgr7MqE380R5/toAfdhzilbOolVj/zHTFtqQFnOWJvXQYJ+YbO7/uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704569132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZNa+ZoW4aeSKQWqy8uq4Hx6uafNv9/IW7rS6tfNY2A=; b=tAaruXxlQ/ouvtSiCjjJRENCWuOj8QsJnAEfxyOXvl5i1K8VqRgEjJXedsf21jFj97N+Gb 3lst2TanQgW+l1wqr1yAe+1X+2oxqTBRvfa6lINtrUV+Y07BCq8PdQyKeUkfBVzeIbfRXm Ih1Zm0KCFwU+/csUR7K2e8TSdyfWUEEnIZQ4l33h2NHcaYSV7MAjoiZKiwan1OQDUwIXVH bQbCipTK43DW9W8uv2WTNhJedmLfcAtOEPDYc6rcgPiugABtbb50pTH0rK6vPwth48KYEl xc+vXVCeJi/XEctPrCmgIO100ox5NxUsPpoGzwfae+mtfwJSuQtIh3nIJDkopQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704569132; a=rsa-sha256; cv=none; b=DMkyL1S/kzt2uAXnJT0Rfc2oybKpSkFRP7TBRrTvJPBCF3FYx1j/7vaESoGBFgLc0toXCr BHNyyufVA5Ky4G/fbFQr8V6CiY4dCjISHseEdelBkZoPJhi5cb2zbAwjfsiPrOKd0TUjEW LyGcXmwwVHHQlprODAKBkci2E2X4cU+Z65JwwSZTU3zZ/xJ+p+B02JuBx+IdTgz8LGY70+ Rpv4dDMzKIhb9hnMmVvFDMQ7vNeAvTPkefnBEn7rXJf4kvR1t4FpETQEk1vvZIB9ShxPQj gQ9FSclQcaixkEWcYUcBBCILzf1s0nr9rJ0ZQJkkFsytjK/to7U7PYncnDadJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6qzc2jDKztB2; Sat, 6 Jan 2024 19:25: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 406JPWMZ065202; Sat, 6 Jan 2024 19:25:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406JPW5N065198; Sat, 6 Jan 2024 19:25:32 GMT (envelope-from git) Date: Sat, 6 Jan 2024 19:25:32 GMT Message-Id: <202401061925.406JPW5N065198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marius Strobl Subject: git: 1d15c4548576 - stable/13 - tcp_info: Add and export more FreeBSD-specific fields List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1d15c4548576763843ea7268e494bf6015758ef8 Auto-Submitted: auto-generated The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=1d15c4548576763843ea7268e494bf6015758ef8 commit 1d15c4548576763843ea7268e494bf6015758ef8 Author: Marius Strobl AuthorDate: 2023-08-22 18:12:59 +0000 Commit: Marius Strobl CommitDate: 2024-01-06 01:15:23 +0000 tcp_info: Add and export more FreeBSD-specific fields This change adds struct tcp_info fields corresponding to the following struct tcpcb ones: - snd_una - snd_max - rcv_numsacks - rcv_adv - dupacks Note that while both tcp_fill_info() and fill_tcp_info_from_tcb() are extended accordingly, no counterpart of rcv_numsacks is available in the cxgbe(4) TOE PCB, though. Sponsored by: NetApp, Inc. (originally) (cherry picked from commit dc485b968ddeb070d23354f55164a8c336acf081) Conflicts (due tue missing 945f9a7c): sys/netinet/tcp.h --- sys/dev/cxgbe/tom/t4_tom.c | 4 ++++ sys/netinet/tcp.h | 11 ++++++++++- sys/netinet/tcp_usrreq.c | 5 +++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index b1982341f4d5..2939ec9b5564 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -737,9 +737,13 @@ fill_tcp_info_from_tcb(struct adapter *sc, uint64_t *tcb, struct tcp_info *ti) ti->tcpi_snd_ssthresh = GET_TCB_FIELD(tcb, SND_SSTHRESH); ti->tcpi_snd_cwnd = GET_TCB_FIELD(tcb, SND_CWND); ti->tcpi_rcv_nxt = GET_TCB_FIELD(tcb, RCV_NXT); + ti->tcpi_rcv_adv = GET_TCB_FIELD(tcb, RCV_ADV); + ti->tcpi_dupacks = GET_TCB_FIELD(tcb, T_DUPACKS); v = GET_TCB_FIELD(tcb, TX_MAX); ti->tcpi_snd_nxt = v - GET_TCB_FIELD(tcb, SND_NXT_RAW); + ti->tcpi_snd_una = v - GET_TCB_FIELD(tcb, SND_UNA_RAW); + ti->tcpi_snd_max = v - GET_TCB_FIELD(tcb, SND_MAX_RAW); /* Receive window being advertised by us. */ ti->tcpi_rcv_wscale = GET_TCB_FIELD(tcb, SND_SCALE); /* Yes, SND. */ diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 16307161e6ac..25a02f1b4319 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -398,8 +398,17 @@ struct tcp_info { u_int32_t __tcpi_received_e0_bytes; u_int32_t __tcpi_received_ce_bytes; + u_int32_t __tcpi_total_tlp; /* tail loss probes sent */ + u_int64_t __tcpi_total_tlp_bytes; /* tail loss probe bytes sent */ + + u_int32_t tcpi_snd_una; /* Unacked seqno sent */ + u_int32_t tcpi_snd_max; /* Highest seqno sent */ + u_int32_t tcpi_rcv_numsacks; /* Distinct SACK blks present */ + u_int32_t tcpi_rcv_adv; /* Peer advertised window */ + u_int32_t tcpi_dupacks; /* Consecutive dup ACKs recvd */ + /* Padding to grow without breaking ABI. */ - u_int32_t __tcpi_pad[18]; /* Padding. */ + u_int32_t __tcpi_pad[10]; /* Padding. */ }; /* diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 7e9c871df87a..f1c7fbafc210 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1672,6 +1672,11 @@ tcp_fill_info(const struct tcpcb *tp, struct tcp_info *ti) ti->tcpi_snd_rexmitpack = tp->t_sndrexmitpack; ti->tcpi_rcv_ooopack = tp->t_rcvoopack; ti->tcpi_snd_zerowin = tp->t_sndzerowin; + ti->tcpi_snd_una = tp->snd_una; + ti->tcpi_snd_max = tp->snd_max; + ti->tcpi_rcv_numsacks = tp->rcv_numsacks; + ti->tcpi_rcv_adv = tp->rcv_adv; + ti->tcpi_dupacks = tp->t_dupacks; #ifdef TCP_OFFLOAD if (tp->t_flags & TF_TOE) { ti->tcpi_options |= TCPI_OPT_TOE; From nobody Sun Jan 7 00:05:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6yBp6mcgz55sxy; Sun, 7 Jan 2024 00:05: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 4T6yBp4tJ8z4X8H; Sun, 7 Jan 2024 00:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704585938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bx5K3Vz9vzDZdd41OgIDGxiS5pEuxYmb+YtsOc6YPZU=; b=bi50HaRlpNGPD+KZthDhIQsMsWL6UIEqcFIUB9rxzGt94o0+oqWz0MhYvD7wh+88++KAtK GJ9Y7M/zbfl8ERXc8qQkTvP2E4Z1Vb9jNsJ/9EaAwBj3X+w27ZjSoG6o6ZpoyYgTluwl5c Ut/tgNbOIcdJW7fxKXNjSBDhNrpOP/3jRbBEdOeHLdGBUoIkjGnHVm9cypZWx8axzJ9A9m Cg/pT7dUSC/BwBLdja1937t85uysNOzJii9++GSnkAvz8esvbS6zXxW8GHCQT45TWlBuu2 JNMjEZTaKdQPn48SRvcx495yy1iyKy5gEJ7u5feZT/3fUeBjWnQwAsnBFxIa/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704585938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bx5K3Vz9vzDZdd41OgIDGxiS5pEuxYmb+YtsOc6YPZU=; b=YuqferJ1AP7Q6oqnr6UdZLWPpD7BjJWDkfiCIeZjySbM7iYlXUGbCftcFzdrdCWoLi/Xr5 2uyRJBJDhPuBVRgZguO3AVDnY8msCTfE60QzyGhjl2K9+Yh3v1w8axhxbWqZ+249J1FD3O chydo1dr2iNry0tNHAoS7GmqtJqg/gpxjCwZUMvKinAsPhex1UXCB3MwCnhl/c5SNl4g1A UX1PVu9sUpSd1DyFyLMJhRZhVJaeOHBr2FaiUWaOOGYL4hw+D9+oy/UQEdovolMidQgMz3 XluYUGnCWB4o7VvEKvvgLdLMmaduszHa2MCmVfn2287j6JrnX1xw6aVsQ1nkMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704585938; a=rsa-sha256; cv=none; b=rdFHPpkBIkMiUoHI23FJqqCP5BU912Xt8+qm8Aeso31qJviiaDTuqXRi4fULIS47R8LIS9 3wNzvGTA+mYpvOqgrKN5/nPgys21qMJYPhTSVplmVMT27Y++h+xklfSfLD4l7M5Zu9Qg8D FTK4swKH8Nr2db+JOyOrscIw3z4QSS3daGCfBvqtvreas46sWJVJWpRRNVXuySZfm/AI8j Oaovsbgak+yjrs1rubApgmJQu9XAMS5uSYCz53gkLlY7H1XKWp9f46qmR50hM79mP2iTHs b5bXuU1v4NzRVaUN8zuP/MWvVurHuPS3k5UE0Lxuq4e0AsMslWlYv6UhoxZZ2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6yBp3xtcz129h; Sun, 7 Jan 2024 00:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40705c81035111; Sun, 7 Jan 2024 00:05:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40705cvv035108; Sun, 7 Jan 2024 00:05:38 GMT (envelope-from git) Date: Sun, 7 Jan 2024 00:05:38 GMT Message-Id: <202401070005.40705cvv035108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 793fc5e396dd - stable/14 - Cirrus CI: Only trigger amd64-gcc12 on pull requests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 793fc5e396dddefac5531a7d52c8d07401c88c22 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=793fc5e396dddefac5531a7d52c8d07401c88c22 commit 793fc5e396dddefac5531a7d52c8d07401c88c22 Author: Jose Luis Duran AuthorDate: 2023-10-06 12:13:26 +0000 Commit: Ed Maste CommitDate: 2024-01-06 23:27:10 +0000 Cirrus CI: Only trigger amd64-gcc12 on pull requests Since Cirrus Labs is limiting their free usage tier [1], limit gcc CI runs to pull requests only. [1]: https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/ (cherry picked from commit 57b9a104a26d0761c4cba5726f0ab78b50a57ded) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3086ee23262b..1b25914c0062 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -81,7 +81,7 @@ task: TOOLCHAIN_PKG: ${TOOLCHAIN} EXTRA_MAKE_FLAGS: -s - name: amd64-gcc12 World and kernel build and boot smoke test (FreeBSD repo) - only_if: $CIRRUS_REPO_FULL_NAME == 'freebsd/freebsd-src' + only_if: $CIRRUS_REPO_FULL_NAME == 'freebsd/freebsd-src' && $CIRRUS_BRANCH =~ 'pull/.*' env: TARGET: amd64 TARGET_ARCH: amd64 From nobody Sun Jan 7 00:05:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6yBq6NT3z55sm1; Sun, 7 Jan 2024 00:05: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 4T6yBq5s8Bz4XP3; Sun, 7 Jan 2024 00:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704585939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9GePY5z7zGygoofTq/455f/TLwKTvzGefNyqRisoig=; b=k+Yjk86CigzKGAb4YkRAxQ8zcsFj9JZSIGnoqqrfM01qGloaos7cSEsvfs7Kta2e5k/68Z NAGkEg8NZnkyFCzkC/SxvESuebvsmipsO5tXZYP88SNqBBgS3Z6+oqjh/Xjj16bND0XKuF Q+0qyRgJqP0JOCiilB0EzWRqoqHKJ+IE7+rFqzuuGgAVbORb22JDGvck6+H5BQ/E/A+d9j WyaO/SUSYxNP5dWMafdVmeugXq5r5zXltPe0602826Fz2XS7/4Db+Tire4Vz2tZ7osSTmW hAY7tdOIa0pDNRBYVsQuxDolzIyFldlKVuUOSMRGfx3h02p3txoy3TcenyzLTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704585939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9GePY5z7zGygoofTq/455f/TLwKTvzGefNyqRisoig=; b=bE1P1dTc1BFSslKR5fgD+WvG0fZRcvUcSEoqlOjhCxjGgEdfRwEwZoaOVqtl+HHgnhv6jx 0iZgcj82AJvBIjOoxR7qOQ9rt6tdxew0USZ3tbL2VnHwh+xbw/4Ma2hhupL5bqf3sAAzlR 725LkB8geLG7Zvb6N8xNJk3GToCh57c3DWCexqr23VnIBT0W6vTHxvJwO0MKlkjfMsW3QC ngTitcR26VjTXqZ/iRUidlv4Ch8FgepD3KrWvOxvQ5HbunCqFAlRAUNF98el/9zf0g/Bt1 vU/l5GiDVjr9va9HisymlRLk6OuhOTdjhWhojCkTmLBkJqHj/+PssYq5uuOLNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704585939; a=rsa-sha256; cv=none; b=l0K6xVAOYLPOgj98V4vOYgzIbmqaRi7yuqiPjQVgDDYS4YkrMEv1f8/LYcK+e2BSL9k7Zi rno1kWG8oc4UJCDNwrs5QLChQHj9Io608R7YYz/Vk1SyFTkXZppkQY9JI7kRk+dotCAGIu HFlCQ6RC2BUHjTyGO/MJmLn6UfHeDlxnMNnxCWYUrhU2XgnRHMaVvvtOD6u/o2swhw2SNc rXTlauz0pqHgMzU9MUfOym50B45Uyy37XFFj8Tr9tb3D8dxHct6xFBe/eYPY1daat8GZtF FBfCybSKP1iC0IRU8FPJusA94MymDuoAuZy2EbjuZeUaVbu6YO/VVx23vGjbTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6yBq4xssz12c5; Sun, 7 Jan 2024 00:05: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 40705dZN035166; Sun, 7 Jan 2024 00:05:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40705dZO035163; Sun, 7 Jan 2024 00:05:39 GMT (envelope-from git) Date: Sun, 7 Jan 2024 00:05:39 GMT Message-Id: <202401070005.40705dZO035163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2d729060f352 - stable/14 - Cirrus-CI: fix git usage by build user List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2d729060f352cee1b476390d9610db842beb5e9f Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2d729060f352cee1b476390d9610db842beb5e9f commit 2d729060f352cee1b476390d9610db842beb5e9f Author: Brooks Davis AuthorDate: 2023-12-05 19:03:35 +0000 Commit: Ed Maste CommitDate: 2024-01-06 23:27:10 +0000 Cirrus-CI: fix git usage by build user The git checkout it owned by root, but builds are run as "user". git refuses to operate in such an environment unless the directory is trusted so make "user" trust it. Fixes CI after 99b8c0c35b0fcc633649209621243d678a13542a. Sponsored by: DARPA Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42903 (cherry picked from commit 663e4fa38fe835056b24058acc6e43e4a15a84c5) --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1b25914c0062..317c5b28230d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -97,9 +97,10 @@ task: - gpart show - df -m - pkg --version - - pw useradd user + - pw useradd -n user -m - mkdir -p /usr/obj/$(pwd -P) - chown user:user /usr/obj/$(pwd -P) + - su user -c "git config --global --add safe.directory $(pwd -P)" build_world_script: - su user -c "make -j$(sysctl -n hw.ncpu) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld" From nobody Sun Jan 7 01:27:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T701J1RBZz564hG; Sun, 7 Jan 2024 01: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 4T701J0xJ9z4gG7; Sun, 7 Jan 2024 01: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=1704590852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y1fwz2N0Gqacru6SJXywm1IO5MowPsVvsCqspi9QyFQ=; b=GiTzjJC+o3EIDbDCdebEAAzHc3aPq/cf4HUCq42+YZX+boytjm2tsreoJZGJVCOTY1xI5X r2U02wwNj1dS6VsfAnVZDACRXqmPv8HF/We9YRohVlWHxglOj7GTXn7X+6jkGuBlqWIROY nU6xmeTacqdlkgEz4RO49x6KnIKFz1Q0faIbiEygqEMT+kl/dE5wIp2gBZxKiRLFu3oP6M r1aUccm0nt6f4VxLpgj1gn/t4zpCutPB17gEFEed6MAopKo491L/WkMawyf/M5hMecRmOJ 9zaFRT/J6aMRWaYkoIXBkLv+iSXvo8cjJPCUI4ylBWNuyqlD4GtknVgdS0Nvng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y1fwz2N0Gqacru6SJXywm1IO5MowPsVvsCqspi9QyFQ=; b=eDJVwyUb4qKZPolmXD6ngmh3NiJB7ysOVDu5VFUIs6Xxb5/jIHxDzPdFcgAJ7JJRnrclX6 TaZqAGlOUwnWEckHJIFbnw88Aakg52pL3lvRqhcAgYXUhcuNLIKFYqAZ0miyxhK+XWjI0e LsceQPAmqkk7ds0uGawf1dz8CDnNJ0PeOwSyqUcn8+rG+KBlTXkETLMt35Mwcgpmme0eAQ ivGdxwJr4foq+HFT1r7bNptpvD0EPdhGvSNfDZ/DUqKoGyZpbirGL6PmhBGpPvybspHAl9 OHzUerPglY0UE8il1oT92v0//imTaLIJWkoj+QN8RahPIxAfoMWGPOyNjPSxfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704590852; a=rsa-sha256; cv=none; b=FivLYddlgucwk/k+9YCG3PUlZMcP9fpQRUamM3QL4pPFvnL6htVcRjpr9wJzNlTzb7aJ9w iGr6qfWWr9/OEw4gEU9e6Vp9qjurX3EBJxZK7wgHXBc5KV3XscfmtaovqTeMZ1egf9zqnA nN8GUXbA+iWvgf8ZSFr5PznlDQE7YhVWgilh6dm8xqgF7m8OXnJbTh/jW/CZh/NntgsIjE PesT+rlTCEULg+a8OEcKlDaxIqpet+bAvWG64bIqEJ/lHa33hde/kgfM3t7hZqjqHKeGXQ wNovrxofQ+YxRoGNx4lzZxt+Lr+9XHG4Y/2HMktzsIMxziAvw6+QZFkKszVcAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T701J00DCz140h; Sun, 7 Jan 2024 01:27: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 4071RVXu068853; Sun, 7 Jan 2024 01:27:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4071RV06068850; Sun, 7 Jan 2024 01:27:31 GMT (envelope-from git) Date: Sun, 7 Jan 2024 01:27:31 GMT Message-Id: <202401070127.4071RV06068850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 1cf8528fec85 - stable/14 - freebsd-update: handle directories changing to files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1cf8528fec85a965baa5df2d8852166437af88a6 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1cf8528fec85a965baa5df2d8852166437af88a6 commit 1cf8528fec85a965baa5df2d8852166437af88a6 Author: Ed Maste AuthorDate: 2023-09-12 02:59:30 +0000 Commit: Ed Maste CommitDate: 2024-01-07 01:27:17 +0000 freebsd-update: handle directories changing to files Further to f6d37c9ca13f ("freebsd-update: handle file -> directory on upgrade"), handle the reverse case of a directory changing to a file. We may not encounter this case on upgradess (before freebsd-update is retired) but it is needed to support rollback. PR: 273950 Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41945 (cherry picked from commit c0f52443166ae7ecd512ab0350469d9c3648788c) --- usr.sbin/freebsd-update/freebsd-update.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index f5289e1cd9fc..7408ef1c6721 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2899,6 +2899,15 @@ backup_kernel () { set +f } +# Check for and remove an existing directory that conflicts with the file or +# symlink that we are going to install. +dir_conflict () { + if [ -d "$1" ]; then + echo "Removing conflicting directory $1" + rm -rf -- "$1" + fi +} + # Install new files install_from_index () { # First pass: Do everything apart from setting file flags. We @@ -2919,6 +2928,7 @@ install_from_index () { -m ${PERM} ${BASEDIR}/${FPATH} ;; f) + dir_conflict "${BASEDIR}/${FPATH}" if [ -z "${LINK}" ]; then # Create a file, without setting flags. gunzip < files/${HASH}.gz > ${HASH} @@ -2931,6 +2941,7 @@ install_from_index () { fi ;; L) + dir_conflict "${BASEDIR}/${FPATH}" # Create a symlink ln -sfh ${HASH} ${BASEDIR}/${FPATH} ;; @@ -2967,10 +2978,14 @@ install_delete () { rmdir ${BASEDIR}/${FPATH} ;; f) - rm ${BASEDIR}/${FPATH} + if [ -f "${BASEDIR}/${FPATH}" ]; then + rm "${BASEDIR}/${FPATH}" + fi ;; L) - rm ${BASEDIR}/${FPATH} + if [ -L "${BASEDIR}/${FPATH}" ]; then + rm "${BASEDIR}/${FPATH}" + fi ;; esac done < killfiles From nobody Sun Jan 7 01:27:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T701K3MNWz564hH; Sun, 7 Jan 2024 01:27: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 4T701K1tj0z4gLq; Sun, 7 Jan 2024 01:27:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZzC13alyBeRj7ktIqW/1cmwwA+5aWUpXOUuQMlYDSfc=; b=yXohEzduOVI9bCiX2ie4V3nAiKvF/IvbiqqMtRjk4qUZfTZkiSb1aUlQXoAa86U7sDGU5p v1cdLUydKiwdykLdf6EMxG2deXAFkQzyYwJiVH1A+dZWNbg0GXhQVHB73RHPsVW8mt8160 mvkMhYh49rD8PN0OI37CDEzfGdCjUkNuAtEW3QFhQDQ2jjHZybnXl0hIPz2Q66PAl4RKQv yQhy7tzDiMX3O/N443ngqF44vhdKRQMFREGXtGOfgcUk46SW1EN0/21NEXcApDnLDIGV12 j31n7eDntlV52Jkph36380vFUQG6Xkqn5sTejKtn00bHZd4wPmezOPTSwGOMQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZzC13alyBeRj7ktIqW/1cmwwA+5aWUpXOUuQMlYDSfc=; b=CJph5Lu7e8Sh757HS6HEnKpSoE3ctdwixy4G7tFsyykhdkMaV/id8G/7NcfTZigXmAMZjD 20aBVEsvH/sQBuVNjMivUAmMmICkUGZEG+q/IJegfFj8Gl5VMMKlK+h9gbihnalWW5+SLW UGJOibXRRsgnDSy3QFKv1am7CMeqNwQykT5+tfYqnqAwBkjMjo4Wh9qKO09Tlz35Q0NKgh Atf9y1fIrD9mk2DG6F/KtJT9ETd6Vl0YhU819y8preMWac7C4E/EZk4VyyygwZaWwm8h34 fearrLzOLLCpYRDiyYC2bsHyO7petA3wiv2mGy/RC8pE8KQgvs65FQ8TrFhP7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704590853; a=rsa-sha256; cv=none; b=erVxEBb6SzOKixFL1bt+ioWnqC31fvdrbMbGCsHwhSYIkwO0mqoBBF/jH8IKwFlH8nxMXj V4/F76gtggQFVYQSXc0dKugwWK92Gn6Jf79RL3hj9VJ3Mt1pbaRE4UBP6jmj148eygK+EF S6fMVeVr65GghcpJ6DtcWPk95oOLjwempCRKsBLi8MK79fA0pQgEdQotjVvE678c/kH160 OM6QoA7gz2e31c9uuZFaZ/TTcGAbyMv0S3HLKsmyWEXmea8zQPHQRdUIW5UZnxGNO4m9nn ZXSNC4ja/hY0fBwZP6DUmEE6333xKVtLowKzxY2ie/HjpPJHwHR8ILc23jWMlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T701K0zJgz14h7; Sun, 7 Jan 2024 01:27: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 4071RX06068892; Sun, 7 Jan 2024 01:27:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4071RXAW068889; Sun, 7 Jan 2024 01:27:33 GMT (envelope-from git) Date: Sun, 7 Jan 2024 01:27:33 GMT Message-Id: <202401070127.4071RXAW068889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 692c0a2e80c1 - stable/14 - lastcomm: improve timestamp display List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 692c0a2e80c1df7e401c803bebe165923044e223 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=692c0a2e80c1df7e401c803bebe165923044e223 commit 692c0a2e80c1df7e401c803bebe165923044e223 Author: Michael Paepcke AuthorDate: 2023-07-27 08:28:50 +0000 Commit: Ed Maste CommitDate: 2024-01-07 01:27:18 +0000 lastcomm: improve timestamp display Adjust the lastcomm command to output timestamps with a precision of seconds. Reported by: Dr. Andreas Longwitz Reviewed by: emaste Relnotes: Yes Sponsored by: DSS Gmbh Pull Request: https://github.com/freebsd/freebsd-src/pull/802 (cherry picked from commit 6f4ce7e89ba4fa52566704533920352aa65c7f9b) --- usr.bin/lastcomm/lastcomm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index bcd84b2ed37a..b97755e7bb03 100644 --- a/usr.bin/lastcomm/lastcomm.c +++ b/usr.bin/lastcomm/lastcomm.c @@ -191,7 +191,7 @@ main(int argc, char *argv[]) localtime(&ab.ac_btime)); (void)printf(" %s", buf); } else - (void)printf(" %.16s", ctime(&ab.ac_btime)); + (void)printf(" %.19s", ctime(&ab.ac_btime)); } /* exit time (starting time + elapsed time )*/ @@ -203,7 +203,7 @@ main(int argc, char *argv[]) localtime(&t)); (void)printf(" %s", buf); } else - (void)printf(" %.16s", ctime(&t)); + (void)printf(" %.19s", ctime(&t)); } printf("\n"); } From nobody Sun Jan 7 01:27:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T701L38qdz564pH; Sun, 7 Jan 2024 01:27: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 4T701L2Gszz4g5p; Sun, 7 Jan 2024 01:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVoAOXP4hACL/JfP0eC7Jrs+57jvr3aX84cXLBNHjvM=; b=ZqaF3OezDydlJMob0zG2+2RMrKtfzneU8ECTuUJ913LkHE7Wfhyz57YaaTNtN8YPxSr1S+ +zGopzb0LZAGs9UtAAHx7PJGK6aqvFotWbVhJjnYI+jneYyh45h/u+MgTmluk1Z5M3YT5u saGEA1MM4lLM7jmFDe63IICkCvigyJ1Qxuzsu1lOnJWBlWL0Bh9HVAMHMrYsADFyh9Ns2f hBfey/7y5I9WT/vMc0vLJlZPCQzLDdhGaE/4k3C0fFEpfDAvPaLurDgVZtmTDRJQTNmbQQ OXg1bwvsrUzq4kjm63fsdkJGD8RvbjWqD5w2fDId3dgh5cvAr9xXrMkvf32+LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVoAOXP4hACL/JfP0eC7Jrs+57jvr3aX84cXLBNHjvM=; b=DpdPMAJZgeeTjlpSioTbAhqNk7EReEQmm6PkvwMUNtXnV3NTFbJmwLC/C1wv5HRJXB7o9P PvjHLb1c6oTTIteYoKlXaJT+UotzQoz90BgHxLlaE80gYVlCYlY7yTz+mxj4AEAFRRhbcG Sej5FbsQElSU8RMR/lfWuqyhbSIcKrfw7OJo3CPY5xk1G9UIInLVlkqv52go/rnU/Run1K pv388NsKypCsVx/7NWrac4qQw49Y0T6QSSjStPhjC4EeRDFDqyF7IoHMhEhe92Ysio+r/A wAqUUz1IRIMyk6eC8D4da6oqY+GHX2tHjxOIwJhnwqzFyaMeUPhnI+CwpFn0/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704590854; a=rsa-sha256; cv=none; b=UOlOUkU8qylYyu5gq1+UZaqCic8B59PPE185oXZExbQYtjLBP8+Pv3dPfQ/4Jn6XvF/nHt 3lQPPEWMNX66RDTmtkeOHs+3NmHL0FM9dJWR8Tn4FYUYS47BRJ06BoVzaETn/f26Q1xtJb gJvLNqJcsBb101exP4g5efZ9dGvOA5A31tyJNxRMAjOhFQsRpXTXzXKY1a/YC37k5x3D34 nLjx5wDnL4fVBwYsIXkOepLG4Lu1N75yy3TBfdlT7QVfHrIYZEZVVW0C3nojmKQ6MlE1Vm DVMdYYtlUT7DYLNHv8bcRjEvBkcDAQ4rpHl1Ylv9hgMpzAy7q7rktaBBaA/rOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T701L1NJqz14bj; Sun, 7 Jan 2024 01:27: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 4071RY1x068954; Sun, 7 Jan 2024 01:27:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4071RYHc068951; Sun, 7 Jan 2024 01:27:34 GMT (envelope-from git) Date: Sun, 7 Jan 2024 01:27:34 GMT Message-Id: <202401070127.4071RYHc068951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 99d97cf3ae16 - stable/14 - lastcomm: update amd64 and i386 tests for additional timestamp resolution List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 99d97cf3ae1659441b96bf9a6d12f38998ead312 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=99d97cf3ae1659441b96bf9a6d12f38998ead312 commit 99d97cf3ae1659441b96bf9a6d12f38998ead312 Author: Ed Maste AuthorDate: 2023-09-22 17:51:34 +0000 Commit: Ed Maste CommitDate: 2024-01-07 01:27:18 +0000 lastcomm: update amd64 and i386 tests for additional timestamp resolution Fixes: 6f4ce7e89ba4 ("lastcomm: improve timestamp display") Sponsored by: The FreeBSD Foundation (cherry picked from commit f079ef5b6a3c6d8800724286675199f79b553ccb) (cherry picked from commit 407e2d7cf1b6762c9768eaff60500b8d007cd81c) --- usr.bin/lastcomm/tests/v1-amd64.out | 56 ++++++++++++++++++------------------- usr.bin/lastcomm/tests/v1-i386.out | 56 ++++++++++++++++++------------------- usr.bin/lastcomm/tests/v2-amd64.out | 56 ++++++++++++++++++------------------- usr.bin/lastcomm/tests/v2-i386.out | 56 ++++++++++++++++++------------------- 4 files changed, 112 insertions(+), 112 deletions(-) diff --git a/usr.bin/lastcomm/tests/v1-amd64.out b/usr.bin/lastcomm/tests/v1-amd64.out index bacbd57cdecf..a71556d771ca 100644 --- a/usr.bin/lastcomm/tests/v1-amd64.out +++ b/usr.bin/lastcomm/tests/v1-amd64.out @@ -1,28 +1,28 @@ -core -FDX root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -core -DX root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -cc - root 0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 11:44 -ld - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -as - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -cc1 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.234 es Wed May 16 11:44 -diff - root 0.203 secs 0.203 us 0.000 sy 0.234 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 11:44 -dd - root 0.016 secs 0.000 us 0.016 sy 0.016 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 3.016 es Wed May 16 11:44 -sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 1.938 es Wed May 16 11:44 -find - root 0.250 secs 0.031 us 0.219 sy 1.938 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 3.062 es Wed May 16 11:44 -egrep - root 3.031 secs 3.031 us 0.000 sy 3.062 es Wed May 16 11:44 -time - root 0.000 secs 0.000 us 0.000 sy 0.188 es Wed May 16 11:44 -awk - root 0.172 secs 0.172 us 0.000 sy 0.188 es Wed May 16 11:44 -accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44 +core -FDX root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +core -DX root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +cc - root 0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 11:44:38 +ld - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +as - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +cc1 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +time -F root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:38 +time - root 0.000 secs 0.000 us 0.000 sy 0.234 es Wed May 16 11:44:38 +diff - root 0.203 secs 0.203 us 0.000 sy 0.234 es Wed May 16 11:44:38 +time - root 0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 11:44:37 +dd - root 0.016 secs 0.000 us 0.016 sy 0.016 es Wed May 16 11:44:37 +time - root 0.000 secs 0.000 us 0.000 sy 3.016 es Wed May 16 11:44:34 +sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Wed May 16 11:44:34 +time - root 0.000 secs 0.000 us 0.000 sy 1.938 es Wed May 16 11:44:33 +find - root 0.250 secs 0.031 us 0.219 sy 1.938 es Wed May 16 11:44:33 +time - root 0.000 secs 0.000 us 0.000 sy 3.062 es Wed May 16 11:44:29 +egrep - root 3.031 secs 3.031 us 0.000 sy 3.062 es Wed May 16 11:44:29 +time - root 0.000 secs 0.000 us 0.000 sy 0.188 es Wed May 16 11:44:29 +awk - root 0.172 secs 0.172 us 0.000 sy 0.188 es Wed May 16 11:44:29 +accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44:29 diff --git a/usr.bin/lastcomm/tests/v1-i386.out b/usr.bin/lastcomm/tests/v1-i386.out index 91a7d166eee9..e30c5c7cfc2c 100644 --- a/usr.bin/lastcomm/tests/v1-i386.out +++ b/usr.bin/lastcomm/tests/v1-i386.out @@ -1,28 +1,28 @@ -core -FDX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 -core -DX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 -cc - root 0.000 secs 0.000 us 0.000 sy 0.469 es Fri May 18 08:34 -ld - root 0.000 secs 0.000 us 0.000 sy 0.109 es Fri May 18 08:34 -as - root 0.000 secs 0.000 us 0.000 sy 0.047 es Fri May 18 08:34 -cc1 - root 0.016 secs 0.016 us 0.000 sy 0.203 es Fri May 18 08:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -123456789012345 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.359 es Fri May 18 08:34 -diff - root 0.312 secs 0.297 us 0.016 sy 0.359 es Fri May 18 08:34 -time - root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34 -dd - root 0.016 secs 0.000 us 0.016 sy 0.031 es Fri May 18 08:34 -time - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 08:34 -sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 08:34 -time - root 0.000 secs 0.000 us 0.000 sy 3.406 es Fri May 18 08:34 -find - root 0.266 secs 0.062 us 0.203 sy 3.406 es Fri May 18 08:34 -time - root 0.000 secs 0.000 us 0.000 sy 5.047 es Fri May 18 08:33 -egrep - root 4.984 secs 4.984 us 0.000 sy 5.047 es Fri May 18 08:33 -time - root 0.000 secs 0.000 us 0.000 sy 0.484 es Fri May 18 08:33 -awk - root 0.453 secs 0.453 us 0.000 sy 0.453 es Fri May 18 08:33 -accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:33 +core -FDX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34:08 +core -DX root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34:08 +cc - root 0.000 secs 0.000 us 0.000 sy 0.469 es Fri May 18 08:34:07 +ld - root 0.000 secs 0.000 us 0.000 sy 0.109 es Fri May 18 08:34:08 +as - root 0.000 secs 0.000 us 0.000 sy 0.047 es Fri May 18 08:34:08 +cc1 - root 0.016 secs 0.016 us 0.000 sy 0.203 es Fri May 18 08:34:07 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +1234567890123456 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +time - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +123456789012345 - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +ln - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:34:07 +time - root 0.000 secs 0.000 us 0.000 sy 0.359 es Fri May 18 08:34:07 +diff - root 0.312 secs 0.297 us 0.016 sy 0.359 es Fri May 18 08:34:07 +time - root 0.000 secs 0.000 us 0.000 sy 0.031 es Fri May 18 08:34:07 +dd - root 0.016 secs 0.000 us 0.016 sy 0.031 es Fri May 18 08:34:07 +time - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 08:34:04 +sleep - root 0.000 secs 0.000 us 0.000 sy 3.000 es Fri May 18 08:34:04 +time - root 0.000 secs 0.000 us 0.000 sy 3.406 es Fri May 18 08:34:00 +find - root 0.266 secs 0.062 us 0.203 sy 3.406 es Fri May 18 08:34:00 +time - root 0.000 secs 0.000 us 0.000 sy 5.047 es Fri May 18 08:33:55 +egrep - root 4.984 secs 4.984 us 0.000 sy 5.047 es Fri May 18 08:33:55 +time - root 0.000 secs 0.000 us 0.000 sy 0.484 es Fri May 18 08:33:55 +awk - root 0.453 secs 0.453 us 0.000 sy 0.453 es Fri May 18 08:33:55 +accton - root 0.000 secs 0.000 us 0.000 sy 0.000 es Fri May 18 08:33:55 diff --git a/usr.bin/lastcomm/tests/v2-amd64.out b/usr.bin/lastcomm/tests/v2-amd64.out index 3942b04ad3c7..4fcf219eef7d 100644 --- a/usr.bin/lastcomm/tests/v2-amd64.out +++ b/usr.bin/lastcomm/tests/v2-amd64.out @@ -1,28 +1,28 @@ -core -FDX root 0.002 secs 0.000 us 0.002 sy 0.009 es Thu May 17 05:57 -core -DX root 0.005 secs 0.000 us 0.005 sy 0.010 es Thu May 17 05:57 -cc - root 0.005 secs 0.000 us 0.005 sy 0.652 es Thu May 17 05:57 -ld - root 0.014 secs 0.005 us 0.009 sy 0.150 es Thu May 17 05:57 -as - root 0.005 secs 0.000 us 0.005 sy 0.078 es Thu May 17 05:57 -cc1 - root 0.024 secs 0.008 us 0.016 sy 0.347 es Thu May 17 05:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 05:57 -1234567890123456 - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57 -ln - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 05:57 -1234567890123456 - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57 -ln - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.013 es Thu May 17 05:57 -123456789012345 - root 0.002 secs 0.000 us 0.002 sy 0.010 es Thu May 17 05:57 -ln - root 0.003 secs 0.000 us 0.003 sy 0.003 es Thu May 17 05:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.246 es Thu May 17 05:57 -diff - root 0.223 secs 0.164 us 0.060 sy 0.243 es Thu May 17 05:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.079 es Thu May 17 05:57 -dd - root 0.076 secs 0.000 us 0.076 sy 0.076 es Thu May 17 05:57 -time - root 0.004 secs 0.000 us 0.004 sy 3.006 es Thu May 17 05:57 -sleep - root 0.002 secs 0.000 us 0.002 sy 3.002 es Thu May 17 05:57 -time - root 0.003 secs 0.000 us 0.003 sy 9.945 es Thu May 17 05:57 -find - root 0.822 secs 0.055 us 0.767 sy 9.942 es Thu May 17 05:57 -time - root 0.003 secs 0.000 us 0.003 sy 3.313 es Thu May 17 05:57 -egrep - root 3.247 secs 3.247 us 0.000 sy 3.310 es Thu May 17 05:57 -time - root 0.003 secs 0.000 us 0.003 sy 0.185 es Thu May 17 05:57 -awk - root 0.163 secs 0.156 us 0.007 sy 0.164 es Thu May 17 05:57 -accton - root 0.002 secs 0.000 us 0.002 sy 0.019 es Thu May 17 05:57 +core -FDX root 0.002 secs 0.000 us 0.002 sy 0.009 es Thu May 17 05:57:17 +core -DX root 0.005 secs 0.000 us 0.005 sy 0.010 es Thu May 17 05:57:17 +cc - root 0.005 secs 0.000 us 0.005 sy 0.652 es Thu May 17 05:57:16 +ld - root 0.014 secs 0.005 us 0.009 sy 0.150 es Thu May 17 05:57:17 +as - root 0.005 secs 0.000 us 0.005 sy 0.078 es Thu May 17 05:57:17 +cc1 - root 0.024 secs 0.008 us 0.016 sy 0.347 es Thu May 17 05:57:17 +time - root 0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 05:57:16 +1234567890123456 - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57:16 +ln - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57:16 +time - root 0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 05:57:16 +1234567890123456 - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57:16 +ln - root 0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57:16 +time - root 0.003 secs 0.000 us 0.003 sy 0.013 es Thu May 17 05:57:16 +123456789012345 - root 0.002 secs 0.000 us 0.002 sy 0.010 es Thu May 17 05:57:16 +ln - root 0.003 secs 0.000 us 0.003 sy 0.003 es Thu May 17 05:57:16 +time - root 0.003 secs 0.000 us 0.003 sy 0.246 es Thu May 17 05:57:16 +diff - root 0.223 secs 0.164 us 0.060 sy 0.243 es Thu May 17 05:57:16 +time - root 0.003 secs 0.000 us 0.003 sy 0.079 es Thu May 17 05:57:16 +dd - root 0.076 secs 0.000 us 0.076 sy 0.076 es Thu May 17 05:57:16 +time - root 0.004 secs 0.000 us 0.004 sy 3.006 es Thu May 17 05:57:13 +sleep - root 0.002 secs 0.000 us 0.002 sy 3.002 es Thu May 17 05:57:13 +time - root 0.003 secs 0.000 us 0.003 sy 9.945 es Thu May 17 05:57:03 +find - root 0.822 secs 0.055 us 0.767 sy 9.942 es Thu May 17 05:57:03 +time - root 0.003 secs 0.000 us 0.003 sy 3.313 es Thu May 17 05:57:00 +egrep - root 3.247 secs 3.247 us 0.000 sy 3.310 es Thu May 17 05:57:00 +time - root 0.003 secs 0.000 us 0.003 sy 0.185 es Thu May 17 05:57:00 +awk - root 0.163 secs 0.156 us 0.007 sy 0.164 es Thu May 17 05:57:00 +accton - root 0.002 secs 0.000 us 0.002 sy 0.019 es Thu May 17 05:57:00 diff --git a/usr.bin/lastcomm/tests/v2-i386.out b/usr.bin/lastcomm/tests/v2-i386.out index e09fd71b811d..7200c1f9dfe8 100644 --- a/usr.bin/lastcomm/tests/v2-i386.out +++ b/usr.bin/lastcomm/tests/v2-i386.out @@ -1,28 +1,28 @@ -core -FDX root 0.000 secs 0.000 us 0.000 sy 0.005 es Fri May 18 12:13 -core -DX root 0.002 secs 0.000 us 0.002 sy 0.005 es Fri May 18 12:13 -cc - root 0.002 secs 0.000 us 0.002 sy 0.048 es Fri May 18 12:13 -ld - root 0.028 secs 0.019 us 0.009 sy 0.028 es Fri May 18 12:13 -as - root 0.002 secs 0.002 us 0.000 sy 0.002 es Fri May 18 12:13 -cc1 - root 0.016 secs 0.016 us 0.000 sy 0.016 es Fri May 18 12:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 12:13 -1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 -time - root 0.001 secs 0.001 us 0.000 sy 0.002 es Fri May 18 12:13 -1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 12:13 -123456789012345 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 -ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.425 es Fri May 18 12:13 -diff - root 0.423 secs 0.392 us 0.031 sy 0.424 es Fri May 18 12:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.028 es Fri May 18 12:13 -dd - root 0.025 secs 0.000 us 0.025 sy 0.026 es Fri May 18 12:13 -time - root 0.001 secs 0.000 us 0.001 sy 3.002 es Fri May 18 12:13 -sleep - root 0.001 secs 0.000 us 0.001 sy 3.001 es Fri May 18 12:13 -time - root 0.001 secs 0.000 us 0.001 sy 0.250 es Fri May 18 12:13 -find - root 0.248 secs 0.078 us 0.171 sy 0.249 es Fri May 18 12:13 -time - root 0.001 secs 0.000 us 0.001 sy 6.724 es Fri May 18 12:12 -egrep - root 6.680 secs 6.680 us 0.000 sy 6.722 es Fri May 18 12:12 -time - root 0.001 secs 0.000 us 0.001 sy 0.450 es Fri May 18 12:12 -awk - root 0.448 secs 0.448 us 0.000 sy 0.449 es Fri May 18 12:12 -accton - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:12 +core -FDX root 0.000 secs 0.000 us 0.000 sy 0.005 es Fri May 18 12:13:04 +core -DX root 0.002 secs 0.000 us 0.002 sy 0.005 es Fri May 18 12:13:04 +cc - root 0.002 secs 0.000 us 0.002 sy 0.048 es Fri May 18 12:13:03 +ld - root 0.028 secs 0.019 us 0.009 sy 0.028 es Fri May 18 12:13:04 +as - root 0.002 secs 0.002 us 0.000 sy 0.002 es Fri May 18 12:13:04 +cc1 - root 0.016 secs 0.016 us 0.000 sy 0.016 es Fri May 18 12:13:03 +time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 12:13:03 +1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13:03 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13:03 +time - root 0.001 secs 0.001 us 0.000 sy 0.002 es Fri May 18 12:13:03 +1234567890123456 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13:03 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13:03 +time - root 0.001 secs 0.000 us 0.001 sy 0.002 es Fri May 18 12:13:03 +123456789012345 - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13:03 +ln - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:13:03 +time - root 0.001 secs 0.000 us 0.001 sy 0.425 es Fri May 18 12:13:03 +diff - root 0.423 secs 0.392 us 0.031 sy 0.424 es Fri May 18 12:13:03 +time - root 0.001 secs 0.000 us 0.001 sy 0.028 es Fri May 18 12:13:03 +dd - root 0.025 secs 0.000 us 0.025 sy 0.026 es Fri May 18 12:13:03 +time - root 0.001 secs 0.000 us 0.001 sy 3.002 es Fri May 18 12:13:00 +sleep - root 0.001 secs 0.000 us 0.001 sy 3.001 es Fri May 18 12:13:00 +time - root 0.001 secs 0.000 us 0.001 sy 0.250 es Fri May 18 12:13:00 +find - root 0.248 secs 0.078 us 0.171 sy 0.249 es Fri May 18 12:13:00 +time - root 0.001 secs 0.000 us 0.001 sy 6.724 es Fri May 18 12:12:53 +egrep - root 6.680 secs 6.680 us 0.000 sy 6.722 es Fri May 18 12:12:53 +time - root 0.001 secs 0.000 us 0.001 sy 0.450 es Fri May 18 12:12:53 +awk - root 0.448 secs 0.448 us 0.000 sy 0.449 es Fri May 18 12:12:53 +accton - root 0.001 secs 0.000 us 0.001 sy 0.001 es Fri May 18 12:12:53 From nobody Sun Jan 7 01:27:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T701M3l3Fz564m4; Sun, 7 Jan 2024 01:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T701M2sgjz4g65; Sun, 7 Jan 2024 01:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+6dcCK1UmT6iD0Bmwxph/p31gyvxIaKqxxhDFutwlXY=; b=eV0l6OZb+ZneURDpU3zcyEqwFqFDtQMLviLrL2vzqFkEaxaobUPJgBKTGZQPHKHb7kp25Z 6zAjYFJ9vvehCu3aw9ZSFnvr6ByKd5yl4d1Xwf6ucwkQAlDBLrH9ozRUjgUOirJuWmvptF SYQyFVo+DZdsgoh+JOM0/trjvl5cSwPXj97T7pEu53SkPmMOZonmMTV3tZgdqNlg0gWSEA NGE8lt4HluBmoFMKWDzDzboaZfsWH+rP1ChuF7JPvyVU2f8ktK/BRMtCEsEUfe58iO/4Fm cHfUvoDj6Ugs05MwoXnnXLTHD0cI8jacMNzEP9H9SnNE+wnBKwmKH192HTF+OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+6dcCK1UmT6iD0Bmwxph/p31gyvxIaKqxxhDFutwlXY=; b=fBccXrL8SD7WDzR9RPebHkZo8wdpeOXiS0yA53qJqxpZ43bftENP8L19GBaHZTnDtWDZ9n hhQmvUsKvqFO7ravf14Z0zUi8zL1n97nmmwgBM8z1oEFeeq3hZe5v0i9pjxnao+Inpsqp3 6d4kbdjvFgSLbMkaKUKXbKan8xAl/E0Je/yd42f935GpgsHK+T+kJ5ZsxUfidkD13Yq7nO i7sssObLdzA4OLZSmPvSFUuatCzgQ1r+z95s2G7Rku0VdOLZrl0tQp2YDraBYDaxNr+7hQ ZTF89qFHEauDA7ZA9/lk4CBz5OdMHgFywU72H7kT8rjyeXGiAxOSTfwbjm+6Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704590855; a=rsa-sha256; cv=none; b=VI0pRZkfhd648Z9koT70SuwXJK3lNJJwMtsuR477jIjekwOjAprRx9ZDlq8sIDCuH4zaCB mMKyhTEGzxHS6lbUgqOIJqVlGZmdReonqCh17nGzlk/0dI3EaNLUE/MGo2+zGoSfwnhI3M fTFZl/C/eSuvuFmdMwcHMj+ccgywk9qj90A2sVKBOVhXuw2GcvD6whLLJwiBMARnZhWKG1 h9XjcJCG6Xr1PHY0EQnc2AQs8Dp/nP8VxjzG0Bo24fu1133Iu+R+DYrYMQ/TnICfgZraom IXSl6mTfn7+GgrmzUR1KaanyxGuWuCIaX3ycnwOdBQ+BvWGNYh84UdeuuKOY6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T701M1yV1z149g; Sun, 7 Jan 2024 01:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4071RZU4069002; Sun, 7 Jan 2024 01:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4071RZiV068999; Sun, 7 Jan 2024 01:27:35 GMT (envelope-from git) Date: Sun, 7 Jan 2024 01:27:35 GMT Message-Id: <202401070127.4071RZiV068999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f326e5af071f - stable/14 - capsicum(4): add cross-ref to capsicum_helpers(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f326e5af071f3d7108f66e57d35fe8e99f1285e0 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f326e5af071f3d7108f66e57d35fe8e99f1285e0 commit f326e5af071f3d7108f66e57d35fe8e99f1285e0 Author: Ed Maste AuthorDate: 2024-01-03 18:31:55 +0000 Commit: Ed Maste CommitDate: 2024-01-07 01:27:18 +0000 capsicum(4): add cross-ref to capsicum_helpers(3) Sponsored by: The FreeBSD Foundation (cherry picked from commit c3786ca8bc5ba471edae059393bb7bac6400ac2a) --- share/man/man4/capsicum.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/capsicum.4 b/share/man/man4/capsicum.4 index 1ad4548a9784..3c3eab5d798b 100644 --- a/share/man/man4/capsicum.4 +++ b/share/man/man4/capsicum.4 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 19, 2022 +.Dd January 3, 2024 .Dt CAPSICUM 4 .Os .Sh NAME @@ -117,6 +117,7 @@ Processes can only act upon their own process ID with syscalls such as .Xr shm_open 2 , .Xr write 2 , .Xr cap_rights_get 3 , +.Xr capsicum_helpers 3 , .Xr libcasper 3 , .Xr procdesc 4 .Sh HISTORY From nobody Sun Jan 7 01:27:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T701N5Pmfz564hT; Sun, 7 Jan 2024 01:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T701N3ljpz4gPg; Sun, 7 Jan 2024 01:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yFx7r1gi8vdo1pSonot4BnKSfy8yjDT9NeONOQDYgAI=; b=HLcNIQlJDR91PIhFc7h/35+u5EkUfiYKN4a/cGTl1BrU4EXVGepvBoiow+K9HT/sHz0JuZ 7/EnC77ogboh7S/lKkKhTRvUNjd9i8SyoY/I8T129VP5CEJ9LipxGcSRbzZdypedRxIywJ ln9ZwLAlID6ir65JQZfRaI2yVuy8SpEHDxdd/ZTWrA11iyJXxc6kSdrWvN71j2vk5msz/O upF+UfNKHZGks8ptjB7rsew+bOBsBzD8itIQP//eQEpvOQsULE+hWw7RL8IbGseQ7ndqpz H7D5R0jqFgB48hZtViTXae4WZgErVHTSkAmnRItJN5m783nskArTq1ELOs6aRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704590856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yFx7r1gi8vdo1pSonot4BnKSfy8yjDT9NeONOQDYgAI=; b=ABmxhT1P92DSXsyCu6YZfzCmuwlT6Ii29dzgso4EMr4UFY9LwgDZy8CbhgJ41F4FLl2Ae1 MRRwRg5OlIjlLkhNFxbS8DAnvUKJdHFdIpmTEchZu6xhGCxKlghfecyVwM0XspRyidpjSF gag62m2WzpoVk5QZsS2EGsqRVRSyKZcyqKomEYPmBut0VEtrOHvyqv9RJAQdZQRM8P73uQ al/VIoDlJnMnUIpkOr6X+RybuYNwWLzyJBu0pOCRkBpI/xS5TuYYiXOHxev8gdudgC14xd x/N5r9jGf2nBUwiiKqycIC1HqNJltH+0vzpASbD3UZVLMUNfN9fgyfBE4vRSAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704590856; a=rsa-sha256; cv=none; b=b8XWJviuqfEATt3nDE6wn/BiRFLf6zd3FFFfIBzPypUgfuwkBjOIgr2JSWVeKAhnpqgnL3 8aM4brZSgayU4Ng2QvYIxWGKikpzqRkgorfkbYSu4/Q4WNkAXoB7ARWue+KLFJgn2z7b/4 dqV7JcTXpKipnCJ0p47QsEn3r9rWNu/6cQEyJQh+HrIw0ppJWIWd7MHINawn9HW5iPv3nX ej1UWHz/4wH0ax0H+CL49pYdJjoHyfaU6QAt+E64ZNv/IZl3BEXIkGhfsq0Vjcqy1e/EOm 94PwD8Xp/rdjRegErPxvwcs/eZDzkGLh4nPhDlSNjO/mNYnc9rnMTl3NDxLgDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T701N2s17z14bk; Sun, 7 Jan 2024 01:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4071Radl069057; Sun, 7 Jan 2024 01:27:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4071RaWl069054; Sun, 7 Jan 2024 01:27:36 GMT (envelope-from git) Date: Sun, 7 Jan 2024 01:27:36 GMT Message-Id: <202401070127.4071RaWl069054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8d78e3fe6943 - stable/14 - netlink: fix debug text typo in message parser List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8d78e3fe694393c29dafe89f9a7ebc3a50c73bf2 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8d78e3fe694393c29dafe89f9a7ebc3a50c73bf2 commit 8d78e3fe694393c29dafe89f9a7ebc3a50c73bf2 Author: Igor Ostapenko AuthorDate: 2023-12-18 12:37:36 +0000 Commit: Ed Maste CommitDate: 2024-01-07 01:27:18 +0000 netlink: fix debug text typo in message parser Signed-off-by: Igor Ostapenko Pull-request: https://github.com/freebsd/freebsd-src/pull/942 (cherry picked from commit 66d77e0f73b2b0bb2f4f5aa5699bfab82f0c2f5f) --- sys/netlink/netlink_message_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/netlink_message_parser.c b/sys/netlink/netlink_message_parser.c index 9ff5cdee40b4..bf0140c98120 100644 --- a/sys/netlink/netlink_message_parser.c +++ b/sys/netlink/netlink_message_parser.c @@ -148,7 +148,7 @@ nl_parse_attrs_raw(struct nlattr *nla_head, int len, const struct nlattr_parser if (error != 0) { uint32_t off = (char *)nla - (char *)npt->hdr; nlmsg_report_err_offset(npt, off); - NL_LOG(LOG_DEBUG3, "parse failed att offset %u", off); + NL_LOG(LOG_DEBUG3, "parse failed at offset %u", off); return (error); } } else { From nobody Sun Jan 7 11:42:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7FgN4g49z56pRk; Sun, 7 Jan 2024 11:42: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 4T7FgN3wLJz4L1G; Sun, 7 Jan 2024 11:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yF+wqBFK/c6il6nepxVSBY+r2AwFud3ihKEBfruapoA=; b=mdhrZbaLjgITP9rQk1Oxzn1/4fOtW+uLZPubaTfurR0zp2yFzriBI/fmBeRZLoDYhH6Ssy ATCpOf/ucqLo150xAmIBiVRFawrHn4mDLXHUhSl6U8P8UtHoBpUKBTq96FOTvcjQeVaxn+ qw8Q3Z7HmxfNh9hHkVf+ZoNFDWv7Kn/5xUknhcAlw28YFruu/MpJEx8ZOrO7Up8uaR1Ga0 SBJIilOzqTWAuoL5HXGeMNlMUPXgOrzlSnVH0BVy0NLVMOmacQj2KaRDPYI8ZdcqhIN3CG 73KyIzjEHealyhyU2b4Xvqwkd56CR8g0hVL7VaA2S2nxN0rHXXruXr7m/rI9ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yF+wqBFK/c6il6nepxVSBY+r2AwFud3ihKEBfruapoA=; b=HRtoON3iAQ1Spkq/lBQZ6ZVSKuSINhuQkQllAAYIJLw3heuYzgLD6FJRQec/f2/ysYSfhd oxwrlAl7CDc8JEMnfOcyvuqq5snP08Ga8mdh9/2oa1Wz66RHGLPbtdz+D+QHSRSnt/5m2c f0mc6rumhTp0T4rGBu7R641i1T1cOnV7OHibCsZOTgiX1FiFOBKYhgBo/qnT1sgdTH1dXI e2irCZRsF6jjveGLymHCeHCgbVnya714Bixn44V6ZJLwfMJ182H8GHaYW2RGm8oR6sUNKM FZoyCZIGYhRYcNpBMiusHBhAe8c0hOZNVfI68nhR8Y1J2W/FcveFpvrXY9aLpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627776; a=rsa-sha256; cv=none; b=Z2JWVL+CtkIlQsvNJhnpSQJYyNw8aLsSJBVm0fW+knssxPZuIDmPovOK7LYY3BnrUHMor1 9Oa7hT4oEinxEFUobe9jCtvHasey084JfQMDmow0AAErWWlOg1lOZzgV80YJmNiR8k4kbW DpdOX0WQZ42H0xGf066w4oHO/8mE4R/q6eW5NfWfK7r5ILvdKditePwrzZaBQmdsVBFGpI TYChNsGG9CDOY6Q2j6M0IagwJHy3osG7k79uil9Qd5IpL0fL3CNmQwWprV4itSCilwdU0P fAh3rUa+bDSix5yZdXmxu1Kpgbqatpjr9U9F4Stff7c/KGK+JYRThAvZjbnTxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7FgN2ydxzNNt; Sun, 7 Jan 2024 11:42: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 407BguDD005264; Sun, 7 Jan 2024 11:42:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Bgu94005261; Sun, 7 Jan 2024 11:42:56 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:42:56 GMT Message-Id: <202401071142.407Bgu94005261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ab37ee306bd7 - stable/14 - tail(1): Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab37ee306bd7a6eb94c5662251f9593232b84da4 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=ab37ee306bd7a6eb94c5662251f9593232b84da4 commit ab37ee306bd7a6eb94c5662251f9593232b84da4 Author: Gordon Bergling AuthorDate: 2023-12-27 08:35:38 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:41:20 +0000 tail(1): Fix a typo in a source code comment - s/recieved/received/ (cherry picked from commit c58205be7a7d4eb1c68b169bb7fdb57f1e057cc5) --- usr.bin/tail/forward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index a0f66262608a..a902e006afed 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -407,7 +407,7 @@ follow(file_info_t *files, enum STYLE style, off_t off) /* * In the -F case we set a timeout to ensure that * we re-stat the file at least once every second. - * If we've recieved EINTR, ignore it. Both reasons + * If we've received EINTR, ignore it. Both reasons * for its generation are transient. */ do { From nobody Sun Jan 7 11:42:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7FgP5ZWDz56pcy; Sun, 7 Jan 2024 11:42: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 4T7FgP4yZJz4KZV; Sun, 7 Jan 2024 11:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBpaNd+Z2UnZ5jypdFvSiuSAhHrZxxdAATdGKXcMhbs=; b=jeczSoIhs8YLOUpQEk2S6q1CoLazDAM1VkDf6xKbZLXr1HIXCJpNrcuZ+keUAZ+Kqb+Uex B1ePQCbFbw81MO/okOZE2KasczPVOBwzqTgaNMU5mMzftUfx5GQpRW4wKMET7+O+n2cWyY D6UTF70Lr21gInaUtr6R76uzseY88YpWondEndrR5sSeQojJ33J/EdfXr11vO1j79ePCVU P4A/Lviup3k5YfvEKZsQExfVE8otKv2i4qTdz2L7ZRE9eFrLVStihFvYUPTKhfsVglpcT1 +qpuK7hpHxR0UPPo2ZRWE0XPkAUhltzxLwjGwSHujvf1w3Ct8KPGpNojJLLwzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBpaNd+Z2UnZ5jypdFvSiuSAhHrZxxdAATdGKXcMhbs=; b=fO5eBcTL9YjlrVQjRj2Qnr1xsJFMeyffeI2f9tiyvEXUKBevHex5aaODMBe/gW3Yf+fDgk QJ7TWFnCo0Anljt4pMXcD/XVRZmqZVtYRh7cA8X3LUYP5Sya4pAHKSvYN/bCpm4F8fJZ83 a/KsXhHoO5iFsuKZEihOOgFRhKwHtiTsciYjDfJTBVVDBJnT6ina85xYNGwXo9XunHZVu2 8SG7TMEI53SIIckorJiapMB49EPrt+jAeNf2kNXzqbvKCB/yyVtIF6Lkcfb+OCnIWCZexQ RQXZLCNdTNRXfhi+Cq+NYBn1yBSrtJ/WpQJE7MgZA+Hxmd0mkTdsJWvyDqrNbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627777; a=rsa-sha256; cv=none; b=iARwtRqdoXDHQeTOm/gCIuz/w3kt2cp9JBmTxPkZw+YdmECMkQJURtiXKcmRtbEbP+p/9v GIVx5FAmIxc6F74YiJDQwNU+JXMxuOBnsWl48ntFmsa/nilMm/zusj5rX0pUTVTj+2qGv4 7vSI3+liOZDuK4rJLLktbh5yS4w41g8JqhbekVsPcy1bYX1IeWKo56Kq94R+Xurk2XcrXk mPNhGGAwVAebK3hnqWuuUffv1/37UyhLjloS+iUS8vnpNqGejTkWuxhLxWb8owSHwy4Kmz 0R7wZqhYgPbr55KRBLsZYKk8p8AtxRV6TjhLY2r8pNQ3Hk65oGdxAuCr3/SkYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7FgP41R5zMqs; Sun, 7 Jan 2024 11:42: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 407Bgvpa005319; Sun, 7 Jan 2024 11:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407BgvIA005316; Sun, 7 Jan 2024 11:42:57 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:42:57 GMT Message-Id: <202401071142.407BgvIA005316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 6e98814f35b5 - stable/14 - ipfw(4): Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6e98814f35b565fcc1f561f166f317e878f380cc Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=6e98814f35b565fcc1f561f166f317e878f380cc commit 6e98814f35b565fcc1f561f166f317e878f380cc Author: Gordon Bergling AuthorDate: 2023-12-27 08:38:43 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:41:42 +0000 ipfw(4): Fix a typo in a source code comment - s/preserv/preserve/ (cherry picked from commit f795d5458b2a9ce114b4e177d34705a53824edd2) --- sys/netpfil/ipfw/ip_dummynet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c index 74041653ebfb..b3f52322425f 100644 --- a/sys/netpfil/ipfw/ip_dummynet.c +++ b/sys/netpfil/ipfw/ip_dummynet.c @@ -1732,7 +1732,7 @@ config_sched(struct dn_sch *_nsch, struct dn_id *arg) int i; struct dn_link p; /* copy of oldlink */ struct dn_profile *pf = NULL; /* copy of old link profile */ - /* Used to preserv mask parameter */ + /* Used to preserve mask parameter */ struct ipfw_flow_id new_mask; int new_buckets = 0; int new_flags = 0; From nobody Sun Jan 7 11:42:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7FgR0x5Tz56pXF; Sun, 7 Jan 2024 11:42: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 4T7FgQ6CFbz4Kxs; Sun, 7 Jan 2024 11:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GbKW4901slySUB2g0QPbkWhE4YELIqn1mI2gPDCs754=; b=MC2Js7SbQpXyaOOIEHTrdiPtmFWXmbh9VIn4WwO6xBmY4iAhSOmIa7BQiANSwsTxqtUdM5 kETsFW/swmeZcuvees2oN5KvsJM6Yu2bc3BbStbFSG47eo4PvzHNOyP7DrH6+U2Cfej//I VomSCDHB/cJwOtokm4/NmeO18JzmWET1iGuhnJeRqOZJy+Blr3AJEgNYDJw0rlD1ld0u0S OrzMyG1Y1t1C56d2th3AjCiXPk1AXVrknJOq9bomEF4uBHlemBPqmPpla2DbfQF4pB6mcq SYJXVXDpD+MGZFhfwdmayOmWFmsy3ZbLYU4fZKq/DKsVRg0HnPNXx+v4IOfoRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GbKW4901slySUB2g0QPbkWhE4YELIqn1mI2gPDCs754=; b=bgggtSPSzfo7LCiVSry7RJsoyeAl95mZ2Tw+tuoV5vrxdBHi1+jX5GkmtpHEdwAm+enkfN 0qeoIZTOot7KSEhkhDfleyaQdtzb5MNmrWHaKxfjXWXwuIOepi2MHwL10BA2rRbFnofI75 lQhJYUxLvZ1hFUBwRqppQJ9tB0l/vBBUwAPYLRdx9CUaYy9YUe/7Dbr+gH9xtXMPmWp55/ 8N/UdGV6C1xtMcGfjFtMQTmxCEkbvTdnX9fEDHdtW0dHAeyvAl0bE2RldsSkRW434by1gN ssV2koGpVONXZoVmEattNeAQUm4ZPrNFwb905hquyoR0rLfBF6A6ZlTCGMQfWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627778; a=rsa-sha256; cv=none; b=uunxY92g84QGLgn5MK7Eesedwtkmd+r4WlmzDl5E80TNX6J41W7mtKoOnMB7Cic86IRbmB kNxY3Oa76IDuAmgTyBSRfYbrfK+WVCvEfZn/Qg6vlNBlW/LQC2hg5OVSnje5AxgPhc08CI me6/F0Oxp6KGuRYNrBdI6g/GQ9u5TbpF13QeZ5JuaJMm2gcctn+w7iYl7xPP2g1+h4HZI+ TAs9faJUu+qcYDgALJDNgVrmpmJTr57+UWSOcMA3gkPQdSuGwLRSkPid3MAenh1Qete6i0 p0OCQ5QaqjoVhxwHodfJdxrffN6jdx4enC/hnYH8DXHLGtIKiMBeBoO09m6ixA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7FgQ5HrZzMqt; Sun, 7 Jan 2024 11:42: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 407BgwAQ005373; Sun, 7 Jan 2024 11:42:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Bgwau005370; Sun, 7 Jan 2024 11:42:58 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:42:58 GMT Message-Id: <202401071142.407Bgwau005370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 803570ec2098 - stable/14 - tcp_stacks: Fix two typos in a source code comments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 803570ec2098ddf88d0e0531328e2589dc95299a Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=803570ec2098ddf88d0e0531328e2589dc95299a commit 803570ec2098ddf88d0e0531328e2589dc95299a Author: Gordon Bergling AuthorDate: 2023-12-27 08:36:30 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:42:06 +0000 tcp_stacks: Fix two typos in a source code comments - s/recieved/received/ (cherry picked from commit 7b0b448ba9fd53fb4db81a2309dedfdc47533cfb) --- sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 013bd0982fd3..4a472c5cea66 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -6842,7 +6842,7 @@ bbr_update_rtt(struct tcpcb *tp, struct tcp_bbr *bbr, * Ok its a SACK block that we retransmitted. or a windows * machine without timestamps. We can tell nothing from the * time-stamp since its not there or the time the peer last - * recieved a segment that moved forward its cum-ack point. + * received a segment that moved forward its cum-ack point. * * Lets look at the last retransmit and see what we can tell * (with BBR for space we only keep 2 note we have to keep diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index a6e649f78c10..0dd724399ebd 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -9141,7 +9141,7 @@ rack_update_rtt(struct tcpcb *tp, struct tcp_rack *rack, * Ok its a SACK block that we retransmitted. or a windows * machine without timestamps. We can tell nothing from the * time-stamp since its not there or the time the peer last - * recieved a segment that moved forward its cum-ack point. + * received a segment that moved forward its cum-ack point. */ ts_not_found: i = rsm->r_rtr_cnt - 1; From nobody Sun Jan 7 11:42:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7FgS32LGz56pXG; Sun, 7 Jan 2024 11:43: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 4T7FgS09Ljz4L1m; Sun, 7 Jan 2024 11:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mkqzCXIsnV/AS3c7FwlgvkYwa/lvGt5iWLEAkO1Ikhk=; b=q/ZEHl9M2/ew6M0qElyADtELdw6e4Y2NsaSPR+1t1OPvMSpGaZPfcdMiFIg9H6g2oPTsuB 9+zl/AeMVkU5VC6InJEhkkWDBbQ82PRiQLW1HagAiaEa3SxG/SsbPIjUpU8CspkCGOwM4x 9xGsdcIPIYc2tjCH9SQWy5G6/U2nMZX8urfL3cGODCyibwswH9diMLMrBoJDXb8bsTNete sFREdNyg8GWNyLpJMbMgto47K0kDiLSnR1qXoCMnDmDP/qng72AjsBooHDWA/LgUTE8UlD gtWCUibiiSC8qWIU01LxgdzC8l+7XU2xd9qNMDHemkc/UwevyHWTR+tOBvCWrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mkqzCXIsnV/AS3c7FwlgvkYwa/lvGt5iWLEAkO1Ikhk=; b=GMLhQ1qgItsNqw8qzQRNwgYnOdo0Ng5HFdRSjU58qP5LLc5VOXdDNWTLIHUu5iVlU8UP4J wrZ9ngHOBICdAW8T6gsaRwkmw32ICSB8S4nL3i4TS5KoFtpK3LStXZ+WDGhNeI1ecF2UUr 0BYN9I3HTtPWWtg001rS2yS9/1dSszCqhoNn5AIH5Q/aO96Wu3/KPqPYdeG4BFgrcmiOpr LkgWAG1z4/yIxNw5jyQGZVQrSqp04yYD5hnq5KQ5FqUi7Myp8YT2F5I1kqybOAkccsbzQZ zo8xiEKrFPPLrfg7rHJnH1X8O0ZbEyrFDUeadZ8iudkHbGCKEpg/CFFVzKAEgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627780; a=rsa-sha256; cv=none; b=E9xRqtxLB5nL7Ex01o0oE8cy1osUV1u2Ab7AAvWW+cKvCdOPVYjhhmdFDcKDJs+FDup6kv JbFdswPPpNacuYe3ZxbSUYfFDr1n7xQzYQ7OPDj7B+POgSDCygYwVpKzixiWuLx8w2nG5V ghLvnkNpsdJKwpPVlIVjzxVvf29aILEI/yblhgOJdsjM9qyNUrM6I8Rp8LZqyzyzt5ccsc ghZ88Rog36yDgJvQRyI8Qwal3NIWfXomw+TEyjg8i4uUkpguo+QNsAhWSvqUydxv2R1V/Q 8wyzo6EMNbuWxnR+FTNPncyJUwpgKi7EQ7fLy0vafJBR/4phTAbHNBHzvtQJng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7FgR6NGjzNVZ; Sun, 7 Jan 2024 11:42: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 407Bgx2Y005429; Sun, 7 Jan 2024 11:42:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407BgxIE005426; Sun, 7 Jan 2024 11:42:59 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:42:59 GMT Message-Id: <202401071142.407BgxIE005426@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7f19b9b4580f - stable/14 - gpioevents: Fix a typo in a diagnostic output message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7f19b9b4580faf865e2c5a56cc040693b62c7572 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=7f19b9b4580faf865e2c5a56cc040693b62c7572 commit 7f19b9b4580faf865e2c5a56cc040693b62c7572 Author: Gordon Bergling AuthorDate: 2023-12-27 08:41:48 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:42:25 +0000 gpioevents: Fix a typo in a diagnostic output message - s/recieved/received/ (cherry picked from commit 63c928f17e08f58fd3bd44b45c36ea5df7d15e77) --- tools/test/gpioevents/gpioevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/gpioevents/gpioevents.c b/tools/test/gpioevents/gpioevents.c index f90b4e6ea3eb..f1bc8e8ee224 100644 --- a/tools/test/gpioevents/gpioevents.c +++ b/tools/test/gpioevents/gpioevents.c @@ -456,7 +456,7 @@ run_sigio(bool loop, int handle, const char *file) do { if (sigio == 1) { sigio = 0; - printf("%s: recieved SIGIO on %s\n", getprogname(), + printf("%s: received SIGIO on %s\n", getprogname(), file); run_read(false, handle, file, 0); } From nobody Sun Jan 7 11:43:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7FgT2PtCz56pVB; Sun, 7 Jan 2024 11:43: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 4T7FgT1Bg1z4L4b; Sun, 7 Jan 2024 11:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CC5xTM0dv7ryrf7wK8oXFMcYbAiPQEfiSLjwU79rCGU=; b=Cnz0rCovcf2bpQMR8nb52t+oIiy99p3YSMypJj/gwu2QRE1O5pWfIrWWgpruxsJ0tDeLh/ /7GzxKSwSnD/LbafHYcRK9IP1A32vGPn2dSD+3swFvefET8MhuMtsvPIfhguPxeFypqD6h 2FAtjzBetjtAY/CE/gW7qQWBK1d+Ls8g573u3Vr0k1C+0Fuyv1SMlCcSCMiaqCPgz3iQyu gHGfvZ80Z5jloXjdesgkeC77ebT9+IU8SGpgeerQcxbJzNgSHUJbWhxo5yfTLcAMq81TV2 4S82JLBXhCXa6Efj1ZRu4Lj2+SmR1vFtPn53SJXzXMorVTBFrx/YpRfRYqvnrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CC5xTM0dv7ryrf7wK8oXFMcYbAiPQEfiSLjwU79rCGU=; b=u4bslb96XlPuMSqaFUoFKsQf5RYtqKWltPdVEKlBgZ2PR8Ebld/X5HvzfLx64s2HLWEMcz xn17BRMU5b2Z63g6Gwza3c4kO0wUj2htrIbXHq4XHC5/7pu7C8A0UH78f+QByF8dZCyyeJ 0rTbEQCI1NoTFdnF4YwlKDQtmI/L9ZZUpUoD2Nrl1E9TQ5piMaY6hRkulKt9oOTWDXtNai eUBt4S9l5xcfCq2T064KVAnYwnnjwrv4tc5FLnCziwnODlV6IFsUJ2yxrrmKZDn9jAbAMR CTy0C+k6a7b283Kg0SR/pmuCGDe1iOdZOcWIIBelIfzb5sc2Y+RKUrR3kApapg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627781; a=rsa-sha256; cv=none; b=Y5DnLoOhxW7xhIBpccAle30HoAGZufVDizvbNzkaHjxxtFGZIbBv/mEk41+OwvQDqKRrTm mP3QLaU1AFrHRzbuhq6JQ1ZQZlZff2sD7eLZ21LZc3Yen4t9XKLS3cMssPvym4V2FZqBFw KpMULp5H2aXiiM9sxzJIE3/yHx/spvlMZG4K+L7faem8h3v6ZHtGJvEeoWZ1XYncLELoxF FjrHwM+1tB1eUkch7VxX6Ss/ZGR9o/3j02kOU/CbjZe0voJee7sKB5kVsQJGyX1Td4Xrzh wBK8vghAPt7l1C7dD4TQYic/z8Pn8JFtUCW3BGGgXVxBlxuMxgLveZez/YN51Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7FgT0JPhzNB3; Sun, 7 Jan 2024 11:43: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 407Bh0AH005491; Sun, 7 Jan 2024 11:43:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Bh0m2005487; Sun, 7 Jan 2024 11:43:00 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:43:00 GMT Message-Id: <202401071143.407Bh0m2005487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 06d3ecb09f45 - stable/14 - hvsock: Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 06d3ecb09f452dbdd74119693c7dee400bc1943d Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=06d3ecb09f452dbdd74119693c7dee400bc1943d commit 06d3ecb09f452dbdd74119693c7dee400bc1943d Author: Gordon Bergling AuthorDate: 2023-12-27 08:37:29 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:42:45 +0000 hvsock: Fix a typo in a source code comment - s/recieved/received/ (cherry picked from commit 6dc7bf0c5ce9ce0b77b0f7b9293467babc685abe) --- sys/dev/hyperv/hvsock/hv_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hyperv/hvsock/hv_sock.c b/sys/dev/hyperv/hvsock/hv_sock.c index 440534a5fa9d..3ba4e7f5d4e9 100644 --- a/sys/dev/hyperv/hvsock/hv_sock.c +++ b/sys/dev/hyperv/hvsock/hv_sock.c @@ -762,7 +762,7 @@ out: SOCKBUF_UNLOCK(sb); SOCK_IO_RECV_UNLOCK(so); - /* We recieved a FIN in this call */ + /* We received a FIN in this call */ if (so->so_error == ESHUTDOWN) { if (so->so_snd.sb_state & SBS_CANTSENDMORE) { /* Send has already closed */ From nobody Sun Jan 7 11:45:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Fjp35CHz56pgr; Sun, 7 Jan 2024 11:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Fjp2KWNz4MX6; Sun, 7 Jan 2024 11:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d+n53cPPJoyB1YGyvdW33SCRhNmQOioaQ93iQqhNr5w=; b=qNPor2pnq+Vo9yonutxWjCl4AT1FyvksLQkCph2w8AdQd5WU42Z+1oXU8kvZt9S3BvbgwG 396VnohcK+wfagw2TKyveWvieg0xpXhUsNE8rqrPsNacnM89qrECQ0b/9hyi3pJ8wUx9GV Z/AE3cW9yHKem8c9FRxPS/vguVNgDfMMWu8PT5j3X9wVq9QeAaKKhKwLwgAF9CtkgkAPV4 LS7rLigOVrHLRgedV+Rtu598kTloxgxItwFSYf6mMb/AzM+O38pbtRLcMGgg15OfajWgzO V11nL81lD4pRnxxtZN4gjUHBvj6113GawF9vZPAfIMXnEnNWjKi/3yQqX3ZCKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d+n53cPPJoyB1YGyvdW33SCRhNmQOioaQ93iQqhNr5w=; b=TT+An0Ib/xPxgUDwhPlePPSPP+ev6OgObEeKuDUQmEig2CYtSH45mU0+KdmKIlAe2DGkru z/yiGyKtRVQ9EVV2qDmBv/3Y4l4G1bCqvJkItq3yS8HUF+9D7LUjPk6GtBitouNjFhCg0l uvn+0Ir+870zx5oUsWJWxcABdcDhFk/fJleR/UeGJVTZQ67eyWvpkXCvx82hVh1dDDZpAP uu8Ua7Fj9R7dkxCzYcuTaZHZnMLpe0kb6PQ7xERYBAWKBAbVJ3FW4/xL7uzxn1MvXcgh/u FLJc9Mi5Ryfj8yEKtmF5yawox7Pw5KA3T86XcUYKPyFCA6loviqT6smTiIoTkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627902; a=rsa-sha256; cv=none; b=lfbU9NCSTE1oBq0+4SJsJdKENqb28QpV4VfEXdgBHdxNjLPEvJkxH/80jvpxI2YsI5SCi9 7rr0bCGsWCB0FAngQlWT+lYEo1oOU4MIEP7tbtE8crsrhuQ4H7W2/6dfZuc3qvm+SJK4DQ 3t4YRLX1/rPTCJIrHX80Y0Lro89HH8cOtAY3ZvVRRxb1COpR+bc7Yees/kt30qyWQ/LmVq OoO3W0G/d0fx3q8MQaig5xIfjKlbh8QuccKXkSqNVJeNXWrTCr3hkIFep9odOnKGPXTFx/ XWKqZAUsMQSNJjtwdYcQc0HxH9WYkoT3AfBQ6cIqEj6DRkJ7ax6klERF5y+xkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Fjp1Nb5zNNv; Sun, 7 Jan 2024 11:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407Bj2tY005992; Sun, 7 Jan 2024 11:45:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Bj2Oi005989; Sun, 7 Jan 2024 11:45:02 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:45:02 GMT Message-Id: <202401071145.407Bj2Oi005989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 23e9ada5ef10 - stable/13 - tail(1): Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 23e9ada5ef1009af27ae0ea1061c2b135cb46894 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=23e9ada5ef1009af27ae0ea1061c2b135cb46894 commit 23e9ada5ef1009af27ae0ea1061c2b135cb46894 Author: Gordon Bergling AuthorDate: 2023-12-27 08:35:38 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:43:18 +0000 tail(1): Fix a typo in a source code comment - s/recieved/received/ (cherry picked from commit c58205be7a7d4eb1c68b169bb7fdb57f1e057cc5) --- usr.bin/tail/forward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index a0f66262608a..a902e006afed 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -407,7 +407,7 @@ follow(file_info_t *files, enum STYLE style, off_t off) /* * In the -F case we set a timeout to ensure that * we re-stat the file at least once every second. - * If we've recieved EINTR, ignore it. Both reasons + * If we've received EINTR, ignore it. Both reasons * for its generation are transient. */ do { From nobody Sun Jan 7 11:45:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Fjq4Cwjz56pXf; Sun, 7 Jan 2024 11:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Fjq3Lx0z4MrQ; Sun, 7 Jan 2024 11:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SrTZ2u++6QQkuNKjZrkzQizPS5vRu2Kgf+isulnvr4A=; b=RG4+jmQLyYJd0aGeF/rPu+Ek/jku6X/Wq0iozfolPeScxaQQTrNW5bThyglgK8nvd1puMD pFrJkkLwMzTrMAhNT3cA6y1UO+DiOMzuZoqbsQCsXU9AYaIyq/InogO7x/XyuwzyU7NNQn pBULKOOiC1nDiK8xARAtmJ8ozSKvWRm0/819JGhLo0GWPcKCGO0Q1sPjrpxynm/t+fnu+f uvCXy4iVrEW/vSlT3PspTBGlU4p1WiaHFD7qOAgUhUSD0n+SLoJ52O5OWeqUdngDBkD8Gg l03IEWYm1vs9dnc1Ze9YCrMYPc3ZOcoxnxXIt89M7cu17r0FJ5UeztPm9DC3+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SrTZ2u++6QQkuNKjZrkzQizPS5vRu2Kgf+isulnvr4A=; b=kcsugQ40GNGWOLerbYL8uD3AE8ivSE0PW4tcXaDGshF9gzgInZ6/9wyc18u+a/mPOCIIhd WRel/duHTyxgWML3yfHtLyRSd59qEBVICVcVITJ35l9QfgPMv/4+MhfdUTAu8qtAWH1GX1 mY6Vh8SKtb4cx8xzzgpcUCzTlSTOV4gGbdJ2bIN1XTGP4lmKZhGV2x5l/Zw75L9HcSrEVz dpBtPqhkIlNH7ttI4urWmYkx0KN+CtfogkcGwRR5xwbX+h67RKwUQKniZ7S5ZCa7KHU7Ug LPzHDPOmkddMRc6AF4i8P52drp04dQnptyq0+WJyAa/DIkhPHMtPg/KuRsq+7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627903; a=rsa-sha256; cv=none; b=XS5941GajeNEr0ytj3OxJRAmgAcT8Orq/B9+wkP10Ivvc2KVjSo0yMSDuNI5twkIantp5m CLhiX3fQUJ92lmT1AnH4fFWFZFOj33suWHXP9LqntgoLF2JOP1SuCeSzPBEpSzCrPYCvgZ 3cv6HB71JshWfrogsR+tynDkFUyHIdq9YCE39DPrN559W0tN+ivp/I8ap6vToVcpkx0v0X ub4E3CGY2fj/jdsIMzxAryMvyAlUmZoFOiwyg2DMlB0iXucnTSQ0yVMzEpnMfLf0U4OYc1 quncetkLTq+8IG5QMovpkrEul2eGlzvOQCGQmZMqCLxtaPh26/5iKWxJyzy5Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Fjq2QVczMqv; Sun, 7 Jan 2024 11:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407Bj3Za006046; Sun, 7 Jan 2024 11:45:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Bj3nS006043; Sun, 7 Jan 2024 11:45:03 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:45:03 GMT Message-Id: <202401071145.407Bj3nS006043@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 9d181794c8d8 - stable/13 - ipfw(4): Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9d181794c8d8ee098e99a8f94649328c181052c9 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=9d181794c8d8ee098e99a8f94649328c181052c9 commit 9d181794c8d8ee098e99a8f94649328c181052c9 Author: Gordon Bergling AuthorDate: 2023-12-27 08:38:43 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:43:38 +0000 ipfw(4): Fix a typo in a source code comment - s/preserv/preserve/ (cherry picked from commit f795d5458b2a9ce114b4e177d34705a53824edd2) --- sys/netpfil/ipfw/ip_dummynet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c index 81448565599f..0a46c6bec268 100644 --- a/sys/netpfil/ipfw/ip_dummynet.c +++ b/sys/netpfil/ipfw/ip_dummynet.c @@ -1720,7 +1720,7 @@ config_sched(struct dn_sch *_nsch, struct dn_id *arg) int i; struct dn_link p; /* copy of oldlink */ struct dn_profile *pf = NULL; /* copy of old link profile */ - /* Used to preserv mask parameter */ + /* Used to preserve mask parameter */ struct ipfw_flow_id new_mask; int new_buckets = 0; int new_flags = 0; From nobody Sun Jan 7 11:45:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Fjr5Qn6z56pjk; Sun, 7 Jan 2024 11:45: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 4T7Fjr4Zggz4MXC; Sun, 7 Jan 2024 11:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wgogl73AckCjCmzUTp4T+3H4igbYQJnwlJpSI4iqM3U=; b=EoGuQH81l0rEbeoTAvll0VUoyeFUMxi1ftweRzC+qZdmmpV/CX0Qs/sN7wtBQTU96YNXIl uEVmZR61Lcuv5DBLcsKjxQCSGXfNyGtwutaQ6u+3Z3ICx2bAgM/+WCuSsDzsTJyoMDBAih LDtZYyZ2y0UNWd79MVu9t1wwr/++69Nn28B97ol2LLK38NS8OjrHGQjPSJWAWBSIFajOzY liwLoaV13EHEqxQgREhpImw/TL6yKKcR5reQyy7bUNFU2wt0U5ie5Fogiebe/lGdL62EG8 qZSkSDTBxpfpxsVTr4+N7V1NO379M0kGU3jXPI9BH7s6lJhbrBduLyAPTtvNxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wgogl73AckCjCmzUTp4T+3H4igbYQJnwlJpSI4iqM3U=; b=saJOi24Pj14i60ScCnEiFi+hyuxtdVEfneUp1cWiBeRNyY/yEOJoX1FK4eR6Tz2XAbvp8b 3q48ZyY7gcUHNoy0c+kKkrMOjAl6vEP/b2Un0yCgPOB6TnVUiXZLsXVleO52B4uC5e5oio /eSyCrCtBBXCnzuInkXTaoEkpSDZAOUt1H2lABCMqPuDDpFibZe4NOvITJmNPxmBRtOn4r rctmfI4ACYp+G6boH+a6Mp3u9J4ugAqVDyhuyorguYTUXI74ef+s5rpYfxrfLbLtHFh2dW h0qI9HzPpc+GKyQi2kTxV8r4BwE9S2LDrZAfeTbePsHPGgfh59VBlEWm57Q04g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627904; a=rsa-sha256; cv=none; b=lTcwdLkSZ3UJr3P93w5YjXzy5SUlKVp8U+agxFoCm5HrN9XcJR5geAS9uLdMYd1YKq5ZS9 9rmEOunT6cP0WlIHA+23cBKKOir3/cJhLRNKXhDwdkFE++4cLmKVHbRVfYMS7Wsr3lAcoy zWhWDgRdPMG2WHnUNHPR3O6tUxZfM5kIb0oIZRHyRKiTJOF9BR6eMuKMZGOezOKvelyqTL 8L8YMe6oPrCUtWjLUhGQ2aDL7a0m9/+KlpkW4N5xDaEPogWcE5bbZldn24RHIWm6ex2MzC MHy3+92NEIO4xDpYj+yGt2q+LertWd3+ulHx4hZNOQqyS+YPj2BaHiCRngCMjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Fjr3fVszNQ2; Sun, 7 Jan 2024 11:45: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 407Bj45M006100; Sun, 7 Jan 2024 11:45:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Bj4Lx006097; Sun, 7 Jan 2024 11:45:04 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:45:04 GMT Message-Id: <202401071145.407Bj4Lx006097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 9a9c3e36f1d6 - stable/13 - tcp_stacks: Fix two typos in a source code comments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9a9c3e36f1d663bbf94b15cc453621e07d71c747 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=9a9c3e36f1d663bbf94b15cc453621e07d71c747 commit 9a9c3e36f1d663bbf94b15cc453621e07d71c747 Author: Gordon Bergling AuthorDate: 2023-12-27 08:36:30 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:43:59 +0000 tcp_stacks: Fix two typos in a source code comments - s/recieved/received/ (cherry picked from commit 7b0b448ba9fd53fb4db81a2309dedfdc47533cfb) --- sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index f44e76850dd8..805ffa492c56 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -6889,7 +6889,7 @@ bbr_update_rtt(struct tcpcb *tp, struct tcp_bbr *bbr, * Ok its a SACK block that we retransmitted. or a windows * machine without timestamps. We can tell nothing from the * time-stamp since its not there or the time the peer last - * recieved a segment that moved forward its cum-ack point. + * received a segment that moved forward its cum-ack point. * * Lets look at the last retransmit and see what we can tell * (with BBR for space we only keep 2 note we have to keep diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 019683f9af41..c3a24f4c19b6 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -8008,7 +8008,7 @@ rack_update_rtt(struct tcpcb *tp, struct tcp_rack *rack, * Ok its a SACK block that we retransmitted. or a windows * machine without timestamps. We can tell nothing from the * time-stamp since its not there or the time the peer last - * recieved a segment that moved forward its cum-ack point. + * received a segment that moved forward its cum-ack point. */ ts_not_found: i = rsm->r_rtr_cnt - 1; From nobody Sun Jan 7 11:45:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Fjt0fXxz56pXm; Sun, 7 Jan 2024 11:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Fjs5L8rz4MXS; Sun, 7 Jan 2024 11:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GJfOwFsTJwsNSGE4JV5k2SBlJwy4TVDh+CRJIs1821Q=; b=ubEI6seFjSss+JWNBMcFfI26UpGcSjHUxFYhUMnJMMboOAupxPP/N/7Pl+0eP1tggghldO eWlusblRGDnB5/Q7nIxsz70bkSutqyswqHHRv0ntnI4bKT8foKRMy+OWi3dRMgqAN5o/7h aJop6nlfJAbtyHIWkxVffPDC0VUctkNJfVjMQxxhC9q+dqpPxQyfg4WWX8JL+MPee7zHe+ qQKQirdan6/WpVR1XsY8sxXQ+kuA6SS7SSRaA//4CoYx3zWX0Uic1Ilmucm72HUPsjvZ/I 4QZ5ikw72kWYM0N5eD+oqh7PX4CAEeM3dImh3g9//E0+PiQ45nr8llHmwL9AMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GJfOwFsTJwsNSGE4JV5k2SBlJwy4TVDh+CRJIs1821Q=; b=GyOtWlcmLN4oMh6VDN48kt0e/ykUjjOKaw4BEpS0F11uXKO/a2Cqm+qA11U2SF+ggsfYRS 2Oo/aNiaxQzvXxn83NlC2jbKXx6jy4dj2MnSCQSiHA4+toPj8UfczVAzkSIQb1PXYy0+ss FbjqKWB9C9Dw1IT4XNRSKZGoLODgPBNqVih6ujuSltf4xgyI8pHrZ6bFHHFjlDor+ogZrW wGh3MyZqmkRXRQflNn2baKFexL6Hdb9/c9Dmg/WkBjSjHGu5ASKDa0QYg6SUDqm1WjWf5a 5xBjnlVQjorbJ1AlWFyffzcvpy4yrvr8hzMJ0OArE5rbPmS3dZs4c7zOmUijpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627905; a=rsa-sha256; cv=none; b=h0vJ8WettjAbpFkj601RO6qScHfCoGVuP4MK6yCGwbqZKcvORxcat3q6P3tlmTdWmPSF1g wWP6mA8tmF5hREQQxE33zK40p9NtNJhzPgqZ2NOLr9mgj65PLkRmFNu9VspgkonwKoSd+W ywwVmJAAflxjn5dlG/KZqUjjnqzouNGiHRpFtZ8Uf5+fFghDktLfpOUxtMTTnIN5njXtcj T9vw7DYkSzys2jyq52vFTwtY5YzanTkB11uMhKgBnmO0d6ZvdtSCh4ocXETiKvkLvNw6SC x3d5/8RvUPDnoYftshwcBMxNMCClMUfCkva/aCZYRgh8oSTvfUFiqw9kA9YgQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Fjs4ST3zM7D; Sun, 7 Jan 2024 11:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407Bj5aG006154; Sun, 7 Jan 2024 11:45:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Bj5PK006151; Sun, 7 Jan 2024 11:45:05 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:45:05 GMT Message-Id: <202401071145.407Bj5PK006151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 48aab71d0d2a - stable/13 - gpioevents: Fix a typo in a diagnostic output message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 48aab71d0d2a73eab0cbddd746b7f7dcdecd7532 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=48aab71d0d2a73eab0cbddd746b7f7dcdecd7532 commit 48aab71d0d2a73eab0cbddd746b7f7dcdecd7532 Author: Gordon Bergling AuthorDate: 2023-12-27 08:41:48 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:44:16 +0000 gpioevents: Fix a typo in a diagnostic output message - s/recieved/received/ (cherry picked from commit 63c928f17e08f58fd3bd44b45c36ea5df7d15e77) --- tools/test/gpioevents/gpioevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/gpioevents/gpioevents.c b/tools/test/gpioevents/gpioevents.c index f90b4e6ea3eb..f1bc8e8ee224 100644 --- a/tools/test/gpioevents/gpioevents.c +++ b/tools/test/gpioevents/gpioevents.c @@ -456,7 +456,7 @@ run_sigio(bool loop, int handle, const char *file) do { if (sigio == 1) { sigio = 0; - printf("%s: recieved SIGIO on %s\n", getprogname(), + printf("%s: received SIGIO on %s\n", getprogname(), file); run_read(false, handle, file, 0); } From nobody Sun Jan 7 11:45:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Fjv2hFKz56pVh; Sun, 7 Jan 2024 11: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 4T7Fjv0697z4MXh; Sun, 7 Jan 2024 11:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v2k0EbzJKWhguA8o2f5SMKMSfO/Usfp/X+yXCW9d+50=; b=c34T7cdVVgwp7FgPSNlDjCR2lFzVJp95ks9B6nyPKikmO5bM5mT6Efbs2byG916T4p8DXh W8Bl8P4BEb6qqOPFuH+UOGtSk+nUNH9G0XhCePi08sXGGhBW57QUQ5loouT29mqFEU1E33 OU5TaU6nFMNJOIDPYIEOUxGQMVa9CnXovP/iKmJmoEco2YtnbyZhtbIJiPIr5eeM1sFumQ 7BRoG8Of0RJYtrqNabhokM8P0XOmzfTdckWXJ9obEAkpW9d7Lj2aMy4DI0Fu6zqh6tH94Z RPngcz2uw+rf8EsoBrEiOUTr98kaCwcDk16wbxXdrxdqF7oigeznVsFuVQ5K4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704627907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v2k0EbzJKWhguA8o2f5SMKMSfO/Usfp/X+yXCW9d+50=; b=go1/4JmU4xuslU+CoWl8HyQ1LPLUiohM81R2EIZzJPzfyitFekJqNfT8TMy6lynyPIQm/P pqYQlcPblX3AJg1LkAqAvCN70Vuy9QDAnst90F2wpgeBZkybVBWA5gOqnC8pYh1Rmictaz ZiVzo+g+VvpGNZND/XXYp3sEC0IrcDFFkP3GZnyaUKfEC6Cvs8P6SNIzM9eEu2ZUsCrNYX EMrYViZhb8JXPrXUluVrElMfWX2TDd1thAL6S9MURn+lTc8P0eN83zL1I5Lg2Wf3TtNsxg 8x6w588LFxA172dPh+7vxAJ98C6Exp3rt3aZQe3fzEeasKu/8ifz/kqOWGC+QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704627907; a=rsa-sha256; cv=none; b=HwPPWPQcJf6Gsv6JFq8Y6ESgPPOZqXUtQrThYnBq0zWePtRh5KURVNkSp0Fo8vrHU8H78E yevQWOXH5w3ahZ1D9PDDq55hjaKfXXRKVuTv3jAU6VVTURAuD+EK+fcbXhoqQjaB1djSxU kVQ+5WmM5Hbo/3Z4tb4OLMKzd/BQnlthX8AQ0Pjhe0LHLUDhhI0XClsyQOPgFltqCL9M11 KddK8Xgc7AGA6iqtdcfCAqNZV3t0bDnY0KWdFzHyG7xhEyDQsxyHn7Sk6dB1UQamVeZ+GM NNyTEeEd3fAE1NU4COe5wPNuqUD3PEk2YKvmcshG9/eEpZwXsXNyjmKLnAMQOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Fjt5RWnzNDX; Sun, 7 Jan 2024 11:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407Bj6OT006216; Sun, 7 Jan 2024 11:45:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Bj6oC006213; Sun, 7 Jan 2024 11:45:06 GMT (envelope-from git) Date: Sun, 7 Jan 2024 11:45:06 GMT Message-Id: <202401071145.407Bj6oC006213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 623b96cfe5b3 - stable/13 - hvsock: Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 623b96cfe5b319b2a2143742f76288fb7fa2da64 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=623b96cfe5b319b2a2143742f76288fb7fa2da64 commit 623b96cfe5b319b2a2143742f76288fb7fa2da64 Author: Gordon Bergling AuthorDate: 2023-12-27 08:37:29 +0000 Commit: Gordon Bergling CommitDate: 2024-01-07 11:44:37 +0000 hvsock: Fix a typo in a source code comment - s/recieved/received/ (cherry picked from commit 6dc7bf0c5ce9ce0b77b0f7b9293467babc685abe) --- sys/dev/hyperv/hvsock/hv_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hyperv/hvsock/hv_sock.c b/sys/dev/hyperv/hvsock/hv_sock.c index 587e63b005c3..5910bc50eeac 100644 --- a/sys/dev/hyperv/hvsock/hv_sock.c +++ b/sys/dev/hyperv/hvsock/hv_sock.c @@ -776,7 +776,7 @@ out: SOCKBUF_UNLOCK(sb); SOCK_IO_RECV_UNLOCK(so); - /* We recieved a FIN in this call */ + /* We received a FIN in this call */ if (so->so_error == ESHUTDOWN) { if (so->so_snd.sb_state & SBS_CANTSENDMORE) { /* Send has already closed */ From nobody Sun Jan 7 16:58:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Ng33LLpz55QcT; Sun, 7 Jan 2024 16:58: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 4T7Ng32QBYz4DLM; Sun, 7 Jan 2024 16:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rePK2c1/IihTtl1gijwhOAe8JlkEmzJ+HKaCgzdwZAQ=; b=GNkkHi9gIPPdHjHlSaz6fBMLEZ9oFK9P/9QgYK3dmH92xaN6dlyMmUpjCloH7mhbFLHQ0r UK9cztLPhm9S8qTF368vVuHVMksz2iglpS4rVuF+lJ0IFLf8oErhG7tnDdukXxbOWY5w9f sBnpvCmm9aeXqAZ2SmFLEmwAfLcTvGf1dMD+wZyVhbRLgbw2K6oJr2YXyOVRbPgBq+dr/L gga0hERzXuSH/aIVJDzdAG3Llsj3kQD5Hje7D8STUzZeFXUHYUWMLTejHbYyLSRcIqXaYl kxPZYZVs1rYLhpAlHnHGpXKXrpWhIsZLghlW3dDgEXty3nT1Jdl/mE4GpVSS8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rePK2c1/IihTtl1gijwhOAe8JlkEmzJ+HKaCgzdwZAQ=; b=wdRPaPlioXKDpnssSAAXVPHFWel0CWhLkWAaPQsAHHAiExroYcmBkChwDtCe8lYsK/yMnl Pi+ciH49Z6+HVDLSu2LPrleV2jBuCZ9/zyBrGrSfz0nmUetSbjqn8MrHR1EGw7Nqi76+HC fhR3uY1qMlcWDUw7ZwSjQePPdnrer2rFk3a0bsY46y6t/7RvKqKV3v1XH6GUx4/fMTMWqA 4o/AMVTYJBZral6gspyMoRCYU4iZ+Mu4SOvPd7nxO0I6YWlJ7ckoBge+7z8d7k5FgFfo2X dRCg8zoGEaQbmPdDlau34AgoHrE/no67Hk+4k/rNeGLuWPo5NPqUZ+Gxq33Lbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704646687; a=rsa-sha256; cv=none; b=HvfMzOZhxVAeln972EfxPa8/JsuEi3pgvU/tU5W9gFOwyLrxdiGYMSoMadKMVIWOYGpnEJ mwvnaiCExBZt5nijC1UshLeJKYyPUZ66YIqOOalVo/NCH/3+ScZ7LFQ/bhpcLlYJgCsB7L MsQ53o+mBAQljmcGHRFHi7TQbZ/8QEbI3a73qkiEqOkO9mZKUVWIB87zWVA6RA/mn0aOyT wNTGVOorvKYM5v9pziTYaUYRcZrvUmYEptkzSbJlpSlgJeS6QjXSZ91TfsUQpcyoC91yZh I7LQYxRuS+J9xZ5AZZXxUFk2zHN8Qw2CFZ9nLLgnX5DJxEK3ksHbJ08kI4bc+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Ng31KhgzXg0; Sun, 7 Jan 2024 16:58: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 407Gw7Xv028961; Sun, 7 Jan 2024 16:58:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Gw7E8028958; Sun, 7 Jan 2024 16:58:07 GMT (envelope-from git) Date: Sun, 7 Jan 2024 16:58:07 GMT Message-Id: <202401071658.407Gw7E8028958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 213077d6e404 - stable/14 - frag6: Drop unneeded casts from malloc calls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 213077d6e40446090f8055d5d92f18808adc0819 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=213077d6e40446090f8055d5d92f18808adc0819 commit 213077d6e40446090f8055d5d92f18808adc0819 Author: Mark Johnston AuthorDate: 2023-12-31 16:15:22 +0000 Commit: Mark Johnston CommitDate: 2024-01-07 16:55:32 +0000 frag6: Drop unneeded casts from malloc calls No functional change intended. MFC after: 1 week (cherry picked from commit f12a9a4c041a4dbce7dccc85aa5fad155e137d7e) --- sys/netinet6/frag6.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 82d4239777da..a3a6e7eca14a 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -588,8 +588,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) goto dropfrag; /* Allocate IPv6 fragement packet queue entry. */ - q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FRAG6, - M_NOWAIT | M_ZERO); + q6 = malloc(sizeof(struct ip6q), M_FRAG6, M_NOWAIT | M_ZERO); if (q6 == NULL) goto dropfrag; #ifdef MAC @@ -715,8 +714,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) } /* Allocate an IPv6 fragement queue entry for this fragmented part. */ - ip6af = (struct ip6asfrag *)malloc(sizeof(struct ip6asfrag), M_FRAG6, - M_NOWAIT | M_ZERO); + ip6af = malloc(sizeof(struct ip6asfrag), M_FRAG6, M_NOWAIT | M_ZERO); if (ip6af == NULL) goto dropfrag; ip6af->ip6af_mff = (ip6f->ip6f_offlg & IP6F_MORE_FRAG) ? true : false; From nobody Sun Jan 7 16:58:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Ng43TKqz55Qp9; Sun, 7 Jan 2024 16:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Ng42wf9z4DNR; Sun, 7 Jan 2024 16:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5d+Sol2mtBKJiK0s3Cc7uVBEEbauhL/y0GklwrRl68A=; b=rlqmulJdHKpW9pEANQfTHRhjilhvdEmLskkiYtA3hLbK3eT5IOYKEbanIf9mSxr7BU/mJK SA9gJx2Sz5ez1uGj73zQzDYwYuhUwHQLPHktiKgzx/SI7tjH2L6J8Z3yE7yTJOg3bFNuOF Y8W35xUJF0tlqagQETFSRrRS7kuGmklEsksreyoFUC78s75d35dvlW610XPlxUzH/tAMUC BzHUcxhKMFkpb6ERaTiMbUY1Fn2bGHxEwyGXpYHV4d41tuRdtXYmaUV7eCS7KO1JB/7ZtH 3AuCJTSi0IJOWqjzk4xkOKPijLC/sEfh80OI36c/q26qYGBlYQzou28Pv0bzlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5d+Sol2mtBKJiK0s3Cc7uVBEEbauhL/y0GklwrRl68A=; b=C3ySAFW4wEIL/9NyBnOf0Asl9CTCn1U5/dlLuQVus7+gog426OTlG8hokUTBtRChyQA1Ox qLqmZqml+OwZdVPLQ85A4wG33wYWVYFH35TkiRgjPMBBJ+Ou5YHGgSmzLspf4mZbnR0E9m OKK3mtewMJdFEFxNuhnBoq9xzp6EO97frLypA22hH66JaBFSiXjwDQ6WpPSpkHjAvaDPZq vAiKcEDoOTWBZ7igU7aeQUFMkzRcD0mCv667aPBVAqafJcGTt8CXpXykVXXBTMgWtsKtgj SWoOc/Legmjf23wiz+l2M2Ox+hWPJenMgfJhiXB6MsiEfK/5jmyOrrU8R2qZsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704646688; a=rsa-sha256; cv=none; b=S97IWc65vdtcDUptT0Lt4HXbOIaSQejlSpsmGjeAchjan8M2Z2GB5IjAts+IqqAOwKRI5f aVwfEv0OHVd3Q7lPcsiAwXEiReluKG3R7J8N8trUqC2sy1ibf9Jl2AQbbIccv3ef4pyhsX EsYaRqi5CI98z39UVQRAid6asN+NhBTxgZBDlr5/nstgV29DwbRfu0W5mNZ0FE5d8FX9CY FNYPUGBcyfr99R5Xib7zwBSaMqs2j4+1tHiyngkoUcZRQy/MyWaFtvJ4+T4i1tIolW/XJq EwchmCmIZnW+FKa146dkQRKDaeppcS+f5bawkh0ocC2ZGx8YuAismL0AqtrUuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Ng41y94zXWf; Sun, 7 Jan 2024 16:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407Gw8Y9029007; Sun, 7 Jan 2024 16:58:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Gw8jZ029004; Sun, 7 Jan 2024 16:58:08 GMT (envelope-from git) Date: Sun, 7 Jan 2024 16:58:08 GMT Message-Id: <202401071658.407Gw8jZ029004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e4ca8864c2f3 - stable/14 - frag6: Reduce code duplication List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e4ca8864c2f34ee583483c2c50f2821a565e2b28 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e4ca8864c2f34ee583483c2c50f2821a565e2b28 commit e4ca8864c2f34ee583483c2c50f2821a565e2b28 Author: Mark Johnston AuthorDate: 2023-12-31 16:15:48 +0000 Commit: Mark Johnston CommitDate: 2024-01-07 16:55:40 +0000 frag6: Reduce code duplication The code which removes a fragment queue from the per-VNET hash table was duplicated three times. Factor it out into a function. No functional change intended. Reviewed by: kp, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43228 (cherry picked from commit 0736a38072b52204289c669770a34d0b801a8a7e) --- sys/netinet6/frag6.c | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index a3a6e7eca14a..fbdbc3ef2f28 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -288,6 +288,20 @@ ip6_deletefraghdr(struct mbuf *m, int offset, int wait __unused) return (0); } +static void +frag6_rmqueue(struct ip6q *q6, uint32_t bucket) +{ + IP6QB_LOCK_ASSERT(bucket); + + TAILQ_REMOVE(IP6QB_HEAD(bucket), q6, ip6q_tq); + V_ip6qb[bucket].count--; +#ifdef MAC + mac_ip6q_destroy(q6); +#endif + free(q6, M_FRAG6); + atomic_subtract_int(&V_frag6_nfragpackets, 1); +} + /* * Free a fragment reassembly header and all associated datagrams. */ @@ -324,14 +338,8 @@ frag6_freef(struct ip6q *q6, uint32_t bucket) free(af6, M_FRAG6); } - TAILQ_REMOVE(IP6QB_HEAD(bucket), q6, ip6q_tq); - V_ip6qb[bucket].count--; atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); -#ifdef MAC - mac_ip6q_destroy(q6); -#endif - free(q6, M_FRAG6); - atomic_subtract_int(&V_frag6_nfragpackets, 1); + frag6_rmqueue(q6, bucket); } /* @@ -637,15 +645,8 @@ frag6_input(struct mbuf **mp, int *offp, int proto) if (q6->ip6q_unfrglen >= 0) { /* The 1st fragment has already arrived. */ if (q6->ip6q_unfrglen + fragoff + frgpartlen > IPV6_MAXPACKET) { - if (only_frag) { - TAILQ_REMOVE(head, q6, ip6q_tq); - V_ip6qb[bucket].count--; - atomic_subtract_int(&V_frag6_nfragpackets, 1); -#ifdef MAC - mac_ip6q_destroy(q6); -#endif - free(q6, M_FRAG6); - } + if (only_frag) + frag6_rmqueue(q6, bucket); IP6QB_UNLOCK(bucket); icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset - sizeof(struct ip6_frag) + @@ -654,15 +655,8 @@ frag6_input(struct mbuf **mp, int *offp, int proto) return (IPPROTO_DONE); } } else if (fragoff + frgpartlen > IPV6_MAXPACKET) { - if (only_frag) { - TAILQ_REMOVE(head, q6, ip6q_tq); - V_ip6qb[bucket].count--; - atomic_subtract_int(&V_frag6_nfragpackets, 1); -#ifdef MAC - mac_ip6q_destroy(q6); -#endif - free(q6, M_FRAG6); - } + if (only_frag) + frag6_rmqueue(q6, bucket); IP6QB_UNLOCK(bucket); icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset - sizeof(struct ip6_frag) + From nobody Sun Jan 7 16:58:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Ng54skNz55QcY; Sun, 7 Jan 2024 16:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Ng53XqBz4DNj; Sun, 7 Jan 2024 16:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CwDUCI0RqLF9U2bwq35WBIl+5ohJ++SgtQbH+zc3AU0=; b=n2ozK3E6Tufqy2iolPtskd1Q4y6Jp9/x6988+WhAVHldn/htcmJoPzbjedmkpfLXovkNUY VdrtfYwc/OTMUlT9OpfULXmrI+JYEEYGSeDZ9K3iO4zEO8CRAZLwHcwa+QXpPBujcmf/1I lF8Yaoz+0WCDKbs/I2GPihCvF0SGWYzg4IegvQqM7K4GYj/+Vy7w/hB/8cce3Q1FNzEtSp wBg1e5bkCs/lj5kzqnbNVJASHZIVgVZIZNny5knqitMMzU8iFmRejxfzrNZ4Uq7upCq7zp Zb8jOLenYA7D/Y4zG4B62315QP3lPHcLy8DRqR8tBUq8J41cQpF9Gsuwaqk9kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CwDUCI0RqLF9U2bwq35WBIl+5ohJ++SgtQbH+zc3AU0=; b=iL+hEZP5ZcbjeILG148ft0T34vxwUZqJIrdr05G7+p5AesQkFLUJpHAb8cSZXm+MvT9NXE L1V+wQCAKYz1p2X0TaePSdI/iF+rorX7ERq3jZRAnq2JrOkUbfmpRCPTVamue09Sl+CAVM T1xxt+RX0GRm4Cb+dJKp0KyKK5qXSwskwrFF8UT5sKeLe38g8XzHxVOcEW7bgSz24YcpZM 91lNyB9ov3YcrPQyi7YJ8T9VgfPUj8s196/XtX/ZRQD4h2K1W6S87by08LyrwCTAOBEShE p1OmIqR8+mvxI/kSAmBG6Wdkyc/jvywfGjJ3NRSW39QqPMWaJe/NulufCshJEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704646689; a=rsa-sha256; cv=none; b=jaZDzzCN2+sS9YrdedfqyZomA7Iqpj+3WM1c8tpgxc3joPoQUyQnN7e6YMMcXfQmkn+HBm i5wzAW+Kc4RlQFRnjiB+4h40O6oNbCh3Qr66R+ovRncAtxv0SfKroln/YGP2uewHBDcOOV 6UgGsYMprs5H+CYIewOwWWMuknHTUjlnvqSLfT0AOhFMx01BSOOCRqwtM/kqXRwAPxz9uN S0Edy132m0Lumnj5DwpDCQX7Q3P77z1ELxYa+uSf0An0mn8mwZmvKVk1NUjzILc2PUHzNK jTeCjPSBMV89+ICx7vVI8/cyvJJlzuQPKgj7vt3P18Va04CNCYLqPlPK5D1k9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Ng52blKzYCq; Sun, 7 Jan 2024 16:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407Gw9xT029043; Sun, 7 Jan 2024 16:58:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Gw96Z029040; Sun, 7 Jan 2024 16:58:09 GMT (envelope-from git) Date: Sun, 7 Jan 2024 16:58:09 GMT Message-Id: <202401071658.407Gw96Z029040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2646268eabb2 - stable/14 - frag6 tests: Serialize List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2646268eabb2026b14497baed7b26d5b3659fabc Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2646268eabb2026b14497baed7b26d5b3659fabc commit 2646268eabb2026b14497baed7b26d5b3659fabc Author: Mark Johnston AuthorDate: 2023-06-18 18:14:43 +0000 Commit: Mark Johnston CommitDate: 2024-01-07 16:55:48 +0000 frag6 tests: Serialize I'm not sure exactly why, but these tests consistently fail when run in parallel. Serialize them for now. MFC after: 1 week (cherry picked from commit 8b57b2a98b641794538980aed2cd16c94aedaf4d) --- tests/sys/netinet6/frag6/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/netinet6/frag6/Makefile b/tests/sys/netinet6/frag6/Makefile index f3eef9305a16..d1661060368b 100644 --- a/tests/sys/netinet6/frag6/Makefile +++ b/tests/sys/netinet6/frag6/Makefile @@ -29,6 +29,8 @@ ATF_TESTS_SH= \ frag6_19 \ frag6_20 +TEST_METADATA+= is_exclusive=true + ${PACKAGE}FILES+= frag6.subr ${PACKAGE}FILES+= sniffer.py ${PACKAGE}FILES+= frag6_01.py From nobody Sun Jan 7 16:58:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Ng66WhWz55QXy; Sun, 7 Jan 2024 16:58: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 4T7Ng64bxZz4DXG; Sun, 7 Jan 2024 16:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OXgwEgPascPWwEMFsFrLbM2IhqFNoR0ziHWtq0aPyo8=; b=ZGSGbvbad1LNzE0QAkIV0vaao0pcVVidh7DNHM/3R4h4EFMPRyuOtR3W2aa9fOqqyLHri3 Z8qIbt1KMj/GxGqctTvoC8uwNxRVGSSIsAQwpU/V1SGh6bLpg+0tMJrCrYsY0m3Y6xmY7S iJlnOM5vSRFl9JbaNsEmUmAPj2jio4BhnfEfpfrCSYIxZXeBnPLiQAAfqymFbnJQCdCWy8 ypPMrHi2pApD3sTADuIDu7j/93r2pG6yKxEX4tHhy9HDvnZWW9XJ6RKsiIPUnrOJnSrrTM SGnWoqvF7/78sY9DdHWtoJDmyhrZI3ba4sdbrd4FYyD1wf1a6dxi/CY9ms64aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OXgwEgPascPWwEMFsFrLbM2IhqFNoR0ziHWtq0aPyo8=; b=sWVDZ67wqec8tBOJ8JQkKPjXwUYxNaKPJb4oy62YKTXa72rUEXB5L7T98W+ptI/Wct0wqj kBhEss8GxTrZmiNIAWBNVXdQlnybCz9UfsrEzeWnZbWK0EAP5bYEZE35SXA2BAZbZ8Mlfi 3sYAPhFAWGBYijD0jfsgC9Dshg4ilLIRQw9V/kprnZGlvTF8fMmkeBPrRbXeYjCt017hzZ dp3E8jsQ7B39xFbT7+RyP1It2c3mwR+UR/Ac5pbLa3adMxvRlKkFvl9TF0BUeO4YK6kpqY qBA0ECZK2CPSul0Tb+VppHolWCjKVWu6Xc+fbCjiG3XixHWCKwdDsQqQIVy9Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704646690; a=rsa-sha256; cv=none; b=ZOirw1z2ISjClUYA+j3AAplaqr6fmez1oYTFPZy7aqg+M70H+TOMT89BpwmZzbozAMsmZX IfJwbNy+1Cqk5Ja8nmL3SEeiGVGEudaH5/0bgi8napVTV2urp+Ka8qCAMBzWw+/+0HmEHk /f5yM/ZZvl6HAb0/cDLn2lswIcR9Akkfbn0t3vKGOBPlRuksIX5HAPrqITsNpngRDvjfgA dTyJsncPPfj7u3LLbsW4rQ/NwP4wY589LzK5hj6tywJqL4dzRKV87id6frYxGd7nOp1iUm OCie1E82K1iK2GUimHBltZz7xXaW/UsXRp0jfk6WH8t2UarOMbycZXiut6Eaqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Ng63fPhzXGc; Sun, 7 Jan 2024 16:58: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 407GwAfD029098; Sun, 7 Jan 2024 16:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407GwADI029095; Sun, 7 Jan 2024 16:58:10 GMT (envelope-from git) Date: Sun, 7 Jan 2024 16:58:10 GMT Message-Id: <202401071658.407GwADI029095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b44542d3dfc7 - stable/14 - libdtrace: Fix line number reporting in error messages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b44542d3dfc77012b6e63f51969daf2a38b6db2f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b44542d3dfc77012b6e63f51969daf2a38b6db2f commit b44542d3dfc77012b6e63f51969daf2a38b6db2f Author: Mark Johnston AuthorDate: 2023-12-31 17:37:06 +0000 Commit: Mark Johnston CommitDate: 2024-01-07 16:55:57 +0000 libdtrace: Fix line number reporting in error messages MFC after: 1 week (cherry picked from commit ad3174ecea3374442b3504149fe2b5a9d9ec6f1e) --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index 7dcf21652586..d50369bb57c9 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l @@ -97,6 +97,8 @@ static void unput(int); */ %} +%option yylineno + %e 1500 /* maximum nodes */ %p 4900 /* maximum positions */ %n 600 /* maximum states */ From nobody Sun Jan 7 16:58:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Ng76dttz55QZL; Sun, 7 Jan 2024 16:58: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 4T7Ng75X13z4DRx; Sun, 7 Jan 2024 16:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p7FYUOnSkdrzie3LYLlaGwvYBan5AsnjeqW8RDVDNLo=; b=qYQK8WgtoPFDAN1gLTnfv3x9dbHA+HdrvnP1hzNqEmEzrKanphFEf8/0kHSRI6x4ujq5EP gb76UUD9MM6q7urUFUyL35ycGx4EdnAzCPgDYJELHqeddxDC6p0N68lbK5dfsJGFR9SqqE qW61gI4Mkx9biPCo8s3ZeBcj9jWqq5dV50vqWyo/xOcQswJIqdGTNIQL/avn5d6TiQ/JEI hrIKcOnbwjnRsniDKAGokVgConcLtCi5n7pnFhb9AEbIRWw66LyI73fCgtm44SLxw497qw 5oAy4EHYqUVGf1wrA+UYLiCTK9YndPo6BreZLlcb28VrbLgW+0yzYCypGNwXxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p7FYUOnSkdrzie3LYLlaGwvYBan5AsnjeqW8RDVDNLo=; b=KwETGzmNQ7VeKspBqbBtMdQZJEHMRTLJtoTCwGP8puPa5hrx170m5NdIsS9i4eW6Zd46c7 G+qZ+hBYKc/2tjVmXbIb5nJBwS4Es40w5JthePvgNW/UnA7NW16oaYFDMpC/pQrF7e8OiB KZeKFRqkoiUaDDfKZRJLFJF+9INy84xxaF95TOB6IRnPjUGdVVWjTx5283b6ETHBmJPQK7 /z+WfGhnUJ9Bc8ZNQFCwPgSLO6mWmQnpR85a4t9z2sMAKFMt61PP+coznC8BIA+stFZ7pP 0CHL6+JP6tQ5HEIqJFH3YqTTeMHjVIbQ9C5y4st+KRkbGaSBm/SBYUCbCdszJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704646691; a=rsa-sha256; cv=none; b=UT/MIy/spKWCQuGvr3hwyhGY3Y7aCultkM5T/z0t9uYozCvYmgctz604KhD44Po9Ub6Q3B YfiNwabeY6OQ0/D6dqKRcve66LlwHj6NqWgbjO8jfdgMgC9g8PPGEXGYPkkcvcJko0jM7S s0yKVL3SGQThfEFWKW4roaGPKg3dw4SU/IlZfD+gZgZD85T5Rc/acWrZ/KMx41YbyyFzPt fDAKr2kxUCcY5AVBwsLHVXc+MAD+irJ3vhhm7mZ+TTbePkSe9/UsRBEBIbfW4C6iQsld+p 2f6KSvdpQwnLRqrjJFedCa6mIkZFfsyyiuNz+RSE/b9kKHKWEbyh+pMimGl/mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Ng74dldzY9d; Sun, 7 Jan 2024 16:58: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 407GwBWK029137; Sun, 7 Jan 2024 16:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407GwBpt029134; Sun, 7 Jan 2024 16:58:11 GMT (envelope-from git) Date: Sun, 7 Jan 2024 16:58:11 GMT Message-Id: <202401071658.407GwBpt029134@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 144e7a72f476 - stable/14 - gtaskqueue: Fix a typo List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 144e7a72f476f8f8453c40532c6f95c1f9add7ae Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=144e7a72f476f8f8453c40532c6f95c1f9add7ae commit 144e7a72f476f8f8453c40532c6f95c1f9add7ae Author: Mark Johnston AuthorDate: 2023-12-31 16:36:12 +0000 Commit: Mark Johnston CommitDate: 2024-01-07 16:56:04 +0000 gtaskqueue: Fix a typo This is a no-op in practice since gtaskqueue_thread_enqueue() and taskqueue_thread_enqueue() are identical, and while _gtaskqueue_create() compares the enqueue callback pointer with gtaskqueue_thread_enqueue(), the result has no effect since TQ_FLAGS_UNLOCKED_ENQUEUE was copied directly from subr_taskqueue.c and is unused in the gtaskqueue code. Fix it anyway since it's a bug. More generally we really need to consolidate subr_taskqueue.c and subr_gtaskqueue.c. PR: 270661 MFC after: 1 week (cherry picked from commit e1f336704d308679d4178fd5063dba854b22a07b) --- sys/kern/subr_gtaskqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c index 3558b534967d..590dd53d0ea3 100644 --- a/sys/kern/subr_gtaskqueue.c +++ b/sys/kern/subr_gtaskqueue.c @@ -614,7 +614,7 @@ taskqgroup_cpu_create(struct taskqgroup *qgroup, int idx, int cpu) qcpu = &qgroup->tqg_queue[idx]; LIST_INIT(&qcpu->tgc_tasks); qcpu->tgc_taskq = gtaskqueue_create_fast(NULL, M_WAITOK, - taskqueue_thread_enqueue, &qcpu->tgc_taskq); + gtaskqueue_thread_enqueue, &qcpu->tgc_taskq); gtaskqueue_start_threads(&qcpu->tgc_taskq, 1, PI_SOFT, "%s_%d", qgroup->tqg_name, idx); qcpu->tgc_cpu = cpu; From nobody Sun Jan 7 17:03:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Nn35qCfz55RDX; Sun, 7 Jan 2024 17:03:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Nn351ylz4Gt3; Sun, 7 Jan 2024 17:03:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AVmIjd2cqjQJkANiQa0grbudOgHfUYuNcbGcJb6aVWE=; b=CgpbCE8tEeA8Eng3BVKbdVaMi6Vw4wBzNOx9ENwn49c9T1M8keHIbGHsBVfMiJR9alR1lG QMVquTW20Wu1+DWkXAXlXhUFGTqmV90MfegPUTw1KUmkXiy77LR7G8m9crpnXLrFHbsGM7 y5wV00MjNkViP4EtAdyrv13hoya5HYEmfZ0POVtcmnmxGkNha4ek2jp8Mzt8pN9iwA7kyn 2pZDs/Ga00meo78Zuv0tnNUW7mSb/4QgjsSlhyqHrPVqNgUnLT+YfiRop0q1lVjiX/rN2W bO7vQlXmqrsL3jWJF+Wmr5IDxgXlD5LGRsJmtaYakkd8Go+m3H3717VY6AealA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AVmIjd2cqjQJkANiQa0grbudOgHfUYuNcbGcJb6aVWE=; b=pSIFIxwOAt3e9yzRlG7Z05eTgMjCOCi4gDaF36oJxMmnMPET81vEaDTV1EMp0kkroQxgQo Rv+F4jtOzE7d0u9rQXGybMggfmqqsWE4g6b1RHmOmi+sTLaFj3MM92MLILRU5DnplbDKN8 RQyQ0S6GTrOTUJ7mf7rOJfIhcLldv3sp5JKrBAjJ0s3Gi3kg2IArg6tHCTPCExSSZMJG+h /+nVp+4YE6nSG7ncdWy0U+ZmeZt96RtpoY61uvmbJaeXvct6NvvsWyhoyh4ERdGS0oKeAG OaivG54jtU+RGqvjCoVzfbbI5plnLLRY1XPUhlzNOizNug+vJmX+1xVCePu9mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704646999; a=rsa-sha256; cv=none; b=f7neFeg+83LNVK+PEnKp/cyQDCYMT78lGBmoScWy/0FhqlBkNQCKWMxaOBxotxNVgtn1RI kZBzdTlAVt5j8OJeR8n3ZwSrKbVfROrOeeNy1NQfAh2YD1REUPK9id4d5zrrGUJT/t5gs/ tIJI0snUv6Gg9woMYrsMFXo1lsmo7XaHM8dcW34nzQPrv3Au9NCF0KkiKq9TKzvd1LPnyK ImkctxkPjzfviVB4TBy1YRVeaXzY3Ww9mD0u+va/GK7cb4Mdk11cI2vCFvLivQiGU68D7G k1IBmjACO746e0BoQ1jzUKxlJ6XvVUtP9bfkpWS3RFws3CuhZAT2HgpZQKT1tQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Nn346HQzYMt; Sun, 7 Jan 2024 17:03: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 407H3Jjn045905; Sun, 7 Jan 2024 17:03:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407H3JkA045902; Sun, 7 Jan 2024 17:03:19 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:03:19 GMT Message-Id: <202401071703.407H3JkA045902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c8bfd3fda78c - stable/13 - gtaskqueue: Fix a typo List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c8bfd3fda78cd89cfc9d419a26946603c2124b10 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c8bfd3fda78cd89cfc9d419a26946603c2124b10 commit c8bfd3fda78cd89cfc9d419a26946603c2124b10 Author: Mark Johnston AuthorDate: 2023-12-31 16:36:12 +0000 Commit: Mark Johnston CommitDate: 2024-01-07 16:56:35 +0000 gtaskqueue: Fix a typo This is a no-op in practice since gtaskqueue_thread_enqueue() and taskqueue_thread_enqueue() are identical, and while _gtaskqueue_create() compares the enqueue callback pointer with gtaskqueue_thread_enqueue(), the result has no effect since TQ_FLAGS_UNLOCKED_ENQUEUE was copied directly from subr_taskqueue.c and is unused in the gtaskqueue code. Fix it anyway since it's a bug. More generally we really need to consolidate subr_taskqueue.c and subr_gtaskqueue.c. PR: 270661 MFC after: 1 week (cherry picked from commit e1f336704d308679d4178fd5063dba854b22a07b) --- sys/kern/subr_gtaskqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c index 3558b534967d..590dd53d0ea3 100644 --- a/sys/kern/subr_gtaskqueue.c +++ b/sys/kern/subr_gtaskqueue.c @@ -614,7 +614,7 @@ taskqgroup_cpu_create(struct taskqgroup *qgroup, int idx, int cpu) qcpu = &qgroup->tqg_queue[idx]; LIST_INIT(&qcpu->tgc_tasks); qcpu->tgc_taskq = gtaskqueue_create_fast(NULL, M_WAITOK, - taskqueue_thread_enqueue, &qcpu->tgc_taskq); + gtaskqueue_thread_enqueue, &qcpu->tgc_taskq); gtaskqueue_start_threads(&qcpu->tgc_taskq, 1, PI_SOFT, "%s_%d", qgroup->tqg_name, idx); qcpu->tgc_cpu = cpu; From nobody Sun Jan 7 17:03:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Nn46R2qz55RRn; Sun, 7 Jan 2024 17:03: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 4T7Nn45fyrz4GgJ; Sun, 7 Jan 2024 17:03:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704647000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLHi6Gt1o41mU6HOYfCW3qBrVw6o1looMLCehe4rafk=; b=kXhk8dcyAc9EIvFgkBg9sWxL9twkNWMwA0JZhNBv3Ig6tV1j4eFRjvfLZYiE29xl8jvYI0 lX7nkxO1Riao53I3lw0GxqOKBrIN69m+fmdJ3E9sdETpTvAq95LtVIo40AHGHNW1ebTvHA 9mVvlvxJ03c8paIP/fdHWuZqbEMm+M4CGRFaH+KBa5JwheiLFreZgv7nORoftDz1kHNm1b J8+/26iWRjiL5Pw0G7BAqzvGvOkQ8Q7LfUJLyp9hd5nQngE2pIuuSn3BxSIQGVWomlsJ9f AnF2ez8tulk7j1dC7U7u42l9kFR7TtP1a+GZqjhj/i9J4w3Yj5kKMLZzyG/l3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704647000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLHi6Gt1o41mU6HOYfCW3qBrVw6o1looMLCehe4rafk=; b=R72Ve38B7b8zGKuKgOMBk4S+nWDyAs4sZkvec9sFZJaMTPvRU2bvsHUC1amVvJ2tgUx2Id PG0iHAHYn9nDy+NuY2CSCOf2sGRW6hDQwqUkpQ2iGkREI2V1FmF7O3h5rZLuN1XTqnJAuG avqaF5qoijRBeF/hL6NMT6TLjNQdKTmteMVgxI74Pgl4ix2eWcRrzjzGIjZbemevuJ9KB+ lVJ2UURTA3D0ISIQsX4JI0t0mSEdf1vBwS7yDBO8Y4d4BOSHuZ6J/owqFoBsZp61lm9cqW BsKbBRTl7by8wPVQhZ6XJDyDz391BxkMakaL7sf55LmxuQmO5+CBSUlMxMGJGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704647000; a=rsa-sha256; cv=none; b=v9hQGDk+dw1pZr2nSCA/wLhIvner92fjNatj1795e7Rm5nnip3U5U7PKOvjz4ryetnBR2R dy0/VRaS6Bfm0rclX3YiB/U9k9lqJAcLunn9+dZztsGQ7ZC3w5+0Qwrt/v3NK14pefuPUR czSt8JlqyLkijs4l85Kv57y8eeWfaSDhCEGtDOiAiZMNnyW5jUG8Ol0TPI6Qgx9higAiVs /y3Vr1p3hq7OvL3fq1sHTsdOvoOh/oD4SS8YI8rGbI3UU0rSTHuhHhTwWC00srkZOBDhcz WabPdPfb5SG1JChkl4Ius0Eb9Wq3MaHm27GYM/jzt/W5A7GFGYKlUuxT2iuAMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Nn44kzQzYMv; Sun, 7 Jan 2024 17:03: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 407H3KTl045963; Sun, 7 Jan 2024 17:03:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407H3KGq045960; Sun, 7 Jan 2024 17:03:20 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:03:20 GMT Message-Id: <202401071703.407H3KGq045960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6418d08ae489 - stable/13 - libdtrace: Fix line number reporting in error messages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6418d08ae4897032b3dc772675b0ee92868e132c Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6418d08ae4897032b3dc772675b0ee92868e132c commit 6418d08ae4897032b3dc772675b0ee92868e132c Author: Mark Johnston AuthorDate: 2023-12-31 17:37:06 +0000 Commit: Mark Johnston CommitDate: 2024-01-07 16:56:42 +0000 libdtrace: Fix line number reporting in error messages MFC after: 1 week (cherry picked from commit ad3174ecea3374442b3504149fe2b5a9d9ec6f1e) --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index 7dcf21652586..d50369bb57c9 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l @@ -97,6 +97,8 @@ static void unput(int); */ %} +%option yylineno + %e 1500 /* maximum nodes */ %p 4900 /* maximum positions */ %n 600 /* maximum states */ From nobody Sun Jan 7 17:50:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Pq439zWz55XND; Sun, 7 Jan 2024 17:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Pq42gLWz4Lfq; Sun, 7 Jan 2024 17:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5f1MpEXJUnN0TZRHffgbhN/5xuPO6QFS9Xt/GLp+byA=; b=gPfUFbJs72wKS7c9KgoNC7siyXS9b8HfjEhL4acPu2bf7EChcPK+HcXeXEYjEU/RKUtpPs Dl2Jo6OyE6Sm8hqppLfLt609Ofz/yzeo+5ViUuFr+7cAD3varIP1U87qhDwfTppAmY9IA0 SDRKkTUkncpjvnH0Xs5t+zJM7zdP3mAKjZSQgbBeNfwMq+lX22VCHleSWHR68HssiOhNcg swxrqCsWH5LzXuM2VHFRgdKF9gj4aKfRiBTGmNLos0rCTLg3h8fOAgQboI4/0X+WP+kdEu ZaiTtUsFKPL3TSzH3XjzzsVuXpSE4qd51vC6i6CiydS9LMZ1cq6vpnsCJcNBww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5f1MpEXJUnN0TZRHffgbhN/5xuPO6QFS9Xt/GLp+byA=; b=eBgi2otgarDUxF1Gse690xcgfKmSbKXyqDZFUH5RWcvuE8SGSYM2bdXuY6Q5BJ1lIzEewN AmuUxK8JvHc6WF27dMLG4ueCO4X/WNd7b1O5tzapHnFZOe87U1NK9dz/lKpBqWW6y+NMnX syqI+sDAjMhD35N9IQ4W249tBcaN8EbxldqeVR39omN9f8FXv9OyRYePds9MclC7Ew8+uV 7wd01hOQFEn8YR4E1kr9V7GWYy/4IxtqzD95T0cRSEEf/n+wl8izQG8X5QuIUOntOSUSmr 1ZFzc5boR0csarOPFUlDC7imGVUmO8ZPk0hY9Ts7J+zo6Hm/DrfRQ/3j9+PoRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649808; a=rsa-sha256; cv=none; b=Maaia3stvrYN+3XZtpEqs+tbFpGo63J0/s1RrdsQ323+nXxFhLM17QX/9fgDIsXVXqimYz Lch3rcg7LG+osAYMuAsEalEZlq+DQYCj6plCXSe85qxdLgIHufmB0r/TFc+xGJ4j3P76dK ZXaa1ZyAMu05nbfaMiAZpg6RccRipcv2RzOlCLpByELATIk2h8oALYPazpd3Ut9JkwPk0H 3kKEDMfcPmGbQudb4qH81p9G1Vblal+VGbcuEB1ziEbKcMjl80RHbqwTLxV/Hla52GWWVE yF1XCEw5jxwW2P0FBxeUQlPUZNzEbMPCk4/42N6OD4/f8p6nKhZYrKgL6/gPWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Pq41lV3zZK0; Sun, 7 Jan 2024 17:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407Ho8Ho016440; Sun, 7 Jan 2024 17:50:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Ho8Sg016435; Sun, 7 Jan 2024 17:50:08 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:08 GMT Message-Id: <202401071750.407Ho8Sg016435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2f3b605b2e15 - stable/14 - llvm: Reduce overlinking with the minimal llvm List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2f3b605b2e159522ecab77fd518e8139aaf581e9 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2f3b605b2e159522ecab77fd518e8139aaf581e9 commit 2f3b605b2e159522ecab77fd518e8139aaf581e9 Author: Andrew Turner AuthorDate: 2023-11-09 13:00:51 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:15 +0000 llvm: Reduce overlinking with the minimal llvm We only need to link against libz and libzstd when linking against the fill libllvm, libllvmminimal doesn't use either library. Move adding libz and libzstd to the list of libraries to link against to where we decide to use the full libllvm. Reported by: Cristian Marussi Reported by: Colin S. Gordon Reviewed by: dim Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42528 (cherry picked from commit 83771b1914e182c6324839e05ff82ee6f4a87c98) --- usr.bin/clang/clang.prog.mk | 4 ++-- usr.bin/clang/llvm.prog.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/clang/clang.prog.mk b/usr.bin/clang/clang.prog.mk index c15b846c5aa8..cf48f02359e9 100644 --- a/usr.bin/clang/clang.prog.mk +++ b/usr.bin/clang/clang.prog.mk @@ -14,6 +14,8 @@ LIBDEPS+= llvmminimal .else LIBDEPS+= clang LIBDEPS+= llvm +LIBADD+= z +LIBADD+= zstd .endif .for lib in ${LIBDEPS} @@ -28,7 +30,5 @@ LIBADD+= execinfo LIBADD+= ncursesw .endif LIBADD+= pthread -LIBADD+= z -LIBADD+= zstd .include diff --git a/usr.bin/clang/llvm.prog.mk b/usr.bin/clang/llvm.prog.mk index 87f804063c86..0c102730999f 100644 --- a/usr.bin/clang/llvm.prog.mk +++ b/usr.bin/clang/llvm.prog.mk @@ -12,6 +12,8 @@ CFLAGS+= -I${OBJTOP}/lib/clang/libllvm LIBDEPS+= llvmminimal .else LIBDEPS+= llvm +LIBADD+= z +LIBADD+= zstd .endif .for lib in ${LIBDEPS} @@ -26,7 +28,5 @@ LIBADD+= execinfo LIBADD+= tinfow .endif LIBADD+= pthread -LIBADD+= z -LIBADD+= zstd .include From nobody Sun Jan 7 17:50:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqM0Bz6z55XSn; Sun, 7 Jan 2024 17:50:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7PqL7250z4M8K; Sun, 7 Jan 2024 17:50:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PrCIN7tZpxbQQGE7wPK63qIKweZyoTOamRSvNF73ioM=; b=Y8ImvkFtgph+QxuZYlbiPtun5Fjnyc4hB7JqT4fw2V/dcrc5mC3EhpT3sW8V60SXurJm0F WuVvLDX5Wq738qNdAq1mtYllYbIq8GDPkV94wQpQrpGfzzTr4hjui68gucFO7LhpiW4cZs vt/T7t0xuRFi6g1uekWp7kO6CkTMO7iRlvj7iHO1hB7X4zANdwZgMionJvi27J8BIvABXi YNPED9FE9Z3OhN50z4EqDaQhygEtDav28MnETru6NdA9PposLCjcsBpzbSiz540pcQ2sUL Z9dF4w77ph8arxHKNSGd4USrzKOx7Mi2GDLpzyM1ozcCR/7cdc5BRqKPthRuiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PrCIN7tZpxbQQGE7wPK63qIKweZyoTOamRSvNF73ioM=; b=HIEVu37G7xn0ZCFHLJo89NaT+VHIGJICW8uqB+LUjg4gxMSCVZaqsWxiUviWykhomxYwJX nqMx5yLt+COAsYswjawzlGwWfDbRHCGAvkvVK076Hbylv4Z5bbMH6UwWs1wHxNnVptb/NJ frfTRC5kcTd+c0ZcrBUnnzCEDeBG0UQAaa+Bm7/8OjuDu/91V3d5Koei68pECluq+9D4o1 eSWm/mNVDMGaOnE92zZb5E/i6iuzI5wZjaVvqjfBb527vI8VuQ7umzi6AI4YnueaHI6ZFI dwfTW1KmJ22+RQZsvV5KiFveDu75DkyKqBp6npvYlw76+DcCWqqZFIopjpOzlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649823; a=rsa-sha256; cv=none; b=bqrl/nD8Vw+OCRip1yfteSIyovpojqdapLyqKtwkYGNhJ4+Sdsbqx99JccCZ2DprGna2vl cNa4Oi9gvSrl5Plwk+tXWPTbFJcAOns3iFzC58vFm58VRWPoBm1B5SftTimpwFRM7eg0sO lQOa7MQnjZhMKkBoFsMrIt6wCdhM+rKDSbk+DXsejCJTXV3efwhPOwMI5pd0TU4if7W/GO Qvsx30e6Da2FyiDAkHjXpT3y9Jyi9BwjLvCRNslN5X+o9ww0oHEXl42Y3HlNj1Cem7/deh ls0c28Riv5h/5xPmYY4SkPAnWmmL3uaQ3RsMHNZGk9JX/T1RGq/QC6/j/vFDNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqL646lzYwC; Sun, 7 Jan 2024 17:50:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407HoM9O021849; Sun, 7 Jan 2024 17:50:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407Ho9vX016907; Sun, 7 Jan 2024 17:50:09 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:09 GMT Message-Id: <202401071750.407Ho9vX016907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: fe013be447cd - stable/14 - Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fe013be447cd855ccaf6094a1d06aea570450629 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fe013be447cd855ccaf6094a1d06aea570450629 commit fe013be447cd855ccaf6094a1d06aea570450629 Author: Dimitry Andric AuthorDate: 2023-09-02 21:17:18 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:17 +0000 Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the last commit before the upstream release/17.x branch was created. PR: 273753 MFC after: 1 month (cherry picked from commit 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e) --- Makefile.inc1 | 5 +- ObsoleteFiles.inc | 402 + contrib/llvm-project/FREEBSD-Xlist | 46 +- contrib/llvm-project/clang/include/clang-c/Index.h | 382 +- .../clang/include/clang-c/module.modulemap | 4 - .../llvm-project/clang/include/clang/AST/APValue.h | 6 +- .../clang/include/clang/AST/ASTConsumer.h | 4 +- .../clang/include/clang/AST/ASTContext.h | 45 +- .../clang/include/clang/AST/ASTDiagnostic.h | 3 +- .../clang/include/clang/AST/ASTImporter.h | 1 + .../clang/include/clang/AST/ASTNodeTraverser.h | 13 +- .../clang/include/clang/AST/ASTTypeTraits.h | 9 +- .../clang/include/clang/AST/CXXInheritance.h | 2 +- .../clang/include/clang/AST/CommentSema.h | 2 +- .../clang/include/clang/AST/ComparisonCategories.h | 5 +- .../llvm-project/clang/include/clang/AST/Decl.h | 154 +- .../clang/include/clang/AST/DeclBase.h | 58 +- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 96 +- .../clang/include/clang/AST/DeclObjC.h | 2 +- .../clang/include/clang/AST/DeclTemplate.h | 36 +- .../clang/include/clang/AST/DeclarationName.h | 10 +- .../llvm-project/clang/include/clang/AST/Expr.h | 545 +- .../llvm-project/clang/include/clang/AST/ExprCXX.h | 38 +- .../clang/include/clang/AST/ExprConcepts.h | 6 - .../clang/include/clang/AST/ExternalASTSource.h | 10 +- .../clang/include/clang/AST/IgnoreExpr.h | 8 +- .../llvm-project/clang/include/clang/AST/Mangle.h | 6 +- .../include/clang/AST/MangleNumberingContext.h | 8 + .../clang/include/clang/AST/OpenMPClause.h | 126 + .../clang/include/clang/AST/OperationKinds.def | 8 +- .../clang/include/clang/AST/PrettyPrinter.h | 15 +- .../clang/include/clang/AST/PropertiesBase.td | 58 +- .../clang/include/clang/AST/RawCommentList.h | 13 +- .../clang/include/clang/AST/RecursiveASTVisitor.h | 19 +- .../clang/include/clang/AST/Redeclarable.h | 2 +- .../llvm-project/clang/include/clang/AST/Stmt.h | 51 +- .../llvm-project/clang/include/clang/AST/StmtCXX.h | 31 +- .../clang/include/clang/AST/TemplateBase.h | 54 +- .../clang/include/clang/AST/TemplateName.h | 4 +- .../llvm-project/clang/include/clang/AST/Type.h | 93 +- .../llvm-project/clang/include/clang/AST/TypeLoc.h | 7 +- .../clang/include/clang/AST/TypeProperties.td | 10 +- .../clang/include/clang/AST/UnresolvedSet.h | 12 +- .../clang/include/clang/AST/VTableBuilder.h | 2 - .../clang/include/clang/ASTMatchers/ASTMatchers.h | 106 +- .../clang/ASTMatchers/Dynamic/Diagnostics.h | 6 +- .../clang/Analysis/Analyses/CalledOnceCheck.h | 2 +- .../include/clang/Analysis/Analyses/Consumed.h | 8 +- .../clang/Analysis/Analyses/IntervalPartition.h | 50 + .../clang/Analysis/Analyses/ReachableCode.h | 8 +- .../clang/Analysis/Analyses/ThreadSafetyCommon.h | 2 - .../clang/Analysis/Analyses/ThreadSafetyTIL.h | 9 + .../clang/Analysis/Analyses/ThreadSafetyUtil.h | 4 + .../clang/Analysis/Analyses/UnsafeBufferUsage.h | 27 +- .../Analysis/Analyses/UnsafeBufferUsageGadgets.def | 9 + .../include/clang/Analysis/AnalysisDeclContext.h | 2 +- .../clang/include/clang/Analysis/BodyFarm.h | 3 + .../clang/include/clang/Analysis/CFG.h | 47 - .../clang/include/clang/Analysis/CallGraph.h | 2 +- .../include/clang/Analysis/FlowSensitive/Arena.h | 147 + .../Analysis/FlowSensitive/ControlFlowContext.h | 25 +- .../Analysis/FlowSensitive/DataflowAnalysis.h | 34 +- .../FlowSensitive/DataflowAnalysisContext.h | 232 +- .../Analysis/FlowSensitive/DataflowEnvironment.h | 437 +- .../clang/Analysis/FlowSensitive/DebugSupport.h | 52 - .../include/clang/Analysis/FlowSensitive/Formula.h | 138 + .../include/clang/Analysis/FlowSensitive/Logger.h | 89 + .../clang/Analysis/FlowSensitive/MatchSwitch.h | 15 +- .../FlowSensitive/Models/ChromiumCheckModel.h | 3 +- .../Models/UncheckedOptionalAccessModel.h | 2 +- .../clang/Analysis/FlowSensitive/NoopAnalysis.h | 2 +- .../clang/Analysis/FlowSensitive/RecordOps.h | 76 + .../include/clang/Analysis/FlowSensitive/Solver.h | 24 +- .../clang/Analysis/FlowSensitive/StorageLocation.h | 81 +- .../clang/Analysis/FlowSensitive/Transfer.h | 19 +- .../FlowSensitive/TypeErasedDataflowAnalysis.h | 9 +- .../include/clang/Analysis/FlowSensitive/Value.h | 226 +- .../Analysis/FlowSensitive/WatchedLiteralsSolver.h | 27 +- .../clang/include/clang/Analysis/ProgramPoint.h | 68 +- .../include/clang/Analysis/Support/BumpVector.h | 9 + .../include/clang/Basic/AArch64SVEACLETypes.def | 10 + .../clang/include/clang/Basic/AddressSpaces.h | 3 + .../clang/include/clang/Basic/AlignedAllocation.h | 2 +- .../llvm-project/clang/include/clang/Basic/Attr.td | 216 +- .../clang/include/clang/Basic/AttrDocs.td | 268 +- .../include/clang/Basic/AttributeCommonInfo.h | 138 +- .../clang/include/clang/Basic/Builtins.def | 65 +- .../clang/include/clang/Basic/BuiltinsAArch64.def | 20 +- .../clang/include/clang/Basic/BuiltinsAMDGPU.def | 17 +- .../clang/include/clang/Basic/BuiltinsARM.def | 3 + .../clang/include/clang/Basic/BuiltinsNEON.def | 1 + .../clang/include/clang/Basic/BuiltinsNVPTX.def | 174 +- .../clang/include/clang/Basic/BuiltinsPPC.def | 1457 +- .../clang/include/clang/Basic/BuiltinsRISCV.def | 98 +- .../include/clang/Basic/BuiltinsRISCVVector.def | 1 + .../clang/include/clang/Basic/BuiltinsSME.def | 21 + .../include/clang/Basic/BuiltinsWebAssembly.def | 21 +- .../clang/include/clang/Basic/BuiltinsX86.def | 30 + .../clang/include/clang/Basic/BuiltinsX86_64.def | 5 + .../clang/include/clang/Basic/CodeGenOptions.def | 32 +- .../clang/include/clang/Basic/CodeGenOptions.h | 49 +- .../llvm-project/clang/include/clang/Basic/Cuda.h | 10 +- .../clang/include/clang/Basic/DarwinSDKInfo.h | 2 +- .../clang/include/clang/Basic/Diagnostic.h | 2 +- .../clang/include/clang/Basic/Diagnostic.td | 5 +- .../include/clang/Basic/DiagnosticASTKinds.td | 10 +- .../include/clang/Basic/DiagnosticCommonKinds.td | 36 +- .../clang/include/clang/Basic/DiagnosticDocs.td | 6 + .../include/clang/Basic/DiagnosticDriverKinds.td | 60 +- .../clang/include/clang/Basic/DiagnosticError.h | 4 +- .../include/clang/Basic/DiagnosticFrontendKinds.td | 17 +- .../clang/include/clang/Basic/DiagnosticGroups.td | 82 +- .../clang/include/clang/Basic/DiagnosticIDs.h | 9 +- .../include/clang/Basic/DiagnosticLexKinds.td | 60 +- .../include/clang/Basic/DiagnosticOptions.def | 4 + .../clang/include/clang/Basic/DiagnosticOptions.h | 3 +- .../include/clang/Basic/DiagnosticParseKinds.td | 95 +- .../include/clang/Basic/DiagnosticSemaKinds.td | 320 +- .../clang/Basic/DiagnosticSerializationKinds.td | 11 + .../clang/include/clang/Basic/DirectoryEntry.h | 18 +- .../clang/Basic/ExceptionSpecificationType.h | 5 + .../clang/include/clang/Basic/FPOptions.def | 1 + .../clang/include/clang/Basic/Features.def | 6 + .../clang/include/clang/Basic/FileEntry.h | 36 +- .../clang/include/clang/Basic/FileManager.h | 2 +- .../clang/include/clang/Basic/IdentifierTable.h | 54 +- .../llvm-project/clang/include/clang/Basic/LLVM.h | 5 - .../clang/include/clang/Basic/LangOptions.def | 11 +- .../clang/include/clang/Basic/LangOptions.h | 12 +- .../clang/include/clang/Basic/LangStandard.h | 20 +- .../clang/include/clang/Basic/LangStandards.def | 34 +- .../clang/include/clang/Basic/Linkage.h | 7 - .../clang/include/clang/Basic/Module.h | 112 +- .../clang/include/clang/Basic/ObjCRuntime.h | 2 +- .../include/clang/Basic/OpenCLExtensionTypes.def | 8 +- .../clang/include/clang/Basic/OpenCLExtensions.def | 2 +- .../clang/include/clang/Basic/OpenMPKinds.def | 10 + .../clang/include/clang/Basic/OpenMPKinds.h | 7 + .../clang/include/clang/Basic/ParsedAttrInfo.h | 152 + .../clang/include/clang/Basic/RISCVVTypes.def | 290 + .../clang/include/clang/Basic/SourceManager.h | 5 +- .../clang/include/clang/Basic/Specifiers.h | 5 + .../clang/include/clang/Basic/StmtNodes.td | 4 +- .../clang/include/clang/Basic/TargetBuiltins.h | 25 +- .../clang/include/clang/Basic/TargetCXXABI.h | 6 +- .../clang/include/clang/Basic/TargetID.h | 2 +- .../clang/include/clang/Basic/TargetInfo.h | 51 +- .../clang/include/clang/Basic/TargetOptions.h | 17 +- .../llvm-project/clang/include/clang/Basic/Thunk.h | 8 +- .../clang/include/clang/Basic/TokenKinds.def | 35 +- .../clang/include/clang/Basic/TokenKinds.h | 15 + .../clang/include/clang/Basic/TypeNodes.td | 2 +- .../clang/Basic/WebAssemblyReferenceTypes.def | 40 + .../clang/include/clang/Basic/arm_bf16.td | 2 +- .../clang/include/clang/Basic/arm_neon.td | 6 + .../clang/include/clang/Basic/arm_sme.td | 259 + .../clang/include/clang/Basic/arm_sve.td | 412 +- .../clang/include/clang/Basic/arm_sve_sme_incl.td | 281 + .../include/clang/Basic/riscv_sifive_vector.td | 105 + .../clang/include/clang/Basic/riscv_vector.td | 2230 +-- .../include/clang/Basic/riscv_vector_common.td | 246 + .../clang/include/clang/CodeGen/BackendUtil.h | 5 + .../clang/include/clang/CodeGen/CGFunctionInfo.h | 2 +- .../clang/include/clang/CodeGen/CodeGenAction.h | 5 +- .../CodeGen/ObjectFilePCHContainerOperations.h | 2 +- .../clang/include/clang/Driver/Action.h | 14 +- .../clang/include/clang/Driver/Compilation.h | 11 + .../clang/include/clang/Driver/Distro.h | 5 +- .../clang/include/clang/Driver/Driver.h | 43 +- .../llvm-project/clang/include/clang/Driver/Job.h | 26 +- .../clang/include/clang/Driver/Multilib.h | 122 +- .../clang/include/clang/Driver/MultilibBuilder.h | 134 + .../clang/include/clang/Driver/OffloadBundler.h | 2 +- .../clang/include/clang/Driver/Options.h | 1 + .../clang/include/clang/Driver/Options.td | 830 +- .../clang/include/clang/Driver/SanitizerArgs.h | 7 + .../clang/include/clang/Driver/ToolChain.h | 39 +- .../clang/include/clang/Driver/Types.def | 1 + .../clang/include/clang/Driver/XRayArgs.h | 9 +- .../clang/include/clang/ExtractAPI/API.h | 2 +- .../include/clang/ExtractAPI/APIIgnoresList.h | 20 +- .../include/clang/ExtractAPI/AvailabilityInfo.h | 6 +- .../clang/ExtractAPI/DeclarationFragments.h | 29 + .../clang/ExtractAPI/ExtractAPIActionBase.h | 54 + .../include/clang/ExtractAPI/ExtractAPIVisitor.h | 639 +- .../include/clang/ExtractAPI/FrontendActions.h | 62 +- .../ExtractAPI/Serialization/SerializerBase.h | 118 +- .../Serialization/SymbolGraphSerializer.h | 70 +- .../ExtractAPI/TypedefUnderlyingTypeResolver.h | 0 .../clang/include/clang/Format/Format.h | 546 +- .../clang/include/clang/Frontend/ASTUnit.h | 17 +- .../include/clang/Frontend/CompilerInstance.h | 28 + .../include/clang/Frontend/CompilerInvocation.h | 11 + .../clang/Frontend/DependencyOutputOptions.h | 14 +- .../clang/include/clang/Frontend/FrontendActions.h | 6 +- .../clang/include/clang/Frontend/FrontendOptions.h | 18 +- .../include/clang/Frontend/LayoutOverrideSource.h | 6 + .../include/clang/Frontend/PrecompiledPreamble.h | 7 +- .../clang/include/clang/Frontend/TextDiagnostic.h | 3 +- .../clang/include/clang/Frontend/Utils.h | 11 +- .../clang/include/clang/Interpreter/Interpreter.h | 97 +- .../clang/include/clang/Interpreter/Value.h | 208 + .../clang/Lex/DependencyDirectivesScanner.h | 1 + .../clang/include/clang/Lex/HeaderSearch.h | 47 +- .../llvm-project/clang/include/clang/Lex/Lexer.h | 2 +- .../clang/include/clang/Lex/LiteralSupport.h | 31 +- .../clang/include/clang/Lex/MacroInfo.h | 2 +- .../clang/include/clang/Lex/ModuleMap.h | 72 +- .../clang/include/clang/Lex/MultipleIncludeOpt.h | 6 + .../llvm-project/clang/include/clang/Lex/Pragma.h | 7 + .../clang/include/clang/Lex/Preprocessor.h | 63 +- .../clang/include/clang/Lex/PreprocessorOptions.h | 3 + .../llvm-project/clang/include/clang/Lex/Token.h | 9 +- .../clang/include/clang/Parse/LoopHint.h | 12 +- .../clang/include/clang/Parse/Parser.h | 118 +- .../clang/include/clang/Rewrite/Core/RewriteRope.h | 4 + .../include/clang/Sema/AnalysisBasedWarnings.h | 4 + .../include/clang/Sema/CodeCompleteConsumer.h | 5 +- .../clang/include/clang/Sema/DeclSpec.h | 29 +- .../clang/include/clang/Sema/Designator.h | 201 +- .../clang/Sema/EnterExpressionEvaluationContext.h | 69 + .../clang/include/clang/Sema/ExternalSemaSource.h | 5 + .../include/clang/Sema/HLSLExternalSemaSource.h | 2 +- .../clang/include/clang/Sema/IdentifierResolver.h | 11 +- .../clang/include/clang/Sema/Initialization.h | 3 + .../llvm-project/clang/include/clang/Sema/Lookup.h | 9 + .../clang/Sema/MultiplexExternalSemaSource.h | 3 + .../clang/include/clang/Sema/Overload.h | 3 + .../clang/include/clang/Sema/ParsedAttr.h | 233 +- .../include/clang/Sema/RISCVIntrinsicManager.h | 6 + .../llvm-project/clang/include/clang/Sema/Scope.h | 5 + .../clang/include/clang/Sema/ScopeInfo.h | 16 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 600 +- .../clang/include/clang/Sema/Template.h | 35 +- .../clang/include/clang/Sema/TemplateDeduction.h | 7 + .../include/clang/Serialization/ASTBitCodes.h | 18 +- .../clang/include/clang/Serialization/ASTReader.h | 33 +- .../clang/include/clang/Serialization/ASTWriter.h | 1 - .../clang/Serialization/GlobalModuleIndex.h | 6 - .../clang/include/clang/Serialization/ModuleFile.h | 5 +- .../clang/Serialization/PCHContainerOperations.h | 17 +- .../clang/StaticAnalyzer/Checkers/Checkers.td | 54 +- .../include/clang/StaticAnalyzer/Checkers/Taint.h | 54 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.def | 9 - .../clang/StaticAnalyzer/Core/AnalyzerOptions.h | 20 +- .../StaticAnalyzer/Core/BugReporter/BugReporter.h | 5 +- .../Core/BugReporter/BugReporterVisitors.h | 21 +- .../Core/BugReporter/CommonBugCategories.h | 1 + .../include/clang/StaticAnalyzer/Core/Checker.h | 27 +- .../StaticAnalyzer/Core/PathSensitive/CallEvent.h | 176 +- .../Core/PathSensitive/CheckerContext.h | 4 +- .../StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 22 +- .../Core/PathSensitive/ExplodedGraph.h | 9 +- .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 33 +- .../StaticAnalyzer/Core/PathSensitive/MemRegion.h | 72 +- .../StaticAnalyzer/Core/PathSensitive/Regions.def | 1 + .../Core/PathSensitive/SMTConstraintManager.h | 6 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 16 +- .../StaticAnalyzer/Core/PathSensitive/SymExpr.h | 6 +- .../Core/PathSensitive/SymbolManager.h | 13 +- .../include/clang/Support/RISCVVIntrinsicUtils.h | 26 +- .../clang/include/clang/Testing/CommandLineArgs.h | 5 + .../clang/include/clang/Testing/TestAST.h | 3 + .../DependencyScanning/DependencyScanningTool.h | 95 +- .../DependencyScanning/DependencyScanningWorker.h | 19 +- .../DependencyScanning/ModuleDepCollector.h | 18 +- .../clang/Tooling/Inclusions/HeaderAnalysis.h | 2 +- .../clang/Tooling/Inclusions/HeaderIncludes.h | 2 + .../clang/Tooling/Inclusions/StandardLibrary.h | 37 +- .../clang/Tooling/Inclusions/StdSymbolMap.inc | 1538 -- .../Tooling/Refactoring/RecursiveSymbolVisitor.h | 9 +- .../clang/include/clang/Tooling/Tooling.h | 12 +- .../clang/include/clang/module.modulemap | 199 - .../llvm-project/clang/include/module.modulemap | 205 + .../clang/lib/APINotes/APINotesFormat.h | 4 +- .../llvm-project/clang/lib/ARCMigrate/ARCMT.cpp | 4 +- .../clang/lib/ARCMigrate/FileRemapper.cpp | 3 +- .../llvm-project/clang/lib/ARCMigrate/ObjCMT.cpp | 3 +- .../clang/lib/ARCMigrate/TransProperties.cpp | 2 +- contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 710 +- .../llvm-project/clang/lib/AST/ASTDiagnostic.cpp | 3 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 347 +- .../clang/lib/AST/ASTImporterLookupTable.cpp | 14 + .../clang/lib/AST/ASTStructuralEquivalence.cpp | 45 +- .../llvm-project/clang/lib/AST/ASTTypeTraits.cpp | 15 +- contrib/llvm-project/clang/lib/AST/AttrImpl.cpp | 41 +- .../llvm-project/clang/lib/AST/CXXInheritance.cpp | 3 +- .../clang/lib/AST/ComputeDependence.cpp | 43 +- contrib/llvm-project/clang/lib/AST/Decl.cpp | 296 +- contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 35 + contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 35 +- contrib/llvm-project/clang/lib/AST/DeclPrinter.cpp | 11 +- .../llvm-project/clang/lib/AST/DeclTemplate.cpp | 101 +- .../llvm-project/clang/lib/AST/DeclarationName.cpp | 6 +- contrib/llvm-project/clang/lib/AST/Expr.cpp | 339 +- contrib/llvm-project/clang/lib/AST/ExprCXX.cpp | 61 +- .../llvm-project/clang/lib/AST/ExprConcepts.cpp | 25 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 341 +- .../clang/lib/AST/ExternalASTMerger.cpp | 6 +- .../llvm-project/clang/lib/AST/FormatString.cpp | 13 +- .../llvm-project/clang/lib/AST/Interp/Boolean.h | 6 +- .../clang/lib/AST/Interp/ByteCodeEmitter.cpp | 128 +- .../clang/lib/AST/Interp/ByteCodeEmitter.h | 6 +- .../clang/lib/AST/Interp/ByteCodeExprGen.cpp | 1103 +- .../clang/lib/AST/Interp/ByteCodeExprGen.h | 123 +- .../clang/lib/AST/Interp/ByteCodeStmtGen.cpp | 228 +- .../clang/lib/AST/Interp/ByteCodeStmtGen.h | 5 + .../llvm-project/clang/lib/AST/Interp/Context.cpp | 67 +- .../llvm-project/clang/lib/AST/Interp/Context.h | 17 +- .../clang/lib/AST/Interp/Descriptor.cpp | 53 +- .../llvm-project/clang/lib/AST/Interp/Descriptor.h | 23 +- .../llvm-project/clang/lib/AST/Interp/Disasm.cpp | 20 +- .../clang/lib/AST/Interp/EvalEmitter.cpp | 19 +- .../clang/lib/AST/Interp/EvalEmitter.h | 12 +- .../llvm-project/clang/lib/AST/Interp/Floating.cpp | 22 + .../llvm-project/clang/lib/AST/Interp/Floating.h | 158 + contrib/llvm-project/clang/lib/AST/Interp/Frame.h | 2 +- .../llvm-project/clang/lib/AST/Interp/Function.cpp | 7 +- .../llvm-project/clang/lib/AST/Interp/Function.h | 40 +- .../clang/lib/AST/Interp/FunctionPointer.h | 71 + .../llvm-project/clang/lib/AST/Interp/Integral.h | 31 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 186 +- contrib/llvm-project/clang/lib/AST/Interp/Interp.h | 513 +- .../clang/lib/AST/Interp/InterpBlock.cpp | 67 +- .../clang/lib/AST/Interp/InterpBlock.h | 17 +- .../clang/lib/AST/Interp/InterpBuiltin.cpp | 82 + .../clang/lib/AST/Interp/InterpFrame.cpp | 36 +- .../clang/lib/AST/Interp/InterpFrame.h | 11 +- .../clang/lib/AST/Interp/InterpStack.cpp | 39 +- .../clang/lib/AST/Interp/InterpStack.h | 37 +- .../clang/lib/AST/Interp/InterpState.cpp | 25 +- .../clang/lib/AST/Interp/InterpState.h | 9 +- .../llvm-project/clang/lib/AST/Interp/Opcodes.td | 147 +- .../llvm-project/clang/lib/AST/Interp/Pointer.cpp | 57 +- .../llvm-project/clang/lib/AST/Interp/Pointer.h | 23 +- .../llvm-project/clang/lib/AST/Interp/PrimType.cpp | 2 + .../llvm-project/clang/lib/AST/Interp/PrimType.h | 31 +- .../llvm-project/clang/lib/AST/Interp/Primitives.h | 36 + .../llvm-project/clang/lib/AST/Interp/Program.cpp | 31 +- .../llvm-project/clang/lib/AST/Interp/Program.h | 6 +- .../llvm-project/clang/lib/AST/Interp/Record.cpp | 8 + contrib/llvm-project/clang/lib/AST/Interp/Record.h | 8 +- contrib/llvm-project/clang/lib/AST/Interp/Source.h | 9 +- .../llvm-project/clang/lib/AST/Interp/State.cpp | 17 +- contrib/llvm-project/clang/lib/AST/Interp/State.h | 6 +- .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 228 +- .../llvm-project/clang/lib/AST/JSONNodeDumper.cpp | 13 + .../llvm-project/clang/lib/AST/MicrosoftMangle.cpp | 173 +- contrib/llvm-project/clang/lib/AST/NSAPI.cpp | 2 + .../llvm-project/clang/lib/AST/ODRDiagsEmitter.cpp | 45 +- contrib/llvm-project/clang/lib/AST/ODRHash.cpp | 4 +- .../llvm-project/clang/lib/AST/OpenMPClause.cpp | 72 +- .../clang/lib/AST/PrintfFormatString.cpp | 2 + .../clang/lib/AST/RecordLayoutBuilder.cpp | 40 +- contrib/llvm-project/clang/lib/AST/Stmt.cpp | 5 + contrib/llvm-project/clang/lib/AST/StmtCXX.cpp | 6 +- contrib/llvm-project/clang/lib/AST/StmtOpenMP.cpp | 26 + contrib/llvm-project/clang/lib/AST/StmtPrinter.cpp | 16 +- contrib/llvm-project/clang/lib/AST/StmtProfile.cpp | 88 +- .../llvm-project/clang/lib/AST/TemplateBase.cpp | 7 +- .../llvm-project/clang/lib/AST/TemplateName.cpp | 9 + .../llvm-project/clang/lib/AST/TextNodeDumper.cpp | 12 +- contrib/llvm-project/clang/lib/AST/Type.cpp | 182 +- contrib/llvm-project/clang/lib/AST/TypeLoc.cpp | 2 + contrib/llvm-project/clang/lib/AST/TypePrinter.cpp | 120 +- .../llvm-project/clang/lib/AST/VTableBuilder.cpp | 2 +- .../clang/lib/ASTMatchers/ASTMatchersInternal.cpp | 7 + .../clang/lib/ASTMatchers/Dynamic/Marshallers.h | 2 +- .../clang/lib/ASTMatchers/Dynamic/Registry.cpp | 7 +- .../llvm-project/clang/lib/Analysis/BodyFarm.cpp | 1 + contrib/llvm-project/clang/lib/Analysis/CFG.cpp | 441 +- .../clang/lib/Analysis/ExprMutationAnalyzer.cpp | 4 +- .../clang/lib/Analysis/FlowSensitive/Arena.cpp | 98 + .../Analysis/FlowSensitive/ControlFlowContext.cpp | 60 +- .../FlowSensitive/DataflowAnalysisContext.cpp | 401 +- .../Analysis/FlowSensitive/DataflowEnvironment.cpp | 744 +- .../lib/Analysis/FlowSensitive/DebugSupport.cpp | 208 +- .../clang/lib/Analysis/FlowSensitive/Formula.cpp | 82 + .../lib/Analysis/FlowSensitive/HTMLLogger.cpp | 536 + .../lib/Analysis/FlowSensitive/HTMLLogger.css | 142 + .../lib/Analysis/FlowSensitive/HTMLLogger.html | 107 + .../clang/lib/Analysis/FlowSensitive/HTMLLogger.js | 219 + .../clang/lib/Analysis/FlowSensitive/Logger.cpp | 108 + .../FlowSensitive/Models/ChromiumCheckModel.cpp | 6 +- .../Models/UncheckedOptionalAccessModel.cpp | 535 +- .../clang/lib/Analysis/FlowSensitive/RecordOps.cpp | 117 + .../clang/lib/Analysis/FlowSensitive/Transfer.cpp | 591 +- .../FlowSensitive/TypeErasedDataflowAnalysis.cpp | 307 +- .../FlowSensitive/WatchedLiteralsSolver.cpp | 333 +- .../clang/lib/Analysis/IntervalPartition.cpp | 116 + .../clang/lib/Analysis/ReachableCode.cpp | 12 +- .../clang/lib/Analysis/RetainSummaryManager.cpp | 12 +- .../clang/lib/Analysis/ThreadSafety.cpp | 7 +- .../clang/lib/Analysis/ThreadSafetyCommon.cpp | 7 +- .../clang/lib/Analysis/UninitializedValues.cpp | 53 +- .../clang/lib/Analysis/UnsafeBufferUsage.cpp | 1917 ++- .../llvm-project/clang/lib/Basic/Attributes.cpp | 22 +- contrib/llvm-project/clang/lib/Basic/Builtins.cpp | 2 +- contrib/llvm-project/clang/lib/Basic/Cuda.cpp | 12 +- .../llvm-project/clang/lib/Basic/Diagnostic.cpp | 44 +- .../llvm-project/clang/lib/Basic/DiagnosticIDs.cpp | 21 +- .../llvm-project/clang/lib/Basic/FileManager.cpp | 14 +- .../clang/lib/Basic/IdentifierTable.cpp | 43 +- .../llvm-project/clang/lib/Basic/LangOptions.cpp | 11 +- .../llvm-project/clang/lib/Basic/LangStandards.cpp | 10 +- contrib/llvm-project/clang/lib/Basic/Module.cpp | 65 +- .../llvm-project/clang/lib/Basic/OpenCLOptions.cpp | 2 +- .../llvm-project/clang/lib/Basic/OpenMPKinds.cpp | 31 +- .../clang/lib/Basic/ParsedAttrInfo.cpp | 32 + contrib/llvm-project/clang/lib/Basic/Sarif.cpp | 8 +- .../llvm-project/clang/lib/Basic/SourceManager.cpp | 5 +- contrib/llvm-project/clang/lib/Basic/TargetID.cpp | 6 +- .../llvm-project/clang/lib/Basic/TargetInfo.cpp | 10 +- contrib/llvm-project/clang/lib/Basic/Targets.cpp | 474 +- contrib/llvm-project/clang/lib/Basic/Targets.h | 4 +- .../clang/lib/Basic/Targets/AArch64.cpp | 204 +- .../llvm-project/clang/lib/Basic/Targets/AArch64.h | 38 +- .../clang/lib/Basic/Targets/AMDGPU.cpp | 186 +- .../llvm-project/clang/lib/Basic/Targets/AMDGPU.h | 23 +- contrib/llvm-project/clang/lib/Basic/Targets/ARC.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 20 +- contrib/llvm-project/clang/lib/Basic/Targets/ARM.h | 8 +- .../llvm-project/clang/lib/Basic/Targets/AVR.cpp | 18 +- contrib/llvm-project/clang/lib/Basic/Targets/AVR.h | 5 +- contrib/llvm-project/clang/lib/Basic/Targets/BPF.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/CSKY.cpp | 7 +- .../llvm-project/clang/lib/Basic/Targets/CSKY.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/DirectX.h | 7 +- .../clang/lib/Basic/Targets/Hexagon.cpp | 2 - .../llvm-project/clang/lib/Basic/Targets/Hexagon.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/Lanai.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/Le64.cpp | 1 - .../llvm-project/clang/lib/Basic/Targets/Le64.h | 4 +- .../clang/lib/Basic/Targets/LoongArch.cpp | 101 +- .../clang/lib/Basic/Targets/LoongArch.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/M68k.cpp | 19 +- .../llvm-project/clang/lib/Basic/Targets/M68k.h | 6 +- .../clang/lib/Basic/Targets/MSP430.cpp | 1 - .../llvm-project/clang/lib/Basic/Targets/MSP430.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/Mips.cpp | 24 - .../llvm-project/clang/lib/Basic/Targets/Mips.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.cpp | 10 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.h | 8 +- .../clang/lib/Basic/Targets/OSTargets.cpp | 14 +- .../clang/lib/Basic/Targets/OSTargets.h | 100 +- .../llvm-project/clang/lib/Basic/Targets/PNaCl.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 15 +- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 54 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 18 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.h | 9 +- .../llvm-project/clang/lib/Basic/Targets/SPIR.h | 63 +- .../llvm-project/clang/lib/Basic/Targets/Sparc.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/SystemZ.h | 19 +- contrib/llvm-project/clang/lib/Basic/Targets/TCE.h | 7 +- .../llvm-project/clang/lib/Basic/Targets/VE.cpp | 6 - contrib/llvm-project/clang/lib/Basic/Targets/VE.h | 4 +- .../clang/lib/Basic/Targets/WebAssembly.cpp | 1 + .../clang/lib/Basic/Targets/WebAssembly.h | 30 +- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 89 +- contrib/llvm-project/clang/lib/Basic/Targets/X86.h | 43 +- .../llvm-project/clang/lib/Basic/Targets/XCore.h | 4 +- contrib/llvm-project/clang/lib/CodeGen/ABIInfo.cpp | 231 + contrib/llvm-project/clang/lib/CodeGen/ABIInfo.h | 244 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp | 452 + .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.h | 152 + contrib/llvm-project/clang/lib/CodeGen/Address.h | 108 +- .../llvm-project/clang/lib/CodeGen/BackendUtil.cpp | 186 +- .../llvm-project/clang/lib/CodeGen/CGAtomic.cpp | 146 +- .../llvm-project/clang/lib/CodeGen/CGBlocks.cpp | 37 +- contrib/llvm-project/clang/lib/CodeGen/CGBlocks.h | 6 - contrib/llvm-project/clang/lib/CodeGen/CGBuilder.h | 49 +- .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 1508 +- .../llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | 52 +- contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp | 19 +- .../llvm-project/clang/lib/CodeGen/CGCXXABI.cpp | 13 +- contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.h | 24 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 401 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 12 +- contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 50 +- .../llvm-project/clang/lib/CodeGen/CGCleanup.cpp | 6 +- .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 146 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 351 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.h | 52 +- contrib/llvm-project/clang/lib/CodeGen/CGDecl.cpp | 147 +- .../llvm-project/clang/lib/CodeGen/CGDeclCXX.cpp | 27 +- .../llvm-project/clang/lib/CodeGen/CGException.cpp | 12 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 346 +- .../llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 40 +- .../llvm-project/clang/lib/CodeGen/CGExprCXX.cpp | 95 +- .../clang/lib/CodeGen/CGExprComplex.cpp | 7 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 92 +- .../clang/lib/CodeGen/CGExprScalar.cpp | 133 +- .../clang/lib/CodeGen/CGGPUBuiltin.cpp | 9 +- .../clang/lib/CodeGen/CGHLSLRuntime.cpp | 2 +- .../clang/lib/CodeGen/CGNonTrivialStruct.cpp | 50 +- contrib/llvm-project/clang/lib/CodeGen/CGObjC.cpp | 33 +- .../llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp | 14 +- .../llvm-project/clang/lib/CodeGen/CGObjCMac.cpp | 38 +- .../clang/lib/CodeGen/CGObjCRuntime.cpp | 17 +- .../clang/lib/CodeGen/CGOpenCLRuntime.cpp | 43 +- .../clang/lib/CodeGen/CGOpenCLRuntime.h | 6 +- .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 1677 +-- .../clang/lib/CodeGen/CGOpenMPRuntime.h | 215 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 227 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 80 +- .../clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 25 +- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 238 +- .../clang/lib/CodeGen/CGStmtOpenMP.cpp | 400 +- contrib/llvm-project/clang/lib/CodeGen/CGVTT.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/CGVTables.cpp | 83 +- contrib/llvm-project/clang/lib/CodeGen/CGVTables.h | 10 - contrib/llvm-project/clang/lib/CodeGen/CGValue.h | 39 +- .../clang/lib/CodeGen/CodeGenAction.cpp | 159 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 103 +- .../clang/lib/CodeGen/CodeGenFunction.h | 92 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 538 +- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 31 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.h | 7 +- .../clang/lib/CodeGen/CodeGenTypes.cpp | 227 +- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 14 - .../clang/lib/CodeGen/ConstantEmitter.h | 2 +- .../clang/lib/CodeGen/CoverageMappingGen.cpp | 91 +- .../clang/lib/CodeGen/CoverageMappingGen.h | 1 - .../llvm-project/clang/lib/CodeGen/EHScopeStack.h | 9 + .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 393 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 101 +- .../clang/lib/CodeGen/ModuleBuilder.cpp | 2 +- .../CodeGen/ObjectFilePCHContainerOperations.cpp | 11 +- .../clang/lib/CodeGen/SanitizerMetadata.cpp | 5 - .../clang/lib/CodeGen/SanitizerMetadata.h | 1 - .../clang/lib/CodeGen/SwiftCallingConv.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 12397 +--------------- .../llvm-project/clang/lib/CodeGen/TargetInfo.h | 176 +- .../clang/lib/CodeGen/Targets/AArch64.cpp | 824 ++ .../clang/lib/CodeGen/Targets/AMDGPU.cpp | 601 + .../llvm-project/clang/lib/CodeGen/Targets/ARC.cpp | 158 + .../llvm-project/clang/lib/CodeGen/Targets/ARM.cpp | 819 ++ .../llvm-project/clang/lib/CodeGen/Targets/AVR.cpp | 154 + .../llvm-project/clang/lib/CodeGen/Targets/BPF.cpp | 100 + .../clang/lib/CodeGen/Targets/CSKY.cpp | 175 + .../clang/lib/CodeGen/Targets/Hexagon.cpp | 423 + .../clang/lib/CodeGen/Targets/Lanai.cpp | 154 + .../clang/lib/CodeGen/Targets/LoongArch.cpp | 449 + .../clang/lib/CodeGen/Targets/M68k.cpp | 55 + .../clang/lib/CodeGen/Targets/MSP430.cpp | 94 + .../clang/lib/CodeGen/Targets/Mips.cpp | 441 + .../clang/lib/CodeGen/Targets/NVPTX.cpp | 309 + .../clang/lib/CodeGen/Targets/PNaCl.cpp | 109 + .../llvm-project/clang/lib/CodeGen/Targets/PPC.cpp | 972 ++ .../clang/lib/CodeGen/Targets/RISCV.cpp | 519 + .../clang/lib/CodeGen/Targets/SPIR.cpp | 218 + .../clang/lib/CodeGen/Targets/Sparc.cpp | 409 + .../clang/lib/CodeGen/Targets/SystemZ.cpp | 538 + .../llvm-project/clang/lib/CodeGen/Targets/TCE.cpp | 82 + .../llvm-project/clang/lib/CodeGen/Targets/VE.cpp | 71 + .../clang/lib/CodeGen/Targets/WebAssembly.cpp | 173 + .../llvm-project/clang/lib/CodeGen/Targets/X86.cpp | 3402 +++++ .../clang/lib/CodeGen/Targets/XCore.cpp | 662 + .../clang/lib/CrossTU/CrossTranslationUnit.cpp | 14 +- contrib/llvm-project/clang/lib/Driver/Action.cpp | 7 + .../llvm-project/clang/lib/Driver/Compilation.cpp | 2 +- contrib/llvm-project/clang/lib/Driver/Distro.cpp | 6 +- contrib/llvm-project/clang/lib/Driver/Driver.cpp | 409 +- contrib/llvm-project/clang/lib/Driver/Job.cpp | 44 +- contrib/llvm-project/clang/lib/Driver/Multilib.cpp | 334 +- .../clang/lib/Driver/MultilibBuilder.cpp | 197 + .../clang/lib/Driver/OffloadBundler.cpp | 28 +- .../clang/lib/Driver/SanitizerArgs.cpp | 106 +- .../llvm-project/clang/lib/Driver/ToolChain.cpp | 157 +- .../clang/lib/Driver/ToolChains/AIX.cpp | 147 +- .../llvm-project/clang/lib/Driver/ToolChains/AIX.h | 4 + .../clang/lib/Driver/ToolChains/AMDGPU.cpp | 103 +- .../clang/lib/Driver/ToolChains/AMDGPU.h | 9 +- .../clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 4 +- .../clang/lib/Driver/ToolChains/AVR.cpp | 16 +- .../llvm-project/clang/lib/Driver/ToolChains/AVR.h | 2 + .../clang/lib/Driver/ToolChains/Ananas.cpp | 4 +- .../clang/lib/Driver/ToolChains/Arch/AArch64.cpp | 58 +- .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 157 +- .../clang/lib/Driver/ToolChains/Arch/ARM.h | 19 +- .../clang/lib/Driver/ToolChains/Arch/CSKY.cpp | 6 +- .../clang/lib/Driver/ToolChains/Arch/LoongArch.cpp | 120 +- .../clang/lib/Driver/ToolChains/Arch/M68k.cpp | 50 +- .../clang/lib/Driver/ToolChains/Arch/M68k.h | 8 - .../clang/lib/Driver/ToolChains/Arch/Mips.cpp | 11 - .../clang/lib/Driver/ToolChains/Arch/Mips.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 11 +- .../clang/lib/Driver/ToolChains/Arch/PPC.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 38 +- .../clang/lib/Driver/ToolChains/Arch/RISCV.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/Sparc.cpp | 8 +- .../clang/lib/Driver/ToolChains/Arch/SystemZ.cpp | 2 +- .../clang/lib/Driver/ToolChains/Arch/X86.cpp | 11 +- .../clang/lib/Driver/ToolChains/Arch/X86.h | 2 +- .../clang/lib/Driver/ToolChains/BareMetal.cpp | 342 +- .../clang/lib/Driver/ToolChains/BareMetal.h | 21 + .../clang/lib/Driver/ToolChains/CSKYToolChain.cpp | 15 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 803 +- .../clang/lib/Driver/ToolChains/Clang.h | 8 +- .../clang/lib/Driver/ToolChains/CloudABI.cpp | 4 +- .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 360 +- .../clang/lib/Driver/ToolChains/CommonArgs.h | 23 +- .../clang/lib/Driver/ToolChains/CrossWindows.cpp | 3 +- .../clang/lib/Driver/ToolChains/CrossWindows.h | 1 - .../clang/lib/Driver/ToolChains/Cuda.cpp | 49 +- .../clang/lib/Driver/ToolChains/Cuda.h | 14 +- .../clang/lib/Driver/ToolChains/Darwin.cpp | 136 +- .../clang/lib/Driver/ToolChains/Darwin.h | 7 +- .../clang/lib/Driver/ToolChains/Flang.cpp | 213 +- .../clang/lib/Driver/ToolChains/Flang.h | 19 + .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 8 +- .../clang/lib/Driver/ToolChains/Fuchsia.cpp | 148 +- .../clang/lib/Driver/ToolChains/Fuchsia.h | 17 +- .../clang/lib/Driver/ToolChains/Gnu.cpp | 851 +- .../llvm-project/clang/lib/Driver/ToolChains/Gnu.h | 9 +- .../clang/lib/Driver/ToolChains/HIPAMD.cpp | 47 +- .../clang/lib/Driver/ToolChains/HIPSPV.cpp | 4 +- .../clang/lib/Driver/ToolChains/HIPSPV.h | 3 +- .../clang/lib/Driver/ToolChains/HIPUtility.cpp | 2 +- .../clang/lib/Driver/ToolChains/HLSL.cpp | 57 +- .../clang/lib/Driver/ToolChains/HLSL.h | 24 + .../clang/lib/Driver/ToolChains/Hexagon.cpp | 20 +- .../clang/lib/Driver/ToolChains/Hexagon.h | 3 +- .../clang/lib/Driver/ToolChains/Hurd.cpp | 2 +- .../clang/lib/Driver/ToolChains/LazyDetector.h | 45 + .../clang/lib/Driver/ToolChains/Linux.cpp | 87 +- .../clang/lib/Driver/ToolChains/MSP430.cpp | 1 - .../clang/lib/Driver/ToolChains/MSVC.cpp | 65 +- .../clang/lib/Driver/ToolChains/MSVC.h | 10 +- .../clang/lib/Driver/ToolChains/MinGW.cpp | 8 +- .../clang/lib/Driver/ToolChains/MinGW.h | 1 - .../clang/lib/Driver/ToolChains/MipsLinux.cpp | 12 +- .../clang/lib/Driver/ToolChains/MipsLinux.h | 1 - .../clang/lib/Driver/ToolChains/Myriad.cpp | 6 +- .../clang/lib/Driver/ToolChains/NetBSD.cpp | 78 +- .../clang/lib/Driver/ToolChains/OHOS.cpp | 419 + .../clang/lib/Driver/ToolChains/OHOS.h | 95 + .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 41 +- .../clang/lib/Driver/ToolChains/PS4CPU.cpp | 112 +- .../clang/lib/Driver/ToolChains/PS4CPU.h | 9 +- .../clang/lib/Driver/ToolChains/RISCVToolchain.cpp | 12 +- .../clang/lib/Driver/ToolChains/RISCVToolchain.h | 2 +- .../clang/lib/Driver/ToolChains/ROCm.h | 2 +- .../clang/lib/Driver/ToolChains/SPIRV.h | 3 - .../clang/lib/Driver/ToolChains/Solaris.cpp | 7 +- .../clang/lib/Driver/ToolChains/VEToolchain.cpp | 9 +- .../clang/lib/Driver/ToolChains/WebAssembly.cpp | 10 +- .../clang/lib/Driver/ToolChains/WebAssembly.h | 1 - .../clang/lib/Driver/ToolChains/XCore.h | 1 + .../clang/lib/Driver/ToolChains/ZOS.cpp | 310 +- .../llvm-project/clang/lib/Driver/ToolChains/ZOS.h | 56 +- contrib/llvm-project/clang/lib/Driver/Types.cpp | 4 + contrib/llvm-project/clang/lib/Driver/XRayArgs.cpp | 152 +- contrib/llvm-project/clang/lib/ExtractAPI/API.cpp | 5 +- .../clang/lib/ExtractAPI/APIIgnoresList.cpp | 31 +- .../clang/lib/ExtractAPI/AvailabilityInfo.cpp | 4 +- .../clang/lib/ExtractAPI/DeclarationFragments.cpp | 57 +- .../clang/lib/ExtractAPI/ExtractAPIConsumer.cpp | 194 +- .../clang/lib/ExtractAPI/ExtractAPIVisitor.cpp | 560 - .../Serialization/SymbolGraphSerializer.cpp | 107 +- .../ExtractAPI/TypedefUnderlyingTypeResolver.cpp | 2 +- .../clang/lib/Format/AffectedRangeManager.cpp | 2 +- .../clang/lib/Format/BreakableToken.cpp | 10 +- .../clang/lib/Format/ContinuationIndenter.cpp | 89 +- .../clang/lib/Format/DefinitionBlockSeparator.cpp | 10 +- contrib/llvm-project/clang/lib/Format/Format.cpp | 286 +- .../llvm-project/clang/lib/Format/FormatToken.cpp | 17 +- .../llvm-project/clang/lib/Format/FormatToken.h | 295 +- .../clang/lib/Format/FormatTokenLexer.cpp | 49 +- .../clang/lib/Format/FormatTokenLexer.h | 4 + .../clang/lib/Format/FormatTokenSource.h | 267 + .../lib/Format/IntegerLiteralSeparatorFixer.cpp | 4 +- .../clang/lib/Format/MacroExpander.cpp | 34 +- contrib/llvm-project/clang/lib/Format/Macros.h | 21 +- .../clang/lib/Format/NamespaceEndCommentsFixer.cpp | 8 +- .../clang/lib/Format/QualifierAlignmentFixer.cpp | 544 +- .../clang/lib/Format/QualifierAlignmentFixer.h | 41 +- .../clang/lib/Format/SortJavaScriptImports.cpp | 35 +- .../clang/lib/Format/TokenAnalyzer.cpp | 6 +- .../llvm-project/clang/lib/Format/TokenAnalyzer.h | 2 +- .../clang/lib/Format/TokenAnnotator.cpp | 613 +- .../llvm-project/clang/lib/Format/TokenAnnotator.h | 38 +- .../clang/lib/Format/UnwrappedLineFormatter.cpp | 195 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 688 +- .../clang/lib/Format/UnwrappedLineParser.h | 76 +- .../clang/lib/Format/WhitespaceManager.cpp | 195 +- .../clang/lib/Format/WhitespaceManager.h | 7 +- .../clang/lib/Frontend/ASTConsumers.cpp | 25 +- .../llvm-project/clang/lib/Frontend/ASTMerge.cpp | 2 +- .../llvm-project/clang/lib/Frontend/ASTUnit.cpp | 54 +- .../clang/lib/Frontend/CompilerInstance.cpp | 36 +- .../clang/lib/Frontend/CompilerInvocation.cpp | 551 +- .../Frontend/CreateInvocationFromCommandLine.cpp | 2 +- .../clang/lib/Frontend/DependencyFile.cpp | 50 +- .../clang/lib/Frontend/DiagnosticRenderer.cpp | 14 +- .../clang/lib/Frontend/FrontendAction.cpp | 57 +- .../clang/lib/Frontend/FrontendActions.cpp | 28 +- .../clang/lib/Frontend/HeaderIncludeGen.cpp | 49 +- .../clang/lib/Frontend/InitPreprocessor.cpp | 90 +- .../clang/lib/Frontend/LayoutOverrideSource.cpp | 104 +- .../lib/Frontend/ModuleDependencyCollector.cpp | 31 +- .../clang/lib/Frontend/PrecompiledPreamble.cpp | 37 +- .../clang/lib/Frontend/PrintPreprocessedOutput.cpp | 6 +- .../clang/lib/Frontend/Rewrite/FrontendActions.cpp | 9 +- .../lib/Frontend/SerializedDiagnosticPrinter.cpp | 6 +- .../clang/lib/Frontend/TextDiagnostic.cpp | 677 +- .../lib/Frontend/VerifyDiagnosticConsumer.cpp | 4 +- .../lib/FrontendTool/ExecuteCompilerInvocation.cpp | 8 + .../clang/lib/Headers/__clang_cuda_intrinsics.h | 191 + .../clang/lib/Headers/__clang_hip_cmath.h | 2 +- .../lib/Headers/__clang_hip_libdevice_declares.h | 62 +- .../clang/lib/Headers/__clang_hip_math.h | 127 +- .../lib/Headers/__clang_hip_runtime_wrapper.h | 13 + contrib/llvm-project/clang/lib/Headers/adxintrin.h | 203 +- contrib/llvm-project/clang/lib/Headers/altivec.h | 260 +- .../clang/lib/Headers/amxcomplexintrin.h | 169 + contrib/llvm-project/clang/lib/Headers/arm_acle.h | 22 +- .../llvm-project/clang/lib/Headers/avx2intrin.h | 4117 +++++- .../llvm-project/clang/lib/Headers/avx512fintrin.h | 24 +- .../clang/lib/Headers/avx512fp16intrin.h | 20 +- contrib/llvm-project/clang/lib/Headers/avxintrin.h | 27 +- .../clang/lib/Headers/avxvnniint16intrin.h | 473 + .../llvm-project/clang/lib/Headers/bmi2intrin.h | 200 +- .../clang/lib/Headers/clflushoptintrin.h | 9 + .../llvm-project/clang/lib/Headers/clzerointrin.h | 12 +- contrib/llvm-project/clang/lib/Headers/cpuid.h | 10 + .../Headers/cuda_wrappers/bits/shared_ptr_base.h | 9 + contrib/llvm-project/clang/lib/Headers/fmaintrin.h | 564 + .../clang/lib/Headers/hlsl/hlsl_intrinsics.h | 257 + contrib/llvm-project/clang/lib/Headers/immintrin.h | 124 +- contrib/llvm-project/clang/lib/Headers/limits.h | 6 +- .../clang/lib/Headers/llvm_libc_wrappers/ctype.h | 85 + .../lib/Headers/llvm_libc_wrappers/inttypes.h | 34 + .../llvm_libc_wrappers/llvm-libc-decls/README.txt | 6 + .../clang/lib/Headers/llvm_libc_wrappers/stdio.h | 34 + .../clang/lib/Headers/llvm_libc_wrappers/stdlib.h | 42 + .../clang/lib/Headers/llvm_libc_wrappers/string.h | 37 + .../llvm-project/clang/lib/Headers/mwaitxintrin.h | 29 + .../llvm-project/clang/lib/Headers/opencl-c-base.h | 3 + .../__clang_openmp_device_functions.h | 1 - .../clang/lib/Headers/openmp_wrappers/new | 2 +- contrib/llvm-project/clang/lib/Headers/pmmintrin.h | 18 +- .../clang/lib/Headers/ppc_wrappers/emmintrin.h | 3 +- .../clang/lib/Headers/ppc_wrappers/smmintrin.h | 4 +- .../llvm-project/clang/lib/Headers/rdseedintrin.h | 67 +- .../llvm-project/clang/lib/Headers/riscv_ntlh.h | 28 + .../llvm-project/clang/lib/Headers/sha512intrin.h | 200 + contrib/llvm-project/clang/lib/Headers/shaintrin.h | 128 + .../llvm-project/clang/lib/Headers/sifive_vector.h | 16 + contrib/llvm-project/clang/lib/Headers/sm3intrin.h | 238 + contrib/llvm-project/clang/lib/Headers/sm4intrin.h | 269 + contrib/llvm-project/clang/lib/Headers/stdalign.h | 5 + contrib/llvm-project/clang/lib/Headers/stdatomic.h | 11 +- contrib/llvm-project/clang/lib/Headers/stddef.h | 5 + .../llvm-project/clang/lib/Headers/wasm_simd128.h | 144 +- .../llvm-project/clang/lib/Headers/xsavecintrin.h | 50 + contrib/llvm-project/clang/lib/Index/IndexBody.cpp | 20 +- contrib/llvm-project/clang/lib/Index/IndexDecl.cpp | 1 + .../llvm-project/clang/lib/Index/IndexSymbol.cpp | 1 - .../llvm-project/clang/lib/Index/USRGeneration.cpp | 16 + .../clang/lib/Interpreter/DeviceOffload.cpp | 176 + .../clang/lib/Interpreter/DeviceOffload.h | 51 + .../clang/lib/Interpreter/IncrementalExecutor.cpp | 27 +- .../clang/lib/Interpreter/IncrementalExecutor.h | 6 +- .../clang/lib/Interpreter/IncrementalParser.cpp | 149 +- .../clang/lib/Interpreter/IncrementalParser.h | 19 +- .../clang/lib/Interpreter/Interpreter.cpp | 564 +- .../clang/lib/Interpreter/InterpreterUtils.cpp | 111 + .../clang/lib/Interpreter/InterpreterUtils.h | 54 + .../llvm-project/clang/lib/Interpreter/Value.cpp | 266 + .../clang/lib/Lex/DependencyDirectivesScanner.cpp | 131 +- contrib/llvm-project/clang/lib/Lex/HeaderMap.cpp | 6 +- .../llvm-project/clang/lib/Lex/HeaderSearch.cpp | 159 +- .../clang/lib/Lex/InitHeaderSearch.cpp | 33 +- contrib/llvm-project/clang/lib/Lex/Lexer.cpp | 38 +- .../llvm-project/clang/lib/Lex/LiteralSupport.cpp | 148 +- contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp | 281 +- .../llvm-project/clang/lib/Lex/PPDirectives.cpp | 220 +- .../llvm-project/clang/lib/Lex/PPExpressions.cpp | 10 +- .../llvm-project/clang/lib/Lex/PPLexerChange.cpp | 43 +- .../clang/lib/Lex/PPMacroExpansion.cpp | 30 +- contrib/llvm-project/clang/lib/Lex/Pragma.cpp | 134 +- .../clang/lib/Lex/PreprocessingRecord.cpp | 7 +- .../llvm-project/clang/lib/Lex/Preprocessor.cpp | 79 +- contrib/llvm-project/clang/lib/Lex/TokenLexer.cpp | 5 +- contrib/llvm-project/clang/lib/Parse/ParseAST.cpp | 22 +- .../clang/lib/Parse/ParseCXXInlineMethods.cpp | 10 +- contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 431 +- .../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 139 +- contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 77 +- .../llvm-project/clang/lib/Parse/ParseExprCXX.cpp | 190 +- contrib/llvm-project/clang/lib/Parse/ParseHLSL.cpp | 2 +- contrib/llvm-project/clang/lib/Parse/ParseInit.cpp | 27 +- contrib/llvm-project/clang/lib/Parse/ParseObjc.cpp | 7 +- .../llvm-project/clang/lib/Parse/ParseOpenMP.cpp | 104 +- .../llvm-project/clang/lib/Parse/ParsePragma.cpp | 68 +- contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp | 49 +- .../llvm-project/clang/lib/Parse/ParseTemplate.cpp | 47 +- .../clang/lib/Parse/ParseTentative.cpp | 134 +- contrib/llvm-project/clang/lib/Parse/Parser.cpp | 64 +- .../llvm-project/clang/lib/Rewrite/Rewriter.cpp | 77 +- .../clang/lib/Sema/AnalysisBasedWarnings.cpp | 233 +- .../clang/lib/Sema/CodeCompleteConsumer.cpp | 3 + .../clang/lib/Sema/HLSLExternalSemaSource.cpp | 4 +- .../clang/lib/Sema/IdentifierResolver.cpp | 9 +- .../clang/lib/Sema/JumpDiagnostics.cpp | 147 +- .../clang/lib/Sema/MultiplexExternalSemaSource.cpp | 6 + contrib/llvm-project/clang/lib/Sema/ParsedAttr.cpp | 23 +- contrib/llvm-project/clang/lib/Sema/Scope.cpp | 6 +- contrib/llvm-project/clang/lib/Sema/ScopeInfo.cpp | 1 + contrib/llvm-project/clang/lib/Sema/Sema.cpp | 158 +- contrib/llvm-project/clang/lib/Sema/SemaAccess.cpp | 10 + contrib/llvm-project/clang/lib/Sema/SemaAttr.cpp | 6 +- .../clang/lib/Sema/SemaCXXScopeSpec.cpp | 112 +- contrib/llvm-project/clang/lib/Sema/SemaCast.cpp | 70 +- .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 1544 +- .../clang/lib/Sema/SemaCodeComplete.cpp | 56 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 225 +- .../llvm-project/clang/lib/Sema/SemaCoroutine.cpp | 168 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 420 +- .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 410 +- .../llvm-project/clang/lib/Sema/SemaDeclCXX.cpp | 573 +- .../clang/lib/Sema/SemaExceptionSpec.cpp | 6 + contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 1238 +- .../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 167 +- .../llvm-project/clang/lib/Sema/SemaExprMember.cpp | 9 +- .../llvm-project/clang/lib/Sema/SemaExprObjC.cpp | 4 + contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 648 +- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 796 +- contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 251 +- contrib/llvm-project/clang/lib/Sema/SemaModule.cpp | 314 +- .../clang/lib/Sema/SemaObjCProperty.cpp | 13 +- contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 804 +- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 391 +- .../clang/lib/Sema/SemaPseudoObject.cpp | 7 +- .../clang/lib/Sema/SemaRISCVVectorLookup.cpp | 114 +- contrib/llvm-project/clang/lib/Sema/SemaSYCL.cpp | 16 - contrib/llvm-project/clang/lib/Sema/SemaStmt.cpp | 108 +- .../llvm-project/clang/lib/Sema/SemaStmtAsm.cpp | 1 + .../llvm-project/clang/lib/Sema/SemaStmtAttr.cpp | 85 +- .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 201 +- .../clang/lib/Sema/SemaTemplateDeduction.cpp | 208 +- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 140 +- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 143 +- .../clang/lib/Sema/SemaTemplateVariadic.cpp | 5 +- contrib/llvm-project/clang/lib/Sema/SemaType.cpp | 305 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 448 +- .../clang/lib/Serialization/ASTCommon.cpp | 8 +- .../clang/lib/Serialization/ASTReader.cpp | 371 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 270 +- .../clang/lib/Serialization/ASTReaderInternals.h | 3 + .../clang/lib/Serialization/ASTReaderStmt.cpp | 58 +- .../clang/lib/Serialization/ASTWriter.cpp | 311 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 166 +- .../clang/lib/Serialization/ASTWriterStmt.cpp | 34 +- .../clang/lib/Serialization/GlobalModuleIndex.cpp | 20 +- .../clang/lib/Serialization/ModuleManager.cpp | 6 +- .../lib/Serialization/PCHContainerOperations.cpp | 5 + .../Checkers/AnalyzerStatsChecker.cpp | 13 +- .../Checkers/ArrayBoundCheckerV2.cpp | 362 +- .../Checkers/BasicObjCFoundationChecks.cpp | 106 +- .../lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 356 +- .../StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 10 +- .../StaticAnalyzer/Checkers/ContainerModeling.cpp | 8 +- .../StaticAnalyzer/Checkers/DeadStoresChecker.cpp | 6 +- .../lib/StaticAnalyzer/Checkers/DebugCheckers.cpp | 5 +- .../lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp | 46 +- .../Checkers/DynamicTypePropagation.cpp | 14 +- .../lib/StaticAnalyzer/Checkers/ErrnoModeling.cpp | 17 +- .../lib/StaticAnalyzer/Checkers/ErrnoModeling.h | 8 - .../Checkers/ExprInspectionChecker.cpp | 3 +- .../Checkers/FuchsiaHandleChecker.cpp | 7 +- .../Checkers/GenericTaintChecker.cpp | 188 +- .../clang/lib/StaticAnalyzer/Checkers/Iterator.cpp | 4 +- .../StaticAnalyzer/Checkers/IteratorModeling.cpp | 20 +- .../Checkers/IvarInvalidationChecker.cpp | 37 +- .../Checkers/LocalizationChecker.cpp | 10 +- .../Checkers/MacOSKeychainAPIChecker.cpp | 21 +- .../lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 85 +- .../Checkers/MallocOverflowSecurityChecker.cpp | 10 +- .../Checkers/MallocSizeofChecker.cpp | 32 +- .../lib/StaticAnalyzer/Checkers/MoveChecker.cpp | 23 +- .../Checkers/NSAutoreleasePoolChecker.cpp | 2 +- .../StaticAnalyzer/Checkers/NullabilityChecker.cpp | 97 +- .../Checkers/ObjCMissingSuperCallChecker.cpp | 4 +- .../Checkers/ObjCSelfInitChecker.cpp | 13 +- .../Checkers/ObjCUnusedIVarsChecker.cpp | 21 +- .../lib/StaticAnalyzer/Checkers/PaddingChecker.cpp | 2 +- .../Checkers/PointerArithChecker.cpp | 7 +- .../StaticAnalyzer/Checkers/PthreadLockChecker.cpp | 1 + .../RetainCountChecker/RetainCountChecker.cpp | 10 +- .../RetainCountChecker/RetainCountDiagnostics.cpp | 6 +- .../Checkers/STLAlgorithmModeling.cpp | 2 +- .../Checkers/SimpleStreamChecker.cpp | 12 +- .../StaticAnalyzer/Checkers/SmartPtrModeling.cpp | 8 +- .../Checkers/StackAddrEscapeChecker.cpp | 18 +- .../Checkers/StdLibraryFunctionsChecker.cpp | 1782 ++- .../lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 59 +- .../clang/lib/StaticAnalyzer/Checkers/Taint.cpp | 194 +- .../Checkers/TestAfterDivZeroChecker.cpp | 5 +- .../Checkers/TrustNonnullChecker.cpp | 3 +- .../Checkers/UndefCapturedBlockVarChecker.cpp | 9 +- .../StaticAnalyzer/Checkers/UndefResultChecker.cpp | 2 +- .../Checkers/UnreachableCodeChecker.cpp | 28 +- .../lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp | 59 +- .../WebKit/UncountedLambdaCapturesChecker.cpp | 2 +- .../clang/lib/StaticAnalyzer/Core/APSIntType.cpp | 4 +- .../lib/StaticAnalyzer/Core/AnalysisManager.cpp | 11 +- .../lib/StaticAnalyzer/Core/BasicValueFactory.cpp | 20 +- .../clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 15 +- .../StaticAnalyzer/Core/BugReporterVisitors.cpp | 29 +- .../clang/lib/StaticAnalyzer/Core/CallEvent.cpp | 40 +- .../lib/StaticAnalyzer/Core/CheckerContext.cpp | 1 + .../StaticAnalyzer/Core/CommonBugCategories.cpp | 1 + .../clang/lib/StaticAnalyzer/Core/Environment.cpp | 2 +- .../lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 23 +- .../clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 67 +- .../clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 111 +- .../lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 124 +- .../Core/ExprEngineCallAndReturn.cpp | 20 +- .../lib/StaticAnalyzer/Core/ExprEngineObjC.cpp | 4 +- .../lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 6 +- .../clang/lib/StaticAnalyzer/Core/MemRegion.cpp | 214 +- .../lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 16 +- .../clang/lib/StaticAnalyzer/Core/ProgramState.cpp | 25 +- .../StaticAnalyzer/Core/RangeConstraintManager.cpp | 2 +- .../clang/lib/StaticAnalyzer/Core/RegionStore.cpp | 113 +- .../clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | 1 - .../clang/lib/StaticAnalyzer/Core/SVals.cpp | 3 + .../clang/lib/StaticAnalyzer/Core/Store.cpp | 7 +- .../lib/StaticAnalyzer/Core/SymbolManager.cpp | 36 +- .../lib/StaticAnalyzer/Core/TextDiagnostics.cpp | 5 +- .../StaticAnalyzer/Frontend/CheckerRegistry.cpp | 3 +- .../lib/StaticAnalyzer/Frontend/ModelConsumer.cpp | 7 +- .../clang/lib/Support/RISCVVIntrinsicUtils.cpp | 150 +- .../clang/lib/Testing/CommandLineArgs.cpp | 15 + contrib/llvm-project/clang/lib/Testing/TestAST.cpp | 5 +- .../clang/lib/Tooling/CompilationDatabase.cpp | 2 +- .../DependencyScanningFilesystem.cpp | 12 +- .../DependencyScanning/DependencyScanningTool.cpp | 145 +- .../DependencyScanningWorker.cpp | 124 +- .../DependencyScanning/ModuleDepCollector.cpp | 59 +- .../clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp | 2 +- .../ExpandResponseFilesCompilationDatabase.cpp | 30 +- .../lib/Tooling/Inclusions/HeaderAnalysis.cpp | 2 +- .../lib/Tooling/Inclusions/HeaderIncludes.cpp | 9 +- .../Tooling/Inclusions/Stdlib}/CSymbolMap.inc | 0 .../Tooling/Inclusions/Stdlib/StandardLibrary.cpp | 245 +- .../Inclusions/Stdlib/StdSpecialSymbolMap.inc | 722 + .../lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc | 3819 +++++ .../Tooling/Inclusions/Stdlib/StdTsSymbolMap.inc | 52 + .../clang/lib/Tooling/JSONCompilationDatabase.cpp | 4 +- .../Tooling/Refactoring/Rename/USRLocFinder.cpp | 21 +- .../clang/lib/Tooling/Syntax/Tokens.cpp | 64 +- contrib/llvm-project/clang/lib/Tooling/Tooling.cpp | 46 +- .../clang/lib/Tooling/Transformer/Stencil.cpp | 2 +- .../clang/tools/amdgpu-arch/AMDGPUArch.cpp | 138 +- .../clang/tools/amdgpu-arch/AMDGPUArchByHIP.cpp | 96 + .../clang/tools/amdgpu-arch/AMDGPUArchByHSA.cpp | 122 + .../clang/tools/clang-repl/ClangRepl.cpp | 82 +- .../llvm-project/clang/tools/driver/cc1_main.cpp | 28 +- .../llvm-project/clang/tools/driver/cc1as_main.cpp | 23 +- .../clang/tools/driver/cc1gen_reproducer_main.cpp | 17 +- contrib/llvm-project/clang/tools/driver/driver.cpp | 84 +- *** 1018706 LINES SKIPPED *** From nobody Sun Jan 7 17:50:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqN5Vd8z55XKS; Sun, 7 Jan 2024 17:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7PqN4H5Hz4MJy; Sun, 7 Jan 2024 17:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4LT7zmgCcYVILzoU4E9c4iX1slrbIFjjZK0HSl49syU=; b=mecUiy20S+jTCyX/nF1A6+8SzEeOzdqwlPRxjeRyqvzmxYyuYkTK1RCB2tvkpgUdv7aTCG luTF9hLNyjO3nlwkkeGuF/MSXPA2ViTqXSfXNrYk/cwwM+P3DYxLHQ3eaDmKDIeI9rlanW ezTMgckbP8xXeBQnyBirSD8oue/W0qLEOsOPwT49SDwAt9M1zgowhBGkrXRLlCoWvl7Pr2 NtwZMOnt2MYQjWOX9a7o810YHzTKMBUtjncNNmw3D96dku4ICEkyFfx5scARbSv/zvn5Fy OGuyj4wvjFr5o7+h2rcYlgoJw9pBYasyxvv0Gh2IIzeVjxUragqYS5lShMNgyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4LT7zmgCcYVILzoU4E9c4iX1slrbIFjjZK0HSl49syU=; b=tE7AgyjyRUMtGtOoV+k7Bxaak1hPrPoSLKdcHxE5JDO2stJ7Hmw0nLJ1cZ5H/uSVXcfs4T U+LVdjhwO0elir50Aix8G6RMUrReGtJWFrQytan+Id12WljX2muk23389bPHp6uoVbPh0f SpykSWUpaRB4zK5S8Jx7SVxrNpThnOHpMRC5HaSNGnCB/iuBxrx5gYw3MZKRIth297rfrT ig6mLZmMc+pQwVarEj+miAvVgTnt+/LxfcHesmCKByG48IedPXAbhl17BNpFO8TBff0qev w7QQLL9RTZ9DxQCvktU/Y0KDfxAm513Bf43BIS16FXQqXSuX56dk7QQIJaJvIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649824; a=rsa-sha256; cv=none; b=SCc8FMlzb90I6jqVDbMf6o4TziOWEukkHCn2cfZdsk0xQ3j2ayDbF7bYVv5a4g4HCwMGpl g+iQKskNkSzoJpq89XXVo4hDAnkuXENW/5QTLhBWFpZijR1dbLOLIIe7AkRfwMRjUJeGxf EQ4oGPFxdJLzrXJOsitwYcpesXCZDz0n0aLTzx7khxGY2d7Us0G6pWSbbCTSeO7h6YvMql MZiIlbKOPVAYcVR6ThJ/3+okXG7dUT/e7XC0q4VG6TzAv+mHe6YWG/po2Rbo3gpW2sx13c gRE2VP1Vl69Xpef913f+V1vQ/fwWZNOhMroxYIAa9CMHrieuKMEnjD9AEpwp7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqN2snszYyv; Sun, 7 Jan 2024 17:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407HoOW6021888; Sun, 7 Jan 2024 17:50:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoNDP021885; Sun, 7 Jan 2024 17:50:23 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:23 GMT Message-Id: <202401071750.407HoNDP021885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 271697da6856 - stable/14 - Merge llvm-project release/17.x llvmorg-17.0.0-rc4-10-g0176e8729ea4 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 271697da6856a1357b397bf795eb95a998fe7483 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=271697da6856a1357b397bf795eb95a998fe7483 commit 271697da6856a1357b397bf795eb95a998fe7483 Author: Dimitry Andric AuthorDate: 2023-09-11 18:37:24 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:18 +0000 Merge llvm-project release/17.x llvmorg-17.0.0-rc4-10-g0176e8729ea4 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.0-rc4-10-g0176e8729ea4. PR: 273753 MFC after: 1 month (cherry picked from commit 8a4dda33d67586ca2624f2a38417baa03a533a7f) --- .../clang/include/clang/AST/DeclBase.h | 6 +- .../clang/include/clang/AST/ExprConcepts.h | 14 +- .../clang/include/clang/Basic/CodeGenOptions.def | 1 - .../include/clang/Basic/DiagnosticASTKinds.td | 2 + .../clang/include/clang/Basic/DiagnosticGroups.td | 1 + .../include/clang/Basic/DiagnosticLexKinds.td | 4 + .../clang/include/clang/Basic/Sanitizers.h | 4 + .../clang/include/clang/Basic/TargetInfo.h | 4 +- .../clang/include/clang/Basic/riscv_vector.td | 52 +--- .../clang/include/clang/CodeGen/CGFunctionInfo.h | 29 +- .../clang/include/clang/Driver/Options.td | 14 +- .../clang/include/clang/Driver/ToolChain.h | 2 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 2 - contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 5 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 27 +- .../clang/lib/Basic/Targets/LoongArch.cpp | 21 +- .../clang/lib/Basic/Targets/LoongArch.h | 13 + .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 4 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.h | 14 +- .../llvm-project/clang/lib/CodeGen/BackendUtil.cpp | 23 +- .../llvm-project/clang/lib/CodeGen/CGCXXABI.cpp | 3 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 244 +++++++++------- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 29 ++ contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 106 ++++++- .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 33 +++ .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.h | 2 +- contrib/llvm-project/clang/lib/CodeGen/CGDecl.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/CGDeclCXX.cpp | 4 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 9 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 2 +- .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 11 +- .../clang/lib/CodeGen/CodeGenABITypes.cpp | 5 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 26 +- .../clang/lib/CodeGen/CodeGenFunction.h | 19 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 34 ++- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 20 +- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 12 +- .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 2 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 3 +- .../clang/lib/CodeGen/Targets/LoongArch.cpp | 11 +- .../clang/lib/CodeGen/Targets/RISCV.cpp | 24 +- .../llvm-project/clang/lib/CodeGen/Targets/X86.cpp | 16 +- contrib/llvm-project/clang/lib/Driver/Driver.cpp | 17 +- .../clang/lib/Driver/SanitizerArgs.cpp | 32 +++ .../llvm-project/clang/lib/Driver/ToolChain.cpp | 6 + .../clang/lib/Driver/ToolChains/AIX.cpp | 6 + .../clang/lib/Driver/ToolChains/Arch/LoongArch.cpp | 43 +-- .../clang/lib/Driver/ToolChains/Arch/LoongArch.h | 6 + .../clang/lib/Driver/ToolChains/Arch/X86.cpp | 6 + .../clang/lib/Driver/ToolChains/Clang.cpp | 39 +-- .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 9 +- .../clang/lib/Driver/ToolChains/Gnu.cpp | 22 +- .../clang/lib/Driver/ToolChains/Hexagon.cpp | 5 + .../clang/lib/Driver/ToolChains/Solaris.cpp | 41 ++- .../clang/lib/Format/UnwrappedLineParser.cpp | 5 +- .../clang/lib/Frontend/FrontendAction.cpp | 5 + .../clang/lib/Headers/__clang_cuda_math.h | 2 +- .../lib/Headers/__clang_hip_libdevice_declares.h | 2 +- contrib/llvm-project/clang/lib/Headers/cpuid.h | 10 - .../clang/lib/Interpreter/IncrementalExecutor.cpp | 19 +- .../llvm-project/clang/lib/Lex/LiteralSupport.cpp | 41 ++- .../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 19 +- .../clang/lib/Parse/ParseTentative.cpp | 1 + .../clang/lib/Sema/SemaAvailability.cpp | 12 + contrib/llvm-project/clang/lib/Sema/SemaCast.cpp | 8 + contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 95 +++---- .../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 25 +- contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 68 +++-- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 17 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 4 + .../clang/lib/Serialization/ASTReaderDecl.cpp | 66 +++-- .../clang/lib/Serialization/ASTWriterDecl.cpp | 4 +- .../lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc | 54 ++++ .../compiler-rt/lib/asan/asan_interceptors.cpp | 56 ++-- .../compiler-rt/lib/asan/asan_interceptors.h | 2 - .../compiler-rt/lib/asan/asan_win_dll_thunk.cpp | 2 + .../compiler-rt/lib/builtins/aarch64/lse.S | 40 ++- .../compiler-rt/lib/builtins/clear_cache.c | 2 +- .../compiler-rt/lib/builtins/cpu_model.c | 5 +- .../compiler-rt/lib/interception/interception.h | 2 +- .../compiler-rt/lib/msan/msan_interceptors.cpp | 37 +++ .../compiler-rt/lib/profile/InstrProfilingFile.c | 10 +- .../sanitizer_common_interceptors.inc | 73 +++-- .../sanitizer_common_interceptors_format.inc | 16 +- .../sanitizer_stacktrace_sparc.cpp | 6 - .../sanitizer_unwind_linux_libcdep.cpp | 6 - .../symbolizer/scripts/global_symbols.txt | 7 + .../libcxx/include/__algorithm/pstl_sort.h | 1 + contrib/llvm-project/libcxx/include/__config | 36 ++- .../libcxx/include/__format/format_functions.h | 3 + .../__locale_dir/locale_base_api/locale_guard.h | 1 + .../llvm-project/libcxx/include/__mdspan/extents.h | 63 +++-- .../libcxx/include/__mdspan/layout_left.h | 32 ++- .../libcxx/include/__mdspan/layout_right.h | 30 +- .../llvm-project/libcxx/include/__mdspan/mdspan.h | 308 +++++++++++++++++++++ .../llvm-project/libcxx/include/__std_clang_module | 226 +++++++++++++++ .../__type_traits/is_nothrow_constructible.h | 3 +- contrib/llvm-project/libcxx/include/mdspan | 130 +++++++++ .../libcxx/include/module.modulemap.in | 65 ++--- contrib/llvm-project/libcxx/include/sstream | 50 ++-- .../llvm-project/libcxx/modules/std/atomic.cppm | 3 - .../llvm-project/libcxx/modules/std/execution.cppm | 2 +- .../libcxx/modules/std/filesystem.cppm | 4 +- .../llvm-project/libcxx/modules/std/mdspan.cppm | 2 +- contrib/llvm-project/libcxx/src/chrono.cpp | 2 +- .../libcxx/src/filesystem/filesystem_clock.cpp | 2 +- .../llvm-project/libunwind/src/Unwind-EHABI.cpp | 7 +- contrib/llvm-project/lld/ELF/Arch/LoongArch.cpp | 7 + contrib/llvm-project/lld/ELF/Arch/PPC.cpp | 12 +- contrib/llvm-project/lld/ELF/Arch/PPC64.cpp | 86 ++++-- contrib/llvm-project/lld/ELF/Target.h | 1 + contrib/llvm-project/lld/docs/ReleaseNotes.rst | 5 + .../ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp | 42 ++- .../Process/Utility/RegisterContextPOSIX_arm64.cpp | 4 + .../Process/Utility/RegisterContextPOSIX_arm64.h | 1 + .../Process/Utility/RegisterInfoPOSIX_arm64.h | 1 + .../elf-core/RegisterContextPOSIXCore_arm64.cpp | 14 + .../elf-core/RegisterContextPOSIXCore_arm64.h | 1 + .../Plugins/Process/elf-core/RegisterUtilities.h | 4 + .../llvm/include/llvm/ADT/FunctionExtras.h | 12 +- .../llvm/include/llvm/ADT/SmallVector.h | 4 +- .../llvm/include/llvm/Analysis/LazyValueInfo.h | 3 + .../llvm/include/llvm/Analysis/RegionInfoImpl.h | 4 +- .../llvm/include/llvm/Analysis/ValueTracking.h | 4 - .../llvm/include/llvm/CodeGen/CodeGenPassBuilder.h | 2 +- .../llvm/include/llvm/CodeGen/LowLevelType.h | 7 +- .../llvm/CodeGen/PreISelIntrinsicLowering.h | 4 + .../llvm/include/llvm/CodeGen/TargetInstrInfo.h | 17 -- .../llvm-project/llvm/include/llvm/Object/Wasm.h | 10 +- .../llvm/include/llvm/ObjectYAML/WasmYAML.h | 1 + .../llvm/include/llvm/Option/ArgList.h | 1 + .../llvm/include/llvm/Support/type_traits.h | 38 --- .../llvm/TargetParser/LoongArchTargetParser.h | 5 +- .../AggressiveInstCombine/AggressiveInstCombine.h | 2 +- .../llvm/Transforms/IPO/FunctionSpecialization.h | 15 +- .../llvm/Transforms/Scalar/MemCpyOptimizer.h | 4 - .../llvm/lib/Analysis/LazyValueInfo.cpp | 9 + .../llvm/lib/Analysis/ScalarEvolution.cpp | 2 +- .../llvm/lib/Analysis/ValueTracking.cpp | 7 - .../llvm/lib/CodeGen/CalcSpillWeights.cpp | 15 +- .../llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp | 30 +- .../llvm/lib/CodeGen/InlineSpiller.cpp | 34 ++- .../llvm/lib/CodeGen/LiveRangeEdit.cpp | 3 +- .../llvm/lib/CodeGen/LiveRangeShrink.cpp | 4 +- .../llvm-project/llvm/lib/CodeGen/MachineLICM.cpp | 4 + .../llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp | 54 ++-- .../llvm/lib/CodeGen/RegAllocGreedy.cpp | 21 +- .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 + .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 99 ++++--- contrib/llvm-project/llvm/lib/CodeGen/SplitKit.cpp | 17 +- contrib/llvm-project/llvm/lib/CodeGen/SplitKit.h | 7 +- .../llvm/lib/CodeGen/TargetInstrInfo.cpp | 7 +- .../llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 +- .../lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 21 +- contrib/llvm-project/llvm/lib/LTO/LTO.cpp | 7 +- .../llvm/lib/ObjCopy/wasm/WasmObject.h | 1 + .../llvm/lib/ObjCopy/wasm/WasmReader.cpp | 4 +- .../llvm/lib/ObjCopy/wasm/WasmWriter.cpp | 13 +- .../llvm-project/llvm/lib/Object/SymbolSize.cpp | 17 +- .../llvm/lib/Object/WasmObjectFile.cpp | 4 + .../llvm/lib/ObjectYAML/WasmEmitter.cpp | 12 +- .../llvm-project/llvm/lib/ObjectYAML/WasmYAML.cpp | 1 + contrib/llvm-project/llvm/lib/Option/ArgList.cpp | 7 + .../llvm-project/llvm/lib/TableGen/TGParser.cpp | 9 +- .../llvm/lib/Target/AArch64/AArch64.td | 6 +- .../lib/Target/AArch64/AArch64FrameLowering.cpp | 13 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 69 +++-- .../llvm/lib/Target/AArch64/AArch64InstrFormats.td | 9 +- .../llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 11 +- .../llvm/lib/Target/AArch64/AArch64InstrInfo.td | 20 +- .../Target/AArch64/AArch64LoadStoreOptimizer.cpp | 8 +- .../llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | 49 ++-- .../llvm/lib/Target/AArch64/AArch64Subtarget.h | 2 +- .../Target/AArch64/GISel/AArch64CallLowering.cpp | 5 + .../llvm/lib/Target/AArch64/SVEInstrFormats.td | 7 + .../llvm-project/llvm/lib/Target/AMDGPU/AMDGPU.h | 4 - .../llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 37 ++- .../llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h | 2 +- .../llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp | 47 +++- .../llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h | 2 +- .../llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp | 16 +- .../llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp | 4 - .../llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | 16 +- .../llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 2 +- .../llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 7 +- .../llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 45 +-- .../llvm/lib/Target/AMDGPU/SIInstrInfo.h | 19 +- .../llvm/lib/Target/AMDGPU/SIInstructions.td | 7 - .../llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp | 136 ++------- .../llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp | 141 ---------- .../lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | 69 ++--- .../llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h | 39 ++- .../llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp | 23 +- .../llvm/lib/Target/AMDGPU/SIRegisterInfo.h | 17 +- .../llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp | 2 + .../Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp | 6 +- .../llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp | 26 +- .../llvm-project/llvm/lib/Target/BPF/BTFDebug.cpp | 2 + .../llvm/lib/Target/LoongArch/LoongArch.td | 5 + .../lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp | 50 +++- .../Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp | 14 +- .../llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 37 +-- .../llvm/lib/Target/PowerPC/PPCInstrFormats.td | 6 + .../llvm/lib/Target/PowerPC/PPCInstrInfo.td | 9 + .../llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 4 - .../llvm/lib/Target/PowerPC/PPCScheduleP9.td | 2 +- .../llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 15 +- .../Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp | 9 + .../llvm/lib/Target/RISCV/RISCVFrameLowering.cpp | 39 +-- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 13 +- .../llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 26 +- .../lib/Target/RISCV/RISCVPushPopOptimizer.cpp | 3 +- .../llvm/lib/Target/Sparc/SparcInstrInfo.td | 16 ++ .../Target/SystemZ/SystemZTargetTransformInfo.cpp | 5 + contrib/llvm-project/llvm/lib/Target/X86/X86.td | 7 + .../llvm/lib/Target/X86/X86ISelLowering.cpp | 96 ++++--- .../llvm/lib/Target/X86/X86ISelLowering.h | 2 - .../llvm/lib/Target/X86/X86InstrAVX512.td | 10 + .../llvm/lib/Target/X86/X86InstrSSE.td | 5 + .../llvm/lib/Target/X86/X86TargetTransformInfo.cpp | 14 +- .../llvm/lib/Target/X86/X86TargetTransformInfo.h | 1 + .../llvm-project/llvm/lib/TargetParser/Host.cpp | 10 +- .../lib/TargetParser/LoongArchTargetParser.cpp | 12 + .../AggressiveInstCombine.cpp | 217 ++++----------- .../llvm/lib/Transforms/Coroutines/CoroElide.cpp | 83 ++++-- .../lib/Transforms/IPO/FunctionSpecialization.cpp | 82 +----- .../InstCombine/InstructionCombining.cpp | 2 +- .../Instrumentation/ControlHeightReduction.cpp | 14 + .../Transforms/Instrumentation/GCOVProfiling.cpp | 4 +- .../Transforms/Scalar/ConstraintElimination.cpp | 2 +- .../llvm/lib/Transforms/Scalar/JumpThreading.cpp | 2 + .../llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp | 256 +---------------- .../Transforms/Scalar/TailRecursionElimination.cpp | 6 + .../llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 14 +- .../lib/Transforms/Vectorize/LoopVectorize.cpp | 38 ++- .../llvm/tools/llvm-readobj/ELFDumper.cpp | 2 +- .../openmp/runtime/src/ompt-event-specific.h | 13 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/libc++/__config_site | 1 + lib/libc++/module.modulemap | 65 ++--- 249 files changed, 3393 insertions(+), 2248 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h index 1b99709ca90d..12137387b676 100644 --- a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h +++ b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h @@ -1702,7 +1702,7 @@ class DeclContext { }; /// Number of non-inherited bits in FunctionDeclBitfields. - enum { NumFunctionDeclBits = 30 }; + enum { NumFunctionDeclBits = 31 }; /// Stores the bits used by CXXConstructorDecl. If modified /// NumCXXConstructorDeclBits and the accessor @@ -1714,12 +1714,12 @@ class DeclContext { /// For the bits in FunctionDeclBitfields. uint64_t : NumFunctionDeclBits; - /// 21 bits to fit in the remaining available space. + /// 20 bits to fit in the remaining available space. /// Note that this makes CXXConstructorDeclBitfields take /// exactly 64 bits and thus the width of NumCtorInitializers /// will need to be shrunk if some bit is added to NumDeclContextBitfields, /// NumFunctionDeclBitfields or CXXConstructorDeclBitfields. - uint64_t NumCtorInitializers : 18; + uint64_t NumCtorInitializers : 17; uint64_t IsInheritingConstructor : 1; /// Whether this constructor has a trail-allocated explicit specifier. diff --git a/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h b/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h index d900e980852b..13d4568119eb 100644 --- a/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h +++ b/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h @@ -14,20 +14,21 @@ #ifndef LLVM_CLANG_AST_EXPRCONCEPTS_H #define LLVM_CLANG_AST_EXPRCONCEPTS_H -#include "clang/AST/ASTContext.h" #include "clang/AST/ASTConcept.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" -#include "clang/AST/DeclarationName.h" #include "clang/AST/DeclTemplate.h" +#include "clang/AST/DeclarationName.h" #include "clang/AST/Expr.h" #include "clang/AST/NestedNameSpecifier.h" #include "clang/AST/TemplateBase.h" #include "clang/AST/Type.h" #include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/TrailingObjects.h" -#include #include +#include namespace clang { class ASTStmtReader; @@ -467,6 +468,13 @@ public: } }; +using EntityPrinter = llvm::function_ref; + +/// \brief create a Requirement::SubstitutionDiagnostic with only a +/// SubstitutedEntity and DiagLoc using Sema's allocator. +Requirement::SubstitutionDiagnostic * +createSubstDiagAt(Sema &S, SourceLocation Location, EntityPrinter Printer); + } // namespace concepts /// C++2a [expr.prim.req]: diff --git a/contrib/llvm-project/clang/include/clang/Basic/CodeGenOptions.def b/contrib/llvm-project/clang/include/clang/Basic/CodeGenOptions.def index 11aec88c5335..d492b8681c5d 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/CodeGenOptions.def +++ b/contrib/llvm-project/clang/include/clang/Basic/CodeGenOptions.def @@ -165,7 +165,6 @@ CODEGENOPT(PrepareForThinLTO , 1, 0) ///< Set when -flto=thin is enabled on the ///< compile step. CODEGENOPT(LTOUnit, 1, 0) ///< Emit IR to support LTO unit features (CFI, whole ///< program vtable opt). -CODEGENOPT(FatLTO, 1, 0) ///< Set when -ffat-lto-objects is enabled. CODEGENOPT(EnableSplitLTOUnit, 1, 0) ///< Enable LTO unit splitting to support /// CFI and traditional whole program /// devirtualization that require whole diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td index 566cdc340605..0794ed7ba683 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -70,6 +70,8 @@ def note_consteval_address_accessible : Note< "is not a constant expression">; def note_constexpr_uninitialized : Note< "subobject %0 is not initialized">; +def note_constexpr_uninitialized_base : Note< + "constructor of base class %0 is not called">; def note_constexpr_static_local : Note< "control flows through the definition of a %select{static|thread_local}0 variable">; def note_constexpr_subobject_declared_here : Note< diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticGroups.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticGroups.td index 7b4d415bf064..26bc88a980e4 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticGroups.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticGroups.td @@ -20,6 +20,7 @@ def DeprecatedStaticAnalyzerFlag : DiagGroup<"deprecated-static-analyzer-flag">; // Empty DiagGroups are recognized by clang but ignored. def ODR : DiagGroup<"odr">; def : DiagGroup<"abi">; +def : DiagGroup<"gnu-empty-initializer">; // Now a C extension, not GNU. def AbsoluteValue : DiagGroup<"absolute-value">; def MisspelledAssumption : DiagGroup<"misspelled-assumption">; def UnknownAssumption : DiagGroup<"unknown-assumption">; diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticLexKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticLexKinds.td index 0eb270aeea0e..6ad691975bd5 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticLexKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticLexKinds.td @@ -285,6 +285,10 @@ def ext_ms_reserved_user_defined_literal : ExtWarn< def err_unsupported_string_concat : Error< "unsupported non-standard concatenation of string literals">; +def warn_unevaluated_string_prefix : Warning< + "encoding prefix '%0' on an unevaluated string literal has no effect" + "%select{| and is incompatible with c++2c}1">, + InGroup>; def err_unevaluated_string_prefix : Error< "an unevaluated string literal cannot have an encoding prefix">; def err_unevaluated_string_udl : Error< diff --git a/contrib/llvm-project/clang/include/clang/Basic/Sanitizers.h b/contrib/llvm-project/clang/include/clang/Basic/Sanitizers.h index db53010645ae..4659e45c7883 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/Sanitizers.h +++ b/contrib/llvm-project/clang/include/clang/Basic/Sanitizers.h @@ -23,7 +23,11 @@ namespace llvm { class hash_code; +class Triple; +namespace opt { +class ArgList; } +} // namespace llvm namespace clang { diff --git a/contrib/llvm-project/clang/include/clang/Basic/TargetInfo.h b/contrib/llvm-project/clang/include/clang/Basic/TargetInfo.h index 41ef47eb565b..61be52149341 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/TargetInfo.h +++ b/contrib/llvm-project/clang/include/clang/Basic/TargetInfo.h @@ -1414,7 +1414,9 @@ public: /// Identify whether this target supports IFuncs. bool supportsIFunc() const { - return getTriple().isOSBinFormatELF() && !getTriple().isOSFuchsia(); + return getTriple().isOSBinFormatELF() && + ((getTriple().isOSLinux() && !getTriple().isMusl()) || + getTriple().isOSFreeBSD()); } // Validate the contents of the __builtin_cpu_supports(const char*) diff --git a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td index 7e5889812aec..6adc60031341 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td +++ b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td @@ -112,7 +112,7 @@ multiclass RVVIntBinBuiltinSet multiclass RVVSlideOneBuiltinSet : RVVOutOp1BuiltinSet; + ["vx", "Uv", "UvUvUe"]]>; multiclass RVVSignedShiftBuiltinSet : RVVOutOp1BuiltinSet paramInfos, - CanQualType resultType, - ArrayRef argTypes, - RequiredArgs required); + static CGFunctionInfo * + create(unsigned llvmCC, bool instanceMethod, bool chainCall, + bool delegateCall, const FunctionType::ExtInfo &extInfo, + ArrayRef paramInfos, CanQualType resultType, + ArrayRef argTypes, RequiredArgs required); void operator delete(void *p) { ::operator delete(p); } // Friending class TrailingObjects is apparently not good enough for MSVC, @@ -663,6 +664,8 @@ public: bool isChainCall() const { return ChainCall; } + bool isDelegateCall() const { return DelegateCall; } + bool isCmseNSCall() const { return CmseNSCall; } bool isNoReturn() const { return NoReturn; } @@ -749,6 +752,7 @@ public: ID.AddInteger(getASTCallingConvention()); ID.AddBoolean(InstanceMethod); ID.AddBoolean(ChainCall); + ID.AddBoolean(DelegateCall); ID.AddBoolean(NoReturn); ID.AddBoolean(ReturnsRetained); ID.AddBoolean(NoCallerSavedRegs); @@ -766,17 +770,16 @@ public: for (const auto &I : arguments()) I.type.Profile(ID); } - static void Profile(llvm::FoldingSetNodeID &ID, - bool InstanceMethod, - bool ChainCall, + static void Profile(llvm::FoldingSetNodeID &ID, bool InstanceMethod, + bool ChainCall, bool IsDelegateCall, const FunctionType::ExtInfo &info, ArrayRef paramInfos, - RequiredArgs required, - CanQualType resultType, + RequiredArgs required, CanQualType resultType, ArrayRef argTypes) { ID.AddInteger(info.getCC()); ID.AddBoolean(InstanceMethod); ID.AddBoolean(ChainCall); + ID.AddBoolean(IsDelegateCall); ID.AddBoolean(info.getNoReturn()); ID.AddBoolean(info.getProducesResult()); ID.AddBoolean(info.getNoCallerSavedRegs()); diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td index 229f6141c750..e04f67bdb1fa 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/Options.td +++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td @@ -2375,11 +2375,6 @@ def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">, Flags<[CoreOption, CC1Option]>, Group, HelpText<"Write minimized bitcode to for the ThinLTO thin link only">, MarshallingInfoString>; -defm fat_lto_objects : BoolFOption<"fat-lto-objects", - CodeGenOpts<"FatLTO">, DefaultFalse, - PosFlag, - NegFlag, - BothFlags<[CC1Option], " fat LTO object support">>; def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, Group, Flags<[NoXarchOption, CC1Option, CoreOption]>, HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit)">, @@ -5097,6 +5092,10 @@ def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group< def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group; def mvzeroupper : Flag<["-"], "mvzeroupper">, Group; def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group; +def mno_gather : Flag<["-"], "mno-gather">, Group, + HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">; +def mno_scatter : Flag<["-"], "mno-scatter">, Group, + HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">; // These are legacy user-facing driver-level option spellings. They are always // aliases for options that are spelled using the more common Unix / GNU flag @@ -5162,6 +5161,7 @@ defm caller_saves : BooleanFFlag<"caller-saves">, Group, Group; defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group; defm default_inline : BooleanFFlag<"default-inline">, Group; +defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group; defm float_store : BooleanFFlag<"float-store">, Group; defm friend_injection : BooleanFFlag<"friend-injection">, Group; defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group; @@ -7152,6 +7152,10 @@ def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">, Alias; def _SLASH_arm64EC : CLFlag<"arm64EC">, HelpText<"Set build target to arm64ec">; +def : CLFlag<"Qgather-">, Alias, + HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">; +def : CLFlag<"Qscatter-">, Alias, + HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">; // Non-aliases: diff --git a/contrib/llvm-project/clang/include/clang/Driver/ToolChain.h b/contrib/llvm-project/clang/include/clang/Driver/ToolChain.h index e3fcbd9322b0..2e74507f7126 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/ToolChain.h +++ b/contrib/llvm-project/clang/include/clang/Driver/ToolChain.h @@ -561,7 +561,7 @@ public: // Return the DWARF version to emit, in the absence of arguments // to the contrary. - virtual unsigned GetDefaultDwarfVersion() const { return 5; } + virtual unsigned GetDefaultDwarfVersion() const; // Some toolchains may have different restrictions on the DWARF version and // may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when host diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index 3418a37b3077..cfd1c0f977c0 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -12694,8 +12694,6 @@ public: QualType CheckBitwiseOperands( // C99 6.5.[10...12] ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc); - void diagnoseLogicalInsteadOfBitwise(Expr *Op1, Expr *Op2, SourceLocation Loc, - BinaryOperatorKind Opc); QualType CheckLogicalOperands( // C99 6.5.[13,14] ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc); diff --git a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp index 7acacd7bf4f5..76000156fece 100644 --- a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp +++ b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp @@ -9612,9 +9612,8 @@ bool ASTContext::areLaxCompatibleRVVTypes(QualType FirstType, const LangOptions::LaxVectorConversionKind LVCKind = getLangOpts().getLaxVectorConversions(); - // If __riscv_v_fixed_vlen != N do not allow GNU vector lax conversion. - if (VecTy->getVectorKind() == VectorType::GenericVector && - getTypeSize(SecondType) != getRVVTypeSize(*this, BT)) + // If __riscv_v_fixed_vlen != N do not allow vector lax conversion. + if (getTypeSize(SecondType) != getRVVTypeSize(*this, BT)) return false; // If -flax-vector-conversions=all is specified, the types are diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index f1c842e26199..f1bad0c7f7f2 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -2418,9 +2418,16 @@ static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, if (const CXXRecordDecl *CD = dyn_cast(RD)) { unsigned BaseIndex = 0; for (const CXXBaseSpecifier &BS : CD->bases()) { - if (!CheckEvaluationResult(CERK, Info, DiagLoc, BS.getType(), - Value.getStructBase(BaseIndex), Kind, - /*SubobjectDecl=*/nullptr, CheckedTemps)) + const APValue &BaseValue = Value.getStructBase(BaseIndex); + if (!BaseValue.hasValue()) { + SourceLocation TypeBeginLoc = BS.getBaseTypeLoc(); + Info.FFDiag(TypeBeginLoc, diag::note_constexpr_uninitialized_base) + << BS.getType() << SourceRange(TypeBeginLoc, BS.getEndLoc()); + return false; + } + if (!CheckEvaluationResult(CERK, Info, DiagLoc, BS.getType(), BaseValue, + Kind, /*SubobjectDecl=*/nullptr, + CheckedTemps)) return false; ++BaseIndex; } @@ -15218,14 +15225,6 @@ static bool FastEvaluateAsRValue(const Expr *Exp, Expr::EvalResult &Result, return true; } - // FIXME: Evaluating values of large array and record types can cause - // performance problems. Only do so in C++11 for now. - if (Exp->isPRValue() && - (Exp->getType()->isArrayType() || Exp->getType()->isRecordType()) && - !Ctx.getLangOpts().CPlusPlus11) { - IsConst = false; - return true; - } return false; } @@ -15467,12 +15466,6 @@ bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, return Name; }); - // FIXME: Evaluating initializers for large array and record types can cause - // performance problems. Only do so in C++11 for now. - if (isPRValue() && (getType()->isArrayType() || getType()->isRecordType()) && - !Ctx.getLangOpts().CPlusPlus11) - return false; - Expr::EvalStatus EStatus; EStatus.Diag = &Notes; diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.cpp index 6958479cd7c4..4448a2ae10a1 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.cpp @@ -15,7 +15,7 @@ #include "clang/Basic/MacroBuilder.h" #include "clang/Basic/TargetBuiltins.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/TargetParser/TargetParser.h" +#include "llvm/TargetParser/LoongArchTargetParser.h" using namespace clang; using namespace clang::targets; @@ -198,7 +198,15 @@ void LoongArchTargetInfo::getTargetDefines(const LangOptions &Opts, else Builder.defineMacro("__loongarch_frlen", "0"); - // TODO: define __loongarch_arch and __loongarch_tune. + // Define __loongarch_arch. + StringRef ArchName = getCPU(); + Builder.defineMacro("__loongarch_arch", Twine('"') + ArchName + Twine('"')); + + // Define __loongarch_tune. + StringRef TuneCPU = getTargetOpts().TuneCPU; + if (TuneCPU.empty()) + TuneCPU = ArchName; + Builder.defineMacro("__loongarch_tune", Twine('"') + TuneCPU + Twine('"')); StringRef ABI = getABI(); if (ABI == "lp64d" || ABI == "lp64f" || ABI == "lp64s") @@ -270,3 +278,12 @@ bool LoongArchTargetInfo::handleTargetFeatures( } return true; } + +bool LoongArchTargetInfo::isValidCPUName(StringRef Name) const { + return llvm::LoongArch::isValidCPUName(Name); +} + +void LoongArchTargetInfo::fillValidCPUList( + SmallVectorImpl &Values) const { + llvm::LoongArch::fillValidCPUList(Values); +} diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.h b/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.h index 52c4ce425368..34143f462a24 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.h @@ -24,6 +24,7 @@ namespace targets { class LLVM_LIBRARY_VISIBILITY LoongArchTargetInfo : public TargetInfo { protected: std::string ABI; + std::string CPU; bool HasFeatureD; bool HasFeatureF; @@ -40,6 +41,15 @@ public: WIntType = UnsignedInt; } + bool setCPU(const std::string &Name) override { + if (!isValidCPUName(Name)) + return false; + CPU = Name; + return true; + } + + StringRef getCPU() const { return CPU; } + StringRef getABI() const override { return ABI; } void getTargetDefines(const LangOptions &Opts, @@ -80,6 +90,9 @@ public: const std::vector &FeaturesVec) const override; bool hasFeature(StringRef Feature) const override; + + bool isValidCPUName(StringRef Name) const override; + void fillValidCPUList(SmallVectorImpl &Values) const override; }; class LLVM_LIBRARY_VISIBILITY LoongArch32TargetInfo diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp index 94c894dfec0b..d55ab76395c8 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp @@ -196,8 +196,8 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts, if (ISAInfo->hasExtension("zve32x")) { Builder.defineMacro("__riscv_vector"); - // Currently we support the v0.11 RISC-V V intrinsics. - Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(0, 11))); + // Currently we support the v0.12 RISC-V V intrinsics. + Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(0, 12))); } auto VScale = getVScaleRange(Opts); diff --git a/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp b/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp index 7c30cecfdb9b..2b20d5a13346 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp @@ -246,7 +246,7 @@ Address CodeGen::emitMergePHI(CodeGenFunction &CGF, Address Addr1, } bool CodeGen::isEmptyField(ASTContext &Context, const FieldDecl *FD, - bool AllowArrays) { + bool AllowArrays, bool AsIfNoUniqueAddr) { if (FD->isUnnamedBitfield()) return true; @@ -280,13 +280,14 @@ bool CodeGen::isEmptyField(ASTContext &Context, const FieldDecl *FD, // not arrays of records, so we must also check whether we stripped off an // array type above. if (isa(RT->getDecl()) && - (WasArray || !FD->hasAttr())) + (WasArray || (!AsIfNoUniqueAddr && !FD->hasAttr()))) return false; - return isEmptyRecord(Context, FT, AllowArrays); + return isEmptyRecord(Context, FT, AllowArrays, AsIfNoUniqueAddr); } -bool CodeGen::isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays) { +bool CodeGen::isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays, + bool AsIfNoUniqueAddr) { const RecordType *RT = T->getAs(); if (!RT) return false; @@ -297,11 +298,11 @@ bool CodeGen::isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays) { // If this is a C++ record, check the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) for (const auto &I : CXXRD->bases()) - if (!isEmptyRecord(Context, I.getType(), true)) + if (!isEmptyRecord(Context, I.getType(), true, AsIfNoUniqueAddr)) return false; for (const auto *I : RD->fields()) - if (!isEmptyField(Context, I, AllowArrays)) + if (!isEmptyField(Context, I, AllowArrays, AsIfNoUniqueAddr)) return false; return true; } diff --git a/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.h b/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.h index 5f0cc289af68..afde08ba100c 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.h +++ b/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.h @@ -122,13 +122,19 @@ Address emitMergePHI(CodeGenFunction &CGF, Address Addr1, llvm::BasicBlock *Block2, const llvm::Twine &Name = ""); /// isEmptyField - Return true iff a the field is "empty", that is it -/// is an unnamed bit-field or an (array of) empty record(s). -bool isEmptyField(ASTContext &Context, const FieldDecl *FD, bool AllowArrays); +/// is an unnamed bit-field or an (array of) empty record(s). If +/// AsIfNoUniqueAddr is true, then C++ record fields are considered empty if +/// the [[no_unique_address]] attribute would have made them empty. +bool isEmptyField(ASTContext &Context, const FieldDecl *FD, bool AllowArrays, + bool AsIfNoUniqueAddr = false); /// isEmptyRecord - Return true iff a structure contains only empty /// fields. Note that a structure with a flexible array member is not -/// considered empty. -bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays); +/// considered empty. If AsIfNoUniqueAddr is true, then C++ record fields are +/// considered empty if the [[no_unique_address]] attribute would have made +/// them empty. +bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays, + bool AsIfNoUniqueAddr = false); /// isSingleElementStruct - Determine if a structure is a "single /// element struct", i.e. it has exactly one non-empty field or diff --git a/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp b/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp index cda03d69522d..483f3e787a78 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp @@ -55,7 +55,6 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" -#include "llvm/Transforms/IPO/EmbedBitcodePass.h" #include "llvm/Transforms/IPO/LowerTypeTests.h" #include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h" #include "llvm/Transforms/InstCombine/InstCombine.h" @@ -1016,12 +1015,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline( }); } - bool IsThinOrUnifiedLTO = IsThinLTO || (IsLTO && CodeGenOpts.UnifiedLTO); - if (CodeGenOpts.FatLTO) { - MPM = PB.buildFatLTODefaultPipeline(Level, IsThinOrUnifiedLTO, - IsThinOrUnifiedLTO || - shouldEmitRegularLTOSummary()); - } else if (IsThinOrUnifiedLTO) { + if (IsThinLTO || (IsLTO && CodeGenOpts.UnifiedLTO)) { MPM = PB.buildThinLTOPreLinkDefaultPipeline(Level); } else if (IsLTO) { MPM = PB.buildLTOPreLinkDefaultPipeline(Level); @@ -1077,21 +1071,6 @@ void EmitAssemblyHelper::RunOptimizationPipeline( EmitLTOSummary)); } } - if (CodeGenOpts.FatLTO) { - // Set module flags, like EnableSplitLTOUnit and UnifiedLTO, since FatLTO - // uses a different action than Backend_EmitBC or Backend_EmitLL. - bool IsThinOrUnifiedLTO = - CodeGenOpts.PrepareForThinLTO || - (CodeGenOpts.PrepareForLTO && CodeGenOpts.UnifiedLTO); - if (!TheModule->getModuleFlag("ThinLTO")) - TheModule->addModuleFlag(Module::Error, "ThinLTO", - uint32_t(IsThinOrUnifiedLTO)); - if (!TheModule->getModuleFlag("EnableSplitLTOUnit")) - TheModule->addModuleFlag(Module::Error, "EnableSplitLTOUnit", - uint32_t(CodeGenOpts.EnableSplitLTOUnit)); - if (CodeGenOpts.UnifiedLTO && !TheModule->getModuleFlag("UnifiedLTO")) - TheModule->addModuleFlag(Module::Error, "UnifiedLTO", uint32_t(1)); - } // Now that we have all of the passes ready, run them. { diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.cpp index 7b77dd7875bc..4df6f6505ef6 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.cpp @@ -312,8 +312,7 @@ void CGCXXABI::setCXXDestructorDLLStorage(llvm::GlobalValue *GV, llvm::GlobalValue::LinkageTypes CGCXXABI::getCXXDestructorLinkage( GVALinkage Linkage, const CXXDestructorDecl *Dtor, CXXDtorType DT) const { // Delegate back to CGM by default. - return CGM.getLLVMLinkageForDeclarator(Dtor, Linkage, - /*IsConstantVariable=*/false); + return CGM.getLLVMLinkageForDeclarator(Dtor, Linkage); } bool CGCXXABI::NeedsVTTParameter(GlobalDecl GD) { diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index bd272e016e92..0d1e9ad439b7 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -13,6 +13,7 @@ #include "CGCall.h" #include "ABIInfo.h" +#include "ABIInfoImpl.h" #include "CGBlocks.h" #include "CGCXXABI.h" #include "CGCleanup.h" @@ -112,8 +113,7 @@ CodeGenTypes::arrangeFreeFunctionType(CanQual FTNP) { // When translating an unprototyped function type, always use a // variadic type. return arrangeLLVMFunctionInfo(FTNP->getReturnType().getUnqualifiedType(), - /*instanceMethod=*/false, - /*chainCall=*/false, std::nullopt, + FnInfoOpts::None, std::nullopt, FTNP->getExtInfo(), {}, RequiredArgs(0)); } @@ -189,10 +189,10 @@ arrangeLLVMFunctionInfo(CodeGenTypes &CGT, bool instanceMethod, appendParameterTypes(CGT, prefix, paramInfos, FTP); CanQualType resultType = FTP->getReturnType().getUnqualifiedType(); - return CGT.arrangeLLVMFunctionInfo(resultType, instanceMethod, - /*chainCall=*/false, prefix, - FTP->getExtInfo(), paramInfos, - Required); + FnInfoOpts opts = + instanceMethod ? FnInfoOpts::IsInstanceMethod : FnInfoOpts::None; + return CGT.arrangeLLVMFunctionInfo(resultType, opts, prefix, + FTP->getExtInfo(), paramInfos, Required); } /// Arrange the argument and result information for a value of the @@ -271,7 +271,7 @@ CodeGenTypes::arrangeCXXMethodType(const CXXRecordDecl *RD, argTypes.push_back(DeriveThisType(RD, MD)); return ::arrangeLLVMFunctionInfo( - *this, true, argTypes, + *this, /*instanceMethod=*/true, argTypes, FTP->getCanonicalTypeUnqualified().getAs()); } *** 11179 LINES SKIPPED *** From nobody Sun Jan 7 17:50:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqQ1mtRz55XHj; Sun, 7 Jan 2024 17:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7PqP5syvz4MK6; Sun, 7 Jan 2024 17:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0cquFGpxqPTgO1ypR8lS731TUdUxk8G/xZsJ7ZZCPI=; b=hvEDziUeoG8jYGn5Q4ZFm4p9ZV/pYA0rZz7Zjk5qW+aW1TPyW+mO/DhbzyoxcNY3QBq3gI YuNBZVKUgNbD3Ti/zLS3v0OyLd0oGCX0FqSxMyhnT8jo6GFHKqXzKPRyTv/SnZyllppv+z nQTrwLvZGT5TL4D3AkvJRlOuas9PFvbMkF5yTib4ISd+1rv/V9VCEDdrMWoKXqBjcAv3Lr swAUBHyWGJGOfobSSLWp5RUWKCiAxszjneBykIAY+hYMVYArHq9rPYdd8ht4vopBPJiucv t/jGT921mhlcOtQHB+YAZp0LWTuZwW4XvoXEsuI/jJlW156J67so71orPvJQHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0cquFGpxqPTgO1ypR8lS731TUdUxk8G/xZsJ7ZZCPI=; b=pNtx6BgovBpxxp+d7YD58sjBPXaAMuFFcZxOLCgQ531hm+v4WAIvlZPxMYfOhOnbQ5H2l1 ZRYPaxzfh4gPugW/SYiUsy0Wb7w2QPN3w6OnSDR4BcFedrJi2r0vf6TXgHMwn/AsgjTFm+ 7UD2ZszlBEyouEVzErHfmodP0e6qQR4h+OrTFT74D8r7urCfipYUFwXWVoBcNKKovk64Rd p3mcGRQJPxBADPTayQyAy5JMGar58JzmRUZK0tKY9zUorB69W6MyT2EEf0Jatlx49ulO8R r+JU2OuhekOe6TsnUByQ8z3YpGApSVVsq+M8ILuPPtwyAnhRKrRpzzJyRR7nBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649825; a=rsa-sha256; cv=none; b=jYjxEL5qeYBmrODT2w4H/C9YSfwWyRiIgyXA53cGAx/AjvXi/0dJ/ILyfgpTb9NQ6MamOc cRKYqtgoY0C8G8IgFvmDa/XppOrRae0p2jCYTON0ZqSxgzvC2vv9sJL1yeU5HIEV/RhzgT WiSKG4RPtvzLKjX5dC3aAINGuL0O/qdVrdChzAjmH4ULQ16+w5biv02BzLTmlGuAVoMggw fbRFoJ05Rj54Z8h3/Tk1NPknhmLgloiRNngEOM6xyhCilG30F4rV2H4fQpyG4dr5eoE2Z0 /xeOIuN4ZTb5Y0ylqU5CRJkBfFmOPi+VP4Q955kWzJTJR12w9thA7eMvPl3kOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqP4NNBzYwD; Sun, 7 Jan 2024 17:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407HoPaj021927; Sun, 7 Jan 2024 17:50:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoPHw021924; Sun, 7 Jan 2024 17:50:25 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:25 GMT Message-Id: <202401071750.407HoPHw021924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7126fb41c733 - stable/14 - Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7126fb41c7339cf5d33ddd0eed249fc3c16f6a43 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7126fb41c7339cf5d33ddd0eed249fc3c16f6a43 commit 7126fb41c7339cf5d33ddd0eed249fc3c16f6a43 Author: Dimitry Andric AuthorDate: 2023-09-29 18:51:44 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:18 +0000 Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.1-25-g098e653a5bed. PR: 273753 MFC after: 1 month (cherry picked from commit 4542f901cb0c5dd66ab5b541f2fbc659fd46f893) --- .../DependencyScanningFilesystem.h | 18 ++++- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 17 +++-- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 24 ------- .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 33 --------- .../clang/lib/CodeGen/CodeGenFunction.h | 5 -- .../clang/lib/Frontend/TextDiagnostic.cpp | 3 +- .../lib/Headers/cuda_wrappers/bits/basic_string.h | 9 +++ .../Headers/cuda_wrappers/bits/basic_string.tcc | 9 +++ .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 6 +- .../DependencyScanningFilesystem.cpp | 79 ++++++++++++++++++---- contrib/llvm-project/libcxx/include/__config | 2 +- contrib/llvm-project/lld/COFF/Writer.cpp | 2 +- .../llvm/include/llvm/Transforms/Utils/Local.h | 10 +++ .../llvm-project/llvm/lib/Analysis/InlineCost.cpp | 20 ++---- .../llvm/lib/CodeGen/StackColoring.cpp | 62 ++++------------- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 4 +- .../llvm/lib/Target/ARM/ARMInstrInfo.td | 2 +- .../llvm/lib/Target/ARM/ARMInstrThumb2.td | 2 +- .../llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 28 ++++++-- .../llvm/lib/Transforms/Scalar/GVN.cpp | 7 +- .../llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp | 23 ++++--- .../lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 61 +++++++++-------- .../llvm/lib/Transforms/Utils/Local.cpp | 31 +++++++-- .../llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 12 ++-- contrib/llvm-project/llvm/tools/lli/lli.cpp | 14 ++++ .../llvm/tools/llvm-readobj/COFFDumper.cpp | 30 ++++---- lib/clang/headers/Makefile | 22 ++++-- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 34 files changed, 319 insertions(+), 246 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h b/contrib/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h index 4b4e3c7eb2ec..dbe219b6dd8d 100644 --- a/contrib/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h +++ b/contrib/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h @@ -215,6 +215,7 @@ class DependencyScanningFilesystemLocalCache { public: /// Returns entry associated with the filename or nullptr if none is found. const CachedFileSystemEntry *findEntryByFilename(StringRef Filename) const { + assert(llvm::sys::path::is_absolute_gnu(Filename)); auto It = Cache.find(Filename); return It == Cache.end() ? nullptr : It->getValue(); } @@ -224,6 +225,7 @@ public: const CachedFileSystemEntry & insertEntryForFilename(StringRef Filename, const CachedFileSystemEntry &Entry) { + assert(llvm::sys::path::is_absolute_gnu(Filename)); const auto *InsertedEntry = Cache.insert({Filename, &Entry}).first->second; assert(InsertedEntry == &Entry && "entry already present"); return *InsertedEntry; @@ -282,13 +284,14 @@ class DependencyScanningWorkerFilesystem : public llvm::vfs::ProxyFileSystem { public: DependencyScanningWorkerFilesystem( DependencyScanningFilesystemSharedCache &SharedCache, - IntrusiveRefCntPtr FS) - : ProxyFileSystem(std::move(FS)), SharedCache(SharedCache) {} + IntrusiveRefCntPtr FS); llvm::ErrorOr status(const Twine &Path) override; llvm::ErrorOr> openFileForRead(const Twine &Path) override; + std::error_code setCurrentWorkingDirectory(const Twine &Path) override; + /// Returns entry for the given filename. /// /// Attempts to use the local and shared caches first, then falls back to @@ -304,8 +307,11 @@ private: /// For a filename that's not yet associated with any entry in the caches, /// uses the underlying filesystem to either look up the entry based in the /// shared cache indexed by unique ID, or creates new entry from scratch. + /// \p FilenameForLookup will always be an absolute path, and different than + /// \p OriginalFilename if \p OriginalFilename is relative. llvm::ErrorOr - computeAndStoreResult(StringRef Filename); + computeAndStoreResult(StringRef OriginalFilename, + StringRef FilenameForLookup); /// Scan for preprocessor directives for the given entry if necessary and /// returns a wrapper object with reference semantics. @@ -388,6 +394,12 @@ private: /// The local cache is used by the worker thread to cache file system queries /// locally instead of querying the global cache every time. DependencyScanningFilesystemLocalCache LocalCache; + + /// The working directory to use for making relative paths absolute before + /// using them for cache lookups. + llvm::ErrorOr WorkingDirForCacheLookup; + + void updateWorkingDirForCacheLookup(); }; } // end namespace dependencies diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index f1bad0c7f7f2..c62044f36194 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -6013,8 +6013,9 @@ const AccessKinds StartLifetimeOfUnionMemberHandler::AccessKind; /// operator whose left-hand side might involve a union member access. If it /// does, implicitly start the lifetime of any accessed union elements per /// C++20 [class.union]5. -static bool HandleUnionActiveMemberChange(EvalInfo &Info, const Expr *LHSExpr, - const LValue &LHS) { +static bool MaybeHandleUnionActiveMemberChange(EvalInfo &Info, + const Expr *LHSExpr, + const LValue &LHS) { if (LHS.InvalidBase || LHS.Designator.Invalid) return false; @@ -6069,8 +6070,14 @@ static bool HandleUnionActiveMemberChange(EvalInfo &Info, const Expr *LHSExpr, break; // Walk path backwards as we walk up from the base to the derived class. for (const CXXBaseSpecifier *Elt : llvm::reverse(ICE->path())) { + if (Elt->isVirtual()) { + // A class with virtual base classes never has a trivial default + // constructor, so S(E) is empty in this case. + E = nullptr; + break; + } + --PathLength; - (void)Elt; assert(declaresSameEntity(Elt->getType()->getAsCXXRecordDecl(), LHS.Designator.Entries[PathLength] .getAsBaseOrMember().getPointer())); @@ -7748,7 +7755,7 @@ public: // per C++20 [class.union]5. if (Info.getLangOpts().CPlusPlus20 && OCE && OCE->getOperator() == OO_Equal && MD->isTrivial() && - !HandleUnionActiveMemberChange(Info, Args[0], ThisVal)) + !MaybeHandleUnionActiveMemberChange(Info, Args[0], ThisVal)) return false; Args = Args.slice(1); @@ -8621,7 +8628,7 @@ bool LValueExprEvaluator::VisitBinAssign(const BinaryOperator *E) { return false; if (Info.getLangOpts().CPlusPlus20 && - !HandleUnionActiveMemberChange(Info, E->getLHS(), Result)) + !MaybeHandleUnionActiveMemberChange(Info, E->getLHS(), Result)) return false; return handleAssignment(this->Info, E, Result, E->getLHS()->getType(), diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index 0d1e9ad439b7..6b8af9bf18c1 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -5487,30 +5487,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::AlwaysInline); } - // The await_suspend call performed by co_await is essentially asynchronous - // to the execution of the coroutine. Inlining it normally into an unsplit - // coroutine can cause miscompilation because the coroutine CFG misrepresents - // the true control flow of the program: things that happen in the - // await_suspend are not guaranteed to happen prior to the resumption of the - // coroutine, and things that happen after the resumption of the coroutine - // (including its exit and the potential deallocation of the coroutine frame) - // are not guaranteed to happen only after the end of await_suspend. - // - // The short-term solution to this problem is to mark the call as uninlinable. - // But we don't want to do this if the call is known to be trivial, which is - // very common. - // - // The long-term solution may introduce patterns like: - // - // call @llvm.coro.await_suspend(ptr %awaiter, ptr %handle, - // ptr @awaitSuspendFn) - // - // Then it is much easier to perform the safety analysis in the middle end. - // If it is safe to inline the call to awaitSuspend, we can replace it in the - // CoroEarly pass. Otherwise we could replace it in the CoroSplit pass. - if (inSuspendBlock() && mayCoroHandleEscape()) - Attrs = Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::NoInline); - // Disable inlining inside SEH __try blocks. if (isSEHTryScope()) { Attrs = Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::NoInline); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp index 810ae7d51ec1..8437cda79beb 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp @@ -139,36 +139,6 @@ static bool memberCallExpressionCanThrow(const Expr *E) { return true; } -/// Return true when the coroutine handle may escape from the await-suspend -/// (`awaiter.await_suspend(std::coroutine_handle)` expression). -/// Return false only when the coroutine wouldn't escape in the await-suspend -/// for sure. -/// -/// While it is always safe to return true, return falses can bring better -/// performances. -/// -/// See https://github.com/llvm/llvm-project/issues/56301 and -/// https://reviews.llvm.org/D157070 for the example and the full discussion. -/// -/// FIXME: It will be much better to perform such analysis in the middle end. -/// See the comments in `CodeGenFunction::EmitCall` for example. -static bool MayCoroHandleEscape(CoroutineSuspendExpr const &S) { - CXXRecordDecl *Awaiter = - S.getCommonExpr()->getType().getNonReferenceType()->getAsCXXRecordDecl(); - - // Return true conservatively if the awaiter type is not a record type. - if (!Awaiter) - return true; - - // In case the awaiter type is empty, the suspend wouldn't leak the coroutine - // handle. - // - // TODO: We can improve this by looking into the implementation of - // await-suspend and see if the coroutine handle is passed to foreign - // functions. - return !Awaiter->field_empty(); -} - // Emit suspend expression which roughly looks like: // // auto && x = CommonExpr(); @@ -229,11 +199,8 @@ static LValueOrRValue emitSuspendExpression(CodeGenFunction &CGF, CGCoroData &Co auto *SaveCall = Builder.CreateCall(CoroSave, {NullPtr}); CGF.CurCoro.InSuspendBlock = true; - CGF.CurCoro.MayCoroHandleEscape = MayCoroHandleEscape(S); auto *SuspendRet = CGF.EmitScalarExpr(S.getSuspendExpr()); CGF.CurCoro.InSuspendBlock = false; - CGF.CurCoro.MayCoroHandleEscape = false; - if (SuspendRet != nullptr && SuspendRet->getType()->isIntegerTy(1)) { // Veto suspension if requested by bool returning await_suspend. BasicBlock *RealSuspendBlock = diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h index 28ec2b970072..8722fd4550e4 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h @@ -334,7 +334,6 @@ public: struct CGCoroInfo { std::unique_ptr Data; bool InSuspendBlock = false; - bool MayCoroHandleEscape = false; CGCoroInfo(); ~CGCoroInfo(); }; @@ -348,10 +347,6 @@ public: return isCoroutine() && CurCoro.InSuspendBlock; } - bool mayCoroHandleEscape() const { - return isCoroutine() && CurCoro.MayCoroHandleEscape; - } - /// CurGD - The GlobalDecl for the current function being compiled. GlobalDecl CurGD; diff --git a/contrib/llvm-project/clang/lib/Frontend/TextDiagnostic.cpp b/contrib/llvm-project/clang/lib/Frontend/TextDiagnostic.cpp index 3a3cc246d3af..1b58261b22a2 100644 --- a/contrib/llvm-project/clang/lib/Frontend/TextDiagnostic.cpp +++ b/contrib/llvm-project/clang/lib/Frontend/TextDiagnostic.cpp @@ -1160,8 +1160,7 @@ void TextDiagnostic::emitSnippetAndCaret( // Find the set of lines to include. const unsigned MaxLines = DiagOpts->SnippetLineLimit; std::pair Lines = {CaretLineNo, CaretLineNo}; - unsigned DisplayLineNo = - Ranges.empty() ? Loc.getPresumedLoc().getLine() : ~0u; + unsigned DisplayLineNo = Loc.getPresumedLoc().getLine(); for (const auto &I : Ranges) { if (auto OptionalRange = findLinesForRange(I, FID, SM)) Lines = maybeAddRange(Lines, *OptionalRange, MaxLines); diff --git a/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.h b/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.h new file mode 100644 index 000000000000..64f50d9f6a72 --- /dev/null +++ b/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.h @@ -0,0 +1,9 @@ +// CUDA headers define __noinline__ which interferes with libstdc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libstdc++ header. + +#pragma push_macro("__noinline__") +#undef __noinline__ +#include_next "bits/basic_string.h" + +#pragma pop_macro("__noinline__") diff --git a/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc b/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc new file mode 100644 index 000000000000..90c7fe34d932 --- /dev/null +++ b/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc @@ -0,0 +1,9 @@ +// CUDA headers define __noinline__ which interferes with libstdc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libstdc++ header. + +#pragma push_macro("__noinline__") +#undef __noinline__ +#include_next "bits/basic_string.tcc" + +#pragma pop_macro("__noinline__") diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp index f8e48728da66..8626fc6ea16f 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp @@ -11308,7 +11308,11 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, Hints.push_back( FixItHint::CreateInsertion(E->getBeginLoc(), CastFix.str())); - SourceLocation After = S.getLocForEndOfToken(E->getEndLoc()); + // We don't use getLocForEndOfToken because it returns invalid source + // locations for macro expansions (by design). + SourceLocation EndLoc = S.SourceMgr.getSpellingLoc(E->getEndLoc()); + SourceLocation After = EndLoc.getLocWithOffset( + Lexer::MeasureTokenLength(EndLoc, S.SourceMgr, S.LangOpts)); Hints.push_back(FixItHint::CreateInsertion(After, ")")); } diff --git a/contrib/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp b/contrib/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp index 31404855e3b1..3e53c8fc5740 100644 --- a/contrib/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp +++ b/contrib/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp @@ -96,6 +96,7 @@ DependencyScanningFilesystemSharedCache:: DependencyScanningFilesystemSharedCache::CacheShard & DependencyScanningFilesystemSharedCache::getShardForFilename( StringRef Filename) const { + assert(llvm::sys::path::is_absolute_gnu(Filename)); return CacheShards[llvm::hash_value(Filename) % NumShards]; } @@ -109,6 +110,7 @@ DependencyScanningFilesystemSharedCache::getShardForUID( const CachedFileSystemEntry * DependencyScanningFilesystemSharedCache::CacheShard::findEntryByFilename( StringRef Filename) const { + assert(llvm::sys::path::is_absolute_gnu(Filename)); std::lock_guard LockGuard(CacheLock); auto It = EntriesByFilename.find(Filename); return It == EntriesByFilename.end() ? nullptr : It->getValue(); @@ -189,6 +191,14 @@ static bool shouldCacheStatFailures(StringRef Filename) { return shouldScanForDirectivesBasedOnExtension(Filename); } +DependencyScanningWorkerFilesystem::DependencyScanningWorkerFilesystem( + DependencyScanningFilesystemSharedCache &SharedCache, + IntrusiveRefCntPtr FS) + : ProxyFileSystem(std::move(FS)), SharedCache(SharedCache), + WorkingDirForCacheLookup(llvm::errc::invalid_argument) { + updateWorkingDirForCacheLookup(); +} + bool DependencyScanningWorkerFilesystem::shouldScanForDirectives( StringRef Filename) { return shouldScanForDirectivesBasedOnExtension(Filename); @@ -215,44 +225,62 @@ DependencyScanningWorkerFilesystem::findEntryByFilenameWithWriteThrough( } llvm::ErrorOr -DependencyScanningWorkerFilesystem::computeAndStoreResult(StringRef Filename) { - llvm::ErrorOr Stat = getUnderlyingFS().status(Filename); +DependencyScanningWorkerFilesystem::computeAndStoreResult( + StringRef OriginalFilename, StringRef FilenameForLookup) { + llvm::ErrorOr Stat = + getUnderlyingFS().status(OriginalFilename); if (!Stat) { - if (!shouldCacheStatFailures(Filename)) + if (!shouldCacheStatFailures(OriginalFilename)) return Stat.getError(); const auto &Entry = - getOrEmplaceSharedEntryForFilename(Filename, Stat.getError()); - return insertLocalEntryForFilename(Filename, Entry); + getOrEmplaceSharedEntryForFilename(FilenameForLookup, Stat.getError()); + return insertLocalEntryForFilename(FilenameForLookup, Entry); } if (const auto *Entry = findSharedEntryByUID(*Stat)) - return insertLocalEntryForFilename(Filename, *Entry); + return insertLocalEntryForFilename(FilenameForLookup, *Entry); auto TEntry = - Stat->isDirectory() ? TentativeEntry(*Stat) : readFile(Filename); + Stat->isDirectory() ? TentativeEntry(*Stat) : readFile(OriginalFilename); const CachedFileSystemEntry *SharedEntry = [&]() { if (TEntry) { const auto &UIDEntry = getOrEmplaceSharedEntryForUID(std::move(*TEntry)); - return &getOrInsertSharedEntryForFilename(Filename, UIDEntry); + return &getOrInsertSharedEntryForFilename(FilenameForLookup, UIDEntry); } - return &getOrEmplaceSharedEntryForFilename(Filename, TEntry.getError()); + return &getOrEmplaceSharedEntryForFilename(FilenameForLookup, + TEntry.getError()); }(); - return insertLocalEntryForFilename(Filename, *SharedEntry); + return insertLocalEntryForFilename(FilenameForLookup, *SharedEntry); } llvm::ErrorOr DependencyScanningWorkerFilesystem::getOrCreateFileSystemEntry( - StringRef Filename, bool DisableDirectivesScanning) { - if (const auto *Entry = findEntryByFilenameWithWriteThrough(Filename)) - return scanForDirectivesIfNecessary(*Entry, Filename, + StringRef OriginalFilename, bool DisableDirectivesScanning) { + StringRef FilenameForLookup; + SmallString<256> PathBuf; + if (llvm::sys::path::is_absolute_gnu(OriginalFilename)) { + FilenameForLookup = OriginalFilename; + } else if (!WorkingDirForCacheLookup) { + return WorkingDirForCacheLookup.getError(); + } else { + StringRef RelFilename = OriginalFilename; + RelFilename.consume_front("./"); + PathBuf = *WorkingDirForCacheLookup; + llvm::sys::path::append(PathBuf, RelFilename); + FilenameForLookup = PathBuf.str(); + } + assert(llvm::sys::path::is_absolute_gnu(FilenameForLookup)); + if (const auto *Entry = + findEntryByFilenameWithWriteThrough(FilenameForLookup)) + return scanForDirectivesIfNecessary(*Entry, OriginalFilename, DisableDirectivesScanning) .unwrapError(); - auto MaybeEntry = computeAndStoreResult(Filename); + auto MaybeEntry = computeAndStoreResult(OriginalFilename, FilenameForLookup); if (!MaybeEntry) return MaybeEntry.getError(); - return scanForDirectivesIfNecessary(*MaybeEntry, Filename, + return scanForDirectivesIfNecessary(*MaybeEntry, OriginalFilename, DisableDirectivesScanning) .unwrapError(); } @@ -330,3 +358,24 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine &Path) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( + const Twine &Path) { + std::error_code EC = ProxyFileSystem::setCurrentWorkingDirectory(Path); + updateWorkingDirForCacheLookup(); + return EC; +} + +void DependencyScanningWorkerFilesystem::updateWorkingDirForCacheLookup() { + llvm::ErrorOr CWD = + getUnderlyingFS().getCurrentWorkingDirectory(); + if (!CWD) { + WorkingDirForCacheLookup = CWD.getError(); + } else if (!llvm::sys::path::is_absolute_gnu(*CWD)) { + WorkingDirForCacheLookup = llvm::errc::invalid_argument; + } else { + WorkingDirForCacheLookup = *CWD; + } + assert(!WorkingDirForCacheLookup || + llvm::sys::path::is_absolute_gnu(*WorkingDirForCacheLookup)); +} diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 43f8a20031ff..c37d643414aa 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -40,7 +40,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 170000 +# define _LIBCPP_VERSION 170002 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/lld/COFF/Writer.cpp b/contrib/llvm-project/lld/COFF/Writer.cpp index 85568a12531f..c9b6318fe521 100644 --- a/contrib/llvm-project/lld/COFF/Writer.cpp +++ b/contrib/llvm-project/lld/COFF/Writer.cpp @@ -1796,7 +1796,7 @@ void Writer::createGuardCFTables() { // Add the ehcont target table unless the user told us not to. if (config->guardCF & GuardCFLevel::EHCont) maybeAddRVATable(std::move(ehContTargets), "__guard_eh_cont_table", - "__guard_eh_cont_count", true); + "__guard_eh_cont_count"); // Set __guard_flags, which will be used in the load config to indicate that // /guard:cf was enabled. diff --git a/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Local.h b/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Local.h index 4578af069814..d23db1574e9d 100644 --- a/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Local.h +++ b/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Local.h @@ -162,8 +162,18 @@ bool TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB, /// Check for and eliminate duplicate PHI nodes in this block. This doesn't try /// to be clever about PHI nodes which differ only in the order of the incoming /// values, but instcombine orders them so it usually won't matter. +/// +/// This overload removes the duplicate PHI nodes directly. bool EliminateDuplicatePHINodes(BasicBlock *BB); +/// Check for and eliminate duplicate PHI nodes in this block. This doesn't try +/// to be clever about PHI nodes which differ only in the order of the incoming +/// values, but instcombine orders them so it usually won't matter. +/// +/// This overload collects the PHI nodes to be removed into the ToRemove set. +bool EliminateDuplicatePHINodes(BasicBlock *BB, + SmallPtrSetImpl &ToRemove); + /// This function is used to do simplification of a CFG. For example, it /// adjusts branches to branches to eliminate the extra hop, it eliminates /// unreachable basic blocks, and does other peephole optimization of the CFG. diff --git a/contrib/llvm-project/llvm/lib/Analysis/InlineCost.cpp b/contrib/llvm-project/llvm/lib/Analysis/InlineCost.cpp index 9ff277f5334e..a2f46edcf5ef 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/InlineCost.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/InlineCost.cpp @@ -2806,14 +2806,16 @@ LLVM_DUMP_METHOD void InlineCostCallAnalyzer::dump() { print(dbgs()); } /// Test that there are no attribute conflicts between Caller and Callee /// that prevent inlining. static bool functionsHaveCompatibleAttributes( - Function *Caller, Function *Callee, + Function *Caller, Function *Callee, TargetTransformInfo &TTI, function_ref &GetTLI) { // Note that CalleeTLI must be a copy not a reference. The legacy pass manager // caches the most recently created TLI in the TargetLibraryInfoWrapperPass // object, and always returns the same object (which is overwritten on each // GetTLI call). Therefore we copy the first result. auto CalleeTLI = GetTLI(*Callee); - return GetTLI(*Caller).areInlineCompatible(CalleeTLI, + return (IgnoreTTIInlineCompatible || + TTI.areInlineCompatible(Caller, Callee)) && + GetTLI(*Caller).areInlineCompatible(CalleeTLI, InlineCallerSupersetNoBuiltin) && AttributeFuncs::areInlineCompatible(*Caller, *Callee); } @@ -2929,12 +2931,6 @@ std::optional llvm::getAttributeBasedInliningDecision( " address space"); } - // Never inline functions with conflicting target attributes. - Function *Caller = Call.getCaller(); - if (!IgnoreTTIInlineCompatible && - !CalleeTTI.areInlineCompatible(Caller, Callee)) - return InlineResult::failure("conflicting target attributes"); - // Calls to functions with always-inline attributes should be inlined // whenever possible. if (Call.hasFnAttr(Attribute::AlwaysInline)) { @@ -2949,12 +2945,8 @@ std::optional llvm::getAttributeBasedInliningDecision( // Never inline functions with conflicting attributes (unless callee has // always-inline attribute). - // FIXME: functionsHaveCompatibleAttributes below checks for compatibilities - // of different kinds of function attributes -- sanitizer-related ones, - // checkDenormMode, no-builtin-memcpy, etc. It's unclear if we really want - // the always-inline attribute to take precedence over these different types - // of function attributes. - if (!functionsHaveCompatibleAttributes(Caller, Callee, GetTLI)) + Function *Caller = Call.getCaller(); + if (!functionsHaveCompatibleAttributes(Caller, Callee, CalleeTTI, GetTLI)) return InlineResult::failure("conflicting attributes"); // Don't inline this call if the caller has the optnone attribute. diff --git a/contrib/llvm-project/llvm/lib/CodeGen/StackColoring.cpp b/contrib/llvm-project/llvm/lib/CodeGen/StackColoring.cpp index 66b9086e1d88..3453b718b453 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/StackColoring.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/StackColoring.cpp @@ -370,37 +370,6 @@ STATISTIC(EscapedAllocas, "Number of allocas that escaped the lifetime region"); // If in RPO ordering chosen to walk the CFG we happen to visit the b[k] // before visiting the memcpy block (which will contain the lifetime start // for "b" then it will appear that 'b' has a degenerate lifetime. -// -// Handle Windows Exception with LifetimeStartOnFirstUse: -// ----------------- -// -// There was a bug for using LifetimeStartOnFirstUse in win32. -// class Type1 { -// ... -// ~Type1(){ write memory;} -// } -// ... -// try{ -// Type1 V -// ... -// } catch (Type2 X){ -// ... -// } -// For variable X in catch(X), we put point pX=&(&X) into ConservativeSlots -// to prevent using LifetimeStartOnFirstUse. Because pX may merged with -// object V which may call destructor after implicitly writing pX. All these -// are done in C++ EH runtime libs (through CxxThrowException), and can't -// obviously check it in IR level. -// -// The loader of pX, without obvious writing IR, is usually the first LOAD MI -// in EHPad, Some like: -// bb.x.catch.i (landing-pad, ehfunclet-entry): -// ; predecessors: %bb... -// successors: %bb... -// %n:gr32 = MOV32rm %stack.pX ... -// ... -// The Type2** %stack.pX will only be written in EH runtime libs, so we -// check the StoreSlots to screen it out. namespace { @@ -462,9 +431,6 @@ class StackColoring : public MachineFunctionPass { /// slots lifetime-start-on-first-use is disabled). BitVector ConservativeSlots; - /// Record the FI slots referenced by a 'may write to memory'. - BitVector StoreSlots; - /// Number of iterations taken during data flow analysis. unsigned NumIterations; @@ -660,13 +626,10 @@ unsigned StackColoring::collectMarkers(unsigned NumSlot) { InterestingSlots.resize(NumSlot); ConservativeSlots.clear(); ConservativeSlots.resize(NumSlot); - StoreSlots.clear(); - StoreSlots.resize(NumSlot); // number of start and end lifetime ops for each slot SmallVector NumStartLifetimes(NumSlot, 0); SmallVector NumEndLifetimes(NumSlot, 0); - SmallVector NumLoadInCatchPad(NumSlot, 0); // Step 1: collect markers and populate the "InterestingSlots" // and "ConservativeSlots" sets. @@ -722,13 +685,6 @@ unsigned StackColoring::collectMarkers(unsigned NumSlot) { if (! BetweenStartEnd.test(Slot)) { ConservativeSlots.set(Slot); } - // Here we check the StoreSlots to screen catch point out. For more - // information, please refer "Handle Windows Exception with - // LifetimeStartOnFirstUse" at the head of this file. - if (MI.mayStore()) - StoreSlots.set(Slot); - if (MF->getWinEHFuncInfo() && MBB->isEHPad() && MI.mayLoad()) - NumLoadInCatchPad[Slot] += 1; } } } @@ -739,14 +695,24 @@ unsigned StackColoring::collectMarkers(unsigned NumSlot) { return 0; } - // 1) PR27903: slots with multiple start or end lifetime ops are not + // PR27903: slots with multiple start or end lifetime ops are not // safe to enable for "lifetime-start-on-first-use". - // 2) And also not safe for variable X in catch(X) in windows. for (unsigned slot = 0; slot < NumSlot; ++slot) { - if (NumStartLifetimes[slot] > 1 || NumEndLifetimes[slot] > 1 || - (NumLoadInCatchPad[slot] > 1 && !StoreSlots.test(slot))) + if (NumStartLifetimes[slot] > 1 || NumEndLifetimes[slot] > 1) ConservativeSlots.set(slot); } + + // The write to the catch object by the personality function is not propely + // modeled in IR: It happens before any cleanuppads are executed, even if the + // first mention of the catch object is in a catchpad. As such, mark catch + // object slots as conservative, so they are excluded from first-use analysis. + if (WinEHFuncInfo *EHInfo = MF->getWinEHFuncInfo()) + for (WinEHTryBlockMapEntry &TBME : EHInfo->TryBlockMap) + for (WinEHHandlerType &H : TBME.HandlerArray) + if (H.CatchObj.FrameIndex != std::numeric_limits::max() && + H.CatchObj.FrameIndex >= 0) + ConservativeSlots.set(H.CatchObj.FrameIndex); + LLVM_DEBUG(dumpBV("Conservative slots", ConservativeSlots)); // Step 2: compute begin/end sets for each block diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index c7a6dd7deb45..a1753a40a117 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -7388,7 +7388,9 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, // Ensure we generate all stores for each tuple part, whilst updating the // pointer after each store correctly using vscale. while (NumParts) { - Chain = DAG.getStore(Chain, DL, OutVals[i], Ptr, MPI); + SDValue Store = DAG.getStore(Chain, DL, OutVals[i], Ptr, MPI); + MemOpChains.push_back(Store); + NumParts--; if (NumParts > 0) { SDValue BytesIncrement; diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td b/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td index 471b706cc408..fde386188cd8 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td @@ -4854,7 +4854,7 @@ class AI_crc32 sz, string suffix, SDPatternOperator builtin> : AInoP<(outs GPRnopc:$Rd), (ins GPRnopc:$Rn, GPRnopc:$Rm), MiscFrm, NoItinerary, !strconcat("crc32", suffix), "\t$Rd, $Rn, $Rm", [(set GPRnopc:$Rd, (builtin GPRnopc:$Rn, GPRnopc:$Rm))]>, - Requires<[IsARM, HasV8, HasCRC]> { + Requires<[IsARM, HasCRC]> { bits<4> Rd; bits<4> Rn; bits<4> Rm; diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td b/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td index 610a71d68ec8..f68f73523ba1 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td @@ -3448,7 +3448,7 @@ class T2I_crc32 sz, string suffix, SDPatternOperator builtin> : T2ThreeRegNoP<(outs rGPR:$Rd), (ins rGPR:$Rn, rGPR:$Rm), NoItinerary, !strconcat("crc32", suffix, "\t$Rd, $Rn, $Rm"), [(set rGPR:$Rd, (builtin rGPR:$Rn, rGPR:$Rm))]>, - Requires<[IsThumb2, HasV8, HasCRC]> { + Requires<[IsThumb2, HasCRC]> { let Inst{31-27} = 0b11111; let Inst{26-21} = 0b010110; let Inst{20} = C; diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index a089d61616e1..5c10d6307c76 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -279,7 +279,7 @@ public: void emitFunctionBodyEnd() override; - void emitPGORefs(); + void emitPGORefs(Module &M); void emitEndOfAsmFile(Module &) override; @@ -2636,10 +2636,28 @@ void PPCAIXAsmPrinter::emitFunctionEntryLabel() { getObjFileLowering().getFunctionEntryPointSymbol(Alias, TM)); } -void PPCAIXAsmPrinter::emitPGORefs() { - if (OutContext.hasXCOFFSection( +void PPCAIXAsmPrinter::emitPGORefs(Module &M) { + if (!OutContext.hasXCOFFSection( "__llvm_prf_cnts", - XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD))) { + XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD))) + return; + + // When inside a csect `foo`, a .ref directive referring to a csect `bar` + // translates into a relocation entry from `foo` to` bar`. The referring + // csect, `foo`, is identified by its address. If multiple csects have the + // same address (because one or more of them are zero-length), the referring + // csect cannot be determined. Hence, we don't generate the .ref directives + // if `__llvm_prf_cnts` is an empty section. + bool HasNonZeroLengthPrfCntsSection = false; + const DataLayout &DL = M.getDataLayout(); + for (GlobalVariable &GV : M.globals()) + if (GV.hasSection() && GV.getSection().equals("__llvm_prf_cnts") && + DL.getTypeAllocSize(GV.getValueType()) > 0) { + HasNonZeroLengthPrfCntsSection = true; + break; + } + + if (HasNonZeroLengthPrfCntsSection) { MCSection *CntsSection = OutContext.getXCOFFSection( "__llvm_prf_cnts", SectionKind::getData(), XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD), @@ -2673,7 +2691,7 @@ void PPCAIXAsmPrinter::emitEndOfAsmFile(Module &M) { if (M.empty() && TOCDataGlobalVars.empty()) return; - emitPGORefs(); + emitPGORefs(M); // Switch to section to emit TOC base. OutStreamer->switchSection(getObjFileLowering().getTOCBaseSection()); diff --git a/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp b/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp index 03e8a2507b45..4cfc0bacefbc 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp @@ -2778,7 +2778,12 @@ bool GVNPass::processBlock(BasicBlock *BB) { // use our normal hash approach for phis. Instead, simply look for // obvious duplicates. The first pass of GVN will tend to create // identical phis, and the second or later passes can eliminate them. - ChangedFunction |= EliminateDuplicatePHINodes(BB); + SmallPtrSet PHINodesToRemove; + ChangedFunction |= EliminateDuplicatePHINodes(BB, PHINodesToRemove); + for (PHINode *PN : PHINodesToRemove) { + VN.erase(PN); + removeInstruction(PN); + } for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE;) { diff --git a/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp index 00937e0d734a..91dc5018d232 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -332,6 +332,17 @@ static bool writtenBetween(MemorySSA *MSSA, BatchAAResults &AA, return !MSSA->dominates(Clobber, Start); } +// Update AA metadata +static void combineAAMetadata(Instruction *ReplInst, Instruction *I) { + // FIXME: MD_tbaa_struct and MD_mem_parallel_loop_access should also be + // handled here, but combineMetadata doesn't support them yet + unsigned KnownIDs[] = {LLVMContext::MD_tbaa, LLVMContext::MD_alias_scope, + LLVMContext::MD_noalias, + LLVMContext::MD_invariant_group, + LLVMContext::MD_access_group}; + combineMetadata(ReplInst, I, KnownIDs, true); +} + /// When scanning forward over instructions, we look for some other patterns to /// fold away. In particular, this looks for stores to neighboring locations of /// memory. If it sees enough consecutive ones, it attempts to merge them @@ -1086,16 +1097,9 @@ bool MemCpyOptPass::performCallSlotOptzn(Instruction *cpyLoad, MSSA->getMemoryAccess(C)); } - // Update AA metadata - // FIXME: MD_tbaa_struct and MD_mem_parallel_loop_access should also be - // handled here, but combineMetadata doesn't support them yet - unsigned KnownIDs[] = {LLVMContext::MD_tbaa, LLVMContext::MD_alias_scope, - LLVMContext::MD_noalias, - LLVMContext::MD_invariant_group, - LLVMContext::MD_access_group}; - combineMetadata(C, cpyLoad, KnownIDs, true); + combineAAMetadata(C, cpyLoad); if (cpyLoad != cpyStore) - combineMetadata(C, cpyStore, KnownIDs, true); + combineAAMetadata(C, cpyStore); ++NumCallSlot; return true; @@ -1694,6 +1698,7 @@ bool MemCpyOptPass::processImmutArgument(CallBase &CB, unsigned ArgNo) { << " " << CB << "\n"); // Otherwise we're good! Update the immut argument. + combineAAMetadata(&CB, MDep); CB.setArgOperand(ArgNo, MDep->getSource()); ++NumMemCpyInstr; return true; diff --git a/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp index ad7d34b61470..633d077e6492 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp @@ -2126,9 +2126,10 @@ static void unswitchNontrivialInvariants( Loop &L, Instruction &TI, ArrayRef Invariants, IVConditionInfo &PartialIVInfo, DominatorTree &DT, LoopInfo &LI, AssumptionCache &AC, - function_ref)> UnswitchCB, + function_ref)> UnswitchCB, ScalarEvolution *SE, MemorySSAUpdater *MSSAU, - function_ref DestroyLoopCB, bool InsertFreeze) { + function_ref DestroyLoopCB, bool InsertFreeze, + bool InjectedCondition) { auto *ParentBB = TI.getParent(); BranchInst *BI = dyn_cast(&TI); SwitchInst *SI = BI ? nullptr : cast(&TI); @@ -2581,7 +2582,7 @@ static void unswitchNontrivialInvariants( for (Loop *UpdatedL : llvm::concat(NonChildClonedLoops, HoistedLoops)) if (UpdatedL->getParentLoop() == ParentL) SibLoops.push_back(UpdatedL); - UnswitchCB(IsStillLoop, PartiallyInvariant, SibLoops); + UnswitchCB(IsStillLoop, PartiallyInvariant, InjectedCondition, SibLoops); if (MSSAU && VerifyMemorySSA) MSSAU->getMemorySSA()->verifyMemorySSA(); @@ -2979,13 +2980,6 @@ static bool shouldTryInjectInvariantCondition( /// the metadata. bool shouldTryInjectBasingOnMetadata(const BranchInst *BI, const BasicBlock *TakenSucc) { - // Skip branches that have already been unswithed this way. After successful - // unswitching of injected condition, we will still have a copy of this loop - // which looks exactly the same as original one. To prevent the 2nd attempt - // of unswitching it in the same pass, mark this branch as "nothing to do - // here". - if (BI->hasMetadata("llvm.invariant.condition.injection.disabled")) - return false; SmallVector Weights; if (!extractBranchWeights(*BI, Weights)) return false; @@ -3060,7 +3054,6 @@ injectPendingInvariantConditions(NonTrivialUnswitchCandidate Candidate, Loop &L, auto *InjectedCond = ICmpInst::Create(Instruction::ICmp, Pred, LHS, RHS, "injected.cond", Preheader->getTerminator()); - auto *OldCond = TI->getCondition(); BasicBlock *CheckBlock = BasicBlock::Create(Ctx, BB->getName() + ".check", BB->getParent(), InLoopSucc); @@ -3069,12 +3062,9 @@ injectPendingInvariantConditions(NonTrivialUnswitchCandidate Candidate, Loop &L, Builder.CreateCondBr(InjectedCond, InLoopSucc, CheckBlock); Builder.SetInsertPoint(CheckBlock); - auto *NewTerm = Builder.CreateCondBr(OldCond, InLoopSucc, OutOfLoopSucc); - + Builder.CreateCondBr(TI->getCondition(), TI->getSuccessor(0), + TI->getSuccessor(1)); TI->eraseFromParent(); - // Prevent infinite unswitching. - NewTerm->setMetadata("llvm.invariant.condition.injection.disabled", - MDNode::get(BB->getContext(), {})); // Fixup phis. for (auto &I : *InLoopSucc) { @@ -3442,7 +3432,7 @@ static bool shouldInsertFreeze(Loop &L, Instruction &TI, DominatorTree &DT, static bool unswitchBestCondition( Loop &L, DominatorTree &DT, LoopInfo &LI, AssumptionCache &AC, AAResults &AA, TargetTransformInfo &TTI, - function_ref)> UnswitchCB, + function_ref)> UnswitchCB, ScalarEvolution *SE, MemorySSAUpdater *MSSAU, function_ref DestroyLoopCB) { // Collect all invariant conditions within this loop (as opposed to an inner @@ -3452,9 +3442,10 @@ static bool unswitchBestCondition( Instruction *PartialIVCondBranch = nullptr; collectUnswitchCandidates(UnswitchCandidates, PartialIVInfo, PartialIVCondBranch, L, LI, AA, MSSAU); - collectUnswitchCandidatesWithInjections(UnswitchCandidates, PartialIVInfo, - PartialIVCondBranch, L, DT, LI, AA, - MSSAU); + if (!findOptionMDForLoop(&L, "llvm.loop.unswitch.injection.disable")) + collectUnswitchCandidatesWithInjections(UnswitchCandidates, PartialIVInfo, + PartialIVCondBranch, L, DT, LI, AA, + MSSAU); // If we didn't find any candidates, we're done. if (UnswitchCandidates.empty()) return false; @@ -3475,8 +3466,11 @@ static bool unswitchBestCondition( return false; } - if (Best.hasPendingInjection()) + bool InjectedCondition = false; + if (Best.hasPendingInjection()) { Best = injectPendingInvariantConditions(Best, L, DT, LI, AC, MSSAU); + InjectedCondition = true; + } assert(!Best.hasPendingInjection() && "All injections should have been done by now!"); @@ -3504,7 +3498,7 @@ static bool unswitchBestCondition( << ") terminator: " << *Best.TI << "\n"); unswitchNontrivialInvariants(L, *Best.TI, Best.Invariants, PartialIVInfo, DT, LI, AC, UnswitchCB, SE, MSSAU, DestroyLoopCB, - InsertFreeze); + InsertFreeze, InjectedCondition); return true; } @@ -3533,7 +3527,7 @@ static bool unswitchLoop(Loop &L, DominatorTree &DT, LoopInfo &LI, AssumptionCache &AC, AAResults &AA, TargetTransformInfo &TTI, bool Trivial, bool NonTrivial, - function_ref)> UnswitchCB, + function_ref)> UnswitchCB, ScalarEvolution *SE, MemorySSAUpdater *MSSAU, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI, function_ref DestroyLoopCB) { @@ -3548,7 +3542,8 @@ unswitchLoop(Loop &L, DominatorTree &DT, LoopInfo &LI, AssumptionCache &AC, if (Trivial && unswitchAllTrivialConditions(L, DT, LI, SE, MSSAU)) { // If we unswitched successfully we will want to clean up the loop before // processing it further so just mark it as unswitched and return. - UnswitchCB(/*CurrentLoopValid*/ true, false, {}); + UnswitchCB(/*CurrentLoopValid*/ true, /*PartiallyInvariant*/ false, + /*InjectedCondition*/ false, {}); return true; } @@ -3644,6 +3639,7 @@ PreservedAnalyses SimpleLoopUnswitchPass::run(Loop &L, LoopAnalysisManager &AM, auto UnswitchCB = [&L, &U, &LoopName](bool CurrentLoopValid, bool PartiallyInvariant, + bool InjectedCondition, ArrayRef NewLoops) { // If we did a non-trivial unswitch, we have added new (cloned) loops. if (!NewLoops.empty()) @@ -3663,6 +3659,16 @@ PreservedAnalyses SimpleLoopUnswitchPass::run(Loop &L, LoopAnalysisManager &AM, *** 405 LINES SKIPPED *** From nobody Sun Jan 7 17:50:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqR0bKNz55XHk; Sun, 7 Jan 2024 17:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7PqQ6Zxsz4MCN; Sun, 7 Jan 2024 17:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FjZ+6nZfd4aZMU9NiwLUyfIt8/tFN7MuLYChjw8yQMk=; b=x1HBXA/gIvAQR8zR0k4fOo7C38YIkjQxGCReBVkZQUm0B+1qAVFeXaqGSsnGUzBnhWgkR8 YaJHd6FlQ4TJm9uIOhJyjdEb2Qq+broj5QVp0jJQ0We99DzqWVGcDfXFEw0XFFiGWyhJf3 wpy252FtT7YfFhbszBkCdKcQYs0qkIIfD+uarWjeR6fkDU7HhdNpttCjgKXCn40L3ib41X CuCoIZLaqFrRLQzroGH216+gqmq/T3EyLZbHrCJ1vYV5jLer8Mrk2Yc/DJiLU4/t0QwHLS VEAfU8bx4ORboU3ehuN/zTjjv6wZbK2NAmLXTHppgZIlZ17tmSamk9+IwHmvgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FjZ+6nZfd4aZMU9NiwLUyfIt8/tFN7MuLYChjw8yQMk=; b=EnXxeu0pFfd8OrShvC/ZhbRoRFwyPfQSJOJs5b6RX5rfNPLzsp51BTEkJ7DqGoYWprGTfA 52GVW4O9Sdlsi7tTLmjJwwflTp/oBAfUkqQ2P15UD9wjtSm/wz0D+LE6OQ5WN+HSif9TfD DqwmztMSbrxfRJq69Eh8cxSWK4eahtsEAeivZW/oYd1qa3/gWL0hnf7I5vP6mWNcntsY4H xZxQQb6okUPqy9pn5pUZ6PJp9UCeBzX+iZ+fRf5gu0i12ZvFNb7myyoKFOP71jl56EgTNy qQLrv5l+/tre1khsTZJhJADJncwyeFf3f7eOL7ed0zdxE0CSTkiPTGYGQhStcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649826; a=rsa-sha256; cv=none; b=bxpET0fWPZu8a9LHCVchmmaoukkvpU+iWgpuI4IbrE+xcZfNsl4VqwhA09+VvbInJZPk0j eY+byBdn3QJv7Z32bejUE+3ydG0ZCoDyrfK2wjdl+Nc2cSZUO5U/6pge9uREgVqhSdmdQA vZHMQfB3RhecNtUBYEIviiDc6Jtg23hyTgcYkmmpOdp4t0VMHaxiHx+iMrSi5CyTNUHKKN ooAF1HeNujmNwW4siQ1gpAYXNXXY4uznsKGcBl9VF3UHCuwVCUEGd0yhF8YTuoyTUCHjCW sEkzkqPuApmX3OZVJgkhR7GK0+hbeGC5wmbNDdfKJa87CeWUX0PizZXCiWf5Og== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqQ5LvWzZD9; Sun, 7 Jan 2024 17:50: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 407HoQeN021966; Sun, 7 Jan 2024 17:50:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoQoP021963; Sun, 7 Jan 2024 17:50:26 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:26 GMT Message-Id: <202401071750.407HoQoP021963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4f2bdef80e8e - stable/14 - Merge llvm-project release/17.x llvmorg-17.0.2-0-gb2417f51dbbd List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4f2bdef80e8ef59a7d4c8e32ab895613cf73ba22 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4f2bdef80e8ef59a7d4c8e32ab895613cf73ba22 commit 4f2bdef80e8ef59a7d4c8e32ab895613cf73ba22 Author: Dimitry Andric AuthorDate: 2023-10-04 18:24:05 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:18 +0000 Merge llvm-project release/17.x llvmorg-17.0.2-0-gb2417f51dbbd This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.2-0-gb2417f51dbbd. PR: 273753 MFC after: 1 month (cherry picked from commit 3bd749dbd90cc3b95719b65393df5ca8a0fe919d) --- .../clang/lib/Driver/ToolChains/MinGW.cpp | 7 ++-- .../llvm-project/libcxx/include/__utility/pair.h | 4 +-- contrib/llvm-project/lld/COFF/Driver.cpp | 42 +++++++++++----------- contrib/llvm-project/lld/Common/Filesystem.cpp | 2 +- .../lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 +- lib/clang/include/VCSVersion.inc | 6 ++-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 8 files changed, 36 insertions(+), 31 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp index b47041dcca70..eaec1d22e6e5 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp @@ -699,8 +699,11 @@ void toolchains::MinGW::addClangTargetOptions( } } - if (Arg *A = DriverArgs.getLastArgNoClaim(options::OPT_mthreads)) - A->ignoreTargetSpecific(); + for (auto Opt : {options::OPT_mthreads, options::OPT_mwindows, + options::OPT_mconsole, options::OPT_mdll}) { + if (Arg *A = DriverArgs.getLastArgNoClaim(Opt)) + A->ignoreTargetSpecific(); + } } void toolchains::MinGW::AddClangCXXStdlibIncludeArgs( diff --git a/contrib/llvm-project/libcxx/include/__utility/pair.h b/contrib/llvm-project/libcxx/include/__utility/pair.h index 43c9dbec737b..6b8c43dbe6e4 100644 --- a/contrib/llvm-project/libcxx/include/__utility/pair.h +++ b/contrib/llvm-project/libcxx/include/__utility/pair.h @@ -288,9 +288,9 @@ struct _LIBCPP_TEMPLATE_VIS pair # if _LIBCPP_STD_VER >= 23 // This is a workaround for http://llvm.org/PR60710. We should be able to remove it once Clang is fixed. - template >::value == 2> + template _LIBCPP_HIDE_FROM_ABI static constexpr bool __pair_like_explicit_wknd() { - if constexpr (tuple_size>::value == 2) { + if constexpr (__pair_like<_PairLike>) { return !is_convertible_v(std::declval<_PairLike&&>())), first_type> || !is_convertible_v(std::declval<_PairLike&&>())), second_type>; } diff --git a/contrib/llvm-project/lld/COFF/Driver.cpp b/contrib/llvm-project/lld/COFF/Driver.cpp index d7476e91e03e..e2f414f78ecb 100644 --- a/contrib/llvm-project/lld/COFF/Driver.cpp +++ b/contrib/llvm-project/lld/COFF/Driver.cpp @@ -342,8 +342,8 @@ void LinkerDriver::enqueueArchiveMember(const Archive::Child &c, CHECK(c.getFullName(), "could not get the filename for the member defining symbol " + toCOFFString(ctx, sym)); - auto future = std::make_shared>( - createFutureForFile(childName)); + auto future = + std::make_shared>(createFutureForFile(childName)); enqueueTask([=]() { auto mbOrErr = future->get(); if (mbOrErr.second) @@ -640,26 +640,24 @@ void LinkerDriver::detectWinSysRoot(const opt::InputArgList &Args) { void LinkerDriver::addClangLibSearchPaths(const std::string &argv0) { std::string lldBinary = sys::fs::getMainExecutable(argv0.c_str(), nullptr); SmallString<128> binDir(lldBinary); - sys::path::remove_filename(binDir); // remove lld-link.exe + sys::path::remove_filename(binDir); // remove lld-link.exe StringRef rootDir = sys::path::parent_path(binDir); // remove 'bin' SmallString<128> libDir(rootDir); sys::path::append(libDir, "lib"); - // We need to prepend the paths here in order to make sure that we always - // try to link the clang versions of the builtins over the ones supplied by MSVC. - searchPaths.insert(searchPaths.begin(), saver().save(libDir.str())); // Add the resource dir library path SmallString<128> runtimeLibDir(rootDir); - sys::path::append(runtimeLibDir, "lib", "clang", std::to_string(LLVM_VERSION_MAJOR), "lib"); - searchPaths.insert(searchPaths.begin(), saver().save(runtimeLibDir.str())); - + sys::path::append(runtimeLibDir, "lib", "clang", + std::to_string(LLVM_VERSION_MAJOR), "lib"); // Resource dir + osname, which is hardcoded to windows since we are in the // COFF driver. SmallString<128> runtimeLibDirWithOS(runtimeLibDir); sys::path::append(runtimeLibDirWithOS, "windows"); - searchPaths.insert(searchPaths.begin(), saver().save(runtimeLibDirWithOS.str())); + searchPaths.push_back(saver().save(runtimeLibDirWithOS.str())); + searchPaths.push_back(saver().save(runtimeLibDir.str())); + searchPaths.push_back(saver().save(libDir.str())); } void LinkerDriver::addWinSysRootLibSearchPaths() { @@ -1145,8 +1143,7 @@ void LinkerDriver::parseOrderFile(StringRef arg) { if (set.count(s) == 0) { if (ctx.config.warnMissingOrderSymbol) warn("/order:" + arg + ": missing symbol: " + s + " [LNK4037]"); - } - else + } else ctx.config.order[s] = INT_MIN + ctx.config.order.size(); } @@ -1313,8 +1310,8 @@ void LinkerDriver::parsePDBAltPath() { else if (var.equals_insensitive("%_ext%")) buf.append(binaryExtension); else { - warn("only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping " + - var + " as literal"); + warn("only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping " + var + + " as literal"); buf.append(var); } @@ -1448,8 +1445,8 @@ getVFS(const opt::InputArgList &args) { return nullptr; } - if (auto ret = vfs::getVFSFromYAML(std::move(*bufOrErr), /*DiagHandler*/ nullptr, - arg->getValue())) + if (auto ret = vfs::getVFSFromYAML(std::move(*bufOrErr), + /*DiagHandler*/ nullptr, arg->getValue())) return ret; error("Invalid vfs overlay"); @@ -1563,12 +1560,13 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { // Construct search path list. searchPaths.emplace_back(""); + // Prefer the Clang provided builtins over the ones bundled with MSVC. + addClangLibSearchPaths(argsArr[0]); for (auto *arg : args.filtered(OPT_libpath)) searchPaths.push_back(arg->getValue()); detectWinSysRoot(args); if (!args.hasArg(OPT_lldignoreenv) && !args.hasArg(OPT_winsysroot)) addLibSearchPaths(); - addClangLibSearchPaths(argsArr[0]); // Handle /ignore for (auto *arg : args.filtered(OPT_ignore)) { @@ -2083,8 +2081,11 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { raw_svector_ostream stream(buffer); stream << "Library search paths:\n"; - for (StringRef path : searchPaths) + for (StringRef path : searchPaths) { + if (path == "") + path = "(cwd)"; stream << " " << path << "\n"; + } message(buffer); } @@ -2101,7 +2102,7 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { // Handle /RELEASE if (args.hasArg(OPT_release)) config->writeCheckSum = true; - + // Handle /safeseh, x86 only, on by default, except for mingw. if (config->machine == I386) { config->safeSEH = args.hasFlag(OPT_safeseh, OPT_safeseh_no, !config->mingw); @@ -2342,7 +2343,8 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { std::vector wrapped = addWrappedSymbols(ctx, args); // Load more object files that might be needed for wrapped symbols. if (!wrapped.empty()) - while (run()); + while (run()) + ; if (config->autoImport || config->stdcallFixup) { // MinGW specific. diff --git a/contrib/llvm-project/lld/Common/Filesystem.cpp b/contrib/llvm-project/lld/Common/Filesystem.cpp index 671b352a3f6b..c93353f2d292 100644 --- a/contrib/llvm-project/lld/Common/Filesystem.cpp +++ b/contrib/llvm-project/lld/Common/Filesystem.cpp @@ -57,7 +57,7 @@ void lld::unlinkAsync(StringRef path) { // // The code here allows LLD to work on all versions of Windows. // However, at Windows 10 1903 it seems that the behavior of - // Windows has changed, so that we could simply delete the output + // Windows has changed, so that we could simply delete the output // file. This code should be simplified once support for older // versions of Windows is dropped. // diff --git a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 55fb522554fa..4ffffd85ee53 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -855,7 +855,7 @@ static MCSectionELF *selectELFSectionForGlobal( Group = C->getName(); IsComdat = C->getSelectionKind() == Comdat::Any; } - if (isa(GO)) { + if (isa(GO) && !cast(GO)->isThreadLocal()) { if (TM.isLargeData()) { assert(TM.getTargetTriple().getArch() == Triple::x86_64); Flags |= ELF::SHF_X86_64_LARGE; diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index c4338e330ee5..09e5bd0806a8 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-17.0.1-25-g098e653a5bed" +#define LLVM_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-17.0.1-25-g098e653a5bed" +#define CLANG_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-17.0.1-25-g098e653a5bed" +#define LLDB_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index d8b1ac96c623..722673ac78da 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "17.0.2 (FreeBSD llvmorg-17.0.1-25-g098e653a5bed-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "17.0.2 (FreeBSD llvmorg-17.0.2-0-gb2417f51dbbd-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 796a12cb1ea0..846d3cb3e014 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-17.0.1-25-g098e653a5bed" +#define LLVM_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Sun Jan 7 17:50:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqS3TSnz55X7T; Sun, 7 Jan 2024 17:50: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 4T7PqS0Vt2z4MS9; Sun, 7 Jan 2024 17:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+BwBq+n0g8GGq7elXxwL+aG2Mq3T5g0NJEC0arkmb5U=; b=JjJpn2OhvFKWRJi8uM0XtK8y941xqOUbNdCB7cSFNrk2DokR+t+R2z+VPIVj0veUYDbPgd aliQrFNNIpxpLK4nz3zUnvvaSVt9Se4ptlCZMDVKBBfhpyubCnLu9zK+mPw+QETjH78XGP tov7KWKNeZ6dnsdzSxivC2uVl8BGYhhebi2HuMmiVyu2lBqNeNdor9jlqn88FEbslOInbs VzKVewkBIj4mIFB7CRNqyzf6romLOlsV+XCoMxgQz2pA086g4hG5z9EHQgZ5nM9K8ghReV dDpzteXZTRvuu1GX+FYj8GZ66DWmAHolum3c1MMdpcA61xE39rhraGpVnKH4ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+BwBq+n0g8GGq7elXxwL+aG2Mq3T5g0NJEC0arkmb5U=; b=YolUPc+gT8SRBGvBPs54s0cY5c2HI64t3qmCzGJeovxavXXPQ+881QYz1TCP8ks2IeLUcs caTTTRvvus4o/LNPAd+yCo25MxQrfZ+cWgJIKa1jqN6KnRRovFrahabOsqsel5/hgMmeAB fEr2/zIRCIOWTjkEqGh0EpQhCmUPKAQKCsHyVynnZNr7lFqgjnw4J6OChv/GbJ7IXc5xax bWPoNGIyBH+J/8rkCRTYf4cvXVdMRaMycwts6xa4tTIZwcubvkfi/KT6Pa1BFoEwHpiIQs ekDMiSvumHIo4vKPtgcYVW4ZHbu6QdEMG3NhNFeAFQw7rBDYo2umxhZfxEpjiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649828; a=rsa-sha256; cv=none; b=Q58+pEO7vIvSMgPsPWveTejJpU4TFZwlHRKlbxqjp/9iaPp+9c21AamUiFBBmQMvYIJNTg n50Py8I6cn5VMcmzIFhOLziAQpV9zpws6mJzEsrgRVzlIOJDSxx+aeE/KgH/X/oM2F0XdF K1HLVG04Jvi6YXhqA60UgL/4G5Ku4yVvT6Gg2A6T3Fs+WRIiPT60G9bWj/DElzM5Z2sz+x UGc9ZWxU4YaQ4ZiXeEHiM77UDgEgagyC+HWW+g3/5AcocZJ+bAMpfbEBRkhnKPG2TNJ/xz R2qbg1PHB4pFbVAjL3AT5TOO9bOrFBAkOt4c+5S2OC1hZ2jqS9AFipuwEBHjbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqR6dz8zZDB; Sun, 7 Jan 2024 17:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407HoRXJ022011; Sun, 7 Jan 2024 17:50:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoRp2022008; Sun, 7 Jan 2024 17:50:27 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:27 GMT Message-Id: <202401071750.407HoRp2022008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c25d8933a86a - stable/14 - Merge llvm-project release/17.x llvmorg-17.0.3-0-g888437e1b600 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c25d8933a86ad2ca82d38a2d8a1f1f7c1fc1e2f4 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c25d8933a86ad2ca82d38a2d8a1f1f7c1fc1e2f4 commit c25d8933a86ad2ca82d38a2d8a1f1f7c1fc1e2f4 Author: Dimitry Andric AuthorDate: 2023-10-21 13:31:11 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:18 +0000 Merge llvm-project release/17.x llvmorg-17.0.3-0-g888437e1b600 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.3-0-g888437e1b600. PR: 273753 MFC after: 1 month (cherry picked from commit bdb86d1a853a919764f65fdedcea76d76e4d619b) --- .../clang/lib/Driver/ToolChains/MinGW.cpp | 2 + .../clang/lib/Format/UnwrappedLineParser.cpp | 24 +++++++++ .../clang/lib/Format/UnwrappedLineParser.h | 11 ++++ .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 25 +++++---- .../clang/utils/TableGen/ClangAttrEmitter.cpp | 17 +++--- contrib/llvm-project/libcxx/include/__config | 2 +- contrib/llvm-project/lld/COFF/InputFiles.cpp | 2 + .../llvm/lib/Analysis/LazyValueInfo.cpp | 2 +- contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp | 3 ++ .../lib/Target/AArch64/AArch64ISelLowering.cpp | 7 ++- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 +- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 21 ++++++-- .../Instrumentation/AddressSanitizer.cpp | 61 ++++++++++++---------- lib/clang/include/VCSVersion.inc | 6 +-- lib/clang/include/clang/Basic/Version.inc | 6 +-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +-- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 20 files changed, 139 insertions(+), 70 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp index eaec1d22e6e5..503dbf3f0dea 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp @@ -699,6 +699,8 @@ void toolchains::MinGW::addClangTargetOptions( } } + CC1Args.push_back("-fno-use-init-array"); + for (auto Opt : {options::OPT_mthreads, options::OPT_mwindows, options::OPT_mconsole, options::OPT_mdll}) { if (Arg *A = DriverArgs.getLastArgNoClaim(Opt)) diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 852437b9390f..07ff86bc50a2 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -173,10 +173,12 @@ void UnwrappedLineParser::reset() { CommentsBeforeNextToken.clear(); FormatTok = nullptr; MustBreakBeforeNextToken = false; + IsDecltypeAutoFunction = false; PreprocessorDirectives.clear(); CurrentLines = &Lines; DeclarationScopeStack.clear(); NestedTooDeep.clear(); + NestedLambdas.clear(); PPStack.clear(); Line->FirstStartColumn = FirstStartColumn; @@ -1757,6 +1759,17 @@ void UnwrappedLineParser::parseStructuralElement( if (parseStructLike()) return; break; + case tok::kw_decltype: + nextToken(); + if (FormatTok->is(tok::l_paren)) { + parseParens(); + assert(FormatTok->Previous); + if (FormatTok->Previous->endsSequence(tok::r_paren, tok::kw_auto, + tok::l_paren)) { + Line->SeenDecltypeAuto = true; + } + } + break; case tok::period: nextToken(); // In Java, classes have an implicit static member "class". @@ -1818,6 +1831,7 @@ void UnwrappedLineParser::parseStructuralElement( if (NextLBracesType != TT_Unknown) FormatTok->setFinalizedType(NextLBracesType); if (!tryToParsePropertyAccessor() && !tryToParseBracedList()) { + IsDecltypeAutoFunction = Line->SeenDecltypeAuto; // A block outside of parentheses must be the last part of a // structural element. // FIXME: Figure out cases where this is not true, and add projections @@ -1835,6 +1849,7 @@ void UnwrappedLineParser::parseStructuralElement( } FormatTok->setFinalizedType(TT_FunctionLBrace); parseBlock(); + IsDecltypeAutoFunction = false; addUnwrappedLine(); return; } @@ -2249,9 +2264,15 @@ bool UnwrappedLineParser::tryToParseLambda() { return true; } } + FormatTok->setFinalizedType(TT_LambdaLBrace); LSquare.setFinalizedType(TT_LambdaLSquare); + + NestedLambdas.push_back(Line->SeenDecltypeAuto); parseChildBlock(); + assert(!NestedLambdas.empty()); + NestedLambdas.pop_back(); + return true; } @@ -2471,6 +2492,8 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) { PrevPrev->endsSequence(tok::kw_constexpr, tok::kw_if)))); const bool ReturnParens = Style.RemoveParentheses == FormatStyle::RPS_ReturnStatement && + ((NestedLambdas.empty() && !IsDecltypeAutoFunction) || + (!NestedLambdas.empty() && !NestedLambdas.back())) && Prev && Prev->isOneOf(tok::kw_return, tok::kw_co_return) && Next && Next->is(tok::semi); if ((DoubleParens && !Blacklisted) || ReturnParens) { @@ -4386,6 +4409,7 @@ void UnwrappedLineParser::addUnwrappedLine(LineLevel AdjustLevel) { Line->MatchingOpeningBlockLineIndex = UnwrappedLine::kInvalidIndex; Line->FirstStartColumn = 0; Line->IsContinuation = false; + Line->SeenDecltypeAuto = false; if (ClosesWhitesmithsBlock && AdjustLevel == LineLevel::Remove) --Line->Level; diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h index 57515af64a3e..96248d130ddb 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h @@ -61,6 +61,9 @@ struct UnwrappedLine { bool MustBeDeclaration; + /// Whether the parser has seen \c decltype(auto) in this line. + bool SeenDecltypeAuto = false; + /// \c True if this line should be indented by ContinuationIndent in /// addition to the normal indention level. bool IsContinuation = false; @@ -341,6 +344,14 @@ private: // statement contains more than some predefined number of nested statements). SmallVector NestedTooDeep; + // Keeps a stack of the states of nested lambdas (true if the return type of + // the lambda is `decltype(auto)`). + SmallVector NestedLambdas; + + // Whether the parser is parsing the body of a function whose return type is + // `decltype(auto)`. + bool IsDecltypeAutoFunction = false; + // Represents preprocessor branch type, so we can find matching // #if/#else/#endif directives. enum PPBranchKind { diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp index 8626fc6ea16f..a94f009f3fa6 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp @@ -11166,12 +11166,15 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, ImplicitMatch == ArgType::NoMatchTypeConfusion) Match = ImplicitMatch; assert(Match != ArgType::MatchPromotion); + // Look through unscoped enums to their underlying type. bool IsEnum = false; bool IsScopedEnum = false; + QualType IntendedTy = ExprTy; if (auto EnumTy = ExprTy->getAs()) { + IntendedTy = EnumTy->getDecl()->getIntegerType(); if (EnumTy->isUnscopedEnumerationType()) { - ExprTy = EnumTy->getDecl()->getIntegerType(); + ExprTy = IntendedTy; // This controls whether we're talking about the underlying type or not, // which we only want to do when it's an unscoped enum. IsEnum = true; @@ -11183,7 +11186,6 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, // %C in an Objective-C context prints a unichar, not a wchar_t. // If the argument is an integer of some kind, believe the %C and suggest // a cast instead of changing the conversion specifier. - QualType IntendedTy = ExprTy; if (isObjCContext() && FS.getConversionSpecifier().getKind() == ConversionSpecifier::CArg) { if (ExprTy->isIntegralOrUnscopedEnumerationType() && @@ -11219,8 +11221,10 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, std::tie(CastTy, CastTyName) = shouldNotPrintDirectly(S.Context, IntendedTy, E); if (!CastTy.isNull()) { // %zi/%zu and %td/%tu are OK to use for NSInteger/NSUInteger of type int - // (long in ASTContext). Only complain to pedants. - if ((CastTyName == "NSInteger" || CastTyName == "NSUInteger") && + // (long in ASTContext). Only complain to pedants or when they're the + // underlying type of a scoped enum (which always needs a cast). + if (!IsScopedEnum && + (CastTyName == "NSInteger" || CastTyName == "NSUInteger") && (AT.isSizeT() || AT.isPtrdiffT()) && AT.matchesType(S.Context, CastTy)) Match = ArgType::NoMatchPedantic; @@ -11275,20 +11279,15 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, // should be printed as 'long' for 64-bit compatibility.) // Rather than emitting a normal format/argument mismatch, we want to // add a cast to the recommended type (and correct the format string - // if necessary). + // if necessary). We should also do so for scoped enumerations. SmallString<16> CastBuf; llvm::raw_svector_ostream CastFix(CastBuf); CastFix << (S.LangOpts.CPlusPlus ? "static_cast<" : "("); - if (IsScopedEnum) { - CastFix << AT.getRepresentativeType(S.Context).getAsString( - S.Context.getPrintingPolicy()); - } else { - IntendedTy.print(CastFix, S.Context.getPrintingPolicy()); - } + IntendedTy.print(CastFix, S.Context.getPrintingPolicy()); CastFix << (S.LangOpts.CPlusPlus ? ">" : ")"); SmallVector Hints; - if ((!AT.matchesType(S.Context, IntendedTy) && !IsScopedEnum) || + if (AT.matchesType(S.Context, IntendedTy) != ArgType::Match || ShouldNotPrintDirectly) Hints.push_back(FixItHint::CreateReplacement(SpecRange, os.str())); @@ -11316,7 +11315,7 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, Hints.push_back(FixItHint::CreateInsertion(After, ")")); } - if (ShouldNotPrintDirectly) { + if (ShouldNotPrintDirectly && !IsScopedEnum) { // The expression has a type that should not be printed directly. // We extract the name from the typedef because we don't want to show // the underlying type in the diagnostic. diff --git a/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp b/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp index 8ef728f86c6b..b5813c6abc2b 100644 --- a/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -2639,7 +2639,8 @@ static void emitAttributes(RecordKeeper &Records, raw_ostream &OS, OS << ", "; emitFormInitializer(OS, Spellings[0], "0"); } else { - OS << ", (\n"; + OS << ", [&]() {\n"; + OS << " switch (S) {\n"; std::set Uniques; unsigned Idx = 0; for (auto I = Spellings.begin(), E = Spellings.end(); I != E; @@ -2647,15 +2648,19 @@ static void emitAttributes(RecordKeeper &Records, raw_ostream &OS, const FlattenedSpelling &S = *I; const auto &Name = SemanticToSyntacticMap[Idx]; if (Uniques.insert(Name).second) { - OS << " S == " << Name << " ? AttributeCommonInfo::Form"; + OS << " case " << Name << ":\n"; + OS << " return AttributeCommonInfo::Form"; emitFormInitializer(OS, S, Name); - OS << " :\n"; + OS << ";\n"; } } - OS << " (llvm_unreachable(\"Unknown attribute spelling!\"), " - << " AttributeCommonInfo::Form"; + OS << " default:\n"; + OS << " llvm_unreachable(\"Unknown attribute spelling!\");\n" + << " return AttributeCommonInfo::Form"; emitFormInitializer(OS, Spellings[0], "0"); - OS << "))"; + OS << ";\n" + << " }\n" + << " }()"; } OS << ");\n"; diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index c37d643414aa..3859c027cd29 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -40,7 +40,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 170002 +# define _LIBCPP_VERSION 170003 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/lld/COFF/InputFiles.cpp b/contrib/llvm-project/lld/COFF/InputFiles.cpp index 541837a7fcec..a7a08fb2fa6e 100644 --- a/contrib/llvm-project/lld/COFF/InputFiles.cpp +++ b/contrib/llvm-project/lld/COFF/InputFiles.cpp @@ -661,6 +661,8 @@ std::optional ObjFile::createDefined( if (prevailing) { SectionChunk *c = readSection(sectionNumber, def, getName()); sparseChunks[sectionNumber] = c; + if (!c) + return nullptr; c->sym = cast(leader); c->selection = selection; cast(leader)->data = &c->repl; diff --git a/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp b/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp index 2ba6036056d9..b66c2378b72a 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp @@ -804,7 +804,7 @@ void LazyValueInfoImpl::intersectAssumeOrGuardBlockValueConstantRange( static ConstantRange getConstantRangeOrFull(const ValueLatticeElement &Val, Type *Ty, const DataLayout &DL) { - if (Val.isConstantRange()) + if (Val.isConstantRange(/*UndefAllowed*/ false)) return Val.getConstantRange(); return ConstantRange::getFull(DL.getTypeSizeInBits(Ty)); } diff --git a/contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp b/contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp index a2d61da722af..bb3492bec8aa 100644 --- a/contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp +++ b/contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp @@ -1402,6 +1402,9 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info, // here, but we'd have to emit the pdata, the xdata header, and the // epilogue scopes later, since they depend on whether the we need to // split the unwind data. + // + // If this is fixed, remove code in AArch64ISelLowering.cpp that + // disables loop alignment on Windows. RawFuncLength = GetAbsDifference(streamer, info->FuncletOrFuncEnd, info->Begin); } diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index a1753a40a117..6e721b937846 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -1033,7 +1033,12 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM, // Set required alignment. setMinFunctionAlignment(Align(4)); // Set preferred alignments. - setPrefLoopAlignment(STI.getPrefLoopAlignment()); + + // Don't align loops on Windows. The SEH unwind info generation needs to + // know the exact length of functions before the alignments have been + // expanded. + if (!Subtarget->isTargetWindows()) + setPrefLoopAlignment(STI.getPrefLoopAlignment()); setMaxBytesForAlignment(STI.getMaxBytesForLoopAlignment()); setPrefFunctionAlignment(STI.getPrefFunctionAlignment()); diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 819722360e33..547b71a6101a 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -15529,7 +15529,7 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N, break; SDValue ConstOp = DAG.getConstant(Imm, dl, MVT::i32); SDValue NarrowAnd = DAG.getNode(ISD::AND, dl, MVT::i32, NarrowOp, ConstOp); - return DAG.getAnyExtOrTrunc(NarrowAnd, dl, N->getValueType(0)); + return DAG.getZExtOrTrunc(NarrowAnd, dl, N->getValueType(0)); } case ISD::SHL: return combineSHL(N, DCI); diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp index d9750ea22e2b..0f1cb5f1e236 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -48539,13 +48539,28 @@ static SDValue combineSetCCMOVMSK(SDValue EFLAGS, X86::CondCode &CC, } // MOVMSK(SHUFFLE(X,u)) -> MOVMSK(X) iff every element is referenced. - SmallVector ShuffleMask; + // Since we peek through a bitcast, we need to be careful if the base vector + // type has smaller elements than the MOVMSK type. In that case, even if + // all the elements are demanded by the shuffle mask, only the "high" + // elements which have highbits that align with highbits in the MOVMSK vec + // elements are actually demanded. A simplification of spurious operations + // on the "low" elements take place during other simplifications. + // + // For example: + // MOVMSK64(BITCAST(SHUF32 X, (1,0,3,2))) even though all the elements are + // demanded, because we are swapping around the result can change. + // + // To address this, we check that we can scale the shuffle mask to MOVMSK + // element width (this will ensure "high" elements match). Its slightly overly + // conservative, but fine for an edge case fold. + SmallVector ShuffleMask, ScaledMaskUnused; SmallVector ShuffleInputs; if (NumElts <= CmpBits && getTargetShuffleInputs(peekThroughBitcasts(Vec), ShuffleInputs, ShuffleMask, DAG) && ShuffleInputs.size() == 1 && !isAnyZeroOrUndef(ShuffleMask) && - ShuffleInputs[0].getValueSizeInBits() == VecVT.getSizeInBits()) { + ShuffleInputs[0].getValueSizeInBits() == VecVT.getSizeInBits() && + scaleShuffleElements(ShuffleMask, NumElts, ScaledMaskUnused)) { unsigned NumShuffleElts = ShuffleMask.size(); APInt DemandedElts = APInt::getZero(NumShuffleElts); for (int M : ShuffleMask) { @@ -57239,7 +57254,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT, // TODO - combineX86ShufflesRecursively should handle shuffle concatenation // but it currently struggles with different vector widths. if (llvm::all_of(Ops, [Op0](SDValue Op) { - return Op.getOpcode() == Op0.getOpcode(); + return Op.getOpcode() == Op0.getOpcode() && Op.hasOneUse(); })) { auto ConcatSubOperand = [&](EVT VT, ArrayRef SubOps, unsigned I) { SmallVector Subs; diff --git a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index bde5fba20f3b..f4bf6db569f2 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -819,11 +819,11 @@ public: private: void initializeCallbacks(Module &M); - bool InstrumentGlobals(IRBuilder<> &IRB, Module &M, bool *CtorComdat); + void instrumentGlobals(IRBuilder<> &IRB, Module &M, bool *CtorComdat); void InstrumentGlobalsCOFF(IRBuilder<> &IRB, Module &M, ArrayRef ExtendedGlobals, ArrayRef MetadataInitializers); - void InstrumentGlobalsELF(IRBuilder<> &IRB, Module &M, + void instrumentGlobalsELF(IRBuilder<> &IRB, Module &M, ArrayRef ExtendedGlobals, ArrayRef MetadataInitializers, const std::string &UniqueModuleId); @@ -2177,7 +2177,7 @@ void ModuleAddressSanitizer::InstrumentGlobalsCOFF( appendToCompilerUsed(M, MetadataGlobals); } -void ModuleAddressSanitizer::InstrumentGlobalsELF( +void ModuleAddressSanitizer::instrumentGlobalsELF( IRBuilder<> &IRB, Module &M, ArrayRef ExtendedGlobals, ArrayRef MetadataInitializers, const std::string &UniqueModuleId) { @@ -2187,7 +2187,7 @@ void ModuleAddressSanitizer::InstrumentGlobalsELF( // false negative odr violations at link time. If odr indicators are used, we // keep the comdat sections, as link time odr violations will be dectected on // the odr indicator symbols. - bool UseComdatForGlobalsGC = UseOdrIndicator; + bool UseComdatForGlobalsGC = UseOdrIndicator && !UniqueModuleId.empty(); SmallVector MetadataGlobals(ExtendedGlobals.size()); for (size_t i = 0; i < ExtendedGlobals.size(); i++) { @@ -2237,7 +2237,7 @@ void ModuleAddressSanitizer::InstrumentGlobalsELF( // We also need to unregister globals at the end, e.g., when a shared library // gets closed. - if (DestructorKind != AsanDtorKind::None) { + if (DestructorKind != AsanDtorKind::None && !MetadataGlobals.empty()) { IRBuilder<> IrbDtor(CreateAsanModuleDtor(M)); IrbDtor.CreateCall(AsanUnregisterElfGlobals, {IRB.CreatePointerCast(RegisteredFlag, IntptrTy), @@ -2343,10 +2343,8 @@ void ModuleAddressSanitizer::InstrumentGlobalsWithMetadataArray( // redzones and inserts this function into llvm.global_ctors. // Sets *CtorComdat to true if the global registration code emitted into the // asan constructor is comdat-compatible. -bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, +void ModuleAddressSanitizer::instrumentGlobals(IRBuilder<> &IRB, Module &M, bool *CtorComdat) { - *CtorComdat = false; - // Build set of globals that are aliased by some GA, where // getExcludedAliasedGlobal(GA) returns the relevant GlobalVariable. SmallPtrSet AliasedGlobalExclusions; @@ -2364,11 +2362,6 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, } size_t n = GlobalsToChange.size(); - if (n == 0) { - *CtorComdat = true; - return false; - } - auto &DL = M.getDataLayout(); // A global is described by a structure @@ -2391,8 +2384,11 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, // We shouldn't merge same module names, as this string serves as unique // module ID in runtime. - GlobalVariable *ModuleName = createPrivateGlobalForString( - M, M.getModuleIdentifier(), /*AllowMerging*/ false, kAsanGenPrefix); + GlobalVariable *ModuleName = + n != 0 + ? createPrivateGlobalForString(M, M.getModuleIdentifier(), + /*AllowMerging*/ false, kAsanGenPrefix) + : nullptr; for (size_t i = 0; i < n; i++) { GlobalVariable *G = GlobalsToChange[i]; @@ -2517,19 +2513,27 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, } appendToCompilerUsed(M, ArrayRef(GlobalsToAddToUsedList)); - std::string ELFUniqueModuleId = - (UseGlobalsGC && TargetTriple.isOSBinFormatELF()) ? getUniqueModuleId(&M) - : ""; - - if (!ELFUniqueModuleId.empty()) { - InstrumentGlobalsELF(IRB, M, NewGlobals, Initializers, ELFUniqueModuleId); + if (UseGlobalsGC && TargetTriple.isOSBinFormatELF()) { + // Use COMDAT and register globals even if n == 0 to ensure that (a) the + // linkage unit will only have one module constructor, and (b) the register + // function will be called. The module destructor is not created when n == + // 0. *CtorComdat = true; - } else if (UseGlobalsGC && TargetTriple.isOSBinFormatCOFF()) { - InstrumentGlobalsCOFF(IRB, M, NewGlobals, Initializers); - } else if (UseGlobalsGC && ShouldUseMachOGlobalsSection()) { - InstrumentGlobalsMachO(IRB, M, NewGlobals, Initializers); + instrumentGlobalsELF(IRB, M, NewGlobals, Initializers, + getUniqueModuleId(&M)); + } else if (n == 0) { + // When UseGlobalsGC is false, COMDAT can still be used if n == 0, because + // all compile units will have identical module constructor/destructor. + *CtorComdat = TargetTriple.isOSBinFormatELF(); } else { - InstrumentGlobalsWithMetadataArray(IRB, M, NewGlobals, Initializers); + *CtorComdat = false; + if (UseGlobalsGC && TargetTriple.isOSBinFormatCOFF()) { + InstrumentGlobalsCOFF(IRB, M, NewGlobals, Initializers); + } else if (UseGlobalsGC && ShouldUseMachOGlobalsSection()) { + InstrumentGlobalsMachO(IRB, M, NewGlobals, Initializers); + } else { + InstrumentGlobalsWithMetadataArray(IRB, M, NewGlobals, Initializers); + } } // Create calls for poisoning before initializers run and unpoisoning after. @@ -2537,7 +2541,6 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, createInitializerPoisonCalls(M, ModuleName); LLVM_DEBUG(dbgs() << M); - return true; } uint64_t @@ -2601,10 +2604,10 @@ bool ModuleAddressSanitizer::instrumentModule(Module &M) { assert(AsanCtorFunction || ConstructorKind == AsanCtorKind::None); if (AsanCtorFunction) { IRBuilder<> IRB(AsanCtorFunction->getEntryBlock().getTerminator()); - InstrumentGlobals(IRB, M, &CtorComdat); + instrumentGlobals(IRB, M, &CtorComdat); } else { IRBuilder<> IRB(*C); - InstrumentGlobals(IRB, M, &CtorComdat); + instrumentGlobals(IRB, M, &CtorComdat); } } diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 09e5bd0806a8..7f43e4566eeb 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" +#define LLVM_REVISION "llvmorg-17.0.3-0-g888437e1b600" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" +#define CLANG_REVISION "llvmorg-17.0.3-0-g888437e1b600" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" +#define LLDB_REVISION "llvmorg-17.0.3-0-g888437e1b600" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 750d9ecbc020..c364a69c7209 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,8 +1,8 @@ -#define CLANG_VERSION 17.0.2 -#define CLANG_VERSION_STRING "17.0.2" +#define CLANG_VERSION 17.0.3 +#define CLANG_VERSION_STRING "17.0.3" #define CLANG_VERSION_MAJOR 17 #define CLANG_VERSION_MAJOR_STRING "17" #define CLANG_VERSION_MINOR 0 -#define CLANG_VERSION_PATCHLEVEL 2 +#define CLANG_VERSION_PATCHLEVEL 3 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index 722673ac78da..b650ccd7fc2b 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "17.0.2 (FreeBSD llvmorg-17.0.2-0-gb2417f51dbbd-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "17.0.3 (FreeBSD llvmorg-17.0.3-0-g888437e1b600-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index b87053e1884d..e9dbb0ca765e 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 17.0.2 -#define LLDB_VERSION_STRING "17.0.2" +#define LLDB_VERSION 17.0.3 +#define LLDB_VERSION_STRING "17.0.3" #define LLDB_VERSION_MAJOR 17 #define LLDB_VERSION_MINOR 0 -#define LLDB_VERSION_PATCH 2 +#define LLDB_VERSION_PATCH 3 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 56b377d33f9b..652cc426aa3c 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -344,10 +344,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 17.0.2" +#define PACKAGE_STRING "LLVM 17.0.3" /* Define to the version of this package. */ -#define PACKAGE_VERSION "17.0.2" +#define PACKAGE_VERSION "17.0.3" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 36bf884d2fdb..6d3ed70bb0fd 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -73,10 +73,10 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 2 +#define LLVM_VERSION_PATCH 3 /* LLVM version string */ -#define LLVM_VERSION_STRING "17.0.2" +#define LLVM_VERSION_STRING "17.0.3" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 846d3cb3e014..bca8b103a7ba 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" +#define LLVM_REVISION "llvmorg-17.0.3-0-g888437e1b600" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Sun Jan 7 17:50:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqT6HRKz55XNW; Sun, 7 Jan 2024 17:50: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 4T7PqT3QsTz4MSF; Sun, 7 Jan 2024 17:50:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZBXErooumIJiHFokt06miuAGGKUECrkj4E3GVdXoXoE=; b=J7VP9uOa4MTTN0+T/A16Fqri3xYRN8kCecQSZHW6IMJlPaKSI4q1PAnVS0ZWczX1TTg4Ux mV3IDgVuSSzv0jz4J+myA6AgFv3Qxa8m3PPmIxLkE/7gi5mP0W1cYBS2QOys28k6KLBlIl f3szoLWQvVr9VkAr1pFJxeRrF7b/WndnRz027BIM9E37LJ8LqH7KPqrU8PSWaSRmCcHWKN YYONG0ZYAf6BQhtRYEFmDEhZG9Z/3OcxtV6B297Up+U0Xz6QNGC0Dt0e7HjGYlBBipK/v1 Yd4wA4ioNuUXj/urCBGlKS+otWB9I0ZjKPipJwJRZij82k63outPgVzfwKVTQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZBXErooumIJiHFokt06miuAGGKUECrkj4E3GVdXoXoE=; b=N8pL5Gyts1oNgXM1o/Tx/kBzg7gPeJAPyYP1CuGz1D/LCQaE5TdJF5OX9tWChti/1NGz5M w/r9NVfHEp0UrVYOD8e6Plbub3A9iqG6cLK/hiCkH/H/fJvfAPiI+CeN06WEyTOrSkyyAU fHUzqrbVTQdVOrJOYIR99T/YaTbtl+osg4GyaclI3Z9vhfqmthe9y7k1c14JPuN2a9a+oC 8Npy+YfMTm1KVXNrg5RxkcKehpk3McCcD27tnuT0QTLKT2SRETjNEQlSJGTakbXbUXvY9h 28acJMWG8ZAbHVwe5cFKlz09IPH4rXtF7uhZWWI/uRAJyTpmjXC19ryF9kcxXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649829; a=rsa-sha256; cv=none; b=n9/SxeAW1MmFpjWyV+NrloJfhKJgJx5hS52wAq2w0uYZgK4V1ZH032AcnM0LBqZLfT4tG1 gOklPjtGwYbBxyoFOqYcwYXTjktotY7LnBQzxYu2WeQD0YVhW3E0y/vXOG73ElMbTSj7hP azFqhNxFikuI1e1XmFk/sdqeS+yq+mcNrP6hkyCGjAoxQdvqsI3+keTTlyAQdoIjZStfdF NIYgrFn64HpSJlMIiYMIIHl97v17PDD8uvQnGEFG8+oRiiJ3S2FqWtWsInguiKGZibibOF VoRuW3TOrT78j5X5VoAYEJDO7XrzW3bD3/bG4QKeDSZR3IK3bXixDoFGABf45A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqT2DwpzZSB; Sun, 7 Jan 2024 17:50: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 407HoTlA022054; Sun, 7 Jan 2024 17:50:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoSIV022047; Sun, 7 Jan 2024 17:50:28 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:28 GMT Message-Id: <202401071750.407HoSIV022047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: be6857fe7489 - stable/14 - Merge llvm-project release/17.x llvmorg-17.0.5-0-g98bfdac5ce82 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: be6857fe74898c5efa364c91b5a09ae92a15afa3 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=be6857fe74898c5efa364c91b5a09ae92a15afa3 commit be6857fe74898c5efa364c91b5a09ae92a15afa3 Author: Dimitry Andric AuthorDate: 2023-11-16 21:58:12 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:18 +0000 Merge llvm-project release/17.x llvmorg-17.0.5-0-g98bfdac5ce82 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.5-0-g98bfdac5ce82. PR: 273753 MFC after: 1 month (cherry picked from commit b121cb0095c8c1a060f66a8c4b118a54ebaa2551) --- .../include/clang/Basic/DiagnosticASTKinds.td | 2 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 7 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 13 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 3 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 7 +- .../clang/lib/Driver/ToolChains/Solaris.cpp | 9 +- .../clang/lib/Format/TokenAnnotator.cpp | 6 + .../clang/lib/Format/WhitespaceManager.cpp | 2 +- contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 11 +- contrib/llvm-project/libcxx/include/__config | 60 +++++-- .../libcxx/include/__expected/expected.h | 182 ++++++++++----------- .../llvm/lib/CodeGen/BranchFolding.cpp | 6 - .../llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h | 1 + .../CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 10 ++ .../llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 2 +- .../Target/AArch64/AArch64TargetTransformInfo.cpp | 24 +++ .../Target/AArch64/AArch64TargetTransformInfo.h | 3 + .../Target/AArch64/GISel/AArch64CallLowering.cpp | 7 +- .../llvm/lib/Target/LoongArch/LoongArch.h | 2 + .../LoongArch/LoongArchExpandPseudoInsts.cpp | 121 ++++++++++++++ .../Target/LoongArch/LoongArchFloat32InstrInfo.td | 17 ++ .../Target/LoongArch/LoongArchFloatInstrFormats.td | 12 ++ .../lib/Target/LoongArch/LoongArchInstrInfo.cpp | 6 + .../lib/Target/LoongArch/LoongArchRegisterInfo.cpp | 7 - .../Target/LoongArch/LoongArchTargetMachine.cpp | 1 + .../llvm/lib/Target/Mips/MipsISelLowering.cpp | 14 +- .../llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 19 ++- .../llvm/lib/Transforms/IPO/GlobalOpt.cpp | 30 +++- .../Transforms/Scalar/ConstraintElimination.cpp | 16 +- .../Scalar/CorrelatedValuePropagation.cpp | 68 ++++---- .../llvm/lib/Transforms/Scalar/GVN.cpp | 11 +- .../llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp | 1 + .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 3 +- .../openmp/runtime/src/kmp_runtime.cpp | 3 +- .../openmp/runtime/src/kmp_wrapper_getpid.h | 2 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 42 files changed, 490 insertions(+), 228 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td index 0794ed7ba683..694e6a5840bc 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -69,7 +69,7 @@ def note_consteval_address_accessible : Note< "%select{pointer|reference}0 to a consteval declaration " "is not a constant expression">; def note_constexpr_uninitialized : Note< - "subobject %0 is not initialized">; + "subobject %select{of type |}0%1 is not initialized">; def note_constexpr_uninitialized_base : Note< "constructor of base class %0 is not called">; def note_constexpr_static_local : Note< diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index cfd1c0f977c0..3752a23faa85 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -710,9 +710,13 @@ public: return result; } + // Saves the current floating-point pragma stack and clear it in this Sema. class FpPragmaStackSaveRAII { public: - FpPragmaStackSaveRAII(Sema &S) : S(S), SavedStack(S.FpPragmaStack) {} + FpPragmaStackSaveRAII(Sema &S) + : S(S), SavedStack(std::move(S.FpPragmaStack)) { + S.FpPragmaStack.Stack.clear(); + } ~FpPragmaStackSaveRAII() { S.FpPragmaStack = std::move(SavedStack); } private: @@ -722,7 +726,6 @@ public: void resetFPOptions(FPOptions FPO) { CurFPFeatures = FPO; - FpPragmaStack.Stack.clear(); FpPragmaStack.CurrentValue = FPO.getChangesFrom(FPOptions(LangOpts)); } diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index c62044f36194..99ae88a6cd69 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -2379,10 +2379,15 @@ static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) { if (!Value.hasValue()) { - assert(SubobjectDecl && "SubobjectDecl shall be non-null"); - Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; - Info.Note(SubobjectDecl->getLocation(), - diag::note_constexpr_subobject_declared_here); + if (SubobjectDecl) { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) + << /*(name)*/ 1 << SubobjectDecl; + Info.Note(SubobjectDecl->getLocation(), + diag::note_constexpr_subobject_declared_here); + } else { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) + << /*of type*/ 0 << Type; + } return false; } diff --git a/contrib/llvm-project/clang/lib/AST/Interp/Interp.cpp b/contrib/llvm-project/clang/lib/AST/Interp/Interp.cpp index 4917f43f9512..59108b857577 100644 --- a/contrib/llvm-project/clang/lib/AST/Interp/Interp.cpp +++ b/contrib/llvm-project/clang/lib/AST/Interp/Interp.cpp @@ -382,7 +382,8 @@ bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) { static void DiagnoseUninitializedSubobject(InterpState &S, const SourceInfo &SI, const FieldDecl *SubObjDecl) { assert(SubObjDecl && "Subobject declaration does not exist"); - S.FFDiag(SI, diag::note_constexpr_uninitialized) << SubObjDecl; + S.FFDiag(SI, diag::note_constexpr_uninitialized) + << /*(name)*/ 1 << SubObjDecl; S.Note(SubObjDecl->getLocation(), diag::note_constexpr_subobject_declared_here); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp index 942daa4aa577..91369b7d8804 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp @@ -1736,9 +1736,10 @@ llvm::Constant *ConstantEmitter::tryEmitPrivate(const Expr *E, QualType destType) { assert(!destType->isVoidType() && "can't emit a void constant"); - if (llvm::Constant *C = - ConstExprEmitter(*this).Visit(const_cast(E), destType)) - return C; + if (!destType->isReferenceType()) + if (llvm::Constant *C = + ConstExprEmitter(*this).Visit(const_cast(E), destType)) + return C; Expr::EvalResult Result; diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Solaris.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Solaris.cpp index de5a69e4ca3f..85619a91554e 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Solaris.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Solaris.cpp @@ -64,6 +64,7 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const { + const Driver &D = getToolChain().getDriver(); const bool IsPIE = getPIE(Args, getToolChain()); ArgStringList CmdArgs; @@ -152,8 +153,11 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs, options::OPT_r)) { - if (getToolChain().ShouldLinkCXXStdlib(Args)) - getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); + if (D.CCCIsCXX()) { + if (getToolChain().ShouldLinkCXXStdlib(Args)) + getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); + CmdArgs.push_back("-lm"); + } if (Args.hasArg(options::OPT_fstack_protector) || Args.hasArg(options::OPT_fstack_protector_strong) || Args.hasArg(options::OPT_fstack_protector_all)) { @@ -172,7 +176,6 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-lc"); if (!Args.hasArg(options::OPT_shared)) { CmdArgs.push_back("-lgcc"); - CmdArgs.push_back("-lm"); } const SanitizerArgs &SA = getToolChain().getSanitizerArgs(Args); if (NeedsSanitizerDeps) { diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 73840332e22c..4a1fc08455e5 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -3178,6 +3178,12 @@ static bool isFunctionDeclarationName(bool IsCpp, const FormatToken &Current, !Previous->isOneOf(tok::kw_return, tok::kw_co_return)) { return true; } + if (Previous->is(tok::r_paren) && Previous->is(TT_TypeDeclarationParen)) { + assert(Previous->MatchingParen); + assert(Previous->MatchingParen->is(tok::l_paren)); + assert(Previous->MatchingParen->is(TT_TypeDeclarationParen)); + return true; + } if (!Previous->isOneOf(tok::star, tok::amp, tok::ampamp, TT_TemplateCloser)) return false; Next = skipOperatorName(Next); diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp index 668ca38ad683..c1016c44a74a 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp @@ -965,7 +965,7 @@ void WhitespaceManager::alignConsecutiveDeclarations() { AlignTokens( Style, [](Change const &C) { - if (C.Tok->isOneOf(TT_FunctionDeclarationName, TT_FunctionTypeLParen)) + if (C.Tok->is(TT_FunctionDeclarationName)) return true; if (C.Tok->isNot(TT_StartOfName)) return false; diff --git a/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp b/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp index 43b2a32cce71..cf1e3a94de7f 100644 --- a/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp +++ b/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp @@ -3998,8 +3998,15 @@ void Parser::ParseDeclarationSpecifiers( case tok::kw_thread_local: if (getLangOpts().C2x) Diag(Tok, diag::warn_c2x_compat_keyword) << Tok.getName(); - isInvalid = DS.SetStorageClassSpecThread(DeclSpec::TSCS_thread_local, Loc, - PrevSpec, DiagID); + // We map thread_local to _Thread_local in C23 mode so it retains the C + // semantics rather than getting the C++ semantics. + // FIXME: diagnostics will show _Thread_local when the user wrote + // thread_local in source in C23 mode; we need some general way to + // identify which way the user spelled the keyword in source. + isInvalid = DS.SetStorageClassSpecThread( + getLangOpts().C2x ? DeclSpec::TSCS__Thread_local + : DeclSpec::TSCS_thread_local, + Loc, PrevSpec, DiagID); isStorageClass = true; break; case tok::kw__Thread_local: diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 3859c027cd29..10c056f313ff 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -40,15 +40,11 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 170003 +# define _LIBCPP_VERSION 170005 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) -// Valid C++ identifier that revs with every libc++ version. This can be used to -// generate identifiers that must be unique for every released libc++ version. -# define _LIBCPP_VERSIONED_IDENTIFIER _LIBCPP_CONCAT(v, _LIBCPP_VERSION) - # if __STDC_HOSTED__ == 0 # define _LIBCPP_FREESTANDING # endif @@ -754,22 +750,54 @@ typedef __char32_t char32_t; # define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE # endif +# if _LIBCPP_ENABLE_HARDENED_MODE +# define _LIBCPP_HARDENING_SIG h +# elif _LIBCPP_ENABLE_ASSERTIONS +# define _LIBCPP_HARDENING_SIG s +# elif _LIBCPP_ENABLE_DEBUG_MODE +# define _LIBCPP_HARDENING_SIG d +# else +# define _LIBCPP_HARDENING_SIG u // for unchecked +# endif + +# ifdef _LIBCPP_HAS_NO_EXCEPTIONS +# define _LIBCPP_EXCEPTIONS_SIG n +# else +# define _LIBCPP_EXCEPTIONS_SIG e +# endif + +# define _LIBCPP_ODR_SIGNATURE \ + _LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_HARDENING_SIG, _LIBCPP_EXCEPTIONS_SIG), _LIBCPP_VERSION) + // This macro marks a symbol as being hidden from libc++'s ABI. This is achieved // on two levels: // 1. The symbol is given hidden visibility, which ensures that users won't start exporting // symbols from their dynamic library by means of using the libc++ headers. This ensures // that those symbols stay private to the dynamic library in which it is defined. // -// 2. The symbol is given an ABI tag that changes with each version of libc++. This ensures -// that no ODR violation can arise from mixing two TUs compiled with different versions -// of libc++ where we would have changed the definition of a symbol. If the symbols shared -// the same name, the ODR would require that their definitions be token-by-token equivalent, -// which basically prevents us from being able to make any change to any function in our -// headers. Using this ABI tag ensures that the symbol name is "bumped" artificially at -// each release, which lets us change the definition of these symbols at our leisure. -// Note that historically, this has been achieved in various ways, including force-inlining -// all functions or giving internal linkage to all functions. Both these (previous) solutions -// suffer from drawbacks that lead notably to code bloat. +// 2. The symbol is given an ABI tag that encodes the ODR-relevant properties of the library. +// This ensures that no ODR violation can arise from mixing two TUs compiled with different +// versions or configurations of libc++ (such as exceptions vs no-exceptions). Indeed, if the +// program contains two definitions of a function, the ODR requires them to be token-by-token +// equivalent, and the linker is allowed to pick either definition and discard the other one. +// +// For example, if a program contains a copy of `vector::at()` compiled with exceptions enabled +// *and* a copy of `vector::at()` compiled with exceptions disabled (by means of having two TUs +// compiled with different settings), the two definitions are both visible by the linker and they +// have the same name, but they have a meaningfully different implementation (one throws an exception +// and the other aborts the program). This violates the ODR and makes the program ill-formed, and in +// practice what will happen is that the linker will pick one of the definitions at random and will +// discard the other one. This can quite clearly lead to incorrect program behavior. +// +// A similar reasoning holds for many other properties that are ODR-affecting. Essentially any +// property that causes the code of a function to differ from the code in another configuration +// can be considered ODR-affecting. In practice, we don't encode all such properties in the ABI +// tag, but we encode the ones that we think are most important: library version, exceptions, and +// hardening mode. +// +// Note that historically, solving this problem has been achieved in various ways, including +// force-inlining all functions or giving internal linkage to all functions. Both these previous +// solutions suffer from drawbacks that lead notably to code bloat. // // Note that we use _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION to ensure that we don't depend // on _LIBCPP_HIDE_FROM_ABI methods of classes explicitly instantiated in the dynamic library. @@ -789,7 +817,7 @@ typedef __char32_t char32_t; # ifndef _LIBCPP_NO_ABI_TAG # define _LIBCPP_HIDE_FROM_ABI \ _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION \ - __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER)))) + __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE)))) # else # define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION # endif diff --git a/contrib/llvm-project/libcxx/include/__expected/expected.h b/contrib/llvm-project/libcxx/include/__expected/expected.h index 7d57aa4db5f9..5836600312de 100644 --- a/contrib/llvm-project/libcxx/include/__expected/expected.h +++ b/contrib/llvm-project/libcxx/include/__expected/expected.h @@ -119,9 +119,7 @@ public: _LIBCPP_HIDE_FROM_ABI constexpr expected() noexcept(is_nothrow_default_constructible_v<_Tp>) // strengthened requires is_default_constructible_v<_Tp> - : __has_val_(true) { - std::construct_at(std::addressof(__union_.__val_)); - } + : __union_(std::in_place), __has_val_(true) {} _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected&) = delete; @@ -136,14 +134,7 @@ public: noexcept(is_nothrow_copy_constructible_v<_Tp> && is_nothrow_copy_constructible_v<_Err>) // strengthened requires(is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err> && !(is_trivially_copy_constructible_v<_Tp> && is_trivially_copy_constructible_v<_Err>)) - : __has_val_(__other.__has_val_) { - if (__has_val_) { - std::construct_at(std::addressof(__union_.__val_), __other.__union_.__val_); - } else { - std::construct_at(std::addressof(__union_.__unex_), __other.__union_.__unex_); - } - } - + : __union_(__other.__has_val_, __other.__union_), __has_val_(__other.__has_val_) { } _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&&) requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> @@ -154,13 +145,7 @@ public: noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_move_constructible_v<_Err>) requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> && !(is_trivially_move_constructible_v<_Tp> && is_trivially_move_constructible_v<_Err>)) - : __has_val_(__other.__has_val_) { - if (__has_val_) { - std::construct_at(std::addressof(__union_.__val_), std::move(__other.__union_.__val_)); - } else { - std::construct_at(std::addressof(__union_.__unex_), std::move(__other.__union_.__unex_)); - } - } + : __union_(__other.__has_val_, std::move(__other.__union_)), __has_val_(__other.__has_val_) { } private: template @@ -198,36 +183,21 @@ public: expected(const expected<_Up, _OtherErr>& __other) noexcept(is_nothrow_constructible_v<_Tp, const _Up&> && is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened - : __has_val_(__other.__has_val_) { - if (__has_val_) { - std::construct_at(std::addressof(__union_.__val_), __other.__union_.__val_); - } else { - std::construct_at(std::addressof(__union_.__unex_), __other.__union_.__unex_); - } - } + : __union_(__other.__has_val_, __other.__union_), __has_val_(__other.__has_val_) {} template requires __can_convert<_Up, _OtherErr, _Up, _OtherErr>::value _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp> || !is_convertible_v<_OtherErr, _Err>) expected(expected<_Up, _OtherErr>&& __other) noexcept(is_nothrow_constructible_v<_Tp, _Up> && is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened - : __has_val_(__other.__has_val_) { - if (__has_val_) { - std::construct_at(std::addressof(__union_.__val_), std::move(__other.__union_.__val_)); - } else { - std::construct_at(std::addressof(__union_.__unex_), std::move(__other.__union_.__unex_)); - } - } + : __union_(__other.__has_val_, std::move(__other.__union_)), __has_val_(__other.__has_val_) {} template requires(!is_same_v, in_place_t> && !is_same_v> && !__is_std_unexpected>::value && is_constructible_v<_Tp, _Up>) _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp>) - expected(_Up&& __u) - noexcept(is_nothrow_constructible_v<_Tp, _Up>) // strengthened - : __has_val_(true) { - std::construct_at(std::addressof(__union_.__val_), std::forward<_Up>(__u)); - } + expected(_Up&& __u) noexcept(is_nothrow_constructible_v<_Tp, _Up>) // strengthened + : __union_(std::in_place, std::forward<_Up>(__u)), __has_val_(true) {} template @@ -235,52 +205,40 @@ public: _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v) expected(const unexpected<_OtherErr>& __unex) noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), __unex.error()); - } + : __union_(std::unexpect, __unex.error()), __has_val_(false) {} template requires is_constructible_v<_Err, _OtherErr> _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>) expected(unexpected<_OtherErr>&& __unex) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), std::move(__unex.error())); - } + : __union_(std::unexpect, std::move(__unex.error())), __has_val_(false) {} template requires is_constructible_v<_Tp, _Args...> _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) // strengthened - : __has_val_(true) { - std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...); - } + : __union_(std::in_place, std::forward<_Args>(__args)...), __has_val_(true) {} template requires is_constructible_v< _Tp, initializer_list<_Up>&, _Args... > _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>) // strengthened - : __has_val_(true) { - std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...); - } + : __union_(std::in_place, __il, std::forward<_Args>(__args)...), __has_val_(true) {} template requires is_constructible_v<_Err, _Args...> _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, _Args&&... __args) - noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), std::forward<_Args>(__args)...); - } + noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened + : __union_(std::unexpect, std::forward<_Args>(__args)...), __has_val_(false) {} template requires is_constructible_v< _Err, initializer_list<_Up>&, _Args... > _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), __il, std::forward<_Args>(__args)...); - } + : __union_(std::unexpect, __il, std::forward<_Args>(__args)...), __has_val_(false) {} // [expected.object.dtor], destructor @@ -439,9 +397,10 @@ public: std::destroy_at(std::addressof(__union_.__val_)); } else { std::destroy_at(std::addressof(__union_.__unex_)); - __has_val_ = true; } - return *std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...); + std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...); + __has_val_ = true; + return __union_.__val_; } template @@ -451,9 +410,10 @@ public: std::destroy_at(std::addressof(__union_.__val_)); } else { std::destroy_at(std::addressof(__union_.__unex_)); - __has_val_ = true; } - return *std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...); + std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...); + __has_val_ = true; + return __union_.__val_; } @@ -892,11 +852,15 @@ public: } private: - struct __empty_t {}; - template union __union_t { - _LIBCPP_HIDE_FROM_ABI constexpr __union_t() {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::in_place_t, _Args&&... __args) + : __val_(std::forward<_Args>(__args)...) {} + + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args) + : __unex_(std::forward<_Args>(__args)...) {} template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( @@ -908,6 +872,14 @@ private: std::__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args) : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) { + if (__has_val) + std::construct_at(std::addressof(__val_), std::forward<_Union>(__other).__val_); + else + std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_); + } + _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() requires(is_trivially_destructible_v<_ValueType> && is_trivially_destructible_v<_ErrorType>) = default; @@ -926,7 +898,16 @@ private: template requires(is_trivially_move_constructible_v<_ValueType> && is_trivially_move_constructible_v<_ErrorType>) union __union_t<_ValueType, _ErrorType> { - _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {} + _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = default; + _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = default; + + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::in_place_t, _Args&&... __args) + : __val_(std::forward<_Args>(__args)...) {} + + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args) + : __unex_(std::forward<_Args>(__args)...) {} template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( @@ -938,6 +919,14 @@ private: std::__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args) : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) { + if (__has_val) + std::construct_at(std::addressof(__val_), std::forward<_Union>(__other).__val_); + else + std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_); + } + _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() requires(is_trivially_destructible_v<_ValueType> && is_trivially_destructible_v<_ErrorType>) = default; @@ -947,7 +936,6 @@ private: requires(!is_trivially_destructible_v<_ValueType> || !is_trivially_destructible_v<_ErrorType>) {} - _LIBCPP_NO_UNIQUE_ADDRESS __empty_t __empty_; _LIBCPP_NO_UNIQUE_ADDRESS _ValueType __val_; _LIBCPP_NO_UNIQUE_ADDRESS _ErrorType __unex_; }; @@ -995,11 +983,7 @@ public: _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected& __rhs) noexcept(is_nothrow_copy_constructible_v<_Err>) // strengthened requires(is_copy_constructible_v<_Err> && !is_trivially_copy_constructible_v<_Err>) - : __has_val_(__rhs.__has_val_) { - if (!__rhs.__has_val_) { - std::construct_at(std::addressof(__union_.__unex_), __rhs.__union_.__unex_); - } - } + : __union_(__rhs.__has_val_, __rhs.__union_), __has_val_(__rhs.__has_val_) {} _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&&) requires(is_move_constructible_v<_Err> && is_trivially_move_constructible_v<_Err>) @@ -1008,51 +992,35 @@ public: _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&& __rhs) noexcept(is_nothrow_move_constructible_v<_Err>) requires(is_move_constructible_v<_Err> && !is_trivially_move_constructible_v<_Err>) - : __has_val_(__rhs.__has_val_) { - if (!__rhs.__has_val_) { - std::construct_at(std::addressof(__union_.__unex_), std::move(__rhs.__union_.__unex_)); - } - } + : __union_(__rhs.__has_val_, std::move(__rhs.__union_)), __has_val_(__rhs.__has_val_) {} template requires __can_convert<_Up, _OtherErr, const _OtherErr&>::value _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v) expected(const expected<_Up, _OtherErr>& __rhs) noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened - : __has_val_(__rhs.__has_val_) { - if (!__rhs.__has_val_) { - std::construct_at(std::addressof(__union_.__unex_), __rhs.__union_.__unex_); - } - } + : __union_(__rhs.__has_val_, __rhs.__union_), __has_val_(__rhs.__has_val_) {} template requires __can_convert<_Up, _OtherErr, _OtherErr>::value _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>) expected(expected<_Up, _OtherErr>&& __rhs) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened - : __has_val_(__rhs.__has_val_) { - if (!__rhs.__has_val_) { - std::construct_at(std::addressof(__union_.__unex_), std::move(__rhs.__union_.__unex_)); - } - } + : __union_(__rhs.__has_val_, std::move(__rhs.__union_)), __has_val_(__rhs.__has_val_) {} template requires is_constructible_v<_Err, const _OtherErr&> _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v) expected(const unexpected<_OtherErr>& __unex) noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), __unex.error()); - } + : __union_(std::unexpect, __unex.error()), __has_val_(false) {} template requires is_constructible_v<_Err, _OtherErr> _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>) expected(unexpected<_OtherErr>&& __unex) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), std::move(__unex.error())); - } + : __union_(std::unexpect, std::move(__unex.error())), __has_val_(false) {} _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t) noexcept : __has_val_(true) {} @@ -1060,17 +1028,13 @@ public: requires is_constructible_v<_Err, _Args...> _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), std::forward<_Args>(__args)...); - } + : __union_(std::unexpect, std::forward<_Args>(__args)...), __has_val_(false) {} template requires is_constructible_v< _Err, initializer_list<_Up>&, _Args... > _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), __il, std::forward<_Args>(__args)...); - } + : __union_(std::unexpect, __il, std::forward<_Args>(__args)...), __has_val_(false) {} private: template @@ -1504,11 +1468,23 @@ private: union __union_t { _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args) + : __unex_(std::forward<_Args>(__args)...) {} + template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( __expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args) : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) { + if (__has_val) + std::construct_at(std::addressof(__empty_)); + else + std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_); + } + _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() requires(is_trivially_destructible_v<_ErrorType>) = default; @@ -1529,11 +1505,23 @@ private: union __union_t<_ErrorType> { _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args) + : __unex_(std::forward<_Args>(__args)...) {} + template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( __expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args) : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) { + if (__has_val) + std::construct_at(std::addressof(__empty_)); + else + std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_); + } + _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() requires(is_trivially_destructible_v<_ErrorType>) = default; diff --git a/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp b/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp index 3830f25debaf..0801296cab49 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp @@ -485,13 +485,7 @@ BranchFolder::MergePotentialsElt::operator<(const MergePotentialsElt &o) const { return true; if (getBlock()->getNumber() > o.getBlock()->getNumber()) return false; - // _GLIBCXX_DEBUG checks strict weak ordering, which involves comparing - // an object with itself. -#ifndef _GLIBCXX_DEBUG - llvm_unreachable("Predecessor appears twice"); -#else return false; -#endif } /// CountTerminators - Count the number of terminators in the given diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h index db8f61eee606..ad70655de349 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h @@ -1000,6 +1000,7 @@ private: SDValue WidenVecOp_EXTRACT_VECTOR_ELT(SDNode *N); SDValue WidenVecOp_INSERT_SUBVECTOR(SDNode *N); SDValue WidenVecOp_EXTRACT_SUBVECTOR(SDNode *N); + SDValue WidenVecOp_EXTEND_VECTOR_INREG(SDNode *N); SDValue WidenVecOp_STORE(SDNode* N); SDValue WidenVecOp_VP_STORE(SDNode *N, unsigned OpNo); SDValue WidenVecOp_VP_STRIDED_STORE(SDNode *N, unsigned OpNo); diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index 8c117c1c74dc..9c1839f2576e 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -5946,6 +5946,11 @@ bool DAGTypeLegalizer::WidenVectorOperand(SDNode *N, unsigned OpNo) { case ISD::EXPERIMENTAL_VP_STRIDED_STORE: Res = WidenVecOp_VP_STRIDED_STORE(N, OpNo); break; + case ISD::ANY_EXTEND_VECTOR_INREG: + case ISD::SIGN_EXTEND_VECTOR_INREG: + case ISD::ZERO_EXTEND_VECTOR_INREG: + Res = WidenVecOp_EXTEND_VECTOR_INREG(N); + break; case ISD::MSTORE: Res = WidenVecOp_MSTORE(N, OpNo); break; case ISD::MGATHER: Res = WidenVecOp_MGATHER(N, OpNo); break; case ISD::MSCATTER: Res = WidenVecOp_MSCATTER(N, OpNo); break; @@ -6338,6 +6343,11 @@ SDValue DAGTypeLegalizer::WidenVecOp_EXTRACT_VECTOR_ELT(SDNode *N) { N->getValueType(0), InOp, N->getOperand(1)); } +SDValue DAGTypeLegalizer::WidenVecOp_EXTEND_VECTOR_INREG(SDNode *N) { + SDValue InOp = GetWidenedVector(N->getOperand(0)); + return DAG.getNode(N->getOpcode(), SDLoc(N), N->getValueType(0), InOp); +} + SDValue DAGTypeLegalizer::WidenVecOp_STORE(SDNode *N) { // We have to widen the value, but we want only to store the original // vector type. diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index 30bd580ad86a..0691e07a639b 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -4764,7 +4764,7 @@ int llvm::isAArch64FrameOffsetLegal(const MachineInstr &MI, Offset = Remainder; else { NewOffset = NewOffset < 0 ? MinOff : MaxOff; - Offset = Offset - NewOffset * Scale + Remainder; + Offset = Offset - NewOffset * Scale; } if (EmittableOffset) diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp index 353e96856b8f..bee9ec4c7132 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp @@ -212,6 +212,30 @@ bool AArch64TTIImpl::areInlineCompatible(const Function *Caller, return (CallerBits & CalleeBits) == CalleeBits; } +bool AArch64TTIImpl::areTypesABICompatible( + const Function *Caller, const Function *Callee, + const ArrayRef &Types) const { + if (!BaseT::areTypesABICompatible(Caller, Callee, Types)) + return false; + + // We need to ensure that argument promotion does not attempt to promote + // pointers to fixed-length vector types larger than 128 bits like + // <8 x float> (and pointers to aggregate types which have such fixed-length + // vector type members) into the values of the pointees. Such vector types + // are used for SVE VLS but there is no ABI for SVE VLS arguments and the + // backend cannot lower such value arguments. The 128-bit fixed-length SVE + // types can be safely treated as 128-bit NEON types and they cannot be + // distinguished in IR. + if (ST->useSVEForFixedLengthVectors() && llvm::any_of(Types, [](Type *Ty) { + auto FVTy = dyn_cast(Ty); + return FVTy && + FVTy->getScalarSizeInBits() * FVTy->getNumElements() > 128; + })) + return false; + + return true; +} + bool AArch64TTIImpl::shouldMaximizeVectorBandwidth( TargetTransformInfo::RegisterKind K) const { assert(K != TargetTransformInfo::RGK_Scalar); diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h index 787cb3c5d34b..d1977a62a76d 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h @@ -77,6 +77,9 @@ public: bool areInlineCompatible(const Function *Caller, const Function *Callee) const; + bool areTypesABICompatible(const Function *Caller, const Function *Callee, + const ArrayRef &Types) const; + /// \name Scalar TTI Implementations /// @{ diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp index e78d8bb487a9..c56e3373d3a7 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp @@ -829,9 +829,9 @@ bool AArch64CallLowering::doCallerAndCalleePassArgsTheSameWay( bool AArch64CallLowering::areCalleeOutgoingArgsTailCallable( CallLoweringInfo &Info, MachineFunction &MF, - SmallVectorImpl &OutArgs) const { + SmallVectorImpl &OrigOutArgs) const { // If there are no outgoing arguments, then we are done. - if (OutArgs.empty()) + if (OrigOutArgs.empty()) return true; const Function &CallerF = MF.getFunction(); @@ -851,6 +851,9 @@ bool AArch64CallLowering::areCalleeOutgoingArgsTailCallable( AArch64OutgoingValueAssigner CalleeAssigner(AssignFnFixed, AssignFnVarArg, Subtarget, /*IsReturn*/ false); + // determineAssignments() may modify argument flags, so make a copy. + SmallVector OutArgs; + append_range(OutArgs, OrigOutArgs); if (!determineAssignments(CalleeAssigner, OutArgs, OutInfo)) { LLVM_DEBUG(dbgs() << "... Could not analyze call operands.\n"); return false; diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArch.h b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArch.h index 05f4ac8c9255..09ca089c9115 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArch.h +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArch.h @@ -36,9 +36,11 @@ bool lowerLoongArchMachineOperandToMCOperand(const MachineOperand &MO, FunctionPass *createLoongArchExpandAtomicPseudoPass(); FunctionPass *createLoongArchISelDag(LoongArchTargetMachine &TM); FunctionPass *createLoongArchPreRAExpandPseudoPass(); +FunctionPass *createLoongArchExpandPseudoPass(); void initializeLoongArchDAGToDAGISelPass(PassRegistry &); void initializeLoongArchExpandAtomicPseudoPass(PassRegistry &); void initializeLoongArchPreRAExpandPseudoPass(PassRegistry &); +void initializeLoongArchExpandPseudoPass(PassRegistry &); } // end namespace llvm #endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp index dd0b2cfde544..72c1f1cec198 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp @@ -29,6 +29,8 @@ using namespace llvm; #define LOONGARCH_PRERA_EXPAND_PSEUDO_NAME \ "LoongArch Pre-RA pseudo instruction expansion pass" +#define LOONGARCH_EXPAND_PSEUDO_NAME \ + "LoongArch pseudo instruction expansion pass" namespace { @@ -513,15 +515,134 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +class LoongArchExpandPseudo : public MachineFunctionPass { +public: + const LoongArchInstrInfo *TII; + static char ID; + + LoongArchExpandPseudo() : MachineFunctionPass(ID) { + initializeLoongArchExpandPseudoPass(*PassRegistry::getPassRegistry()); + } + + bool runOnMachineFunction(MachineFunction &MF) override; + + StringRef getPassName() const override { + return LOONGARCH_EXPAND_PSEUDO_NAME; + } + +private: + bool expandMBB(MachineBasicBlock &MBB); + bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, + MachineBasicBlock::iterator &NextMBBI); + bool expandCopyCFR(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, + MachineBasicBlock::iterator &NextMBBI); +}; + +char LoongArchExpandPseudo::ID = 0; + +bool LoongArchExpandPseudo::runOnMachineFunction(MachineFunction &MF) { + TII = + static_cast(MF.getSubtarget().getInstrInfo()); + + bool Modified = false; + for (auto &MBB : MF) + Modified |= expandMBB(MBB); + + return Modified; +} + +bool LoongArchExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + + return Modified; +} + +bool LoongArchExpandPseudo::expandMI(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MBBI, + MachineBasicBlock::iterator &NextMBBI) { + switch (MBBI->getOpcode()) { + case LoongArch::PseudoCopyCFR: + return expandCopyCFR(MBB, MBBI, NextMBBI); + } + + return false; +} + +bool LoongArchExpandPseudo::expandCopyCFR( + MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, + MachineBasicBlock::iterator &NextMBBI) { + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + + // Expand: + // MBB: + // fcmp.caf.s $dst, $fa0, $fa0 # set $dst 0(false) + // bceqz $src, SinkBB + // FalseBB: + // fcmp.cueq.s $dst, $fa0, $fa0 # set $dst 1(true) + // SinkBB: + // fallthrough + + const BasicBlock *LLVM_BB = MBB.getBasicBlock(); + auto *FalseBB = MF->CreateMachineBasicBlock(LLVM_BB); + auto *SinkBB = MF->CreateMachineBasicBlock(LLVM_BB); + *** 622 LINES SKIPPED *** From nobody Sun Jan 7 17:50:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqV4QwRz55XFl; Sun, 7 Jan 2024 17:50: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 4T7PqV3Nkqz4MHQ; Sun, 7 Jan 2024 17:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rVJKYYxzX25ojzrO6wBoidSr/CAAecTb10RtvDLSwI0=; b=nczqRrYx7QJJjXCvtay+zUyNXsv+ouf2eBMN3omnIjEJemRGc0R9Aax0lhxxH0VFuiTHhl TS6odpEH4ETgnlxT1/WrAUUvbA1nyTOjuLBB2yplDcwgDYAlhzohgucfdh4wpdNminimGK NmeXmTwq/1K+SpJpg/FzCmCRt6tC2ouus3YgR1SHr5Xvy7FNwKbhB2BS5teeEgC7ZCFz/p pYl/80JqtzeZVc+WPKAzVcJrkoInR91SS4zWdE3SOJEUNJby+JcLQKL3gV3tpT16YG7N3I PT9AekqkcCJ1y3Oj24a3b5MiSr2eVQbKQ0YukAzQUaSmBHNVyaJRQV4B2WPcqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rVJKYYxzX25ojzrO6wBoidSr/CAAecTb10RtvDLSwI0=; b=vkMaxpbFu6cjIOBPkDdXvUqHq3yA5wRPeVWFmi8Nom+HFko8X3YK9pg9Q6kLbKZWVxhzcK q8kDs7qxhAla+4gUW1iXwDvy1ONEtjHxbNwwlYXRVnUG3oyrErOJmdchjXu6WK266/MciA vMVRvFI+ws7QWUKj1OszGinNAcaLLQOP0R88P06dabHctiWRAo91PE1Aj2BmCz2f5k3Z1B dY6Tvh3v/7mc0BaMhZnGnyv0zlEScLuDEA9IdcCgQpnxrfIBBoEztQNglae4WqdJpdXZnd F+1qLfVhZpMjLNqBl1AqYSM23hwyEJeF3Yssw8ZnRf/LEukzWCYihztwExLWyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649830; a=rsa-sha256; cv=none; b=ToyJfd6VcZXbqwPavu1i+H//ZJyZ+gZYRAXsBPqTuWkaqNyBp46uAzVx1tKnaMPG8cZ0nh eR2KyzzTcfPsuI8bmWxxl4lWwJqfVeSYQCBTgJLrWp4pMYrTHtJL3aaR1E5LeM1No9XwLf Y9DNbMt5SLV0R1e65kobsYzZl/by5F3sbSLJqPRRbaPI7gp3LjLmCeLh6CQ2JTdqczchpX iscDHE8b9gJLzMYL8BzLaCEnlF4L0F01NiR3VJUglsrWs2xEhVYFVDZCRHEqLe+K7cHmZr 4XjcHkUB6kVneQ+r0BkY+emouKztgi6pw5rOla55D7OLy2YQalhdc+C2os9b1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqV2By8zZK1; Sun, 7 Jan 2024 17:50: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 407HoUnH022093; Sun, 7 Jan 2024 17:50:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoUjg022090; Sun, 7 Jan 2024 17:50:30 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:30 GMT Message-Id: <202401071750.407HoUjg022090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4aee07d5cebc - stable/14 - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4aee07d5cebcd550d59c7db19511f7269b6778e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4aee07d5cebcd550d59c7db19511f7269b6778e2 commit 4aee07d5cebcd550d59c7db19511f7269b6778e2 Author: Dimitry Andric AuthorDate: 2023-11-30 20:06:52 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:19 +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 (cherry picked from commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d) --- .../clang/include/clang/Driver/Options.td | 3 -- .../clang/Frontend/DependencyOutputOptions.h | 11 +++---- .../clang/include/clang/Frontend/Utils.h | 11 +------ .../clang/lib/Basic/Targets/OSTargets.h | 16 ++++++++- .../clang/lib/Driver/ToolChains/Clang.cpp | 3 -- .../clang/lib/Driver/ToolChains/WebAssembly.cpp | 38 ++++++++++++++-------- .../clang/lib/Format/TokenAnnotator.cpp | 4 +-- .../clang/lib/Format/WhitespaceManager.cpp | 4 ++- .../clang/lib/Format/WhitespaceManager.h | 2 +- .../clang/lib/Frontend/DependencyFile.cpp | 32 ++++-------------- contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp | 8 ++--- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 19 ++++------- contrib/llvm-project/libcxx/include/__config | 2 +- .../libcxx/include/__memory/shared_ptr.h | 5 +-- .../llvm/lib/ExecutionEngine/JITLink/aarch32.cpp | 2 +- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 10 +++--- lib/clang/include/VCSVersion.inc | 6 ++-- lib/clang/include/clang/Basic/Version.inc | 6 ++-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 ++-- lib/clang/include/llvm/Config/config.h | 4 +-- lib/clang/include/llvm/Config/llvm-config.h | 4 +-- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 23 files changed, 94 insertions(+), 106 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td index e04f67bdb1fa..37e8c56b2d29 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/Options.td +++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td @@ -6079,9 +6079,6 @@ let Flags = [CC1Option, NoDriverOption] in { def sys_header_deps : Flag<["-"], "sys-header-deps">, HelpText<"Include system headers in dependency output">, MarshallingInfoFlag>; -def canonical_system_headers : Flag<["-"], "canonical-system-headers">, - HelpText<"Canonicalize system headers in dependency output">, - MarshallingInfoFlag>; def module_file_deps : Flag<["-"], "module-file-deps">, HelpText<"Include module files in dependency output">, MarshallingInfoFlag>; diff --git a/contrib/llvm-project/clang/include/clang/Frontend/DependencyOutputOptions.h b/contrib/llvm-project/clang/include/clang/Frontend/DependencyOutputOptions.h index e4b26d92647d..621acaaa1359 100644 --- a/contrib/llvm-project/clang/include/clang/Frontend/DependencyOutputOptions.h +++ b/contrib/llvm-project/clang/include/clang/Frontend/DependencyOutputOptions.h @@ -34,8 +34,6 @@ enum ExtraDepKind { class DependencyOutputOptions { public: unsigned IncludeSystemHeaders : 1; ///< Include system header dependencies. - unsigned - CanonicalSystemHeaders : 1; ///< canonicalize system header dependencies. unsigned ShowHeaderIncludes : 1; ///< Show header inclusions (-H). unsigned UsePhonyTargets : 1; ///< Include phony targets for each /// dependency, which can avoid some 'make' @@ -84,11 +82,10 @@ public: public: DependencyOutputOptions() - : IncludeSystemHeaders(0), CanonicalSystemHeaders(0), - ShowHeaderIncludes(0), UsePhonyTargets(0), AddMissingHeaderDeps(0), - IncludeModuleFiles(0), ShowSkippedHeaderIncludes(0), - HeaderIncludeFormat(HIFMT_Textual), HeaderIncludeFiltering(HIFIL_None) { - } + : IncludeSystemHeaders(0), ShowHeaderIncludes(0), UsePhonyTargets(0), + AddMissingHeaderDeps(0), IncludeModuleFiles(0), + ShowSkippedHeaderIncludes(0), HeaderIncludeFormat(HIFMT_Textual), + HeaderIncludeFiltering(HIFIL_None) {} }; } // end namespace clang diff --git a/contrib/llvm-project/clang/include/clang/Frontend/Utils.h b/contrib/llvm-project/clang/include/clang/Frontend/Utils.h index 8300e45d15fe..143cf4359f00 100644 --- a/contrib/llvm-project/clang/include/clang/Frontend/Utils.h +++ b/contrib/llvm-project/clang/include/clang/Frontend/Utils.h @@ -41,7 +41,6 @@ class ExternalSemaSource; class FrontendOptions; class PCHContainerReader; class Preprocessor; -class FileManager; class PreprocessorOptions; class PreprocessorOutputOptions; @@ -80,14 +79,11 @@ public: /// Return true if system files should be passed to sawDependency(). virtual bool needSystemDependencies() { return false; } - /// Return true if system files should be canonicalized. - virtual bool shouldCanonicalizeSystemDependencies() { return false; } - /// Add a dependency \p Filename if it has not been seen before and /// sawDependency() returns true. virtual void maybeAddDependency(StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, - FileManager *FileMgr, bool IsMissing); + bool IsMissing); protected: /// Return true if the filename was added to the list of dependencies, false @@ -116,10 +112,6 @@ public: bool sawDependency(StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) final; - bool shouldCanonicalizeSystemDependencies() override { - return CanonicalSystemHeaders; - } - protected: void outputDependencyFile(llvm::raw_ostream &OS); @@ -129,7 +121,6 @@ private: std::string OutputFile; std::vector Targets; bool IncludeSystemHeaders; - bool CanonicalSystemHeaders; bool PhonyTarget; bool AddMissingHeaderDeps; bool SeenMissingHeader; diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h b/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h index 8f4331b02f3b..cf8cc8e61c49 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h @@ -217,6 +217,8 @@ protected: Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion)); Builder.defineMacro("__KPRINTF_ATTRIBUTE__"); DefineStd(Builder, "unix", Opts); + if (this->HasFloat128) + Builder.defineMacro("__FLOAT128__"); // On FreeBSD, wchar_t contains the number of the code point as // used by the character set of the locale. These character sets are @@ -234,9 +236,11 @@ public: FreeBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : OSTargetInfo(Triple, Opts) { switch (Triple.getArch()) { - default: case llvm::Triple::x86: case llvm::Triple::x86_64: + this->HasFloat128 = true; + [[fallthrough]]; + default: this->MCountName = ".mcount"; break; case llvm::Triple::mips: @@ -425,12 +429,22 @@ protected: Builder.defineMacro("__unix__"); if (Opts.POSIXThreads) Builder.defineMacro("_REENTRANT"); + if (this->HasFloat128) + Builder.defineMacro("__FLOAT128__"); } public: NetBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : OSTargetInfo(Triple, Opts) { this->MCountName = "__mcount"; + switch (Triple.getArch()) { + default: + break; + case llvm::Triple::x86: + case llvm::Triple::x86_64: + this->HasFloat128 = true; + break; + } } }; diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index 47ec36b3a8ff..37a07b8f224d 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -1152,9 +1152,6 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, if (ArgM->getOption().matches(options::OPT_M) || ArgM->getOption().matches(options::OPT_MD)) CmdArgs.push_back("-sys-header-deps"); - if (Args.hasFlag(options::OPT_canonical_prefixes, - options::OPT_no_canonical_prefixes, true)) - CmdArgs.push_back("-canonical-system-headers"); if ((isa(JA) && !Args.hasArg(options::OPT_fno_module_file_deps)) || Args.hasArg(options::OPT_fmodule_file_deps)) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/WebAssembly.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/WebAssembly.cpp index 36bed3166ff3..2098a68cbc6e 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/WebAssembly.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/WebAssembly.cpp @@ -77,31 +77,43 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgs(CmdArgs, options::OPT_u); ToolChain.AddFilePathLibArgs(Args, CmdArgs); - const char *Crt1 = "crt1.o"; + bool IsCommand = true; + const char *Crt1; const char *Entry = nullptr; - // If crt1-command.o exists, it supports new-style commands, so use it. - // Otherwise, use the old crt1.o. This is a temporary transition measure. - // Once WASI libc no longer needs to support LLVM versions which lack - // support for new-style command, it can make crt1.o the same as - // crt1-command.o. And once LLVM no longer needs to support WASI libc - // versions before that, it can switch to using crt1-command.o. - if (ToolChain.GetFilePath("crt1-command.o") != "crt1-command.o") - Crt1 = "crt1-command.o"; + // When -shared is specified, use the reactor exec model unless + // specified otherwise. + if (Args.hasArg(options::OPT_shared)) + IsCommand = false; if (const Arg *A = Args.getLastArg(options::OPT_mexec_model_EQ)) { StringRef CM = A->getValue(); if (CM == "command") { - // Use default values. + IsCommand = true; } else if (CM == "reactor") { - Crt1 = "crt1-reactor.o"; - Entry = "_initialize"; + IsCommand = false; } else { ToolChain.getDriver().Diag(diag::err_drv_invalid_argument_to_option) << CM << A->getOption().getName(); } } - if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles, options::OPT_shared)) + + if (IsCommand) { + // If crt1-command.o exists, it supports new-style commands, so use it. + // Otherwise, use the old crt1.o. This is a temporary transition measure. + // Once WASI libc no longer needs to support LLVM versions which lack + // support for new-style command, it can make crt1.o the same as + // crt1-command.o. And once LLVM no longer needs to support WASI libc + // versions before that, it can switch to using crt1-command.o. + Crt1 = "crt1.o"; + if (ToolChain.GetFilePath("crt1-command.o") != "crt1-command.o") + Crt1 = "crt1-command.o"; + } else { + Crt1 = "crt1-reactor.o"; + Entry = "_initialize"; + } + + if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(Crt1))); if (Entry) { CmdArgs.push_back(Args.MakeArgString("--entry")); diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 4a1fc08455e5..c52fe12e7ffd 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -3065,8 +3065,8 @@ void TokenAnnotator::setCommentLineLevels( // If the comment is currently aligned with the line immediately following // it, that's probably intentional and we should keep it. - if (NextNonCommentLine && !NextNonCommentLine->First->Finalized && - Line->isComment() && NextNonCommentLine->First->NewlinesBefore <= 1 && + if (NextNonCommentLine && NextNonCommentLine->First->NewlinesBefore < 2 && + Line->isComment() && !isClangFormatOff(Line->First->TokenText) && NextNonCommentLine->First->OriginalColumn == Line->First->OriginalColumn) { const bool PPDirectiveOrImportStmt = diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp index c1016c44a74a..ddb55c4d853a 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp @@ -1263,6 +1263,8 @@ void WhitespaceManager::alignArrayInitializersRightJustified( auto Offset = std::distance(Cells.begin(), CellIter); for (const auto *Next = CellIter->NextColumnElement; Next; Next = Next->NextColumnElement) { + if (RowCount >= CellDescs.CellCounts.size()) + break; auto *Start = (Cells.begin() + RowCount * CellDescs.CellCounts[0]); auto *End = Start + Offset; ThisNetWidth = getNetWidth(Start, End, CellDescs.InitialSpaces); @@ -1324,7 +1326,7 @@ void WhitespaceManager::alignArrayInitializersLeftJustified( auto Offset = std::distance(Cells.begin(), CellIter); for (const auto *Next = CellIter->NextColumnElement; Next; Next = Next->NextColumnElement) { - if (RowCount > CellDescs.CellCounts.size()) + if (RowCount >= CellDescs.CellCounts.size()) break; auto *Start = (Cells.begin() + RowCount * CellDescs.CellCounts[0]); auto *End = Start + Offset; diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h index df7e9add1cd4..69398fe41150 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h @@ -317,7 +317,7 @@ private: auto Offset = std::distance(CellStart, CellStop); for (const auto *Next = CellStop->NextColumnElement; Next; Next = Next->NextColumnElement) { - if (RowCount > MaxRowCount) + if (RowCount >= MaxRowCount) break; auto Start = (CellStart + RowCount * CellCount); auto End = Start + Offset; diff --git a/contrib/llvm-project/clang/lib/Frontend/DependencyFile.cpp b/contrib/llvm-project/clang/lib/Frontend/DependencyFile.cpp index 44268e71dc24..fb56eb225c83 100644 --- a/contrib/llvm-project/clang/lib/Frontend/DependencyFile.cpp +++ b/contrib/llvm-project/clang/lib/Frontend/DependencyFile.cpp @@ -49,7 +49,6 @@ struct DepCollectorPPCallbacks : public PPCallbacks { DepCollector.maybeAddDependency( llvm::sys::path::remove_leading_dotslash(*Filename), /*FromModule*/ false, isSystem(FileType), /*IsModuleFile*/ false, - &PP.getFileManager(), /*IsMissing*/ false); } @@ -57,11 +56,9 @@ struct DepCollectorPPCallbacks : public PPCallbacks { SrcMgr::CharacteristicKind FileType) override { StringRef Filename = llvm::sys::path::remove_leading_dotslash(SkippedFile.getName()); - DepCollector.maybeAddDependency(Filename, - /*FromModule=*/false, + DepCollector.maybeAddDependency(Filename, /*FromModule=*/false, /*IsSystem=*/isSystem(FileType), /*IsModuleFile=*/false, - &PP.getFileManager(), /*IsMissing=*/false); } @@ -72,11 +69,9 @@ struct DepCollectorPPCallbacks : public PPCallbacks { StringRef RelativePath, const Module *Imported, SrcMgr::CharacteristicKind FileType) override { if (!File) - DepCollector.maybeAddDependency(FileName, - /*FromModule*/ false, + DepCollector.maybeAddDependency(FileName, /*FromModule*/ false, /*IsSystem*/ false, /*IsModuleFile*/ false, - &PP.getFileManager(), /*IsMissing*/ true); // Files that actually exist are handled by FileChanged. } @@ -88,11 +83,9 @@ struct DepCollectorPPCallbacks : public PPCallbacks { return; StringRef Filename = llvm::sys::path::remove_leading_dotslash(File->getName()); - DepCollector.maybeAddDependency(Filename, - /*FromModule=*/false, + DepCollector.maybeAddDependency(Filename, /*FromModule=*/false, /*IsSystem=*/isSystem(FileType), /*IsModuleFile=*/false, - &PP.getFileManager(), /*IsMissing=*/false); } @@ -108,11 +101,9 @@ struct DepCollectorMMCallbacks : public ModuleMapCallbacks { void moduleMapFileRead(SourceLocation Loc, const FileEntry &Entry, bool IsSystem) override { StringRef Filename = Entry.getName(); - DepCollector.maybeAddDependency(Filename, - /*FromModule*/ false, + DepCollector.maybeAddDependency(Filename, /*FromModule*/ false, /*IsSystem*/ IsSystem, /*IsModuleFile*/ false, - /*FileMgr*/ nullptr, /*IsMissing*/ false); } }; @@ -128,10 +119,8 @@ struct DepCollectorASTListener : public ASTReaderListener { } void visitModuleFile(StringRef Filename, serialization::ModuleKind Kind) override { - DepCollector.maybeAddDependency(Filename, - /*FromModule*/ true, + DepCollector.maybeAddDependency(Filename, /*FromModule*/ true, /*IsSystem*/ false, /*IsModuleFile*/ true, - /*FileMgr*/ nullptr, /*IsMissing*/ false); } bool visitInputFile(StringRef Filename, bool IsSystem, @@ -145,7 +134,7 @@ struct DepCollectorASTListener : public ASTReaderListener { Filename = FE->getName(); DepCollector.maybeAddDependency(Filename, /*FromModule*/ true, IsSystem, - /*IsModuleFile*/ false, /*FileMgr*/ nullptr, + /*IsModuleFile*/ false, /*IsMissing*/ false); return true; } @@ -155,15 +144,9 @@ struct DepCollectorASTListener : public ASTReaderListener { void DependencyCollector::maybeAddDependency(StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, - FileManager *FileMgr, bool IsMissing) { - if (sawDependency(Filename, FromModule, IsSystem, IsModuleFile, IsMissing)) { - if (IsSystem && FileMgr && shouldCanonicalizeSystemDependencies()) { - if (auto F = FileMgr->getFile(Filename)) - Filename = FileMgr->getCanonicalName(*F); - } + if (sawDependency(Filename, FromModule, IsSystem, IsModuleFile, IsMissing)) addDependency(Filename); - } } bool DependencyCollector::addDependency(StringRef Filename) { @@ -211,7 +194,6 @@ DependencyFileGenerator::DependencyFileGenerator( const DependencyOutputOptions &Opts) : OutputFile(Opts.OutputFile), Targets(Opts.Targets), IncludeSystemHeaders(Opts.IncludeSystemHeaders), - CanonicalSystemHeaders(Opts.CanonicalSystemHeaders), PhonyTarget(Opts.UsePhonyTargets), AddMissingHeaderDeps(Opts.AddMissingHeaderDeps), SeenMissingHeader(false), IncludeModuleFiles(Opts.IncludeModuleFiles), diff --git a/contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp b/contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp index 5a1b0a918caa..6a5699dd484e 100644 --- a/contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp +++ b/contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp @@ -2481,9 +2481,9 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken, << FixItHint::CreateReplacement(CurrModuleDeclLoc, "framework module"); } -static int compareModuleHeaders(const Module::Header *A, - const Module::Header *B) { - return A->NameAsWritten.compare(B->NameAsWritten); +static bool compareModuleHeaders(const Module::Header &A, + const Module::Header &B) { + return A.NameAsWritten < B.NameAsWritten; } /// Parse an umbrella directory declaration. @@ -2546,7 +2546,7 @@ void ModuleMapParser::parseUmbrellaDirDecl(SourceLocation UmbrellaLoc) { } // Sort header paths so that the pcm doesn't depend on iteration order. - llvm::array_pod_sort(Headers.begin(), Headers.end(), compareModuleHeaders); + std::stable_sort(Headers.begin(), Headers.end(), compareModuleHeaders); for (auto &Header : Headers) Map.addHeader(ActiveModule, std::move(Header), ModuleMap::TextualHeader); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp index a3d9abb15377..aef8dc58a48d 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp @@ -957,18 +957,13 @@ static bool shouldAddReversedEqEq(Sema &S, SourceLocation OpLoc, return true; } // Otherwise the search scope is the namespace scope of which F is a member. - LookupResult NonMembers(S, NotEqOp, OpLoc, - Sema::LookupNameKind::LookupOperatorName); - S.LookupName(NonMembers, - S.getScopeForContext(EqFD->getEnclosingNamespaceContext())); - NonMembers.suppressDiagnostics(); - for (NamedDecl *Op : NonMembers) { - auto *FD = Op->getAsFunction(); - if(auto* UD = dyn_cast(Op)) - FD = UD->getUnderlyingDecl()->getAsFunction(); - if (FunctionsCorrespond(S.Context, EqFD, FD) && - declaresSameEntity(cast(EqFD->getDeclContext()), - cast(Op->getDeclContext()))) + for (NamedDecl *Op : EqFD->getEnclosingNamespaceContext()->lookup(NotEqOp)) { + auto *NotEqFD = Op->getAsFunction(); + if (auto *UD = dyn_cast(Op)) + NotEqFD = UD->getUnderlyingDecl()->getAsFunction(); + if (FunctionsCorrespond(S.Context, EqFD, NotEqFD) && S.isVisible(NotEqFD) && + declaresSameEntity(cast(EqFD->getEnclosingNamespaceContext()), + cast(Op->getLexicalDeclContext()))) return false; } return true; diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 10c056f313ff..221bb8ff868b 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -40,7 +40,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 170005 +# define _LIBCPP_VERSION 170006 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h b/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h index dce44a7b3732..a5bae83e0b61 100644 --- a/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h +++ b/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h @@ -1134,7 +1134,8 @@ private: __alloc_.~_Alloc(); size_t __size = __unbounded_array_control_block::__bytes_for(__count_); _AlignedStorage* __storage = reinterpret_cast<_AlignedStorage*>(this); - allocator_traits<_StorageAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*__storage), __size); + allocator_traits<_StorageAlloc>::deallocate( + __tmp, _PointerTraits::pointer_to(*__storage), __size / sizeof(_AlignedStorage)); } _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_; @@ -1217,7 +1218,7 @@ private: _ControlBlockAlloc __tmp(__alloc_); __alloc_.~_Alloc(); - allocator_traits<_ControlBlockAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*this), sizeof(*this)); + allocator_traits<_ControlBlockAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*this), 1); } _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_; diff --git a/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp b/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp index ffc3950cdec8..83829dde0508 100644 --- a/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp +++ b/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp @@ -173,7 +173,7 @@ bool checkRegister(const ThumbRelocation &R, HalfWords Reg) { } template -bool writeRegister(WritableThumbRelocation &R, HalfWords Reg) { +void writeRegister(WritableThumbRelocation &R, HalfWords Reg) { static constexpr HalfWords Mask = FixupInfo::RegMask; assert((Mask.Hi & Reg.Hi) == Reg.Hi && (Mask.Hi & Reg.Hi) == Reg.Hi && "Value bits exceed bit range of given mask"); diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp index aa20409da4e2..901204043b3c 100644 --- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp +++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp @@ -991,12 +991,12 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) { unsigned TrailingOnes = llvm::countr_one(Mask); if (ShAmt >= TrailingOnes) break; - // If the mask has 32 trailing ones, use SRLIW. + // If the mask has 32 trailing ones, use SRLI on RV32 or SRLIW on RV64. if (TrailingOnes == 32) { - SDNode *SRLIW = - CurDAG->getMachineNode(RISCV::SRLIW, DL, VT, N0->getOperand(0), - CurDAG->getTargetConstant(ShAmt, DL, VT)); - ReplaceNode(Node, SRLIW); + SDNode *SRLI = CurDAG->getMachineNode( + Subtarget->is64Bit() ? RISCV::SRLIW : RISCV::SRLI, DL, VT, + N0->getOperand(0), CurDAG->getTargetConstant(ShAmt, DL, VT)); + ReplaceNode(Node, SRLI); return; } diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 27e6c2753812..a52f5acd3b0f 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-17.0.5-0-g98bfdac5ce82" +#define LLVM_REVISION "llvmorg-17.0.6-0-g6009708b4367" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-17.0.5-0-g98bfdac5ce82" +#define CLANG_REVISION "llvmorg-17.0.6-0-g6009708b4367" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-17.0.5-0-g98bfdac5ce82" +#define LLDB_REVISION "llvmorg-17.0.6-0-g6009708b4367" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 567978aefcdf..2218bba3dc03 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,8 +1,8 @@ -#define CLANG_VERSION 17.0.5 -#define CLANG_VERSION_STRING "17.0.5" +#define CLANG_VERSION 17.0.6 +#define CLANG_VERSION_STRING "17.0.6" #define CLANG_VERSION_MAJOR 17 #define CLANG_VERSION_MAJOR_STRING "17" #define CLANG_VERSION_MINOR 0 -#define CLANG_VERSION_PATCHLEVEL 5 +#define CLANG_VERSION_PATCHLEVEL 6 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index cb2763314664..de6a298ab969 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "17.0.5 (FreeBSD llvmorg-17.0.5-0-g98bfdac5ce82-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "17.0.6 (FreeBSD llvmorg-17.0.6-0-g6009708b4367-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index b43c5103b8db..838643a235ff 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 17.0.5 -#define LLDB_VERSION_STRING "17.0.5" +#define LLDB_VERSION 17.0.6 +#define LLDB_VERSION_STRING "17.0.6" #define LLDB_VERSION_MAJOR 17 #define LLDB_VERSION_MINOR 0 -#define LLDB_VERSION_PATCH 5 +#define LLDB_VERSION_PATCH 6 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 844599754b4b..9bc4e93a2511 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -344,10 +344,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 17.0.5" +#define PACKAGE_STRING "LLVM 17.0.6" /* Define to the version of this package. */ -#define PACKAGE_VERSION "17.0.5" +#define PACKAGE_VERSION "17.0.6" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 9cec41cd05a5..dfbeb0250027 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -73,10 +73,10 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 5 +#define LLVM_VERSION_PATCH 6 /* LLVM version string */ -#define LLVM_VERSION_STRING "17.0.5" +#define LLVM_VERSION_STRING "17.0.6" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 309d8d7925fc..8683d5c6aca1 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-17.0.5-0-g98bfdac5ce82" +#define LLVM_REVISION "llvmorg-17.0.6-0-g6009708b4367" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Sun Jan 7 17:50:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqY2gX2z55XJ4; Sun, 7 Jan 2024 17:50: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 4T7PqX5x2qz4MN2; Sun, 7 Jan 2024 17:50:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxfLDCwOnBx0L2dku/eRZnCGwJBTpUWGntvZAjPFQOE=; b=xsUzJj8PEaP0LUzJuwb7xO+l4wBbdE3deKVMu4Y5zOPS3TXQBplbDasIA4hg5SjR6+Vaei HUJ4l6rF/ft1ivpzFzArM+8bfSIiZS6SD9Oh2q9Go9DrZvfYrrHYKks6xlLHilHFkEZbPV 3temk8l/ukOh8RtySKxOGXwsOfJ8WBTRx76YQcNY7uNk8D7LO8NDGsuWHTf8OWz9DgWw76 PUxVZaB84SE5JjAIQhJsd3yv19ssvH/RQQKwD39vVr0+3vx0YLuW6rXHossPh7BxlR9Tv1 J+fxUbSHC0ZMOvnine0rtPlbJHyw47aJ7jOvb0yo0Zu4AtOLNC3kVXTbVcJqsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxfLDCwOnBx0L2dku/eRZnCGwJBTpUWGntvZAjPFQOE=; b=bV/M1BmaOzVIToI9zUHlSRalxE4ImygYCd0bpcBl+4BEddttsaE5owa7i3rkiBdWymyuuN bAloeWfWjCYPKRH8jL+zo78GjCXil8Nn0qlakmnhV4zqUdIEiHNYqX/7qU5YRNT3c2LnDW NGkTVCP1l6wl8H/ozDoqMdIyY9PtJPdn8aGzKX9+EV0FXcdju85T2i9AGX/SERgih02S0L YKKW6j5VL1fT+5BiwvbJknLKnGirhlk5M3SOJzpOMiYi0aQZPhRb1O4cV2sU4SAcPQ3trG Uw8RDFg31jZxQ27qC6fOdrbDqmyHdoFd0oi8TZAEjDDtKF9sLrfMM3+4+8Scgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649832; a=rsa-sha256; cv=none; b=WpWd00oaIH42mH4w/UXuIVs8rL8pp3VHE05PGkWo6wA0Uba6MZ2pqsI6gaP2teDNUgLM/I gb/ZX6f/2phG6N4hTL2yL4GptQeWbnUoVzFCwvFgDMUD0se3KPthrpsoU4UHZx9wzeIdEg yRFYVJUoXaIydgxIkif1SWadByJCrHc4sWnv53R/UPDbg3llE5+9Sg+uR2B3VeFrizPwIB h1PkOfCckYflcBuoqmOKGjnKxp993toJMiaqp8T5jKIiNFmLv3rx5fHieHvkvlxMsgF+3W 4zjL9v1f1W9PXtGNFWwT0LuWAyuyMk5R7smEnicB+/jIxJoOeQPHkkGJsJjxEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqX4pCRzYyx; Sun, 7 Jan 2024 17:50: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 407HoWaV022204; Sun, 7 Jan 2024 17:50:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoWuu022201; Sun, 7 Jan 2024 17:50:32 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:32 GMT Message-Id: <202401071750.407HoWuu022201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 86188fdaca05 - stable/14 - Proactively remove libc++ __tuple header file that became a directory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 86188fdaca05f6cac1d67e2a57547dc6f423ba1b Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=86188fdaca05f6cac1d67e2a57547dc6f423ba1b commit 86188fdaca05f6cac1d67e2a57547dc6f423ba1b Author: Dimitry Andric AuthorDate: 2023-12-13 18:53:17 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:19 +0000 Proactively remove libc++ __tuple header file that became a directory This was already handled in ObsoleteFiles.inc (see the 20230622 entry), but some people never run "make delete-old", or want to upgrade directly from a revision that still had libc++ 15 to the most recent revision. They would then encounter a failure during installworld, similar to: install: target directory `/usr/include/c++/v1/__tuple/' does not exist Therefore, clean it up in the distrib-cleanup phase, similar to the earlier instance of the libc++ __string header file that became a directory. PR: 273753 MFC after: 1 month (cherry picked from commit ca217224f17229570f40227893353ca10ae1dda1) --- etc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/Makefile b/etc/Makefile index b76d6e6462f4..057bfe4fa7e7 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -125,6 +125,7 @@ MTREES+= ../${mtree} / # Clean up files that have changed into directories, as mtree cannot handle this # scenario. DISTRIB_CLEANUP_FILES+= ${INCLUDEDIR}/c++/v1/__string +DISTRIB_CLEANUP_FILES+= ${INCLUDEDIR}/c++/v1/__tuple distrib-cleanup: .PHONY for file in ${DISTRIB_CLEANUP_FILES}; do \ if [ -f ${DESTDIR}/$${file} ]; then \ From nobody Sun Jan 7 17:50:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqW6RH6z55XNZ; Sun, 7 Jan 2024 17:50: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 4T7PqW4QDMz4MYR; Sun, 7 Jan 2024 17:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k6r0TIS1PTfU1lBFeE7L8KKcebgzWK9b24XYGN3Uq4Q=; b=PSZ6RuEL4vyHRKMb90rXf2jx/8+RN9/dKHmJdW/anr/HkrN0DTlzMa1iQx4tMyIcTg/HzJ xHM11locUvw/G5g6JY0n1Gr/CV+pQPPPBNRZsNhSOzhqZT9d3YaqK4Dz0Q5sFizihjtVnU UpPgTmrAm4J2l+TbtEI5cahtOS0oauxolqW5B2OicpCIS8jlOoA5v8INuBf7jjmXN0OLFs K3/ebOIArey+JpeNJ6xAvAtvzJO0Y3cqe87iW9FaHZZH7TlKqQdqsPP8+3u2PTeVWVthE3 TdC2lJKoPWVBa1HRNbwX+znuMS3haYuIDedH3nSOtSCuDhSzAU9/yyBEIU4iKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k6r0TIS1PTfU1lBFeE7L8KKcebgzWK9b24XYGN3Uq4Q=; b=ouzZFMDJs0UfBSwY5r4s0y+I46LaBuEp7ejBkqFw0RgNEDLxDclt47AvGQ8QroJ4rQU0lF jlV3aMw9L6UK3U6gdy26TSfPOtmTYjv7JgydM10N9+JGFYVZaZf+emUzT8Hbv8EHN3LUYF pXLfnfd975YTVaGRY0TJ5TcM3AruWzYTaGtmWyEk6VLKwSM+hN+4s1DDjaX+uZzy66MFX6 AtY9qNxDiQ7vrYJpGGkiU5X9j5t1YYu8JbmVxWiNHa905qosmy2l0UR37JQ6YzWRcRH1zN zf71HxCS6WMF67onqsfkxLH8Z9QVhuLjDVyuANASW4llfpUxx+ULhjaVHcGYhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649831; a=rsa-sha256; cv=none; b=nKWZz6XFkbDxVC6caWLxJj4dpCvPtlxONylU4Pumg4/5eZ8yzOTuQfz4TkRaNvVasv0aZS dThblVBnJms0CmDJ98tb8uUsWsv/aXbwSyLuxbsBAIeidesZN3xKRIHsYBuu/9Nu+TdTIS /I+zvHcqDGQxA3hLmuSCm5NK2VyWyAN6RQWOrHwpZkZvoz0Xya9O2azeIlB2gWKHYLz/3K hKUhH0z/TqI29X5UPgUd2+FrzhguDX5xIiMHZjD7S5QzOCKeNja0jqJSces9k7zlcofVK+ +I/cL5lqNuEXjnfrmjda4UVwhPiuZy5JJ4W0EL7afMoozETBKPsVCfDa+NV8Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqW3P1XzYJf; Sun, 7 Jan 2024 17:50: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 407HoVa8022147; Sun, 7 Jan 2024 17:50:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoVYH022144; Sun, 7 Jan 2024 17:50:31 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:31 GMT Message-Id: <202401071750.407HoVYH022144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: fc0670dd3a4d - stable/14 - Merge commit 158f4f30adb4 from llvm git (by Corentin Jabot): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fc0670dd3a4d9d7c7e564d1138f109660881519e Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fc0670dd3a4d9d7c7e564d1138f109660881519e commit fc0670dd3a4d9d7c7e564d1138f109660881519e Author: Dimitry Andric AuthorDate: 2023-12-07 12:47:54 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:19 +0000 Merge commit 158f4f30adb4 from llvm git (by Corentin Jabot): [Clang] Do not change the type of captured vars when checking lambda constraints When checking the constraint of a lambda, we need to respect the constness of the call operator when establishing the type of capture variables. In D124351, this was done by adding const to the captured variable... However, that would change the type of the variable outside of the scope of the lambda, which is clearly not the desired outcome. Instead, to ensure const-correctness, we need to populate a LambdaScopeInfo with the capture variables before checking the constraints of a generic lambda. There is no changelog as I'd like to tentatively propose we backport this change to RC3 as it is a regression introduced in the Clang 17 cycle. Fixes #61267 Reviewed By: aaron.ballman, #clang-language-wg Differential Revision: https://reviews.llvm.org/D158433 Merge commit 3ed9e9e3ace6 from llvm git (by Corentin Jabot): [Clang] Add captures to the instantiation scope of lambda call operators Like concepts checking, a trailing return type of a lambda in a dependent context may refer to captures in which case they may need to be rebuilt, so the map of local decl should include captures. This patch reveal a pre-existing issue. `this` is always recomputed by TreeTransform. `*this` (like all captures) only become `const` after the parameter list. However, if try to recompute the value of `this` (in a parameter) during template instantiation while determining the type of the call operator, we will determine it to be const (unless the lambda is mutable). There is no good way to know at that point that we are in a parameter or not, the easiest/best solution is to transform the type of this. Note that doing so break a handful of HLSL tests. So this is a prototype at this point. Fixes #65067 Fixes #63675 Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D159126 This fixes 'Assertion failed: (isa(D) && "declaration not instantiated in this scope"), function findInstantiationOf' error when building databases/mongodb44. PR: 273753 MFC after: 1 month (cherry picked from commit feb5b0c76f9c7b510583b0489918300cbf966e0f) --- .../llvm-project/clang/include/clang/Sema/Sema.h | 10 +++++++ .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 29 ++++++-------------- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 16 +++++++---- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 15 +++++----- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 32 ++++++++++++++++++++++ .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 3 ++ .../llvm-project/clang/lib/Sema/TreeTransform.h | 11 +++++++- 7 files changed, 82 insertions(+), 34 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index 3752a23faa85..28a5f17d0dd5 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -7315,6 +7315,16 @@ public: CXXConversionDecl *Conv, Expr *Src); + sema::LambdaScopeInfo *RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator); + + class LambdaScopeForCallOperatorInstantiationRAII + : private FunctionScopeRAII { + public: + LambdaScopeForCallOperatorInstantiationRAII( + Sema &SemasRef, FunctionDecl *FD, MultiLevelTemplateArgumentList MLTAL, + LocalInstantiationScope &Scope); + }; + /// Check whether the given expression is a valid constraint expression. /// A diagnostic is emitted if it is not, false is returned, and /// PossibleNonPrimary will be set to true if the failure might be due to a diff --git a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp index f24b549dd2ef..d1fa8e783122 100755 --- a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp @@ -13,12 +13,14 @@ #include "clang/Sema/SemaConcept.h" #include "TreeTransform.h" #include "clang/AST/ASTLambda.h" +#include "clang/AST/DeclCXX.h" #include "clang/AST/ExprConcepts.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/OperatorPrecedence.h" #include "clang/Sema/EnterExpressionEvaluationContext.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Overload.h" +#include "clang/Sema/ScopeInfo.h" #include "clang/Sema/Sema.h" #include "clang/Sema/SemaDiagnostic.h" #include "clang/Sema/SemaInternal.h" @@ -540,11 +542,6 @@ bool Sema::addInstantiatedCapturesToScope( auto AddSingleCapture = [&](const ValueDecl *CapturedPattern, unsigned Index) { ValueDecl *CapturedVar = LambdaClass->getCapture(Index)->getCapturedVar(); - if (cast(Function)->isConst()) { - QualType T = CapturedVar->getType(); - T.addConst(); - CapturedVar->setType(T); - } if (CapturedVar->isInitCapture()) Scope.InstantiatedLocal(CapturedPattern, CapturedVar); }; @@ -603,11 +600,6 @@ bool Sema::SetupConstraintScope( if (addInstantiatedParametersToScope(FD, FromMemTempl->getTemplatedDecl(), Scope, MLTAL)) return true; - // Make sure the captures are also added to the instantiation scope. - if (isLambdaCallOperator(FD) && - addInstantiatedCapturesToScope(FD, FromMemTempl->getTemplatedDecl(), - Scope, MLTAL)) - return true; } return false; @@ -632,11 +624,6 @@ bool Sema::SetupConstraintScope( // child-function. if (addInstantiatedParametersToScope(FD, InstantiatedFrom, Scope, MLTAL)) return true; - - // Make sure the captures are also added to the instantiation scope. - if (isLambdaCallOperator(FD) && - addInstantiatedCapturesToScope(FD, InstantiatedFrom, Scope, MLTAL)) - return true; } return false; @@ -714,6 +701,10 @@ bool Sema::CheckFunctionConstraints(const FunctionDecl *FD, Record = const_cast(Method->getParent()); } CXXThisScopeRAII ThisScope(*this, Record, ThisQuals, Record != nullptr); + + LambdaScopeForCallOperatorInstantiationRAII LambdaScope( + *this, const_cast(FD), *MLTAL, Scope); + return CheckConstraintSatisfaction( FD, {FD->getTrailingRequiresClause()}, *MLTAL, SourceRange(UsageLoc.isValid() ? UsageLoc : FD->getLocation()), @@ -900,12 +891,10 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints( ThisQuals = Method->getMethodQualifiers(); Record = Method->getParent(); } + CXXThisScopeRAII ThisScope(*this, Record, ThisQuals, Record != nullptr); - FunctionScopeRAII FuncScope(*this); - if (isLambdaCallOperator(Decl)) - PushLambdaScope(); - else - FuncScope.disable(); + LambdaScopeForCallOperatorInstantiationRAII LambdaScope( + *this, const_cast(Decl), *MLTAL, Scope); llvm::SmallVector Converted; return CheckConstraintSatisfaction(Template, TemplateAC, Converted, *MLTAL, diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp index 21b5781a71cd..fab2865ec5a1 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp @@ -15172,14 +15172,17 @@ Sema::CheckForFunctionRedefinition(FunctionDecl *FD, FD->setInvalidDecl(); } -static void RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator, - Sema &S) { - CXXRecordDecl *const LambdaClass = CallOperator->getParent(); +LambdaScopeInfo *Sema::RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator) { + CXXRecordDecl *LambdaClass = CallOperator->getParent(); - LambdaScopeInfo *LSI = S.PushLambdaScope(); + LambdaScopeInfo *LSI = PushLambdaScope(); LSI->CallOperator = CallOperator; LSI->Lambda = LambdaClass; LSI->ReturnType = CallOperator->getReturnType(); + // This function in calls in situation where the context of the call operator + // is not entered, so we set AfterParameterList to false, so that + // `tryCaptureVariable` finds explicit captures in the appropriate context. + LSI->AfterParameterList = false; const LambdaCaptureDefault LCD = LambdaClass->getLambdaCaptureDefault(); if (LCD == LCD_None) @@ -15200,7 +15203,7 @@ static void RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator, if (C.capturesVariable()) { ValueDecl *VD = C.getCapturedVar(); if (VD->isInitCapture()) - S.CurrentInstantiationScope->InstantiatedLocal(VD, VD); + CurrentInstantiationScope->InstantiatedLocal(VD, VD); const bool ByRef = C.getCaptureKind() == LCK_ByRef; LSI->addCapture(VD, /*IsBlock*/false, ByRef, /*RefersToEnclosingVariableOrCapture*/true, C.getLocation(), @@ -15217,6 +15220,7 @@ static void RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator, } ++I; } + return LSI; } Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, @@ -15320,7 +15324,7 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, assert(inTemplateInstantiation() && "There should be an active template instantiation on the stack " "when instantiating a generic lambda!"); - RebuildLambdaScopeInfo(cast(D), *this); + RebuildLambdaScopeInfo(cast(D)); } else { // Enter a new function scope PushFunctionScope(); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index 3a5e302cc03a..63b00d640a9c 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -19619,13 +19619,6 @@ bool Sema::tryCaptureVariable( FunctionScopesIndex == MaxFunctionScopesIndex && VarDC == DC) return true; - // When evaluating some attributes (like enable_if) we might refer to a - // function parameter appertaining to the same declaration as that - // attribute. - if (const auto *Parm = dyn_cast(Var); - Parm && Parm->getDeclContext() == DC) - return true; - // Only block literals, captured statements, and lambda expressions can // capture; other scopes don't work. DeclContext *ParentDC = @@ -19653,6 +19646,14 @@ bool Sema::tryCaptureVariable( CSI->getCapture(Var).markUsed(BuildAndDiagnose); break; } + + // When evaluating some attributes (like enable_if) we might refer to a + // function parameter appertaining to the same declaration as that + // attribute. + if (const auto *Parm = dyn_cast(Var); + Parm && Parm->getDeclContext() == DC) + return true; + // If we are instantiating a generic lambda call operator body, // we do not want to capture new variables. What was captured // during either a lambdas transformation or initial parsing diff --git a/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp b/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp index 06fc53591a76..ccc5111d1e31 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp @@ -20,6 +20,7 @@ #include "clang/Sema/ScopeInfo.h" #include "clang/Sema/SemaInternal.h" #include "clang/Sema/SemaLambda.h" +#include "clang/Sema/Template.h" #include "llvm/ADT/STLExtras.h" #include using namespace clang; @@ -2222,3 +2223,34 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation, return BuildBlock; } + +Sema::LambdaScopeForCallOperatorInstantiationRAII:: + LambdaScopeForCallOperatorInstantiationRAII( + Sema &SemasRef, FunctionDecl *FD, MultiLevelTemplateArgumentList MLTAL, + LocalInstantiationScope &Scope) + : FunctionScopeRAII(SemasRef) { + if (!isLambdaCallOperator(FD)) { + FunctionScopeRAII::disable(); + return; + } + + if (FD->isTemplateInstantiation() && FD->getPrimaryTemplate()) { + FunctionTemplateDecl *PrimaryTemplate = FD->getPrimaryTemplate(); + if (const auto *FromMemTempl = + PrimaryTemplate->getInstantiatedFromMemberTemplate()) { + SemasRef.addInstantiatedCapturesToScope( + FD, FromMemTempl->getTemplatedDecl(), Scope, MLTAL); + } + } + + else if (FD->getTemplatedKind() == FunctionDecl::TK_MemberSpecialization || + FD->getTemplatedKind() == FunctionDecl::TK_DependentNonTemplate) { + FunctionDecl *InstantiatedFrom = + FD->getTemplatedKind() == FunctionDecl::TK_MemberSpecialization + ? FD->getInstantiatedFromMemberFunction() + : FD->getInstantiatedFromDecl(); + SemasRef.addInstantiatedCapturesToScope(FD, InstantiatedFrom, Scope, MLTAL); + } + + SemasRef.RebuildLambdaScopeInfo(cast(FD)); +} diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index f78d46f59503..332004055b58 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2426,6 +2426,9 @@ Decl *TemplateDeclInstantiator::VisitCXXMethodDecl( cast(Owner)->isDefinedOutsideFunctionOrMethod()); LocalInstantiationScope Scope(SemaRef, MergeWithParentScope); + Sema::LambdaScopeForCallOperatorInstantiationRAII LambdaScope( + SemaRef, const_cast(D), TemplateArgs, Scope); + // Instantiate enclosing template arguments for friends. SmallVector TempParamLists; unsigned NumTempParamLists = 0; diff --git a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h index 097e81ea7d45..b51741d5e8b2 100644 --- a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h +++ b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h @@ -12285,7 +12285,16 @@ TreeTransform::TransformCXXNullPtrLiteralExpr( template ExprResult TreeTransform::TransformCXXThisExpr(CXXThisExpr *E) { - QualType T = getSema().getCurrentThisType(); + + // In lambdas, the qualifiers of the type depends of where in + // the call operator `this` appear, and we do not have a good way to + // rebuild this information, so we transform the type. + // + // In other contexts, the type of `this` may be overrided + // for type deduction, so we need to recompute it. + QualType T = getSema().getCurLambda() ? + getDerived().TransformType(E->getType()) + : getSema().getCurrentThisType(); if (!getDerived().AlwaysRebuild() && T == E->getType()) { // Mark it referenced in the new context regardless. From nobody Sun Jan 7 17:50:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7PqZ3sdVz55XNd; Sun, 7 Jan 2024 17:50: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 4T7PqZ14QXz4MKy; Sun, 7 Jan 2024 17:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g8nTvtFmumGX6GFEfi8uCoeggsWqIFEw4fX8oMN325A=; b=qGNroousd4ThkCBoge4PwpRPdqGe8yRWUwJrj3P1pWeLPI02SHkGyAlDO+lE8QZ72vjcG+ 1PYKJQDEFDyruu0Op2BjIE1tbzJZFIQiuC/HkrlgQYqVHm9GRv7r2exoJQN0u0/dx0CuT8 wBOaeZZVogpM9mz7k92wcfv7vN+JLQtsHskWPBnwao598x6G1rlwe1OD+K6Od3bMCqKo9M m9Y2UVlUGUQV+VwdkRXFJ0tsHb8tQqZyLwOQkEHFzCmQPVitv0E2QtFb1cA4bk41wXlKJu /v5cQMZA287iT+pZd8lBg2YPhigRqL7Ie8sJfprzl4EsQzSldTF02RLJaOZ99w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g8nTvtFmumGX6GFEfi8uCoeggsWqIFEw4fX8oMN325A=; b=X4OWmVdgrzQN3vXfosmNQ3QXSE/AXvRhVQ2jtYNRZarvR8921yxn7vbga7AoaTTIA/B6jw qaxfx/fpQdzzGBDMeYUi8SQ9ScIt3JP5DqH8siTs2KWjZ1ADrIq5wN8qrICsreD7guZ1WC F6OgN+pWBZqWWzZPY28XsfHZEmQsDZge3nlY5ha+a2SHfhEd1XMQqF394/P3LF9BtUIFSB bu3OGKRbVVUXoC+QNPuepHC9YIQaAiqW9v7F7OXNf16EJtZ39WbL2h3ZIEdtaPQVF1Tf5c ucgrjuCXai1ESuYHhkqwhZSWVyDG7quHCA2GRcBaSRazLCemKUJYACX/Wpvzyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649834; a=rsa-sha256; cv=none; b=iTu8XsDh/yDxUePHMXCGOCZZ6O7PnhinaeqRGRmeGduE6djGvVunnNKSb3cRRr8hhp2QOR NNEJ5ZZwgFf29YbXfhclkhfzpZVrphfBcNeHpTT3yoSOjgYVZ83BE4BPUDbTB/FCoDbHf3 8uyW+N6BhapSHjIkQzlxXCk4BXwfiKx1mZYWOFUd//g/dIfHbFb/A+pVTDxYv0QsvSiIw3 py7y1EjmxdQzhrdd0no8qPqqny2J5vEDAEFnSZ2LCasz1tq/kiP/IoiiUQ+X5WEXlenXrA 5gz88vXlNkmOVsPTm+/2TtSLf2CQhtS8zPpPIUzN26sP7QP5WbWJcF42LpRyPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqY60JWzYyy; Sun, 7 Jan 2024 17:50: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 407HoXv8022267; Sun, 7 Jan 2024 17:50:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoXEP022264; Sun, 7 Jan 2024 17:50:33 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:33 GMT Message-Id: <202401071750.407HoXEP022264@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4883ad3ada84 - stable/14 - Add missing sources to libclang_rt Makefiles, clean up unneeded ones List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4883ad3ada84d4fee7372ac30b80eb1dfeca0d80 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4883ad3ada84d4fee7372ac30b80eb1dfeca0d80 commit 4883ad3ada84d4fee7372ac30b80eb1dfeca0d80 Author: Dimitry Andric AuthorDate: 2023-12-20 16:08:26 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:19 +0000 Add missing sources to libclang_rt Makefiles, clean up unneeded ones During the llvm-17 merge, a few new source files were not added to the libclang_rt Makefiles, in particular sanitizer_thread_arg_retval.cpp which is now required for AddressSanitizer and MemorySanitizer. Also, MemorySanitizer now requires msan_dl.cpp. While here, clean out a number of source files that compile into nothing (because they only contain non-FreeBSD parts). Also, remove a duplicated instance of tsan_new_delete.cpp from libclang_rt.tsan, since it is only supposed to live in libclang_rt.tsan_cxx. PR: 275854 Reported by: jbeich MFC after: 1 month (cherry picked from commit 0c3af23961e170538f375c392b043903c1397780) --- lib/libclang_rt/asan/Makefile | 3 +-- lib/libclang_rt/asan_dynamic/Makefile | 3 +-- lib/libclang_rt/cfi/Makefile | 2 +- lib/libclang_rt/cfi_diag/Makefile | 2 +- lib/libclang_rt/dd/Makefile | 2 +- lib/libclang_rt/msan/Makefile | 3 ++- lib/libclang_rt/safestack/Makefile | 1 - lib/libclang_rt/stats/Makefile | 1 + lib/libclang_rt/tsan/Makefile | 3 --- lib/libclang_rt/ubsan_standalone/Makefile | 2 +- lib/libclang_rt/xray/Makefile | 1 + 11 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/libclang_rt/asan/Makefile b/lib/libclang_rt/asan/Makefile index 02b5471afc91..6156371241da 100644 --- a/lib/libclang_rt/asan/Makefile +++ b/lib/libclang_rt/asan/Makefile @@ -19,7 +19,6 @@ SRCS+= asan/asan_memory_profile.cpp SRCS+= asan/asan_poisoning.cpp SRCS+= asan/asan_posix.cpp SRCS+= asan/asan_preinit.cpp -SRCS+= asan/asan_premap_shadow.cpp SRCS+= asan/asan_report.cpp SRCS+= asan/asan_rtl.cpp SRCS+= asan/asan_shadow_setup.cpp @@ -28,7 +27,6 @@ SRCS+= asan/asan_stats.cpp SRCS+= asan/asan_suppressions.cpp SRCS+= asan/asan_thread.cpp SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -66,6 +64,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/asan_dynamic/Makefile b/lib/libclang_rt/asan_dynamic/Makefile index 81b68d883ecc..1ba9840946b6 100644 --- a/lib/libclang_rt/asan_dynamic/Makefile +++ b/lib/libclang_rt/asan_dynamic/Makefile @@ -22,7 +22,6 @@ SRCS+= asan/asan_memory_profile.cpp SRCS+= asan/asan_poisoning.cpp SRCS+= asan/asan_posix.cpp SRCS+= asan/asan_preinit.cpp -SRCS+= asan/asan_premap_shadow.cpp SRCS+= asan/asan_report.cpp SRCS+= asan/asan_rtl.cpp SRCS+= asan/asan_shadow_setup.cpp @@ -31,7 +30,6 @@ SRCS+= asan/asan_stats.cpp SRCS+= asan/asan_suppressions.cpp SRCS+= asan/asan_thread.cpp SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -69,6 +67,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/cfi/Makefile b/lib/libclang_rt/cfi/Makefile index 85db642fdab8..604c3cd9a593 100644 --- a/lib/libclang_rt/cfi/Makefile +++ b/lib/libclang_rt/cfi/Makefile @@ -5,7 +5,6 @@ LIB= clang_rt.cfi-${CRTARCH} SRCS+= cfi/cfi.cpp SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp SRCS+= sanitizer_common/sanitizer_common.cpp @@ -29,6 +28,7 @@ SRCS+= sanitizer_common/sanitizer_procmaps_bsd.cpp SRCS+= sanitizer_common/sanitizer_procmaps_common.cpp SRCS+= sanitizer_common/sanitizer_suppressions.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/cfi_diag/Makefile b/lib/libclang_rt/cfi_diag/Makefile index b2a0b5b7a38f..4f4bb9472bb7 100644 --- a/lib/libclang_rt/cfi_diag/Makefile +++ b/lib/libclang_rt/cfi_diag/Makefile @@ -5,7 +5,6 @@ LIB= clang_rt.cfi_diag-${CRTARCH} SRCS+= cfi/cfi.cpp SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -43,6 +42,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/dd/Makefile b/lib/libclang_rt/dd/Makefile index 80ae9037cfe6..80ed7e497797 100644 --- a/lib/libclang_rt/dd/Makefile +++ b/lib/libclang_rt/dd/Makefile @@ -4,7 +4,6 @@ LIB= clang_rt.dd-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp SRCS+= sanitizer_common/sanitizer_common.cpp @@ -28,6 +27,7 @@ SRCS+= sanitizer_common/sanitizer_procmaps_bsd.cpp SRCS+= sanitizer_common/sanitizer_procmaps_common.cpp SRCS+= sanitizer_common/sanitizer_suppressions.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/msan/Makefile b/lib/libclang_rt/msan/Makefile index 2771ac578bc3..474b08a640a7 100644 --- a/lib/libclang_rt/msan/Makefile +++ b/lib/libclang_rt/msan/Makefile @@ -4,10 +4,10 @@ LIB= clang_rt.msan-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= msan/msan.cpp SRCS+= msan/msan_allocator.cpp SRCS+= msan/msan_chained_origin_depot.cpp +SRCS+= msan/msan_dl.cpp SRCS+= msan/msan_interceptors.cpp SRCS+= msan/msan_linux.cpp SRCS+= msan/msan_poisoning.cpp @@ -50,6 +50,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/safestack/Makefile b/lib/libclang_rt/safestack/Makefile index 75246a1295c6..bbf4a665c37f 100644 --- a/lib/libclang_rt/safestack/Makefile +++ b/lib/libclang_rt/safestack/Makefile @@ -4,7 +4,6 @@ LIB= clang_rt.safestack-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= safestack/safestack.cpp .include diff --git a/lib/libclang_rt/stats/Makefile b/lib/libclang_rt/stats/Makefile index b2ba12ce0b6d..2fd929575123 100644 --- a/lib/libclang_rt/stats/Makefile +++ b/lib/libclang_rt/stats/Makefile @@ -38,6 +38,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/tsan/Makefile b/lib/libclang_rt/tsan/Makefile index d97d6592cfb6..f3f5bd41668c 100644 --- a/lib/libclang_rt/tsan/Makefile +++ b/lib/libclang_rt/tsan/Makefile @@ -4,7 +4,6 @@ LIB= clang_rt.tsan-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -30,7 +29,6 @@ SRCS+= sanitizer_common/sanitizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_printf.cpp SRCS+= sanitizer_common/sanitizer_procmaps_bsd.cpp SRCS+= sanitizer_common/sanitizer_procmaps_common.cpp -SRCS+= sanitizer_common/sanitizer_range.cpp SRCS+= sanitizer_common/sanitizer_stack_store.cpp SRCS+= sanitizer_common/sanitizer_stackdepot.cpp SRCS+= sanitizer_common/sanitizer_stacktrace.cpp @@ -62,7 +60,6 @@ SRCS+= tsan/rtl/tsan_interface_java.cpp SRCS+= tsan/rtl/tsan_md5.cpp SRCS+= tsan/rtl/tsan_mman.cpp SRCS+= tsan/rtl/tsan_mutexset.cpp -SRCS+= tsan/rtl/tsan_new_delete.cpp SRCS+= tsan/rtl/tsan_platform_linux.cpp SRCS+= tsan/rtl/tsan_platform_posix.cpp SRCS+= tsan/rtl/tsan_preinit.cpp diff --git a/lib/libclang_rt/ubsan_standalone/Makefile b/lib/libclang_rt/ubsan_standalone/Makefile index 584a32ca3d45..95d1c0405e2d 100644 --- a/lib/libclang_rt/ubsan_standalone/Makefile +++ b/lib/libclang_rt/ubsan_standalone/Makefile @@ -4,7 +4,6 @@ LIB= clang_rt.ubsan_standalone-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -42,6 +41,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/xray/Makefile b/lib/libclang_rt/xray/Makefile index fabaabca9646..91abbb743667 100644 --- a/lib/libclang_rt/xray/Makefile +++ b/lib/libclang_rt/xray/Makefile @@ -28,6 +28,7 @@ SRCS+= sanitizer_common/sanitizer_procmaps_bsd.cpp SRCS+= sanitizer_common/sanitizer_procmaps_common.cpp SRCS+= sanitizer_common/sanitizer_suppressions.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp From nobody Sun Jan 7 17:50:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Pqb2YCgz55XQG; Sun, 7 Jan 2024 17:50: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 4T7Pqb0MsCz4MYt; Sun, 7 Jan 2024 17:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OL8H7Ioygrv+KwleDOfcm5j3AJutx342O6ooVg5ZmqQ=; b=xd+GdIr+Z1tKcxhGWje6Iv8/Ix6WtXn/EJgAs8Esm48QR2+0KwLHjR6yL+/iIO8SmohykH vdUXBmvVCrvaHp2DSwOkalzCm/BquW1c9aLHkbbE6Ddx8BRbZ/i5NudMUJw9td385CX1Yq XvUMl1a6LQk/lgaqgykyRkFS3cxTrq9ZXe9x4+xusH+HGVHwE9fTMg8xhiOoYQduSU4L+Z 2nYKvK0L1f99sOGDvSDYbTAFb7tIGZLBkz5h0xbRYERjmqFxgOZWOrYpWw51AcdC4fbIvu EOz9JtKe3+BFVucUWMAtLNRX4yfMFo1JtuZbqGtsRk9Phb+rS9tLuj98eFVfQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OL8H7Ioygrv+KwleDOfcm5j3AJutx342O6ooVg5ZmqQ=; b=El1LAn21ykDk12QsAJpvWg35xIdJDU334zt2nNnygdfF8z/L1ukRdYxDs0/bxr6nTYLIJA jv60HaggL2iwsJgLByxqiYGO9E4cnJnDpogzYUP9p8HExNmsPNFVYb+MkYcT4vBbo4tNTO Usijc8X6WS7LvbAiHkgectTjxO+tvrvy18ZrhsFc7ffQDZgZZNag1QWRa68Z1F2+b7LRWg x9sPjtKH33BKqK2AihBcwi5MHf9ENitVFPKzO0Vx18W2H63sh8u6JpS4qSrDWQWpKLXzgW Ka1rU+t5lFFhs5fHnVAfuZEadgE/TlLnSzGIm8Le7Bbo4LolFXdy5/tja8o/1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649835; a=rsa-sha256; cv=none; b=J25cl8McGBfsKISsk1PNHSglSxKS5xAXrnGobP6puqJbWWFkWzsC7eArI215W3Wbg6wNy0 YJgExvoVz3zNjDKq+uhtOYnY45Mg8aNTWSaoJWRepjgBuMFza9MJ44b7FVUXZp5ly6loNc +o39c9YNcLtpuUnhSZAQPhgWm6AuN3CaHqr/LO25TUKAGb86swknD5fX7pvku1CYMKP2E/ q4oe4yhtzFBTLg5+4pbO+Yhm5p1JrWDZ3KXefBpXgfl/WeNoC4AKwhXQCXaiUWeGAzCpTq Ye3XyzfhQOCfsSO+L6h7Sz/sPUQtZMhnlqIqMPDJHK4Or1Oik0DieNMHJjoRhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7PqZ6T44zZVF; Sun, 7 Jan 2024 17:50: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 407HoYBB022308; Sun, 7 Jan 2024 17:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoY0p022305; Sun, 7 Jan 2024 17:50:34 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:34 GMT Message-Id: <202401071750.407HoY0p022305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a861b58439f1 - stable/14 - Add missing /usr/include/c++/v1/__mdspan/mdspan.h header List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a861b58439f1168b7bc8e44472559decb897b0e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a861b58439f1168b7bc8e44472559decb897b0e2 commit a861b58439f1168b7bc8e44472559decb897b0e2 Author: Dimitry Andric AuthorDate: 2023-12-20 19:13:47 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:19 +0000 Add missing /usr/include/c++/v1/__mdspan/mdspan.h header I missed this header while updating the Makefile for libc++ 17. PR: 273753 MFC after: 1 month (cherry picked from commit 87eea35e3f8bc559a5142d613826100b758c08fe) --- lib/libc++/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index b311b166c12f..937d73434b0f 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -867,6 +867,7 @@ MDS_HEADERS+= default_accessor.h MDS_HEADERS+= extents.h MDS_HEADERS+= layout_left.h MDS_HEADERS+= layout_right.h +MDS_HEADERS+= mdspan.h .for hdr in ${MDS_HEADERS} MDS+= ${HDRDIR}/__mdspan/${hdr} .endfor From nobody Sun Jan 7 17:50:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Pqc3tz9z55XWj; Sun, 7 Jan 2024 17:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Pqc1WpRz4MNR; Sun, 7 Jan 2024 17:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJAhRGdGQsiPc4GA+OouO97AjgQ/oq/oUQ1zlejK/hA=; b=ttrjW9BPBRG0fev0e0r1ADwrFhbH1BAHdaZl32O2/ukBkmGNB6rAHatHRAphdzre7F5lH/ 04Ogt6pnWhhkAHWqxSvdLcuDxCQvMbC6QiE0iNXH6nqDMj9z1RWgSBcK0jvk1OanYTo9bW zyCjZchHkc4+kos2YBUkkEuDyhxlSYZ7VwWVfwkskjV4TOt0frxfZGkIp3Te0oADnjMwKE XYzLO3Pbln/dXyq7K115eNGgWJI2PA4CoaSbd9P+Pud+PxAJ0JvWE0jq1UehbKRiTcOfRW LvIzKj1enyfnvlMdbVEEt57R7L5Q+czSIBCtySaBVNo1O0gEHkO++qGStsmvRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJAhRGdGQsiPc4GA+OouO97AjgQ/oq/oUQ1zlejK/hA=; b=IzKoNIeYPuGRT+x5VLsxx3rsR+C3jI+brYY8FDOFbf6DnTku5Ix3YxrPi8EXsevWdM7O15 UJe/q4mhFa0UnhVsllrP3aS+CwhegRb0pt1IJII3+umvASpORMZmEww503fMGtcsm3B340 SKKPcoceSiAaccNqHDfjMbwIxAPnVWn8n8NBhZqAiENFyOIEGUjm39/6TPxrrm+5QWzdmr Oi39AfzVbhellFPcapqsgvyIEsKWKOTtsIUcl2tRL/gNEjIcuEueO64EGMRcRzrf14cLci QRDsTHtuseI9OCNxagZxp0RxzyCKU+KBPBfQkgLWbkDU4i0T+toD+FBK9Poywg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649836; a=rsa-sha256; cv=none; b=o0N8RIx9E+5Ag1ImN3P3SvyhvSycPKAO4DtVC17oc3yk/7eyZLDEKwyTclMzJMjP5Ze38I iXyJFXJizVmocTCP8eE75686LnVtQTvS5TBVcedxtuCPhHCNFL3JmG5ry3yRbuBFWTGcLy tAJkE7cmGvuJuqrewC8v63pPmC7sMmlDRRh6fJS370Z0hNEow8U18B/NcFOUWxbvJzh/Cq FLsTxoea+k/weaDzYYmZtm6893BGnguOPt2NgVB/wMWzfaGvvPb9tGTNvwtznEOYVuoyYw aaTr+MKyZRHsss8c+MjdqMmf/6hYpMdgNUvgIyXyuxL4xdTRmLh5NMKcMnF3Fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Pqc0ZhJzZGZ; Sun, 7 Jan 2024 17:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407HoZ2V022374; Sun, 7 Jan 2024 17:50:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HoZ5d022371; Sun, 7 Jan 2024 17:50:35 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:35 GMT Message-Id: <202401071750.407HoZ5d022371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 0c8ebcda1b6d - stable/14 - llvm: Support: don't block signals around close if it can be avoided List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c8ebcda1b6d5ae1c65f11f8e70494008205dee8 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0c8ebcda1b6d5ae1c65f11f8e70494008205dee8 commit 0c8ebcda1b6d5ae1c65f11f8e70494008205dee8 Author: Mateusz Guzik AuthorDate: 2023-12-29 18:51:56 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:19 +0000 llvm: Support: don't block signals around close if it can be avoided Signal blocking originally showed up in 51c2afc4b65b2782 ("Support: Don't call close again if we get EINTR"), but it was overzealous -- there are systems where the error is known to be fine. This commit elides signal blocking for said systems (the list is incomplete though). Note close() can still fail for other reasons (like ENOSPC), in which case an error will be returned while the fd slot is cleared up. Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D42984 (cherry picked from commit 3358108a38f0efc7e7a143aeda80c941946fef77) --- .../llvm-project/llvm/lib/Support/Unix/Process.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc b/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc index 2babf07944bf..c8b15cb759df 100644 --- a/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc +++ b/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc @@ -235,6 +235,25 @@ std::error_code Process::FixupStandardFileDescriptors() { return std::error_code(); } +// Close a file descriptor while being mindful of EINTR. +// +// On Unix systems closing a file descriptor usually starts with removing it +// from the fd table (or an equivalent structure). This means any error +// generated past that point will still result in the entry being cleared. +// +// Make sure to not bubble up EINTR as there is nothing to do in that case. +// XXX what about other errors? +#if defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__NetBSD__) || defined(__OpenBSD__) +std::error_code Process::SafelyCloseFileDescriptor(int FD) { + int EC = 0; + if (::close(FD) < 0) { + if (errno != EINTR) + EC = errno; + } + return std::error_code(EC, std::generic_category()); +} +#else std::error_code Process::SafelyCloseFileDescriptor(int FD) { // Create a signal set filled with *all* signals. sigset_t FullSet, SavedSet; @@ -269,6 +288,7 @@ std::error_code Process::SafelyCloseFileDescriptor(int FD) { return std::error_code(ErrnoFromClose, std::generic_category()); return std::error_code(EC, std::generic_category()); } +#endif bool Process::StandardInIsUserInput() { return FileDescriptorIsDisplayed(STDIN_FILENO); From nobody Sun Jan 7 17:50:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Pqd4wLVz55XQL; Sun, 7 Jan 2024 17:50: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 4T7Pqd2KzNz4MZD; Sun, 7 Jan 2024 17:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M8CDG7jLwlAyPaVKL8FNwJ+IAZ7m9iNVT7Xr5trFsP0=; b=maBBGH9E8HxLgYUjRZ73s4IDivtjeFiAcgV1d12vqRe8SEzcqx2GUSL3G7R3UbAc86XBY/ 2Yd13Ua5YU2Y1DE0OhYkL+VBZM3jJr4hmUl7bB1WOOcFgyOe4deNwUuFlvZlNYxYgaVb7U A3Vb4alAbbYf2InWLuopyGcQfmbPrAbSStJGsm2xhuo2sQosWown0133RxVEtfTuyng9Ld MTl+tyXz5y+AMbdAb6I7c+zUZqfKVcZLY3uhatm9mjZmdCxwjnHnSbculuLZ3aFQY3W9CO C2Fgzm28P0Hn8UMIDlxXk90jln/ji6B8i2RJ+SLMZBsCBzp8KAoJaIKaBSURvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704649837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M8CDG7jLwlAyPaVKL8FNwJ+IAZ7m9iNVT7Xr5trFsP0=; b=yClVFuMyskK0+cwkV24R947UsTD83iZ3zZm/hwQVKWKhoiWEM0E2SSoBFxi8gKtxtL5waM G4KCyufaqJ8jsSGjeHSI/mrQ+5dL2SBr++259SncN8L3CtsdNtLt/PMlmAkBi+gPU1+XT4 zmf7SHU34MupAT+sbzE6Iknfcl+Url5CiiAsjQVFvtHHz+S65mKSe15IiAaArpPLPjbdt6 Yk9hhsyiN/KC5oTRpgUird5qm9BUMLtj+wOqiLAQ21AFKYZuVwDMA4XTVugQ6YXJNGy4iG md+RRE3aBOfhoCiEqTLE2hMShrn8zjHzPI3KUyBXQDxoJi3GTlIuCVZZL8fE8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704649837; a=rsa-sha256; cv=none; b=qh+kow3qlxXvcrYFIulfnwJomZH31EiY3CTLsirx3EtOEMjJ16YWhBqBfVnaBYszLv+48u X/CV6lmn1WPKTBvG6h5B222SSkjV2QZXY94lnd9hDGwGwB6B+impSfIOOZP3VkfdPRELXe f0zryCbOcCGdzuIMO5wqppMPcSjpSAt6IwZ1QulQOQojdDc4rwMIH0lVDtWShGqLgQeDsq tiziQzx4JqPs+yaXswCpK4EFQkXjZ4SMCvMgQ6+NSEIJtphCYOzIQM4RbSEFBRPYNCOKV6 QI27VDRIgbaXdhNryXzNCPAqBhxCkbQZvTDns5OtKijZFDqXvbl8WtjHO7Aj1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Pqd1Rm2zZDG; Sun, 7 Jan 2024 17:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407HobV5022419; Sun, 7 Jan 2024 17:50:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407HobbW022416; Sun, 7 Jan 2024 17:50:37 GMT (envelope-from git) Date: Sun, 7 Jan 2024 17:50:37 GMT Message-Id: <202401071750.407HobbW022416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 68584c97ecfb - stable/14 - Bump __FreeBSD_version for llvm 17.0.6 merge List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 68584c97ecfb3046de7fb1b16c2caa785392237c Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=68584c97ecfb3046de7fb1b16c2caa785392237c commit 68584c97ecfb3046de7fb1b16c2caa785392237c Author: Dimitry Andric AuthorDate: 2023-12-08 17:36:40 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 17:46:20 +0000 Bump __FreeBSD_version for llvm 17.0.6 merge PR: 273753 MFC after: 1 month (cherry picked from commit c711af7727824da79d87f375f3d6829feec3799a) --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 7ceae8fa8365..fc684f525aaf 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -75,7 +75,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400503 +#define __FreeBSD_version 1400504 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Sun Jan 7 19:31:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7S3w47h1z55lvK; Sun, 7 Jan 2024 19:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7S3w3MC1z4hlt; Sun, 7 Jan 2024 19:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704655884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FEUeScETgBuZTyTgjcElY8QgaKc8nxDZvl+anOusYYc=; b=bKOPlyJNfOcL7PcqX2T9OpDKVrsOpUqODutPPSNbY77+cfPm4F8Mi8dtnt2ZcOLr9PZqPp 34pfQ9Ay8yneu4wxKZy7MVLK/B4PEJDVcExNF3A0QBC6fmMC7CG5+J2SFd84GyExVZl10g 7PHdcFeR3BqvkGL04beRa72NhJDXbHSuVzyJVCpeJergWvcmGacM035mgVGJ/xWdkUJAt/ 56O5VSqx++EhVJZQRT02JdBKAvEmtXPPgP7bwCyW0k9aTxtgb9iFhytYMn8M4DEbppLG9t cB7pqEWDH6cHkY50mW6Zu6IBEY9edFmPf9x4oY+X6rocJzcUuft53RZV4flQfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704655884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FEUeScETgBuZTyTgjcElY8QgaKc8nxDZvl+anOusYYc=; b=dGpesHv3wnhVhAo6K2qwakpa65dMxefYeMefSy87VO3iIU1RaagkxRTRPMdmt0SABC4rlz aMnDs9hQvZOJ+FT6yDbnmzvDPyNQaK5laME/GV5Wigk1hzxoQHxdPFykK2nbhrYKOmHz/M Ab+/2pARwpptEcCXzPq34r+wWk612NzMYOQV+eh5TScZq/wx9fvFxe8HG0bOdyyv4fJup1 TWhqLm5l+bkslKO8wufaLsFwZCYg5yo2bYH2VDQx32qBPCm82TDYbvigmgQPTjJwZnZ5Qc kF//k3gVge2kJtX0r24C0YDvggqZTXTgP1oUzM6dLfBbmYF+tTPjrYcPZSy5VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704655884; a=rsa-sha256; cv=none; b=mMh6q4ULwAedMowDZ5F22bduJoUf/YcW89XbgjT1L4rSxbg2eaOH4dR/yXJaghdtqeigLw e0xLQeSb3H1wvfKdZ2VKtDhat4prrQp6c4EpebBuq6FNLQpeJHKI6p4lHqcdV6FtK0Wy7g CLiw/CUmqsBXT1m7b3EWFE19xUxUpKvAeewlLYm7Eg4Pvxx8tvAxA1gbgXxd452ZV2OdHM fgp9+VDpWd6rxe4JEoORmBnXapcuxg7BPea/b+AwbUq1/MmTDjIm5iehdj0SCjwCZijsl1 hOY7g309Qz18FUqi2al1t8NgPgf3M+O2pNVP55HaFyk8REkA08iLiXyAo0wLRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7S3w2PPgzcqx; Sun, 7 Jan 2024 19:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407JVOsl093809; Sun, 7 Jan 2024 19:31:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407JVOlw093806; Sun, 7 Jan 2024 19:31:24 GMT (envelope-from git) Date: Sun, 7 Jan 2024 19:31:24 GMT Message-Id: <202401071931.407JVOlw093806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 66be60537568 - stable/14 - bsdinstall: rename "Live CD" to "Live System" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 66be60537568cb47df7beef8bb190f3d04461224 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=66be60537568cb47df7beef8bb190f3d04461224 commit 66be60537568cb47df7beef8bb190f3d04461224 Author: Pierre Pronchery AuthorDate: 2023-12-29 18:23:48 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:31:10 +0000 bsdinstall: rename "Live CD" to "Live System" This uses more generic wording in the FreeBSD installer, when offering the user to use the system booted without running the installer. The updated wording is also reflected in freebsd-version(1). Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D43233 (cherry picked from commit 19bb1886be4f366e922f0be359874683a243624a) --- bin/freebsd-version/freebsd-version.1 | 2 +- usr.sbin/bsdinstall/startbsdinstall | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/freebsd-version/freebsd-version.1 b/bin/freebsd-version/freebsd-version.1 index b9f0861f890a..82ea9c707d69 100644 --- a/bin/freebsd-version/freebsd-version.1 +++ b/bin/freebsd-version/freebsd-version.1 @@ -111,7 +111,7 @@ To determine the version of the currently running userland: /bin/freebsd-version -u .Ed .Pp -To inspect a system being repaired using a live CD: +To inspect a system being repaired using a live system: .Bd -literal -offset indent mount -rt ufs /dev/ada0p2 /mnt env ROOT=/mnt /mnt/bin/freebsd-version -ku diff --git a/usr.sbin/bsdinstall/startbsdinstall b/usr.sbin/bsdinstall/startbsdinstall index af0fd56e73b3..63239c969ac6 100644 --- a/usr.sbin/bsdinstall/startbsdinstall +++ b/usr.sbin/bsdinstall/startbsdinstall @@ -57,7 +57,7 @@ if [ -f /etc/installerconfig ]; then exit fi -bsddialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live CD?" 0 0 +bsddialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live System" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live system?" 0 0 case $? in $BSDDIALOG_OK) # Install @@ -70,7 +70,7 @@ $BSDDIALOG_OK) # Install trap true SIGINT # Ignore cntrl-C here bsdinstall if [ $? -eq 0 ]; then - bsddialog --backtitle "FreeBSD Installer" --title "Complete" --ok-label "Reboot" --extra-button --extra-label "Shutdown" --cancel-label "Live CD" --yesno "Installation of FreeBSD complete! Would you like to reboot into the installed system now?" 0 0 + bsddialog --backtitle "FreeBSD Installer" --title "Complete" --ok-label "Reboot" --extra-button --extra-label "Shutdown" --cancel-label "Live System" --yesno "Installation of FreeBSD complete! Would you like to reboot into the installed system now?" 0 0 case $? in $BSDDIALOG_OK) # Reboot @@ -90,7 +90,7 @@ $BSDDIALOG_OK) # Install sleep 1 done ;; - $BSDDIALOG_CANCEL) # Live CD + $BSDDIALOG_CANCEL) # Live System exit 0 ;; esac @@ -98,7 +98,7 @@ $BSDDIALOG_OK) # Install . "$0" fi ;; -$BSDDIALOG_CANCEL) # Live CD +$BSDDIALOG_CANCEL) # Live System exit 0 ;; $BSDDIALOG_EXTRA) # Shell From nobody Sun Jan 7 19:31:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7S3x5rwmz55lpt; Sun, 7 Jan 2024 19:31: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 4T7S3x3xQlz4hQr; Sun, 7 Jan 2024 19:31:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704655885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vnmsj0x2ypOgmLyB9DnCJS5xFZmbo8jPXIRKu8wA6+U=; b=QH+P3lBlbufaMsJZBGigje5PFbxn2vvfv4vaiL+Z97ZVqYvbrimxqKQMC1YtP13xBmlp+R Iw7nvWgVhgs06Ibf4Oea2khNTk4r7L94xw/of1p0kNVpT9KB3mCtPdwnxAr12mdSqJtCV3 2UkPoMZtYdJYiVSOpsaOqvI1a+dcuoWKjplKUYy1iZuwVMcfOuGhwCWzyoeJyNTsJiby1O TdOGJ88+2ebGw1VBlZzzfX/Qzcxjwx9f0FnPx8WCDXAx9cWd0GUiGBHSB99t2m0Dvq9oyS jGZR2oPwz3LHs10eSBcYP+q65/VMTsjEVsW+BwkFoQ70KHnm9QsOKdo31ST1+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704655885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vnmsj0x2ypOgmLyB9DnCJS5xFZmbo8jPXIRKu8wA6+U=; b=udxXQMPzteRhkKCWj8I8FvvcOm+hYeNM9VS7hGCW79wexwNXvK/5rB0JZ87c7qgejz+Dnc lz6/aKGHlHWrFZAtPoCeY6v0yLCE6tbPP/LMgTGFVav4v0ZMm3cfxyMYeA4gkpe6jIfhC2 kQguK/QRVOTKZXRB+79dJRj4POxoa5aqRav7Kb2xVOoYQzWYru2sv5Gi1QK6+TyB+TETbF r7amaplPqJlK5zqwByq78EI+DcgqIsxe7NgGT3YMpxmqoRqpCHl8j3VwoyYsoDV8vtV/nJ WOXl1E+8Rt4gjt2IjIdDczaC9gZQmFhtvcvAxgRbrXieFz4kTGFoawxJU//BhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704655885; a=rsa-sha256; cv=none; b=BJVGR8VGojoZYh/PuoGu788vhHCiDUVKO2k0uC982REH40dm6vgRrnZQua+UDpRpjfRclL PrHZslLcslpjkiQUNvcVj8C5H5Zq7vb3c336yUHu34ICyhGPB4R+v0wt418hqNZ9+lvCwN sddv98pfpwz3gITDfHaqc0Lo4mY77ei2j6Yvn2oU70rcfSBoEigFsqBc/mzspSd56HminO fYbDl4pCqJQPeiV5Li8frnlZFVbDlHzwPOmy3nqfai2ZJgpoDJ0J6f5oVx2/4YLv1zXJO3 OoI1T5d6HmIANkCDpfk/H/hoe0N0aCMu2Oauth81PnOKZx3bXyccNCBvpM+HpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7S3x316wzcsZ; Sun, 7 Jan 2024 19:31: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 407JVPSY095246; Sun, 7 Jan 2024 19:31:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407JVPL4095233; Sun, 7 Jan 2024 19:31:25 GMT (envelope-from git) Date: Sun, 7 Jan 2024 19:31:25 GMT Message-Id: <202401071931.407JVPL4095233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 512c3cfb3cfd - stable/14 - Update ASLR stack sysctl description in security.7 and mitigations.7 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 512c3cfb3cfdc011b4622392d84e0818f7373ed6 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=512c3cfb3cfdc011b4622392d84e0818f7373ed6 commit 512c3cfb3cfdc011b4622392d84e0818f7373ed6 Author: Ed Maste AuthorDate: 2023-10-24 22:06:59 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:31:10 +0000 Update ASLR stack sysctl description in security.7 and mitigations.7 In an earlier implementation the stack (gap) was randomized when the enable sysctl was set and ASLR was also enabled (in general) for the binary. In the current implementation the sysctl operates independently. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42357 (cherry picked from commit d521abdff2367a5c72a773a815fc3d99403274f5) --- share/man/man7/mitigations.7 | 4 ++-- share/man/man7/security.7 | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 index fed16d7b325f..950d84042c71 100644 --- a/share/man/man7/mitigations.7 +++ b/share/man/man7/mitigations.7 @@ -120,7 +120,7 @@ Reserve the legacy .Xr sbrk 2 region for compatibility with older binaries. .It Va kern.elf32.aslr.stack -If ASLR is enabled for a process, also randomize the stack location. +Randomize the stack location for 32-bit ELF binaries. .El .Pp Global controls for 64-bit processes: @@ -135,7 +135,7 @@ Reserve the legacy .Xr sbrk 2 region for compatibility with older binaries. .It Va kern.elf64.aslr.stack -If ASLR is enabled for a process, also randomize the stack location. +Randomize the stack location for 64-bit ELF binaries. .El .Pp To execute a command with ASLR enabled or disabled: diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index a48e3607f0e5..71107b29ba11 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -1065,8 +1065,7 @@ position-independent (PIE) 32-bit binaries. Makes ASLR less aggressive and more compatible with old binaries relying on the sbrk area. .It Dv kern.elf32.aslr.stack -If ASLR is enabled for a binary, a non-zero value enables randomization -of the stack. +Enable randomization of the stack for 32-bit binaries. Otherwise, the stack is mapped at a fixed location determined by the process ABI. .It Dv kern.elf64.aslr.enable From nobody Sun Jan 7 19:31:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7S3y6LSCz55lpv; Sun, 7 Jan 2024 19:31: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 4T7S3y4Py9z4hrC; Sun, 7 Jan 2024 19:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704655886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lAyUOJwpj9WWhHIEjtcNaTDfJhQ0GevjxzaH/WSRl/E=; b=blSp270tTQJ2up85sGdtVvcQ99L7yQbo3FHPFESv0BcO0Ec+v1Tb50o0OQq+NmSU5T4uoE MwEtzr8mgyzYV2IIFr3dzV7Kx2HubOQ/p0Jgihu785tZVH/8hs8szJdEtoxpyVfyJsDAfa Xq67yH23M0e/uBsbrCU0EUIfDE/w9L3R93ST5GZtHrkdaVjLXV9dLd77QCCbniAVR8lcjk gosEsmSY0+QV2p19mUC+D0/aKmjYiE4Z0EOw1RlJAOy/fIm+3s/GWV6TfGHhXNLYY6+ODQ FdexiSiZrapMVR86n4tXp3oxIO8mJgb4LOqza0a/GVE5NJgqkgOoXhjOtiFJkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704655886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lAyUOJwpj9WWhHIEjtcNaTDfJhQ0GevjxzaH/WSRl/E=; b=kaoc63GrigtMtp47q/rj9c3GOp/+ufEYXYZtleSMTOC7/KHAJQQg/0v1EuwObt9BvVqRZ1 uUM4xn/Xs2hx6GwOnwn3ykCYlRc9fs/KDMfyCUQKFtxM9UXQQxPQfWBbrSBGRBLjg1CRiP MaHVcBzN2cWKPqs5v8ZUPep+R7f67ghe5qbBC2Ljkq4nk9xMA50BVAgJUHKVHXOajPAl/Z GE37SskuMI8GRTfHZAbhk0Xuv2XSmqHi/37LNh8iuDjmKjDg0tFNizmc6xmSO/nMm5Z/d3 akZAUrf0mJxidZCRhTSAii51AjgY3ZKTUKLnI1kWCmXSPPQYAUaeIY/RDkLFgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704655886; a=rsa-sha256; cv=none; b=FqbBKKh+gttPahf80+7Rdr01Bwh/N/V0Fh0S6Eo/iWilqrMIHljZ9B4l2LOyiW7GhNR90b ZEW67osZSUbvQ2Ykqyr7FEU7SpiWhp5V2qaKOKnTEwXxnZhbo4QRY3AZBrC86kpChlvb7w 54CF9CiX8FmuoQp0v1801V5ysim4sO5K8dFqZNK1wUS9fFxGd6wE5KtnQF6DSa82hdcjWL YZl3stqUBS0O60Rjn8yTgh0ImVZoYC+HDZ5wK5cf7IFY0zwTBEf4/8wmjIl/teYPF6bqPP vsu0CS3G9sy/kUzLswSdOVvZLx+WfEgk/P12oW9JXXY4XQKYFwr6btn8AqV7Aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7S3y3VvWzcXf; Sun, 7 Jan 2024 19:31: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 407JVQgd096438; Sun, 7 Jan 2024 19:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407JVQ1l096435; Sun, 7 Jan 2024 19:31:26 GMT (envelope-from git) Date: Sun, 7 Jan 2024 19:31:26 GMT Message-Id: <202401071931.407JVQ1l096435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 53a984a36f3c - stable/14 - Track upstream project rename in contrib/blocklistd List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 53a984a36f3c27f3e272ea6a8f5efa49ad0c2685 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=53a984a36f3c27f3e272ea6a8f5efa49ad0c2685 commit 53a984a36f3c27f3e272ea6a8f5efa49ad0c2685 Author: Ed Maste AuthorDate: 2022-10-11 19:27:51 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:31:11 +0000 Track upstream project rename in contrib/blocklistd Upstream is now https://github.com/zoulasc/blocklist/. Rename the contrib directory and update Makefiles to match, in advance of the next vendor branch update. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5f4c09dd85bff675e0ca63c55ea3c517e0fddfcc) --- contrib/{blacklist => blocklist}/Makefile | 0 contrib/{blacklist => blocklist}/Makefile.inc | 0 contrib/{blacklist => blocklist}/README | 0 contrib/{blacklist => blocklist}/TODO | 0 contrib/{blacklist => blocklist}/bin/Makefile | 0 contrib/{blacklist => blocklist}/bin/blacklistctl.8 | 0 contrib/{blacklist => blocklist}/bin/blacklistctl.c | 0 contrib/{blacklist => blocklist}/bin/blacklistd.8 | 0 contrib/{blacklist => blocklist}/bin/blacklistd.c | 0 contrib/{blacklist => blocklist}/bin/blacklistd.conf.5 | 0 contrib/{blacklist => blocklist}/bin/conf.c | 0 contrib/{blacklist => blocklist}/bin/conf.h | 0 contrib/{blacklist => blocklist}/bin/internal.c | 0 contrib/{blacklist => blocklist}/bin/internal.h | 0 contrib/{blacklist => blocklist}/bin/run.c | 0 contrib/{blacklist => blocklist}/bin/run.h | 0 contrib/{blacklist => blocklist}/bin/state.c | 0 contrib/{blacklist => blocklist}/bin/state.h | 0 contrib/{blacklist => blocklist}/bin/support.c | 0 contrib/{blacklist => blocklist}/bin/support.h | 0 contrib/{blacklist => blocklist}/diff/ftpd.diff | 0 contrib/{blacklist => blocklist}/diff/named.diff | 0 contrib/{blacklist => blocklist}/diff/proftpd.diff | 0 contrib/{blacklist => blocklist}/diff/ssh.diff | 0 contrib/{blacklist => blocklist}/etc/Makefile | 0 contrib/{blacklist => blocklist}/etc/blacklistd.conf | 0 contrib/{blacklist => blocklist}/etc/npf.conf | 0 contrib/{blacklist => blocklist}/etc/rc.d/Makefile | 0 contrib/{blacklist => blocklist}/etc/rc.d/blacklistd | 0 contrib/{blacklist => blocklist}/include/Makefile | 0 contrib/{blacklist => blocklist}/include/bl.h | 0 contrib/{blacklist => blocklist}/include/blacklist.h | 0 contrib/{blacklist => blocklist}/lib/Makefile | 0 contrib/{blacklist => blocklist}/lib/bl.c | 0 contrib/{blacklist => blocklist}/lib/blacklist.c | 0 contrib/{blacklist => blocklist}/lib/libblacklist.3 | 0 contrib/{blacklist => blocklist}/lib/shlib_version | 0 contrib/{blacklist => blocklist}/libexec/Makefile | 0 contrib/{blacklist => blocklist}/libexec/blacklistd-helper | 0 contrib/{blacklist => blocklist}/port/Makefile.am | 0 contrib/{blacklist => blocklist}/port/_strtoi.h | 0 contrib/{blacklist => blocklist}/port/clock_gettime.c | 0 contrib/{blacklist => blocklist}/port/config.h | 0 contrib/{blacklist => blocklist}/port/configure.ac | 0 contrib/{blacklist => blocklist}/port/fgetln.c | 0 contrib/{blacklist => blocklist}/port/fparseln.c | 0 contrib/{blacklist => blocklist}/port/getprogname.c | 0 contrib/{blacklist => blocklist}/port/m4/.cvsignore | 0 contrib/{blacklist => blocklist}/port/pidfile.c | 0 contrib/{blacklist => blocklist}/port/popenve.c | 0 contrib/{blacklist => blocklist}/port/port.h | 0 contrib/{blacklist => blocklist}/port/sockaddr_snprintf.c | 0 contrib/{blacklist => blocklist}/port/strlcat.c | 0 contrib/{blacklist => blocklist}/port/strlcpy.c | 0 contrib/{blacklist => blocklist}/port/strtoi.c | 0 contrib/{blacklist => blocklist}/test/Makefile | 0 contrib/{blacklist => blocklist}/test/cltest.c | 0 contrib/{blacklist => blocklist}/test/srvtest.c | 0 lib/libblacklist/Makefile | 6 +++--- libexec/blacklistd-helper/Makefile | 4 ++-- libexec/fingerd/Makefile | 2 +- libexec/ftpd/Makefile | 2 +- secure/usr.sbin/sshd/Makefile | 2 +- usr.sbin/blacklistctl/Makefile | 6 +++--- usr.sbin/blacklistd/Makefile | 6 +++--- 65 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contrib/blacklist/Makefile b/contrib/blocklist/Makefile similarity index 100% rename from contrib/blacklist/Makefile rename to contrib/blocklist/Makefile diff --git a/contrib/blacklist/Makefile.inc b/contrib/blocklist/Makefile.inc similarity index 100% rename from contrib/blacklist/Makefile.inc rename to contrib/blocklist/Makefile.inc diff --git a/contrib/blacklist/README b/contrib/blocklist/README similarity index 100% rename from contrib/blacklist/README rename to contrib/blocklist/README diff --git a/contrib/blacklist/TODO b/contrib/blocklist/TODO similarity index 100% rename from contrib/blacklist/TODO rename to contrib/blocklist/TODO diff --git a/contrib/blacklist/bin/Makefile b/contrib/blocklist/bin/Makefile similarity index 100% rename from contrib/blacklist/bin/Makefile rename to contrib/blocklist/bin/Makefile diff --git a/contrib/blacklist/bin/blacklistctl.8 b/contrib/blocklist/bin/blacklistctl.8 similarity index 100% rename from contrib/blacklist/bin/blacklistctl.8 rename to contrib/blocklist/bin/blacklistctl.8 diff --git a/contrib/blacklist/bin/blacklistctl.c b/contrib/blocklist/bin/blacklistctl.c similarity index 100% rename from contrib/blacklist/bin/blacklistctl.c rename to contrib/blocklist/bin/blacklistctl.c diff --git a/contrib/blacklist/bin/blacklistd.8 b/contrib/blocklist/bin/blacklistd.8 similarity index 100% rename from contrib/blacklist/bin/blacklistd.8 rename to contrib/blocklist/bin/blacklistd.8 diff --git a/contrib/blacklist/bin/blacklistd.c b/contrib/blocklist/bin/blacklistd.c similarity index 100% rename from contrib/blacklist/bin/blacklistd.c rename to contrib/blocklist/bin/blacklistd.c diff --git a/contrib/blacklist/bin/blacklistd.conf.5 b/contrib/blocklist/bin/blacklistd.conf.5 similarity index 100% rename from contrib/blacklist/bin/blacklistd.conf.5 rename to contrib/blocklist/bin/blacklistd.conf.5 diff --git a/contrib/blacklist/bin/conf.c b/contrib/blocklist/bin/conf.c similarity index 100% rename from contrib/blacklist/bin/conf.c rename to contrib/blocklist/bin/conf.c diff --git a/contrib/blacklist/bin/conf.h b/contrib/blocklist/bin/conf.h similarity index 100% rename from contrib/blacklist/bin/conf.h rename to contrib/blocklist/bin/conf.h diff --git a/contrib/blacklist/bin/internal.c b/contrib/blocklist/bin/internal.c similarity index 100% rename from contrib/blacklist/bin/internal.c rename to contrib/blocklist/bin/internal.c diff --git a/contrib/blacklist/bin/internal.h b/contrib/blocklist/bin/internal.h similarity index 100% rename from contrib/blacklist/bin/internal.h rename to contrib/blocklist/bin/internal.h diff --git a/contrib/blacklist/bin/run.c b/contrib/blocklist/bin/run.c similarity index 100% rename from contrib/blacklist/bin/run.c rename to contrib/blocklist/bin/run.c diff --git a/contrib/blacklist/bin/run.h b/contrib/blocklist/bin/run.h similarity index 100% rename from contrib/blacklist/bin/run.h rename to contrib/blocklist/bin/run.h diff --git a/contrib/blacklist/bin/state.c b/contrib/blocklist/bin/state.c similarity index 100% rename from contrib/blacklist/bin/state.c rename to contrib/blocklist/bin/state.c diff --git a/contrib/blacklist/bin/state.h b/contrib/blocklist/bin/state.h similarity index 100% rename from contrib/blacklist/bin/state.h rename to contrib/blocklist/bin/state.h diff --git a/contrib/blacklist/bin/support.c b/contrib/blocklist/bin/support.c similarity index 100% rename from contrib/blacklist/bin/support.c rename to contrib/blocklist/bin/support.c diff --git a/contrib/blacklist/bin/support.h b/contrib/blocklist/bin/support.h similarity index 100% rename from contrib/blacklist/bin/support.h rename to contrib/blocklist/bin/support.h diff --git a/contrib/blacklist/diff/ftpd.diff b/contrib/blocklist/diff/ftpd.diff similarity index 100% rename from contrib/blacklist/diff/ftpd.diff rename to contrib/blocklist/diff/ftpd.diff diff --git a/contrib/blacklist/diff/named.diff b/contrib/blocklist/diff/named.diff similarity index 100% rename from contrib/blacklist/diff/named.diff rename to contrib/blocklist/diff/named.diff diff --git a/contrib/blacklist/diff/proftpd.diff b/contrib/blocklist/diff/proftpd.diff similarity index 100% rename from contrib/blacklist/diff/proftpd.diff rename to contrib/blocklist/diff/proftpd.diff diff --git a/contrib/blacklist/diff/ssh.diff b/contrib/blocklist/diff/ssh.diff similarity index 100% rename from contrib/blacklist/diff/ssh.diff rename to contrib/blocklist/diff/ssh.diff diff --git a/contrib/blacklist/etc/Makefile b/contrib/blocklist/etc/Makefile similarity index 100% rename from contrib/blacklist/etc/Makefile rename to contrib/blocklist/etc/Makefile diff --git a/contrib/blacklist/etc/blacklistd.conf b/contrib/blocklist/etc/blacklistd.conf similarity index 100% rename from contrib/blacklist/etc/blacklistd.conf rename to contrib/blocklist/etc/blacklistd.conf diff --git a/contrib/blacklist/etc/npf.conf b/contrib/blocklist/etc/npf.conf similarity index 100% rename from contrib/blacklist/etc/npf.conf rename to contrib/blocklist/etc/npf.conf diff --git a/contrib/blacklist/etc/rc.d/Makefile b/contrib/blocklist/etc/rc.d/Makefile similarity index 100% rename from contrib/blacklist/etc/rc.d/Makefile rename to contrib/blocklist/etc/rc.d/Makefile diff --git a/contrib/blacklist/etc/rc.d/blacklistd b/contrib/blocklist/etc/rc.d/blacklistd similarity index 100% rename from contrib/blacklist/etc/rc.d/blacklistd rename to contrib/blocklist/etc/rc.d/blacklistd diff --git a/contrib/blacklist/include/Makefile b/contrib/blocklist/include/Makefile similarity index 100% rename from contrib/blacklist/include/Makefile rename to contrib/blocklist/include/Makefile diff --git a/contrib/blacklist/include/bl.h b/contrib/blocklist/include/bl.h similarity index 100% rename from contrib/blacklist/include/bl.h rename to contrib/blocklist/include/bl.h diff --git a/contrib/blacklist/include/blacklist.h b/contrib/blocklist/include/blacklist.h similarity index 100% rename from contrib/blacklist/include/blacklist.h rename to contrib/blocklist/include/blacklist.h diff --git a/contrib/blacklist/lib/Makefile b/contrib/blocklist/lib/Makefile similarity index 100% rename from contrib/blacklist/lib/Makefile rename to contrib/blocklist/lib/Makefile diff --git a/contrib/blacklist/lib/bl.c b/contrib/blocklist/lib/bl.c similarity index 100% rename from contrib/blacklist/lib/bl.c rename to contrib/blocklist/lib/bl.c diff --git a/contrib/blacklist/lib/blacklist.c b/contrib/blocklist/lib/blacklist.c similarity index 100% rename from contrib/blacklist/lib/blacklist.c rename to contrib/blocklist/lib/blacklist.c diff --git a/contrib/blacklist/lib/libblacklist.3 b/contrib/blocklist/lib/libblacklist.3 similarity index 100% rename from contrib/blacklist/lib/libblacklist.3 rename to contrib/blocklist/lib/libblacklist.3 diff --git a/contrib/blacklist/lib/shlib_version b/contrib/blocklist/lib/shlib_version similarity index 100% rename from contrib/blacklist/lib/shlib_version rename to contrib/blocklist/lib/shlib_version diff --git a/contrib/blacklist/libexec/Makefile b/contrib/blocklist/libexec/Makefile similarity index 100% rename from contrib/blacklist/libexec/Makefile rename to contrib/blocklist/libexec/Makefile diff --git a/contrib/blacklist/libexec/blacklistd-helper b/contrib/blocklist/libexec/blacklistd-helper similarity index 100% rename from contrib/blacklist/libexec/blacklistd-helper rename to contrib/blocklist/libexec/blacklistd-helper diff --git a/contrib/blacklist/port/Makefile.am b/contrib/blocklist/port/Makefile.am similarity index 100% rename from contrib/blacklist/port/Makefile.am rename to contrib/blocklist/port/Makefile.am diff --git a/contrib/blacklist/port/_strtoi.h b/contrib/blocklist/port/_strtoi.h similarity index 100% rename from contrib/blacklist/port/_strtoi.h rename to contrib/blocklist/port/_strtoi.h diff --git a/contrib/blacklist/port/clock_gettime.c b/contrib/blocklist/port/clock_gettime.c similarity index 100% rename from contrib/blacklist/port/clock_gettime.c rename to contrib/blocklist/port/clock_gettime.c diff --git a/contrib/blacklist/port/config.h b/contrib/blocklist/port/config.h similarity index 100% rename from contrib/blacklist/port/config.h rename to contrib/blocklist/port/config.h diff --git a/contrib/blacklist/port/configure.ac b/contrib/blocklist/port/configure.ac similarity index 100% rename from contrib/blacklist/port/configure.ac rename to contrib/blocklist/port/configure.ac diff --git a/contrib/blacklist/port/fgetln.c b/contrib/blocklist/port/fgetln.c similarity index 100% rename from contrib/blacklist/port/fgetln.c rename to contrib/blocklist/port/fgetln.c diff --git a/contrib/blacklist/port/fparseln.c b/contrib/blocklist/port/fparseln.c similarity index 100% rename from contrib/blacklist/port/fparseln.c rename to contrib/blocklist/port/fparseln.c diff --git a/contrib/blacklist/port/getprogname.c b/contrib/blocklist/port/getprogname.c similarity index 100% rename from contrib/blacklist/port/getprogname.c rename to contrib/blocklist/port/getprogname.c diff --git a/contrib/blacklist/port/m4/.cvsignore b/contrib/blocklist/port/m4/.cvsignore similarity index 100% rename from contrib/blacklist/port/m4/.cvsignore rename to contrib/blocklist/port/m4/.cvsignore diff --git a/contrib/blacklist/port/pidfile.c b/contrib/blocklist/port/pidfile.c similarity index 100% rename from contrib/blacklist/port/pidfile.c rename to contrib/blocklist/port/pidfile.c diff --git a/contrib/blacklist/port/popenve.c b/contrib/blocklist/port/popenve.c similarity index 100% rename from contrib/blacklist/port/popenve.c rename to contrib/blocklist/port/popenve.c diff --git a/contrib/blacklist/port/port.h b/contrib/blocklist/port/port.h similarity index 100% rename from contrib/blacklist/port/port.h rename to contrib/blocklist/port/port.h diff --git a/contrib/blacklist/port/sockaddr_snprintf.c b/contrib/blocklist/port/sockaddr_snprintf.c similarity index 100% rename from contrib/blacklist/port/sockaddr_snprintf.c rename to contrib/blocklist/port/sockaddr_snprintf.c diff --git a/contrib/blacklist/port/strlcat.c b/contrib/blocklist/port/strlcat.c similarity index 100% rename from contrib/blacklist/port/strlcat.c rename to contrib/blocklist/port/strlcat.c diff --git a/contrib/blacklist/port/strlcpy.c b/contrib/blocklist/port/strlcpy.c similarity index 100% rename from contrib/blacklist/port/strlcpy.c rename to contrib/blocklist/port/strlcpy.c diff --git a/contrib/blacklist/port/strtoi.c b/contrib/blocklist/port/strtoi.c similarity index 100% rename from contrib/blacklist/port/strtoi.c rename to contrib/blocklist/port/strtoi.c diff --git a/contrib/blacklist/test/Makefile b/contrib/blocklist/test/Makefile similarity index 100% rename from contrib/blacklist/test/Makefile rename to contrib/blocklist/test/Makefile diff --git a/contrib/blacklist/test/cltest.c b/contrib/blocklist/test/cltest.c similarity index 100% rename from contrib/blacklist/test/cltest.c rename to contrib/blocklist/test/cltest.c diff --git a/contrib/blacklist/test/srvtest.c b/contrib/blocklist/test/srvtest.c similarity index 100% rename from contrib/blacklist/test/srvtest.c rename to contrib/blocklist/test/srvtest.c diff --git a/lib/libblacklist/Makefile b/lib/libblacklist/Makefile index 932e186e3172..9d85d1eff82c 100644 --- a/lib/libblacklist/Makefile +++ b/lib/libblacklist/Makefile @@ -1,7 +1,7 @@ -BLACKLIST_DIR=${SRCTOP}/contrib/blacklist +BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist -.PATH: ${BLACKLIST_DIR}/lib ${BLACKLIST_DIR}/include +.PATH: ${BLOCKLIST_DIR}/lib ${BLOCKLIST_DIR}/include PACKAGE= blocklist LIB= blacklist @@ -11,7 +11,7 @@ LIBADD+= pthread CFLAGS.clang+=-Wno-thread-safety-analysis -CFLAGS+=-I${BLACKLIST_DIR}/include -I${BLACKLIST_DIR}/port \ +CFLAGS+=-I${BLOCKLIST_DIR}/include -I${BLOCKLIST_DIR}/port \ -D_REENTRANT -DHAVE_CONFIG_H -DHAVE_DB_H -DHAVE_LIBUTIL_H \ -DHAVE_CLOCK_GETTIME -DHAVE_FGETLN -DHAVE_GETPROGNAME \ -DHAVE_STRLCAT -DHAVE_STRLCPY -DHAVE_STRUCT_SOCKADDR_SA_LEN diff --git a/libexec/blacklistd-helper/Makefile b/libexec/blacklistd-helper/Makefile index a22ba37fc764..c0eb25489052 100644 --- a/libexec/blacklistd-helper/Makefile +++ b/libexec/blacklistd-helper/Makefile @@ -1,6 +1,6 @@ -BLACKLIST_DIR=${SRCTOP}/contrib/blacklist +BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist -SCRIPTS= ${BLACKLIST_DIR}/libexec/blacklistd-helper +SCRIPTS= ${BLOCKLIST_DIR}/libexec/blacklistd-helper .include diff --git a/libexec/fingerd/Makefile b/libexec/fingerd/Makefile index f0f797ad02db..c5b780c4e225 100644 --- a/libexec/fingerd/Makefile +++ b/libexec/fingerd/Makefile @@ -10,7 +10,7 @@ WARNS?= 2 WFORMAT=0 .if ${MK_BLACKLIST_SUPPORT} != "no" -CFLAGS+= -DUSE_BLACKLIST -I${SRCTOP}/contrib/blacklist/include +CFLAGS+= -DUSE_BLACKLIST -I${SRCTOP}/contrib/blocklist/include LIBADD+= blacklist LDFLAGS+=-L${LIBBLACKLISTDIR} .endif diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile index aa02c545d81b..f58b675cf8e7 100644 --- a/libexec/ftpd/Makefile +++ b/libexec/ftpd/Makefile @@ -23,7 +23,7 @@ CFLAGS+=-Dmain=ls_main -I${SRCTOP}/bin/ls LIBADD+= m .if ${MK_BLACKLIST_SUPPORT} != "no" -CFLAGS+= -DUSE_BLACKLIST -I${SRCTOP}/contrib/blacklist/include +CFLAGS+= -DUSE_BLACKLIST -I${SRCTOP}/contrib/blocklist/include SRCS+= blacklist.c LIBADD+= blacklist LDFLAGS+=-L${LIBBLACKLISTDIR} diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile index fd9eacebe68d..c15bd773c77a 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -44,7 +44,7 @@ LIBADD+= bsm .endif .if ${MK_BLACKLIST_SUPPORT} != "no" -CFLAGS+= -DUSE_BLACKLIST=1 -I${SRCTOP}/contrib/blacklist/include +CFLAGS+= -DUSE_BLACKLIST=1 -I${SRCTOP}/contrib/blocklist/include SRCS+= blacklist.c LIBADD+= blacklist LDFLAGS+=-L${LIBBLACKLISTDIR} diff --git a/usr.sbin/blacklistctl/Makefile b/usr.sbin/blacklistctl/Makefile index 1e4778bf0953..065c17843cee 100644 --- a/usr.sbin/blacklistctl/Makefile +++ b/usr.sbin/blacklistctl/Makefile @@ -1,6 +1,6 @@ -BLACKLIST_DIR=${SRCTOP}/contrib/blacklist -.PATH: ${BLACKLIST_DIR}/bin ${BLACKLIST_DIR}/port +BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist +.PATH: ${BLOCKLIST_DIR}/bin ${BLOCKLIST_DIR}/port PACKAGE= blocklist @@ -12,7 +12,7 @@ MAN= blacklistctl.8 LDFLAGS+=-L${LIBBLACKLISTDIR} LIBADD+= blacklist util -CFLAGS+=-I${BLACKLIST_DIR}/include -I${BLACKLIST_DIR}/port \ +CFLAGS+=-I${BLOCKLIST_DIR}/include -I${BLOCKLIST_DIR}/port \ -D_PATH_BLCONTROL=\"/usr/libexec/blacklistd-helper\" \ -DHAVE_CONFIG_H -DHAVE_DB_H -DHAVE_LIBUTIL_H \ -DHAVE_CLOCK_GETTIME -DHAVE_FGETLN -DHAVE_FPARSELN \ diff --git a/usr.sbin/blacklistd/Makefile b/usr.sbin/blacklistd/Makefile index b6d1e236911e..92928ca3e60f 100644 --- a/usr.sbin/blacklistd/Makefile +++ b/usr.sbin/blacklistd/Makefile @@ -1,6 +1,6 @@ -BLACKLIST_DIR=${SRCTOP}/contrib/blacklist -.PATH: ${BLACKLIST_DIR}/bin ${BLACKLIST_DIR}/port +BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist +.PATH: ${BLOCKLIST_DIR}/bin ${BLOCKLIST_DIR}/port PACKAGE= blocklist @@ -13,7 +13,7 @@ MAN= blacklistd.8 blacklistd.conf.5 LDFLAGS+=-L${LIBBLACKLISTDIR} LIBADD+= blacklist util -CFLAGS+=-I${BLACKLIST_DIR}/include -I${BLACKLIST_DIR}/port \ +CFLAGS+=-I${BLOCKLIST_DIR}/include -I${BLOCKLIST_DIR}/port \ -D_PATH_BLCONTROL=\"/usr/libexec/blacklistd-helper\" \ -DHAVE_CONFIG_H -DHAVE_DB_H -DHAVE_LIBUTIL_H \ -DHAVE_CLOCK_GETTIME -DHAVE_FGETLN -DHAVE_FPARSELN \ From nobody Sun Jan 7 21:25:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Vby01WSz561yD; Sun, 7 Jan 2024 21:25: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 4T7Vbx6Y71z48ln; Sun, 7 Jan 2024 21:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvD78fOpfpgmefECwHd24VCRXG3zfsbXuBzjGhzELOs=; b=axymvc6wwD2C5Zm8HKs3TULkh2ZIOMQah+Lr3yaorTsty/qjEGgf3bRFqu/e0ANvblpu8I 6Oyxe3aBDhEdzsSLTAuH1wI284eqwSD9Brz7cUeZJnZfLHepk/z3kFp1WBMhGe+v206TvA Lk3ylC/nnk0sqOoTYAEzWFSbq/5mubAVVhkEm4QSEq0m+4bWIPtUbyQoSLPRCySdwLt/pC ViMNu4XzxUok9nDFc9bQIB66qM6M1g/HbOrkpxQZHt0dFZD29BKl95tWka8dFphFYYbI3c hYICj3I25BbuHmkM1JH6q6ij8ADkYzgQO977UY6A6UHJv42IhccnAMV7Oas5+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvD78fOpfpgmefECwHd24VCRXG3zfsbXuBzjGhzELOs=; b=KzpAZIzWBG9L3YAyVbhHM8y9pFxxs4IDe/4BgI99AUEUvbiTcNR8g4mseEOfUmVdpZkO45 nzdUb8cbeqYlpkjLCL305WyQB2loQ5ZoaaV7V8Nfp4YNlNLp0Q358Rnbjx4U0NehjiBaNA pDEfq8AW7lPYlMLDbrUaT1WVpGj+tSj8Zk2BwjSev4z2gpgS2w24Y14ARF4MTvAuKclGdU dIlQBXGa+vcUhY18pjKk2ONKEQMOjXmEq575mZ+GIWtuZICr45snkbjMM1UuL/Cd5vpDom opnPoBIEicoDUzBOJdR/79RprAVEomOBvlO61BgmykyrSvmR09dF39z5TpPowQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704662749; a=rsa-sha256; cv=none; b=uAg7MnbGLh1eUipccXLAuDQgIg82iStKGlji+wDJHsMwRo66tvPPgs/dURhz8uc7QjvfR6 RPq2yZ5cS39r/7MLtYybdJ9DAzdp+r0uIFSTuoLSs5XfhNogOc/CYU8FQHz/N4WHpib9sf PqQne4KutXTs/GIyWNlKniMs9vohqJWSa52CDMzcUBpx7ZfpirorfJLPl8bmUIcvn500qP gYMGMwaVTIIFQKOYX6XV7BvNngLfNAUfM2lfeyHoEa32TL1jmJRhdkWlGj9aGnFwofd4sX SbEOi3XLfWAUM/vvkid69h2IBPyIYHOnmz97RoTUQn9omJQ25iMW9S/bgGaWjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Vbx5bVmzgry; Sun, 7 Jan 2024 21:25: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 407LPnuF083884; Sun, 7 Jan 2024 21:25:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407LPnYF083881; Sun, 7 Jan 2024 21:25:49 GMT (envelope-from git) Date: Sun, 7 Jan 2024 21:25:49 GMT Message-Id: <202401072125.407LPnYF083881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8e76e04d0919 - stable/13 - endian.h: Remove duplicate words List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 8e76e04d0919248421c58247bdf7214f2809e5d0 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8e76e04d0919248421c58247bdf7214f2809e5d0 commit 8e76e04d0919248421c58247bdf7214f2809e5d0 Author: Jose Luis Duran AuthorDate: 2023-12-10 16:35:56 +0000 Commit: Ed Maste CommitDate: 2024-01-07 20:41:47 +0000 endian.h: Remove duplicate words Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/920 (cherry picked from commit dff3a80f6dfe88c52326ceb2c154668f132fdb52) (cherry picked from commit 4e1deb61eab2037ab53cebf7d5dd688626d6f094) --- 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 Jan 7 21:25:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Vbz0vrQz56229; Sun, 7 Jan 2024 21:25:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Vbz0RDwz48lr; Sun, 7 Jan 2024 21:25:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VlVoye/qa0YP7PfMJnrYbIjqWOpWtD8ZFbWGvH5ixH4=; b=dDCFo2yDluvgN/NY93IeoS2SyyAXBSfo7WJ+IM6mjS6d4ru7OOOOlt3nDUCBCZTzZ7zD/S ps2cbkpESSbbXKQMQSW0bFnro97ANodse91u7eH0q8hmeIlM7MIG+bdFTB/ZP44pSJ7vTF 45lWcQ0LbkNBf+Zt107Uo1wycSaIbXJBzwEl8MB8QrBSLXjcpj2oZ5T5A125oUD++Axsk5 3FcNz4pfWqPoQZUb5z77hDhB8yFVpqica588KGFsvOq7LOxZHQmzzK95ZsPuxGcGdM0ofH Ka7L7TMgLRMWf4UE3T14yoSe8BwGS6+94gB76HlmwuA3F/NLAYLZ2bkm/eBtew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VlVoye/qa0YP7PfMJnrYbIjqWOpWtD8ZFbWGvH5ixH4=; b=pthhRZ3tEyNuVAVlQxpmDJSTncH5bWmJvYy4HxZ3jFqzYP+lULyPXH4+bIAC5MHl+e6JJy NYKW5L3yMdQwv5DhIjyavJiheL3aMEOm3JT6KkTN4cAq7mBiwwj+6gvvkQwseZDDk9ww6J 4FXQjs9JGMSJIAxvvK1KEK1EDWbXL8ASL4OX3JX4U/ggo/UOh3MU2iINIowrHL/36NC/ac i54U4hOS9o773ogL4YrpIuOBXWeDnIP5yIeS+Er2xciq40n+jcXzOVu5ywct11kirrtZeD HJzc0Wcgsb9pLkJfAIv10SDxpMOQa7as4qkbKNgMPNHp0ppV2zhqWiOzKuTNMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704662751; a=rsa-sha256; cv=none; b=IHg5f3iC1vOkcGBrA4gCqiyA1LxkBls3mcRycjqEHTxsIjJgFr9QkpZ6Uq6/3vjVWD/VPo +F3iLytvy0RbOEdHguJkJiJqBJirKIinxI89fTt5Z4upJKoDNO74qjd06dzOSiFi3+laVb VGOkp0x7+YlxoYI9vX1FPmAR5SwCMKTBSopsEZaBteURQyzgYnlDH7dL4xRmqOe/zWaTpd kqKnS/AYpSvA67VUGdKNFgou9T+cHz+e899Hw9ZUq52WksqyP5481GJZUJpsxpvWNkUS6w cuA9tPwmQxS55q6LM1eP0ai/mO2SQh7eDxQGPvsM9sLXhtFT6BmakmiQGRpU7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Vby6d5xzgs0; Sun, 7 Jan 2024 21:25: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 407LPo1q083927; Sun, 7 Jan 2024 21:25:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407LPoVA083924; Sun, 7 Jan 2024 21:25:50 GMT (envelope-from git) Date: Sun, 7 Jan 2024 21:25:50 GMT Message-Id: <202401072125.407LPoVA083924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 52aa45621ad6 - stable/13 - capsicum(4): add cross-ref to capsicum_helpers(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 52aa45621ad66ca0af02f4bec468bbf9e751961d Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=52aa45621ad66ca0af02f4bec468bbf9e751961d commit 52aa45621ad66ca0af02f4bec468bbf9e751961d Author: Ed Maste AuthorDate: 2024-01-03 18:31:55 +0000 Commit: Ed Maste CommitDate: 2024-01-07 20:41:48 +0000 capsicum(4): add cross-ref to capsicum_helpers(3) Sponsored by: The FreeBSD Foundation (cherry picked from commit c3786ca8bc5ba471edae059393bb7bac6400ac2a) (cherry picked from commit f326e5af071f3d7108f66e57d35fe8e99f1285e0) --- share/man/man4/capsicum.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/capsicum.4 b/share/man/man4/capsicum.4 index 1ad4548a9784..3c3eab5d798b 100644 --- a/share/man/man4/capsicum.4 +++ b/share/man/man4/capsicum.4 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 19, 2022 +.Dd January 3, 2024 .Dt CAPSICUM 4 .Os .Sh NAME @@ -117,6 +117,7 @@ Processes can only act upon their own process ID with syscalls such as .Xr shm_open 2 , .Xr write 2 , .Xr cap_rights_get 3 , +.Xr capsicum_helpers 3 , .Xr libcasper 3 , .Xr procdesc 4 .Sh HISTORY From nobody Sun Jan 7 21:25:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Vc02ryKz561gX; Sun, 7 Jan 2024 21:25:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Vc01TYdz49WP; Sun, 7 Jan 2024 21:25:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HCvM8gQsyF2z2WzHqm0BJLHQfkehA2sTQo9lNHIW3I=; b=frZvFZN4pE1y52xBrkdJF3YWjIKgQdZhab9RPavYy7TiO7J9bUYmgQ/x8iLKWSzr1PMFB1 3bKidoXoXXszvMNXhqC2EAsQrzGeOEcrh3VDS8QMlLncbsEN/WF9RC2Dnbi8Fudd2NCezi jJy3Wo6XglTjulQFKKH9A7m+oFRafOuMtrGwtTKJwPNEFN39cAJgWGwzPNu171Ot60hZig KmCJWHUKPVWzGElgE764CneJoQKobmNV7yclYe6Gw53syoXcoZyiPspl7ehAupJD7/RHUi G+kkWXmKeEWPVC4IP7YSUfgpFiQhcDTH5QfJZRHYwwAYaRZBVxAiw4pRSpYCyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HCvM8gQsyF2z2WzHqm0BJLHQfkehA2sTQo9lNHIW3I=; b=h9CcjG7ik+lRj2v10II7H+cKrOaXWl3UMrisyupMRYsOeXAIswD0oCn7t8Y56Sn80xzgiF bL9f/NAblInuC/jibBO/nFjLQTZV+RFvp+FnYrqdSy9HrRkCdPX/QTJ8kCDyT1HxOXNIiY buM2YcogST/gwnmNcR5QytBm8DE0YbuJMqnwOZlTgdoYhiMa4/mSojkifyq+o4B7uj7z31 1KGNny8zyS6zm6lOwz+f8JQ2hZVVFbjKMThFr2JlV/H5/5XpqAKR2d5UbAU9G59ainfZQ+ vgQPUKk43D5QecKPTHv8UNNULtTf8aWnqIgMMH4Zl8l6dZLw6Yy3IGr2Q0UbDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704662752; a=rsa-sha256; cv=none; b=rPoLCyWaWrROHrzYTlnGTK6xUQq/mAag+mBdCjMlfmahGA6RPPweX0KrB+W693li7DhyZn UrppBL1+fCjSNX5hznfqtXbw52Jfugn+DOmuj0tMuznyu/jVlouUyiSfNH+cMSkgDXI3x4 9j1tv7Gf9puJFdKcWNFpdJvOQkqTl6Md4P3ikaHa3Js+sYsacM6wHLE5Zv+hh1Ijd3uNP+ AYgOmdtTMVlvIS6nLmlGrC8wGuXNjTWroTjCwllDvUJPbmA8g1EBul6Z8SuYPeo5sQEKUC 3UhksMJb2GiNHOZzpfTSX7+opVkt4sFRPvzCN/zKQNup1tx5q8XxnwyZ2AMjtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Vc00Y7NzgS2; Sun, 7 Jan 2024 21:25:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407LPp8c083987; Sun, 7 Jan 2024 21:25:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407LPpcd083984; Sun, 7 Jan 2024 21:25:51 GMT (envelope-from git) Date: Sun, 7 Jan 2024 21:25:51 GMT Message-Id: <202401072125.407LPpcd083984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 72e6ffc21cc9 - stable/13 - freebsd-update: allow user to break out of conflict resolution loop List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 72e6ffc21cc9760f1a3680bab542de5e991c7260 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=72e6ffc21cc9760f1a3680bab542de5e991c7260 commit 72e6ffc21cc9760f1a3680bab542de5e991c7260 Author: Ed Maste AuthorDate: 2023-03-03 17:32:51 +0000 Commit: Ed Maste CommitDate: 2024-01-07 20:41:48 +0000 freebsd-update: allow user to break out of conflict resolution loop When a conflict marker is found during update allow the user to confirm they want it to remain in the file. Suggested by: Tim Hogard Reviewed by: imp Sponsored by: The FreeBSD Foundation Fixes: ceb5f28ba5fc ("freebsd-update: re-edit files if merge confli...") Differential Revision: https://reviews.freebsd.org/D38896 (cherry picked from commit 3d44241546173de00852ab5e22263ba538cd8759) (cherry picked from commit 6561fec386a6cbe65b3f9661db797317ab6a99b4) --- usr.sbin/freebsd-update/freebsd-update.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 438e13a51154..f5289e1cd9fc 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2544,7 +2544,11 @@ Press Enter to edit this file in ${EDITOR} and resolve the conflicts manually... EOF while true; do - read dummy /dev/null; then + echo + break + fi ${EDITOR} `pwd`/merge/new/${F} < /dev/tty if ! grep -qE '^(<<<<<<<|=======|>>>>>>>)([[:space:]].*)?$' $(pwd)/merge/new/${F} ; then @@ -2555,7 +2559,8 @@ manually... Merge conflict markers remain in: ${F} These must be resolved for the system to be functional. -Press Enter to return to editing this file. +Press Enter to return to editing this file, or type "ACCEPT" to carry on with +these lines remaining in the file. EOF done done < failed.merges From nobody Sun Jan 7 21:25:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Vc14SqYz561gf; Sun, 7 Jan 2024 21:25: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 4T7Vc12NPcz48sL; Sun, 7 Jan 2024 21:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BwlHhqoUmq+FT+MbfdmiFq5nYTaMNJXYqKPnk2G0k4=; b=kTTW7MHjKzFutY+kA3kdUE8Qy0wsEkXnKLGlQhZp7M5f+kvf5Ua4IiMZjk3UuUnEsXVaB1 wtGKUGwOz1CCje3c3HVTbx4U4e0kkO/WAjWCMUEnDKPhTWo0JLkQgKh6y97/LlAv3jAQih b1CwKt6Wmp87keo4hn/YAwEh4JkBTXsJsCWDF8T8KEwK86iAZLN9tLOxLSq6hWleq8wZIy GqEm2mCocyV6f/lCGSobf6CEtfHgzrSh2HaxTRe6Fc5fZ07tkQS/M0byb4huSMEB0mhf5r 7gi4efagj5XTFLyjBix3exqSSvEyuLqB5yDXs+cFzHxApdl4QqUubjJav8YVLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BwlHhqoUmq+FT+MbfdmiFq5nYTaMNJXYqKPnk2G0k4=; b=lVIle0l/3HGnYJv7FpIJLm3WpcG+O9uHY2kFwWDpqski6SiTnGQ0fajGqOZ3hA5t95gqSk mmp0+dUNR6VLvfVOp89sLsEa/qnYj9266zt76NNse01d2ACO6b9TguCUpYySfAyPp8zpCt 7VXOEtXpP0SxKWpBCqlN4cUmIScWkboALO3LLeWtnS6gKicVgCGt3QvmzkdoFXHBvuUWqi ycB8E19JU4EQqfVWDSV5IvZP80ZFHE3FOcyGR0muZBQfB7TWOui1C0ouZ8TtVncune5qj5 zfHkbd4H6zBDTIvhE1O6LVpOcFFOfI/NrbLp2e0cFvIXMGaXvc+3fTYE/AMJXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704662753; a=rsa-sha256; cv=none; b=k6IFqv6dnDCZOudKkiw6M1Pp0faSxVaUuKPWHbW5HWFDg6MFqvSX2K1iWxwRCnYctNqi6c x4jd4rthvxAQkkgIurl6rgnPJX6w9tTljS5qCqY13JWEopgBirY541sgK8ljWPS0u9RcD7 6yzosPDQEarXDI+Q9FxERK9hKw+FmpbjNeJPgFPMqwpYKQ1NmNaKqThjBfuNwp+LTJQM/s TDViKAcyz8b3K+wr0OXRH+I4CTexdDALXNvik0KaLCU1PaeVUvgziYrpSL0lhNe/AlL0or 13THXO+1RT/46feGA448aPlCz9NxxJXEJrumrpALgYLKl+4YCSbStGMWzjF3+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Vc11PwCzgS3; Sun, 7 Jan 2024 21:25: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 407LPrxP084033; Sun, 7 Jan 2024 21:25:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407LPriU084030; Sun, 7 Jan 2024 21:25:53 GMT (envelope-from git) Date: Sun, 7 Jan 2024 21:25:53 GMT Message-Id: <202401072125.407LPriU084030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 01e31d1d875f - stable/13 - freebsd-update: handle directories changing to files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 01e31d1d875f43a9d9c2d8f033409cbc7901c7ab Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=01e31d1d875f43a9d9c2d8f033409cbc7901c7ab commit 01e31d1d875f43a9d9c2d8f033409cbc7901c7ab Author: Ed Maste AuthorDate: 2023-09-12 02:59:30 +0000 Commit: Ed Maste CommitDate: 2024-01-07 20:41:48 +0000 freebsd-update: handle directories changing to files Further to f6d37c9ca13f ("freebsd-update: handle file -> directory on upgrade"), handle the reverse case of a directory changing to a file. We may not encounter this case on upgradess (before freebsd-update is retired) but it is needed to support rollback. PR: 273950 Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41945 (cherry picked from commit c0f52443166ae7ecd512ab0350469d9c3648788c) (cherry picked from commit 1cf8528fec85a965baa5df2d8852166437af88a6) --- usr.sbin/freebsd-update/freebsd-update.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index f5289e1cd9fc..7408ef1c6721 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2899,6 +2899,15 @@ backup_kernel () { set +f } +# Check for and remove an existing directory that conflicts with the file or +# symlink that we are going to install. +dir_conflict () { + if [ -d "$1" ]; then + echo "Removing conflicting directory $1" + rm -rf -- "$1" + fi +} + # Install new files install_from_index () { # First pass: Do everything apart from setting file flags. We @@ -2919,6 +2928,7 @@ install_from_index () { -m ${PERM} ${BASEDIR}/${FPATH} ;; f) + dir_conflict "${BASEDIR}/${FPATH}" if [ -z "${LINK}" ]; then # Create a file, without setting flags. gunzip < files/${HASH}.gz > ${HASH} @@ -2931,6 +2941,7 @@ install_from_index () { fi ;; L) + dir_conflict "${BASEDIR}/${FPATH}" # Create a symlink ln -sfh ${HASH} ${BASEDIR}/${FPATH} ;; @@ -2967,10 +2978,14 @@ install_delete () { rmdir ${BASEDIR}/${FPATH} ;; f) - rm ${BASEDIR}/${FPATH} + if [ -f "${BASEDIR}/${FPATH}" ]; then + rm "${BASEDIR}/${FPATH}" + fi ;; L) - rm ${BASEDIR}/${FPATH} + if [ -L "${BASEDIR}/${FPATH}" ]; then + rm "${BASEDIR}/${FPATH}" + fi ;; esac done < killfiles From nobody Sun Jan 7 21:25:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Vc268MRz5624Q; Sun, 7 Jan 2024 21:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Vc23rQQz48tq; Sun, 7 Jan 2024 21:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aPAGGlcDMq810Sw0jVhueQZnv8v7imhTqavJt+rAvJ8=; b=ovNmgjiZpqaWde63KJbMxyXzefPnMWilwRI1UMZZk+gxNziG57gQaa4upv+FEA8vR5H/2Y iICLOs8YSbk/54Ntnm+mko+XYO7rMcRFs7wBHflrDAnJvJ0ECKBMo1LqnDT7OwzZIxIGFE 7+dAG+UY9a6iQ3z4LveAUG0DhnvyXlTDtO7dU4/H2sE5e8x886tdkAmv7iw/Rg8R6fmI/U 2szwRZXDeVv67Bz1Ct+sU71aBkISf1W2XlyRhU+OTXiUAHTBX9LJhoPYfwZjRdoLflnaZV H5UfPBweZgcLSBgiEPureNj7LRy1+IJCm6RUA60+OtYDWBG21VOWKMOXOYWO/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aPAGGlcDMq810Sw0jVhueQZnv8v7imhTqavJt+rAvJ8=; b=nWJPCuRi3hXpLHPBTiV9BDjliagIGQrRx/2ewspCPZJTjsBxm5CkQlO/T+Ztrd39prDEWu 2auyUCQXCK0QetzbaPKKUy4z53yWb8Wb1CIJl0nt/TDNv6L5qeV1xkS2Xb7sBdQ4qGnIRo yyXynaNf1DSIGPDPOkmEC4ER0OscoO15Efbl+8tgATUjcF8vFGYvco0fytcSyc/B33K6EI 3JSSklzV5tyDoyIhHyUvEBz7BmGQaURqRRfAOaP+deW5Afv33xQEphRUYB5hz/Ll62cYKw dUsGmOu9iiZnwhipoc0SE41BJhg203pvW0lYmK2qI7Q2NkvwQgCLlTS4eB88zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704662754; a=rsa-sha256; cv=none; b=D6XAsgAsgHmQwKXTFfUJMWWc2m/7W3jgTM9CufLQj4M2GO1+lcw1VnyxqCbpULhjN2Ab4o AmiMjB4z3tpzv9QOJuTw00uEdfOULlzrilDMUrGCTGlay5XdPyQTAWG5whjif1mm3V6TjQ K4//iGlEvQh8rc9Y4QDGvLRXFmbuSI30mkzd2ZNmJUxsxrkAtJyuxWd+yvec+d1kpmDkT6 zkUkW0C9EDSfeG2YYLm0Yj2SjdWrCL69to4KjA97ePSPblVZYp/6leLR2CzXnnHuDbohSC IrgORE24LVbOnZscUqq4xQt1OtkQk1uWkr7Wgfknb8sxfQNDg/CS6wnrtqTuQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Vc22RXxzgjj; Sun, 7 Jan 2024 21:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407LPsgV084088; Sun, 7 Jan 2024 21:25:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407LPsIN084085; Sun, 7 Jan 2024 21:25:54 GMT (envelope-from git) Date: Sun, 7 Jan 2024 21:25:54 GMT Message-Id: <202401072125.407LPsIN084085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ec5e6781b3a1 - stable/13 - freebsd-update: for rollback, first create directories List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: ec5e6781b3a1a3216535bc9aeedd746449cee6e6 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ec5e6781b3a1a3216535bc9aeedd746449cee6e6 commit ec5e6781b3a1a3216535bc9aeedd746449cee6e6 Author: Ed Maste AuthorDate: 2023-09-29 15:28:35 +0000 Commit: Ed Maste CommitDate: 2024-01-07 20:41:48 +0000 freebsd-update: for rollback, first create directories rollback_files() tried to install files before creating the directories for those files. In some cases this is due to special handling to install certain classes of files earlier than others. Just create all directories up front when performing rollback. PR: 273950 Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42020 (cherry picked from commit 6b27e1f2eaab9360a796c943da9d206515e1742b) (cherry picked from commit 2b79df0ad999df4bc22ed0e1eff446efa4055359) --- usr.sbin/freebsd-update/freebsd-update.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 7408ef1c6721..551d40418240 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3196,6 +3196,11 @@ rollback_setup_rollback () { # Install old files, delete new files, and update linker.hints rollback_files () { + # Create directories first. They may be needed by files we will + # install in subsequent steps (PR273950). + awk -F \| '{if ($2 == "d") print }' $1/INDEX-OLD > INDEX-OLD + install_from_index INDEX-OLD || return 1 + # Install old shared library files which don't have the same path as # a new shared library file. grep -vE '^/boot/' $1/INDEX-NEW | From nobody Sun Jan 7 21:25:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Vc35fjCz561wv; Sun, 7 Jan 2024 21:25: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 4T7Vc348Zwz49XB; Sun, 7 Jan 2024 21:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1h/iJxQL17zPB5Nts63P+/uPIyhv0MV4BqKdv+rHAgU=; b=S4wtgpkPW8i1FGv/ZF2xK7qiLvi0ZCIPifD+ltqRSUIjN2+gqvMXPjot4kANwaopCZ0BdQ FsWi8Ro3HUjJUBnHkppUlA09dLvjmvLqtuw8v/ghMrEXbU+mpWdY9IkPye0wc0qOQVfQVz SZcUn4ok9VSRF04chRLpRjKiTrriTwEcW7Pc+Wu1ajFLYuljOxg1aeRaysyO5yOwdxqPCw 2/FZF7WARAONJ+OuPIr8J/yVW0MorD4TQdtkeVm4SY/hAGd+SggsM18J8Ypii1CEt736gD opYQ7IaK9OHCiJ3VtxUAezELtLeaaiDDo+1xyp+TzqgX5uWXf8RkiqZAcsw3sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704662755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1h/iJxQL17zPB5Nts63P+/uPIyhv0MV4BqKdv+rHAgU=; b=K3+dOM0CUjT2fL4pf4B5J/rr/jSgmcSNrLUAYItLguWuMBaVtf1KEzgd1AjWOYGRb3Z20j urbjoJl/vvEzgzZANT6bc3kqd4N6USJEZDDfoCC30v4I5859gdpkTHnctLKwGL5XU7Rytk sT8RAtxLy90EdbvwCmb8+DULp0+oNAWX7R1uiopOZENb5MdRd12Vbbu+G5VDer03XAbkdI 0zqp98aCa8oEC65bt8O0cgrgcTgHIsuHq13tLy9GVbbPxAAtaRjP9MmNM8eOtHXEWHG7gf vq+E9OdYkLRUZVz3YY4QNWEzssQijlwwoJUUyYOBKW5otF6i4YH4PLSfmyy8WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704662755; a=rsa-sha256; cv=none; b=U60MxiaEh3nv8Jg0rjsOSOu2ph9PiqvkGSKMOvAY40ombz5ZumS3B9g4u3nVDZT0hOke8g Fn8cI5/phHIiADvShff5mzeNDOXj+TWkPg0tJ8pHuwJoVxUr6RH1u4oAvqZjI9GN382c05 YCn9IfBypku2sk7tPAyiE9tmV0pNiP5IJvD7FtyH8K1k98V0XLTllcmU6LTsHRL6ZpxLAB ejPg4l+vP/IodWSIhMVlSGAilmXqKnW0iHYGacqT7KXGMF3IrAiBvUF6vuRGzzQIN4RjG9 KfOHFtr22r5MzEHxJtB0MEz0SGP5R8zh9apHcxB/24kIv0Z2xJkLy8RiTkzwUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Vc33Ghqzgs1; Sun, 7 Jan 2024 21:25: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 407LPtN5084139; Sun, 7 Jan 2024 21:25:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407LPtri084136; Sun, 7 Jan 2024 21:25:55 GMT (envelope-from git) Date: Sun, 7 Jan 2024 21:25:55 GMT Message-Id: <202401072125.407LPtri084136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 32079aae00de - stable/13 - syscalls.master: Fix SAL annotation for getdirentires basep argument List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 32079aae00debf26a4ddcef155f7a963308efb8d Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=32079aae00debf26a4ddcef155f7a963308efb8d commit 32079aae00debf26a4ddcef155f7a963308efb8d Author: Haoyu Gu AuthorDate: 2023-09-24 22:34:43 +0000 Commit: Ed Maste CommitDate: 2024-01-07 20:41:48 +0000 syscalls.master: Fix SAL annotation for getdirentires basep argument getdirentires last argument "off_t *basep" is an optional output argument. It returns the value only when the passed-in value(pointer) is non-NULL. This is a part of the research work at RCSLab, University of Waterloo. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41969 (cherry picked from commit 5e29272bf57e24a16f3a17f037f9a5e7cf25ed90) (cherry picked from commit dd588b3c9a5a2f2b2b62836ce70fd85813434748) --- sys/kern/syscalls.master | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 0a977ca0eff3..ace9ad5268b5 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -975,7 +975,7 @@ int fd, _Out_writes_bytes_(count) char *buf, u_int count, - _Out_ long *basep + _Out_opt_ long *basep ); } 157 AUE_STATFS COMPAT4 { @@ -1167,7 +1167,7 @@ int fd, _Out_writes_bytes_(count) char *buf, u_int count, - _Out_ long *basep + _Out_opt_ long *basep ); } 197 AUE_MMAP COMPAT6 { @@ -3081,7 +3081,7 @@ int fd, _Out_writes_bytes_(count) char *buf, size_t count, - _Out_ off_t *basep + _Out_opt_ off_t *basep ); } 555 AUE_STATFS STD { From nobody Sun Jan 7 23:08:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Xsv61Qnz56Dqd; Sun, 7 Jan 2024 23:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Xsv5PMkz4PDk; Sun, 7 Jan 2024 23:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWPZs3GoS4Trnwp0FJ30p41Sd/b0zP4LuzmfJt5C2t0=; b=bFchWI3PhLoOA7EWEtjVzc0hXWd7kjCQH7Q19gfIgLXeVBZB+ishmMiFPwQ0FZvzbYYHAn N8EySaaBcJj6NC7rzukoLd6zOUNJQQS+6Ndcu5govc48aRP+gy5hQJwz55POU+p8FCsZdm QY57MoSSx+OPh+yBtBrs6mF8A8e0561qPRQ0VVA7DZhcwVUBjN1pKcHzWM/MPSR5ZDRty4 f5pwFVJT+olV8U35jiMNq73tkE5RdgGOF20VY3hzrEmTd4q/1eoWWYlktlwxkDYpkFOQda vMny48I4yaSQAuc9kEnLxR96PhrZ6wdozmQwoyIkNadeOeYHmI/nOUzSnC0WzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWPZs3GoS4Trnwp0FJ30p41Sd/b0zP4LuzmfJt5C2t0=; b=TDepk/6WW/RLBn++OpYv09FMii9NQK2uvc0wIyEPWdszX3JfvkkgdCUSA1U+31/g9gFY0p xVOcI6k6LCWGgbBnzTnGI2US3033vflzG8jvV38KZDtLdVsy1wIpCFECz6SQ9QgSX1l0a9 3XPy1s6d1tNYjTBZU8HjFJeiYP9Skizs9u0EUiUYTFPcr+mQrWOvtEQSX4lCNf57/59OMy IxqV0Im1YCO0LhVZ9XFe0E5AO3H/OJJlpQMeS8Be7GzM0pcZiqZJP6lV7OZtv1QKlX9YJQ ivP7EPyjZGs6Aym+5rvhhCtZbWfJWBDByxYKijGwW59hVH/RhbjlsZrqoPphMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668883; a=rsa-sha256; cv=none; b=dCwiM9RJo6X04/NnOLvTkS5xpD7+ohChMR3K+yUoYgSST/4DHtcYNm2Ded5UFFr6DQeslo igmTGPr7ZyDH6judy1BCto/X+SF+xR3sSznQfcj0dtkB2LRcuB7H217eAjIdDWGS9s52hd uC5SvonUe/o5nONTYZN9fvQHaSyzGPDrj25Ji5zfVTJlLvguK7IaCwbS/8c+jTmnYW8OTC CKE5MH7hvGb9o726vjzVgV0VdyKRe7kk+9yeNGFH6Sgg28knbnFNVw3d5xsfwxonfj711a /MT8FB/E5zyKAtkNpMAOREDQYTV9h2O4rxfmq0TSuAAm8PwbDSoy6+USYPyZLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Xsv4M7wzk7Q; Sun, 7 Jan 2024 23:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407N83Lb052790; Sun, 7 Jan 2024 23:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N83Hx052787; Sun, 7 Jan 2024 23:08:03 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:03 GMT Message-Id: <202401072308.407N83Hx052787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f252e69e93d1 - stable/13 - build target triple variable from sys/conf/newvers.sh List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f252e69e93d10e5b8c51ba7c99c88e98be2c1c56 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f252e69e93d10e5b8c51ba7c99c88e98be2c1c56 commit f252e69e93d10e5b8c51ba7c99c88e98be2c1c56 Author: Alfredo Dal'Ava Junior AuthorDate: 2022-05-03 11:09:38 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:32 +0000 build target triple variable from sys/conf/newvers.sh Retrieve FreeBSD revision number directly from sys/conf/newvers.sh when building the compiler target triple value, avoiding manual intervention on other files every new release. Reviewed by: imp MFC after: 2 months Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D34429 (cherry picked from commit f9ee4156741a205c93ae947595b5c48717107d9e) --- Makefile.inc1 | 4 ++-- lib/clang/llvm.build.mk | 9 ++++++--- share/mk/bsd.compat.mk | 8 ++++---- share/mk/src.sys.env.mk | 5 +++++ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 42707c3ccfbc..948332a80043 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -136,9 +136,9 @@ TARGET_ABI= gnueabi .endif .endif MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd13.2 +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd${OS_REVISION} TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd13.2 +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd${OS_REVISION} KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ armv6/arm \ diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index 4ee9e8d5d63b..45a779584e74 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -13,6 +13,10 @@ .error Please define SRCDIR before including this file .endif +.ifndef OS_REVISION +.error Please define OS_REVISION before including this file +.endif + .PATH: ${LLVM_BASE}/${SRCDIR} CFLAGS+= -I${SRCTOP}/lib/clang/include @@ -43,10 +47,9 @@ TARGET_ABI= -gnueabi TARGET_ABI= .endif VENDOR= unknown -OS_VERSION= freebsd13.2 -LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} -LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION} +LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION}${TARGET_ABI} +LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION} CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${LLVM_TARGET_TRIPLE}\" CFLAGS+= -DLLVM_HOST_TRIPLE=\"${LLVM_BUILD_TRIPLE}\" diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk index 1cb6ab9567c9..ef485b843f99 100644 --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -29,7 +29,7 @@ LIB32CPUFLAGS= -march=${COMPAT_CPUTYPE} .endif .if ${COMPAT_COMPILER_TYPE} == gcc .else -LIB32CPUFLAGS+= -target x86_64-unknown-freebsd13.2 +LIB32CPUFLAGS+= -target x86_64-unknown-freebsd${OS_REVISION} .endif LIB32CPUFLAGS+= -m32 LIB32_MACHINE= i386 @@ -50,7 +50,7 @@ LIB32CPUFLAGS= -mcpu=${COMPAT_CPUTYPE} .if ${COMPAT_COMPILER_TYPE} == "gcc" LIB32CPUFLAGS+= -m32 .else -LIB32CPUFLAGS+= -target powerpc-unknown-freebsd13.2 +LIB32CPUFLAGS+= -target powerpc-unknown-freebsd${OS_REVISION} .endif LIB32_MACHINE= powerpc @@ -68,9 +68,9 @@ LIB32CPUFLAGS= -march=${COMPAT_CPUTYPE} .endif .else .if ${COMPAT_ARCH:Mmips64el*} != "" -LIB32CPUFLAGS= -target mipsel-unknown-freebsd13.2 +LIB32CPUFLAGS= -target mipsel-unknown-freebsd${OS_REVISION} .else -LIB32CPUFLAGS= -target mips-unknown-freebsd13.2 +LIB32CPUFLAGS= -target mips-unknown-freebsd${OS_REVISION} .endif .endif LIB32CPUFLAGS+= -mabi=32 diff --git a/share/mk/src.sys.env.mk b/share/mk/src.sys.env.mk index 0a7f8ea800cc..c857972e47c4 100644 --- a/share/mk/src.sys.env.mk +++ b/share/mk/src.sys.env.mk @@ -22,6 +22,11 @@ RELTOP?= ${RELDIR:C,[^/]+,..,g} RELOBJTOP?= ${RELTOP} RELSRCTOP?= ${RELTOP} +.if !defined(OS_REVISION) +OS_REVISION!=eval `sh ${SRCTOP}/sys/conf/newvers.sh -V REVISION` && echo $$REVISION || echo +.export OS_REVISION +.endif + # site customizations that do not depend on anything! # Save MAKEOBJDIRPREFIX and don't let src-env.conf modify it. From nobody Sun Jan 7 23:08:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Xsx0Y6lz56DyS; Sun, 7 Jan 2024 23:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Xsw63j4z4NsS; Sun, 7 Jan 2024 23:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+j3uRc2/vCRbOUG7/ZBtVtHkmZoG6kbHRVBuyFVen30=; b=sHKHNmhwN/3pBowuAQcIFV4FOLJ12JQ3WaZuKxQhyTL1VTS7OQ+B2KUH45mt1tapFpQwZ+ QUt0Q7PWVswnWWIiQ+2gV8vHfh00vuqBFqnmAy0Y+QYzpsLA92YKDhO5I6lVhXxj3P/1cj DHvy7X5xtsQs0gFVCb6SeCubyiYoKgv8y2xlZWMUsTIQLGmiSwG6EsHKm32ITSHYBqMvQE 6+G83EwBXfduA45zeheyYIeRfO2tGmT6KNa0rNtGkIpr7YHQXANRnxi6bYf9XjA4fgxG5B GFvesvZf7Gh73oLVSwkp9RhssenzQLN5v4MgvbUezuMn0P32lbDof54ipf18Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+j3uRc2/vCRbOUG7/ZBtVtHkmZoG6kbHRVBuyFVen30=; b=XkMXXLHSJjPeKu7xWqrqgclGrzcyi7n/sraZdc8ODrgQCUvNlc2KwJtQSXqxpypwO69ay4 Zw6W/D4olk8rWCOWH2QC8x+aPGbZnj3kFBHz0HGIg+eYPUfm7q1Q01XP/8yn2hLDXsN5+O Lop1ZVa+gYAc0DORU4yBlsqt8nVQY6w4rUsq2wkTGYb3Q4BL5hfumYeSyixkTnwuJcypkT 3Jwj/VBAa4NHeUq2uSMfEdxJrKeysYJSJr2xw7MkBPEQH5w0kBp8RGa5ScMaj9KCC2vZWE UR2TqsCJv0VbjsIDpbbjC47px8DN7UsGrCN5Y0U1mtSBuVEAZahZS+++Od8vYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668884; a=rsa-sha256; cv=none; b=H9zrMp3elt6lZDKZH+/1XyNNOhP9dLCJS+jn5TF7dX1w3K9egycpeehSn7rzsBvq5Ia0Yc /xAVuduh8CBBwcliMFtvu16+xsHyT61F3ZC5j6rnaapj1Jy8V4Og+T3ILLZJ+XQ8AzmfBe P1WhljLFSD2BV5TJip0ppzUxBeZs2pLsNM7Oybu97xPDc5mNblH2dZ4spBWR3TeTBgu8Jb zRwFH3n50l/IsaNJw0vxq+4Bat+Wl7viKGeAw8MPuBsmn+YcxQ3sY5HRUzHN/Y0Yo3m8nI phQzi/o/bA8BCmesPuq9NDBKo2VTgr1JdZgzF3Yj7dY0xVOBMYnKogSY90k9KA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Xsw52kFzkQB; Sun, 7 Jan 2024 23:08: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 407N84CI052835; Sun, 7 Jan 2024 23:08:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N84do052832; Sun, 7 Jan 2024 23:08:04 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:04 GMT Message-Id: <202401072308.407N84do052832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 9c2dbbe2b55a - stable/13 - make cross build from arm64 work.. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9c2dbbe2b55ac5e2b2af0711f39832f87e57ae5e Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9c2dbbe2b55ac5e2b2af0711f39832f87e57ae5e commit 9c2dbbe2b55ac5e2b2af0711f39832f87e57ae5e Author: John-Mark Gurney AuthorDate: 2023-02-24 05:47:03 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:33 +0000 make cross build from arm64 work.. Reviewed by: dim, imp, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38762 (cherry picked from commit eb81dd8404e55c8e048acfb1cd4f4c3c021afaf4) --- lib/clang/libllvm/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index 600dad91040d..7cbf56401d5b 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -31,6 +31,9 @@ TARGET_ARCH?= ${MACHINE_ARCH} CFLAGS+= -DBLAKE3_NO_AVX512 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_SSE41 \ -DBLAKE3_NO_SSE2 .endif +.if ${TARGET_ARCH} != "arm64" +CFLAGS+= -DBLAKE3_USE_NEON=0 +.endif SRCDIR= llvm/lib From nobody Sun Jan 7 23:08:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Xsy2b0Rz56FFH; Sun, 7 Jan 2024 23:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Xsx72wpz4PDr; Sun, 7 Jan 2024 23:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQFeHeDp9TVuSF6U/Rya+9x0AhhdxERyrNurkQVr7Ug=; b=dqtDmNMRQHfLEXS0Zb7Ryb+gfakJImJws/6I7h5aVioqDbxhbVEuflRLHxHSZjMwspeZw9 uWwdp9xKy1LO7SNlSx8DPvfJkeCT7VGrGGmjuxuGQI6A8jU3+YBM5emCV/F8m1CVKcLYqu HiBNOAuEJumrJHmrCfFZE7CB9/3sqMzd71MQ+CxchU9wMuLpvhKUWr2HSx+w25fgGjP0ki S5Av27c/4W/YFlr2+wK7b0SneW4HI719CL7C2SWbUhRbwG8Dh1uFf0mbCg2Aje6a/LW7ti XXIylq0yHkA8wTvWftlDjcn+esoZVKiXQCc6nLUkjiolD801b2zwNKYtuygE3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQFeHeDp9TVuSF6U/Rya+9x0AhhdxERyrNurkQVr7Ug=; b=NzdcDofw+Xc11uQ+K853A8pz6WthxxT2ciAYdw/fgJYXrzmnHrxjcpssESBJSoXyEGIWsy daYfOeKucmK7h/PMoUmArNH5QIuD2xvemfxYPLkWzzfhHBA2IImWgKNjx2/coWNxi6SIPQ MDLIbQSP8C8kb/kC1fopbF1OBSQr42TJtQ8K2iLtvPVxbESSqHl9aSYyXlJ+m9LhkyRe6l OYuhxm3tr94uhFySbrmUuwQhWXMjD1Plho3lZldxqHVTr7EFV+z/XbA4FR5j/c4ZVhRyjf /nJxxNtMKCrWdFW/8+YuJ1rqS+gV8UbRWx/LLZ5LxMGH49Iu9NJHqo5DY/jPQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668886; a=rsa-sha256; cv=none; b=bBOvP4IiyA9jAkVcYB17ki66x75c1wZxOnvZoMl4N4VgbQdorU8PAYkSFdzH7f6aZqen7o CiT3cmhabkZQksQohVTGKHwsqOuOyA37L3CMvr751Sql7zlB5RwtotEb8N0Kbr/09Rjmpt ZBnMFR+k3lqldWva2BEKE+9j/ABVsiEXi4JHUhvh+GyNSgYdn3dC8AdFB8Va/a5f1SqqWl H/2e2cUm1ldnl+vGCatBGPxU0EPK5c2Tr1JW1FULOgaeC5WYUNMBbDXix7ywATQMUsME76 ZS/Y5c4I6P6hOa1kMSDTao0XsChn9r0DfTrVQ6jRQDwcuaupFwdFme10qZdgPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Xsx6273zjZ0; Sun, 7 Jan 2024 23:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407N85Ha052886; Sun, 7 Jan 2024 23:08:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N85NC052883; Sun, 7 Jan 2024 23:08:05 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:05 GMT Message-Id: <202401072308.407N85NC052883@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 104cc21de8d6 - stable/13 - lldb: dereference stoppcbs based on target kernel version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 104cc21de8d688905d67f4a9150b2a0511243273 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=104cc21de8d688905d67f4a9150b2a0511243273 commit 104cc21de8d688905d67f4a9150b2a0511243273 Author: Ed Maste AuthorDate: 2023-05-02 20:24:46 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:33 +0000 lldb: dereference stoppcbs based on target kernel version As of 9fb6718d1b18 / __FreeBSD_version 1400089 stoppcbs is a pointer to the pcbs array. Dereference stoppcbs on sufficiently new kernels. Reviewed by: markj (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39939 (cherry picked from commit 0f2bb40bc7ddee7ba329d9b344623e2a186b4046) --- .../source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp index e3707365a9c3..30eace1ba94f 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp @@ -178,6 +178,11 @@ bool ProcessFreeBSDKernel::DoUpdateThreadList(ThreadList &old_thread_list, int32_t pcbsize = ReadSignedIntegerFromMemory(FindSymbol("pcb_size"), 4, -1, error); lldb::addr_t stoppcbs = FindSymbol("stoppcbs"); + // In later FreeBSD versions stoppcbs is a pointer to the array. + int32_t osreldate = + ReadSignedIntegerFromMemory(FindSymbol("osreldate"), 4, -1, error); + if (stoppcbs != LLDB_INVALID_ADDRESS && osreldate >= 1400089) + stoppcbs = ReadPointerFromMemory(stoppcbs, error); // from FreeBSD sys/param.h constexpr size_t fbsd_maxcomlen = 19; From nobody Sun Jan 7 23:08:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Xsz2Fhmz56F3f; Sun, 7 Jan 2024 23:08: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 4T7Xsz0rlPz4P4d; Sun, 7 Jan 2024 23:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T/w6kEzFYOZBUp2CKUOINut4lQprJfEdP4kPxoeLNbU=; b=dPQ1x+o0Mq68fLWP8KVBE/3DPafAOnwd6llACd3wfTkk7kOva4n37r2N2q5hCzzsGta6tP 2s8bd4bgR08yAavRt3rUdpXv/BCLOIzoMhoKRDh8F7u7YIVVni/kSsb1TtISrWx2I/kVUE kEqLNzQdNL61NT58qiZf10ZzFDEqf7abMELSlUxIqoYjJrIa2ved0CSBuAirjlgRxojRE/ i5VEH/Ya/RXayc0APrsi5PYl/nLvGqj9lscOlTQaXAqFb0ryAd68BjZloU8UcaoY+Hc/Z+ WKYEy7DLfNe0hc3aV7Pc2F89IW5UGeKWdEjfxGXQqErAH3QVBeCaD3/qQunSmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T/w6kEzFYOZBUp2CKUOINut4lQprJfEdP4kPxoeLNbU=; b=Btf6IA+azkusf7JElbbSX6zPADT/mmPKSp7RQds9H0L4QXGglW7DftpTRAiKpkfwCLB0UP R7m2mwfLXUIIn4sC3WLtbHoGAOigzd1mCA8b0dSgO27JiqjOTlha77NYhJJxoDeLcHrNGH 8Zt7I85ft6IF6sXrI+AtIz7UmUpdbgeRQv0kFAJ3fy/czBqXX/j2Y8ZRwUjCmetF9YDivW qnDXWX8efbH9f3AkLIBPNpnCszPW/LC80ZYlxRS2zwyhBdRSgBZE8UTJVW24p3i8UuzjvE Npjc9EhEEol1G5fIobi8LgyJqLunsAJITvBjPiWcD/wwYtCCcVdvWx/Wnhwc1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668887; a=rsa-sha256; cv=none; b=sf2f61yy5toucPhQOlUpHbiRdr0r0IcogjVhFJ1+as8flCMX3sLTVPY+2AkPn/9M0LB3PL zfG0VdAO5tJQTxHt+aecpOWEgLRP2l4g9IN2OfBSJkOB61vC3O51MH7sAub+c7I5rjQnXI kwSblo392F81IgMjki9+qKyiBiR4JNXzaTpXUBgtPXxgBhh454yTMUC7++83IW5wYWjZK6 R7xWa7gpfeHMh4dumMOzm30i8bUwxFYigykEUcesAyczH/qZZS4LBPkRWShCHH/tZ3XiD4 J0ueYcFnWbaCUrtC/prq4wXLel5sKuK1CKjrZFloCbA8oc+BMiHgE7FEefGKsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Xsy6qTczkNN; Sun, 7 Jan 2024 23:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407N86Bk052944; Sun, 7 Jan 2024 23:08:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N86EA052941; Sun, 7 Jan 2024 23:08:06 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:06 GMT Message-Id: <202401072308.407N86EA052941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a2e0c77f941d - stable/13 - arm64 lib32: change clang to allow -m32 on arm64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a2e0c77f941d7fc7fe5e2229124a551c08793052 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a2e0c77f941d7fc7fe5e2229124a551c08793052 commit a2e0c77f941d7fc7fe5e2229124a551c08793052 Author: Mike Karels AuthorDate: 2023-07-25 23:58:51 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:33 +0000 arm64 lib32: change clang to allow -m32 on arm64 The FreeBSD driver support for clang tested explicitly for 32-bit Intel, MIPS, or PowerPC targets where /usr/lib32/libcrt1.o was present to decide whether -m32 should use /usr/lib32. At jrtc27's suggestion, simply test for a 32-bit platform rather than adding arm to the list. Upstreamed as https://github.com/llvm/llvm-project/commit/3450272fc281979388bb845a9fffb59b42cc2e7e Bump the freebsd version to force a bootstrap build. This is one step in adding support for -m32 on arm64. Reviewed by: jrtc27, brooks, dim Differential Revision: https://reviews.freebsd.org/D40943 (cherry picked from commit f1d5183124d3e18d410ded61e45adb9a23b23c83) --- contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp | 3 +-- lib/clang/freebsd_cc_version.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp index 2230295ccd74..80d49c28f497 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp @@ -377,8 +377,7 @@ FreeBSD::FreeBSD(const Driver &D, const llvm::Triple &Triple, // When targeting 32-bit platforms, look for '/usr/lib32/crt1.o' and fall // back to '/usr/lib' if it doesn't exist. - if ((Triple.getArch() == llvm::Triple::x86 || Triple.isMIPS32() || - Triple.isPPC32()) && + if (Triple.isArch32Bit() && D.getVFS().exists(concat(getDriver().SysRoot, "/usr/lib32/crt1.o"))) getFilePaths().push_back(concat(getDriver().SysRoot, "/usr/lib32")); else diff --git a/lib/clang/freebsd_cc_version.h b/lib/clang/freebsd_cc_version.h index e0441ae866f5..758b8295d012 100644 --- a/lib/clang/freebsd_cc_version.h +++ b/lib/clang/freebsd_cc_version.h @@ -1 +1 @@ -#define FREEBSD_CC_VERSION 1300012 +#define FREEBSD_CC_VERSION 1300013 From nobody Sun Jan 7 23:08:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Xt03NDLz56F8J; Sun, 7 Jan 2024 23:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Xt01ytmz4PF8; Sun, 7 Jan 2024 23:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tVYD6eT4a4tVehP5KmqfIKfvQuzQOFLp5C2Cf7n1qIk=; b=a88BMUyz3gjWmfm2wPgszCQhpknA1VriBcQixZ/b91W4gfUfvXAGQ8iR1iKeFvWQoUumqL T+QMURH/kc5y5aHDTwh1ew3qNn3oLVt8a75FC7axzhI/7MNyejBCz3PONLJprFP5j/fup0 t3BqJ/vk38eJz8y4pVfTZdQu/S4Z3sPR3CKpAciGKALSU0zWL5ifBzlQsQYvt3svCLQg5H O/0r8WcrD2TemrK43NdYB7bAqtF0n0gQiY5wbzdhW4pimvLfqsSiq59drFf/6tGlOiQGIG U+d/TypzL0ktMSVXt6EygQ3DJ4VtYTtUjaE7I3zNzYUCkESQliurImPsbIWn7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tVYD6eT4a4tVehP5KmqfIKfvQuzQOFLp5C2Cf7n1qIk=; b=XChOvhTVnb5lLIGG5sTv9qG1QZZOCwwLqdegIsW+nRgbrMfVYx5+JJSZzIbTEqNMVQ7eAr bz4ozkIQy9nW9fw+k81r/3v9xsUhNpAxnuMd7jmcbmcUrJpxu4Lu4u/eB9zNkSxczUbx4M RogcfZjVpjEetPUMZdNhnJGHR6uaNxbvTUPNl39txiSujrxmzvJ8a3FSe/ig5Tv9l+CCT1 VLIckjtAS8viFR3fqL5vYhPL84jI6k+sAT2PLrZzYkPNRdwZLKtDRj5tTDe0TZ4ELscS9L +wM3xnXCG3IumGnEWEaHQ3VUTKh2Xj2SVwkC2hFeR40FEOpHT07UtQrLR0OCMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668888; a=rsa-sha256; cv=none; b=xNl0J9lVnh3dZXdNt2Fq7SN14dqL4bH6QNB/GwbfhgKtSIYXYFEsJi8qtHdnoMQzVmS+UV 4tGK87A75GiyW+vbk5L2Li18j/nY0ErIuyHe9kEs2qbmVImYdPvVRDxn1RXhG04bWYl9sR UOp9zB2/h9kYIoVT6+pRPIozm+o80QhxiBeS9BLElkDOqCCSAeP/TapecJAjFzjkeJG92i mW0ao3lo49VqbO4kJ7sOAiZxZsrtddAwEc1ITLbHJyh8VUaTKen1YoTMxCQ7C3/x7A74DG 7b0s+OH6hfRT3JhEOgIAOvCaQCANy8qlSEXLGMTIErIijHfvBE3MoAzzLo+OqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Xt010m1zjrP; Sun, 7 Jan 2024 23:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407N887l052994; Sun, 7 Jan 2024 23:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N88VM052991; Sun, 7 Jan 2024 23:08:08 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:08 GMT Message-Id: <202401072308.407N88VM052991@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 29d1d72ad529 - stable/13 - llvm: Reduce overlinking with the minimal llvm List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 29d1d72ad5291b2c96f00ba744bdf3db5ec89153 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=29d1d72ad5291b2c96f00ba744bdf3db5ec89153 commit 29d1d72ad5291b2c96f00ba744bdf3db5ec89153 Author: Andrew Turner AuthorDate: 2023-11-09 13:00:51 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:33 +0000 llvm: Reduce overlinking with the minimal llvm We only need to link against libz and libzstd when linking against the fill libllvm, libllvmminimal doesn't use either library. Move adding libz and libzstd to the list of libraries to link against to where we decide to use the full libllvm. Reported by: Cristian Marussi Reported by: Colin S. Gordon Reviewed by: dim Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42528 (cherry picked from commit 83771b1914e182c6324839e05ff82ee6f4a87c98) --- usr.bin/clang/clang.prog.mk | 4 ++-- usr.bin/clang/llvm.prog.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/clang/clang.prog.mk b/usr.bin/clang/clang.prog.mk index c15b846c5aa8..cf48f02359e9 100644 --- a/usr.bin/clang/clang.prog.mk +++ b/usr.bin/clang/clang.prog.mk @@ -14,6 +14,8 @@ LIBDEPS+= llvmminimal .else LIBDEPS+= clang LIBDEPS+= llvm +LIBADD+= z +LIBADD+= zstd .endif .for lib in ${LIBDEPS} @@ -28,7 +30,5 @@ LIBADD+= execinfo LIBADD+= ncursesw .endif LIBADD+= pthread -LIBADD+= z -LIBADD+= zstd .include diff --git a/usr.bin/clang/llvm.prog.mk b/usr.bin/clang/llvm.prog.mk index a66d27f7f1e2..acd50582f768 100644 --- a/usr.bin/clang/llvm.prog.mk +++ b/usr.bin/clang/llvm.prog.mk @@ -12,6 +12,8 @@ CFLAGS+= -I${OBJTOP}/lib/clang/libllvm LIBDEPS+= llvmminimal .else LIBDEPS+= llvm +LIBADD+= z +LIBADD+= zstd .endif .for lib in ${LIBDEPS} @@ -26,7 +28,5 @@ LIBADD+= execinfo LIBADD+= ncursesw .endif LIBADD+= pthread -LIBADD+= z -LIBADD+= zstd .include From nobody Sun Jan 7 23:08:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7Xt147mZz56Dql; Sun, 7 Jan 2024 23:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7Xt12rdtz4P6X; Sun, 7 Jan 2024 23:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oKOlQzjxswyuiSrOUa5UrwRuV4T9aRGPZpUa1xXGyww=; b=K7LbWa38UFTHgnEfzR4eLSSvvYq4hAkSWp6KaCcL9C7Xb1FFZXhSFo4d1FcrgPiErhXuur FADqniYfaqZIak6ZG14VTKpuaax+pEV+k8xxfCNWJjZZeFdt/VMIPoO8pv6t6ucqHf5oui GkiJjqrE6qonBFP/65mZa59HgA8eaZwZEj2rtyOVfcbJXw+3O1bjJcHhviHpi/WbiWz7WJ jpPRNgmFL0pENor2N6K0GyU/3Hc/8hpgvj08OLFlIzJzl5H6qURNKfjysF7WbGPUx4eiMJ uIOJ0IFnnGoKRP4g1lFbQc40PDjJ/W9MKDLslObA43L0pOQ+UFyC00IjG71neQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oKOlQzjxswyuiSrOUa5UrwRuV4T9aRGPZpUa1xXGyww=; b=Gj41YFSog9rYvZrF4xxiJlWBbBzSyCV/dCz+ZR5gC1j6G+VuA+1TVo4LPgCDMI9iu+7rVo nvsl4IhY7shI6hdprrN0y4FyCFSKrIWM2ZsBF4M7m3h4R5BBSDKhFxVJNWhCc63yhbbY4p 7w/dLHxKrOFMOYHdRWyg6oNE+lrJmN0VJNmV17k9K/B0JOlNOghCduo5ZoCcO1qGiUmyWm sGU99TXbeNj2xk09sCNh4k+mXjM3/jkF4KpaBq3FZSqm8iLbyt93aNJQ5LiuHo7pszXI6i hCfKxaaEDtzUJ5XbpKtEq/kIDgMdheGQZgR7RRDYtDd7dUR8ESsjS2JjmTOL+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668889; a=rsa-sha256; cv=none; b=f59/FcOaiYn3k0IaTbjUSuv55qxBX33adQh54gX4vPK5Cuz+KjGfEo0u68Si2DbHykVJvg Akc1GdRQq5kZyJxyAOFn8N5zwfo9xDx79w2h9IBoPR6NbtAriCWtWvJ4USJN7aAooJRdD9 9vZUUWE+SR3ZuBHNQT1hdahAnWEN4Ldiz6N42AZTKmwG7ZHhhpj+Dj/XKtzl+B2aSnyWNl ZaiwUJ032ZtH0DSWsCEfotm2+OT8nNDblYxKi1THWufRZIGjO3z29FPVOyiMhKgQNjaWyk EC09rwRnUtjdCBKfzjUYup/2Y1GTaGUDUoY5hsBXp2HFa5WJbMptgS0qWpyamQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7Xt11wxLzkQC; Sun, 7 Jan 2024 23:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407N890U053054; Sun, 7 Jan 2024 23:08:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N894b053051; Sun, 7 Jan 2024 23:08:09 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:09 GMT Message-Id: <202401072308.407N894b053051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c3eb0b7c1922 - stable/13 - Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c3eb0b7c19221f3a2133ab14d3ffffa61ec0c4bc Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c3eb0b7c19221f3a2133ab14d3ffffa61ec0c4bc commit c3eb0b7c19221f3a2133ab14d3ffffa61ec0c4bc Author: John Baldwin AuthorDate: 2023-11-15 02:34:45 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:34 +0000 Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser): [libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++ These are changes to allow GCC 13 to successfully compile the runtimes stack. Reviewed By: ldionne, #libc, #libunwind, MaskRay Spies: MaskRay, zibi, SeanP, power-llvm-team, mstorsjo, arichardson, libcxx-commits Differential Revision: https://reviews.llvm.org/D151387 Reviewed by: imp, dim, emaste Differential Revision: https://reviews.freebsd.org/D42578 (cherry picked from commit ab43851b0c7bd5f21ade72c3cae3d3ee09eb8891) --- contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 +- contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index ea85e23b8065..4c063e134d8e 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cv) +#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC) template struct remove_cv { using type _LIBCPP_NODEBUG = __remove_cv(_Tp); diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h index e96cc6523b71..1956ac3e5a43 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cvref) +#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC) template using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); #else From nobody Sun Jan 7 23:08:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtH5KdXz56F8Z; Sun, 7 Jan 2024 23:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7XtH4bPYz4Plj; Sun, 7 Jan 2024 23:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OPuFOu0jSIvIusgizGcMYgseouRkWBC9XGqtO8Y1yu8=; b=olnFnsSDEfQYlnftvWFv860KWfmifotxbEBcq0hkNF12wMEfjrwQn86p/9Y7GOSluthic0 fvUSeDCZPxv2iB/2/wpJANVSxTsQpo8kxyJvVxqy6Ny16w6j23VOVMWQ7OXzfwVXgJbu/z i+PeUrLp5SXFITNCjkB+csceOGPEwPUsTs9RYj15UNjS6UxZWMDpf9UD0GkE6A+hbrqbGn KTf5pF3ZqBc7rMSGlWGeRN3BfkDPpRQczrzK4QQL5K4OlU73xzisIzKOxnMPcPYD/j2v6R pW39/+qLmAWFygfyA8VqTIaxX0poGfQbElKNhuIW8Z4xexmOXNaUtk5uboyjIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OPuFOu0jSIvIusgizGcMYgseouRkWBC9XGqtO8Y1yu8=; b=L57gjhS885pQpRy3+wfv9wll8mAeV3yZJvQQrBMiV4eDYHrB8R93MzK6IxOkhuL8cqB1jX MzWWF6s2Mngq429KDiSKBnEGS6fZlOFZEx8+lDw97ncYkWhTev1PDgeMFBVn/YrGZRwj5d 4zW5iDPLe4yJOJrZlnFWQvDQkUoxgvcc7kPXrbITxnk8OkaaftkBbeL+nE+y5E6ZOtQfEr PMtpTGcWLyGiuwParq9IbHgDuHomkpajQAF07Cim0pRog+LYWJw7FjAPeKkpEivY1an6d/ vcfJdO3nabAHKpTx2cO61AZaL23K0ci6PKPRuJE71oGVuR4atV3K1ODr+xnITQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668903; a=rsa-sha256; cv=none; b=gxKlFRb+KMmQ/1I5AWp8S/cz/b5l7FRhNzEo6fjsA5gC4tmv+WzvuscayWfkyj51uclW2m gx5ACR/IPSwr/FzTQyOVMNvBugt9e93WyU8IBpJLVQZFP8hZioko/m2Z5O/75+9n5Vn57n aer8hLvV5JjUjmmz6ElFmBfBYeYs5Bh9JO+rsea9bVe+EmQUkABucKtmxQUuJNrMCd8Lkb aqunyjxFgikF65vCU6I0Jw2sVfja9tfpKF8i2WGyENNsX49csUzqQ0x1o/VhhyTb/4WVN1 u+3Q6GassMCtmJ/9Iz1aatkfE15JJ7socR/aheUMFaY2eUC2OpujdXaG5n4uBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtH3ddyzjZ1; Sun, 7 Jan 2024 23:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407N8Nrr053111; Sun, 7 Jan 2024 23:08:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8AeU053090; Sun, 7 Jan 2024 23:08:10 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:10 GMT Message-Id: <202401072308.407N8AeU053090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 0e1e0ce55681 - stable/13 - Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0e1e0ce556810ad5f9d45485e686f0653530516c Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0e1e0ce556810ad5f9d45485e686f0653530516c commit 0e1e0ce556810ad5f9d45485e686f0653530516c Author: Dimitry Andric AuthorDate: 2023-09-02 21:17:18 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:38 +0000 Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the last commit before the upstream release/17.x branch was created. PR: 273753 MFC after: 1 month (cherry picked from commit 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e) --- Makefile.inc1 | 5 +- ObsoleteFiles.inc | 402 + contrib/llvm-project/FREEBSD-Xlist | 46 +- contrib/llvm-project/clang/include/clang-c/Index.h | 382 +- .../clang/include/clang-c/module.modulemap | 4 - .../llvm-project/clang/include/clang/AST/APValue.h | 6 +- .../clang/include/clang/AST/ASTConsumer.h | 4 +- .../clang/include/clang/AST/ASTContext.h | 45 +- .../clang/include/clang/AST/ASTDiagnostic.h | 3 +- .../clang/include/clang/AST/ASTImporter.h | 1 + .../clang/include/clang/AST/ASTNodeTraverser.h | 13 +- .../clang/include/clang/AST/ASTTypeTraits.h | 9 +- .../clang/include/clang/AST/CXXInheritance.h | 2 +- .../clang/include/clang/AST/CommentSema.h | 2 +- .../clang/include/clang/AST/ComparisonCategories.h | 5 +- .../llvm-project/clang/include/clang/AST/Decl.h | 154 +- .../clang/include/clang/AST/DeclBase.h | 58 +- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 96 +- .../clang/include/clang/AST/DeclObjC.h | 2 +- .../clang/include/clang/AST/DeclTemplate.h | 36 +- .../clang/include/clang/AST/DeclarationName.h | 10 +- .../llvm-project/clang/include/clang/AST/Expr.h | 545 +- .../llvm-project/clang/include/clang/AST/ExprCXX.h | 38 +- .../clang/include/clang/AST/ExprConcepts.h | 6 - .../clang/include/clang/AST/ExternalASTSource.h | 10 +- .../clang/include/clang/AST/IgnoreExpr.h | 8 +- .../llvm-project/clang/include/clang/AST/Mangle.h | 6 +- .../include/clang/AST/MangleNumberingContext.h | 8 + .../clang/include/clang/AST/OpenMPClause.h | 126 + .../clang/include/clang/AST/OperationKinds.def | 8 +- .../clang/include/clang/AST/PrettyPrinter.h | 15 +- .../clang/include/clang/AST/PropertiesBase.td | 58 +- .../clang/include/clang/AST/RawCommentList.h | 13 +- .../clang/include/clang/AST/RecursiveASTVisitor.h | 19 +- .../clang/include/clang/AST/Redeclarable.h | 2 +- .../llvm-project/clang/include/clang/AST/Stmt.h | 51 +- .../llvm-project/clang/include/clang/AST/StmtCXX.h | 31 +- .../clang/include/clang/AST/TemplateBase.h | 54 +- .../clang/include/clang/AST/TemplateName.h | 4 +- .../llvm-project/clang/include/clang/AST/Type.h | 93 +- .../llvm-project/clang/include/clang/AST/TypeLoc.h | 7 +- .../clang/include/clang/AST/TypeProperties.td | 10 +- .../clang/include/clang/AST/UnresolvedSet.h | 12 +- .../clang/include/clang/AST/VTableBuilder.h | 2 - .../clang/include/clang/ASTMatchers/ASTMatchers.h | 106 +- .../clang/ASTMatchers/Dynamic/Diagnostics.h | 6 +- .../clang/Analysis/Analyses/CalledOnceCheck.h | 2 +- .../include/clang/Analysis/Analyses/Consumed.h | 8 +- .../clang/Analysis/Analyses/IntervalPartition.h | 50 + .../clang/Analysis/Analyses/ReachableCode.h | 8 +- .../clang/Analysis/Analyses/ThreadSafetyCommon.h | 2 - .../clang/Analysis/Analyses/ThreadSafetyTIL.h | 9 + .../clang/Analysis/Analyses/ThreadSafetyUtil.h | 4 + .../clang/Analysis/Analyses/UnsafeBufferUsage.h | 27 +- .../Analysis/Analyses/UnsafeBufferUsageGadgets.def | 9 + .../include/clang/Analysis/AnalysisDeclContext.h | 2 +- .../clang/include/clang/Analysis/BodyFarm.h | 3 + .../clang/include/clang/Analysis/CFG.h | 47 - .../clang/include/clang/Analysis/CallGraph.h | 2 +- .../include/clang/Analysis/FlowSensitive/Arena.h | 147 + .../Analysis/FlowSensitive/ControlFlowContext.h | 25 +- .../Analysis/FlowSensitive/DataflowAnalysis.h | 34 +- .../FlowSensitive/DataflowAnalysisContext.h | 232 +- .../Analysis/FlowSensitive/DataflowEnvironment.h | 437 +- .../clang/Analysis/FlowSensitive/DebugSupport.h | 52 - .../include/clang/Analysis/FlowSensitive/Formula.h | 138 + .../include/clang/Analysis/FlowSensitive/Logger.h | 89 + .../clang/Analysis/FlowSensitive/MatchSwitch.h | 15 +- .../FlowSensitive/Models/ChromiumCheckModel.h | 3 +- .../Models/UncheckedOptionalAccessModel.h | 2 +- .../clang/Analysis/FlowSensitive/NoopAnalysis.h | 2 +- .../clang/Analysis/FlowSensitive/RecordOps.h | 76 + .../include/clang/Analysis/FlowSensitive/Solver.h | 24 +- .../clang/Analysis/FlowSensitive/StorageLocation.h | 81 +- .../clang/Analysis/FlowSensitive/Transfer.h | 19 +- .../FlowSensitive/TypeErasedDataflowAnalysis.h | 9 +- .../include/clang/Analysis/FlowSensitive/Value.h | 226 +- .../Analysis/FlowSensitive/WatchedLiteralsSolver.h | 27 +- .../clang/include/clang/Analysis/ProgramPoint.h | 68 +- .../include/clang/Analysis/Support/BumpVector.h | 9 + .../include/clang/Basic/AArch64SVEACLETypes.def | 10 + .../clang/include/clang/Basic/AddressSpaces.h | 3 + .../clang/include/clang/Basic/AlignedAllocation.h | 2 +- .../llvm-project/clang/include/clang/Basic/Attr.td | 216 +- .../clang/include/clang/Basic/AttrDocs.td | 268 +- .../include/clang/Basic/AttributeCommonInfo.h | 138 +- .../clang/include/clang/Basic/Builtins.def | 65 +- .../clang/include/clang/Basic/BuiltinsAArch64.def | 20 +- .../clang/include/clang/Basic/BuiltinsAMDGPU.def | 17 +- .../clang/include/clang/Basic/BuiltinsARM.def | 3 + .../clang/include/clang/Basic/BuiltinsNEON.def | 1 + .../clang/include/clang/Basic/BuiltinsNVPTX.def | 174 +- .../clang/include/clang/Basic/BuiltinsPPC.def | 1457 +- .../clang/include/clang/Basic/BuiltinsRISCV.def | 98 +- .../include/clang/Basic/BuiltinsRISCVVector.def | 1 + .../clang/include/clang/Basic/BuiltinsSME.def | 21 + .../include/clang/Basic/BuiltinsWebAssembly.def | 21 +- .../clang/include/clang/Basic/BuiltinsX86.def | 30 + .../clang/include/clang/Basic/BuiltinsX86_64.def | 5 + .../clang/include/clang/Basic/CodeGenOptions.def | 32 +- .../clang/include/clang/Basic/CodeGenOptions.h | 49 +- .../llvm-project/clang/include/clang/Basic/Cuda.h | 10 +- .../clang/include/clang/Basic/DarwinSDKInfo.h | 2 +- .../clang/include/clang/Basic/Diagnostic.h | 2 +- .../clang/include/clang/Basic/Diagnostic.td | 5 +- .../include/clang/Basic/DiagnosticASTKinds.td | 10 +- .../include/clang/Basic/DiagnosticCommonKinds.td | 36 +- .../clang/include/clang/Basic/DiagnosticDocs.td | 6 + .../include/clang/Basic/DiagnosticDriverKinds.td | 60 +- .../clang/include/clang/Basic/DiagnosticError.h | 4 +- .../include/clang/Basic/DiagnosticFrontendKinds.td | 17 +- .../clang/include/clang/Basic/DiagnosticGroups.td | 82 +- .../clang/include/clang/Basic/DiagnosticIDs.h | 9 +- .../include/clang/Basic/DiagnosticLexKinds.td | 60 +- .../include/clang/Basic/DiagnosticOptions.def | 4 + .../clang/include/clang/Basic/DiagnosticOptions.h | 3 +- .../include/clang/Basic/DiagnosticParseKinds.td | 95 +- .../include/clang/Basic/DiagnosticSemaKinds.td | 320 +- .../clang/Basic/DiagnosticSerializationKinds.td | 11 + .../clang/include/clang/Basic/DirectoryEntry.h | 18 +- .../clang/Basic/ExceptionSpecificationType.h | 5 + .../clang/include/clang/Basic/FPOptions.def | 1 + .../clang/include/clang/Basic/Features.def | 6 + .../clang/include/clang/Basic/FileEntry.h | 36 +- .../clang/include/clang/Basic/FileManager.h | 2 +- .../clang/include/clang/Basic/IdentifierTable.h | 54 +- .../llvm-project/clang/include/clang/Basic/LLVM.h | 5 - .../clang/include/clang/Basic/LangOptions.def | 11 +- .../clang/include/clang/Basic/LangOptions.h | 12 +- .../clang/include/clang/Basic/LangStandard.h | 20 +- .../clang/include/clang/Basic/LangStandards.def | 34 +- .../clang/include/clang/Basic/Linkage.h | 7 - .../clang/include/clang/Basic/Module.h | 112 +- .../clang/include/clang/Basic/ObjCRuntime.h | 2 +- .../include/clang/Basic/OpenCLExtensionTypes.def | 8 +- .../clang/include/clang/Basic/OpenCLExtensions.def | 2 +- .../clang/include/clang/Basic/OpenMPKinds.def | 10 + .../clang/include/clang/Basic/OpenMPKinds.h | 7 + .../clang/include/clang/Basic/ParsedAttrInfo.h | 152 + .../clang/include/clang/Basic/RISCVVTypes.def | 290 + .../clang/include/clang/Basic/SourceManager.h | 5 +- .../clang/include/clang/Basic/Specifiers.h | 5 + .../clang/include/clang/Basic/StmtNodes.td | 4 +- .../clang/include/clang/Basic/TargetBuiltins.h | 25 +- .../clang/include/clang/Basic/TargetCXXABI.h | 6 +- .../clang/include/clang/Basic/TargetID.h | 2 +- .../clang/include/clang/Basic/TargetInfo.h | 51 +- .../clang/include/clang/Basic/TargetOptions.h | 17 +- .../llvm-project/clang/include/clang/Basic/Thunk.h | 8 +- .../clang/include/clang/Basic/TokenKinds.def | 35 +- .../clang/include/clang/Basic/TokenKinds.h | 15 + .../clang/include/clang/Basic/TypeNodes.td | 2 +- .../clang/Basic/WebAssemblyReferenceTypes.def | 40 + .../clang/include/clang/Basic/arm_bf16.td | 2 +- .../clang/include/clang/Basic/arm_neon.td | 6 + .../clang/include/clang/Basic/arm_sme.td | 259 + .../clang/include/clang/Basic/arm_sve.td | 412 +- .../clang/include/clang/Basic/arm_sve_sme_incl.td | 281 + .../include/clang/Basic/riscv_sifive_vector.td | 105 + .../clang/include/clang/Basic/riscv_vector.td | 2230 +-- .../include/clang/Basic/riscv_vector_common.td | 246 + .../clang/include/clang/CodeGen/BackendUtil.h | 5 + .../clang/include/clang/CodeGen/CGFunctionInfo.h | 2 +- .../clang/include/clang/CodeGen/CodeGenAction.h | 5 +- .../CodeGen/ObjectFilePCHContainerOperations.h | 2 +- .../clang/include/clang/Driver/Action.h | 14 +- .../clang/include/clang/Driver/Compilation.h | 11 + .../clang/include/clang/Driver/Distro.h | 5 +- .../clang/include/clang/Driver/Driver.h | 43 +- .../llvm-project/clang/include/clang/Driver/Job.h | 26 +- .../clang/include/clang/Driver/Multilib.h | 122 +- .../clang/include/clang/Driver/MultilibBuilder.h | 134 + .../clang/include/clang/Driver/OffloadBundler.h | 2 +- .../clang/include/clang/Driver/Options.h | 1 + .../clang/include/clang/Driver/Options.td | 830 +- .../clang/include/clang/Driver/SanitizerArgs.h | 7 + .../clang/include/clang/Driver/ToolChain.h | 39 +- .../clang/include/clang/Driver/Types.def | 1 + .../clang/include/clang/Driver/XRayArgs.h | 9 +- .../clang/include/clang/ExtractAPI/API.h | 2 +- .../include/clang/ExtractAPI/APIIgnoresList.h | 20 +- .../include/clang/ExtractAPI/AvailabilityInfo.h | 6 +- .../clang/ExtractAPI/DeclarationFragments.h | 29 + .../clang/ExtractAPI/ExtractAPIActionBase.h | 54 + .../include/clang/ExtractAPI/ExtractAPIVisitor.h | 639 +- .../include/clang/ExtractAPI/FrontendActions.h | 62 +- .../ExtractAPI/Serialization/SerializerBase.h | 118 +- .../Serialization/SymbolGraphSerializer.h | 70 +- .../ExtractAPI/TypedefUnderlyingTypeResolver.h | 0 .../clang/include/clang/Format/Format.h | 546 +- .../clang/include/clang/Frontend/ASTUnit.h | 17 +- .../include/clang/Frontend/CompilerInstance.h | 28 + .../include/clang/Frontend/CompilerInvocation.h | 11 + .../clang/Frontend/DependencyOutputOptions.h | 14 +- .../clang/include/clang/Frontend/FrontendActions.h | 6 +- .../clang/include/clang/Frontend/FrontendOptions.h | 18 +- .../include/clang/Frontend/LayoutOverrideSource.h | 6 + .../include/clang/Frontend/PrecompiledPreamble.h | 7 +- .../clang/include/clang/Frontend/TextDiagnostic.h | 3 +- .../clang/include/clang/Frontend/Utils.h | 11 +- .../clang/include/clang/Interpreter/Interpreter.h | 97 +- .../clang/include/clang/Interpreter/Value.h | 208 + .../clang/Lex/DependencyDirectivesScanner.h | 1 + .../clang/include/clang/Lex/HeaderSearch.h | 47 +- .../llvm-project/clang/include/clang/Lex/Lexer.h | 2 +- .../clang/include/clang/Lex/LiteralSupport.h | 31 +- .../clang/include/clang/Lex/MacroInfo.h | 2 +- .../clang/include/clang/Lex/ModuleMap.h | 72 +- .../clang/include/clang/Lex/MultipleIncludeOpt.h | 6 + .../llvm-project/clang/include/clang/Lex/Pragma.h | 7 + .../clang/include/clang/Lex/Preprocessor.h | 63 +- .../clang/include/clang/Lex/PreprocessorOptions.h | 3 + .../llvm-project/clang/include/clang/Lex/Token.h | 9 +- .../clang/include/clang/Parse/LoopHint.h | 12 +- .../clang/include/clang/Parse/Parser.h | 118 +- .../clang/include/clang/Rewrite/Core/RewriteRope.h | 4 + .../include/clang/Sema/AnalysisBasedWarnings.h | 4 + .../include/clang/Sema/CodeCompleteConsumer.h | 5 +- .../clang/include/clang/Sema/DeclSpec.h | 29 +- .../clang/include/clang/Sema/Designator.h | 201 +- .../clang/Sema/EnterExpressionEvaluationContext.h | 69 + .../clang/include/clang/Sema/ExternalSemaSource.h | 5 + .../include/clang/Sema/HLSLExternalSemaSource.h | 2 +- .../clang/include/clang/Sema/IdentifierResolver.h | 11 +- .../clang/include/clang/Sema/Initialization.h | 3 + .../llvm-project/clang/include/clang/Sema/Lookup.h | 9 + .../clang/Sema/MultiplexExternalSemaSource.h | 3 + .../clang/include/clang/Sema/Overload.h | 3 + .../clang/include/clang/Sema/ParsedAttr.h | 233 +- .../include/clang/Sema/RISCVIntrinsicManager.h | 6 + .../llvm-project/clang/include/clang/Sema/Scope.h | 5 + .../clang/include/clang/Sema/ScopeInfo.h | 16 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 600 +- .../clang/include/clang/Sema/Template.h | 35 +- .../clang/include/clang/Sema/TemplateDeduction.h | 7 + .../include/clang/Serialization/ASTBitCodes.h | 18 +- .../clang/include/clang/Serialization/ASTReader.h | 33 +- .../clang/include/clang/Serialization/ASTWriter.h | 1 - .../clang/Serialization/GlobalModuleIndex.h | 6 - .../clang/include/clang/Serialization/ModuleFile.h | 5 +- .../clang/Serialization/PCHContainerOperations.h | 17 +- .../clang/StaticAnalyzer/Checkers/Checkers.td | 54 +- .../include/clang/StaticAnalyzer/Checkers/Taint.h | 54 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.def | 9 - .../clang/StaticAnalyzer/Core/AnalyzerOptions.h | 20 +- .../StaticAnalyzer/Core/BugReporter/BugReporter.h | 5 +- .../Core/BugReporter/BugReporterVisitors.h | 21 +- .../Core/BugReporter/CommonBugCategories.h | 1 + .../include/clang/StaticAnalyzer/Core/Checker.h | 27 +- .../StaticAnalyzer/Core/PathSensitive/CallEvent.h | 176 +- .../Core/PathSensitive/CheckerContext.h | 4 +- .../StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 22 +- .../Core/PathSensitive/ExplodedGraph.h | 9 +- .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 33 +- .../StaticAnalyzer/Core/PathSensitive/MemRegion.h | 72 +- .../StaticAnalyzer/Core/PathSensitive/Regions.def | 1 + .../Core/PathSensitive/SMTConstraintManager.h | 6 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 16 +- .../StaticAnalyzer/Core/PathSensitive/SymExpr.h | 6 +- .../Core/PathSensitive/SymbolManager.h | 13 +- .../include/clang/Support/RISCVVIntrinsicUtils.h | 26 +- .../clang/include/clang/Testing/CommandLineArgs.h | 5 + .../clang/include/clang/Testing/TestAST.h | 3 + .../DependencyScanning/DependencyScanningTool.h | 95 +- .../DependencyScanning/DependencyScanningWorker.h | 19 +- .../DependencyScanning/ModuleDepCollector.h | 18 +- .../clang/Tooling/Inclusions/HeaderAnalysis.h | 2 +- .../clang/Tooling/Inclusions/HeaderIncludes.h | 2 + .../clang/Tooling/Inclusions/StandardLibrary.h | 37 +- .../clang/Tooling/Inclusions/StdSymbolMap.inc | 1538 -- .../Tooling/Refactoring/RecursiveSymbolVisitor.h | 9 +- .../clang/include/clang/Tooling/Tooling.h | 12 +- .../clang/include/clang/module.modulemap | 199 - .../llvm-project/clang/include/module.modulemap | 205 + .../clang/lib/APINotes/APINotesFormat.h | 4 +- .../llvm-project/clang/lib/ARCMigrate/ARCMT.cpp | 4 +- .../clang/lib/ARCMigrate/FileRemapper.cpp | 3 +- .../llvm-project/clang/lib/ARCMigrate/ObjCMT.cpp | 3 +- .../clang/lib/ARCMigrate/TransProperties.cpp | 2 +- contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 710 +- .../llvm-project/clang/lib/AST/ASTDiagnostic.cpp | 3 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 347 +- .../clang/lib/AST/ASTImporterLookupTable.cpp | 14 + .../clang/lib/AST/ASTStructuralEquivalence.cpp | 45 +- .../llvm-project/clang/lib/AST/ASTTypeTraits.cpp | 15 +- contrib/llvm-project/clang/lib/AST/AttrImpl.cpp | 41 +- .../llvm-project/clang/lib/AST/CXXInheritance.cpp | 3 +- .../clang/lib/AST/ComputeDependence.cpp | 43 +- contrib/llvm-project/clang/lib/AST/Decl.cpp | 296 +- contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 35 + contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 35 +- contrib/llvm-project/clang/lib/AST/DeclPrinter.cpp | 11 +- .../llvm-project/clang/lib/AST/DeclTemplate.cpp | 101 +- .../llvm-project/clang/lib/AST/DeclarationName.cpp | 6 +- contrib/llvm-project/clang/lib/AST/Expr.cpp | 339 +- contrib/llvm-project/clang/lib/AST/ExprCXX.cpp | 61 +- .../llvm-project/clang/lib/AST/ExprConcepts.cpp | 25 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 341 +- .../clang/lib/AST/ExternalASTMerger.cpp | 6 +- .../llvm-project/clang/lib/AST/FormatString.cpp | 13 +- .../llvm-project/clang/lib/AST/Interp/Boolean.h | 6 +- .../clang/lib/AST/Interp/ByteCodeEmitter.cpp | 128 +- .../clang/lib/AST/Interp/ByteCodeEmitter.h | 6 +- .../clang/lib/AST/Interp/ByteCodeExprGen.cpp | 1103 +- .../clang/lib/AST/Interp/ByteCodeExprGen.h | 123 +- .../clang/lib/AST/Interp/ByteCodeStmtGen.cpp | 228 +- .../clang/lib/AST/Interp/ByteCodeStmtGen.h | 5 + .../llvm-project/clang/lib/AST/Interp/Context.cpp | 67 +- .../llvm-project/clang/lib/AST/Interp/Context.h | 17 +- .../clang/lib/AST/Interp/Descriptor.cpp | 53 +- .../llvm-project/clang/lib/AST/Interp/Descriptor.h | 23 +- .../llvm-project/clang/lib/AST/Interp/Disasm.cpp | 20 +- .../clang/lib/AST/Interp/EvalEmitter.cpp | 19 +- .../clang/lib/AST/Interp/EvalEmitter.h | 12 +- .../llvm-project/clang/lib/AST/Interp/Floating.cpp | 22 + .../llvm-project/clang/lib/AST/Interp/Floating.h | 158 + contrib/llvm-project/clang/lib/AST/Interp/Frame.h | 2 +- .../llvm-project/clang/lib/AST/Interp/Function.cpp | 7 +- .../llvm-project/clang/lib/AST/Interp/Function.h | 40 +- .../clang/lib/AST/Interp/FunctionPointer.h | 71 + .../llvm-project/clang/lib/AST/Interp/Integral.h | 31 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 186 +- contrib/llvm-project/clang/lib/AST/Interp/Interp.h | 513 +- .../clang/lib/AST/Interp/InterpBlock.cpp | 67 +- .../clang/lib/AST/Interp/InterpBlock.h | 17 +- .../clang/lib/AST/Interp/InterpBuiltin.cpp | 82 + .../clang/lib/AST/Interp/InterpFrame.cpp | 36 +- .../clang/lib/AST/Interp/InterpFrame.h | 11 +- .../clang/lib/AST/Interp/InterpStack.cpp | 39 +- .../clang/lib/AST/Interp/InterpStack.h | 37 +- .../clang/lib/AST/Interp/InterpState.cpp | 25 +- .../clang/lib/AST/Interp/InterpState.h | 9 +- .../llvm-project/clang/lib/AST/Interp/Opcodes.td | 147 +- .../llvm-project/clang/lib/AST/Interp/Pointer.cpp | 57 +- .../llvm-project/clang/lib/AST/Interp/Pointer.h | 23 +- .../llvm-project/clang/lib/AST/Interp/PrimType.cpp | 2 + .../llvm-project/clang/lib/AST/Interp/PrimType.h | 31 +- .../llvm-project/clang/lib/AST/Interp/Primitives.h | 36 + .../llvm-project/clang/lib/AST/Interp/Program.cpp | 31 +- .../llvm-project/clang/lib/AST/Interp/Program.h | 6 +- .../llvm-project/clang/lib/AST/Interp/Record.cpp | 8 + contrib/llvm-project/clang/lib/AST/Interp/Record.h | 8 +- contrib/llvm-project/clang/lib/AST/Interp/Source.h | 9 +- .../llvm-project/clang/lib/AST/Interp/State.cpp | 17 +- contrib/llvm-project/clang/lib/AST/Interp/State.h | 6 +- .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 228 +- .../llvm-project/clang/lib/AST/JSONNodeDumper.cpp | 13 + .../llvm-project/clang/lib/AST/MicrosoftMangle.cpp | 173 +- contrib/llvm-project/clang/lib/AST/NSAPI.cpp | 2 + .../llvm-project/clang/lib/AST/ODRDiagsEmitter.cpp | 45 +- contrib/llvm-project/clang/lib/AST/ODRHash.cpp | 4 +- .../llvm-project/clang/lib/AST/OpenMPClause.cpp | 72 +- .../clang/lib/AST/PrintfFormatString.cpp | 2 + .../clang/lib/AST/RecordLayoutBuilder.cpp | 40 +- contrib/llvm-project/clang/lib/AST/Stmt.cpp | 5 + contrib/llvm-project/clang/lib/AST/StmtCXX.cpp | 6 +- contrib/llvm-project/clang/lib/AST/StmtOpenMP.cpp | 26 + contrib/llvm-project/clang/lib/AST/StmtPrinter.cpp | 16 +- contrib/llvm-project/clang/lib/AST/StmtProfile.cpp | 88 +- .../llvm-project/clang/lib/AST/TemplateBase.cpp | 7 +- .../llvm-project/clang/lib/AST/TemplateName.cpp | 9 + .../llvm-project/clang/lib/AST/TextNodeDumper.cpp | 12 +- contrib/llvm-project/clang/lib/AST/Type.cpp | 182 +- contrib/llvm-project/clang/lib/AST/TypeLoc.cpp | 2 + contrib/llvm-project/clang/lib/AST/TypePrinter.cpp | 120 +- .../llvm-project/clang/lib/AST/VTableBuilder.cpp | 2 +- .../clang/lib/ASTMatchers/ASTMatchersInternal.cpp | 7 + .../clang/lib/ASTMatchers/Dynamic/Marshallers.h | 2 +- .../clang/lib/ASTMatchers/Dynamic/Registry.cpp | 7 +- .../llvm-project/clang/lib/Analysis/BodyFarm.cpp | 1 + contrib/llvm-project/clang/lib/Analysis/CFG.cpp | 441 +- .../clang/lib/Analysis/ExprMutationAnalyzer.cpp | 4 +- .../clang/lib/Analysis/FlowSensitive/Arena.cpp | 98 + .../Analysis/FlowSensitive/ControlFlowContext.cpp | 60 +- .../FlowSensitive/DataflowAnalysisContext.cpp | 401 +- .../Analysis/FlowSensitive/DataflowEnvironment.cpp | 744 +- .../lib/Analysis/FlowSensitive/DebugSupport.cpp | 208 +- .../clang/lib/Analysis/FlowSensitive/Formula.cpp | 82 + .../lib/Analysis/FlowSensitive/HTMLLogger.cpp | 536 + .../lib/Analysis/FlowSensitive/HTMLLogger.css | 142 + .../lib/Analysis/FlowSensitive/HTMLLogger.html | 107 + .../clang/lib/Analysis/FlowSensitive/HTMLLogger.js | 219 + .../clang/lib/Analysis/FlowSensitive/Logger.cpp | 108 + .../FlowSensitive/Models/ChromiumCheckModel.cpp | 6 +- .../Models/UncheckedOptionalAccessModel.cpp | 535 +- .../clang/lib/Analysis/FlowSensitive/RecordOps.cpp | 117 + .../clang/lib/Analysis/FlowSensitive/Transfer.cpp | 591 +- .../FlowSensitive/TypeErasedDataflowAnalysis.cpp | 307 +- .../FlowSensitive/WatchedLiteralsSolver.cpp | 333 +- .../clang/lib/Analysis/IntervalPartition.cpp | 116 + .../clang/lib/Analysis/ReachableCode.cpp | 12 +- .../clang/lib/Analysis/RetainSummaryManager.cpp | 12 +- .../clang/lib/Analysis/ThreadSafety.cpp | 7 +- .../clang/lib/Analysis/ThreadSafetyCommon.cpp | 7 +- .../clang/lib/Analysis/UninitializedValues.cpp | 53 +- .../clang/lib/Analysis/UnsafeBufferUsage.cpp | 1917 ++- .../llvm-project/clang/lib/Basic/Attributes.cpp | 22 +- contrib/llvm-project/clang/lib/Basic/Builtins.cpp | 2 +- contrib/llvm-project/clang/lib/Basic/Cuda.cpp | 12 +- .../llvm-project/clang/lib/Basic/Diagnostic.cpp | 44 +- .../llvm-project/clang/lib/Basic/DiagnosticIDs.cpp | 21 +- .../llvm-project/clang/lib/Basic/FileManager.cpp | 14 +- .../clang/lib/Basic/IdentifierTable.cpp | 43 +- .../llvm-project/clang/lib/Basic/LangOptions.cpp | 11 +- .../llvm-project/clang/lib/Basic/LangStandards.cpp | 10 +- contrib/llvm-project/clang/lib/Basic/Module.cpp | 65 +- .../llvm-project/clang/lib/Basic/OpenCLOptions.cpp | 2 +- .../llvm-project/clang/lib/Basic/OpenMPKinds.cpp | 31 +- .../clang/lib/Basic/ParsedAttrInfo.cpp | 32 + contrib/llvm-project/clang/lib/Basic/Sarif.cpp | 8 +- .../llvm-project/clang/lib/Basic/SourceManager.cpp | 5 +- contrib/llvm-project/clang/lib/Basic/TargetID.cpp | 6 +- .../llvm-project/clang/lib/Basic/TargetInfo.cpp | 10 +- contrib/llvm-project/clang/lib/Basic/Targets.cpp | 474 +- contrib/llvm-project/clang/lib/Basic/Targets.h | 4 +- .../clang/lib/Basic/Targets/AArch64.cpp | 204 +- .../llvm-project/clang/lib/Basic/Targets/AArch64.h | 38 +- .../clang/lib/Basic/Targets/AMDGPU.cpp | 186 +- .../llvm-project/clang/lib/Basic/Targets/AMDGPU.h | 23 +- contrib/llvm-project/clang/lib/Basic/Targets/ARC.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 20 +- contrib/llvm-project/clang/lib/Basic/Targets/ARM.h | 8 +- .../llvm-project/clang/lib/Basic/Targets/AVR.cpp | 18 +- contrib/llvm-project/clang/lib/Basic/Targets/AVR.h | 5 +- contrib/llvm-project/clang/lib/Basic/Targets/BPF.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/CSKY.cpp | 7 +- .../llvm-project/clang/lib/Basic/Targets/CSKY.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/DirectX.h | 7 +- .../clang/lib/Basic/Targets/Hexagon.cpp | 2 - .../llvm-project/clang/lib/Basic/Targets/Hexagon.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/Lanai.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/Le64.cpp | 1 - .../llvm-project/clang/lib/Basic/Targets/Le64.h | 4 +- .../clang/lib/Basic/Targets/LoongArch.cpp | 101 +- .../clang/lib/Basic/Targets/LoongArch.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/M68k.cpp | 19 +- .../llvm-project/clang/lib/Basic/Targets/M68k.h | 6 +- .../clang/lib/Basic/Targets/MSP430.cpp | 1 - .../llvm-project/clang/lib/Basic/Targets/MSP430.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/Mips.cpp | 24 - .../llvm-project/clang/lib/Basic/Targets/Mips.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.cpp | 10 +- .../llvm-project/clang/lib/Basic/Targets/NVPTX.h | 8 +- .../clang/lib/Basic/Targets/OSTargets.cpp | 14 +- .../clang/lib/Basic/Targets/OSTargets.h | 100 +- .../llvm-project/clang/lib/Basic/Targets/PNaCl.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 15 +- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 54 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 18 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.h | 9 +- .../llvm-project/clang/lib/Basic/Targets/SPIR.h | 63 +- .../llvm-project/clang/lib/Basic/Targets/Sparc.h | 4 +- .../llvm-project/clang/lib/Basic/Targets/SystemZ.h | 19 +- contrib/llvm-project/clang/lib/Basic/Targets/TCE.h | 7 +- .../llvm-project/clang/lib/Basic/Targets/VE.cpp | 6 - contrib/llvm-project/clang/lib/Basic/Targets/VE.h | 4 +- .../clang/lib/Basic/Targets/WebAssembly.cpp | 1 + .../clang/lib/Basic/Targets/WebAssembly.h | 30 +- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 89 +- contrib/llvm-project/clang/lib/Basic/Targets/X86.h | 43 +- .../llvm-project/clang/lib/Basic/Targets/XCore.h | 4 +- contrib/llvm-project/clang/lib/CodeGen/ABIInfo.cpp | 231 + contrib/llvm-project/clang/lib/CodeGen/ABIInfo.h | 244 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp | 452 + .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.h | 152 + contrib/llvm-project/clang/lib/CodeGen/Address.h | 108 +- .../llvm-project/clang/lib/CodeGen/BackendUtil.cpp | 186 +- .../llvm-project/clang/lib/CodeGen/CGAtomic.cpp | 146 +- .../llvm-project/clang/lib/CodeGen/CGBlocks.cpp | 37 +- contrib/llvm-project/clang/lib/CodeGen/CGBlocks.h | 6 - contrib/llvm-project/clang/lib/CodeGen/CGBuilder.h | 49 +- .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 1508 +- .../llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | 52 +- contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp | 19 +- .../llvm-project/clang/lib/CodeGen/CGCXXABI.cpp | 13 +- contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.h | 24 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 401 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 12 +- contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 50 +- .../llvm-project/clang/lib/CodeGen/CGCleanup.cpp | 6 +- .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 146 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 351 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.h | 52 +- contrib/llvm-project/clang/lib/CodeGen/CGDecl.cpp | 147 +- .../llvm-project/clang/lib/CodeGen/CGDeclCXX.cpp | 27 +- .../llvm-project/clang/lib/CodeGen/CGException.cpp | 12 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 346 +- .../llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 40 +- .../llvm-project/clang/lib/CodeGen/CGExprCXX.cpp | 95 +- .../clang/lib/CodeGen/CGExprComplex.cpp | 7 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 92 +- .../clang/lib/CodeGen/CGExprScalar.cpp | 133 +- .../clang/lib/CodeGen/CGGPUBuiltin.cpp | 9 +- .../clang/lib/CodeGen/CGHLSLRuntime.cpp | 2 +- .../clang/lib/CodeGen/CGNonTrivialStruct.cpp | 50 +- contrib/llvm-project/clang/lib/CodeGen/CGObjC.cpp | 33 +- .../llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp | 14 +- .../llvm-project/clang/lib/CodeGen/CGObjCMac.cpp | 38 +- .../clang/lib/CodeGen/CGObjCRuntime.cpp | 17 +- .../clang/lib/CodeGen/CGOpenCLRuntime.cpp | 43 +- .../clang/lib/CodeGen/CGOpenCLRuntime.h | 6 +- .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 1677 +-- .../clang/lib/CodeGen/CGOpenMPRuntime.h | 215 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 227 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 80 +- .../clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 25 +- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 238 +- .../clang/lib/CodeGen/CGStmtOpenMP.cpp | 400 +- contrib/llvm-project/clang/lib/CodeGen/CGVTT.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/CGVTables.cpp | 83 +- contrib/llvm-project/clang/lib/CodeGen/CGVTables.h | 10 - contrib/llvm-project/clang/lib/CodeGen/CGValue.h | 39 +- .../clang/lib/CodeGen/CodeGenAction.cpp | 159 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 103 +- .../clang/lib/CodeGen/CodeGenFunction.h | 92 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 538 +- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 31 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.h | 7 +- .../clang/lib/CodeGen/CodeGenTypes.cpp | 227 +- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 14 - .../clang/lib/CodeGen/ConstantEmitter.h | 2 +- .../clang/lib/CodeGen/CoverageMappingGen.cpp | 91 +- .../clang/lib/CodeGen/CoverageMappingGen.h | 1 - .../llvm-project/clang/lib/CodeGen/EHScopeStack.h | 9 + .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 393 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 101 +- .../clang/lib/CodeGen/ModuleBuilder.cpp | 2 +- .../CodeGen/ObjectFilePCHContainerOperations.cpp | 11 +- .../clang/lib/CodeGen/SanitizerMetadata.cpp | 5 - .../clang/lib/CodeGen/SanitizerMetadata.h | 1 - .../clang/lib/CodeGen/SwiftCallingConv.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 12397 +--------------- .../llvm-project/clang/lib/CodeGen/TargetInfo.h | 176 +- .../clang/lib/CodeGen/Targets/AArch64.cpp | 824 ++ .../clang/lib/CodeGen/Targets/AMDGPU.cpp | 601 + .../llvm-project/clang/lib/CodeGen/Targets/ARC.cpp | 158 + .../llvm-project/clang/lib/CodeGen/Targets/ARM.cpp | 819 ++ .../llvm-project/clang/lib/CodeGen/Targets/AVR.cpp | 154 + .../llvm-project/clang/lib/CodeGen/Targets/BPF.cpp | 100 + .../clang/lib/CodeGen/Targets/CSKY.cpp | 175 + .../clang/lib/CodeGen/Targets/Hexagon.cpp | 423 + .../clang/lib/CodeGen/Targets/Lanai.cpp | 154 + .../clang/lib/CodeGen/Targets/LoongArch.cpp | 449 + .../clang/lib/CodeGen/Targets/M68k.cpp | 55 + .../clang/lib/CodeGen/Targets/MSP430.cpp | 94 + .../clang/lib/CodeGen/Targets/Mips.cpp | 441 + .../clang/lib/CodeGen/Targets/NVPTX.cpp | 309 + .../clang/lib/CodeGen/Targets/PNaCl.cpp | 109 + .../llvm-project/clang/lib/CodeGen/Targets/PPC.cpp | 972 ++ .../clang/lib/CodeGen/Targets/RISCV.cpp | 519 + .../clang/lib/CodeGen/Targets/SPIR.cpp | 218 + .../clang/lib/CodeGen/Targets/Sparc.cpp | 409 + .../clang/lib/CodeGen/Targets/SystemZ.cpp | 538 + .../llvm-project/clang/lib/CodeGen/Targets/TCE.cpp | 82 + .../llvm-project/clang/lib/CodeGen/Targets/VE.cpp | 71 + .../clang/lib/CodeGen/Targets/WebAssembly.cpp | 173 + .../llvm-project/clang/lib/CodeGen/Targets/X86.cpp | 3402 +++++ .../clang/lib/CodeGen/Targets/XCore.cpp | 662 + .../clang/lib/CrossTU/CrossTranslationUnit.cpp | 14 +- contrib/llvm-project/clang/lib/Driver/Action.cpp | 7 + .../llvm-project/clang/lib/Driver/Compilation.cpp | 2 +- contrib/llvm-project/clang/lib/Driver/Distro.cpp | 6 +- contrib/llvm-project/clang/lib/Driver/Driver.cpp | 409 +- contrib/llvm-project/clang/lib/Driver/Job.cpp | 44 +- contrib/llvm-project/clang/lib/Driver/Multilib.cpp | 334 +- .../clang/lib/Driver/MultilibBuilder.cpp | 197 + .../clang/lib/Driver/OffloadBundler.cpp | 28 +- .../clang/lib/Driver/SanitizerArgs.cpp | 106 +- .../llvm-project/clang/lib/Driver/ToolChain.cpp | 157 +- .../clang/lib/Driver/ToolChains/AIX.cpp | 147 +- .../llvm-project/clang/lib/Driver/ToolChains/AIX.h | 4 + .../clang/lib/Driver/ToolChains/AMDGPU.cpp | 103 +- .../clang/lib/Driver/ToolChains/AMDGPU.h | 9 +- .../clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 4 +- .../clang/lib/Driver/ToolChains/AVR.cpp | 16 +- .../llvm-project/clang/lib/Driver/ToolChains/AVR.h | 2 + .../clang/lib/Driver/ToolChains/Ananas.cpp | 4 +- .../clang/lib/Driver/ToolChains/Arch/AArch64.cpp | 58 +- .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 157 +- .../clang/lib/Driver/ToolChains/Arch/ARM.h | 19 +- .../clang/lib/Driver/ToolChains/Arch/CSKY.cpp | 6 +- .../clang/lib/Driver/ToolChains/Arch/LoongArch.cpp | 120 +- .../clang/lib/Driver/ToolChains/Arch/M68k.cpp | 50 +- .../clang/lib/Driver/ToolChains/Arch/M68k.h | 8 - .../clang/lib/Driver/ToolChains/Arch/Mips.cpp | 11 - .../clang/lib/Driver/ToolChains/Arch/Mips.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 11 +- .../clang/lib/Driver/ToolChains/Arch/PPC.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 38 +- .../clang/lib/Driver/ToolChains/Arch/RISCV.h | 2 +- .../clang/lib/Driver/ToolChains/Arch/Sparc.cpp | 8 +- .../clang/lib/Driver/ToolChains/Arch/SystemZ.cpp | 2 +- .../clang/lib/Driver/ToolChains/Arch/X86.cpp | 11 +- .../clang/lib/Driver/ToolChains/Arch/X86.h | 2 +- .../clang/lib/Driver/ToolChains/BareMetal.cpp | 342 +- .../clang/lib/Driver/ToolChains/BareMetal.h | 21 + .../clang/lib/Driver/ToolChains/CSKYToolChain.cpp | 15 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 803 +- .../clang/lib/Driver/ToolChains/Clang.h | 8 +- .../clang/lib/Driver/ToolChains/CloudABI.cpp | 4 +- .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 360 +- .../clang/lib/Driver/ToolChains/CommonArgs.h | 23 +- .../clang/lib/Driver/ToolChains/CrossWindows.cpp | 3 +- .../clang/lib/Driver/ToolChains/CrossWindows.h | 1 - .../clang/lib/Driver/ToolChains/Cuda.cpp | 49 +- .../clang/lib/Driver/ToolChains/Cuda.h | 14 +- .../clang/lib/Driver/ToolChains/Darwin.cpp | 136 +- .../clang/lib/Driver/ToolChains/Darwin.h | 7 +- .../clang/lib/Driver/ToolChains/Flang.cpp | 213 +- .../clang/lib/Driver/ToolChains/Flang.h | 19 + .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 8 +- .../clang/lib/Driver/ToolChains/Fuchsia.cpp | 148 +- .../clang/lib/Driver/ToolChains/Fuchsia.h | 17 +- .../clang/lib/Driver/ToolChains/Gnu.cpp | 851 +- .../llvm-project/clang/lib/Driver/ToolChains/Gnu.h | 9 +- .../clang/lib/Driver/ToolChains/HIPAMD.cpp | 47 +- .../clang/lib/Driver/ToolChains/HIPSPV.cpp | 4 +- .../clang/lib/Driver/ToolChains/HIPSPV.h | 3 +- .../clang/lib/Driver/ToolChains/HIPUtility.cpp | 2 +- .../clang/lib/Driver/ToolChains/HLSL.cpp | 57 +- .../clang/lib/Driver/ToolChains/HLSL.h | 24 + .../clang/lib/Driver/ToolChains/Hexagon.cpp | 20 +- .../clang/lib/Driver/ToolChains/Hexagon.h | 3 +- .../clang/lib/Driver/ToolChains/Hurd.cpp | 2 +- .../clang/lib/Driver/ToolChains/LazyDetector.h | 45 + .../clang/lib/Driver/ToolChains/Linux.cpp | 87 +- .../clang/lib/Driver/ToolChains/MSP430.cpp | 1 - .../clang/lib/Driver/ToolChains/MSVC.cpp | 65 +- .../clang/lib/Driver/ToolChains/MSVC.h | 10 +- .../clang/lib/Driver/ToolChains/MinGW.cpp | 8 +- .../clang/lib/Driver/ToolChains/MinGW.h | 1 - .../clang/lib/Driver/ToolChains/MipsLinux.cpp | 12 +- .../clang/lib/Driver/ToolChains/MipsLinux.h | 1 - .../clang/lib/Driver/ToolChains/Myriad.cpp | 6 +- .../clang/lib/Driver/ToolChains/NetBSD.cpp | 78 +- .../clang/lib/Driver/ToolChains/OHOS.cpp | 419 + .../clang/lib/Driver/ToolChains/OHOS.h | 95 + .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 41 +- .../clang/lib/Driver/ToolChains/PS4CPU.cpp | 112 +- .../clang/lib/Driver/ToolChains/PS4CPU.h | 9 +- .../clang/lib/Driver/ToolChains/RISCVToolchain.cpp | 12 +- .../clang/lib/Driver/ToolChains/RISCVToolchain.h | 2 +- .../clang/lib/Driver/ToolChains/ROCm.h | 2 +- .../clang/lib/Driver/ToolChains/SPIRV.h | 3 - .../clang/lib/Driver/ToolChains/Solaris.cpp | 7 +- .../clang/lib/Driver/ToolChains/VEToolchain.cpp | 9 +- .../clang/lib/Driver/ToolChains/WebAssembly.cpp | 10 +- .../clang/lib/Driver/ToolChains/WebAssembly.h | 1 - .../clang/lib/Driver/ToolChains/XCore.h | 1 + .../clang/lib/Driver/ToolChains/ZOS.cpp | 310 +- .../llvm-project/clang/lib/Driver/ToolChains/ZOS.h | 56 +- contrib/llvm-project/clang/lib/Driver/Types.cpp | 4 + contrib/llvm-project/clang/lib/Driver/XRayArgs.cpp | 152 +- contrib/llvm-project/clang/lib/ExtractAPI/API.cpp | 5 +- .../clang/lib/ExtractAPI/APIIgnoresList.cpp | 31 +- .../clang/lib/ExtractAPI/AvailabilityInfo.cpp | 4 +- .../clang/lib/ExtractAPI/DeclarationFragments.cpp | 57 +- .../clang/lib/ExtractAPI/ExtractAPIConsumer.cpp | 194 +- .../clang/lib/ExtractAPI/ExtractAPIVisitor.cpp | 560 - .../Serialization/SymbolGraphSerializer.cpp | 107 +- .../ExtractAPI/TypedefUnderlyingTypeResolver.cpp | 2 +- .../clang/lib/Format/AffectedRangeManager.cpp | 2 +- .../clang/lib/Format/BreakableToken.cpp | 10 +- .../clang/lib/Format/ContinuationIndenter.cpp | 89 +- .../clang/lib/Format/DefinitionBlockSeparator.cpp | 10 +- contrib/llvm-project/clang/lib/Format/Format.cpp | 286 +- .../llvm-project/clang/lib/Format/FormatToken.cpp | 17 +- .../llvm-project/clang/lib/Format/FormatToken.h | 295 +- .../clang/lib/Format/FormatTokenLexer.cpp | 49 +- .../clang/lib/Format/FormatTokenLexer.h | 4 + .../clang/lib/Format/FormatTokenSource.h | 267 + .../lib/Format/IntegerLiteralSeparatorFixer.cpp | 4 +- .../clang/lib/Format/MacroExpander.cpp | 34 +- contrib/llvm-project/clang/lib/Format/Macros.h | 21 +- .../clang/lib/Format/NamespaceEndCommentsFixer.cpp | 8 +- .../clang/lib/Format/QualifierAlignmentFixer.cpp | 544 +- .../clang/lib/Format/QualifierAlignmentFixer.h | 41 +- .../clang/lib/Format/SortJavaScriptImports.cpp | 35 +- .../clang/lib/Format/TokenAnalyzer.cpp | 6 +- .../llvm-project/clang/lib/Format/TokenAnalyzer.h | 2 +- .../clang/lib/Format/TokenAnnotator.cpp | 613 +- .../llvm-project/clang/lib/Format/TokenAnnotator.h | 38 +- .../clang/lib/Format/UnwrappedLineFormatter.cpp | 195 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 688 +- .../clang/lib/Format/UnwrappedLineParser.h | 76 +- .../clang/lib/Format/WhitespaceManager.cpp | 195 +- .../clang/lib/Format/WhitespaceManager.h | 7 +- .../clang/lib/Frontend/ASTConsumers.cpp | 25 +- .../llvm-project/clang/lib/Frontend/ASTMerge.cpp | 2 +- .../llvm-project/clang/lib/Frontend/ASTUnit.cpp | 54 +- .../clang/lib/Frontend/CompilerInstance.cpp | 36 +- .../clang/lib/Frontend/CompilerInvocation.cpp | 551 +- .../Frontend/CreateInvocationFromCommandLine.cpp | 2 +- .../clang/lib/Frontend/DependencyFile.cpp | 50 +- .../clang/lib/Frontend/DiagnosticRenderer.cpp | 14 +- .../clang/lib/Frontend/FrontendAction.cpp | 57 +- .../clang/lib/Frontend/FrontendActions.cpp | 28 +- .../clang/lib/Frontend/HeaderIncludeGen.cpp | 49 +- .../clang/lib/Frontend/InitPreprocessor.cpp | 90 +- .../clang/lib/Frontend/LayoutOverrideSource.cpp | 104 +- .../lib/Frontend/ModuleDependencyCollector.cpp | 31 +- .../clang/lib/Frontend/PrecompiledPreamble.cpp | 37 +- .../clang/lib/Frontend/PrintPreprocessedOutput.cpp | 6 +- .../clang/lib/Frontend/Rewrite/FrontendActions.cpp | 9 +- .../lib/Frontend/SerializedDiagnosticPrinter.cpp | 6 +- .../clang/lib/Frontend/TextDiagnostic.cpp | 677 +- .../lib/Frontend/VerifyDiagnosticConsumer.cpp | 4 +- .../lib/FrontendTool/ExecuteCompilerInvocation.cpp | 8 + .../clang/lib/Headers/__clang_cuda_intrinsics.h | 191 + .../clang/lib/Headers/__clang_hip_cmath.h | 2 +- .../lib/Headers/__clang_hip_libdevice_declares.h | 62 +- .../clang/lib/Headers/__clang_hip_math.h | 127 +- .../lib/Headers/__clang_hip_runtime_wrapper.h | 13 + contrib/llvm-project/clang/lib/Headers/adxintrin.h | 203 +- contrib/llvm-project/clang/lib/Headers/altivec.h | 260 +- .../clang/lib/Headers/amxcomplexintrin.h | 169 + contrib/llvm-project/clang/lib/Headers/arm_acle.h | 22 +- .../llvm-project/clang/lib/Headers/avx2intrin.h | 4117 +++++- .../llvm-project/clang/lib/Headers/avx512fintrin.h | 24 +- .../clang/lib/Headers/avx512fp16intrin.h | 20 +- contrib/llvm-project/clang/lib/Headers/avxintrin.h | 27 +- .../clang/lib/Headers/avxvnniint16intrin.h | 473 + .../llvm-project/clang/lib/Headers/bmi2intrin.h | 200 +- .../clang/lib/Headers/clflushoptintrin.h | 9 + .../llvm-project/clang/lib/Headers/clzerointrin.h | 12 +- contrib/llvm-project/clang/lib/Headers/cpuid.h | 10 + .../Headers/cuda_wrappers/bits/shared_ptr_base.h | 9 + contrib/llvm-project/clang/lib/Headers/fmaintrin.h | 564 + .../clang/lib/Headers/hlsl/hlsl_intrinsics.h | 257 + contrib/llvm-project/clang/lib/Headers/immintrin.h | 124 +- contrib/llvm-project/clang/lib/Headers/limits.h | 6 +- .../clang/lib/Headers/llvm_libc_wrappers/ctype.h | 85 + .../lib/Headers/llvm_libc_wrappers/inttypes.h | 34 + .../llvm_libc_wrappers/llvm-libc-decls/README.txt | 6 + .../clang/lib/Headers/llvm_libc_wrappers/stdio.h | 34 + .../clang/lib/Headers/llvm_libc_wrappers/stdlib.h | 42 + .../clang/lib/Headers/llvm_libc_wrappers/string.h | 37 + .../llvm-project/clang/lib/Headers/mwaitxintrin.h | 29 + .../llvm-project/clang/lib/Headers/opencl-c-base.h | 3 + .../__clang_openmp_device_functions.h | 1 - .../clang/lib/Headers/openmp_wrappers/new | 2 +- contrib/llvm-project/clang/lib/Headers/pmmintrin.h | 18 +- .../clang/lib/Headers/ppc_wrappers/emmintrin.h | 3 +- .../clang/lib/Headers/ppc_wrappers/smmintrin.h | 4 +- .../llvm-project/clang/lib/Headers/rdseedintrin.h | 67 +- .../llvm-project/clang/lib/Headers/riscv_ntlh.h | 28 + .../llvm-project/clang/lib/Headers/sha512intrin.h | 200 + contrib/llvm-project/clang/lib/Headers/shaintrin.h | 128 + .../llvm-project/clang/lib/Headers/sifive_vector.h | 16 + contrib/llvm-project/clang/lib/Headers/sm3intrin.h | 238 + contrib/llvm-project/clang/lib/Headers/sm4intrin.h | 269 + contrib/llvm-project/clang/lib/Headers/stdalign.h | 5 + contrib/llvm-project/clang/lib/Headers/stdatomic.h | 11 +- contrib/llvm-project/clang/lib/Headers/stddef.h | 5 + .../llvm-project/clang/lib/Headers/wasm_simd128.h | 144 +- .../llvm-project/clang/lib/Headers/xsavecintrin.h | 50 + contrib/llvm-project/clang/lib/Index/IndexBody.cpp | 20 +- contrib/llvm-project/clang/lib/Index/IndexDecl.cpp | 1 + .../llvm-project/clang/lib/Index/IndexSymbol.cpp | 1 - .../llvm-project/clang/lib/Index/USRGeneration.cpp | 16 + .../clang/lib/Interpreter/DeviceOffload.cpp | 176 + .../clang/lib/Interpreter/DeviceOffload.h | 51 + .../clang/lib/Interpreter/IncrementalExecutor.cpp | 27 +- .../clang/lib/Interpreter/IncrementalExecutor.h | 6 +- .../clang/lib/Interpreter/IncrementalParser.cpp | 149 +- .../clang/lib/Interpreter/IncrementalParser.h | 19 +- .../clang/lib/Interpreter/Interpreter.cpp | 564 +- .../clang/lib/Interpreter/InterpreterUtils.cpp | 111 + .../clang/lib/Interpreter/InterpreterUtils.h | 54 + .../llvm-project/clang/lib/Interpreter/Value.cpp | 266 + .../clang/lib/Lex/DependencyDirectivesScanner.cpp | 131 +- contrib/llvm-project/clang/lib/Lex/HeaderMap.cpp | 6 +- .../llvm-project/clang/lib/Lex/HeaderSearch.cpp | 159 +- .../clang/lib/Lex/InitHeaderSearch.cpp | 33 +- contrib/llvm-project/clang/lib/Lex/Lexer.cpp | 38 +- .../llvm-project/clang/lib/Lex/LiteralSupport.cpp | 148 +- contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp | 281 +- .../llvm-project/clang/lib/Lex/PPDirectives.cpp | 220 +- .../llvm-project/clang/lib/Lex/PPExpressions.cpp | 10 +- .../llvm-project/clang/lib/Lex/PPLexerChange.cpp | 43 +- .../clang/lib/Lex/PPMacroExpansion.cpp | 30 +- contrib/llvm-project/clang/lib/Lex/Pragma.cpp | 134 +- .../clang/lib/Lex/PreprocessingRecord.cpp | 7 +- .../llvm-project/clang/lib/Lex/Preprocessor.cpp | 79 +- contrib/llvm-project/clang/lib/Lex/TokenLexer.cpp | 5 +- contrib/llvm-project/clang/lib/Parse/ParseAST.cpp | 22 +- .../clang/lib/Parse/ParseCXXInlineMethods.cpp | 10 +- contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 431 +- .../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 139 +- contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 77 +- .../llvm-project/clang/lib/Parse/ParseExprCXX.cpp | 190 +- contrib/llvm-project/clang/lib/Parse/ParseHLSL.cpp | 2 +- contrib/llvm-project/clang/lib/Parse/ParseInit.cpp | 27 +- contrib/llvm-project/clang/lib/Parse/ParseObjc.cpp | 7 +- .../llvm-project/clang/lib/Parse/ParseOpenMP.cpp | 104 +- .../llvm-project/clang/lib/Parse/ParsePragma.cpp | 68 +- contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp | 49 +- .../llvm-project/clang/lib/Parse/ParseTemplate.cpp | 47 +- .../clang/lib/Parse/ParseTentative.cpp | 134 +- contrib/llvm-project/clang/lib/Parse/Parser.cpp | 64 +- .../llvm-project/clang/lib/Rewrite/Rewriter.cpp | 77 +- .../clang/lib/Sema/AnalysisBasedWarnings.cpp | 233 +- .../clang/lib/Sema/CodeCompleteConsumer.cpp | 3 + .../clang/lib/Sema/HLSLExternalSemaSource.cpp | 4 +- .../clang/lib/Sema/IdentifierResolver.cpp | 9 +- .../clang/lib/Sema/JumpDiagnostics.cpp | 147 +- .../clang/lib/Sema/MultiplexExternalSemaSource.cpp | 6 + contrib/llvm-project/clang/lib/Sema/ParsedAttr.cpp | 23 +- contrib/llvm-project/clang/lib/Sema/Scope.cpp | 6 +- contrib/llvm-project/clang/lib/Sema/ScopeInfo.cpp | 1 + contrib/llvm-project/clang/lib/Sema/Sema.cpp | 158 +- contrib/llvm-project/clang/lib/Sema/SemaAccess.cpp | 10 + contrib/llvm-project/clang/lib/Sema/SemaAttr.cpp | 6 +- .../clang/lib/Sema/SemaCXXScopeSpec.cpp | 112 +- contrib/llvm-project/clang/lib/Sema/SemaCast.cpp | 70 +- .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 1544 +- .../clang/lib/Sema/SemaCodeComplete.cpp | 56 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 225 +- .../llvm-project/clang/lib/Sema/SemaCoroutine.cpp | 168 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 420 +- .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 410 +- .../llvm-project/clang/lib/Sema/SemaDeclCXX.cpp | 573 +- .../clang/lib/Sema/SemaExceptionSpec.cpp | 6 + contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 1238 +- .../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 167 +- .../llvm-project/clang/lib/Sema/SemaExprMember.cpp | 9 +- .../llvm-project/clang/lib/Sema/SemaExprObjC.cpp | 4 + contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 648 +- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 796 +- contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 251 +- contrib/llvm-project/clang/lib/Sema/SemaModule.cpp | 314 +- .../clang/lib/Sema/SemaObjCProperty.cpp | 13 +- contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 804 +- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 391 +- .../clang/lib/Sema/SemaPseudoObject.cpp | 7 +- .../clang/lib/Sema/SemaRISCVVectorLookup.cpp | 114 +- contrib/llvm-project/clang/lib/Sema/SemaSYCL.cpp | 16 - contrib/llvm-project/clang/lib/Sema/SemaStmt.cpp | 108 +- .../llvm-project/clang/lib/Sema/SemaStmtAsm.cpp | 1 + .../llvm-project/clang/lib/Sema/SemaStmtAttr.cpp | 85 +- .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 201 +- .../clang/lib/Sema/SemaTemplateDeduction.cpp | 208 +- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 140 +- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 143 +- .../clang/lib/Sema/SemaTemplateVariadic.cpp | 5 +- contrib/llvm-project/clang/lib/Sema/SemaType.cpp | 305 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 448 +- .../clang/lib/Serialization/ASTCommon.cpp | 8 +- .../clang/lib/Serialization/ASTReader.cpp | 371 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 270 +- .../clang/lib/Serialization/ASTReaderInternals.h | 3 + .../clang/lib/Serialization/ASTReaderStmt.cpp | 58 +- .../clang/lib/Serialization/ASTWriter.cpp | 311 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 166 +- .../clang/lib/Serialization/ASTWriterStmt.cpp | 34 +- .../clang/lib/Serialization/GlobalModuleIndex.cpp | 20 +- .../clang/lib/Serialization/ModuleManager.cpp | 6 +- .../lib/Serialization/PCHContainerOperations.cpp | 5 + .../Checkers/AnalyzerStatsChecker.cpp | 13 +- .../Checkers/ArrayBoundCheckerV2.cpp | 362 +- .../Checkers/BasicObjCFoundationChecks.cpp | 106 +- .../lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 356 +- .../StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 10 +- .../StaticAnalyzer/Checkers/ContainerModeling.cpp | 8 +- .../StaticAnalyzer/Checkers/DeadStoresChecker.cpp | 6 +- .../lib/StaticAnalyzer/Checkers/DebugCheckers.cpp | 5 +- .../lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp | 46 +- .../Checkers/DynamicTypePropagation.cpp | 14 +- .../lib/StaticAnalyzer/Checkers/ErrnoModeling.cpp | 17 +- .../lib/StaticAnalyzer/Checkers/ErrnoModeling.h | 8 - .../Checkers/ExprInspectionChecker.cpp | 3 +- .../Checkers/FuchsiaHandleChecker.cpp | 7 +- .../Checkers/GenericTaintChecker.cpp | 188 +- .../clang/lib/StaticAnalyzer/Checkers/Iterator.cpp | 4 +- .../StaticAnalyzer/Checkers/IteratorModeling.cpp | 20 +- .../Checkers/IvarInvalidationChecker.cpp | 37 +- .../Checkers/LocalizationChecker.cpp | 10 +- .../Checkers/MacOSKeychainAPIChecker.cpp | 21 +- .../lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 85 +- .../Checkers/MallocOverflowSecurityChecker.cpp | 10 +- .../Checkers/MallocSizeofChecker.cpp | 32 +- .../lib/StaticAnalyzer/Checkers/MoveChecker.cpp | 23 +- .../Checkers/NSAutoreleasePoolChecker.cpp | 2 +- .../StaticAnalyzer/Checkers/NullabilityChecker.cpp | 97 +- .../Checkers/ObjCMissingSuperCallChecker.cpp | 4 +- .../Checkers/ObjCSelfInitChecker.cpp | 13 +- .../Checkers/ObjCUnusedIVarsChecker.cpp | 21 +- .../lib/StaticAnalyzer/Checkers/PaddingChecker.cpp | 2 +- .../Checkers/PointerArithChecker.cpp | 7 +- .../StaticAnalyzer/Checkers/PthreadLockChecker.cpp | 1 + .../RetainCountChecker/RetainCountChecker.cpp | 10 +- .../RetainCountChecker/RetainCountDiagnostics.cpp | 6 +- .../Checkers/STLAlgorithmModeling.cpp | 2 +- .../Checkers/SimpleStreamChecker.cpp | 12 +- .../StaticAnalyzer/Checkers/SmartPtrModeling.cpp | 8 +- .../Checkers/StackAddrEscapeChecker.cpp | 18 +- .../Checkers/StdLibraryFunctionsChecker.cpp | 1782 ++- .../lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 59 +- .../clang/lib/StaticAnalyzer/Checkers/Taint.cpp | 194 +- .../Checkers/TestAfterDivZeroChecker.cpp | 5 +- .../Checkers/TrustNonnullChecker.cpp | 3 +- .../Checkers/UndefCapturedBlockVarChecker.cpp | 9 +- .../StaticAnalyzer/Checkers/UndefResultChecker.cpp | 2 +- .../Checkers/UnreachableCodeChecker.cpp | 28 +- .../lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp | 59 +- .../WebKit/UncountedLambdaCapturesChecker.cpp | 2 +- .../clang/lib/StaticAnalyzer/Core/APSIntType.cpp | 4 +- .../lib/StaticAnalyzer/Core/AnalysisManager.cpp | 11 +- .../lib/StaticAnalyzer/Core/BasicValueFactory.cpp | 20 +- .../clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 15 +- .../StaticAnalyzer/Core/BugReporterVisitors.cpp | 29 +- .../clang/lib/StaticAnalyzer/Core/CallEvent.cpp | 40 +- .../lib/StaticAnalyzer/Core/CheckerContext.cpp | 1 + .../StaticAnalyzer/Core/CommonBugCategories.cpp | 1 + .../clang/lib/StaticAnalyzer/Core/Environment.cpp | 2 +- .../lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 23 +- .../clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 67 +- .../clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 111 +- .../lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 124 +- .../Core/ExprEngineCallAndReturn.cpp | 20 +- .../lib/StaticAnalyzer/Core/ExprEngineObjC.cpp | 4 +- .../lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 6 +- .../clang/lib/StaticAnalyzer/Core/MemRegion.cpp | 214 +- .../lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 16 +- .../clang/lib/StaticAnalyzer/Core/ProgramState.cpp | 25 +- .../StaticAnalyzer/Core/RangeConstraintManager.cpp | 2 +- .../clang/lib/StaticAnalyzer/Core/RegionStore.cpp | 113 +- .../clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | 1 - .../clang/lib/StaticAnalyzer/Core/SVals.cpp | 3 + .../clang/lib/StaticAnalyzer/Core/Store.cpp | 7 +- .../lib/StaticAnalyzer/Core/SymbolManager.cpp | 36 +- .../lib/StaticAnalyzer/Core/TextDiagnostics.cpp | 5 +- .../StaticAnalyzer/Frontend/CheckerRegistry.cpp | 3 +- .../lib/StaticAnalyzer/Frontend/ModelConsumer.cpp | 7 +- .../clang/lib/Support/RISCVVIntrinsicUtils.cpp | 150 +- .../clang/lib/Testing/CommandLineArgs.cpp | 15 + contrib/llvm-project/clang/lib/Testing/TestAST.cpp | 5 +- .../clang/lib/Tooling/CompilationDatabase.cpp | 2 +- .../DependencyScanningFilesystem.cpp | 12 +- .../DependencyScanning/DependencyScanningTool.cpp | 145 +- .../DependencyScanningWorker.cpp | 124 +- .../DependencyScanning/ModuleDepCollector.cpp | 59 +- .../clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp | 2 +- .../ExpandResponseFilesCompilationDatabase.cpp | 30 +- .../lib/Tooling/Inclusions/HeaderAnalysis.cpp | 2 +- .../lib/Tooling/Inclusions/HeaderIncludes.cpp | 9 +- .../Tooling/Inclusions/Stdlib}/CSymbolMap.inc | 0 .../Tooling/Inclusions/Stdlib/StandardLibrary.cpp | 245 +- .../Inclusions/Stdlib/StdSpecialSymbolMap.inc | 722 + .../lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc | 3819 +++++ .../Tooling/Inclusions/Stdlib/StdTsSymbolMap.inc | 52 + .../clang/lib/Tooling/JSONCompilationDatabase.cpp | 4 +- .../Tooling/Refactoring/Rename/USRLocFinder.cpp | 21 +- .../clang/lib/Tooling/Syntax/Tokens.cpp | 64 +- contrib/llvm-project/clang/lib/Tooling/Tooling.cpp | 46 +- .../clang/lib/Tooling/Transformer/Stencil.cpp | 2 +- .../clang/tools/amdgpu-arch/AMDGPUArch.cpp | 138 +- .../clang/tools/amdgpu-arch/AMDGPUArchByHIP.cpp | 96 + .../clang/tools/amdgpu-arch/AMDGPUArchByHSA.cpp | 122 + .../clang/tools/clang-repl/ClangRepl.cpp | 82 +- .../llvm-project/clang/tools/driver/cc1_main.cpp | 28 +- .../llvm-project/clang/tools/driver/cc1as_main.cpp | 23 +- .../clang/tools/driver/cc1gen_reproducer_main.cpp | 17 +- contrib/llvm-project/clang/tools/driver/driver.cpp | 84 +- *** 1018706 LINES SKIPPED *** From nobody Sun Jan 7 23:08:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtK4Dmdz56FHV; Sun, 7 Jan 2024 23:08: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 4T7XtK1LLgz4Q4Z; Sun, 7 Jan 2024 23:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N9L8fyVyQIFCsuMXQ9EpaJd32rwl1BN9DIdtjoiQ+BY=; b=xJFyEGRqlZQYaTagD3jHVDqXrZduNV5tLvy68IbPW9ltsXvhnY4j8v4Ddmp1YBatNINYPy 6n9c9r5gxDXjaiMaT5JSGMn6Sz0ftH/35/6B33owqXYbUwb5Gc0t0Ngby/IutuXfXt7lGB aE4Q1pUVYWYXlmPSmiiyw2w1fVvBmfQd5ZyRNwp1h9ht718p+lyzWRt9tKn54l2AOk1xEr dhwXTIPqyRcvRgo2MbJjwveVlGaVMu0gfvPbphfgmEiR4WXM69U0oA5Dgiyn9NY+jiwYsC /AFI7PDgLnpQHUjo/INLcX0nIPARAxIQlOQaEh0V2jUBY8EiGqt6yEo+9ziq/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N9L8fyVyQIFCsuMXQ9EpaJd32rwl1BN9DIdtjoiQ+BY=; b=uBChunRUvNA8BP2mnaR3wSmO5/XRiXJq1dNvMkjxx7MrRuKnbJ2l52EGyX10HV6j+zx3Vr pHec4Ff238/2mviFROfK5RBU1MlvxMCCN2MB3w82+fm8Ek9ONQPosR5T4bFOUZEmsn0d79 V/oJy1sy+5UJOrP+5YOYlCXmSQjHCkUn5qAsIlRShNbqspWweO9Er2MjVMe77mDLZ10Bbt YgAM6fspUmmKjTZATeJWJ/BZaq1DLTEWYoKXM+Eh3WVDCsllucbEqBL7WmR9khXvjeaArD f2lHy5nZ2G2rpNDmJyGVqVpev5/UAKIvLmuY6uj4FFBfoPzmfMm0+tnhPozWSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668905; a=rsa-sha256; cv=none; b=e6h4N4KpRPofJFjeX3jmsvOFn6LjDZNYRDzosDxboHZvkrnartdW9Plvv4aWCpWi+xpWP9 zBV4E4IGLxAws6lOgxiNqoFoB5s8tndEv9EWpST6KEFl9qzfDuZPHWzEJSJJCrm2tbWL2Y l6SoVaEhncvFkSHxg82YzH8Fdmf4rjYEC/HvF6t9fE3A9jBcsy7aNqa4VCGyXozagcap6L s/rVI7WEOpYDEGf6TFiajCnGBzZ4UT5QFjM1VAQ71pJ2AfCBdcjfESi3Z8JDUAX5Nra1OT wbTbowG0RovEQ5EzuX724rgsa4LrvdmrrjSadxbXmCyJ9vxW1/DGXPP+XKcFsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtK0H1DzkNP; Sun, 7 Jan 2024 23:08: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 407N8P9d053150; Sun, 7 Jan 2024 23:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8OuI053147; Sun, 7 Jan 2024 23:08:24 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:24 GMT Message-Id: <202401072308.407N8OuI053147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: bbb0bdafca9e - stable/13 - Merge llvm-project release/17.x llvmorg-17.0.0-rc4-10-g0176e8729ea4 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bbb0bdafca9e4b69db37b55d6d5a485ae342787c Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=bbb0bdafca9e4b69db37b55d6d5a485ae342787c commit bbb0bdafca9e4b69db37b55d6d5a485ae342787c Author: Dimitry Andric AuthorDate: 2023-09-11 18:37:24 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:39 +0000 Merge llvm-project release/17.x llvmorg-17.0.0-rc4-10-g0176e8729ea4 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.0-rc4-10-g0176e8729ea4. PR: 273753 MFC after: 1 month (cherry picked from commit 8a4dda33d67586ca2624f2a38417baa03a533a7f) --- .../clang/include/clang/AST/DeclBase.h | 6 +- .../clang/include/clang/AST/ExprConcepts.h | 14 +- .../clang/include/clang/Basic/CodeGenOptions.def | 1 - .../include/clang/Basic/DiagnosticASTKinds.td | 2 + .../clang/include/clang/Basic/DiagnosticGroups.td | 1 + .../include/clang/Basic/DiagnosticLexKinds.td | 4 + .../clang/include/clang/Basic/Sanitizers.h | 4 + .../clang/include/clang/Basic/TargetInfo.h | 4 +- .../clang/include/clang/Basic/riscv_vector.td | 52 +--- .../clang/include/clang/CodeGen/CGFunctionInfo.h | 29 +- .../clang/include/clang/Driver/Options.td | 14 +- .../clang/include/clang/Driver/ToolChain.h | 2 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 2 - contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 5 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 27 +- .../clang/lib/Basic/Targets/LoongArch.cpp | 21 +- .../clang/lib/Basic/Targets/LoongArch.h | 13 + .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 4 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/ABIInfoImpl.h | 14 +- .../llvm-project/clang/lib/CodeGen/BackendUtil.cpp | 23 +- .../llvm-project/clang/lib/CodeGen/CGCXXABI.cpp | 3 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 244 +++++++++------- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 29 ++ contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 106 ++++++- .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 33 +++ .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.h | 2 +- contrib/llvm-project/clang/lib/CodeGen/CGDecl.cpp | 2 +- .../llvm-project/clang/lib/CodeGen/CGDeclCXX.cpp | 4 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 9 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 2 +- .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 11 +- .../clang/lib/CodeGen/CodeGenABITypes.cpp | 5 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 26 +- .../clang/lib/CodeGen/CodeGenFunction.h | 19 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 34 ++- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 20 +- .../llvm-project/clang/lib/CodeGen/CodeGenTypes.h | 12 +- .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 2 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 3 +- .../clang/lib/CodeGen/Targets/LoongArch.cpp | 11 +- .../clang/lib/CodeGen/Targets/RISCV.cpp | 24 +- .../llvm-project/clang/lib/CodeGen/Targets/X86.cpp | 16 +- contrib/llvm-project/clang/lib/Driver/Driver.cpp | 17 +- .../clang/lib/Driver/SanitizerArgs.cpp | 32 +++ .../llvm-project/clang/lib/Driver/ToolChain.cpp | 6 + .../clang/lib/Driver/ToolChains/AIX.cpp | 6 + .../clang/lib/Driver/ToolChains/Arch/LoongArch.cpp | 43 +-- .../clang/lib/Driver/ToolChains/Arch/LoongArch.h | 6 + .../clang/lib/Driver/ToolChains/Arch/X86.cpp | 6 + .../clang/lib/Driver/ToolChains/Clang.cpp | 39 +-- .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 9 +- .../clang/lib/Driver/ToolChains/Gnu.cpp | 22 +- .../clang/lib/Driver/ToolChains/Hexagon.cpp | 5 + .../clang/lib/Driver/ToolChains/Solaris.cpp | 41 ++- .../clang/lib/Format/UnwrappedLineParser.cpp | 5 +- .../clang/lib/Frontend/FrontendAction.cpp | 5 + .../clang/lib/Headers/__clang_cuda_math.h | 2 +- .../lib/Headers/__clang_hip_libdevice_declares.h | 2 +- contrib/llvm-project/clang/lib/Headers/cpuid.h | 10 - .../clang/lib/Interpreter/IncrementalExecutor.cpp | 19 +- .../llvm-project/clang/lib/Lex/LiteralSupport.cpp | 41 ++- .../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 19 +- .../clang/lib/Parse/ParseTentative.cpp | 1 + .../clang/lib/Sema/SemaAvailability.cpp | 12 + contrib/llvm-project/clang/lib/Sema/SemaCast.cpp | 8 + contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 95 +++---- .../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 25 +- contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 68 +++-- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 17 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 4 + .../clang/lib/Serialization/ASTReaderDecl.cpp | 66 +++-- .../clang/lib/Serialization/ASTWriterDecl.cpp | 4 +- .../lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc | 54 ++++ .../compiler-rt/lib/asan/asan_interceptors.cpp | 56 ++-- .../compiler-rt/lib/asan/asan_interceptors.h | 2 - .../compiler-rt/lib/asan/asan_win_dll_thunk.cpp | 2 + .../compiler-rt/lib/builtins/aarch64/lse.S | 40 ++- .../compiler-rt/lib/builtins/clear_cache.c | 2 +- .../compiler-rt/lib/builtins/cpu_model.c | 5 +- .../compiler-rt/lib/interception/interception.h | 2 +- .../compiler-rt/lib/msan/msan_interceptors.cpp | 37 +++ .../compiler-rt/lib/profile/InstrProfilingFile.c | 10 +- .../sanitizer_common_interceptors.inc | 73 +++-- .../sanitizer_common_interceptors_format.inc | 16 +- .../sanitizer_stacktrace_sparc.cpp | 6 - .../sanitizer_unwind_linux_libcdep.cpp | 6 - .../symbolizer/scripts/global_symbols.txt | 7 + .../libcxx/include/__algorithm/pstl_sort.h | 1 + contrib/llvm-project/libcxx/include/__config | 36 ++- .../libcxx/include/__format/format_functions.h | 3 + .../__locale_dir/locale_base_api/locale_guard.h | 1 + .../llvm-project/libcxx/include/__mdspan/extents.h | 63 +++-- .../libcxx/include/__mdspan/layout_left.h | 32 ++- .../libcxx/include/__mdspan/layout_right.h | 30 +- .../llvm-project/libcxx/include/__mdspan/mdspan.h | 308 +++++++++++++++++++++ .../llvm-project/libcxx/include/__std_clang_module | 226 +++++++++++++++ .../__type_traits/is_nothrow_constructible.h | 3 +- contrib/llvm-project/libcxx/include/mdspan | 130 +++++++++ .../libcxx/include/module.modulemap.in | 65 ++--- contrib/llvm-project/libcxx/include/sstream | 50 ++-- .../llvm-project/libcxx/modules/std/atomic.cppm | 3 - .../llvm-project/libcxx/modules/std/execution.cppm | 2 +- .../libcxx/modules/std/filesystem.cppm | 4 +- .../llvm-project/libcxx/modules/std/mdspan.cppm | 2 +- contrib/llvm-project/libcxx/src/chrono.cpp | 2 +- .../libcxx/src/filesystem/filesystem_clock.cpp | 2 +- .../llvm-project/libunwind/src/Unwind-EHABI.cpp | 7 +- contrib/llvm-project/lld/ELF/Arch/LoongArch.cpp | 7 + contrib/llvm-project/lld/ELF/Arch/PPC.cpp | 12 +- contrib/llvm-project/lld/ELF/Arch/PPC64.cpp | 86 ++++-- contrib/llvm-project/lld/ELF/Target.h | 1 + contrib/llvm-project/lld/docs/ReleaseNotes.rst | 5 + .../ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp | 42 ++- .../Process/Utility/RegisterContextPOSIX_arm64.cpp | 4 + .../Process/Utility/RegisterContextPOSIX_arm64.h | 1 + .../Process/Utility/RegisterInfoPOSIX_arm64.h | 1 + .../elf-core/RegisterContextPOSIXCore_arm64.cpp | 14 + .../elf-core/RegisterContextPOSIXCore_arm64.h | 1 + .../Plugins/Process/elf-core/RegisterUtilities.h | 4 + .../llvm/include/llvm/ADT/FunctionExtras.h | 12 +- .../llvm/include/llvm/ADT/SmallVector.h | 4 +- .../llvm/include/llvm/Analysis/LazyValueInfo.h | 3 + .../llvm/include/llvm/Analysis/RegionInfoImpl.h | 4 +- .../llvm/include/llvm/Analysis/ValueTracking.h | 4 - .../llvm/include/llvm/CodeGen/CodeGenPassBuilder.h | 2 +- .../llvm/include/llvm/CodeGen/LowLevelType.h | 7 +- .../llvm/CodeGen/PreISelIntrinsicLowering.h | 4 + .../llvm/include/llvm/CodeGen/TargetInstrInfo.h | 17 -- .../llvm-project/llvm/include/llvm/Object/Wasm.h | 10 +- .../llvm/include/llvm/ObjectYAML/WasmYAML.h | 1 + .../llvm/include/llvm/Option/ArgList.h | 1 + .../llvm/include/llvm/Support/type_traits.h | 38 --- .../llvm/TargetParser/LoongArchTargetParser.h | 5 +- .../AggressiveInstCombine/AggressiveInstCombine.h | 2 +- .../llvm/Transforms/IPO/FunctionSpecialization.h | 15 +- .../llvm/Transforms/Scalar/MemCpyOptimizer.h | 4 - .../llvm/lib/Analysis/LazyValueInfo.cpp | 9 + .../llvm/lib/Analysis/ScalarEvolution.cpp | 2 +- .../llvm/lib/Analysis/ValueTracking.cpp | 7 - .../llvm/lib/CodeGen/CalcSpillWeights.cpp | 15 +- .../llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp | 30 +- .../llvm/lib/CodeGen/InlineSpiller.cpp | 34 ++- .../llvm/lib/CodeGen/LiveRangeEdit.cpp | 3 +- .../llvm/lib/CodeGen/LiveRangeShrink.cpp | 4 +- .../llvm-project/llvm/lib/CodeGen/MachineLICM.cpp | 4 + .../llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp | 54 ++-- .../llvm/lib/CodeGen/RegAllocGreedy.cpp | 21 +- .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 + .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 99 ++++--- contrib/llvm-project/llvm/lib/CodeGen/SplitKit.cpp | 17 +- contrib/llvm-project/llvm/lib/CodeGen/SplitKit.h | 7 +- .../llvm/lib/CodeGen/TargetInstrInfo.cpp | 7 +- .../llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 +- .../lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 21 +- contrib/llvm-project/llvm/lib/LTO/LTO.cpp | 7 +- .../llvm/lib/ObjCopy/wasm/WasmObject.h | 1 + .../llvm/lib/ObjCopy/wasm/WasmReader.cpp | 4 +- .../llvm/lib/ObjCopy/wasm/WasmWriter.cpp | 13 +- .../llvm-project/llvm/lib/Object/SymbolSize.cpp | 17 +- .../llvm/lib/Object/WasmObjectFile.cpp | 4 + .../llvm/lib/ObjectYAML/WasmEmitter.cpp | 12 +- .../llvm-project/llvm/lib/ObjectYAML/WasmYAML.cpp | 1 + contrib/llvm-project/llvm/lib/Option/ArgList.cpp | 7 + .../llvm-project/llvm/lib/TableGen/TGParser.cpp | 9 +- .../llvm/lib/Target/AArch64/AArch64.td | 6 +- .../lib/Target/AArch64/AArch64FrameLowering.cpp | 13 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 69 +++-- .../llvm/lib/Target/AArch64/AArch64InstrFormats.td | 9 +- .../llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 11 +- .../llvm/lib/Target/AArch64/AArch64InstrInfo.td | 20 +- .../Target/AArch64/AArch64LoadStoreOptimizer.cpp | 8 +- .../llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | 49 ++-- .../llvm/lib/Target/AArch64/AArch64Subtarget.h | 2 +- .../Target/AArch64/GISel/AArch64CallLowering.cpp | 5 + .../llvm/lib/Target/AArch64/SVEInstrFormats.td | 7 + .../llvm-project/llvm/lib/Target/AMDGPU/AMDGPU.h | 4 - .../llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 37 ++- .../llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h | 2 +- .../llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp | 47 +++- .../llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h | 2 +- .../llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp | 16 +- .../llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp | 4 - .../llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | 16 +- .../llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 2 +- .../llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 7 +- .../llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 45 +-- .../llvm/lib/Target/AMDGPU/SIInstrInfo.h | 19 +- .../llvm/lib/Target/AMDGPU/SIInstructions.td | 7 - .../llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp | 136 ++------- .../llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp | 141 ---------- .../lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | 69 ++--- .../llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h | 39 ++- .../llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp | 23 +- .../llvm/lib/Target/AMDGPU/SIRegisterInfo.h | 17 +- .../llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp | 2 + .../Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp | 6 +- .../llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp | 26 +- .../llvm-project/llvm/lib/Target/BPF/BTFDebug.cpp | 2 + .../llvm/lib/Target/LoongArch/LoongArch.td | 5 + .../lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp | 50 +++- .../Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp | 14 +- .../llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 37 +-- .../llvm/lib/Target/PowerPC/PPCInstrFormats.td | 6 + .../llvm/lib/Target/PowerPC/PPCInstrInfo.td | 9 + .../llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 4 - .../llvm/lib/Target/PowerPC/PPCScheduleP9.td | 2 +- .../llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 15 +- .../Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp | 9 + .../llvm/lib/Target/RISCV/RISCVFrameLowering.cpp | 39 +-- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 13 +- .../llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 26 +- .../lib/Target/RISCV/RISCVPushPopOptimizer.cpp | 3 +- .../llvm/lib/Target/Sparc/SparcInstrInfo.td | 16 ++ .../Target/SystemZ/SystemZTargetTransformInfo.cpp | 5 + contrib/llvm-project/llvm/lib/Target/X86/X86.td | 7 + .../llvm/lib/Target/X86/X86ISelLowering.cpp | 96 ++++--- .../llvm/lib/Target/X86/X86ISelLowering.h | 2 - .../llvm/lib/Target/X86/X86InstrAVX512.td | 10 + .../llvm/lib/Target/X86/X86InstrSSE.td | 5 + .../llvm/lib/Target/X86/X86TargetTransformInfo.cpp | 14 +- .../llvm/lib/Target/X86/X86TargetTransformInfo.h | 1 + .../llvm-project/llvm/lib/TargetParser/Host.cpp | 10 +- .../lib/TargetParser/LoongArchTargetParser.cpp | 12 + .../AggressiveInstCombine.cpp | 217 ++++----------- .../llvm/lib/Transforms/Coroutines/CoroElide.cpp | 83 ++++-- .../lib/Transforms/IPO/FunctionSpecialization.cpp | 82 +----- .../InstCombine/InstructionCombining.cpp | 2 +- .../Instrumentation/ControlHeightReduction.cpp | 14 + .../Transforms/Instrumentation/GCOVProfiling.cpp | 4 +- .../Transforms/Scalar/ConstraintElimination.cpp | 2 +- .../llvm/lib/Transforms/Scalar/JumpThreading.cpp | 2 + .../llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp | 256 +---------------- .../Transforms/Scalar/TailRecursionElimination.cpp | 6 + .../llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 14 +- .../lib/Transforms/Vectorize/LoopVectorize.cpp | 38 ++- .../llvm/tools/llvm-readobj/ELFDumper.cpp | 2 +- .../openmp/runtime/src/ompt-event-specific.h | 13 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/libc++/__config_site | 1 + lib/libc++/module.modulemap | 65 ++--- 249 files changed, 3393 insertions(+), 2248 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h index 1b99709ca90d..12137387b676 100644 --- a/contrib/llvm-project/clang/include/clang/AST/DeclBase.h +++ b/contrib/llvm-project/clang/include/clang/AST/DeclBase.h @@ -1702,7 +1702,7 @@ class DeclContext { }; /// Number of non-inherited bits in FunctionDeclBitfields. - enum { NumFunctionDeclBits = 30 }; + enum { NumFunctionDeclBits = 31 }; /// Stores the bits used by CXXConstructorDecl. If modified /// NumCXXConstructorDeclBits and the accessor @@ -1714,12 +1714,12 @@ class DeclContext { /// For the bits in FunctionDeclBitfields. uint64_t : NumFunctionDeclBits; - /// 21 bits to fit in the remaining available space. + /// 20 bits to fit in the remaining available space. /// Note that this makes CXXConstructorDeclBitfields take /// exactly 64 bits and thus the width of NumCtorInitializers /// will need to be shrunk if some bit is added to NumDeclContextBitfields, /// NumFunctionDeclBitfields or CXXConstructorDeclBitfields. - uint64_t NumCtorInitializers : 18; + uint64_t NumCtorInitializers : 17; uint64_t IsInheritingConstructor : 1; /// Whether this constructor has a trail-allocated explicit specifier. diff --git a/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h b/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h index d900e980852b..13d4568119eb 100644 --- a/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h +++ b/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h @@ -14,20 +14,21 @@ #ifndef LLVM_CLANG_AST_EXPRCONCEPTS_H #define LLVM_CLANG_AST_EXPRCONCEPTS_H -#include "clang/AST/ASTContext.h" #include "clang/AST/ASTConcept.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" -#include "clang/AST/DeclarationName.h" #include "clang/AST/DeclTemplate.h" +#include "clang/AST/DeclarationName.h" #include "clang/AST/Expr.h" #include "clang/AST/NestedNameSpecifier.h" #include "clang/AST/TemplateBase.h" #include "clang/AST/Type.h" #include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/TrailingObjects.h" -#include #include +#include namespace clang { class ASTStmtReader; @@ -467,6 +468,13 @@ public: } }; +using EntityPrinter = llvm::function_ref; + +/// \brief create a Requirement::SubstitutionDiagnostic with only a +/// SubstitutedEntity and DiagLoc using Sema's allocator. +Requirement::SubstitutionDiagnostic * +createSubstDiagAt(Sema &S, SourceLocation Location, EntityPrinter Printer); + } // namespace concepts /// C++2a [expr.prim.req]: diff --git a/contrib/llvm-project/clang/include/clang/Basic/CodeGenOptions.def b/contrib/llvm-project/clang/include/clang/Basic/CodeGenOptions.def index 11aec88c5335..d492b8681c5d 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/CodeGenOptions.def +++ b/contrib/llvm-project/clang/include/clang/Basic/CodeGenOptions.def @@ -165,7 +165,6 @@ CODEGENOPT(PrepareForThinLTO , 1, 0) ///< Set when -flto=thin is enabled on the ///< compile step. CODEGENOPT(LTOUnit, 1, 0) ///< Emit IR to support LTO unit features (CFI, whole ///< program vtable opt). -CODEGENOPT(FatLTO, 1, 0) ///< Set when -ffat-lto-objects is enabled. CODEGENOPT(EnableSplitLTOUnit, 1, 0) ///< Enable LTO unit splitting to support /// CFI and traditional whole program /// devirtualization that require whole diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td index 566cdc340605..0794ed7ba683 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -70,6 +70,8 @@ def note_consteval_address_accessible : Note< "is not a constant expression">; def note_constexpr_uninitialized : Note< "subobject %0 is not initialized">; +def note_constexpr_uninitialized_base : Note< + "constructor of base class %0 is not called">; def note_constexpr_static_local : Note< "control flows through the definition of a %select{static|thread_local}0 variable">; def note_constexpr_subobject_declared_here : Note< diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticGroups.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticGroups.td index 7b4d415bf064..26bc88a980e4 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticGroups.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticGroups.td @@ -20,6 +20,7 @@ def DeprecatedStaticAnalyzerFlag : DiagGroup<"deprecated-static-analyzer-flag">; // Empty DiagGroups are recognized by clang but ignored. def ODR : DiagGroup<"odr">; def : DiagGroup<"abi">; +def : DiagGroup<"gnu-empty-initializer">; // Now a C extension, not GNU. def AbsoluteValue : DiagGroup<"absolute-value">; def MisspelledAssumption : DiagGroup<"misspelled-assumption">; def UnknownAssumption : DiagGroup<"unknown-assumption">; diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticLexKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticLexKinds.td index 0eb270aeea0e..6ad691975bd5 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticLexKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticLexKinds.td @@ -285,6 +285,10 @@ def ext_ms_reserved_user_defined_literal : ExtWarn< def err_unsupported_string_concat : Error< "unsupported non-standard concatenation of string literals">; +def warn_unevaluated_string_prefix : Warning< + "encoding prefix '%0' on an unevaluated string literal has no effect" + "%select{| and is incompatible with c++2c}1">, + InGroup>; def err_unevaluated_string_prefix : Error< "an unevaluated string literal cannot have an encoding prefix">; def err_unevaluated_string_udl : Error< diff --git a/contrib/llvm-project/clang/include/clang/Basic/Sanitizers.h b/contrib/llvm-project/clang/include/clang/Basic/Sanitizers.h index db53010645ae..4659e45c7883 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/Sanitizers.h +++ b/contrib/llvm-project/clang/include/clang/Basic/Sanitizers.h @@ -23,7 +23,11 @@ namespace llvm { class hash_code; +class Triple; +namespace opt { +class ArgList; } +} // namespace llvm namespace clang { diff --git a/contrib/llvm-project/clang/include/clang/Basic/TargetInfo.h b/contrib/llvm-project/clang/include/clang/Basic/TargetInfo.h index 41ef47eb565b..61be52149341 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/TargetInfo.h +++ b/contrib/llvm-project/clang/include/clang/Basic/TargetInfo.h @@ -1414,7 +1414,9 @@ public: /// Identify whether this target supports IFuncs. bool supportsIFunc() const { - return getTriple().isOSBinFormatELF() && !getTriple().isOSFuchsia(); + return getTriple().isOSBinFormatELF() && + ((getTriple().isOSLinux() && !getTriple().isMusl()) || + getTriple().isOSFreeBSD()); } // Validate the contents of the __builtin_cpu_supports(const char*) diff --git a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td index 7e5889812aec..6adc60031341 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td +++ b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td @@ -112,7 +112,7 @@ multiclass RVVIntBinBuiltinSet multiclass RVVSlideOneBuiltinSet : RVVOutOp1BuiltinSet; + ["vx", "Uv", "UvUvUe"]]>; multiclass RVVSignedShiftBuiltinSet : RVVOutOp1BuiltinSet paramInfos, - CanQualType resultType, - ArrayRef argTypes, - RequiredArgs required); + static CGFunctionInfo * + create(unsigned llvmCC, bool instanceMethod, bool chainCall, + bool delegateCall, const FunctionType::ExtInfo &extInfo, + ArrayRef paramInfos, CanQualType resultType, + ArrayRef argTypes, RequiredArgs required); void operator delete(void *p) { ::operator delete(p); } // Friending class TrailingObjects is apparently not good enough for MSVC, @@ -663,6 +664,8 @@ public: bool isChainCall() const { return ChainCall; } + bool isDelegateCall() const { return DelegateCall; } + bool isCmseNSCall() const { return CmseNSCall; } bool isNoReturn() const { return NoReturn; } @@ -749,6 +752,7 @@ public: ID.AddInteger(getASTCallingConvention()); ID.AddBoolean(InstanceMethod); ID.AddBoolean(ChainCall); + ID.AddBoolean(DelegateCall); ID.AddBoolean(NoReturn); ID.AddBoolean(ReturnsRetained); ID.AddBoolean(NoCallerSavedRegs); @@ -766,17 +770,16 @@ public: for (const auto &I : arguments()) I.type.Profile(ID); } - static void Profile(llvm::FoldingSetNodeID &ID, - bool InstanceMethod, - bool ChainCall, + static void Profile(llvm::FoldingSetNodeID &ID, bool InstanceMethod, + bool ChainCall, bool IsDelegateCall, const FunctionType::ExtInfo &info, ArrayRef paramInfos, - RequiredArgs required, - CanQualType resultType, + RequiredArgs required, CanQualType resultType, ArrayRef argTypes) { ID.AddInteger(info.getCC()); ID.AddBoolean(InstanceMethod); ID.AddBoolean(ChainCall); + ID.AddBoolean(IsDelegateCall); ID.AddBoolean(info.getNoReturn()); ID.AddBoolean(info.getProducesResult()); ID.AddBoolean(info.getNoCallerSavedRegs()); diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td index 229f6141c750..e04f67bdb1fa 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/Options.td +++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td @@ -2375,11 +2375,6 @@ def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">, Flags<[CoreOption, CC1Option]>, Group, HelpText<"Write minimized bitcode to for the ThinLTO thin link only">, MarshallingInfoString>; -defm fat_lto_objects : BoolFOption<"fat-lto-objects", - CodeGenOpts<"FatLTO">, DefaultFalse, - PosFlag, - NegFlag, - BothFlags<[CC1Option], " fat LTO object support">>; def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, Group, Flags<[NoXarchOption, CC1Option, CoreOption]>, HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit)">, @@ -5097,6 +5092,10 @@ def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group< def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group; def mvzeroupper : Flag<["-"], "mvzeroupper">, Group; def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group; +def mno_gather : Flag<["-"], "mno-gather">, Group, + HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">; +def mno_scatter : Flag<["-"], "mno-scatter">, Group, + HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">; // These are legacy user-facing driver-level option spellings. They are always // aliases for options that are spelled using the more common Unix / GNU flag @@ -5162,6 +5161,7 @@ defm caller_saves : BooleanFFlag<"caller-saves">, Group, Group; defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group; defm default_inline : BooleanFFlag<"default-inline">, Group; +defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group; defm float_store : BooleanFFlag<"float-store">, Group; defm friend_injection : BooleanFFlag<"friend-injection">, Group; defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group; @@ -7152,6 +7152,10 @@ def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">, Alias; def _SLASH_arm64EC : CLFlag<"arm64EC">, HelpText<"Set build target to arm64ec">; +def : CLFlag<"Qgather-">, Alias, + HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">; +def : CLFlag<"Qscatter-">, Alias, + HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">; // Non-aliases: diff --git a/contrib/llvm-project/clang/include/clang/Driver/ToolChain.h b/contrib/llvm-project/clang/include/clang/Driver/ToolChain.h index e3fcbd9322b0..2e74507f7126 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/ToolChain.h +++ b/contrib/llvm-project/clang/include/clang/Driver/ToolChain.h @@ -561,7 +561,7 @@ public: // Return the DWARF version to emit, in the absence of arguments // to the contrary. - virtual unsigned GetDefaultDwarfVersion() const { return 5; } + virtual unsigned GetDefaultDwarfVersion() const; // Some toolchains may have different restrictions on the DWARF version and // may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when host diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index 3418a37b3077..cfd1c0f977c0 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -12694,8 +12694,6 @@ public: QualType CheckBitwiseOperands( // C99 6.5.[10...12] ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc); - void diagnoseLogicalInsteadOfBitwise(Expr *Op1, Expr *Op2, SourceLocation Loc, - BinaryOperatorKind Opc); QualType CheckLogicalOperands( // C99 6.5.[13,14] ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc); diff --git a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp index 7acacd7bf4f5..76000156fece 100644 --- a/contrib/llvm-project/clang/lib/AST/ASTContext.cpp +++ b/contrib/llvm-project/clang/lib/AST/ASTContext.cpp @@ -9612,9 +9612,8 @@ bool ASTContext::areLaxCompatibleRVVTypes(QualType FirstType, const LangOptions::LaxVectorConversionKind LVCKind = getLangOpts().getLaxVectorConversions(); - // If __riscv_v_fixed_vlen != N do not allow GNU vector lax conversion. - if (VecTy->getVectorKind() == VectorType::GenericVector && - getTypeSize(SecondType) != getRVVTypeSize(*this, BT)) + // If __riscv_v_fixed_vlen != N do not allow vector lax conversion. + if (getTypeSize(SecondType) != getRVVTypeSize(*this, BT)) return false; // If -flax-vector-conversions=all is specified, the types are diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index f1c842e26199..f1bad0c7f7f2 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -2418,9 +2418,16 @@ static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, if (const CXXRecordDecl *CD = dyn_cast(RD)) { unsigned BaseIndex = 0; for (const CXXBaseSpecifier &BS : CD->bases()) { - if (!CheckEvaluationResult(CERK, Info, DiagLoc, BS.getType(), - Value.getStructBase(BaseIndex), Kind, - /*SubobjectDecl=*/nullptr, CheckedTemps)) + const APValue &BaseValue = Value.getStructBase(BaseIndex); + if (!BaseValue.hasValue()) { + SourceLocation TypeBeginLoc = BS.getBaseTypeLoc(); + Info.FFDiag(TypeBeginLoc, diag::note_constexpr_uninitialized_base) + << BS.getType() << SourceRange(TypeBeginLoc, BS.getEndLoc()); + return false; + } + if (!CheckEvaluationResult(CERK, Info, DiagLoc, BS.getType(), BaseValue, + Kind, /*SubobjectDecl=*/nullptr, + CheckedTemps)) return false; ++BaseIndex; } @@ -15218,14 +15225,6 @@ static bool FastEvaluateAsRValue(const Expr *Exp, Expr::EvalResult &Result, return true; } - // FIXME: Evaluating values of large array and record types can cause - // performance problems. Only do so in C++11 for now. - if (Exp->isPRValue() && - (Exp->getType()->isArrayType() || Exp->getType()->isRecordType()) && - !Ctx.getLangOpts().CPlusPlus11) { - IsConst = false; - return true; - } return false; } @@ -15467,12 +15466,6 @@ bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, return Name; }); - // FIXME: Evaluating initializers for large array and record types can cause - // performance problems. Only do so in C++11 for now. - if (isPRValue() && (getType()->isArrayType() || getType()->isRecordType()) && - !Ctx.getLangOpts().CPlusPlus11) - return false; - Expr::EvalStatus EStatus; EStatus.Diag = &Notes; diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.cpp index 6958479cd7c4..4448a2ae10a1 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.cpp @@ -15,7 +15,7 @@ #include "clang/Basic/MacroBuilder.h" #include "clang/Basic/TargetBuiltins.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/TargetParser/TargetParser.h" +#include "llvm/TargetParser/LoongArchTargetParser.h" using namespace clang; using namespace clang::targets; @@ -198,7 +198,15 @@ void LoongArchTargetInfo::getTargetDefines(const LangOptions &Opts, else Builder.defineMacro("__loongarch_frlen", "0"); - // TODO: define __loongarch_arch and __loongarch_tune. + // Define __loongarch_arch. + StringRef ArchName = getCPU(); + Builder.defineMacro("__loongarch_arch", Twine('"') + ArchName + Twine('"')); + + // Define __loongarch_tune. + StringRef TuneCPU = getTargetOpts().TuneCPU; + if (TuneCPU.empty()) + TuneCPU = ArchName; + Builder.defineMacro("__loongarch_tune", Twine('"') + TuneCPU + Twine('"')); StringRef ABI = getABI(); if (ABI == "lp64d" || ABI == "lp64f" || ABI == "lp64s") @@ -270,3 +278,12 @@ bool LoongArchTargetInfo::handleTargetFeatures( } return true; } + +bool LoongArchTargetInfo::isValidCPUName(StringRef Name) const { + return llvm::LoongArch::isValidCPUName(Name); +} + +void LoongArchTargetInfo::fillValidCPUList( + SmallVectorImpl &Values) const { + llvm::LoongArch::fillValidCPUList(Values); +} diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.h b/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.h index 52c4ce425368..34143f462a24 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/LoongArch.h @@ -24,6 +24,7 @@ namespace targets { class LLVM_LIBRARY_VISIBILITY LoongArchTargetInfo : public TargetInfo { protected: std::string ABI; + std::string CPU; bool HasFeatureD; bool HasFeatureF; @@ -40,6 +41,15 @@ public: WIntType = UnsignedInt; } + bool setCPU(const std::string &Name) override { + if (!isValidCPUName(Name)) + return false; + CPU = Name; + return true; + } + + StringRef getCPU() const { return CPU; } + StringRef getABI() const override { return ABI; } void getTargetDefines(const LangOptions &Opts, @@ -80,6 +90,9 @@ public: const std::vector &FeaturesVec) const override; bool hasFeature(StringRef Feature) const override; + + bool isValidCPUName(StringRef Name) const override; + void fillValidCPUList(SmallVectorImpl &Values) const override; }; class LLVM_LIBRARY_VISIBILITY LoongArch32TargetInfo diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp index 94c894dfec0b..d55ab76395c8 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp @@ -196,8 +196,8 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts, if (ISAInfo->hasExtension("zve32x")) { Builder.defineMacro("__riscv_vector"); - // Currently we support the v0.11 RISC-V V intrinsics. - Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(0, 11))); + // Currently we support the v0.12 RISC-V V intrinsics. + Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(0, 12))); } auto VScale = getVScaleRange(Opts); diff --git a/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp b/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp index 7c30cecfdb9b..2b20d5a13346 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.cpp @@ -246,7 +246,7 @@ Address CodeGen::emitMergePHI(CodeGenFunction &CGF, Address Addr1, } bool CodeGen::isEmptyField(ASTContext &Context, const FieldDecl *FD, - bool AllowArrays) { + bool AllowArrays, bool AsIfNoUniqueAddr) { if (FD->isUnnamedBitfield()) return true; @@ -280,13 +280,14 @@ bool CodeGen::isEmptyField(ASTContext &Context, const FieldDecl *FD, // not arrays of records, so we must also check whether we stripped off an // array type above. if (isa(RT->getDecl()) && - (WasArray || !FD->hasAttr())) + (WasArray || (!AsIfNoUniqueAddr && !FD->hasAttr()))) return false; - return isEmptyRecord(Context, FT, AllowArrays); + return isEmptyRecord(Context, FT, AllowArrays, AsIfNoUniqueAddr); } -bool CodeGen::isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays) { +bool CodeGen::isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays, + bool AsIfNoUniqueAddr) { const RecordType *RT = T->getAs(); if (!RT) return false; @@ -297,11 +298,11 @@ bool CodeGen::isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays) { // If this is a C++ record, check the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) for (const auto &I : CXXRD->bases()) - if (!isEmptyRecord(Context, I.getType(), true)) + if (!isEmptyRecord(Context, I.getType(), true, AsIfNoUniqueAddr)) return false; for (const auto *I : RD->fields()) - if (!isEmptyField(Context, I, AllowArrays)) + if (!isEmptyField(Context, I, AllowArrays, AsIfNoUniqueAddr)) return false; return true; } diff --git a/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.h b/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.h index 5f0cc289af68..afde08ba100c 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.h +++ b/contrib/llvm-project/clang/lib/CodeGen/ABIInfoImpl.h @@ -122,13 +122,19 @@ Address emitMergePHI(CodeGenFunction &CGF, Address Addr1, llvm::BasicBlock *Block2, const llvm::Twine &Name = ""); /// isEmptyField - Return true iff a the field is "empty", that is it -/// is an unnamed bit-field or an (array of) empty record(s). -bool isEmptyField(ASTContext &Context, const FieldDecl *FD, bool AllowArrays); +/// is an unnamed bit-field or an (array of) empty record(s). If +/// AsIfNoUniqueAddr is true, then C++ record fields are considered empty if +/// the [[no_unique_address]] attribute would have made them empty. +bool isEmptyField(ASTContext &Context, const FieldDecl *FD, bool AllowArrays, + bool AsIfNoUniqueAddr = false); /// isEmptyRecord - Return true iff a structure contains only empty /// fields. Note that a structure with a flexible array member is not -/// considered empty. -bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays); +/// considered empty. If AsIfNoUniqueAddr is true, then C++ record fields are +/// considered empty if the [[no_unique_address]] attribute would have made +/// them empty. +bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays, + bool AsIfNoUniqueAddr = false); /// isSingleElementStruct - Determine if a structure is a "single /// element struct", i.e. it has exactly one non-empty field or diff --git a/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp b/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp index cda03d69522d..483f3e787a78 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp @@ -55,7 +55,6 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" -#include "llvm/Transforms/IPO/EmbedBitcodePass.h" #include "llvm/Transforms/IPO/LowerTypeTests.h" #include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h" #include "llvm/Transforms/InstCombine/InstCombine.h" @@ -1016,12 +1015,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline( }); } - bool IsThinOrUnifiedLTO = IsThinLTO || (IsLTO && CodeGenOpts.UnifiedLTO); - if (CodeGenOpts.FatLTO) { - MPM = PB.buildFatLTODefaultPipeline(Level, IsThinOrUnifiedLTO, - IsThinOrUnifiedLTO || - shouldEmitRegularLTOSummary()); - } else if (IsThinOrUnifiedLTO) { + if (IsThinLTO || (IsLTO && CodeGenOpts.UnifiedLTO)) { MPM = PB.buildThinLTOPreLinkDefaultPipeline(Level); } else if (IsLTO) { MPM = PB.buildLTOPreLinkDefaultPipeline(Level); @@ -1077,21 +1071,6 @@ void EmitAssemblyHelper::RunOptimizationPipeline( EmitLTOSummary)); } } - if (CodeGenOpts.FatLTO) { - // Set module flags, like EnableSplitLTOUnit and UnifiedLTO, since FatLTO - // uses a different action than Backend_EmitBC or Backend_EmitLL. - bool IsThinOrUnifiedLTO = - CodeGenOpts.PrepareForThinLTO || - (CodeGenOpts.PrepareForLTO && CodeGenOpts.UnifiedLTO); - if (!TheModule->getModuleFlag("ThinLTO")) - TheModule->addModuleFlag(Module::Error, "ThinLTO", - uint32_t(IsThinOrUnifiedLTO)); - if (!TheModule->getModuleFlag("EnableSplitLTOUnit")) - TheModule->addModuleFlag(Module::Error, "EnableSplitLTOUnit", - uint32_t(CodeGenOpts.EnableSplitLTOUnit)); - if (CodeGenOpts.UnifiedLTO && !TheModule->getModuleFlag("UnifiedLTO")) - TheModule->addModuleFlag(Module::Error, "UnifiedLTO", uint32_t(1)); - } // Now that we have all of the passes ready, run them. { diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.cpp index 7b77dd7875bc..4df6f6505ef6 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.cpp @@ -312,8 +312,7 @@ void CGCXXABI::setCXXDestructorDLLStorage(llvm::GlobalValue *GV, llvm::GlobalValue::LinkageTypes CGCXXABI::getCXXDestructorLinkage( GVALinkage Linkage, const CXXDestructorDecl *Dtor, CXXDtorType DT) const { // Delegate back to CGM by default. - return CGM.getLLVMLinkageForDeclarator(Dtor, Linkage, - /*IsConstantVariable=*/false); + return CGM.getLLVMLinkageForDeclarator(Dtor, Linkage); } bool CGCXXABI::NeedsVTTParameter(GlobalDecl GD) { diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index bd272e016e92..0d1e9ad439b7 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -13,6 +13,7 @@ #include "CGCall.h" #include "ABIInfo.h" +#include "ABIInfoImpl.h" #include "CGBlocks.h" #include "CGCXXABI.h" #include "CGCleanup.h" @@ -112,8 +113,7 @@ CodeGenTypes::arrangeFreeFunctionType(CanQual FTNP) { // When translating an unprototyped function type, always use a // variadic type. return arrangeLLVMFunctionInfo(FTNP->getReturnType().getUnqualifiedType(), - /*instanceMethod=*/false, - /*chainCall=*/false, std::nullopt, + FnInfoOpts::None, std::nullopt, FTNP->getExtInfo(), {}, RequiredArgs(0)); } @@ -189,10 +189,10 @@ arrangeLLVMFunctionInfo(CodeGenTypes &CGT, bool instanceMethod, appendParameterTypes(CGT, prefix, paramInfos, FTP); CanQualType resultType = FTP->getReturnType().getUnqualifiedType(); - return CGT.arrangeLLVMFunctionInfo(resultType, instanceMethod, - /*chainCall=*/false, prefix, - FTP->getExtInfo(), paramInfos, - Required); + FnInfoOpts opts = + instanceMethod ? FnInfoOpts::IsInstanceMethod : FnInfoOpts::None; + return CGT.arrangeLLVMFunctionInfo(resultType, opts, prefix, + FTP->getExtInfo(), paramInfos, Required); } /// Arrange the argument and result information for a value of the @@ -271,7 +271,7 @@ CodeGenTypes::arrangeCXXMethodType(const CXXRecordDecl *RD, argTypes.push_back(DeriveThisType(RD, MD)); return ::arrangeLLVMFunctionInfo( - *this, true, argTypes, + *this, /*instanceMethod=*/true, argTypes, FTP->getCanonicalTypeUnqualified().getAs()); } *** 11179 LINES SKIPPED *** From nobody Sun Jan 7 23:08:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtL4Yg2z56Dyn; Sun, 7 Jan 2024 23:08: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 4T7XtL2qkmz4Ptv; Sun, 7 Jan 2024 23:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tpXd1UJ/wmTCl8mTC2ffsgN3m85KbYai6xHSpuGNi4M=; b=CoDyNAfy+TFc1ey9QW5Ib2v9vDfHKph3SlHXfVu3tAjdIL3YLNwsbsm0Kq+7ukCYDCvcRt 5+D63pyYel5ykf1oLzI3DAp/w9THlktZyVzx+DqoSy4HE2NLRU5uoy9a/eut+wwa4js0sE 3wjUKvrsezZCaSC3XwMM6fPCaVy5AisWeR99sADKIZYuo1NLEebdogjA+oVkHFd9w4ilKK tObqWyFNzz5MoY1ISjHy7bpboHx9ezpMrxMZRx1SFQGkXeB0rlzeyfhyk24TVSPvCtFsA6 wyc7iwkYL8A7+0CF9uNy7w3XplfiVg5a+qBSe0z+nP2WbsLGImRQqtkIXi3HAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tpXd1UJ/wmTCl8mTC2ffsgN3m85KbYai6xHSpuGNi4M=; b=Y+8OdRPAopVXwj3kyAw0DcGMtMTztLjPX40oxmMlbprFbZPuN0vTBZHwsrUosgMMpObXbD Zh03g+/EMpQ30XbLr7iaytg297Bd0ehvgLaAY3pqpI3BTA1IydFGYbgkElJjGZ15f6riX6 JqEAP9IVwam5dSC08WPsjq87iZ136Akg6CZpydif0/KYTj7RfFlmC8He7A8o412fERvt04 5gjbDTpJG6eScFbU32zAxUTNaxkhBaEbNKRzskmMCNdanwLlHe+cIuRrT1v9MR8y9G0mjN sYOk4Iz4U2wUNA6w1Vupc0l83bLYrzveYxAEyRn/aJY27D8/+cRjvVe6NeLqMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668906; a=rsa-sha256; cv=none; b=xTgzNkzBcQ2Z1cmVjRADOx28NjgFQhRDkm99tdOithZg7cnWaXmhwkrbah9RAPSxPqG3Ms TITXeNVd/kqcDhyO6NGGIs4onT8qrp1VNzvDIrlKZlKQmqBFzPFvzprPfbx9In1cAv08Y/ CvKJBQHiFg+u/Ea/kp/W5AzP2g51cDi7iztbA69EP+uZy+S2hlOTX1pgJQetPIF/qzUk02 f47TerNMgVoMNvjzCCCEfZH5XZ9XBlIrH3LKd9GRls9tyt55TarKD3xmywJOypoC3bmrmI zgcUCynP49yGFVgqLFn7Pk2tQ7+I8g601lULox4xqeGjoQ4MA9uJBkNOYC3hjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtL1nPxzjrQ; Sun, 7 Jan 2024 23:08: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 407N8Qt0053193; Sun, 7 Jan 2024 23:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8Qo4053190; Sun, 7 Jan 2024 23:08:26 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:26 GMT Message-Id: <202401072308.407N8Qo4053190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 80a1bcb529d0 - stable/13 - Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 80a1bcb529d0c08c834f05de8ad6758ba093b591 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=80a1bcb529d0c08c834f05de8ad6758ba093b591 commit 80a1bcb529d0c08c834f05de8ad6758ba093b591 Author: Dimitry Andric AuthorDate: 2023-09-29 18:51:44 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:39 +0000 Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.1-25-g098e653a5bed. PR: 273753 MFC after: 1 month (cherry picked from commit 4542f901cb0c5dd66ab5b541f2fbc659fd46f893) --- .../DependencyScanningFilesystem.h | 18 ++++- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 17 +++-- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 24 ------- .../llvm-project/clang/lib/CodeGen/CGCoroutine.cpp | 33 --------- .../clang/lib/CodeGen/CodeGenFunction.h | 5 -- .../clang/lib/Frontend/TextDiagnostic.cpp | 3 +- .../lib/Headers/cuda_wrappers/bits/basic_string.h | 9 +++ .../Headers/cuda_wrappers/bits/basic_string.tcc | 9 +++ .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 6 +- .../DependencyScanningFilesystem.cpp | 79 ++++++++++++++++++---- contrib/llvm-project/libcxx/include/__config | 2 +- contrib/llvm-project/lld/COFF/Writer.cpp | 2 +- .../llvm/include/llvm/Transforms/Utils/Local.h | 10 +++ .../llvm-project/llvm/lib/Analysis/InlineCost.cpp | 20 ++---- .../llvm/lib/CodeGen/StackColoring.cpp | 62 ++++------------- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 4 +- .../llvm/lib/Target/ARM/ARMInstrInfo.td | 2 +- .../llvm/lib/Target/ARM/ARMInstrThumb2.td | 2 +- .../llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 28 ++++++-- .../llvm/lib/Transforms/Scalar/GVN.cpp | 7 +- .../llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp | 23 ++++--- .../lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 61 +++++++++-------- .../llvm/lib/Transforms/Utils/Local.cpp | 31 +++++++-- .../llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 12 ++-- contrib/llvm-project/llvm/tools/lli/lli.cpp | 14 ++++ .../llvm/tools/llvm-readobj/COFFDumper.cpp | 30 ++++---- lib/clang/headers/Makefile | 22 ++++-- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 34 files changed, 319 insertions(+), 246 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h b/contrib/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h index 4b4e3c7eb2ec..dbe219b6dd8d 100644 --- a/contrib/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h +++ b/contrib/llvm-project/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h @@ -215,6 +215,7 @@ class DependencyScanningFilesystemLocalCache { public: /// Returns entry associated with the filename or nullptr if none is found. const CachedFileSystemEntry *findEntryByFilename(StringRef Filename) const { + assert(llvm::sys::path::is_absolute_gnu(Filename)); auto It = Cache.find(Filename); return It == Cache.end() ? nullptr : It->getValue(); } @@ -224,6 +225,7 @@ public: const CachedFileSystemEntry & insertEntryForFilename(StringRef Filename, const CachedFileSystemEntry &Entry) { + assert(llvm::sys::path::is_absolute_gnu(Filename)); const auto *InsertedEntry = Cache.insert({Filename, &Entry}).first->second; assert(InsertedEntry == &Entry && "entry already present"); return *InsertedEntry; @@ -282,13 +284,14 @@ class DependencyScanningWorkerFilesystem : public llvm::vfs::ProxyFileSystem { public: DependencyScanningWorkerFilesystem( DependencyScanningFilesystemSharedCache &SharedCache, - IntrusiveRefCntPtr FS) - : ProxyFileSystem(std::move(FS)), SharedCache(SharedCache) {} + IntrusiveRefCntPtr FS); llvm::ErrorOr status(const Twine &Path) override; llvm::ErrorOr> openFileForRead(const Twine &Path) override; + std::error_code setCurrentWorkingDirectory(const Twine &Path) override; + /// Returns entry for the given filename. /// /// Attempts to use the local and shared caches first, then falls back to @@ -304,8 +307,11 @@ private: /// For a filename that's not yet associated with any entry in the caches, /// uses the underlying filesystem to either look up the entry based in the /// shared cache indexed by unique ID, or creates new entry from scratch. + /// \p FilenameForLookup will always be an absolute path, and different than + /// \p OriginalFilename if \p OriginalFilename is relative. llvm::ErrorOr - computeAndStoreResult(StringRef Filename); + computeAndStoreResult(StringRef OriginalFilename, + StringRef FilenameForLookup); /// Scan for preprocessor directives for the given entry if necessary and /// returns a wrapper object with reference semantics. @@ -388,6 +394,12 @@ private: /// The local cache is used by the worker thread to cache file system queries /// locally instead of querying the global cache every time. DependencyScanningFilesystemLocalCache LocalCache; + + /// The working directory to use for making relative paths absolute before + /// using them for cache lookups. + llvm::ErrorOr WorkingDirForCacheLookup; + + void updateWorkingDirForCacheLookup(); }; } // end namespace dependencies diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index f1bad0c7f7f2..c62044f36194 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -6013,8 +6013,9 @@ const AccessKinds StartLifetimeOfUnionMemberHandler::AccessKind; /// operator whose left-hand side might involve a union member access. If it /// does, implicitly start the lifetime of any accessed union elements per /// C++20 [class.union]5. -static bool HandleUnionActiveMemberChange(EvalInfo &Info, const Expr *LHSExpr, - const LValue &LHS) { +static bool MaybeHandleUnionActiveMemberChange(EvalInfo &Info, + const Expr *LHSExpr, + const LValue &LHS) { if (LHS.InvalidBase || LHS.Designator.Invalid) return false; @@ -6069,8 +6070,14 @@ static bool HandleUnionActiveMemberChange(EvalInfo &Info, const Expr *LHSExpr, break; // Walk path backwards as we walk up from the base to the derived class. for (const CXXBaseSpecifier *Elt : llvm::reverse(ICE->path())) { + if (Elt->isVirtual()) { + // A class with virtual base classes never has a trivial default + // constructor, so S(E) is empty in this case. + E = nullptr; + break; + } + --PathLength; - (void)Elt; assert(declaresSameEntity(Elt->getType()->getAsCXXRecordDecl(), LHS.Designator.Entries[PathLength] .getAsBaseOrMember().getPointer())); @@ -7748,7 +7755,7 @@ public: // per C++20 [class.union]5. if (Info.getLangOpts().CPlusPlus20 && OCE && OCE->getOperator() == OO_Equal && MD->isTrivial() && - !HandleUnionActiveMemberChange(Info, Args[0], ThisVal)) + !MaybeHandleUnionActiveMemberChange(Info, Args[0], ThisVal)) return false; Args = Args.slice(1); @@ -8621,7 +8628,7 @@ bool LValueExprEvaluator::VisitBinAssign(const BinaryOperator *E) { return false; if (Info.getLangOpts().CPlusPlus20 && - !HandleUnionActiveMemberChange(Info, E->getLHS(), Result)) + !MaybeHandleUnionActiveMemberChange(Info, E->getLHS(), Result)) return false; return handleAssignment(this->Info, E, Result, E->getLHS()->getType(), diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp index 0d1e9ad439b7..6b8af9bf18c1 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp @@ -5487,30 +5487,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::AlwaysInline); } - // The await_suspend call performed by co_await is essentially asynchronous - // to the execution of the coroutine. Inlining it normally into an unsplit - // coroutine can cause miscompilation because the coroutine CFG misrepresents - // the true control flow of the program: things that happen in the - // await_suspend are not guaranteed to happen prior to the resumption of the - // coroutine, and things that happen after the resumption of the coroutine - // (including its exit and the potential deallocation of the coroutine frame) - // are not guaranteed to happen only after the end of await_suspend. - // - // The short-term solution to this problem is to mark the call as uninlinable. - // But we don't want to do this if the call is known to be trivial, which is - // very common. - // - // The long-term solution may introduce patterns like: - // - // call @llvm.coro.await_suspend(ptr %awaiter, ptr %handle, - // ptr @awaitSuspendFn) - // - // Then it is much easier to perform the safety analysis in the middle end. - // If it is safe to inline the call to awaitSuspend, we can replace it in the - // CoroEarly pass. Otherwise we could replace it in the CoroSplit pass. - if (inSuspendBlock() && mayCoroHandleEscape()) - Attrs = Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::NoInline); - // Disable inlining inside SEH __try blocks. if (isSEHTryScope()) { Attrs = Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::NoInline); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp index 810ae7d51ec1..8437cda79beb 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp @@ -139,36 +139,6 @@ static bool memberCallExpressionCanThrow(const Expr *E) { return true; } -/// Return true when the coroutine handle may escape from the await-suspend -/// (`awaiter.await_suspend(std::coroutine_handle)` expression). -/// Return false only when the coroutine wouldn't escape in the await-suspend -/// for sure. -/// -/// While it is always safe to return true, return falses can bring better -/// performances. -/// -/// See https://github.com/llvm/llvm-project/issues/56301 and -/// https://reviews.llvm.org/D157070 for the example and the full discussion. -/// -/// FIXME: It will be much better to perform such analysis in the middle end. -/// See the comments in `CodeGenFunction::EmitCall` for example. -static bool MayCoroHandleEscape(CoroutineSuspendExpr const &S) { - CXXRecordDecl *Awaiter = - S.getCommonExpr()->getType().getNonReferenceType()->getAsCXXRecordDecl(); - - // Return true conservatively if the awaiter type is not a record type. - if (!Awaiter) - return true; - - // In case the awaiter type is empty, the suspend wouldn't leak the coroutine - // handle. - // - // TODO: We can improve this by looking into the implementation of - // await-suspend and see if the coroutine handle is passed to foreign - // functions. - return !Awaiter->field_empty(); -} - // Emit suspend expression which roughly looks like: // // auto && x = CommonExpr(); @@ -229,11 +199,8 @@ static LValueOrRValue emitSuspendExpression(CodeGenFunction &CGF, CGCoroData &Co auto *SaveCall = Builder.CreateCall(CoroSave, {NullPtr}); CGF.CurCoro.InSuspendBlock = true; - CGF.CurCoro.MayCoroHandleEscape = MayCoroHandleEscape(S); auto *SuspendRet = CGF.EmitScalarExpr(S.getSuspendExpr()); CGF.CurCoro.InSuspendBlock = false; - CGF.CurCoro.MayCoroHandleEscape = false; - if (SuspendRet != nullptr && SuspendRet->getType()->isIntegerTy(1)) { // Veto suspension if requested by bool returning await_suspend. BasicBlock *RealSuspendBlock = diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h index 28ec2b970072..8722fd4550e4 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h @@ -334,7 +334,6 @@ public: struct CGCoroInfo { std::unique_ptr Data; bool InSuspendBlock = false; - bool MayCoroHandleEscape = false; CGCoroInfo(); ~CGCoroInfo(); }; @@ -348,10 +347,6 @@ public: return isCoroutine() && CurCoro.InSuspendBlock; } - bool mayCoroHandleEscape() const { - return isCoroutine() && CurCoro.MayCoroHandleEscape; - } - /// CurGD - The GlobalDecl for the current function being compiled. GlobalDecl CurGD; diff --git a/contrib/llvm-project/clang/lib/Frontend/TextDiagnostic.cpp b/contrib/llvm-project/clang/lib/Frontend/TextDiagnostic.cpp index 3a3cc246d3af..1b58261b22a2 100644 --- a/contrib/llvm-project/clang/lib/Frontend/TextDiagnostic.cpp +++ b/contrib/llvm-project/clang/lib/Frontend/TextDiagnostic.cpp @@ -1160,8 +1160,7 @@ void TextDiagnostic::emitSnippetAndCaret( // Find the set of lines to include. const unsigned MaxLines = DiagOpts->SnippetLineLimit; std::pair Lines = {CaretLineNo, CaretLineNo}; - unsigned DisplayLineNo = - Ranges.empty() ? Loc.getPresumedLoc().getLine() : ~0u; + unsigned DisplayLineNo = Loc.getPresumedLoc().getLine(); for (const auto &I : Ranges) { if (auto OptionalRange = findLinesForRange(I, FID, SM)) Lines = maybeAddRange(Lines, *OptionalRange, MaxLines); diff --git a/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.h b/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.h new file mode 100644 index 000000000000..64f50d9f6a72 --- /dev/null +++ b/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.h @@ -0,0 +1,9 @@ +// CUDA headers define __noinline__ which interferes with libstdc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libstdc++ header. + +#pragma push_macro("__noinline__") +#undef __noinline__ +#include_next "bits/basic_string.h" + +#pragma pop_macro("__noinline__") diff --git a/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc b/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc new file mode 100644 index 000000000000..90c7fe34d932 --- /dev/null +++ b/contrib/llvm-project/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc @@ -0,0 +1,9 @@ +// CUDA headers define __noinline__ which interferes with libstdc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libstdc++ header. + +#pragma push_macro("__noinline__") +#undef __noinline__ +#include_next "bits/basic_string.tcc" + +#pragma pop_macro("__noinline__") diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp index f8e48728da66..8626fc6ea16f 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp @@ -11308,7 +11308,11 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, Hints.push_back( FixItHint::CreateInsertion(E->getBeginLoc(), CastFix.str())); - SourceLocation After = S.getLocForEndOfToken(E->getEndLoc()); + // We don't use getLocForEndOfToken because it returns invalid source + // locations for macro expansions (by design). + SourceLocation EndLoc = S.SourceMgr.getSpellingLoc(E->getEndLoc()); + SourceLocation After = EndLoc.getLocWithOffset( + Lexer::MeasureTokenLength(EndLoc, S.SourceMgr, S.LangOpts)); Hints.push_back(FixItHint::CreateInsertion(After, ")")); } diff --git a/contrib/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp b/contrib/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp index 31404855e3b1..3e53c8fc5740 100644 --- a/contrib/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp +++ b/contrib/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp @@ -96,6 +96,7 @@ DependencyScanningFilesystemSharedCache:: DependencyScanningFilesystemSharedCache::CacheShard & DependencyScanningFilesystemSharedCache::getShardForFilename( StringRef Filename) const { + assert(llvm::sys::path::is_absolute_gnu(Filename)); return CacheShards[llvm::hash_value(Filename) % NumShards]; } @@ -109,6 +110,7 @@ DependencyScanningFilesystemSharedCache::getShardForUID( const CachedFileSystemEntry * DependencyScanningFilesystemSharedCache::CacheShard::findEntryByFilename( StringRef Filename) const { + assert(llvm::sys::path::is_absolute_gnu(Filename)); std::lock_guard LockGuard(CacheLock); auto It = EntriesByFilename.find(Filename); return It == EntriesByFilename.end() ? nullptr : It->getValue(); @@ -189,6 +191,14 @@ static bool shouldCacheStatFailures(StringRef Filename) { return shouldScanForDirectivesBasedOnExtension(Filename); } +DependencyScanningWorkerFilesystem::DependencyScanningWorkerFilesystem( + DependencyScanningFilesystemSharedCache &SharedCache, + IntrusiveRefCntPtr FS) + : ProxyFileSystem(std::move(FS)), SharedCache(SharedCache), + WorkingDirForCacheLookup(llvm::errc::invalid_argument) { + updateWorkingDirForCacheLookup(); +} + bool DependencyScanningWorkerFilesystem::shouldScanForDirectives( StringRef Filename) { return shouldScanForDirectivesBasedOnExtension(Filename); @@ -215,44 +225,62 @@ DependencyScanningWorkerFilesystem::findEntryByFilenameWithWriteThrough( } llvm::ErrorOr -DependencyScanningWorkerFilesystem::computeAndStoreResult(StringRef Filename) { - llvm::ErrorOr Stat = getUnderlyingFS().status(Filename); +DependencyScanningWorkerFilesystem::computeAndStoreResult( + StringRef OriginalFilename, StringRef FilenameForLookup) { + llvm::ErrorOr Stat = + getUnderlyingFS().status(OriginalFilename); if (!Stat) { - if (!shouldCacheStatFailures(Filename)) + if (!shouldCacheStatFailures(OriginalFilename)) return Stat.getError(); const auto &Entry = - getOrEmplaceSharedEntryForFilename(Filename, Stat.getError()); - return insertLocalEntryForFilename(Filename, Entry); + getOrEmplaceSharedEntryForFilename(FilenameForLookup, Stat.getError()); + return insertLocalEntryForFilename(FilenameForLookup, Entry); } if (const auto *Entry = findSharedEntryByUID(*Stat)) - return insertLocalEntryForFilename(Filename, *Entry); + return insertLocalEntryForFilename(FilenameForLookup, *Entry); auto TEntry = - Stat->isDirectory() ? TentativeEntry(*Stat) : readFile(Filename); + Stat->isDirectory() ? TentativeEntry(*Stat) : readFile(OriginalFilename); const CachedFileSystemEntry *SharedEntry = [&]() { if (TEntry) { const auto &UIDEntry = getOrEmplaceSharedEntryForUID(std::move(*TEntry)); - return &getOrInsertSharedEntryForFilename(Filename, UIDEntry); + return &getOrInsertSharedEntryForFilename(FilenameForLookup, UIDEntry); } - return &getOrEmplaceSharedEntryForFilename(Filename, TEntry.getError()); + return &getOrEmplaceSharedEntryForFilename(FilenameForLookup, + TEntry.getError()); }(); - return insertLocalEntryForFilename(Filename, *SharedEntry); + return insertLocalEntryForFilename(FilenameForLookup, *SharedEntry); } llvm::ErrorOr DependencyScanningWorkerFilesystem::getOrCreateFileSystemEntry( - StringRef Filename, bool DisableDirectivesScanning) { - if (const auto *Entry = findEntryByFilenameWithWriteThrough(Filename)) - return scanForDirectivesIfNecessary(*Entry, Filename, + StringRef OriginalFilename, bool DisableDirectivesScanning) { + StringRef FilenameForLookup; + SmallString<256> PathBuf; + if (llvm::sys::path::is_absolute_gnu(OriginalFilename)) { + FilenameForLookup = OriginalFilename; + } else if (!WorkingDirForCacheLookup) { + return WorkingDirForCacheLookup.getError(); + } else { + StringRef RelFilename = OriginalFilename; + RelFilename.consume_front("./"); + PathBuf = *WorkingDirForCacheLookup; + llvm::sys::path::append(PathBuf, RelFilename); + FilenameForLookup = PathBuf.str(); + } + assert(llvm::sys::path::is_absolute_gnu(FilenameForLookup)); + if (const auto *Entry = + findEntryByFilenameWithWriteThrough(FilenameForLookup)) + return scanForDirectivesIfNecessary(*Entry, OriginalFilename, DisableDirectivesScanning) .unwrapError(); - auto MaybeEntry = computeAndStoreResult(Filename); + auto MaybeEntry = computeAndStoreResult(OriginalFilename, FilenameForLookup); if (!MaybeEntry) return MaybeEntry.getError(); - return scanForDirectivesIfNecessary(*MaybeEntry, Filename, + return scanForDirectivesIfNecessary(*MaybeEntry, OriginalFilename, DisableDirectivesScanning) .unwrapError(); } @@ -330,3 +358,24 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine &Path) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( + const Twine &Path) { + std::error_code EC = ProxyFileSystem::setCurrentWorkingDirectory(Path); + updateWorkingDirForCacheLookup(); + return EC; +} + +void DependencyScanningWorkerFilesystem::updateWorkingDirForCacheLookup() { + llvm::ErrorOr CWD = + getUnderlyingFS().getCurrentWorkingDirectory(); + if (!CWD) { + WorkingDirForCacheLookup = CWD.getError(); + } else if (!llvm::sys::path::is_absolute_gnu(*CWD)) { + WorkingDirForCacheLookup = llvm::errc::invalid_argument; + } else { + WorkingDirForCacheLookup = *CWD; + } + assert(!WorkingDirForCacheLookup || + llvm::sys::path::is_absolute_gnu(*WorkingDirForCacheLookup)); +} diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 43f8a20031ff..c37d643414aa 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -40,7 +40,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 170000 +# define _LIBCPP_VERSION 170002 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/lld/COFF/Writer.cpp b/contrib/llvm-project/lld/COFF/Writer.cpp index 85568a12531f..c9b6318fe521 100644 --- a/contrib/llvm-project/lld/COFF/Writer.cpp +++ b/contrib/llvm-project/lld/COFF/Writer.cpp @@ -1796,7 +1796,7 @@ void Writer::createGuardCFTables() { // Add the ehcont target table unless the user told us not to. if (config->guardCF & GuardCFLevel::EHCont) maybeAddRVATable(std::move(ehContTargets), "__guard_eh_cont_table", - "__guard_eh_cont_count", true); + "__guard_eh_cont_count"); // Set __guard_flags, which will be used in the load config to indicate that // /guard:cf was enabled. diff --git a/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Local.h b/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Local.h index 4578af069814..d23db1574e9d 100644 --- a/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Local.h +++ b/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Local.h @@ -162,8 +162,18 @@ bool TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB, /// Check for and eliminate duplicate PHI nodes in this block. This doesn't try /// to be clever about PHI nodes which differ only in the order of the incoming /// values, but instcombine orders them so it usually won't matter. +/// +/// This overload removes the duplicate PHI nodes directly. bool EliminateDuplicatePHINodes(BasicBlock *BB); +/// Check for and eliminate duplicate PHI nodes in this block. This doesn't try +/// to be clever about PHI nodes which differ only in the order of the incoming +/// values, but instcombine orders them so it usually won't matter. +/// +/// This overload collects the PHI nodes to be removed into the ToRemove set. +bool EliminateDuplicatePHINodes(BasicBlock *BB, + SmallPtrSetImpl &ToRemove); + /// This function is used to do simplification of a CFG. For example, it /// adjusts branches to branches to eliminate the extra hop, it eliminates /// unreachable basic blocks, and does other peephole optimization of the CFG. diff --git a/contrib/llvm-project/llvm/lib/Analysis/InlineCost.cpp b/contrib/llvm-project/llvm/lib/Analysis/InlineCost.cpp index 9ff277f5334e..a2f46edcf5ef 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/InlineCost.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/InlineCost.cpp @@ -2806,14 +2806,16 @@ LLVM_DUMP_METHOD void InlineCostCallAnalyzer::dump() { print(dbgs()); } /// Test that there are no attribute conflicts between Caller and Callee /// that prevent inlining. static bool functionsHaveCompatibleAttributes( - Function *Caller, Function *Callee, + Function *Caller, Function *Callee, TargetTransformInfo &TTI, function_ref &GetTLI) { // Note that CalleeTLI must be a copy not a reference. The legacy pass manager // caches the most recently created TLI in the TargetLibraryInfoWrapperPass // object, and always returns the same object (which is overwritten on each // GetTLI call). Therefore we copy the first result. auto CalleeTLI = GetTLI(*Callee); - return GetTLI(*Caller).areInlineCompatible(CalleeTLI, + return (IgnoreTTIInlineCompatible || + TTI.areInlineCompatible(Caller, Callee)) && + GetTLI(*Caller).areInlineCompatible(CalleeTLI, InlineCallerSupersetNoBuiltin) && AttributeFuncs::areInlineCompatible(*Caller, *Callee); } @@ -2929,12 +2931,6 @@ std::optional llvm::getAttributeBasedInliningDecision( " address space"); } - // Never inline functions with conflicting target attributes. - Function *Caller = Call.getCaller(); - if (!IgnoreTTIInlineCompatible && - !CalleeTTI.areInlineCompatible(Caller, Callee)) - return InlineResult::failure("conflicting target attributes"); - // Calls to functions with always-inline attributes should be inlined // whenever possible. if (Call.hasFnAttr(Attribute::AlwaysInline)) { @@ -2949,12 +2945,8 @@ std::optional llvm::getAttributeBasedInliningDecision( // Never inline functions with conflicting attributes (unless callee has // always-inline attribute). - // FIXME: functionsHaveCompatibleAttributes below checks for compatibilities - // of different kinds of function attributes -- sanitizer-related ones, - // checkDenormMode, no-builtin-memcpy, etc. It's unclear if we really want - // the always-inline attribute to take precedence over these different types - // of function attributes. - if (!functionsHaveCompatibleAttributes(Caller, Callee, GetTLI)) + Function *Caller = Call.getCaller(); + if (!functionsHaveCompatibleAttributes(Caller, Callee, CalleeTTI, GetTLI)) return InlineResult::failure("conflicting attributes"); // Don't inline this call if the caller has the optnone attribute. diff --git a/contrib/llvm-project/llvm/lib/CodeGen/StackColoring.cpp b/contrib/llvm-project/llvm/lib/CodeGen/StackColoring.cpp index 66b9086e1d88..3453b718b453 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/StackColoring.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/StackColoring.cpp @@ -370,37 +370,6 @@ STATISTIC(EscapedAllocas, "Number of allocas that escaped the lifetime region"); // If in RPO ordering chosen to walk the CFG we happen to visit the b[k] // before visiting the memcpy block (which will contain the lifetime start // for "b" then it will appear that 'b' has a degenerate lifetime. -// -// Handle Windows Exception with LifetimeStartOnFirstUse: -// ----------------- -// -// There was a bug for using LifetimeStartOnFirstUse in win32. -// class Type1 { -// ... -// ~Type1(){ write memory;} -// } -// ... -// try{ -// Type1 V -// ... -// } catch (Type2 X){ -// ... -// } -// For variable X in catch(X), we put point pX=&(&X) into ConservativeSlots -// to prevent using LifetimeStartOnFirstUse. Because pX may merged with -// object V which may call destructor after implicitly writing pX. All these -// are done in C++ EH runtime libs (through CxxThrowException), and can't -// obviously check it in IR level. -// -// The loader of pX, without obvious writing IR, is usually the first LOAD MI -// in EHPad, Some like: -// bb.x.catch.i (landing-pad, ehfunclet-entry): -// ; predecessors: %bb... -// successors: %bb... -// %n:gr32 = MOV32rm %stack.pX ... -// ... -// The Type2** %stack.pX will only be written in EH runtime libs, so we -// check the StoreSlots to screen it out. namespace { @@ -462,9 +431,6 @@ class StackColoring : public MachineFunctionPass { /// slots lifetime-start-on-first-use is disabled). BitVector ConservativeSlots; - /// Record the FI slots referenced by a 'may write to memory'. - BitVector StoreSlots; - /// Number of iterations taken during data flow analysis. unsigned NumIterations; @@ -660,13 +626,10 @@ unsigned StackColoring::collectMarkers(unsigned NumSlot) { InterestingSlots.resize(NumSlot); ConservativeSlots.clear(); ConservativeSlots.resize(NumSlot); - StoreSlots.clear(); - StoreSlots.resize(NumSlot); // number of start and end lifetime ops for each slot SmallVector NumStartLifetimes(NumSlot, 0); SmallVector NumEndLifetimes(NumSlot, 0); - SmallVector NumLoadInCatchPad(NumSlot, 0); // Step 1: collect markers and populate the "InterestingSlots" // and "ConservativeSlots" sets. @@ -722,13 +685,6 @@ unsigned StackColoring::collectMarkers(unsigned NumSlot) { if (! BetweenStartEnd.test(Slot)) { ConservativeSlots.set(Slot); } - // Here we check the StoreSlots to screen catch point out. For more - // information, please refer "Handle Windows Exception with - // LifetimeStartOnFirstUse" at the head of this file. - if (MI.mayStore()) - StoreSlots.set(Slot); - if (MF->getWinEHFuncInfo() && MBB->isEHPad() && MI.mayLoad()) - NumLoadInCatchPad[Slot] += 1; } } } @@ -739,14 +695,24 @@ unsigned StackColoring::collectMarkers(unsigned NumSlot) { return 0; } - // 1) PR27903: slots with multiple start or end lifetime ops are not + // PR27903: slots with multiple start or end lifetime ops are not // safe to enable for "lifetime-start-on-first-use". - // 2) And also not safe for variable X in catch(X) in windows. for (unsigned slot = 0; slot < NumSlot; ++slot) { - if (NumStartLifetimes[slot] > 1 || NumEndLifetimes[slot] > 1 || - (NumLoadInCatchPad[slot] > 1 && !StoreSlots.test(slot))) + if (NumStartLifetimes[slot] > 1 || NumEndLifetimes[slot] > 1) ConservativeSlots.set(slot); } + + // The write to the catch object by the personality function is not propely + // modeled in IR: It happens before any cleanuppads are executed, even if the + // first mention of the catch object is in a catchpad. As such, mark catch + // object slots as conservative, so they are excluded from first-use analysis. + if (WinEHFuncInfo *EHInfo = MF->getWinEHFuncInfo()) + for (WinEHTryBlockMapEntry &TBME : EHInfo->TryBlockMap) + for (WinEHHandlerType &H : TBME.HandlerArray) + if (H.CatchObj.FrameIndex != std::numeric_limits::max() && + H.CatchObj.FrameIndex >= 0) + ConservativeSlots.set(H.CatchObj.FrameIndex); + LLVM_DEBUG(dumpBV("Conservative slots", ConservativeSlots)); // Step 2: compute begin/end sets for each block diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index c7a6dd7deb45..a1753a40a117 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -7388,7 +7388,9 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, // Ensure we generate all stores for each tuple part, whilst updating the // pointer after each store correctly using vscale. while (NumParts) { - Chain = DAG.getStore(Chain, DL, OutVals[i], Ptr, MPI); + SDValue Store = DAG.getStore(Chain, DL, OutVals[i], Ptr, MPI); + MemOpChains.push_back(Store); + NumParts--; if (NumParts > 0) { SDValue BytesIncrement; diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td b/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td index 471b706cc408..fde386188cd8 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td @@ -4854,7 +4854,7 @@ class AI_crc32 sz, string suffix, SDPatternOperator builtin> : AInoP<(outs GPRnopc:$Rd), (ins GPRnopc:$Rn, GPRnopc:$Rm), MiscFrm, NoItinerary, !strconcat("crc32", suffix), "\t$Rd, $Rn, $Rm", [(set GPRnopc:$Rd, (builtin GPRnopc:$Rn, GPRnopc:$Rm))]>, - Requires<[IsARM, HasV8, HasCRC]> { + Requires<[IsARM, HasCRC]> { bits<4> Rd; bits<4> Rn; bits<4> Rm; diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td b/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td index 610a71d68ec8..f68f73523ba1 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td @@ -3448,7 +3448,7 @@ class T2I_crc32 sz, string suffix, SDPatternOperator builtin> : T2ThreeRegNoP<(outs rGPR:$Rd), (ins rGPR:$Rn, rGPR:$Rm), NoItinerary, !strconcat("crc32", suffix, "\t$Rd, $Rn, $Rm"), [(set rGPR:$Rd, (builtin rGPR:$Rn, rGPR:$Rm))]>, - Requires<[IsThumb2, HasV8, HasCRC]> { + Requires<[IsThumb2, HasCRC]> { let Inst{31-27} = 0b11111; let Inst{26-21} = 0b010110; let Inst{20} = C; diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index a089d61616e1..5c10d6307c76 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -279,7 +279,7 @@ public: void emitFunctionBodyEnd() override; - void emitPGORefs(); + void emitPGORefs(Module &M); void emitEndOfAsmFile(Module &) override; @@ -2636,10 +2636,28 @@ void PPCAIXAsmPrinter::emitFunctionEntryLabel() { getObjFileLowering().getFunctionEntryPointSymbol(Alias, TM)); } -void PPCAIXAsmPrinter::emitPGORefs() { - if (OutContext.hasXCOFFSection( +void PPCAIXAsmPrinter::emitPGORefs(Module &M) { + if (!OutContext.hasXCOFFSection( "__llvm_prf_cnts", - XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD))) { + XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD))) + return; + + // When inside a csect `foo`, a .ref directive referring to a csect `bar` + // translates into a relocation entry from `foo` to` bar`. The referring + // csect, `foo`, is identified by its address. If multiple csects have the + // same address (because one or more of them are zero-length), the referring + // csect cannot be determined. Hence, we don't generate the .ref directives + // if `__llvm_prf_cnts` is an empty section. + bool HasNonZeroLengthPrfCntsSection = false; + const DataLayout &DL = M.getDataLayout(); + for (GlobalVariable &GV : M.globals()) + if (GV.hasSection() && GV.getSection().equals("__llvm_prf_cnts") && + DL.getTypeAllocSize(GV.getValueType()) > 0) { + HasNonZeroLengthPrfCntsSection = true; + break; + } + + if (HasNonZeroLengthPrfCntsSection) { MCSection *CntsSection = OutContext.getXCOFFSection( "__llvm_prf_cnts", SectionKind::getData(), XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD), @@ -2673,7 +2691,7 @@ void PPCAIXAsmPrinter::emitEndOfAsmFile(Module &M) { if (M.empty() && TOCDataGlobalVars.empty()) return; - emitPGORefs(); + emitPGORefs(M); // Switch to section to emit TOC base. OutStreamer->switchSection(getObjFileLowering().getTOCBaseSection()); diff --git a/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp b/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp index 03e8a2507b45..4cfc0bacefbc 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVN.cpp @@ -2778,7 +2778,12 @@ bool GVNPass::processBlock(BasicBlock *BB) { // use our normal hash approach for phis. Instead, simply look for // obvious duplicates. The first pass of GVN will tend to create // identical phis, and the second or later passes can eliminate them. - ChangedFunction |= EliminateDuplicatePHINodes(BB); + SmallPtrSet PHINodesToRemove; + ChangedFunction |= EliminateDuplicatePHINodes(BB, PHINodesToRemove); + for (PHINode *PN : PHINodesToRemove) { + VN.erase(PN); + removeInstruction(PN); + } for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE;) { diff --git a/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp index 00937e0d734a..91dc5018d232 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -332,6 +332,17 @@ static bool writtenBetween(MemorySSA *MSSA, BatchAAResults &AA, return !MSSA->dominates(Clobber, Start); } +// Update AA metadata +static void combineAAMetadata(Instruction *ReplInst, Instruction *I) { + // FIXME: MD_tbaa_struct and MD_mem_parallel_loop_access should also be + // handled here, but combineMetadata doesn't support them yet + unsigned KnownIDs[] = {LLVMContext::MD_tbaa, LLVMContext::MD_alias_scope, + LLVMContext::MD_noalias, + LLVMContext::MD_invariant_group, + LLVMContext::MD_access_group}; + combineMetadata(ReplInst, I, KnownIDs, true); +} + /// When scanning forward over instructions, we look for some other patterns to /// fold away. In particular, this looks for stores to neighboring locations of /// memory. If it sees enough consecutive ones, it attempts to merge them @@ -1086,16 +1097,9 @@ bool MemCpyOptPass::performCallSlotOptzn(Instruction *cpyLoad, MSSA->getMemoryAccess(C)); } - // Update AA metadata - // FIXME: MD_tbaa_struct and MD_mem_parallel_loop_access should also be - // handled here, but combineMetadata doesn't support them yet - unsigned KnownIDs[] = {LLVMContext::MD_tbaa, LLVMContext::MD_alias_scope, - LLVMContext::MD_noalias, - LLVMContext::MD_invariant_group, - LLVMContext::MD_access_group}; - combineMetadata(C, cpyLoad, KnownIDs, true); + combineAAMetadata(C, cpyLoad); if (cpyLoad != cpyStore) - combineMetadata(C, cpyStore, KnownIDs, true); + combineAAMetadata(C, cpyStore); ++NumCallSlot; return true; @@ -1694,6 +1698,7 @@ bool MemCpyOptPass::processImmutArgument(CallBase &CB, unsigned ArgNo) { << " " << CB << "\n"); // Otherwise we're good! Update the immut argument. + combineAAMetadata(&CB, MDep); CB.setArgOperand(ArgNo, MDep->getSource()); ++NumMemCpyInstr; return true; diff --git a/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp index ad7d34b61470..633d077e6492 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp @@ -2126,9 +2126,10 @@ static void unswitchNontrivialInvariants( Loop &L, Instruction &TI, ArrayRef Invariants, IVConditionInfo &PartialIVInfo, DominatorTree &DT, LoopInfo &LI, AssumptionCache &AC, - function_ref)> UnswitchCB, + function_ref)> UnswitchCB, ScalarEvolution *SE, MemorySSAUpdater *MSSAU, - function_ref DestroyLoopCB, bool InsertFreeze) { + function_ref DestroyLoopCB, bool InsertFreeze, + bool InjectedCondition) { auto *ParentBB = TI.getParent(); BranchInst *BI = dyn_cast(&TI); SwitchInst *SI = BI ? nullptr : cast(&TI); @@ -2581,7 +2582,7 @@ static void unswitchNontrivialInvariants( for (Loop *UpdatedL : llvm::concat(NonChildClonedLoops, HoistedLoops)) if (UpdatedL->getParentLoop() == ParentL) SibLoops.push_back(UpdatedL); - UnswitchCB(IsStillLoop, PartiallyInvariant, SibLoops); + UnswitchCB(IsStillLoop, PartiallyInvariant, InjectedCondition, SibLoops); if (MSSAU && VerifyMemorySSA) MSSAU->getMemorySSA()->verifyMemorySSA(); @@ -2979,13 +2980,6 @@ static bool shouldTryInjectInvariantCondition( /// the metadata. bool shouldTryInjectBasingOnMetadata(const BranchInst *BI, const BasicBlock *TakenSucc) { - // Skip branches that have already been unswithed this way. After successful - // unswitching of injected condition, we will still have a copy of this loop - // which looks exactly the same as original one. To prevent the 2nd attempt - // of unswitching it in the same pass, mark this branch as "nothing to do - // here". - if (BI->hasMetadata("llvm.invariant.condition.injection.disabled")) - return false; SmallVector Weights; if (!extractBranchWeights(*BI, Weights)) return false; @@ -3060,7 +3054,6 @@ injectPendingInvariantConditions(NonTrivialUnswitchCandidate Candidate, Loop &L, auto *InjectedCond = ICmpInst::Create(Instruction::ICmp, Pred, LHS, RHS, "injected.cond", Preheader->getTerminator()); - auto *OldCond = TI->getCondition(); BasicBlock *CheckBlock = BasicBlock::Create(Ctx, BB->getName() + ".check", BB->getParent(), InLoopSucc); @@ -3069,12 +3062,9 @@ injectPendingInvariantConditions(NonTrivialUnswitchCandidate Candidate, Loop &L, Builder.CreateCondBr(InjectedCond, InLoopSucc, CheckBlock); Builder.SetInsertPoint(CheckBlock); - auto *NewTerm = Builder.CreateCondBr(OldCond, InLoopSucc, OutOfLoopSucc); - + Builder.CreateCondBr(TI->getCondition(), TI->getSuccessor(0), + TI->getSuccessor(1)); TI->eraseFromParent(); - // Prevent infinite unswitching. - NewTerm->setMetadata("llvm.invariant.condition.injection.disabled", - MDNode::get(BB->getContext(), {})); // Fixup phis. for (auto &I : *InLoopSucc) { @@ -3442,7 +3432,7 @@ static bool shouldInsertFreeze(Loop &L, Instruction &TI, DominatorTree &DT, static bool unswitchBestCondition( Loop &L, DominatorTree &DT, LoopInfo &LI, AssumptionCache &AC, AAResults &AA, TargetTransformInfo &TTI, - function_ref)> UnswitchCB, + function_ref)> UnswitchCB, ScalarEvolution *SE, MemorySSAUpdater *MSSAU, function_ref DestroyLoopCB) { // Collect all invariant conditions within this loop (as opposed to an inner @@ -3452,9 +3442,10 @@ static bool unswitchBestCondition( Instruction *PartialIVCondBranch = nullptr; collectUnswitchCandidates(UnswitchCandidates, PartialIVInfo, PartialIVCondBranch, L, LI, AA, MSSAU); - collectUnswitchCandidatesWithInjections(UnswitchCandidates, PartialIVInfo, - PartialIVCondBranch, L, DT, LI, AA, - MSSAU); + if (!findOptionMDForLoop(&L, "llvm.loop.unswitch.injection.disable")) + collectUnswitchCandidatesWithInjections(UnswitchCandidates, PartialIVInfo, + PartialIVCondBranch, L, DT, LI, AA, + MSSAU); // If we didn't find any candidates, we're done. if (UnswitchCandidates.empty()) return false; @@ -3475,8 +3466,11 @@ static bool unswitchBestCondition( return false; } - if (Best.hasPendingInjection()) + bool InjectedCondition = false; + if (Best.hasPendingInjection()) { Best = injectPendingInvariantConditions(Best, L, DT, LI, AC, MSSAU); + InjectedCondition = true; + } assert(!Best.hasPendingInjection() && "All injections should have been done by now!"); @@ -3504,7 +3498,7 @@ static bool unswitchBestCondition( << ") terminator: " << *Best.TI << "\n"); unswitchNontrivialInvariants(L, *Best.TI, Best.Invariants, PartialIVInfo, DT, LI, AC, UnswitchCB, SE, MSSAU, DestroyLoopCB, - InsertFreeze); + InsertFreeze, InjectedCondition); return true; } @@ -3533,7 +3527,7 @@ static bool unswitchLoop(Loop &L, DominatorTree &DT, LoopInfo &LI, AssumptionCache &AC, AAResults &AA, TargetTransformInfo &TTI, bool Trivial, bool NonTrivial, - function_ref)> UnswitchCB, + function_ref)> UnswitchCB, ScalarEvolution *SE, MemorySSAUpdater *MSSAU, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI, function_ref DestroyLoopCB) { @@ -3548,7 +3542,8 @@ unswitchLoop(Loop &L, DominatorTree &DT, LoopInfo &LI, AssumptionCache &AC, if (Trivial && unswitchAllTrivialConditions(L, DT, LI, SE, MSSAU)) { // If we unswitched successfully we will want to clean up the loop before // processing it further so just mark it as unswitched and return. - UnswitchCB(/*CurrentLoopValid*/ true, false, {}); + UnswitchCB(/*CurrentLoopValid*/ true, /*PartiallyInvariant*/ false, + /*InjectedCondition*/ false, {}); return true; } @@ -3644,6 +3639,7 @@ PreservedAnalyses SimpleLoopUnswitchPass::run(Loop &L, LoopAnalysisManager &AM, auto UnswitchCB = [&L, &U, &LoopName](bool CurrentLoopValid, bool PartiallyInvariant, + bool InjectedCondition, ArrayRef NewLoops) { // If we did a non-trivial unswitch, we have added new (cloned) loops. if (!NewLoops.empty()) @@ -3663,6 +3659,16 @@ PreservedAnalyses SimpleLoopUnswitchPass::run(Loop &L, LoopAnalysisManager &AM, *** 405 LINES SKIPPED *** From nobody Sun Jan 7 23:08:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtM5PkGz56F48; Sun, 7 Jan 2024 23:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7XtM39R2z4Q99; Sun, 7 Jan 2024 23:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ik/ZXE9XvQsT9w3Ej4+CmqTfGWJCJky6dlzp3atyTa4=; b=nWDrefiqW9rvcEC3sfTmyEikhdPbn3ppRfRmd68ZJdZKs7cN8gXbSiIR4pEcGK8wyEu24P ZybO1UB8TEiXJkTpwIDwROky4hUUMRR+XfyLiSU7WzCAPW33FwWk0kbAWns2PSJ2AwHN9O zSekzIcDMwTgEMEyJBs/oeKawTZHxcLNvT81rEboBMUKAJEd+2uY5eZhzl2CkpXt04Ip0Z dcOylpAxO/Xych1NQBtMNuzaZDUjWLCVRYhe7Rp6hMS8bMamZTnCAZecMCYoQwa7HomUUI OPA/6Z8yPnyXYbh4Mbh08QPdkUsrQ7RoxxYQTXrZK5rDuUSvsZURshU+/vz6rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ik/ZXE9XvQsT9w3Ej4+CmqTfGWJCJky6dlzp3atyTa4=; b=sU49qzz8c+k7zu4WhRlqY0IJY7ZJ6dPrZWZ1rW4uGC4gDLt6HsRyDjJLiO+2Wa5+WVoHtl QIxH/qwAjVHgFPCQTKsKOLGfWe/5tZI5Bt8NA1hgxuPI0k1GqrwyD18imrTxDaho5P/kzn VV42RCLbJ6L3+gXZ9sEANVDSbh3hplSv7PHXDRfLeHJg/pTu7POOsf58X9N+1xrx20nN2U 8MarahyvWKhHREZeqmymlpb21c30VXyAH2xt7JYMm2fxXkuW8F5lXJTWKQ3uSf+iH9L4Ac JFwVWm/cJO3h5wbEd65bjakLwLPhFcW1OF7DjhrYrULLrsgGv1HR61INkOtBqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668907; a=rsa-sha256; cv=none; b=X98qhuTLu9Qa+HNkR9nbrv02HbB/yiUTjp2xnPe99fuEpV1f08DoNnsat+beI/nK/TUIi5 drNAxBeMGMH7NrYN5+ovfd0zMSvuxc1OGsRxx0aycymZo1dSALfY5Cij6o5MF2Aw1SusKH 1pwcVO9oO7m9SX0w5npxIqiZGXWQlEHtUbW93RLSiiH3tz4vklc6IjjuBl/RB/dD3jtcvb clo4khI+WWcLxwlw95OAapvx2RTeVeY1JhLqZTYySRLmFOTHAT5TPT9xSWalknTkSQ+GX8 vf7D093VNetq2FKgea4nswMdMWCpYR/WNQHoGDe+soFy3CVKCb4vclneH7aCRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtM2HVzzk9s; Sun, 7 Jan 2024 23:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407N8RrI053232; Sun, 7 Jan 2024 23:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8Rtc053229; Sun, 7 Jan 2024 23:08:27 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:27 GMT Message-Id: <202401072308.407N8Rtc053229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 27485d5542b4 - stable/13 - Merge llvm-project release/17.x llvmorg-17.0.2-0-gb2417f51dbbd List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 27485d5542b4af45e13a1069a76a6a68eee99440 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=27485d5542b4af45e13a1069a76a6a68eee99440 commit 27485d5542b4af45e13a1069a76a6a68eee99440 Author: Dimitry Andric AuthorDate: 2023-10-04 18:24:05 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:40 +0000 Merge llvm-project release/17.x llvmorg-17.0.2-0-gb2417f51dbbd This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.2-0-gb2417f51dbbd. PR: 273753 MFC after: 1 month (cherry picked from commit 3bd749dbd90cc3b95719b65393df5ca8a0fe919d) --- .../clang/lib/Driver/ToolChains/MinGW.cpp | 7 ++-- .../llvm-project/libcxx/include/__utility/pair.h | 4 +-- contrib/llvm-project/lld/COFF/Driver.cpp | 42 +++++++++++----------- contrib/llvm-project/lld/Common/Filesystem.cpp | 2 +- .../lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 +- lib/clang/include/VCSVersion.inc | 6 ++-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 8 files changed, 36 insertions(+), 31 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp index b47041dcca70..eaec1d22e6e5 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp @@ -699,8 +699,11 @@ void toolchains::MinGW::addClangTargetOptions( } } - if (Arg *A = DriverArgs.getLastArgNoClaim(options::OPT_mthreads)) - A->ignoreTargetSpecific(); + for (auto Opt : {options::OPT_mthreads, options::OPT_mwindows, + options::OPT_mconsole, options::OPT_mdll}) { + if (Arg *A = DriverArgs.getLastArgNoClaim(Opt)) + A->ignoreTargetSpecific(); + } } void toolchains::MinGW::AddClangCXXStdlibIncludeArgs( diff --git a/contrib/llvm-project/libcxx/include/__utility/pair.h b/contrib/llvm-project/libcxx/include/__utility/pair.h index 43c9dbec737b..6b8c43dbe6e4 100644 --- a/contrib/llvm-project/libcxx/include/__utility/pair.h +++ b/contrib/llvm-project/libcxx/include/__utility/pair.h @@ -288,9 +288,9 @@ struct _LIBCPP_TEMPLATE_VIS pair # if _LIBCPP_STD_VER >= 23 // This is a workaround for http://llvm.org/PR60710. We should be able to remove it once Clang is fixed. - template >::value == 2> + template _LIBCPP_HIDE_FROM_ABI static constexpr bool __pair_like_explicit_wknd() { - if constexpr (tuple_size>::value == 2) { + if constexpr (__pair_like<_PairLike>) { return !is_convertible_v(std::declval<_PairLike&&>())), first_type> || !is_convertible_v(std::declval<_PairLike&&>())), second_type>; } diff --git a/contrib/llvm-project/lld/COFF/Driver.cpp b/contrib/llvm-project/lld/COFF/Driver.cpp index d7476e91e03e..e2f414f78ecb 100644 --- a/contrib/llvm-project/lld/COFF/Driver.cpp +++ b/contrib/llvm-project/lld/COFF/Driver.cpp @@ -342,8 +342,8 @@ void LinkerDriver::enqueueArchiveMember(const Archive::Child &c, CHECK(c.getFullName(), "could not get the filename for the member defining symbol " + toCOFFString(ctx, sym)); - auto future = std::make_shared>( - createFutureForFile(childName)); + auto future = + std::make_shared>(createFutureForFile(childName)); enqueueTask([=]() { auto mbOrErr = future->get(); if (mbOrErr.second) @@ -640,26 +640,24 @@ void LinkerDriver::detectWinSysRoot(const opt::InputArgList &Args) { void LinkerDriver::addClangLibSearchPaths(const std::string &argv0) { std::string lldBinary = sys::fs::getMainExecutable(argv0.c_str(), nullptr); SmallString<128> binDir(lldBinary); - sys::path::remove_filename(binDir); // remove lld-link.exe + sys::path::remove_filename(binDir); // remove lld-link.exe StringRef rootDir = sys::path::parent_path(binDir); // remove 'bin' SmallString<128> libDir(rootDir); sys::path::append(libDir, "lib"); - // We need to prepend the paths here in order to make sure that we always - // try to link the clang versions of the builtins over the ones supplied by MSVC. - searchPaths.insert(searchPaths.begin(), saver().save(libDir.str())); // Add the resource dir library path SmallString<128> runtimeLibDir(rootDir); - sys::path::append(runtimeLibDir, "lib", "clang", std::to_string(LLVM_VERSION_MAJOR), "lib"); - searchPaths.insert(searchPaths.begin(), saver().save(runtimeLibDir.str())); - + sys::path::append(runtimeLibDir, "lib", "clang", + std::to_string(LLVM_VERSION_MAJOR), "lib"); // Resource dir + osname, which is hardcoded to windows since we are in the // COFF driver. SmallString<128> runtimeLibDirWithOS(runtimeLibDir); sys::path::append(runtimeLibDirWithOS, "windows"); - searchPaths.insert(searchPaths.begin(), saver().save(runtimeLibDirWithOS.str())); + searchPaths.push_back(saver().save(runtimeLibDirWithOS.str())); + searchPaths.push_back(saver().save(runtimeLibDir.str())); + searchPaths.push_back(saver().save(libDir.str())); } void LinkerDriver::addWinSysRootLibSearchPaths() { @@ -1145,8 +1143,7 @@ void LinkerDriver::parseOrderFile(StringRef arg) { if (set.count(s) == 0) { if (ctx.config.warnMissingOrderSymbol) warn("/order:" + arg + ": missing symbol: " + s + " [LNK4037]"); - } - else + } else ctx.config.order[s] = INT_MIN + ctx.config.order.size(); } @@ -1313,8 +1310,8 @@ void LinkerDriver::parsePDBAltPath() { else if (var.equals_insensitive("%_ext%")) buf.append(binaryExtension); else { - warn("only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping " + - var + " as literal"); + warn("only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping " + var + + " as literal"); buf.append(var); } @@ -1448,8 +1445,8 @@ getVFS(const opt::InputArgList &args) { return nullptr; } - if (auto ret = vfs::getVFSFromYAML(std::move(*bufOrErr), /*DiagHandler*/ nullptr, - arg->getValue())) + if (auto ret = vfs::getVFSFromYAML(std::move(*bufOrErr), + /*DiagHandler*/ nullptr, arg->getValue())) return ret; error("Invalid vfs overlay"); @@ -1563,12 +1560,13 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { // Construct search path list. searchPaths.emplace_back(""); + // Prefer the Clang provided builtins over the ones bundled with MSVC. + addClangLibSearchPaths(argsArr[0]); for (auto *arg : args.filtered(OPT_libpath)) searchPaths.push_back(arg->getValue()); detectWinSysRoot(args); if (!args.hasArg(OPT_lldignoreenv) && !args.hasArg(OPT_winsysroot)) addLibSearchPaths(); - addClangLibSearchPaths(argsArr[0]); // Handle /ignore for (auto *arg : args.filtered(OPT_ignore)) { @@ -2083,8 +2081,11 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { raw_svector_ostream stream(buffer); stream << "Library search paths:\n"; - for (StringRef path : searchPaths) + for (StringRef path : searchPaths) { + if (path == "") + path = "(cwd)"; stream << " " << path << "\n"; + } message(buffer); } @@ -2101,7 +2102,7 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { // Handle /RELEASE if (args.hasArg(OPT_release)) config->writeCheckSum = true; - + // Handle /safeseh, x86 only, on by default, except for mingw. if (config->machine == I386) { config->safeSEH = args.hasFlag(OPT_safeseh, OPT_safeseh_no, !config->mingw); @@ -2342,7 +2343,8 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { std::vector wrapped = addWrappedSymbols(ctx, args); // Load more object files that might be needed for wrapped symbols. if (!wrapped.empty()) - while (run()); + while (run()) + ; if (config->autoImport || config->stdcallFixup) { // MinGW specific. diff --git a/contrib/llvm-project/lld/Common/Filesystem.cpp b/contrib/llvm-project/lld/Common/Filesystem.cpp index 671b352a3f6b..c93353f2d292 100644 --- a/contrib/llvm-project/lld/Common/Filesystem.cpp +++ b/contrib/llvm-project/lld/Common/Filesystem.cpp @@ -57,7 +57,7 @@ void lld::unlinkAsync(StringRef path) { // // The code here allows LLD to work on all versions of Windows. // However, at Windows 10 1903 it seems that the behavior of - // Windows has changed, so that we could simply delete the output + // Windows has changed, so that we could simply delete the output // file. This code should be simplified once support for older // versions of Windows is dropped. // diff --git a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 55fb522554fa..4ffffd85ee53 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -855,7 +855,7 @@ static MCSectionELF *selectELFSectionForGlobal( Group = C->getName(); IsComdat = C->getSelectionKind() == Comdat::Any; } - if (isa(GO)) { + if (isa(GO) && !cast(GO)->isThreadLocal()) { if (TM.isLargeData()) { assert(TM.getTargetTriple().getArch() == Triple::x86_64); Flags |= ELF::SHF_X86_64_LARGE; diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index c4338e330ee5..09e5bd0806a8 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-17.0.1-25-g098e653a5bed" +#define LLVM_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-17.0.1-25-g098e653a5bed" +#define CLANG_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-17.0.1-25-g098e653a5bed" +#define LLDB_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index d8b1ac96c623..722673ac78da 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "17.0.2 (FreeBSD llvmorg-17.0.1-25-g098e653a5bed-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "17.0.2 (FreeBSD llvmorg-17.0.2-0-gb2417f51dbbd-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 796a12cb1ea0..846d3cb3e014 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-17.0.1-25-g098e653a5bed" +#define LLVM_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Sun Jan 7 23:08:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtN60WPz56FCK; Sun, 7 Jan 2024 23:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7XtN4qNmz4QCc; Sun, 7 Jan 2024 23:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Yb3iT5bbhBkeaACW6jMQpHUiEyCnkyD7hNABnC5zPs=; b=susTEKoUizvJa9hNDZrbvcadbVSdM+hzF3B+2XF8q2BN+Pr/jpaDKdHF9GiekYg0bIfig5 AUor4JoqEbKRy+Yz8EEsxQGNTp00iIMmFN8KU4wjXnCu95nWCSuqtK05AKOfYzwhzRjgb4 P9FETCam3nx5q4D9x3cgQHr5IK1AoK9QhViKqVsGKM4F+K2I2sBjBjDdZyF6MWhBOTf0Y1 IwS19h8WDluJBx81TMyXuGbh2cDUE0RnSMQHUcp1rg4x+t/Jk1it2JIlSEuajv3ZXdpq65 XyyfklWrj+c86VV3ncxw9GVLRsVYfHyOJxuSARcCmyrauGA7E0X92qBPXWMG+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Yb3iT5bbhBkeaACW6jMQpHUiEyCnkyD7hNABnC5zPs=; b=ZGO2bJEUdADOLj8n6UGgX/bZx4iUVPjpAd2T9urIQLxKO7iqXIvtu6QZxkS/SnsejMTKX0 RLuKjDdIsfGDWTr8ThyHmiYNIEsYuslH8jKz1QgwBQxAR6IM6HA8vcbvpzRiseTu8w0IUm psIXU7vzd67cofUEorK7ZU8vwplK1rGBlB1Lq9Wm41ElE/FGl9wAaGf6+a/TePO8iaNJiS 4NuPqo8eAdNeKGmgXh3WjTGLt3tx2Nx5l/ciwo+mpZJZdIbbMWJ/6nVBEXgNYjw2EyEQRH pxyKlyuEIVuc4nDGeMKVXuQAUxQcKiX2BgsPxSncXpcV+91m4jCQFXoo/pG/Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668908; a=rsa-sha256; cv=none; b=G6h7qnIATq8B7uC4MfTBD1zTo/ph97yJTWpoTLKdJHjhIYg5v9J37dhefyraf27Hh07Zdi lMUK+lW4X81Puqdo+DdgC8IPAf6njRtxMm2Mjbc4ZkjnwT9b0urAVnZW5mpiJbY0lCj/ju xGLJf/qWuAndeMkwjZubKZsYp597SRJy6Rn5Zl2xSJeDEzJ6wS7jR+4JONkyDog6xIO8rx 7Ivje2MblMWbelUT7w5ll4+aJ/jcGedCsA6AiRY02mqm/0Sj2Gv2psucGSyzKEdKVXwgYg sA7kNFNBUvzptIYQkTs5sF3qTP4HXWYLK+6P2Cn/ZRi29p8OPxtO450d5MWREA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtN3x02zkNQ; Sun, 7 Jan 2024 23:08: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 407N8SqB053271; Sun, 7 Jan 2024 23:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8SFF053268; Sun, 7 Jan 2024 23:08:28 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:28 GMT Message-Id: <202401072308.407N8SFF053268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 22dc259bb4dd - stable/13 - Merge llvm-project release/17.x llvmorg-17.0.3-0-g888437e1b600 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 22dc259bb4dda880c7b1141c54433a4d1b0dbc45 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=22dc259bb4dda880c7b1141c54433a4d1b0dbc45 commit 22dc259bb4dda880c7b1141c54433a4d1b0dbc45 Author: Dimitry Andric AuthorDate: 2023-10-21 13:31:11 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:40 +0000 Merge llvm-project release/17.x llvmorg-17.0.3-0-g888437e1b600 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.3-0-g888437e1b600. PR: 273753 MFC after: 1 month (cherry picked from commit bdb86d1a853a919764f65fdedcea76d76e4d619b) --- .../clang/lib/Driver/ToolChains/MinGW.cpp | 2 + .../clang/lib/Format/UnwrappedLineParser.cpp | 24 +++++++++ .../clang/lib/Format/UnwrappedLineParser.h | 11 ++++ .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 25 +++++---- .../clang/utils/TableGen/ClangAttrEmitter.cpp | 17 +++--- contrib/llvm-project/libcxx/include/__config | 2 +- contrib/llvm-project/lld/COFF/InputFiles.cpp | 2 + .../llvm/lib/Analysis/LazyValueInfo.cpp | 2 +- contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp | 3 ++ .../lib/Target/AArch64/AArch64ISelLowering.cpp | 7 ++- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 +- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 21 ++++++-- .../Instrumentation/AddressSanitizer.cpp | 61 ++++++++++++---------- lib/clang/include/VCSVersion.inc | 6 +-- lib/clang/include/clang/Basic/Version.inc | 6 +-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +-- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 20 files changed, 139 insertions(+), 70 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp index eaec1d22e6e5..503dbf3f0dea 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/MinGW.cpp @@ -699,6 +699,8 @@ void toolchains::MinGW::addClangTargetOptions( } } + CC1Args.push_back("-fno-use-init-array"); + for (auto Opt : {options::OPT_mthreads, options::OPT_mwindows, options::OPT_mconsole, options::OPT_mdll}) { if (Arg *A = DriverArgs.getLastArgNoClaim(Opt)) diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index 852437b9390f..07ff86bc50a2 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -173,10 +173,12 @@ void UnwrappedLineParser::reset() { CommentsBeforeNextToken.clear(); FormatTok = nullptr; MustBreakBeforeNextToken = false; + IsDecltypeAutoFunction = false; PreprocessorDirectives.clear(); CurrentLines = &Lines; DeclarationScopeStack.clear(); NestedTooDeep.clear(); + NestedLambdas.clear(); PPStack.clear(); Line->FirstStartColumn = FirstStartColumn; @@ -1757,6 +1759,17 @@ void UnwrappedLineParser::parseStructuralElement( if (parseStructLike()) return; break; + case tok::kw_decltype: + nextToken(); + if (FormatTok->is(tok::l_paren)) { + parseParens(); + assert(FormatTok->Previous); + if (FormatTok->Previous->endsSequence(tok::r_paren, tok::kw_auto, + tok::l_paren)) { + Line->SeenDecltypeAuto = true; + } + } + break; case tok::period: nextToken(); // In Java, classes have an implicit static member "class". @@ -1818,6 +1831,7 @@ void UnwrappedLineParser::parseStructuralElement( if (NextLBracesType != TT_Unknown) FormatTok->setFinalizedType(NextLBracesType); if (!tryToParsePropertyAccessor() && !tryToParseBracedList()) { + IsDecltypeAutoFunction = Line->SeenDecltypeAuto; // A block outside of parentheses must be the last part of a // structural element. // FIXME: Figure out cases where this is not true, and add projections @@ -1835,6 +1849,7 @@ void UnwrappedLineParser::parseStructuralElement( } FormatTok->setFinalizedType(TT_FunctionLBrace); parseBlock(); + IsDecltypeAutoFunction = false; addUnwrappedLine(); return; } @@ -2249,9 +2264,15 @@ bool UnwrappedLineParser::tryToParseLambda() { return true; } } + FormatTok->setFinalizedType(TT_LambdaLBrace); LSquare.setFinalizedType(TT_LambdaLSquare); + + NestedLambdas.push_back(Line->SeenDecltypeAuto); parseChildBlock(); + assert(!NestedLambdas.empty()); + NestedLambdas.pop_back(); + return true; } @@ -2471,6 +2492,8 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) { PrevPrev->endsSequence(tok::kw_constexpr, tok::kw_if)))); const bool ReturnParens = Style.RemoveParentheses == FormatStyle::RPS_ReturnStatement && + ((NestedLambdas.empty() && !IsDecltypeAutoFunction) || + (!NestedLambdas.empty() && !NestedLambdas.back())) && Prev && Prev->isOneOf(tok::kw_return, tok::kw_co_return) && Next && Next->is(tok::semi); if ((DoubleParens && !Blacklisted) || ReturnParens) { @@ -4386,6 +4409,7 @@ void UnwrappedLineParser::addUnwrappedLine(LineLevel AdjustLevel) { Line->MatchingOpeningBlockLineIndex = UnwrappedLine::kInvalidIndex; Line->FirstStartColumn = 0; Line->IsContinuation = false; + Line->SeenDecltypeAuto = false; if (ClosesWhitesmithsBlock && AdjustLevel == LineLevel::Remove) --Line->Level; diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h index 57515af64a3e..96248d130ddb 100644 --- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h +++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h @@ -61,6 +61,9 @@ struct UnwrappedLine { bool MustBeDeclaration; + /// Whether the parser has seen \c decltype(auto) in this line. + bool SeenDecltypeAuto = false; + /// \c True if this line should be indented by ContinuationIndent in /// addition to the normal indention level. bool IsContinuation = false; @@ -341,6 +344,14 @@ private: // statement contains more than some predefined number of nested statements). SmallVector NestedTooDeep; + // Keeps a stack of the states of nested lambdas (true if the return type of + // the lambda is `decltype(auto)`). + SmallVector NestedLambdas; + + // Whether the parser is parsing the body of a function whose return type is + // `decltype(auto)`. + bool IsDecltypeAutoFunction = false; + // Represents preprocessor branch type, so we can find matching // #if/#else/#endif directives. enum PPBranchKind { diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp index 8626fc6ea16f..a94f009f3fa6 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp @@ -11166,12 +11166,15 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, ImplicitMatch == ArgType::NoMatchTypeConfusion) Match = ImplicitMatch; assert(Match != ArgType::MatchPromotion); + // Look through unscoped enums to their underlying type. bool IsEnum = false; bool IsScopedEnum = false; + QualType IntendedTy = ExprTy; if (auto EnumTy = ExprTy->getAs()) { + IntendedTy = EnumTy->getDecl()->getIntegerType(); if (EnumTy->isUnscopedEnumerationType()) { - ExprTy = EnumTy->getDecl()->getIntegerType(); + ExprTy = IntendedTy; // This controls whether we're talking about the underlying type or not, // which we only want to do when it's an unscoped enum. IsEnum = true; @@ -11183,7 +11186,6 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, // %C in an Objective-C context prints a unichar, not a wchar_t. // If the argument is an integer of some kind, believe the %C and suggest // a cast instead of changing the conversion specifier. - QualType IntendedTy = ExprTy; if (isObjCContext() && FS.getConversionSpecifier().getKind() == ConversionSpecifier::CArg) { if (ExprTy->isIntegralOrUnscopedEnumerationType() && @@ -11219,8 +11221,10 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, std::tie(CastTy, CastTyName) = shouldNotPrintDirectly(S.Context, IntendedTy, E); if (!CastTy.isNull()) { // %zi/%zu and %td/%tu are OK to use for NSInteger/NSUInteger of type int - // (long in ASTContext). Only complain to pedants. - if ((CastTyName == "NSInteger" || CastTyName == "NSUInteger") && + // (long in ASTContext). Only complain to pedants or when they're the + // underlying type of a scoped enum (which always needs a cast). + if (!IsScopedEnum && + (CastTyName == "NSInteger" || CastTyName == "NSUInteger") && (AT.isSizeT() || AT.isPtrdiffT()) && AT.matchesType(S.Context, CastTy)) Match = ArgType::NoMatchPedantic; @@ -11275,20 +11279,15 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, // should be printed as 'long' for 64-bit compatibility.) // Rather than emitting a normal format/argument mismatch, we want to // add a cast to the recommended type (and correct the format string - // if necessary). + // if necessary). We should also do so for scoped enumerations. SmallString<16> CastBuf; llvm::raw_svector_ostream CastFix(CastBuf); CastFix << (S.LangOpts.CPlusPlus ? "static_cast<" : "("); - if (IsScopedEnum) { - CastFix << AT.getRepresentativeType(S.Context).getAsString( - S.Context.getPrintingPolicy()); - } else { - IntendedTy.print(CastFix, S.Context.getPrintingPolicy()); - } + IntendedTy.print(CastFix, S.Context.getPrintingPolicy()); CastFix << (S.LangOpts.CPlusPlus ? ">" : ")"); SmallVector Hints; - if ((!AT.matchesType(S.Context, IntendedTy) && !IsScopedEnum) || + if (AT.matchesType(S.Context, IntendedTy) != ArgType::Match || ShouldNotPrintDirectly) Hints.push_back(FixItHint::CreateReplacement(SpecRange, os.str())); @@ -11316,7 +11315,7 @@ CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, Hints.push_back(FixItHint::CreateInsertion(After, ")")); } - if (ShouldNotPrintDirectly) { + if (ShouldNotPrintDirectly && !IsScopedEnum) { // The expression has a type that should not be printed directly. // We extract the name from the typedef because we don't want to show // the underlying type in the diagnostic. diff --git a/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp b/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp index 8ef728f86c6b..b5813c6abc2b 100644 --- a/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -2639,7 +2639,8 @@ static void emitAttributes(RecordKeeper &Records, raw_ostream &OS, OS << ", "; emitFormInitializer(OS, Spellings[0], "0"); } else { - OS << ", (\n"; + OS << ", [&]() {\n"; + OS << " switch (S) {\n"; std::set Uniques; unsigned Idx = 0; for (auto I = Spellings.begin(), E = Spellings.end(); I != E; @@ -2647,15 +2648,19 @@ static void emitAttributes(RecordKeeper &Records, raw_ostream &OS, const FlattenedSpelling &S = *I; const auto &Name = SemanticToSyntacticMap[Idx]; if (Uniques.insert(Name).second) { - OS << " S == " << Name << " ? AttributeCommonInfo::Form"; + OS << " case " << Name << ":\n"; + OS << " return AttributeCommonInfo::Form"; emitFormInitializer(OS, S, Name); - OS << " :\n"; + OS << ";\n"; } } - OS << " (llvm_unreachable(\"Unknown attribute spelling!\"), " - << " AttributeCommonInfo::Form"; + OS << " default:\n"; + OS << " llvm_unreachable(\"Unknown attribute spelling!\");\n" + << " return AttributeCommonInfo::Form"; emitFormInitializer(OS, Spellings[0], "0"); - OS << "))"; + OS << ";\n" + << " }\n" + << " }()"; } OS << ");\n"; diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index c37d643414aa..3859c027cd29 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -40,7 +40,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 170002 +# define _LIBCPP_VERSION 170003 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/lld/COFF/InputFiles.cpp b/contrib/llvm-project/lld/COFF/InputFiles.cpp index 541837a7fcec..a7a08fb2fa6e 100644 --- a/contrib/llvm-project/lld/COFF/InputFiles.cpp +++ b/contrib/llvm-project/lld/COFF/InputFiles.cpp @@ -661,6 +661,8 @@ std::optional ObjFile::createDefined( if (prevailing) { SectionChunk *c = readSection(sectionNumber, def, getName()); sparseChunks[sectionNumber] = c; + if (!c) + return nullptr; c->sym = cast(leader); c->selection = selection; cast(leader)->data = &c->repl; diff --git a/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp b/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp index 2ba6036056d9..b66c2378b72a 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp @@ -804,7 +804,7 @@ void LazyValueInfoImpl::intersectAssumeOrGuardBlockValueConstantRange( static ConstantRange getConstantRangeOrFull(const ValueLatticeElement &Val, Type *Ty, const DataLayout &DL) { - if (Val.isConstantRange()) + if (Val.isConstantRange(/*UndefAllowed*/ false)) return Val.getConstantRange(); return ConstantRange::getFull(DL.getTypeSizeInBits(Ty)); } diff --git a/contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp b/contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp index a2d61da722af..bb3492bec8aa 100644 --- a/contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp +++ b/contrib/llvm-project/llvm/lib/MC/MCWin64EH.cpp @@ -1402,6 +1402,9 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info, // here, but we'd have to emit the pdata, the xdata header, and the // epilogue scopes later, since they depend on whether the we need to // split the unwind data. + // + // If this is fixed, remove code in AArch64ISelLowering.cpp that + // disables loop alignment on Windows. RawFuncLength = GetAbsDifference(streamer, info->FuncletOrFuncEnd, info->Begin); } diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index a1753a40a117..6e721b937846 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -1033,7 +1033,12 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM, // Set required alignment. setMinFunctionAlignment(Align(4)); // Set preferred alignments. - setPrefLoopAlignment(STI.getPrefLoopAlignment()); + + // Don't align loops on Windows. The SEH unwind info generation needs to + // know the exact length of functions before the alignments have been + // expanded. + if (!Subtarget->isTargetWindows()) + setPrefLoopAlignment(STI.getPrefLoopAlignment()); setMaxBytesForAlignment(STI.getMaxBytesForLoopAlignment()); setPrefFunctionAlignment(STI.getPrefFunctionAlignment()); diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 819722360e33..547b71a6101a 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -15529,7 +15529,7 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N, break; SDValue ConstOp = DAG.getConstant(Imm, dl, MVT::i32); SDValue NarrowAnd = DAG.getNode(ISD::AND, dl, MVT::i32, NarrowOp, ConstOp); - return DAG.getAnyExtOrTrunc(NarrowAnd, dl, N->getValueType(0)); + return DAG.getZExtOrTrunc(NarrowAnd, dl, N->getValueType(0)); } case ISD::SHL: return combineSHL(N, DCI); diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp index d9750ea22e2b..0f1cb5f1e236 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -48539,13 +48539,28 @@ static SDValue combineSetCCMOVMSK(SDValue EFLAGS, X86::CondCode &CC, } // MOVMSK(SHUFFLE(X,u)) -> MOVMSK(X) iff every element is referenced. - SmallVector ShuffleMask; + // Since we peek through a bitcast, we need to be careful if the base vector + // type has smaller elements than the MOVMSK type. In that case, even if + // all the elements are demanded by the shuffle mask, only the "high" + // elements which have highbits that align with highbits in the MOVMSK vec + // elements are actually demanded. A simplification of spurious operations + // on the "low" elements take place during other simplifications. + // + // For example: + // MOVMSK64(BITCAST(SHUF32 X, (1,0,3,2))) even though all the elements are + // demanded, because we are swapping around the result can change. + // + // To address this, we check that we can scale the shuffle mask to MOVMSK + // element width (this will ensure "high" elements match). Its slightly overly + // conservative, but fine for an edge case fold. + SmallVector ShuffleMask, ScaledMaskUnused; SmallVector ShuffleInputs; if (NumElts <= CmpBits && getTargetShuffleInputs(peekThroughBitcasts(Vec), ShuffleInputs, ShuffleMask, DAG) && ShuffleInputs.size() == 1 && !isAnyZeroOrUndef(ShuffleMask) && - ShuffleInputs[0].getValueSizeInBits() == VecVT.getSizeInBits()) { + ShuffleInputs[0].getValueSizeInBits() == VecVT.getSizeInBits() && + scaleShuffleElements(ShuffleMask, NumElts, ScaledMaskUnused)) { unsigned NumShuffleElts = ShuffleMask.size(); APInt DemandedElts = APInt::getZero(NumShuffleElts); for (int M : ShuffleMask) { @@ -57239,7 +57254,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT, // TODO - combineX86ShufflesRecursively should handle shuffle concatenation // but it currently struggles with different vector widths. if (llvm::all_of(Ops, [Op0](SDValue Op) { - return Op.getOpcode() == Op0.getOpcode(); + return Op.getOpcode() == Op0.getOpcode() && Op.hasOneUse(); })) { auto ConcatSubOperand = [&](EVT VT, ArrayRef SubOps, unsigned I) { SmallVector Subs; diff --git a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index bde5fba20f3b..f4bf6db569f2 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -819,11 +819,11 @@ public: private: void initializeCallbacks(Module &M); - bool InstrumentGlobals(IRBuilder<> &IRB, Module &M, bool *CtorComdat); + void instrumentGlobals(IRBuilder<> &IRB, Module &M, bool *CtorComdat); void InstrumentGlobalsCOFF(IRBuilder<> &IRB, Module &M, ArrayRef ExtendedGlobals, ArrayRef MetadataInitializers); - void InstrumentGlobalsELF(IRBuilder<> &IRB, Module &M, + void instrumentGlobalsELF(IRBuilder<> &IRB, Module &M, ArrayRef ExtendedGlobals, ArrayRef MetadataInitializers, const std::string &UniqueModuleId); @@ -2177,7 +2177,7 @@ void ModuleAddressSanitizer::InstrumentGlobalsCOFF( appendToCompilerUsed(M, MetadataGlobals); } -void ModuleAddressSanitizer::InstrumentGlobalsELF( +void ModuleAddressSanitizer::instrumentGlobalsELF( IRBuilder<> &IRB, Module &M, ArrayRef ExtendedGlobals, ArrayRef MetadataInitializers, const std::string &UniqueModuleId) { @@ -2187,7 +2187,7 @@ void ModuleAddressSanitizer::InstrumentGlobalsELF( // false negative odr violations at link time. If odr indicators are used, we // keep the comdat sections, as link time odr violations will be dectected on // the odr indicator symbols. - bool UseComdatForGlobalsGC = UseOdrIndicator; + bool UseComdatForGlobalsGC = UseOdrIndicator && !UniqueModuleId.empty(); SmallVector MetadataGlobals(ExtendedGlobals.size()); for (size_t i = 0; i < ExtendedGlobals.size(); i++) { @@ -2237,7 +2237,7 @@ void ModuleAddressSanitizer::InstrumentGlobalsELF( // We also need to unregister globals at the end, e.g., when a shared library // gets closed. - if (DestructorKind != AsanDtorKind::None) { + if (DestructorKind != AsanDtorKind::None && !MetadataGlobals.empty()) { IRBuilder<> IrbDtor(CreateAsanModuleDtor(M)); IrbDtor.CreateCall(AsanUnregisterElfGlobals, {IRB.CreatePointerCast(RegisteredFlag, IntptrTy), @@ -2343,10 +2343,8 @@ void ModuleAddressSanitizer::InstrumentGlobalsWithMetadataArray( // redzones and inserts this function into llvm.global_ctors. // Sets *CtorComdat to true if the global registration code emitted into the // asan constructor is comdat-compatible. -bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, +void ModuleAddressSanitizer::instrumentGlobals(IRBuilder<> &IRB, Module &M, bool *CtorComdat) { - *CtorComdat = false; - // Build set of globals that are aliased by some GA, where // getExcludedAliasedGlobal(GA) returns the relevant GlobalVariable. SmallPtrSet AliasedGlobalExclusions; @@ -2364,11 +2362,6 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, } size_t n = GlobalsToChange.size(); - if (n == 0) { - *CtorComdat = true; - return false; - } - auto &DL = M.getDataLayout(); // A global is described by a structure @@ -2391,8 +2384,11 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, // We shouldn't merge same module names, as this string serves as unique // module ID in runtime. - GlobalVariable *ModuleName = createPrivateGlobalForString( - M, M.getModuleIdentifier(), /*AllowMerging*/ false, kAsanGenPrefix); + GlobalVariable *ModuleName = + n != 0 + ? createPrivateGlobalForString(M, M.getModuleIdentifier(), + /*AllowMerging*/ false, kAsanGenPrefix) + : nullptr; for (size_t i = 0; i < n; i++) { GlobalVariable *G = GlobalsToChange[i]; @@ -2517,19 +2513,27 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, } appendToCompilerUsed(M, ArrayRef(GlobalsToAddToUsedList)); - std::string ELFUniqueModuleId = - (UseGlobalsGC && TargetTriple.isOSBinFormatELF()) ? getUniqueModuleId(&M) - : ""; - - if (!ELFUniqueModuleId.empty()) { - InstrumentGlobalsELF(IRB, M, NewGlobals, Initializers, ELFUniqueModuleId); + if (UseGlobalsGC && TargetTriple.isOSBinFormatELF()) { + // Use COMDAT and register globals even if n == 0 to ensure that (a) the + // linkage unit will only have one module constructor, and (b) the register + // function will be called. The module destructor is not created when n == + // 0. *CtorComdat = true; - } else if (UseGlobalsGC && TargetTriple.isOSBinFormatCOFF()) { - InstrumentGlobalsCOFF(IRB, M, NewGlobals, Initializers); - } else if (UseGlobalsGC && ShouldUseMachOGlobalsSection()) { - InstrumentGlobalsMachO(IRB, M, NewGlobals, Initializers); + instrumentGlobalsELF(IRB, M, NewGlobals, Initializers, + getUniqueModuleId(&M)); + } else if (n == 0) { + // When UseGlobalsGC is false, COMDAT can still be used if n == 0, because + // all compile units will have identical module constructor/destructor. + *CtorComdat = TargetTriple.isOSBinFormatELF(); } else { - InstrumentGlobalsWithMetadataArray(IRB, M, NewGlobals, Initializers); + *CtorComdat = false; + if (UseGlobalsGC && TargetTriple.isOSBinFormatCOFF()) { + InstrumentGlobalsCOFF(IRB, M, NewGlobals, Initializers); + } else if (UseGlobalsGC && ShouldUseMachOGlobalsSection()) { + InstrumentGlobalsMachO(IRB, M, NewGlobals, Initializers); + } else { + InstrumentGlobalsWithMetadataArray(IRB, M, NewGlobals, Initializers); + } } // Create calls for poisoning before initializers run and unpoisoning after. @@ -2537,7 +2541,6 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, createInitializerPoisonCalls(M, ModuleName); LLVM_DEBUG(dbgs() << M); - return true; } uint64_t @@ -2601,10 +2604,10 @@ bool ModuleAddressSanitizer::instrumentModule(Module &M) { assert(AsanCtorFunction || ConstructorKind == AsanCtorKind::None); if (AsanCtorFunction) { IRBuilder<> IRB(AsanCtorFunction->getEntryBlock().getTerminator()); - InstrumentGlobals(IRB, M, &CtorComdat); + instrumentGlobals(IRB, M, &CtorComdat); } else { IRBuilder<> IRB(*C); - InstrumentGlobals(IRB, M, &CtorComdat); + instrumentGlobals(IRB, M, &CtorComdat); } } diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 09e5bd0806a8..7f43e4566eeb 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" +#define LLVM_REVISION "llvmorg-17.0.3-0-g888437e1b600" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" +#define CLANG_REVISION "llvmorg-17.0.3-0-g888437e1b600" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" +#define LLDB_REVISION "llvmorg-17.0.3-0-g888437e1b600" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 750d9ecbc020..c364a69c7209 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,8 +1,8 @@ -#define CLANG_VERSION 17.0.2 -#define CLANG_VERSION_STRING "17.0.2" +#define CLANG_VERSION 17.0.3 +#define CLANG_VERSION_STRING "17.0.3" #define CLANG_VERSION_MAJOR 17 #define CLANG_VERSION_MAJOR_STRING "17" #define CLANG_VERSION_MINOR 0 -#define CLANG_VERSION_PATCHLEVEL 2 +#define CLANG_VERSION_PATCHLEVEL 3 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index 722673ac78da..b650ccd7fc2b 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "17.0.2 (FreeBSD llvmorg-17.0.2-0-gb2417f51dbbd-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "17.0.3 (FreeBSD llvmorg-17.0.3-0-g888437e1b600-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index b87053e1884d..e9dbb0ca765e 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 17.0.2 -#define LLDB_VERSION_STRING "17.0.2" +#define LLDB_VERSION 17.0.3 +#define LLDB_VERSION_STRING "17.0.3" #define LLDB_VERSION_MAJOR 17 #define LLDB_VERSION_MINOR 0 -#define LLDB_VERSION_PATCH 2 +#define LLDB_VERSION_PATCH 3 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 56b377d33f9b..652cc426aa3c 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -344,10 +344,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 17.0.2" +#define PACKAGE_STRING "LLVM 17.0.3" /* Define to the version of this package. */ -#define PACKAGE_VERSION "17.0.2" +#define PACKAGE_VERSION "17.0.3" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 36bf884d2fdb..6d3ed70bb0fd 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -73,10 +73,10 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 2 +#define LLVM_VERSION_PATCH 3 /* LLVM version string */ -#define LLVM_VERSION_STRING "17.0.2" +#define LLVM_VERSION_STRING "17.0.3" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 846d3cb3e014..bca8b103a7ba 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-17.0.2-0-gb2417f51dbbd" +#define LLVM_REVISION "llvmorg-17.0.3-0-g888437e1b600" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Sun Jan 7 23:08:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtR6G0Qz56F6T; Sun, 7 Jan 2024 23:08: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 4T7XtQ6yDcz4Q7q; Sun, 7 Jan 2024 23:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FMeH/CeUIYjepmccTJeZ5ZqxSXuQn6Hp1rQbkzDNq2A=; b=A75hLnex9pLvAqEJNqKdhQrBlTOqkllLxF4dnA+T7jRvs6aXyW7NNDeK66Q91svWuWzIFp W9UxlEc3slV8FXkYJdoNeENi+SBd2kfY2yqu9auz0sYltVjXWx6LYkM7Fx7JJPAnGyS50t qv51KDKuFEf5RuIgQKZbpNKOHoVsWFxl8d7LPXR3ej4r09VJGbmbqtE3OmoVeUJuO3pHic SjBeNUudcKOtZsWaYtWkjMdnOkD6BkMV5GwJhwHBm+AcSfhf28t6R6Ijl+e0WUGviIYVCw vEKfLK5dkKcIK+BRf7RI0gKSH98qIHPQXe/0FrdEPa9Nbp0RtNl5OPgt4SUm4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FMeH/CeUIYjepmccTJeZ5ZqxSXuQn6Hp1rQbkzDNq2A=; b=GV2fuK7uZcXgqgo0iOfKHXuvREoY/4hYWe3kVadHGxcL2UZYTccr0CKSrnISNuBPgE2TLk wtF5rBJ/pDvxKSN5+5qUJm05e+q9vx7d0Yjtk5BxWmxUOHgTnDdd9qtMfDH3r3j9ZlqpUz FPu1CN0w0AyhDmqOwfqzezAAEPk6iomVNqXGXAgvAxiMEJAir3B5IO9spFy3hPyZvzkMNm ecJW92/3efKrGhBK/+4EZ1jhSUL/FMtUuCGFS5Mg+/3T9eMKiFrzuJyZwY8DrJEuBwNtnI 1mODrK1zuleeSsWgLrCZOG4czOyHJdF913JDwI0IgdcyZSjaNpwqrXSQecOw3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668910; a=rsa-sha256; cv=none; b=qc0bQY150sryh05ay2TaEKVwBeg8LyrOn6Kj6mGgn/nVblUZq1tsnHLb76brlKMRVXDkfp jYPXvpgZ/U/0wmCjQ1KrN/nF4NSj6TQBelIn8OXYEr2yjjn7Ry08TZBz1T/z+TuDUZcZBh hVjymb3/FoZPoVt0vAZpRtjYxhnE8g9RmlEYwgLEhnH9iwK0f5qEr54KazWDQ3zUKUBSRt rpUcfUOz63GXsQVPfwR+cj63l7Mv6JC73eGFw8wm2ik+oQ3oKS1Fs8DfIjMC1PSI29DCwd l/AVE0zYxVUxmw0TfdIy/1gm8hKBrxr5+9v75Ldchf7Bq+NpRQ5wwRAjqA0GcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtQ63Dtzk9t; Sun, 7 Jan 2024 23:08: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 407N8UCv053349; Sun, 7 Jan 2024 23:08:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8Utj053346; Sun, 7 Jan 2024 23:08:30 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:30 GMT Message-Id: <202401072308.407N8Utj053346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ef2ab9afdc8b - stable/13 - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ef2ab9afdc8b3ede385742644a720b4477d7f467 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ef2ab9afdc8b3ede385742644a720b4477d7f467 commit ef2ab9afdc8b3ede385742644a720b4477d7f467 Author: Dimitry Andric AuthorDate: 2023-11-30 20:06:52 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:41 +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 (cherry picked from commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d) --- .../clang/include/clang/Driver/Options.td | 3 -- .../clang/Frontend/DependencyOutputOptions.h | 11 +++---- .../clang/include/clang/Frontend/Utils.h | 11 +------ .../clang/lib/Basic/Targets/OSTargets.h | 16 ++++++++- .../clang/lib/Driver/ToolChains/Clang.cpp | 3 -- .../clang/lib/Driver/ToolChains/WebAssembly.cpp | 38 ++++++++++++++-------- .../clang/lib/Format/TokenAnnotator.cpp | 4 +-- .../clang/lib/Format/WhitespaceManager.cpp | 4 ++- .../clang/lib/Format/WhitespaceManager.h | 2 +- .../clang/lib/Frontend/DependencyFile.cpp | 32 ++++-------------- contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp | 8 ++--- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 19 ++++------- contrib/llvm-project/libcxx/include/__config | 2 +- .../libcxx/include/__memory/shared_ptr.h | 5 +-- .../llvm/lib/ExecutionEngine/JITLink/aarch32.cpp | 2 +- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 10 +++--- lib/clang/include/VCSVersion.inc | 6 ++-- lib/clang/include/clang/Basic/Version.inc | 6 ++-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 ++-- lib/clang/include/llvm/Config/config.h | 4 +-- lib/clang/include/llvm/Config/llvm-config.h | 4 +-- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 23 files changed, 94 insertions(+), 106 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td index e04f67bdb1fa..37e8c56b2d29 100644 --- a/contrib/llvm-project/clang/include/clang/Driver/Options.td +++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td @@ -6079,9 +6079,6 @@ let Flags = [CC1Option, NoDriverOption] in { def sys_header_deps : Flag<["-"], "sys-header-deps">, HelpText<"Include system headers in dependency output">, MarshallingInfoFlag>; -def canonical_system_headers : Flag<["-"], "canonical-system-headers">, - HelpText<"Canonicalize system headers in dependency output">, - MarshallingInfoFlag>; def module_file_deps : Flag<["-"], "module-file-deps">, HelpText<"Include module files in dependency output">, MarshallingInfoFlag>; diff --git a/contrib/llvm-project/clang/include/clang/Frontend/DependencyOutputOptions.h b/contrib/llvm-project/clang/include/clang/Frontend/DependencyOutputOptions.h index e4b26d92647d..621acaaa1359 100644 --- a/contrib/llvm-project/clang/include/clang/Frontend/DependencyOutputOptions.h +++ b/contrib/llvm-project/clang/include/clang/Frontend/DependencyOutputOptions.h @@ -34,8 +34,6 @@ enum ExtraDepKind { class DependencyOutputOptions { public: unsigned IncludeSystemHeaders : 1; ///< Include system header dependencies. - unsigned - CanonicalSystemHeaders : 1; ///< canonicalize system header dependencies. unsigned ShowHeaderIncludes : 1; ///< Show header inclusions (-H). unsigned UsePhonyTargets : 1; ///< Include phony targets for each /// dependency, which can avoid some 'make' @@ -84,11 +82,10 @@ public: public: DependencyOutputOptions() - : IncludeSystemHeaders(0), CanonicalSystemHeaders(0), - ShowHeaderIncludes(0), UsePhonyTargets(0), AddMissingHeaderDeps(0), - IncludeModuleFiles(0), ShowSkippedHeaderIncludes(0), - HeaderIncludeFormat(HIFMT_Textual), HeaderIncludeFiltering(HIFIL_None) { - } + : IncludeSystemHeaders(0), ShowHeaderIncludes(0), UsePhonyTargets(0), + AddMissingHeaderDeps(0), IncludeModuleFiles(0), + ShowSkippedHeaderIncludes(0), HeaderIncludeFormat(HIFMT_Textual), + HeaderIncludeFiltering(HIFIL_None) {} }; } // end namespace clang diff --git a/contrib/llvm-project/clang/include/clang/Frontend/Utils.h b/contrib/llvm-project/clang/include/clang/Frontend/Utils.h index 8300e45d15fe..143cf4359f00 100644 --- a/contrib/llvm-project/clang/include/clang/Frontend/Utils.h +++ b/contrib/llvm-project/clang/include/clang/Frontend/Utils.h @@ -41,7 +41,6 @@ class ExternalSemaSource; class FrontendOptions; class PCHContainerReader; class Preprocessor; -class FileManager; class PreprocessorOptions; class PreprocessorOutputOptions; @@ -80,14 +79,11 @@ public: /// Return true if system files should be passed to sawDependency(). virtual bool needSystemDependencies() { return false; } - /// Return true if system files should be canonicalized. - virtual bool shouldCanonicalizeSystemDependencies() { return false; } - /// Add a dependency \p Filename if it has not been seen before and /// sawDependency() returns true. virtual void maybeAddDependency(StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, - FileManager *FileMgr, bool IsMissing); + bool IsMissing); protected: /// Return true if the filename was added to the list of dependencies, false @@ -116,10 +112,6 @@ public: bool sawDependency(StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) final; - bool shouldCanonicalizeSystemDependencies() override { - return CanonicalSystemHeaders; - } - protected: void outputDependencyFile(llvm::raw_ostream &OS); @@ -129,7 +121,6 @@ private: std::string OutputFile; std::vector Targets; bool IncludeSystemHeaders; - bool CanonicalSystemHeaders; bool PhonyTarget; bool AddMissingHeaderDeps; bool SeenMissingHeader; diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h b/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h index 8f4331b02f3b..cf8cc8e61c49 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h @@ -217,6 +217,8 @@ protected: Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion)); Builder.defineMacro("__KPRINTF_ATTRIBUTE__"); DefineStd(Builder, "unix", Opts); + if (this->HasFloat128) + Builder.defineMacro("__FLOAT128__"); // On FreeBSD, wchar_t contains the number of the code point as // used by the character set of the locale. These character sets are @@ -234,9 +236,11 @@ public: FreeBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : OSTargetInfo(Triple, Opts) { switch (Triple.getArch()) { - default: case llvm::Triple::x86: case llvm::Triple::x86_64: + this->HasFloat128 = true; + [[fallthrough]]; + default: this->MCountName = ".mcount"; break; case llvm::Triple::mips: @@ -425,12 +429,22 @@ protected: Builder.defineMacro("__unix__"); if (Opts.POSIXThreads) Builder.defineMacro("_REENTRANT"); + if (this->HasFloat128) + Builder.defineMacro("__FLOAT128__"); } public: NetBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : OSTargetInfo(Triple, Opts) { this->MCountName = "__mcount"; + switch (Triple.getArch()) { + default: + break; + case llvm::Triple::x86: + case llvm::Triple::x86_64: + this->HasFloat128 = true; + break; + } } }; diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index 47ec36b3a8ff..37a07b8f224d 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -1152,9 +1152,6 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, if (ArgM->getOption().matches(options::OPT_M) || ArgM->getOption().matches(options::OPT_MD)) CmdArgs.push_back("-sys-header-deps"); - if (Args.hasFlag(options::OPT_canonical_prefixes, - options::OPT_no_canonical_prefixes, true)) - CmdArgs.push_back("-canonical-system-headers"); if ((isa(JA) && !Args.hasArg(options::OPT_fno_module_file_deps)) || Args.hasArg(options::OPT_fmodule_file_deps)) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/WebAssembly.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/WebAssembly.cpp index 36bed3166ff3..2098a68cbc6e 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/WebAssembly.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/WebAssembly.cpp @@ -77,31 +77,43 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgs(CmdArgs, options::OPT_u); ToolChain.AddFilePathLibArgs(Args, CmdArgs); - const char *Crt1 = "crt1.o"; + bool IsCommand = true; + const char *Crt1; const char *Entry = nullptr; - // If crt1-command.o exists, it supports new-style commands, so use it. - // Otherwise, use the old crt1.o. This is a temporary transition measure. - // Once WASI libc no longer needs to support LLVM versions which lack - // support for new-style command, it can make crt1.o the same as - // crt1-command.o. And once LLVM no longer needs to support WASI libc - // versions before that, it can switch to using crt1-command.o. - if (ToolChain.GetFilePath("crt1-command.o") != "crt1-command.o") - Crt1 = "crt1-command.o"; + // When -shared is specified, use the reactor exec model unless + // specified otherwise. + if (Args.hasArg(options::OPT_shared)) + IsCommand = false; if (const Arg *A = Args.getLastArg(options::OPT_mexec_model_EQ)) { StringRef CM = A->getValue(); if (CM == "command") { - // Use default values. + IsCommand = true; } else if (CM == "reactor") { - Crt1 = "crt1-reactor.o"; - Entry = "_initialize"; + IsCommand = false; } else { ToolChain.getDriver().Diag(diag::err_drv_invalid_argument_to_option) << CM << A->getOption().getName(); } } - if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles, options::OPT_shared)) + + if (IsCommand) { + // If crt1-command.o exists, it supports new-style commands, so use it. + // Otherwise, use the old crt1.o. This is a temporary transition measure. + // Once WASI libc no longer needs to support LLVM versions which lack + // support for new-style command, it can make crt1.o the same as + // crt1-command.o. And once LLVM no longer needs to support WASI libc + // versions before that, it can switch to using crt1-command.o. + Crt1 = "crt1.o"; + if (ToolChain.GetFilePath("crt1-command.o") != "crt1-command.o") + Crt1 = "crt1-command.o"; + } else { + Crt1 = "crt1-reactor.o"; + Entry = "_initialize"; + } + + if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(Crt1))); if (Entry) { CmdArgs.push_back(Args.MakeArgString("--entry")); diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 4a1fc08455e5..c52fe12e7ffd 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -3065,8 +3065,8 @@ void TokenAnnotator::setCommentLineLevels( // If the comment is currently aligned with the line immediately following // it, that's probably intentional and we should keep it. - if (NextNonCommentLine && !NextNonCommentLine->First->Finalized && - Line->isComment() && NextNonCommentLine->First->NewlinesBefore <= 1 && + if (NextNonCommentLine && NextNonCommentLine->First->NewlinesBefore < 2 && + Line->isComment() && !isClangFormatOff(Line->First->TokenText) && NextNonCommentLine->First->OriginalColumn == Line->First->OriginalColumn) { const bool PPDirectiveOrImportStmt = diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp index c1016c44a74a..ddb55c4d853a 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp @@ -1263,6 +1263,8 @@ void WhitespaceManager::alignArrayInitializersRightJustified( auto Offset = std::distance(Cells.begin(), CellIter); for (const auto *Next = CellIter->NextColumnElement; Next; Next = Next->NextColumnElement) { + if (RowCount >= CellDescs.CellCounts.size()) + break; auto *Start = (Cells.begin() + RowCount * CellDescs.CellCounts[0]); auto *End = Start + Offset; ThisNetWidth = getNetWidth(Start, End, CellDescs.InitialSpaces); @@ -1324,7 +1326,7 @@ void WhitespaceManager::alignArrayInitializersLeftJustified( auto Offset = std::distance(Cells.begin(), CellIter); for (const auto *Next = CellIter->NextColumnElement; Next; Next = Next->NextColumnElement) { - if (RowCount > CellDescs.CellCounts.size()) + if (RowCount >= CellDescs.CellCounts.size()) break; auto *Start = (Cells.begin() + RowCount * CellDescs.CellCounts[0]); auto *End = Start + Offset; diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h index df7e9add1cd4..69398fe41150 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h @@ -317,7 +317,7 @@ private: auto Offset = std::distance(CellStart, CellStop); for (const auto *Next = CellStop->NextColumnElement; Next; Next = Next->NextColumnElement) { - if (RowCount > MaxRowCount) + if (RowCount >= MaxRowCount) break; auto Start = (CellStart + RowCount * CellCount); auto End = Start + Offset; diff --git a/contrib/llvm-project/clang/lib/Frontend/DependencyFile.cpp b/contrib/llvm-project/clang/lib/Frontend/DependencyFile.cpp index 44268e71dc24..fb56eb225c83 100644 --- a/contrib/llvm-project/clang/lib/Frontend/DependencyFile.cpp +++ b/contrib/llvm-project/clang/lib/Frontend/DependencyFile.cpp @@ -49,7 +49,6 @@ struct DepCollectorPPCallbacks : public PPCallbacks { DepCollector.maybeAddDependency( llvm::sys::path::remove_leading_dotslash(*Filename), /*FromModule*/ false, isSystem(FileType), /*IsModuleFile*/ false, - &PP.getFileManager(), /*IsMissing*/ false); } @@ -57,11 +56,9 @@ struct DepCollectorPPCallbacks : public PPCallbacks { SrcMgr::CharacteristicKind FileType) override { StringRef Filename = llvm::sys::path::remove_leading_dotslash(SkippedFile.getName()); - DepCollector.maybeAddDependency(Filename, - /*FromModule=*/false, + DepCollector.maybeAddDependency(Filename, /*FromModule=*/false, /*IsSystem=*/isSystem(FileType), /*IsModuleFile=*/false, - &PP.getFileManager(), /*IsMissing=*/false); } @@ -72,11 +69,9 @@ struct DepCollectorPPCallbacks : public PPCallbacks { StringRef RelativePath, const Module *Imported, SrcMgr::CharacteristicKind FileType) override { if (!File) - DepCollector.maybeAddDependency(FileName, - /*FromModule*/ false, + DepCollector.maybeAddDependency(FileName, /*FromModule*/ false, /*IsSystem*/ false, /*IsModuleFile*/ false, - &PP.getFileManager(), /*IsMissing*/ true); // Files that actually exist are handled by FileChanged. } @@ -88,11 +83,9 @@ struct DepCollectorPPCallbacks : public PPCallbacks { return; StringRef Filename = llvm::sys::path::remove_leading_dotslash(File->getName()); - DepCollector.maybeAddDependency(Filename, - /*FromModule=*/false, + DepCollector.maybeAddDependency(Filename, /*FromModule=*/false, /*IsSystem=*/isSystem(FileType), /*IsModuleFile=*/false, - &PP.getFileManager(), /*IsMissing=*/false); } @@ -108,11 +101,9 @@ struct DepCollectorMMCallbacks : public ModuleMapCallbacks { void moduleMapFileRead(SourceLocation Loc, const FileEntry &Entry, bool IsSystem) override { StringRef Filename = Entry.getName(); - DepCollector.maybeAddDependency(Filename, - /*FromModule*/ false, + DepCollector.maybeAddDependency(Filename, /*FromModule*/ false, /*IsSystem*/ IsSystem, /*IsModuleFile*/ false, - /*FileMgr*/ nullptr, /*IsMissing*/ false); } }; @@ -128,10 +119,8 @@ struct DepCollectorASTListener : public ASTReaderListener { } void visitModuleFile(StringRef Filename, serialization::ModuleKind Kind) override { - DepCollector.maybeAddDependency(Filename, - /*FromModule*/ true, + DepCollector.maybeAddDependency(Filename, /*FromModule*/ true, /*IsSystem*/ false, /*IsModuleFile*/ true, - /*FileMgr*/ nullptr, /*IsMissing*/ false); } bool visitInputFile(StringRef Filename, bool IsSystem, @@ -145,7 +134,7 @@ struct DepCollectorASTListener : public ASTReaderListener { Filename = FE->getName(); DepCollector.maybeAddDependency(Filename, /*FromModule*/ true, IsSystem, - /*IsModuleFile*/ false, /*FileMgr*/ nullptr, + /*IsModuleFile*/ false, /*IsMissing*/ false); return true; } @@ -155,15 +144,9 @@ struct DepCollectorASTListener : public ASTReaderListener { void DependencyCollector::maybeAddDependency(StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, - FileManager *FileMgr, bool IsMissing) { - if (sawDependency(Filename, FromModule, IsSystem, IsModuleFile, IsMissing)) { - if (IsSystem && FileMgr && shouldCanonicalizeSystemDependencies()) { - if (auto F = FileMgr->getFile(Filename)) - Filename = FileMgr->getCanonicalName(*F); - } + if (sawDependency(Filename, FromModule, IsSystem, IsModuleFile, IsMissing)) addDependency(Filename); - } } bool DependencyCollector::addDependency(StringRef Filename) { @@ -211,7 +194,6 @@ DependencyFileGenerator::DependencyFileGenerator( const DependencyOutputOptions &Opts) : OutputFile(Opts.OutputFile), Targets(Opts.Targets), IncludeSystemHeaders(Opts.IncludeSystemHeaders), - CanonicalSystemHeaders(Opts.CanonicalSystemHeaders), PhonyTarget(Opts.UsePhonyTargets), AddMissingHeaderDeps(Opts.AddMissingHeaderDeps), SeenMissingHeader(false), IncludeModuleFiles(Opts.IncludeModuleFiles), diff --git a/contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp b/contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp index 5a1b0a918caa..6a5699dd484e 100644 --- a/contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp +++ b/contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp @@ -2481,9 +2481,9 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken, << FixItHint::CreateReplacement(CurrModuleDeclLoc, "framework module"); } -static int compareModuleHeaders(const Module::Header *A, - const Module::Header *B) { - return A->NameAsWritten.compare(B->NameAsWritten); +static bool compareModuleHeaders(const Module::Header &A, + const Module::Header &B) { + return A.NameAsWritten < B.NameAsWritten; } /// Parse an umbrella directory declaration. @@ -2546,7 +2546,7 @@ void ModuleMapParser::parseUmbrellaDirDecl(SourceLocation UmbrellaLoc) { } // Sort header paths so that the pcm doesn't depend on iteration order. - llvm::array_pod_sort(Headers.begin(), Headers.end(), compareModuleHeaders); + std::stable_sort(Headers.begin(), Headers.end(), compareModuleHeaders); for (auto &Header : Headers) Map.addHeader(ActiveModule, std::move(Header), ModuleMap::TextualHeader); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp index a3d9abb15377..aef8dc58a48d 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp @@ -957,18 +957,13 @@ static bool shouldAddReversedEqEq(Sema &S, SourceLocation OpLoc, return true; } // Otherwise the search scope is the namespace scope of which F is a member. - LookupResult NonMembers(S, NotEqOp, OpLoc, - Sema::LookupNameKind::LookupOperatorName); - S.LookupName(NonMembers, - S.getScopeForContext(EqFD->getEnclosingNamespaceContext())); - NonMembers.suppressDiagnostics(); - for (NamedDecl *Op : NonMembers) { - auto *FD = Op->getAsFunction(); - if(auto* UD = dyn_cast(Op)) - FD = UD->getUnderlyingDecl()->getAsFunction(); - if (FunctionsCorrespond(S.Context, EqFD, FD) && - declaresSameEntity(cast(EqFD->getDeclContext()), - cast(Op->getDeclContext()))) + for (NamedDecl *Op : EqFD->getEnclosingNamespaceContext()->lookup(NotEqOp)) { + auto *NotEqFD = Op->getAsFunction(); + if (auto *UD = dyn_cast(Op)) + NotEqFD = UD->getUnderlyingDecl()->getAsFunction(); + if (FunctionsCorrespond(S.Context, EqFD, NotEqFD) && S.isVisible(NotEqFD) && + declaresSameEntity(cast(EqFD->getEnclosingNamespaceContext()), + cast(Op->getLexicalDeclContext()))) return false; } return true; diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 10c056f313ff..221bb8ff868b 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -40,7 +40,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 170005 +# define _LIBCPP_VERSION 170006 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h b/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h index dce44a7b3732..a5bae83e0b61 100644 --- a/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h +++ b/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h @@ -1134,7 +1134,8 @@ private: __alloc_.~_Alloc(); size_t __size = __unbounded_array_control_block::__bytes_for(__count_); _AlignedStorage* __storage = reinterpret_cast<_AlignedStorage*>(this); - allocator_traits<_StorageAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*__storage), __size); + allocator_traits<_StorageAlloc>::deallocate( + __tmp, _PointerTraits::pointer_to(*__storage), __size / sizeof(_AlignedStorage)); } _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_; @@ -1217,7 +1218,7 @@ private: _ControlBlockAlloc __tmp(__alloc_); __alloc_.~_Alloc(); - allocator_traits<_ControlBlockAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*this), sizeof(*this)); + allocator_traits<_ControlBlockAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*this), 1); } _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_; diff --git a/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp b/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp index ffc3950cdec8..83829dde0508 100644 --- a/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp +++ b/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp @@ -173,7 +173,7 @@ bool checkRegister(const ThumbRelocation &R, HalfWords Reg) { } template -bool writeRegister(WritableThumbRelocation &R, HalfWords Reg) { +void writeRegister(WritableThumbRelocation &R, HalfWords Reg) { static constexpr HalfWords Mask = FixupInfo::RegMask; assert((Mask.Hi & Reg.Hi) == Reg.Hi && (Mask.Hi & Reg.Hi) == Reg.Hi && "Value bits exceed bit range of given mask"); diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp index aa20409da4e2..901204043b3c 100644 --- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp +++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp @@ -991,12 +991,12 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) { unsigned TrailingOnes = llvm::countr_one(Mask); if (ShAmt >= TrailingOnes) break; - // If the mask has 32 trailing ones, use SRLIW. + // If the mask has 32 trailing ones, use SRLI on RV32 or SRLIW on RV64. if (TrailingOnes == 32) { - SDNode *SRLIW = - CurDAG->getMachineNode(RISCV::SRLIW, DL, VT, N0->getOperand(0), - CurDAG->getTargetConstant(ShAmt, DL, VT)); - ReplaceNode(Node, SRLIW); + SDNode *SRLI = CurDAG->getMachineNode( + Subtarget->is64Bit() ? RISCV::SRLIW : RISCV::SRLI, DL, VT, + N0->getOperand(0), CurDAG->getTargetConstant(ShAmt, DL, VT)); + ReplaceNode(Node, SRLI); return; } diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 27e6c2753812..a52f5acd3b0f 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,8 +1,8 @@ -#define LLVM_REVISION "llvmorg-17.0.5-0-g98bfdac5ce82" +#define LLVM_REVISION "llvmorg-17.0.6-0-g6009708b4367" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-17.0.5-0-g98bfdac5ce82" +#define CLANG_REVISION "llvmorg-17.0.6-0-g6009708b4367" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-17.0.5-0-g98bfdac5ce82" +#define LLDB_REVISION "llvmorg-17.0.6-0-g6009708b4367" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 567978aefcdf..2218bba3dc03 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,8 +1,8 @@ -#define CLANG_VERSION 17.0.5 -#define CLANG_VERSION_STRING "17.0.5" +#define CLANG_VERSION 17.0.6 +#define CLANG_VERSION_STRING "17.0.6" #define CLANG_VERSION_MAJOR 17 #define CLANG_VERSION_MAJOR_STRING "17" #define CLANG_VERSION_MINOR 0 -#define CLANG_VERSION_PATCHLEVEL 5 +#define CLANG_VERSION_PATCHLEVEL 6 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index cb2763314664..de6a298ab969 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "17.0.5 (FreeBSD llvmorg-17.0.5-0-g98bfdac5ce82-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "17.0.6 (FreeBSD llvmorg-17.0.6-0-g6009708b4367-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index b43c5103b8db..838643a235ff 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 17.0.5 -#define LLDB_VERSION_STRING "17.0.5" +#define LLDB_VERSION 17.0.6 +#define LLDB_VERSION_STRING "17.0.6" #define LLDB_VERSION_MAJOR 17 #define LLDB_VERSION_MINOR 0 -#define LLDB_VERSION_PATCH 5 +#define LLDB_VERSION_PATCH 6 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 844599754b4b..9bc4e93a2511 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -344,10 +344,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 17.0.5" +#define PACKAGE_STRING "LLVM 17.0.6" /* Define to the version of this package. */ -#define PACKAGE_VERSION "17.0.5" +#define PACKAGE_VERSION "17.0.6" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 9cec41cd05a5..dfbeb0250027 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -73,10 +73,10 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 5 +#define LLVM_VERSION_PATCH 6 /* LLVM version string */ -#define LLVM_VERSION_STRING "17.0.5" +#define LLVM_VERSION_STRING "17.0.6" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 309d8d7925fc..8683d5c6aca1 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,2 +1,2 @@ -#define LLVM_REVISION "llvmorg-17.0.5-0-g98bfdac5ce82" +#define LLVM_REVISION "llvmorg-17.0.6-0-g6009708b4367" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Sun Jan 7 23:08:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtQ2mrjz56F2F; Sun, 7 Jan 2024 23:08: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 4T7XtP6JwCz4QCv; Sun, 7 Jan 2024 23:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dfyXlsiw4jwpjIh1Slzs2Gej9RmqtY7v6uJuKp/QCkg=; b=QGl4lZL7+QvNMf9UXzrPpQf9cHMgrBt297hmhvngNoLG40i6weweY8pJKYnAs73Cia6ebU FW1ldLLQWSy8j5i4UB8GmaiIVP1r51qJfO41zwyJTfxcFa8mm6xmmWv6EW6dWeTicjOLct 3E4eRr/s+Lsb1r4VpfYnKPg4hNKHSVjITrCnO/UxMa9oXIbxsl9FZLBZz9H7m9Pjb+2bVQ IkBTR+afy45vrcy6YpJRj7Lq7J6gjxaemj46YgtaeTRKY/KCyGT8pN44kmzh8K++7lZrAG lxMfe/TWzlwAUsjdmxogmos2XYmRwSlI69pebf8waqLKXEMNo7fSaH8OPVIwuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dfyXlsiw4jwpjIh1Slzs2Gej9RmqtY7v6uJuKp/QCkg=; b=P2PEwVl11XR33OgMkdsND5DPixwq6ntrC50oUB0TENGlPSlwlmlgA4FaO9S/7kdsLY85uY M+GZ3LT4uL81NGmTcFbw/+z90+7bYKxwZ2nzMRrmFOgmj1J5o3T0uU39RT0PShxjAbWt6x KCIaWAv1XfyVkPLjMcDDcFvr3WZWWAIfAtfh9gI5S2/ELihmdeVuBFyu8Xreh/pzEClNGp uv03Y+uNnJYdHyv7vH7CGXF2C9D5tOWKgVvcYWuXnPcrgfkB7l86Da82fgblnbvsWu2I4Q i9reYI7gCOUS+MYINw88z9mnKDlHOFjTceooqGQ5RYoS/tkyqwU6PLgEUh9fwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668909; a=rsa-sha256; cv=none; b=TbK8HOPrZDBHUWupxvrKWzgSm4ExdaDWYur9LM+1o8C+t5HTLVs2oFbQI1gPb5F8tTqEAw 2EFzZ1ILpZBon67RvdQPAj3Td0MaRdWyHB6V62KlM7EDmh1NsBVDZ+BeYK18So7EQvAr9H 7dx9RD3GfBQuXqYD5sd5P8gtmip1bwDmA0jnCOc7riySnWCzbM+uDCBP+4fSFi5SAKUcCv PlJ55TjJBSN/6h2O8cWBUX0h2cxHdxW8LCfAyexF1y7zz0kKBS2jX4f3IvvbW/u/dqs24p zdOibKn0ZOcxev/8HfH2EfAgvWJZIWV3jrJKJF1RTMRwfUpx/d6LN6ejVn+eKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtP5PJ7zjZ2; Sun, 7 Jan 2024 23:08: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 407N8TI5053310; Sun, 7 Jan 2024 23:08:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8TC7053307; Sun, 7 Jan 2024 23:08:29 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:29 GMT Message-Id: <202401072308.407N8TC7053307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cf22cca352b1 - stable/13 - Merge llvm-project release/17.x llvmorg-17.0.5-0-g98bfdac5ce82 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cf22cca352b139718829154c545b88ddcee8c3ef Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cf22cca352b139718829154c545b88ddcee8c3ef commit cf22cca352b139718829154c545b88ddcee8c3ef Author: Dimitry Andric AuthorDate: 2023-11-16 21:58:12 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:40 +0000 Merge llvm-project release/17.x llvmorg-17.0.5-0-g98bfdac5ce82 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.5-0-g98bfdac5ce82. PR: 273753 MFC after: 1 month (cherry picked from commit b121cb0095c8c1a060f66a8c4b118a54ebaa2551) --- .../include/clang/Basic/DiagnosticASTKinds.td | 2 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 7 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 13 +- .../llvm-project/clang/lib/AST/Interp/Interp.cpp | 3 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 7 +- .../clang/lib/Driver/ToolChains/Solaris.cpp | 9 +- .../clang/lib/Format/TokenAnnotator.cpp | 6 + .../clang/lib/Format/WhitespaceManager.cpp | 2 +- contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 11 +- contrib/llvm-project/libcxx/include/__config | 60 +++++-- .../libcxx/include/__expected/expected.h | 182 ++++++++++----------- .../llvm/lib/CodeGen/BranchFolding.cpp | 6 - .../llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h | 1 + .../CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 10 ++ .../llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 2 +- .../Target/AArch64/AArch64TargetTransformInfo.cpp | 24 +++ .../Target/AArch64/AArch64TargetTransformInfo.h | 3 + .../Target/AArch64/GISel/AArch64CallLowering.cpp | 7 +- .../llvm/lib/Target/LoongArch/LoongArch.h | 2 + .../LoongArch/LoongArchExpandPseudoInsts.cpp | 121 ++++++++++++++ .../Target/LoongArch/LoongArchFloat32InstrInfo.td | 17 ++ .../Target/LoongArch/LoongArchFloatInstrFormats.td | 12 ++ .../lib/Target/LoongArch/LoongArchInstrInfo.cpp | 6 + .../lib/Target/LoongArch/LoongArchRegisterInfo.cpp | 7 - .../Target/LoongArch/LoongArchTargetMachine.cpp | 1 + .../llvm/lib/Target/Mips/MipsISelLowering.cpp | 14 +- .../llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 19 ++- .../llvm/lib/Transforms/IPO/GlobalOpt.cpp | 30 +++- .../Transforms/Scalar/ConstraintElimination.cpp | 16 +- .../Scalar/CorrelatedValuePropagation.cpp | 68 ++++---- .../llvm/lib/Transforms/Scalar/GVN.cpp | 11 +- .../llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp | 1 + .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 3 +- .../openmp/runtime/src/kmp_runtime.cpp | 3 +- .../openmp/runtime/src/kmp_wrapper_getpid.h | 2 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 42 files changed, 490 insertions(+), 228 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td index 0794ed7ba683..694e6a5840bc 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -69,7 +69,7 @@ def note_consteval_address_accessible : Note< "%select{pointer|reference}0 to a consteval declaration " "is not a constant expression">; def note_constexpr_uninitialized : Note< - "subobject %0 is not initialized">; + "subobject %select{of type |}0%1 is not initialized">; def note_constexpr_uninitialized_base : Note< "constructor of base class %0 is not called">; def note_constexpr_static_local : Note< diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index cfd1c0f977c0..3752a23faa85 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -710,9 +710,13 @@ public: return result; } + // Saves the current floating-point pragma stack and clear it in this Sema. class FpPragmaStackSaveRAII { public: - FpPragmaStackSaveRAII(Sema &S) : S(S), SavedStack(S.FpPragmaStack) {} + FpPragmaStackSaveRAII(Sema &S) + : S(S), SavedStack(std::move(S.FpPragmaStack)) { + S.FpPragmaStack.Stack.clear(); + } ~FpPragmaStackSaveRAII() { S.FpPragmaStack = std::move(SavedStack); } private: @@ -722,7 +726,6 @@ public: void resetFPOptions(FPOptions FPO) { CurFPFeatures = FPO; - FpPragmaStack.Stack.clear(); FpPragmaStack.CurrentValue = FPO.getChangesFrom(FPOptions(LangOpts)); } diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index c62044f36194..99ae88a6cd69 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -2379,10 +2379,15 @@ static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) { if (!Value.hasValue()) { - assert(SubobjectDecl && "SubobjectDecl shall be non-null"); - Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; - Info.Note(SubobjectDecl->getLocation(), - diag::note_constexpr_subobject_declared_here); + if (SubobjectDecl) { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) + << /*(name)*/ 1 << SubobjectDecl; + Info.Note(SubobjectDecl->getLocation(), + diag::note_constexpr_subobject_declared_here); + } else { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) + << /*of type*/ 0 << Type; + } return false; } diff --git a/contrib/llvm-project/clang/lib/AST/Interp/Interp.cpp b/contrib/llvm-project/clang/lib/AST/Interp/Interp.cpp index 4917f43f9512..59108b857577 100644 --- a/contrib/llvm-project/clang/lib/AST/Interp/Interp.cpp +++ b/contrib/llvm-project/clang/lib/AST/Interp/Interp.cpp @@ -382,7 +382,8 @@ bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) { static void DiagnoseUninitializedSubobject(InterpState &S, const SourceInfo &SI, const FieldDecl *SubObjDecl) { assert(SubObjDecl && "Subobject declaration does not exist"); - S.FFDiag(SI, diag::note_constexpr_uninitialized) << SubObjDecl; + S.FFDiag(SI, diag::note_constexpr_uninitialized) + << /*(name)*/ 1 << SubObjDecl; S.Note(SubObjDecl->getLocation(), diag::note_constexpr_subobject_declared_here); } diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp index 942daa4aa577..91369b7d8804 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp @@ -1736,9 +1736,10 @@ llvm::Constant *ConstantEmitter::tryEmitPrivate(const Expr *E, QualType destType) { assert(!destType->isVoidType() && "can't emit a void constant"); - if (llvm::Constant *C = - ConstExprEmitter(*this).Visit(const_cast(E), destType)) - return C; + if (!destType->isReferenceType()) + if (llvm::Constant *C = + ConstExprEmitter(*this).Visit(const_cast(E), destType)) + return C; Expr::EvalResult Result; diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Solaris.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Solaris.cpp index de5a69e4ca3f..85619a91554e 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Solaris.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Solaris.cpp @@ -64,6 +64,7 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const { + const Driver &D = getToolChain().getDriver(); const bool IsPIE = getPIE(Args, getToolChain()); ArgStringList CmdArgs; @@ -152,8 +153,11 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs, options::OPT_r)) { - if (getToolChain().ShouldLinkCXXStdlib(Args)) - getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); + if (D.CCCIsCXX()) { + if (getToolChain().ShouldLinkCXXStdlib(Args)) + getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); + CmdArgs.push_back("-lm"); + } if (Args.hasArg(options::OPT_fstack_protector) || Args.hasArg(options::OPT_fstack_protector_strong) || Args.hasArg(options::OPT_fstack_protector_all)) { @@ -172,7 +176,6 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-lc"); if (!Args.hasArg(options::OPT_shared)) { CmdArgs.push_back("-lgcc"); - CmdArgs.push_back("-lm"); } const SanitizerArgs &SA = getToolChain().getSanitizerArgs(Args); if (NeedsSanitizerDeps) { diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 73840332e22c..4a1fc08455e5 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -3178,6 +3178,12 @@ static bool isFunctionDeclarationName(bool IsCpp, const FormatToken &Current, !Previous->isOneOf(tok::kw_return, tok::kw_co_return)) { return true; } + if (Previous->is(tok::r_paren) && Previous->is(TT_TypeDeclarationParen)) { + assert(Previous->MatchingParen); + assert(Previous->MatchingParen->is(tok::l_paren)); + assert(Previous->MatchingParen->is(TT_TypeDeclarationParen)); + return true; + } if (!Previous->isOneOf(tok::star, tok::amp, tok::ampamp, TT_TemplateCloser)) return false; Next = skipOperatorName(Next); diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp index 668ca38ad683..c1016c44a74a 100644 --- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp +++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp @@ -965,7 +965,7 @@ void WhitespaceManager::alignConsecutiveDeclarations() { AlignTokens( Style, [](Change const &C) { - if (C.Tok->isOneOf(TT_FunctionDeclarationName, TT_FunctionTypeLParen)) + if (C.Tok->is(TT_FunctionDeclarationName)) return true; if (C.Tok->isNot(TT_StartOfName)) return false; diff --git a/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp b/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp index 43b2a32cce71..cf1e3a94de7f 100644 --- a/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp +++ b/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp @@ -3998,8 +3998,15 @@ void Parser::ParseDeclarationSpecifiers( case tok::kw_thread_local: if (getLangOpts().C2x) Diag(Tok, diag::warn_c2x_compat_keyword) << Tok.getName(); - isInvalid = DS.SetStorageClassSpecThread(DeclSpec::TSCS_thread_local, Loc, - PrevSpec, DiagID); + // We map thread_local to _Thread_local in C23 mode so it retains the C + // semantics rather than getting the C++ semantics. + // FIXME: diagnostics will show _Thread_local when the user wrote + // thread_local in source in C23 mode; we need some general way to + // identify which way the user spelled the keyword in source. + isInvalid = DS.SetStorageClassSpecThread( + getLangOpts().C2x ? DeclSpec::TSCS__Thread_local + : DeclSpec::TSCS_thread_local, + Loc, PrevSpec, DiagID); isStorageClass = true; break; case tok::kw__Thread_local: diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 3859c027cd29..10c056f313ff 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -40,15 +40,11 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 170003 +# define _LIBCPP_VERSION 170005 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) -// Valid C++ identifier that revs with every libc++ version. This can be used to -// generate identifiers that must be unique for every released libc++ version. -# define _LIBCPP_VERSIONED_IDENTIFIER _LIBCPP_CONCAT(v, _LIBCPP_VERSION) - # if __STDC_HOSTED__ == 0 # define _LIBCPP_FREESTANDING # endif @@ -754,22 +750,54 @@ typedef __char32_t char32_t; # define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE # endif +# if _LIBCPP_ENABLE_HARDENED_MODE +# define _LIBCPP_HARDENING_SIG h +# elif _LIBCPP_ENABLE_ASSERTIONS +# define _LIBCPP_HARDENING_SIG s +# elif _LIBCPP_ENABLE_DEBUG_MODE +# define _LIBCPP_HARDENING_SIG d +# else +# define _LIBCPP_HARDENING_SIG u // for unchecked +# endif + +# ifdef _LIBCPP_HAS_NO_EXCEPTIONS +# define _LIBCPP_EXCEPTIONS_SIG n +# else +# define _LIBCPP_EXCEPTIONS_SIG e +# endif + +# define _LIBCPP_ODR_SIGNATURE \ + _LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_HARDENING_SIG, _LIBCPP_EXCEPTIONS_SIG), _LIBCPP_VERSION) + // This macro marks a symbol as being hidden from libc++'s ABI. This is achieved // on two levels: // 1. The symbol is given hidden visibility, which ensures that users won't start exporting // symbols from their dynamic library by means of using the libc++ headers. This ensures // that those symbols stay private to the dynamic library in which it is defined. // -// 2. The symbol is given an ABI tag that changes with each version of libc++. This ensures -// that no ODR violation can arise from mixing two TUs compiled with different versions -// of libc++ where we would have changed the definition of a symbol. If the symbols shared -// the same name, the ODR would require that their definitions be token-by-token equivalent, -// which basically prevents us from being able to make any change to any function in our -// headers. Using this ABI tag ensures that the symbol name is "bumped" artificially at -// each release, which lets us change the definition of these symbols at our leisure. -// Note that historically, this has been achieved in various ways, including force-inlining -// all functions or giving internal linkage to all functions. Both these (previous) solutions -// suffer from drawbacks that lead notably to code bloat. +// 2. The symbol is given an ABI tag that encodes the ODR-relevant properties of the library. +// This ensures that no ODR violation can arise from mixing two TUs compiled with different +// versions or configurations of libc++ (such as exceptions vs no-exceptions). Indeed, if the +// program contains two definitions of a function, the ODR requires them to be token-by-token +// equivalent, and the linker is allowed to pick either definition and discard the other one. +// +// For example, if a program contains a copy of `vector::at()` compiled with exceptions enabled +// *and* a copy of `vector::at()` compiled with exceptions disabled (by means of having two TUs +// compiled with different settings), the two definitions are both visible by the linker and they +// have the same name, but they have a meaningfully different implementation (one throws an exception +// and the other aborts the program). This violates the ODR and makes the program ill-formed, and in +// practice what will happen is that the linker will pick one of the definitions at random and will +// discard the other one. This can quite clearly lead to incorrect program behavior. +// +// A similar reasoning holds for many other properties that are ODR-affecting. Essentially any +// property that causes the code of a function to differ from the code in another configuration +// can be considered ODR-affecting. In practice, we don't encode all such properties in the ABI +// tag, but we encode the ones that we think are most important: library version, exceptions, and +// hardening mode. +// +// Note that historically, solving this problem has been achieved in various ways, including +// force-inlining all functions or giving internal linkage to all functions. Both these previous +// solutions suffer from drawbacks that lead notably to code bloat. // // Note that we use _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION to ensure that we don't depend // on _LIBCPP_HIDE_FROM_ABI methods of classes explicitly instantiated in the dynamic library. @@ -789,7 +817,7 @@ typedef __char32_t char32_t; # ifndef _LIBCPP_NO_ABI_TAG # define _LIBCPP_HIDE_FROM_ABI \ _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION \ - __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER)))) + __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE)))) # else # define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION # endif diff --git a/contrib/llvm-project/libcxx/include/__expected/expected.h b/contrib/llvm-project/libcxx/include/__expected/expected.h index 7d57aa4db5f9..5836600312de 100644 --- a/contrib/llvm-project/libcxx/include/__expected/expected.h +++ b/contrib/llvm-project/libcxx/include/__expected/expected.h @@ -119,9 +119,7 @@ public: _LIBCPP_HIDE_FROM_ABI constexpr expected() noexcept(is_nothrow_default_constructible_v<_Tp>) // strengthened requires is_default_constructible_v<_Tp> - : __has_val_(true) { - std::construct_at(std::addressof(__union_.__val_)); - } + : __union_(std::in_place), __has_val_(true) {} _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected&) = delete; @@ -136,14 +134,7 @@ public: noexcept(is_nothrow_copy_constructible_v<_Tp> && is_nothrow_copy_constructible_v<_Err>) // strengthened requires(is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err> && !(is_trivially_copy_constructible_v<_Tp> && is_trivially_copy_constructible_v<_Err>)) - : __has_val_(__other.__has_val_) { - if (__has_val_) { - std::construct_at(std::addressof(__union_.__val_), __other.__union_.__val_); - } else { - std::construct_at(std::addressof(__union_.__unex_), __other.__union_.__unex_); - } - } - + : __union_(__other.__has_val_, __other.__union_), __has_val_(__other.__has_val_) { } _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&&) requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> @@ -154,13 +145,7 @@ public: noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_move_constructible_v<_Err>) requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> && !(is_trivially_move_constructible_v<_Tp> && is_trivially_move_constructible_v<_Err>)) - : __has_val_(__other.__has_val_) { - if (__has_val_) { - std::construct_at(std::addressof(__union_.__val_), std::move(__other.__union_.__val_)); - } else { - std::construct_at(std::addressof(__union_.__unex_), std::move(__other.__union_.__unex_)); - } - } + : __union_(__other.__has_val_, std::move(__other.__union_)), __has_val_(__other.__has_val_) { } private: template @@ -198,36 +183,21 @@ public: expected(const expected<_Up, _OtherErr>& __other) noexcept(is_nothrow_constructible_v<_Tp, const _Up&> && is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened - : __has_val_(__other.__has_val_) { - if (__has_val_) { - std::construct_at(std::addressof(__union_.__val_), __other.__union_.__val_); - } else { - std::construct_at(std::addressof(__union_.__unex_), __other.__union_.__unex_); - } - } + : __union_(__other.__has_val_, __other.__union_), __has_val_(__other.__has_val_) {} template requires __can_convert<_Up, _OtherErr, _Up, _OtherErr>::value _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp> || !is_convertible_v<_OtherErr, _Err>) expected(expected<_Up, _OtherErr>&& __other) noexcept(is_nothrow_constructible_v<_Tp, _Up> && is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened - : __has_val_(__other.__has_val_) { - if (__has_val_) { - std::construct_at(std::addressof(__union_.__val_), std::move(__other.__union_.__val_)); - } else { - std::construct_at(std::addressof(__union_.__unex_), std::move(__other.__union_.__unex_)); - } - } + : __union_(__other.__has_val_, std::move(__other.__union_)), __has_val_(__other.__has_val_) {} template requires(!is_same_v, in_place_t> && !is_same_v> && !__is_std_unexpected>::value && is_constructible_v<_Tp, _Up>) _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp>) - expected(_Up&& __u) - noexcept(is_nothrow_constructible_v<_Tp, _Up>) // strengthened - : __has_val_(true) { - std::construct_at(std::addressof(__union_.__val_), std::forward<_Up>(__u)); - } + expected(_Up&& __u) noexcept(is_nothrow_constructible_v<_Tp, _Up>) // strengthened + : __union_(std::in_place, std::forward<_Up>(__u)), __has_val_(true) {} template @@ -235,52 +205,40 @@ public: _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v) expected(const unexpected<_OtherErr>& __unex) noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), __unex.error()); - } + : __union_(std::unexpect, __unex.error()), __has_val_(false) {} template requires is_constructible_v<_Err, _OtherErr> _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>) expected(unexpected<_OtherErr>&& __unex) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), std::move(__unex.error())); - } + : __union_(std::unexpect, std::move(__unex.error())), __has_val_(false) {} template requires is_constructible_v<_Tp, _Args...> _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) // strengthened - : __has_val_(true) { - std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...); - } + : __union_(std::in_place, std::forward<_Args>(__args)...), __has_val_(true) {} template requires is_constructible_v< _Tp, initializer_list<_Up>&, _Args... > _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>) // strengthened - : __has_val_(true) { - std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...); - } + : __union_(std::in_place, __il, std::forward<_Args>(__args)...), __has_val_(true) {} template requires is_constructible_v<_Err, _Args...> _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, _Args&&... __args) - noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), std::forward<_Args>(__args)...); - } + noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened + : __union_(std::unexpect, std::forward<_Args>(__args)...), __has_val_(false) {} template requires is_constructible_v< _Err, initializer_list<_Up>&, _Args... > _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), __il, std::forward<_Args>(__args)...); - } + : __union_(std::unexpect, __il, std::forward<_Args>(__args)...), __has_val_(false) {} // [expected.object.dtor], destructor @@ -439,9 +397,10 @@ public: std::destroy_at(std::addressof(__union_.__val_)); } else { std::destroy_at(std::addressof(__union_.__unex_)); - __has_val_ = true; } - return *std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...); + std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...); + __has_val_ = true; + return __union_.__val_; } template @@ -451,9 +410,10 @@ public: std::destroy_at(std::addressof(__union_.__val_)); } else { std::destroy_at(std::addressof(__union_.__unex_)); - __has_val_ = true; } - return *std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...); + std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...); + __has_val_ = true; + return __union_.__val_; } @@ -892,11 +852,15 @@ public: } private: - struct __empty_t {}; - template union __union_t { - _LIBCPP_HIDE_FROM_ABI constexpr __union_t() {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::in_place_t, _Args&&... __args) + : __val_(std::forward<_Args>(__args)...) {} + + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args) + : __unex_(std::forward<_Args>(__args)...) {} template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( @@ -908,6 +872,14 @@ private: std::__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args) : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) { + if (__has_val) + std::construct_at(std::addressof(__val_), std::forward<_Union>(__other).__val_); + else + std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_); + } + _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() requires(is_trivially_destructible_v<_ValueType> && is_trivially_destructible_v<_ErrorType>) = default; @@ -926,7 +898,16 @@ private: template requires(is_trivially_move_constructible_v<_ValueType> && is_trivially_move_constructible_v<_ErrorType>) union __union_t<_ValueType, _ErrorType> { - _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {} + _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = default; + _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = default; + + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::in_place_t, _Args&&... __args) + : __val_(std::forward<_Args>(__args)...) {} + + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args) + : __unex_(std::forward<_Args>(__args)...) {} template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( @@ -938,6 +919,14 @@ private: std::__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args) : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) { + if (__has_val) + std::construct_at(std::addressof(__val_), std::forward<_Union>(__other).__val_); + else + std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_); + } + _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() requires(is_trivially_destructible_v<_ValueType> && is_trivially_destructible_v<_ErrorType>) = default; @@ -947,7 +936,6 @@ private: requires(!is_trivially_destructible_v<_ValueType> || !is_trivially_destructible_v<_ErrorType>) {} - _LIBCPP_NO_UNIQUE_ADDRESS __empty_t __empty_; _LIBCPP_NO_UNIQUE_ADDRESS _ValueType __val_; _LIBCPP_NO_UNIQUE_ADDRESS _ErrorType __unex_; }; @@ -995,11 +983,7 @@ public: _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected& __rhs) noexcept(is_nothrow_copy_constructible_v<_Err>) // strengthened requires(is_copy_constructible_v<_Err> && !is_trivially_copy_constructible_v<_Err>) - : __has_val_(__rhs.__has_val_) { - if (!__rhs.__has_val_) { - std::construct_at(std::addressof(__union_.__unex_), __rhs.__union_.__unex_); - } - } + : __union_(__rhs.__has_val_, __rhs.__union_), __has_val_(__rhs.__has_val_) {} _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&&) requires(is_move_constructible_v<_Err> && is_trivially_move_constructible_v<_Err>) @@ -1008,51 +992,35 @@ public: _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&& __rhs) noexcept(is_nothrow_move_constructible_v<_Err>) requires(is_move_constructible_v<_Err> && !is_trivially_move_constructible_v<_Err>) - : __has_val_(__rhs.__has_val_) { - if (!__rhs.__has_val_) { - std::construct_at(std::addressof(__union_.__unex_), std::move(__rhs.__union_.__unex_)); - } - } + : __union_(__rhs.__has_val_, std::move(__rhs.__union_)), __has_val_(__rhs.__has_val_) {} template requires __can_convert<_Up, _OtherErr, const _OtherErr&>::value _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v) expected(const expected<_Up, _OtherErr>& __rhs) noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened - : __has_val_(__rhs.__has_val_) { - if (!__rhs.__has_val_) { - std::construct_at(std::addressof(__union_.__unex_), __rhs.__union_.__unex_); - } - } + : __union_(__rhs.__has_val_, __rhs.__union_), __has_val_(__rhs.__has_val_) {} template requires __can_convert<_Up, _OtherErr, _OtherErr>::value _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>) expected(expected<_Up, _OtherErr>&& __rhs) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened - : __has_val_(__rhs.__has_val_) { - if (!__rhs.__has_val_) { - std::construct_at(std::addressof(__union_.__unex_), std::move(__rhs.__union_.__unex_)); - } - } + : __union_(__rhs.__has_val_, std::move(__rhs.__union_)), __has_val_(__rhs.__has_val_) {} template requires is_constructible_v<_Err, const _OtherErr&> _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v) expected(const unexpected<_OtherErr>& __unex) noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), __unex.error()); - } + : __union_(std::unexpect, __unex.error()), __has_val_(false) {} template requires is_constructible_v<_Err, _OtherErr> _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>) expected(unexpected<_OtherErr>&& __unex) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), std::move(__unex.error())); - } + : __union_(std::unexpect, std::move(__unex.error())), __has_val_(false) {} _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t) noexcept : __has_val_(true) {} @@ -1060,17 +1028,13 @@ public: requires is_constructible_v<_Err, _Args...> _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), std::forward<_Args>(__args)...); - } + : __union_(std::unexpect, std::forward<_Args>(__args)...), __has_val_(false) {} template requires is_constructible_v< _Err, initializer_list<_Up>&, _Args... > _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened - : __has_val_(false) { - std::construct_at(std::addressof(__union_.__unex_), __il, std::forward<_Args>(__args)...); - } + : __union_(std::unexpect, __il, std::forward<_Args>(__args)...), __has_val_(false) {} private: template @@ -1504,11 +1468,23 @@ private: union __union_t { _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args) + : __unex_(std::forward<_Args>(__args)...) {} + template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( __expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args) : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) { + if (__has_val) + std::construct_at(std::addressof(__empty_)); + else + std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_); + } + _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() requires(is_trivially_destructible_v<_ErrorType>) = default; @@ -1529,11 +1505,23 @@ private: union __union_t<_ErrorType> { _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args) + : __unex_(std::forward<_Args>(__args)...) {} + template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( __expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args) : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {} + template + _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) { + if (__has_val) + std::construct_at(std::addressof(__empty_)); + else + std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_); + } + _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() requires(is_trivially_destructible_v<_ErrorType>) = default; diff --git a/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp b/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp index 3830f25debaf..0801296cab49 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp @@ -485,13 +485,7 @@ BranchFolder::MergePotentialsElt::operator<(const MergePotentialsElt &o) const { return true; if (getBlock()->getNumber() > o.getBlock()->getNumber()) return false; - // _GLIBCXX_DEBUG checks strict weak ordering, which involves comparing - // an object with itself. -#ifndef _GLIBCXX_DEBUG - llvm_unreachable("Predecessor appears twice"); -#else return false; -#endif } /// CountTerminators - Count the number of terminators in the given diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h index db8f61eee606..ad70655de349 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h @@ -1000,6 +1000,7 @@ private: SDValue WidenVecOp_EXTRACT_VECTOR_ELT(SDNode *N); SDValue WidenVecOp_INSERT_SUBVECTOR(SDNode *N); SDValue WidenVecOp_EXTRACT_SUBVECTOR(SDNode *N); + SDValue WidenVecOp_EXTEND_VECTOR_INREG(SDNode *N); SDValue WidenVecOp_STORE(SDNode* N); SDValue WidenVecOp_VP_STORE(SDNode *N, unsigned OpNo); SDValue WidenVecOp_VP_STRIDED_STORE(SDNode *N, unsigned OpNo); diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index 8c117c1c74dc..9c1839f2576e 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -5946,6 +5946,11 @@ bool DAGTypeLegalizer::WidenVectorOperand(SDNode *N, unsigned OpNo) { case ISD::EXPERIMENTAL_VP_STRIDED_STORE: Res = WidenVecOp_VP_STRIDED_STORE(N, OpNo); break; + case ISD::ANY_EXTEND_VECTOR_INREG: + case ISD::SIGN_EXTEND_VECTOR_INREG: + case ISD::ZERO_EXTEND_VECTOR_INREG: + Res = WidenVecOp_EXTEND_VECTOR_INREG(N); + break; case ISD::MSTORE: Res = WidenVecOp_MSTORE(N, OpNo); break; case ISD::MGATHER: Res = WidenVecOp_MGATHER(N, OpNo); break; case ISD::MSCATTER: Res = WidenVecOp_MSCATTER(N, OpNo); break; @@ -6338,6 +6343,11 @@ SDValue DAGTypeLegalizer::WidenVecOp_EXTRACT_VECTOR_ELT(SDNode *N) { N->getValueType(0), InOp, N->getOperand(1)); } +SDValue DAGTypeLegalizer::WidenVecOp_EXTEND_VECTOR_INREG(SDNode *N) { + SDValue InOp = GetWidenedVector(N->getOperand(0)); + return DAG.getNode(N->getOpcode(), SDLoc(N), N->getValueType(0), InOp); +} + SDValue DAGTypeLegalizer::WidenVecOp_STORE(SDNode *N) { // We have to widen the value, but we want only to store the original // vector type. diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index 30bd580ad86a..0691e07a639b 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -4764,7 +4764,7 @@ int llvm::isAArch64FrameOffsetLegal(const MachineInstr &MI, Offset = Remainder; else { NewOffset = NewOffset < 0 ? MinOff : MaxOff; - Offset = Offset - NewOffset * Scale + Remainder; + Offset = Offset - NewOffset * Scale; } if (EmittableOffset) diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp index 353e96856b8f..bee9ec4c7132 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp @@ -212,6 +212,30 @@ bool AArch64TTIImpl::areInlineCompatible(const Function *Caller, return (CallerBits & CalleeBits) == CalleeBits; } +bool AArch64TTIImpl::areTypesABICompatible( + const Function *Caller, const Function *Callee, + const ArrayRef &Types) const { + if (!BaseT::areTypesABICompatible(Caller, Callee, Types)) + return false; + + // We need to ensure that argument promotion does not attempt to promote + // pointers to fixed-length vector types larger than 128 bits like + // <8 x float> (and pointers to aggregate types which have such fixed-length + // vector type members) into the values of the pointees. Such vector types + // are used for SVE VLS but there is no ABI for SVE VLS arguments and the + // backend cannot lower such value arguments. The 128-bit fixed-length SVE + // types can be safely treated as 128-bit NEON types and they cannot be + // distinguished in IR. + if (ST->useSVEForFixedLengthVectors() && llvm::any_of(Types, [](Type *Ty) { + auto FVTy = dyn_cast(Ty); + return FVTy && + FVTy->getScalarSizeInBits() * FVTy->getNumElements() > 128; + })) + return false; + + return true; +} + bool AArch64TTIImpl::shouldMaximizeVectorBandwidth( TargetTransformInfo::RegisterKind K) const { assert(K != TargetTransformInfo::RGK_Scalar); diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h index 787cb3c5d34b..d1977a62a76d 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h @@ -77,6 +77,9 @@ public: bool areInlineCompatible(const Function *Caller, const Function *Callee) const; + bool areTypesABICompatible(const Function *Caller, const Function *Callee, + const ArrayRef &Types) const; + /// \name Scalar TTI Implementations /// @{ diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp index e78d8bb487a9..c56e3373d3a7 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp @@ -829,9 +829,9 @@ bool AArch64CallLowering::doCallerAndCalleePassArgsTheSameWay( bool AArch64CallLowering::areCalleeOutgoingArgsTailCallable( CallLoweringInfo &Info, MachineFunction &MF, - SmallVectorImpl &OutArgs) const { + SmallVectorImpl &OrigOutArgs) const { // If there are no outgoing arguments, then we are done. - if (OutArgs.empty()) + if (OrigOutArgs.empty()) return true; const Function &CallerF = MF.getFunction(); @@ -851,6 +851,9 @@ bool AArch64CallLowering::areCalleeOutgoingArgsTailCallable( AArch64OutgoingValueAssigner CalleeAssigner(AssignFnFixed, AssignFnVarArg, Subtarget, /*IsReturn*/ false); + // determineAssignments() may modify argument flags, so make a copy. + SmallVector OutArgs; + append_range(OutArgs, OrigOutArgs); if (!determineAssignments(CalleeAssigner, OutArgs, OutInfo)) { LLVM_DEBUG(dbgs() << "... Could not analyze call operands.\n"); return false; diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArch.h b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArch.h index 05f4ac8c9255..09ca089c9115 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArch.h +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArch.h @@ -36,9 +36,11 @@ bool lowerLoongArchMachineOperandToMCOperand(const MachineOperand &MO, FunctionPass *createLoongArchExpandAtomicPseudoPass(); FunctionPass *createLoongArchISelDag(LoongArchTargetMachine &TM); FunctionPass *createLoongArchPreRAExpandPseudoPass(); +FunctionPass *createLoongArchExpandPseudoPass(); void initializeLoongArchDAGToDAGISelPass(PassRegistry &); void initializeLoongArchExpandAtomicPseudoPass(PassRegistry &); void initializeLoongArchPreRAExpandPseudoPass(PassRegistry &); +void initializeLoongArchExpandPseudoPass(PassRegistry &); } // end namespace llvm #endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H diff --git a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp index dd0b2cfde544..72c1f1cec198 100644 --- a/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp +++ b/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp @@ -29,6 +29,8 @@ using namespace llvm; #define LOONGARCH_PRERA_EXPAND_PSEUDO_NAME \ "LoongArch Pre-RA pseudo instruction expansion pass" +#define LOONGARCH_EXPAND_PSEUDO_NAME \ + "LoongArch pseudo instruction expansion pass" namespace { @@ -513,15 +515,134 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +class LoongArchExpandPseudo : public MachineFunctionPass { +public: + const LoongArchInstrInfo *TII; + static char ID; + + LoongArchExpandPseudo() : MachineFunctionPass(ID) { + initializeLoongArchExpandPseudoPass(*PassRegistry::getPassRegistry()); + } + + bool runOnMachineFunction(MachineFunction &MF) override; + + StringRef getPassName() const override { + return LOONGARCH_EXPAND_PSEUDO_NAME; + } + +private: + bool expandMBB(MachineBasicBlock &MBB); + bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, + MachineBasicBlock::iterator &NextMBBI); + bool expandCopyCFR(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, + MachineBasicBlock::iterator &NextMBBI); +}; + +char LoongArchExpandPseudo::ID = 0; + +bool LoongArchExpandPseudo::runOnMachineFunction(MachineFunction &MF) { + TII = + static_cast(MF.getSubtarget().getInstrInfo()); + + bool Modified = false; + for (auto &MBB : MF) + Modified |= expandMBB(MBB); + + return Modified; +} + +bool LoongArchExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + + return Modified; +} + +bool LoongArchExpandPseudo::expandMI(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MBBI, + MachineBasicBlock::iterator &NextMBBI) { + switch (MBBI->getOpcode()) { + case LoongArch::PseudoCopyCFR: + return expandCopyCFR(MBB, MBBI, NextMBBI); + } + + return false; +} + +bool LoongArchExpandPseudo::expandCopyCFR( + MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, + MachineBasicBlock::iterator &NextMBBI) { + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + + // Expand: + // MBB: + // fcmp.caf.s $dst, $fa0, $fa0 # set $dst 0(false) + // bceqz $src, SinkBB + // FalseBB: + // fcmp.cueq.s $dst, $fa0, $fa0 # set $dst 1(true) + // SinkBB: + // fallthrough + + const BasicBlock *LLVM_BB = MBB.getBasicBlock(); + auto *FalseBB = MF->CreateMachineBasicBlock(LLVM_BB); + auto *SinkBB = MF->CreateMachineBasicBlock(LLVM_BB); + *** 622 LINES SKIPPED *** From nobody Sun Jan 7 23:08:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtT2gsRz56FCV; Sun, 7 Jan 2024 23:08: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 4T7XtT1bL5z4Q3j; Sun, 7 Jan 2024 23:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xcOOZ+hl8/QgDW81WzEZ3x6yJrw3C8WV+rjG3+EzTwQ=; b=w65qOm2FzGCH+CDTSi1ag4+P/UOAbbZAkqK7V/ZZhv1ycPfRjpdKTuKdWu5QB3LuXJ2Epp IxjD7nCzKI0UYHQPXQS9dwD/D0vaIMx1d5nPKSDvh8bVbwKJexDCVFNkfxYuBWqy44Y2gx wiE+RvTJLrqmZ200I6bjX3BJvcq51PgKGGX+h/3OoWK1QxFG3XCZSTrB1wcW8Aaf1/120X nE6LErCcDk558UQAn9ztGjVsj5WOwciD6Mv5pOoFhRLUlobVtT99JiiAniDfrlGDmfRTIY hVhOe6YZriOr4uOlF4kqkDfRGuvBM4NLbmU1rr3HV359sqCDTtuNsCeV/fA0cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xcOOZ+hl8/QgDW81WzEZ3x6yJrw3C8WV+rjG3+EzTwQ=; b=B7ro13BGQWWukZlp1h9TZwL8fnLPKC967ohBupJMSY7IEnwJk51YDLbmc/t0f4bk6BeDYx 9rm7Ng13Um1184NkeNnIO5okbeUBRJqrqAGbMSQhSME9yohC688K76DBOb2Uy7aoty29mL +2NQGq2Ht5t1tDEoG2xL6gIKoVmmeR/ALREHsrwECHcxlerfhwMWMC45R+kcFSPoC57hv+ MR+ZaITdSgk5+/Wuz7ZTYb6h0JvvnAlmwUjbkPJiJTg0KmXdvdsZkMvoyCPxhOKHAQGQSK vpnJsal7GpXTniG4dlF3SI7jN+nOxE6TvD5m0rIqPPvRiAf6LZZEAlBe1LQHkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668913; a=rsa-sha256; cv=none; b=UMQ5ixd5KHGXHiHUZOgS/ZE8SLbx12WuTop5ooXJ12vguCevlNnqCDDT5JP18UPPl8xQHd 4QN2cz7y5JZ7j9V2J6RqieU2tFRBpfn//ofFvvG36cnnEkfT61ufTXcbdgfJaGcE59PmV/ dwgxxgMZ7tEnuhYE0OQx7XQIN8grGaxNM12Olqwhjng9/nCN7wJDW5qVcIlQ4ZxZCuE38i eG3/zGHSz38DF8EdzmqYAHvCkfGHl8nDFcV/69fITA+YZ4zg1ZnjwDIQ/8bWU488RU9CLF GljrwBtQdzE7xp6x9XD2tdXCv8DEB+8UkyQ4SYYwiYbSW2DeoBGqzstHNUE4xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtT0jb1zk7R; Sun, 7 Jan 2024 23:08: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 407N8Xrl053460; Sun, 7 Jan 2024 23:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8XPH053457; Sun, 7 Jan 2024 23:08:33 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:33 GMT Message-Id: <202401072308.407N8XPH053457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 33605894103b - stable/13 - Proactively remove libc++ __tuple header file that became a directory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33605894103bd4de4b90790ef40d13595ccab0af Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=33605894103bd4de4b90790ef40d13595ccab0af commit 33605894103bd4de4b90790ef40d13595ccab0af Author: Dimitry Andric AuthorDate: 2023-12-13 18:53:17 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:42 +0000 Proactively remove libc++ __tuple header file that became a directory This was already handled in ObsoleteFiles.inc (see the 20230622 entry), but some people never run "make delete-old", or want to upgrade directly from a revision that still had libc++ 15 to the most recent revision. They would then encounter a failure during installworld, similar to: install: target directory `/usr/include/c++/v1/__tuple/' does not exist Therefore, clean it up in the distrib-cleanup phase, similar to the earlier instance of the libc++ __string header file that became a directory. PR: 273753 MFC after: 1 month (cherry picked from commit ca217224f17229570f40227893353ca10ae1dda1) --- etc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/Makefile b/etc/Makefile index 0959fda6a958..9b4b7c93d10a 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -124,6 +124,7 @@ MTREES+= ../${mtree} / # Clean up files that have changed into directories, as mtree cannot handle this # scenario. DISTRIB_CLEANUP_FILES+= ${INCLUDEDIR}/c++/v1/__string +DISTRIB_CLEANUP_FILES+= ${INCLUDEDIR}/c++/v1/__tuple distrib-cleanup: .PHONY for file in ${DISTRIB_CLEANUP_FILES}; do \ if [ -f ${DESTDIR}/$${file} ]; then \ From nobody Sun Jan 7 23:08:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtS5dn2z56FHg; Sun, 7 Jan 2024 23:08: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 4T7XtS101Kz4Q83; Sun, 7 Jan 2024 23:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CzF1RsM05S2cZi68BchOj/axo0mqhymK9lipa4pJ2PE=; b=oj+YzCCIDNWetRlZB1rCSXmeYorKAaTnO8DQoJ8K9kOsroWtlSLmkRLSaPFpTHs+ucGdpE 3pjWHOTmzVh41J6d1tVLdm/cmIghvzKexfbz+TTVDpEn50bhHH2dmT+8i7pXnOLYpjO37c bPB7WXyMeNW981hz/P7u7lZ9J3niO9hm7exnPlTaFIjxFVUvuzAnTL9l63PQ4I1GmN+hYe YA71+K1WAzeXFrPngoZhMM/6xVYOoqxdWYMtvrzlO7YQjAYWt8sa6u3OEo1vI7ZaP5bD4J IugkVSvE4fsbHgwVWZPGBKx4u4Kb2ajpwMMMCIcX3oL+58b9vpfd1biH5Lt7Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CzF1RsM05S2cZi68BchOj/axo0mqhymK9lipa4pJ2PE=; b=G/gc2GyaSwLVv0fTxwi7zBePR6+VwsncyH82srrTr0ms5u/05GYUakYt9T3xw5b3fjKhRq UIvOULYsVq+oRfSh8oAG3c59tn7x/mfY7SsPtKKM2hRglhEABb5qY5ZYiFuKtcwHrqmR2y os9rBaATe9hWWcfjKXIPSeI1704A9G7hhmuwjm3snuknVrS5mbaY7ry2WgkmGKZtfnrFMI 1UoYjv0ng1uv8CKZq4TFX8yX8DtDs+rfLnnPl1ucOeC39R3gOP8fepMUgwtI8KIXTvCQTn IupkWi7QJiH6Xr95zEpuPavpHNjYWzRbGgdWtGmFlX1rQL1lmhdaXO3mfK4qzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668912; a=rsa-sha256; cv=none; b=f0lbLrWdDBTYmPDWw0AIOVEbttgG0xu+30HDpzs+sCa+sI4uPkg7+P1OI9jZW/7qhFPtkd GcT6p7mlG1S8u6ZieVlvUJinwd4RWnU5TOtLKA80dtD7l4zAZLqP2oa+t3cEYSDPusw500 BRB4pJ3/XWiJPFIihoq231NpWi1rCSRCZ74pzS9E7EODMGZRPrnYfIW8z1a2PCZzQ0T7VV hGbFKHfzJpCbGhpVfry/U3wQXjHZZ/DwjwPJ20Mai1QUmn8KdCCChVSTa4fSWZpcBjxSFM p/VFAmP4dR2uhj5Q88vicmm98vu9yuKxdaDNC3BYOpQ/i083HPnevP7U45WZeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtS015bzk9v; Sun, 7 Jan 2024 23:08: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 407N8VHM053403; Sun, 7 Jan 2024 23:08:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8Vli053400; Sun, 7 Jan 2024 23:08:31 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:31 GMT Message-Id: <202401072308.407N8Vli053400@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: af05e5589d61 - stable/13 - Merge commit 158f4f30adb4 from llvm git (by Corentin Jabot): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: af05e5589d61acfb9f58611755a16e0c1b975cd1 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=af05e5589d61acfb9f58611755a16e0c1b975cd1 commit af05e5589d61acfb9f58611755a16e0c1b975cd1 Author: Dimitry Andric AuthorDate: 2023-12-07 12:47:54 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:41 +0000 Merge commit 158f4f30adb4 from llvm git (by Corentin Jabot): [Clang] Do not change the type of captured vars when checking lambda constraints When checking the constraint of a lambda, we need to respect the constness of the call operator when establishing the type of capture variables. In D124351, this was done by adding const to the captured variable... However, that would change the type of the variable outside of the scope of the lambda, which is clearly not the desired outcome. Instead, to ensure const-correctness, we need to populate a LambdaScopeInfo with the capture variables before checking the constraints of a generic lambda. There is no changelog as I'd like to tentatively propose we backport this change to RC3 as it is a regression introduced in the Clang 17 cycle. Fixes #61267 Reviewed By: aaron.ballman, #clang-language-wg Differential Revision: https://reviews.llvm.org/D158433 Merge commit 3ed9e9e3ace6 from llvm git (by Corentin Jabot): [Clang] Add captures to the instantiation scope of lambda call operators Like concepts checking, a trailing return type of a lambda in a dependent context may refer to captures in which case they may need to be rebuilt, so the map of local decl should include captures. This patch reveal a pre-existing issue. `this` is always recomputed by TreeTransform. `*this` (like all captures) only become `const` after the parameter list. However, if try to recompute the value of `this` (in a parameter) during template instantiation while determining the type of the call operator, we will determine it to be const (unless the lambda is mutable). There is no good way to know at that point that we are in a parameter or not, the easiest/best solution is to transform the type of this. Note that doing so break a handful of HLSL tests. So this is a prototype at this point. Fixes #65067 Fixes #63675 Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D159126 This fixes 'Assertion failed: (isa(D) && "declaration not instantiated in this scope"), function findInstantiationOf' error when building databases/mongodb44. PR: 273753 MFC after: 1 month (cherry picked from commit feb5b0c76f9c7b510583b0489918300cbf966e0f) --- .../llvm-project/clang/include/clang/Sema/Sema.h | 10 +++++++ .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 29 ++++++-------------- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 16 +++++++---- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 15 +++++----- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 32 ++++++++++++++++++++++ .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 3 ++ .../llvm-project/clang/lib/Sema/TreeTransform.h | 11 +++++++- 7 files changed, 82 insertions(+), 34 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index 3752a23faa85..28a5f17d0dd5 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -7315,6 +7315,16 @@ public: CXXConversionDecl *Conv, Expr *Src); + sema::LambdaScopeInfo *RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator); + + class LambdaScopeForCallOperatorInstantiationRAII + : private FunctionScopeRAII { + public: + LambdaScopeForCallOperatorInstantiationRAII( + Sema &SemasRef, FunctionDecl *FD, MultiLevelTemplateArgumentList MLTAL, + LocalInstantiationScope &Scope); + }; + /// Check whether the given expression is a valid constraint expression. /// A diagnostic is emitted if it is not, false is returned, and /// PossibleNonPrimary will be set to true if the failure might be due to a diff --git a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp index f24b549dd2ef..d1fa8e783122 100755 --- a/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaConcept.cpp @@ -13,12 +13,14 @@ #include "clang/Sema/SemaConcept.h" #include "TreeTransform.h" #include "clang/AST/ASTLambda.h" +#include "clang/AST/DeclCXX.h" #include "clang/AST/ExprConcepts.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/OperatorPrecedence.h" #include "clang/Sema/EnterExpressionEvaluationContext.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Overload.h" +#include "clang/Sema/ScopeInfo.h" #include "clang/Sema/Sema.h" #include "clang/Sema/SemaDiagnostic.h" #include "clang/Sema/SemaInternal.h" @@ -540,11 +542,6 @@ bool Sema::addInstantiatedCapturesToScope( auto AddSingleCapture = [&](const ValueDecl *CapturedPattern, unsigned Index) { ValueDecl *CapturedVar = LambdaClass->getCapture(Index)->getCapturedVar(); - if (cast(Function)->isConst()) { - QualType T = CapturedVar->getType(); - T.addConst(); - CapturedVar->setType(T); - } if (CapturedVar->isInitCapture()) Scope.InstantiatedLocal(CapturedPattern, CapturedVar); }; @@ -603,11 +600,6 @@ bool Sema::SetupConstraintScope( if (addInstantiatedParametersToScope(FD, FromMemTempl->getTemplatedDecl(), Scope, MLTAL)) return true; - // Make sure the captures are also added to the instantiation scope. - if (isLambdaCallOperator(FD) && - addInstantiatedCapturesToScope(FD, FromMemTempl->getTemplatedDecl(), - Scope, MLTAL)) - return true; } return false; @@ -632,11 +624,6 @@ bool Sema::SetupConstraintScope( // child-function. if (addInstantiatedParametersToScope(FD, InstantiatedFrom, Scope, MLTAL)) return true; - - // Make sure the captures are also added to the instantiation scope. - if (isLambdaCallOperator(FD) && - addInstantiatedCapturesToScope(FD, InstantiatedFrom, Scope, MLTAL)) - return true; } return false; @@ -714,6 +701,10 @@ bool Sema::CheckFunctionConstraints(const FunctionDecl *FD, Record = const_cast(Method->getParent()); } CXXThisScopeRAII ThisScope(*this, Record, ThisQuals, Record != nullptr); + + LambdaScopeForCallOperatorInstantiationRAII LambdaScope( + *this, const_cast(FD), *MLTAL, Scope); + return CheckConstraintSatisfaction( FD, {FD->getTrailingRequiresClause()}, *MLTAL, SourceRange(UsageLoc.isValid() ? UsageLoc : FD->getLocation()), @@ -900,12 +891,10 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints( ThisQuals = Method->getMethodQualifiers(); Record = Method->getParent(); } + CXXThisScopeRAII ThisScope(*this, Record, ThisQuals, Record != nullptr); - FunctionScopeRAII FuncScope(*this); - if (isLambdaCallOperator(Decl)) - PushLambdaScope(); - else - FuncScope.disable(); + LambdaScopeForCallOperatorInstantiationRAII LambdaScope( + *this, const_cast(Decl), *MLTAL, Scope); llvm::SmallVector Converted; return CheckConstraintSatisfaction(Template, TemplateAC, Converted, *MLTAL, diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp index 21b5781a71cd..fab2865ec5a1 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp @@ -15172,14 +15172,17 @@ Sema::CheckForFunctionRedefinition(FunctionDecl *FD, FD->setInvalidDecl(); } -static void RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator, - Sema &S) { - CXXRecordDecl *const LambdaClass = CallOperator->getParent(); +LambdaScopeInfo *Sema::RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator) { + CXXRecordDecl *LambdaClass = CallOperator->getParent(); - LambdaScopeInfo *LSI = S.PushLambdaScope(); + LambdaScopeInfo *LSI = PushLambdaScope(); LSI->CallOperator = CallOperator; LSI->Lambda = LambdaClass; LSI->ReturnType = CallOperator->getReturnType(); + // This function in calls in situation where the context of the call operator + // is not entered, so we set AfterParameterList to false, so that + // `tryCaptureVariable` finds explicit captures in the appropriate context. + LSI->AfterParameterList = false; const LambdaCaptureDefault LCD = LambdaClass->getLambdaCaptureDefault(); if (LCD == LCD_None) @@ -15200,7 +15203,7 @@ static void RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator, if (C.capturesVariable()) { ValueDecl *VD = C.getCapturedVar(); if (VD->isInitCapture()) - S.CurrentInstantiationScope->InstantiatedLocal(VD, VD); + CurrentInstantiationScope->InstantiatedLocal(VD, VD); const bool ByRef = C.getCaptureKind() == LCK_ByRef; LSI->addCapture(VD, /*IsBlock*/false, ByRef, /*RefersToEnclosingVariableOrCapture*/true, C.getLocation(), @@ -15217,6 +15220,7 @@ static void RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator, } ++I; } + return LSI; } Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, @@ -15320,7 +15324,7 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, assert(inTemplateInstantiation() && "There should be an active template instantiation on the stack " "when instantiating a generic lambda!"); - RebuildLambdaScopeInfo(cast(D), *this); + RebuildLambdaScopeInfo(cast(D)); } else { // Enter a new function scope PushFunctionScope(); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index 3a5e302cc03a..63b00d640a9c 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -19619,13 +19619,6 @@ bool Sema::tryCaptureVariable( FunctionScopesIndex == MaxFunctionScopesIndex && VarDC == DC) return true; - // When evaluating some attributes (like enable_if) we might refer to a - // function parameter appertaining to the same declaration as that - // attribute. - if (const auto *Parm = dyn_cast(Var); - Parm && Parm->getDeclContext() == DC) - return true; - // Only block literals, captured statements, and lambda expressions can // capture; other scopes don't work. DeclContext *ParentDC = @@ -19653,6 +19646,14 @@ bool Sema::tryCaptureVariable( CSI->getCapture(Var).markUsed(BuildAndDiagnose); break; } + + // When evaluating some attributes (like enable_if) we might refer to a + // function parameter appertaining to the same declaration as that + // attribute. + if (const auto *Parm = dyn_cast(Var); + Parm && Parm->getDeclContext() == DC) + return true; + // If we are instantiating a generic lambda call operator body, // we do not want to capture new variables. What was captured // during either a lambdas transformation or initial parsing diff --git a/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp b/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp index 06fc53591a76..ccc5111d1e31 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp @@ -20,6 +20,7 @@ #include "clang/Sema/ScopeInfo.h" #include "clang/Sema/SemaInternal.h" #include "clang/Sema/SemaLambda.h" +#include "clang/Sema/Template.h" #include "llvm/ADT/STLExtras.h" #include using namespace clang; @@ -2222,3 +2223,34 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation, return BuildBlock; } + +Sema::LambdaScopeForCallOperatorInstantiationRAII:: + LambdaScopeForCallOperatorInstantiationRAII( + Sema &SemasRef, FunctionDecl *FD, MultiLevelTemplateArgumentList MLTAL, + LocalInstantiationScope &Scope) + : FunctionScopeRAII(SemasRef) { + if (!isLambdaCallOperator(FD)) { + FunctionScopeRAII::disable(); + return; + } + + if (FD->isTemplateInstantiation() && FD->getPrimaryTemplate()) { + FunctionTemplateDecl *PrimaryTemplate = FD->getPrimaryTemplate(); + if (const auto *FromMemTempl = + PrimaryTemplate->getInstantiatedFromMemberTemplate()) { + SemasRef.addInstantiatedCapturesToScope( + FD, FromMemTempl->getTemplatedDecl(), Scope, MLTAL); + } + } + + else if (FD->getTemplatedKind() == FunctionDecl::TK_MemberSpecialization || + FD->getTemplatedKind() == FunctionDecl::TK_DependentNonTemplate) { + FunctionDecl *InstantiatedFrom = + FD->getTemplatedKind() == FunctionDecl::TK_MemberSpecialization + ? FD->getInstantiatedFromMemberFunction() + : FD->getInstantiatedFromDecl(); + SemasRef.addInstantiatedCapturesToScope(FD, InstantiatedFrom, Scope, MLTAL); + } + + SemasRef.RebuildLambdaScopeInfo(cast(FD)); +} diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index f78d46f59503..332004055b58 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2426,6 +2426,9 @@ Decl *TemplateDeclInstantiator::VisitCXXMethodDecl( cast(Owner)->isDefinedOutsideFunctionOrMethod()); LocalInstantiationScope Scope(SemaRef, MergeWithParentScope); + Sema::LambdaScopeForCallOperatorInstantiationRAII LambdaScope( + SemaRef, const_cast(D), TemplateArgs, Scope); + // Instantiate enclosing template arguments for friends. SmallVector TempParamLists; unsigned NumTempParamLists = 0; diff --git a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h index 097e81ea7d45..b51741d5e8b2 100644 --- a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h +++ b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h @@ -12285,7 +12285,16 @@ TreeTransform::TransformCXXNullPtrLiteralExpr( template ExprResult TreeTransform::TransformCXXThisExpr(CXXThisExpr *E) { - QualType T = getSema().getCurrentThisType(); + + // In lambdas, the qualifiers of the type depends of where in + // the call operator `this` appear, and we do not have a good way to + // rebuild this information, so we transform the type. + // + // In other contexts, the type of `this` may be overrided + // for type deduction, so we need to recompute it. + QualType T = getSema().getCurLambda() ? + getDerived().TransformType(E->getType()) + : getSema().getCurrentThisType(); if (!getDerived().AlwaysRebuild() && T == E->getType()) { // Mark it referenced in the new context regardless. From nobody Sun Jan 7 23:08:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtW17XSz56FFZ; Sun, 7 Jan 2024 23:08: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 4T7XtV2hqKz4QFB; Sun, 7 Jan 2024 23:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKWWUbCOIbiLIZQoFUQ204GLRnWyq3Ty6p3fntq7Qpg=; b=d/JNFbzD+hJsD5cSNL8yd5dyddpC4/O9UufAHCJmmh6O6t/W1b7NKcCG0zQDzD6R6WdbvA 8zZIdAsNGHGw+i1VLnFSMLbvY1ysPueiWmRC3tGkUyEMJn6zs1BpBY8AbUD3W+v+qu/53M RGBEuKkSA+1sBsJNLFDXktaB4Q4vUljLCJSUNUg0FJKd52+7SCwWBAJehfB50nUQvlV1xu evK6PTVJsdwFpopYm1hyiifnKnCvmLL6BjmqMVQdXXwIYFx37R2UISks9ixsT3ad5N+ZMz f2iChtrVdNlJh1/tu6I51wIdiYbNlWualJ/d0+5bquiEwvTnCnzj4OpisrnNdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKWWUbCOIbiLIZQoFUQ204GLRnWyq3Ty6p3fntq7Qpg=; b=PMRgjA39SoxUgaSrwple8o7yfGh1y20SAzBAr2i9KpNnWXv22T5LLkbp5hhLbWioDWucP1 B2BTjfHSfpgFXqiS2EQT6BLkavwjrIXvBvvbsb0jPr+he4Mlc8uxtxcFhOxHhUXPBOpLEI rIqDwtV4hdqctDYOyE4lNS0anILpgJl5bncgxS7X4csbKKy3q0Lk1kvB6+v5C7s4w0+m8c YjdbvObpuN7yBrWoinLZD3lsXvK0iaCDiH4Rxw8LyWRIy5ZSYK8TO197UwWm9RAqw2YdlN vgftGkncayWrF1kjh6lzuAKA0YTB4rZSCYTdVxCyg5E6OKjfjqmgVCCcYcCG4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668914; a=rsa-sha256; cv=none; b=sEWRGXPlFV3NZdoOE/9PaTv3HZeWPEa7dp8mBBE19KOnrEwOxHJDFbIwgcsv3uYjBr1175 N5kcrnheBSTJU2HN/m1YTGiI37Za8TKUERqLNiaIUZnpU+G8fQyBx6YmcbD3u2fJ2ZI++m eHt7QzNBzttnACxtXfOF2fD8xXBmwyeAUE7A6C6SzaLl/v9hKSkEbKAGTHH+PyU+Adfb8O +UzIf8jBGdzYPJXx7QXoJia63X3yg8Tw9fRO2XCneuXJqnrgbE1GtaCZ/5ortHRqq8qCAC UJXwbaQeDkZ/HHF1xZgDHIL0JaMqo9OJy4r88Pd6+VFuFVlPDk2pw3TZ6DIQIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtV1p14zkDD; Sun, 7 Jan 2024 23:08: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 407N8Ycj053517; Sun, 7 Jan 2024 23:08:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8YmR053514; Sun, 7 Jan 2024 23:08:34 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:34 GMT Message-Id: <202401072308.407N8YmR053514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 197635d7a92a - stable/13 - Add missing sources to libclang_rt Makefiles, clean up unneeded ones List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 197635d7a92ae6a25ef869fcad31db868d2a4f07 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=197635d7a92ae6a25ef869fcad31db868d2a4f07 commit 197635d7a92ae6a25ef869fcad31db868d2a4f07 Author: Dimitry Andric AuthorDate: 2023-12-20 16:08:26 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:42 +0000 Add missing sources to libclang_rt Makefiles, clean up unneeded ones During the llvm-17 merge, a few new source files were not added to the libclang_rt Makefiles, in particular sanitizer_thread_arg_retval.cpp which is now required for AddressSanitizer and MemorySanitizer. Also, MemorySanitizer now requires msan_dl.cpp. While here, clean out a number of source files that compile into nothing (because they only contain non-FreeBSD parts). Also, remove a duplicated instance of tsan_new_delete.cpp from libclang_rt.tsan, since it is only supposed to live in libclang_rt.tsan_cxx. PR: 275854 Reported by: jbeich MFC after: 1 month (cherry picked from commit 0c3af23961e170538f375c392b043903c1397780) --- lib/libclang_rt/asan/Makefile | 3 +-- lib/libclang_rt/asan_dynamic/Makefile | 3 +-- lib/libclang_rt/cfi/Makefile | 2 +- lib/libclang_rt/cfi_diag/Makefile | 2 +- lib/libclang_rt/dd/Makefile | 2 +- lib/libclang_rt/msan/Makefile | 3 ++- lib/libclang_rt/safestack/Makefile | 1 - lib/libclang_rt/stats/Makefile | 1 + lib/libclang_rt/tsan/Makefile | 3 --- lib/libclang_rt/ubsan_standalone/Makefile | 2 +- lib/libclang_rt/xray/Makefile | 1 + 11 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/libclang_rt/asan/Makefile b/lib/libclang_rt/asan/Makefile index 02b5471afc91..6156371241da 100644 --- a/lib/libclang_rt/asan/Makefile +++ b/lib/libclang_rt/asan/Makefile @@ -19,7 +19,6 @@ SRCS+= asan/asan_memory_profile.cpp SRCS+= asan/asan_poisoning.cpp SRCS+= asan/asan_posix.cpp SRCS+= asan/asan_preinit.cpp -SRCS+= asan/asan_premap_shadow.cpp SRCS+= asan/asan_report.cpp SRCS+= asan/asan_rtl.cpp SRCS+= asan/asan_shadow_setup.cpp @@ -28,7 +27,6 @@ SRCS+= asan/asan_stats.cpp SRCS+= asan/asan_suppressions.cpp SRCS+= asan/asan_thread.cpp SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -66,6 +64,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/asan_dynamic/Makefile b/lib/libclang_rt/asan_dynamic/Makefile index 81b68d883ecc..1ba9840946b6 100644 --- a/lib/libclang_rt/asan_dynamic/Makefile +++ b/lib/libclang_rt/asan_dynamic/Makefile @@ -22,7 +22,6 @@ SRCS+= asan/asan_memory_profile.cpp SRCS+= asan/asan_poisoning.cpp SRCS+= asan/asan_posix.cpp SRCS+= asan/asan_preinit.cpp -SRCS+= asan/asan_premap_shadow.cpp SRCS+= asan/asan_report.cpp SRCS+= asan/asan_rtl.cpp SRCS+= asan/asan_shadow_setup.cpp @@ -31,7 +30,6 @@ SRCS+= asan/asan_stats.cpp SRCS+= asan/asan_suppressions.cpp SRCS+= asan/asan_thread.cpp SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -69,6 +67,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/cfi/Makefile b/lib/libclang_rt/cfi/Makefile index 85db642fdab8..604c3cd9a593 100644 --- a/lib/libclang_rt/cfi/Makefile +++ b/lib/libclang_rt/cfi/Makefile @@ -5,7 +5,6 @@ LIB= clang_rt.cfi-${CRTARCH} SRCS+= cfi/cfi.cpp SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp SRCS+= sanitizer_common/sanitizer_common.cpp @@ -29,6 +28,7 @@ SRCS+= sanitizer_common/sanitizer_procmaps_bsd.cpp SRCS+= sanitizer_common/sanitizer_procmaps_common.cpp SRCS+= sanitizer_common/sanitizer_suppressions.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/cfi_diag/Makefile b/lib/libclang_rt/cfi_diag/Makefile index b2a0b5b7a38f..4f4bb9472bb7 100644 --- a/lib/libclang_rt/cfi_diag/Makefile +++ b/lib/libclang_rt/cfi_diag/Makefile @@ -5,7 +5,6 @@ LIB= clang_rt.cfi_diag-${CRTARCH} SRCS+= cfi/cfi.cpp SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -43,6 +42,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/dd/Makefile b/lib/libclang_rt/dd/Makefile index 80ae9037cfe6..80ed7e497797 100644 --- a/lib/libclang_rt/dd/Makefile +++ b/lib/libclang_rt/dd/Makefile @@ -4,7 +4,6 @@ LIB= clang_rt.dd-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp SRCS+= sanitizer_common/sanitizer_common.cpp @@ -28,6 +27,7 @@ SRCS+= sanitizer_common/sanitizer_procmaps_bsd.cpp SRCS+= sanitizer_common/sanitizer_procmaps_common.cpp SRCS+= sanitizer_common/sanitizer_suppressions.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/msan/Makefile b/lib/libclang_rt/msan/Makefile index 2771ac578bc3..474b08a640a7 100644 --- a/lib/libclang_rt/msan/Makefile +++ b/lib/libclang_rt/msan/Makefile @@ -4,10 +4,10 @@ LIB= clang_rt.msan-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= msan/msan.cpp SRCS+= msan/msan_allocator.cpp SRCS+= msan/msan_chained_origin_depot.cpp +SRCS+= msan/msan_dl.cpp SRCS+= msan/msan_interceptors.cpp SRCS+= msan/msan_linux.cpp SRCS+= msan/msan_poisoning.cpp @@ -50,6 +50,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/safestack/Makefile b/lib/libclang_rt/safestack/Makefile index 75246a1295c6..bbf4a665c37f 100644 --- a/lib/libclang_rt/safestack/Makefile +++ b/lib/libclang_rt/safestack/Makefile @@ -4,7 +4,6 @@ LIB= clang_rt.safestack-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= safestack/safestack.cpp .include diff --git a/lib/libclang_rt/stats/Makefile b/lib/libclang_rt/stats/Makefile index b2ba12ce0b6d..2fd929575123 100644 --- a/lib/libclang_rt/stats/Makefile +++ b/lib/libclang_rt/stats/Makefile @@ -38,6 +38,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/tsan/Makefile b/lib/libclang_rt/tsan/Makefile index d97d6592cfb6..f3f5bd41668c 100644 --- a/lib/libclang_rt/tsan/Makefile +++ b/lib/libclang_rt/tsan/Makefile @@ -4,7 +4,6 @@ LIB= clang_rt.tsan-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -30,7 +29,6 @@ SRCS+= sanitizer_common/sanitizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_printf.cpp SRCS+= sanitizer_common/sanitizer_procmaps_bsd.cpp SRCS+= sanitizer_common/sanitizer_procmaps_common.cpp -SRCS+= sanitizer_common/sanitizer_range.cpp SRCS+= sanitizer_common/sanitizer_stack_store.cpp SRCS+= sanitizer_common/sanitizer_stackdepot.cpp SRCS+= sanitizer_common/sanitizer_stacktrace.cpp @@ -62,7 +60,6 @@ SRCS+= tsan/rtl/tsan_interface_java.cpp SRCS+= tsan/rtl/tsan_md5.cpp SRCS+= tsan/rtl/tsan_mman.cpp SRCS+= tsan/rtl/tsan_mutexset.cpp -SRCS+= tsan/rtl/tsan_new_delete.cpp SRCS+= tsan/rtl/tsan_platform_linux.cpp SRCS+= tsan/rtl/tsan_platform_posix.cpp SRCS+= tsan/rtl/tsan_preinit.cpp diff --git a/lib/libclang_rt/ubsan_standalone/Makefile b/lib/libclang_rt/ubsan_standalone/Makefile index 584a32ca3d45..95d1c0405e2d 100644 --- a/lib/libclang_rt/ubsan_standalone/Makefile +++ b/lib/libclang_rt/ubsan_standalone/Makefile @@ -4,7 +4,6 @@ LIB= clang_rt.ubsan_standalone-${CRTARCH} SRCS+= interception/interception_linux.cpp -SRCS+= interception/interception_type_test.cpp SRCS+= sanitizer_common/sancov_flags.cpp SRCS+= sanitizer_common/sanitizer_allocator.cpp SRCS+= sanitizer_common/sanitizer_allocator_checks.cpp @@ -42,6 +41,7 @@ SRCS+= sanitizer_common/sanitizer_symbolizer_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp SRCS+= sanitizer_common/sanitizer_symbolizer_report.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp diff --git a/lib/libclang_rt/xray/Makefile b/lib/libclang_rt/xray/Makefile index fabaabca9646..91abbb743667 100644 --- a/lib/libclang_rt/xray/Makefile +++ b/lib/libclang_rt/xray/Makefile @@ -28,6 +28,7 @@ SRCS+= sanitizer_common/sanitizer_procmaps_bsd.cpp SRCS+= sanitizer_common/sanitizer_procmaps_common.cpp SRCS+= sanitizer_common/sanitizer_suppressions.cpp SRCS+= sanitizer_common/sanitizer_termination.cpp +SRCS+= sanitizer_common/sanitizer_thread_arg_retval.cpp SRCS+= sanitizer_common/sanitizer_thread_registry.cpp SRCS+= sanitizer_common/sanitizer_tls_get_addr.cpp SRCS+= sanitizer_common/sanitizer_type_traits.cpp From nobody Sun Jan 7 23:08:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtX5fXYz56F6b; Sun, 7 Jan 2024 23:08: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 4T7XtX4ZMnz4QQ2; Sun, 7 Jan 2024 23:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nqhZvMiiw0AJyyUqvGTtY0j5M9k6n4MfntJlsM+4ZxQ=; b=RQ84GWAVKZyBRzbVMDdn+NRuCynSGLFxVtzjdr+gXZufArwMY1Bg/9H9apkK9OsMM/XdVO l9y6/L1ZKlMotW82bEJkfpDCDgjiOBSf70Z29aebgPTjUWXykXabhrIovnULjcS+D5nHbc zEJo0mJevYhztNWhcoUicjdBsVzMFnxEhUiv4es1IxOaCFbK2G9alN8NOvbcWzS2orl1y9 zLPCS/JTe5h0mxuCdtgxVy1OKFtimq/9KrbAUeaYH9hZ24a3lQvztvlmvU5lNv4mYRaDou WOTqNn+t1hQrCaLWb3xyJcaEuq2EYMdlYEMQYObYRnDkbX2Vq3SjLrAfUYYp9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nqhZvMiiw0AJyyUqvGTtY0j5M9k6n4MfntJlsM+4ZxQ=; b=Bq6xhWKXIurAta0qj4PL6+ax4ALB8etJ/Rqea1ZG++DVQfOfVCvM4PPuL2D1TxPFjw5kc4 ZxgibKT0kOSz1m1rR7Lnp8VNHXFV/JRkcLDnHkwCU+rlNlDOmnDhNcQAUJ//MeirXWMfId u6IMHltfNi4H49Q0lKU5xGpwMKtuOfGwvKS7HCtupM23uW0bfVCdAyeyEM2lxA4rxLcGxb AJUvRmj6ge+ZUvTbcTWhrXDpvSkmywolXivS1v2xoMlbqGGfqJKJwi/HUXrx0HTY/jaXhs Kb4sMMnTN0Riz7l2JQUJb/KRbmY433tOc3tm5iKvHtlLx+bk6YBLkYidnEC4ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668916; a=rsa-sha256; cv=none; b=L6KuG3GsXqbziaFsEeEcUzEqy8j3f6Osx6WTkKZlNH7oHzlSCa4QX9UYjftv/NxXCU/p1+ 1OItQzdN2R7R4q+cIKKwzTec+LEVRF2LHTYoyZ7htb3cRWeSSJE9h60193cFWS7IcwQWto VH62TK08Am0Ix/HnBaNTBRdnX/YRP6EUn1zqtO5+XL6zWOdUf2P90cvMakwecWzKUDpky3 iHW7JAybuHMZKvYqm2lt2Upqwv8hxnLfi3sYam/c5bhlRmsIG0PLomI7sgWfgFjnNxnPQ/ chvJO+XAzUXCTCF8n9BNAMSMAE/8/cjkpH4DOXgVSRbqTpt2vxF0syCNjyOO6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtX3dDCzk9w; Sun, 7 Jan 2024 23:08: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 407N8aAu053622; Sun, 7 Jan 2024 23:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8adP053619; Sun, 7 Jan 2024 23:08:36 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:36 GMT Message-Id: <202401072308.407N8adP053619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7a658756b2a5 - stable/13 - llvm: Support: don't block signals around close if it can be avoided List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7a658756b2a5ceaeb1da3ff1a3cb3760f3792ce4 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7a658756b2a5ceaeb1da3ff1a3cb3760f3792ce4 commit 7a658756b2a5ceaeb1da3ff1a3cb3760f3792ce4 Author: Mateusz Guzik AuthorDate: 2023-12-29 18:51:56 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:43 +0000 llvm: Support: don't block signals around close if it can be avoided Signal blocking originally showed up in 51c2afc4b65b2782 ("Support: Don't call close again if we get EINTR"), but it was overzealous -- there are systems where the error is known to be fine. This commit elides signal blocking for said systems (the list is incomplete though). Note close() can still fail for other reasons (like ENOSPC), in which case an error will be returned while the fd slot is cleared up. Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D42984 (cherry picked from commit 3358108a38f0efc7e7a143aeda80c941946fef77) --- .../llvm-project/llvm/lib/Support/Unix/Process.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc b/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc index 2babf07944bf..c8b15cb759df 100644 --- a/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc +++ b/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc @@ -235,6 +235,25 @@ std::error_code Process::FixupStandardFileDescriptors() { return std::error_code(); } +// Close a file descriptor while being mindful of EINTR. +// +// On Unix systems closing a file descriptor usually starts with removing it +// from the fd table (or an equivalent structure). This means any error +// generated past that point will still result in the entry being cleared. +// +// Make sure to not bubble up EINTR as there is nothing to do in that case. +// XXX what about other errors? +#if defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__NetBSD__) || defined(__OpenBSD__) +std::error_code Process::SafelyCloseFileDescriptor(int FD) { + int EC = 0; + if (::close(FD) < 0) { + if (errno != EINTR) + EC = errno; + } + return std::error_code(EC, std::generic_category()); +} +#else std::error_code Process::SafelyCloseFileDescriptor(int FD) { // Create a signal set filled with *all* signals. sigset_t FullSet, SavedSet; @@ -269,6 +288,7 @@ std::error_code Process::SafelyCloseFileDescriptor(int FD) { return std::error_code(ErrnoFromClose, std::generic_category()); return std::error_code(EC, std::generic_category()); } +#endif bool Process::StandardInIsUserInput() { return FileDescriptorIsDisplayed(STDIN_FILENO); From nobody Sun Jan 7 23:08:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtW4Twbz56F4R; Sun, 7 Jan 2024 23:08: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 4T7XtW3Y47z4QPr; Sun, 7 Jan 2024 23:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/hmYIgunNnVvG5eM1wDDHO7THvLBz+uJnndyjKyXkEc=; b=p8kF8kBnkYIt11fSNPdKIW6Ac8uOnSPVhUEQOSMF9R5IfsWFFkbfSS17NfcfPs78sR136V c0E0L0WIb2hvXPnSo1/wbkCkHU584OqQIVAMhO+RxNzG76+wzCAPyU5FiE7eEiXN6X8ZA6 HH5y0VZHc6Zp78qCmZdrOYPRn652Ku6SSBz5MnwKi/6C7YRle7gOD7PiLUPAzTEa2/eW/b vNkmywB3xikWc4MVyO2pml25Yce9quVCEu/GEXaYJDktBgbGmF7jLot77sJpCNJ/PgEbHF gdxbjpUHv0Ho5A9Gqeql+M6bRlEv4xU4DpP1P3t9drSVvWRxweAa0HI6XftTog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/hmYIgunNnVvG5eM1wDDHO7THvLBz+uJnndyjKyXkEc=; b=e3JlNgbNXGMxjlqGZI+S+5oRVQeyBHoaZF5lGVrZUUZO/gF+Z7fg02irxiEYu6BvIOsSLq YFcFnzVF8Y5GMJ5cNKPMRend+4Arc84cWSKkhifLMIaYJ1dIIadV3ns+D4tK7uYpaBs5gs PhHC4TEPgjAxaeN1YCAdmHODo9gchltIWjfoTDsasvrSdZC5iZpQTe6QKjhRU0qOUBytKc korMAIwUC4QJWLoCYrBXwBFPiIiy8kHpySEO34mb5TW1npy8xTKugVcTYYdv2F3M5VSNfq 88U3xMuJkkcuTGKcU2fcU5xE/qI4isLTpa4BVJzbzxiBfcbrfWx+MiSJuBdm4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668915; a=rsa-sha256; cv=none; b=tER6Yml1XC4/wNdXA7dylLm5e4rv1K2gFOyCLmZxhVnGdHv3Acaoj+7skQaYIygHj9LMRZ CDRiNYCcSbTFSh2NuV3zk6Qln+ObUpUbD2v3HiP5QI8uZwNbJnwxyvG7Y+oB5J5bE0Hmch sImpZauoRMKTo9LJ43LveM1GaVrzeTMX5nwwxRQ7IwjdnID1XJEcG2NTBGkSVvCk/ROKBi hcacNuYC0sR15+BYsUhmdULwdWxeCUAgws6dssK/a8uKKpjBFxS394jC3gHbm3y39VknZw SeTSZWPdthyGz5jD5g+A7CAm0Og6MAxcQXrqCsMI4e5/784DuEORcTyhZXFMgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtW2WVCzkNR; Sun, 7 Jan 2024 23:08: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 407N8ZNW053556; Sun, 7 Jan 2024 23:08:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8ZjJ053553; Sun, 7 Jan 2024 23:08:35 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:35 GMT Message-Id: <202401072308.407N8ZjJ053553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 67b5f85a82c7 - stable/13 - Add missing /usr/include/c++/v1/__mdspan/mdspan.h header List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 67b5f85a82c7bf5142b83e00827028bfd2e211a2 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=67b5f85a82c7bf5142b83e00827028bfd2e211a2 commit 67b5f85a82c7bf5142b83e00827028bfd2e211a2 Author: Dimitry Andric AuthorDate: 2023-12-20 19:13:47 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:42 +0000 Add missing /usr/include/c++/v1/__mdspan/mdspan.h header I missed this header while updating the Makefile for libc++ 17. PR: 273753 MFC after: 1 month (cherry picked from commit 87eea35e3f8bc559a5142d613826100b758c08fe) --- lib/libc++/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index fd55d1d93843..14bf0cf95f56 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -865,6 +865,7 @@ MDS_HEADERS+= default_accessor.h MDS_HEADERS+= extents.h MDS_HEADERS+= layout_left.h MDS_HEADERS+= layout_right.h +MDS_HEADERS+= mdspan.h .for hdr in ${MDS_HEADERS} MDS+= ${HDRDIR}/__mdspan/${hdr} .endfor From nobody Sun Jan 7 23:08:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7XtZ0FDDz56FCZ; Sun, 7 Jan 2024 23:08: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 4T7XtY5CRZz4QHj; Sun, 7 Jan 2024 23:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0R8u7h4yssOMaccFKWNYiJI1bgdd1+H9blqy2g/Lsu4=; b=W4zlEe+Hj0E3F7q+PfCXRffRSxiqGsm3vBKdTGdQHOm7ESU0/Obs9wEOJXUsbcPAA5ipYP ZPKbzQ3w297c248T4lk8mAYPbhCyMpQ1XFy+ZF7hW4pNlmMHjlAbgJORmsfGOsci4I+Qyx TKnYaNrciIMBoKwRThnDxXaSlSm+JT8IwmIBHnzYhDPcPnQnNkHb48ruT8MVLLgOm0oFkZ oD96dNR/KIDpEX7ji6LNiIOLW5d8RcWP+QzyPfMl0EJgxjBtrYT15VNz/zRxwCYxITfUB1 advwc6IpGfVqCFWY7Trg1CfzSF7bnMa1VJcqwtGsYnbPgibKRMTY+ZdzbCeysQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0R8u7h4yssOMaccFKWNYiJI1bgdd1+H9blqy2g/Lsu4=; b=DiyKfZbzJ9em0ImbYdXW6hd1Jvffv9f3ezkrlvLB8vkt93PxOu8GUxezd8fmOrMFpAs5hr Ufsonf6M9sKPQHIiLXUZkAa9adORAxbomAhwTbRB/N19JHnwJ0GmRhcU85haAE2vW3HKBS Y6tr04uPwScJsfDs+WLA01QgNNRh+85o/7AELEqfd/PDVZJnWjszhWLz8h4rue5Jg0uTPI YjxuTkrJmNP31pCOnpbIveZ5uNjLDPtBrVKaFt9J8PftXQOursBJp5XdgodtRTgf/YFutz O0UDXf3MZIZjEWYcoGg2hO2xmCfkNMXYCCPIi9Sa7xRLUgEaRMFb0x9ZnAIxqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668917; a=rsa-sha256; cv=none; b=A1tk8VDpygpvibJEFBPoZV5NnyyL3IELeqn8aYJYp2ca+9xPNtRpz5uq7Rbbipw3KUUHFW J3h1pfeFrMLiF1+RbPazjGrRj711yaoNgF7729NzNHFEVzUjnQeAk38We7HqK+NhmpPdws Lyl6SO0hWTjEpLzws1WI0pK0IX5vxOM6iz1Ii9ch+PxUGiQljJmvfb8Ih4AHpx5rvZkjg7 8uDQQwiy60QtBR3uRe+GZZ7VM/nU4w3kNPxcWuTETTQwBEm3fipHqTtjhvtr/lsvOY9NH9 8XNExuWFpwTBiSrYLsMjJf/3GlvqQmcZZoPECGiToaqvtaS42HVOWtFa4Z+kOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7XtY4H9WzkQD; Sun, 7 Jan 2024 23:08: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 407N8bJ7053667; Sun, 7 Jan 2024 23:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N8bvR053664; Sun, 7 Jan 2024 23:08:37 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:37 GMT Message-Id: <202401072308.407N8bvR053664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 45758665781d - stable/13 - Bump __FreeBSD_version for llvm 17.0.6 merge List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 45758665781dd63dfa38bcb646d4f36b0a6a104f Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=45758665781dd63dfa38bcb646d4f36b0a6a104f commit 45758665781dd63dfa38bcb646d4f36b0a6a104f Author: Dimitry Andric AuthorDate: 2023-12-08 17:36:40 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:43 +0000 Bump __FreeBSD_version for llvm 17.0.6 merge PR: 273753 MFC after: 1 month (cherry picked from commit c711af7727824da79d87f375f3d6829feec3799a) --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 6a76245c08a9..f1c0d969b369 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -59,7 +59,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1302509 /* Master, propagated to newvers */ +#define __FreeBSD_version 1302510 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,