From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F31B2C026D; Thu, 21 Aug 2025 21:15:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810957; cv=none; b=R8L4VqN5KjfAgsrEza5AT4tPKdNLwZ7zNNOmR9sAGEP5esJaC1INuzPUbR3vGfLfsLzg4h6IO2wBsdQNQsvPLpcRrPTpazLpDtCyUX9YuUZxfPvdf/ANGFlPygXk/4A0glpVouSi2rYdIL7MXrJoYpHzr1ZolPkr9HWZXUYORsw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810957; c=relaxed/simple; bh=jXdHROA3GuPa9KXSK0WR0hDPRA2+mn8KCSN4tJRdzOs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NzBYmMG0lXbgpCo9kT+/gR2AOjHLPmQqjvdcdVyswrQORbgl/G13eMymU42k8GDCrz6AHeoTdTnoUFmk58AuDVyG3ZOFvZ/xJDyvohMgsu1p7vH6jPlymb29mV2mM1tdn6ZbTpQvVHoz8cav1R/6TgBu1OJdUAxwVKW5q2H0hhg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m2b2KJq3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m2b2KJq3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EED3AC4CEF4; Thu, 21 Aug 2025 21:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810957; bh=jXdHROA3GuPa9KXSK0WR0hDPRA2+mn8KCSN4tJRdzOs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=m2b2KJq33G/Ck2J/lPJWErayxF+05MyJuXE/3ZygxuNEYEAJ2H4sdx4sptPHIV4lw LKsmndsoz4FWMl6qOS+s7Ak96Y43W2YBtlDqQIalWxi6H+VlJ/sHtUvg7hRW1etpsc iWVdLiLLdRB4kEG1xUFdwxxqVKWXeCXqUJAPMbIfeaokH8BXeVf1hgorFJzeexY+Cp POBad6H5YgTIod4hkALsCrfNXIZjGz9peZuvtK6V4Z7PitednHwAocD52jqHZwDvkJ stFjL11Hddf6F/k6fcLpqiBsO0K+Vkb81awm5Jf+0wvUHni/RPz6aXnwUxeQlyCPSW LushuVEyM0rMQ== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:38 -0700 Subject: [PATCH v2 01/12] kbuild: Bump minimum version of LLVM for building the kernel to 15.0.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-1-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Nicolas Schier , Nathan Chancellor , linux-kbuild@vger.kernel.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2465; i=nathan@kernel.org; h=from:subject:message-id; bh=jXdHROA3GuPa9KXSK0WR0hDPRA2+mn8KCSN4tJRdzOs=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLexpnH/110KbpwV15w9+J3td2LTm2a5uPcEyq+oovH epVTJ3qHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAi2d8ZGdpFVqdc9bXS4Tn6 yY3jN7+gfuoGzzDBq8v6Ag9VqRQYsDH8r5os51UW8DTtUOGV9ie88xQPOOz64sdbuJ9R4hPT8q8 1PAA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 s390 and x86 have required LLVM 15 since 30d17fac6aae ("scripts/min-tool-version.sh: raise minimum clang version t= o 15.0.0 for s390") 7861640aac52 ("x86/build: Raise the minimum LLVM version to 15.0.0") respectively but most other architectures allow LLVM 13.0.1 or newer. In accordance with the recent minimum supported version of GCC bump that happened in 118c40b7b503 ("kbuild: require gcc-8 and binutils-2.30") do the same for LLVM to 15.0.0. Of the supported releases of Arch Linux, Debian, Fedora, and OpenSUSE surveyed in evaluating this bump, this only leaves behind Debian Bookworm (14.0.6) and Ubuntu Jammy (14.0.0). Debian Trixie has 19.1.7 and Ubuntu Noble has 18.1.3 (so there are viable upgrade paths) or users can use apt.llvm.org, which provides even newer packages for those distributions. Reviewed-by: Kees Cook Acked-by: Arnd Bergmann Acked-by: Nicolas Schier Signed-off-by: Nathan Chancellor --- Cc: linux-kbuild@vger.kernel.org --- Documentation/process/changes.rst | 2 +- scripts/min-tool-version.sh | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Documentation/process/changes.rst b/Documentation/process/chan= ges.rst index bccfa19b45df..b38622b0d525 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -30,7 +30,7 @@ you probably needn't concern yourself with pcmciautils. Program Minimal version Command to check the version =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D GNU C 8.1 gcc --version -Clang/LLVM (optional) 13.0.1 clang --version +Clang/LLVM (optional) 15.0.0 clang --version Rust (optional) 1.78.0 rustc --version bindgen (optional) 0.65.1 bindgen --version GNU make 4.0 make --version diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh index 0d223b4a9445..99b5575c1ef7 100755 --- a/scripts/min-tool-version.sh +++ b/scripts/min-tool-version.sh @@ -24,12 +24,10 @@ gcc) fi ;; llvm) - if [ "$SRCARCH" =3D s390 -o "$SRCARCH" =3D x86 ]; then - echo 15.0.0 - elif [ "$SRCARCH" =3D loongarch ]; then + if [ "$SRCARCH" =3D loongarch ]; then echo 18.0.0 else - echo 13.0.1 + echo 15.0.0 fi ;; rustc) --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C74C28727C; Thu, 21 Aug 2025 21:15:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810960; cv=none; b=OrU9jtgH5bCFln34wbmQUU5eWXdcxXVnPFjYV7JNLwToi/7DQBIJXwoqBk/74sbp13KbWOFAptWxR8odMY4DFE91dTGB0Uc7/dj0T6fXqEL8qyLLV3eQQQFYZ/BGXDG9od39EQRIPUjMFhXOCavSeKztceKFHRVrbs6dOCzLGaw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810960; c=relaxed/simple; bh=4LtsjHz9BcVqdxPkFUx7SaoCYcFLL8+ez7eFd3R308E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YwRTrstxbqaAxfQqrSEvBrR78ClMr/BOkftXXeeC4l+u4pO9yeOXSqgs4m4PzaO50JcnfUAa3vcYv/4IEcJQQhDB/q95HYpKLm8NZ9uxv6EKVmSMilBG1Gq1H6ELQUoXw4/Ej8W0jChYf9K5EvmDAJkcv9qudoll6RdEnieVnsk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kYpJcCs8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kYpJcCs8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B17A5C4CEEB; Thu, 21 Aug 2025 21:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810959; bh=4LtsjHz9BcVqdxPkFUx7SaoCYcFLL8+ez7eFd3R308E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kYpJcCs84Ml5F/mOSa5JNH7aoT3ZCEwJwZc/Ft+KJ6l/cgxUrSPBWmHacFdassTrT PYS55nFl49ygm11sjVaLE87javh99kop8ID2Zpw61yKCn5766hIatJRgdmMPYxrso4 OTgkdB2R7zq2M9vECMMgS51TeE4rKClLvVzV0dPYg6eObHf7Mvb1wT8+EZF5a0qHE+ Wqn3tH0U/Mj38R5vcmdp5Km1gy6RqLWT3unBfN9YCprM1vdAcOQMLPGADx+4u2beUX 5osQGNRSv0XKh3s4UPIPDXRjtEjTkCT3uxC+TBEVFV2Rq6BT0P30OTwMAZiSNm7lNj 9ixGcBru3AhVg== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:39 -0700 Subject: [PATCH v2 02/12] arch/Kconfig: Drop always true condition from RANDOMIZE_KSTACK_OFFSET Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-2-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor , linux-hardening@vger.kernel.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=933; i=nathan@kernel.org; h=from:subject:message-id; bh=4LtsjHz9BcVqdxPkFUx7SaoCYcFLL8+ez7eFd3R308E=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe5ruzi1g+azLzX49b6aHFffSpQ+dmi7zKr9UsPe3y 3gxWfBbRykLgxgXg6yYIkv1Y9XjhoZzzjLeODUJZg4rE8gQBi5OAZhIrgzDH54G+8fLrug+fCYV zRGqkTt9en08a/tLcWcR811Hn7PNn8TwT43z6Dn37X+vOi15w3bFyPGaruYjoYsJGdWzX3K7uNR /5QcA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, the second depends line in RANDOMIZE_KSTACK_OFFSET is always true, so it can be removed. Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor --- Cc: linux-hardening@vger.kernel.org --- arch/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index d1b4ffd6e085..4935c4c26f09 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1475,7 +1475,6 @@ config RANDOMIZE_KSTACK_OFFSET bool "Support for randomizing kernel stack offset on syscall entry" if EX= PERT default y depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET - depends on INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION >=3D 140000 help The kernel stack offset can be randomized (after pt_regs) by roughly 5 bits of entropy, frustrating memory corruption --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41F8B2D7DCF; Thu, 21 Aug 2025 21:16:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810963; cv=none; b=ujC/1SASnpUTvcwyFJdx/VF1sdjieCr87uIdJ19BIiRgVC7GHi4Ay0Oe4jWiWBX6om1iHUVTTN6tVg/cpeOGKVjk8TvmxfZQ8GDSfXBZkyraQwuZpY1OdXBmeZTNRrvBErLTNDOpdNB15H74JLzwIUw7LPpvr2d4BriapHuZD4A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810963; c=relaxed/simple; bh=7CiDzOmiuSVjS8lOEl7Pi4ckMf1acrF1U6d8qioo+Vg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hseCooTyWklZMkbiufMJ8nsL6Ibc59n7fKmbKwxmgRl+YqP/0kX0MBkHcCG18W2wNKnbAtxgBHPtAb8dC4/Y/51aLKpGuNQ7VHi6vPbFjuMa2c6zgT1heA3km4VfDDYKGoO23RmBXaPpadC8KitDK2XxXQ7327ulpTOTBA5KRP8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HXBiLczj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HXBiLczj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47012C4AF0D; Thu, 21 Aug 2025 21:16:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810962; bh=7CiDzOmiuSVjS8lOEl7Pi4ckMf1acrF1U6d8qioo+Vg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=HXBiLczjaeUeNSpkYM98BJ5W2kwcQy/QP2xsz/ayEUXJNaIDObI/8mLoaAbd7vyKQ qNDWMFZUQ9/Xd1WfYbKBAuWfFJhymBx/63CqFwDTcBng3VrzfUjEMSPrYanx3tSEI1 YgGYsRhSW8DxDCBrIDmS79dC+f907Gojl83qLX/2CzIuXplbE5dJc1PORbBKhThJVQ PNtPjf87diIINFAG8vTcmZ7Xt1gvIrDg1H3IpHiYrubdjIaO6//EaGBzH9yGf/yEQ3 /7MJmbUMbjDAKW7MkKAA8neDCdmQtk35c1bwnpFYBz4IrUzUdFcHN4kj5XeexBgr8y phmv+PUlADBgA== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:40 -0700 Subject: [PATCH v2 03/12] ARM: Clean up definition of ARM_HAS_GROUP_RELOCS Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-3-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor , Russell King , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1536; i=nathan@kernel.org; h=from:subject:message-id; bh=7CiDzOmiuSVjS8lOEl7Pi4ckMf1acrF1U6d8qioo+Vg=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe5oUZicnzd4+QThQ+9wcffWTvR1uBbqai87HRis+L SrYKWLTUcrCIMbFICumyFL9WPW4oeGcs4w3Tk2CmcPKBDKEgYtTACaSq8jwP7hK74Jc5rw9hwzP L8j9vNH4zpY9evr3vyvceW+9SyOy6yTDX9mWbr7obQ/nrth3JmtBxM/oGdPXXT/TNCs7rjTJQ19 cgw8A X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, the first depends line of ARM_HAS_GROUP_RELOCS is always true, so it can be safely removed. Combine the !COMPILE_TEST dependency into the 'def_bool' line and update the comment as well. Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Acked-by: Arnd Bergmann --- Cc: Russell King Cc: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/Kconfig | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b1f3df39ed40..faf83015b961 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -166,15 +166,12 @@ config ARM . =20 config ARM_HAS_GROUP_RELOCS - def_bool y - depends on !LD_IS_LLD || LLD_VERSION >=3D 140000 - depends on !COMPILE_TEST + def_bool !COMPILE_TEST help Whether or not to use R_ARM_ALU_PC_Gn or R_ARM_LDR_PC_Gn group - relocations, which have been around for a long time, but were not - supported in LLD until version 14. The combined range is -/+ 256 MiB, - which is usually sufficient, but not for allyesconfig, so we disable - this feature when doing compile testing. + relocations. The combined range is -/+ 256 MiB, which is usually + sufficient, but not for allyesconfig, so we disable this feature + when doing compile testing. =20 config ARM_DMA_USE_IOMMU bool --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDFC72D7DE8; Thu, 21 Aug 2025 21:16:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810966; cv=none; b=X2lna2+sZgePGpXFSMbRV0jYIZtsZlKaqUv8fposG46K0wqpyUj5vyBU+MfG8lweR5wDQTKJrprfptzmg5v4ZoOHtgijS5f5M2QFEWO5W9nDDEj4bjAeI/BwF7LO4BVZBEIome5slr9PPJm9EHu3P2fRTnu8s/WhZvv1uGCGfL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810966; c=relaxed/simple; bh=k8t2LMzkHbTix/DiHIeNz0Pk9z8ZvuqlTYVV5CKGLxo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JA15D2ly8WHz0JPECKwT7aO54wvjrXKx7uKMdr+tsi7YaB+mcqM+hWF47/zpGGRRkLSnzNkHi+fZ8mLmKSrZS0jG10qJcgU6fTyTiBCsdZhwt/9O0UJWAPuvegxQtxg+q/mvTER2Ejy/jAQN8GTt4cnTu6rT9rMvkHc/8a7FAkw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GD3v7Wtl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GD3v7Wtl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BCDAC113D0; Thu, 21 Aug 2025 21:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810965; bh=k8t2LMzkHbTix/DiHIeNz0Pk9z8ZvuqlTYVV5CKGLxo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GD3v7WtlG5xYR/Z3EK1MnOl2iyyRM1rMSx2wm9Ua0PX2kRPwtG8LJifnqf+9Hwd7B 32ZCrQsemML2UayOB6DeS4YK8pe0XyMb89Te++sSe6Vog6m9tZjGoLxKAqo0E2CJFk xYVKu7iBHzizPxx8io2A2sYbqBUjuVQiLm0izajDr7WaMPF2dS9VsvxxuggrICGoJj bn8bX4seFrjEXTtlxAMNjOpOzDxq6OdxNQH+KI3j8C5uO6k/cVq6JOgi5iQer/XSrP F2RRD6H1JQxwgBTl4R+pJI5IMnIbqOAsg0SQeUzDAt9cVnUDsdoJXxcIIvQtiyWbRE n5dcfhppWLwzw== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:41 -0700 Subject: [PATCH v2 04/12] arm64: Remove tautological LLVM Kconfig conditions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-4-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Will Deacon , Nathan Chancellor , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1412; i=nathan@kernel.org; h=from:subject:message-id; bh=k8t2LMzkHbTix/DiHIeNz0Pk9z8ZvuqlTYVV5CKGLxo=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe5rCEk5cW9wg6jDh4UvntsNHek/MaTbebxi/2m+5X 3ltuUFoRykLgxgXg6yYIkv1Y9XjhoZzzjLeODUJZg4rE8gQBi5OAZjIE3dGhssZXDFm/YrseQVT Lpeqvv+hva78ke18lYRjTYU7ZaeWfWT4HxA96azS8XR/v3krUs34Wr7f+vrZO/2EVLPfhzU9dfY q/AA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, two sets of always true conditions can be safely removed in the arm64 Kconfig file. Acked-by: Will Deacon Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor --- Cc: linux-arm-kernel@lists.infradead.org --- arch/arm64/Kconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index e9bbfacc35a6..41c05562e9af 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1492,8 +1492,6 @@ choice =20 config CPU_BIG_ENDIAN bool "Build big-endian kernel" - # https://github.com/llvm/llvm-project/commit/1379b150991f70a5782e9a143c2= ba5308da1161c - depends on AS_IS_GNU || AS_VERSION >=3D 150000 help Say Y if you plan on running a kernel with a big-endian userspace. =20 @@ -2363,8 +2361,7 @@ config STACKPROTECTOR_PER_TASK =20 config UNWIND_PATCH_PAC_INTO_SCS bool "Enable shadow call stack dynamically using code patching" - # needs Clang with https://github.com/llvm/llvm-project/commit/de07cde67b= 5d205d58690be012106022aea6d2b3 incorporated - depends on CC_IS_CLANG && CLANG_VERSION >=3D 150000 + depends on CC_IS_CLANG depends on ARM64_PTR_AUTH_KERNEL && CC_HAS_BRANCH_PROT_PAC_RET depends on SHADOW_CALL_STACK select UNWIND_TABLES --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 630A42D837C; Thu, 21 Aug 2025 21:16:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810968; cv=none; b=s6V2DiS7PClzexYzYU71oK6ICeZDIlZAzdDVj520LOhli4VgKx/I760z0yZiIfP0QuNb9nW/owJPAORNRmC/fWdw0tO9egMaj0yg32UHKncL0xhu7ljyW2BHldxnTf88rmvJ9k/KmcHPuJ4P+kY+PTccQvSHbL/GdRJxrDLw610= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810968; c=relaxed/simple; bh=66yWNnzAMgeGutikhZxcg+vm/xcsjv8NO+92CQLqj+k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L80UoOX71IL0Ony/WMsIRjXpwuZC8GwMQsPgPTorTIK47qE7KGrGT9ycFSaMmby6cPSnLXbZ2gMYCVCVU0EIebJ1i4ZcYEnyR6poyaDO/7dmuyOGCz20wM7UOjArVeri+ttgyH9FARp1cynDJJOV0Ux5FuKeOTd+q1pfRjOjWH8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cKYszfa7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cKYszfa7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1C79C4CEF4; Thu, 21 Aug 2025 21:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810968; bh=66yWNnzAMgeGutikhZxcg+vm/xcsjv8NO+92CQLqj+k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cKYszfa7HOCM4dC8RjdGv7hpuvVFQ01VBOFV/Sbb+oBhSySTpc1tbuIWodOeDz4WT aJiMf7RBqTe/L/Y/TCcod78yhuJv2HZE16iiq7hsKIQBxENoYnyZJqAWFYA8UBrt4R Wjx5Q6YMzV5Tvzev7TzE/ToEsGozjnQcisFWmiZ6Zu+nvu+2ifN4Ka7qibNXDHuUoy wxRLCAnikKFGiSrE+bzshh1ElDZHmJChwGDZi726IhQtvEzjmjuABsrof0dTGf7GLA /7GwzeYV3WnivK1w32xmDRRZ6wNUhb9UB0qxYBiCewsT2Rs+ygtDK3x9cEfIhUj6uM 0H/8V7/zF1ITg== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:42 -0700 Subject: [PATCH v2 05/12] mips: Unconditionally select ARCH_HAS_CURRENT_STACK_POINTER Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-5-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Thomas Bogendoerfer , Nathan Chancellor , linux-mips@vger.kernel.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1032; i=nathan@kernel.org; h=from:subject:message-id; bh=66yWNnzAMgeGutikhZxcg+vm/xcsjv8NO+92CQLqj+k=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe5r2/+34JPGAh3GeQW72/mPFD5IOdzprXGOIe/t3S mXh4QP3O0pZGMS4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBEdJ4zMtxZvTrXS4P9fMrr hdvD+T+vUGdP1nVLPnXyzQxL7o3X4y8z/OGrq7wU/ZLtzGkGA8Ebtidso/RTP69neZHA+4P54b/ 7jxkA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, the selection of ARCH_HAS_CURRENT_STACK_POINTER can be made unconditional since it is always true. Acked-by: Thomas Bogendoerfer Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor --- Cc: linux-mips@vger.kernel.org --- arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index caf508f6e9ec..bc7473505f4a 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -6,7 +6,7 @@ config MIPS select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_HAS_CPU_CACHE_ALIASING select ARCH_HAS_CPU_FINALIZE_INIT - select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= =3D 140000 + select ARCH_HAS_CURRENT_STACK_POINTER select ARCH_HAS_DEBUG_VIRTUAL if !64BIT select ARCH_HAS_DMA_OPS if MACH_JAZZ select ARCH_HAS_FORTIFY_SOURCE --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E4E12D837C; Thu, 21 Aug 2025 21:16:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810972; cv=none; b=TBfgo5iGKUgRMGoU7x5Riyuwec0DWU4byXULExdSRpjxouVlUJFX2UjguKuUin38NFicKF9lfrZu1DZHe8euOu6TBM9ZBztpWaxOiLJDjukQ8Fmc+DSw/4ZoTg0w8eE70nbt/CDoRzIv375a6B1uB4SWTDgV1hwj6hY5qhYRz2I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810972; c=relaxed/simple; bh=VGQQUffBKqpf2H5DeF+t1nkRASxbDSX8NAduqgnqPbk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GsG4qENjOjNsnHTFyQ1K2VeSjsAvkuKoRZDZoVUIm9EQeaNu/LNBCcF5CyCzxH3NBSJIlieaYF4/crl2d3SJFU8R2q62zSnFRVIPY8XKOg1zd5IIhhM81rleJ6o4PMKpshKUzzODKAtTkmotoBPLpZrQ1/TqtEE4kShUbaSkHkI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Dz2OPjIC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Dz2OPjIC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4B20C4AF09; Thu, 21 Aug 2025 21:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810971; bh=VGQQUffBKqpf2H5DeF+t1nkRASxbDSX8NAduqgnqPbk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Dz2OPjICxh9rvlzA1oWyJydNTsN/KJBpcD7R933teboo6pz8NFaVzKPhAChC6iq14 FwZnGeeGI/9IqZwDuekx0JxcfFlgk2m73gb3cbvgr/nkAL+/Mg1Y8rdY/PTe+N3Uxo RFVAWKLCZ5u7zg7/ms8djejWF8uS3pooOaJQWCKbb15NP9zuGmRF9yE0uNm4OEjijK ChWjQMcqGP1FVnGCzYp7jNth24enrwHFLvlWNebGOlivrf8w/vR+Rylnm66O9m5Uiy 4XGUGj1CcmaoPPaukJSj7GFSkaJ2KBpDKlWqFmacbPF5eOUZKyupGpI6tHeo6pBwS5 hQqW0+uVafABA== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:43 -0700 Subject: [PATCH v2 06/12] powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-6-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1428; i=nathan@kernel.org; h=from:subject:message-id; bh=VGQQUffBKqpf2H5DeF+t1nkRASxbDSX8NAduqgnqPbk=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe5qsbnOnbElI2r/nStGKR7NVeD9fqqrOF4jTmqh6p HPr5fYHHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAie3IZGRpyXQzenGP5fUO5 OWj37vqDApfD321/ON+1kq+JScZ2uiwjw8b/k05Y3dU1+vnpp/ZK+3d165qdtCziv4Vo3fZM1Zj nxggA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, the zero initializations of val and suffix added by commit 0d76914a4c99 ("powerpc/inst: Optimise copy_inst_from_kernel_nofault()") to avoid a bogus case of -Wuninitialized can be dropped because the preprocessor condition is always false. Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Reviewed-by: Christophe Leroy --- Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/inst.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/powerpc/include/asm/inst.h b/arch/powerpc/include/asm/ins= t.h index 684d3f453282..ffa82167c860 100644 --- a/arch/powerpc/include/asm/inst.h +++ b/arch/powerpc/include/asm/inst.h @@ -143,10 +143,6 @@ static inline int __copy_inst_from_kernel_nofault(ppc_= inst_t *inst, u32 *src) { unsigned int val, suffix; =20 -/* See https://github.com/ClangBuiltLinux/linux/issues/1521 */ -#if defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 140000 - val =3D suffix =3D 0; -#endif __get_kernel_nofault(&val, src, u32, Efault); if (IS_ENABLED(CONFIG_PPC64) && get_op(val) =3D=3D OP_PREFIX) { __get_kernel_nofault(&suffix, src + 1, u32, Efault); --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0113D2E92C6; Thu, 21 Aug 2025 21:16:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810975; cv=none; b=b/sci+nIPoJxbtXSYiw4IHSvhIDXpL1snkryNCsnx4svF2g2h4YI9BakiowEr3DZ3GPLie7TpQNdE6VftSSDQz+YFjcEkD63DYU+tyBU+1yg1EHyI7flwcRDMo5a82Ha132e0Qj8pGXMvO3LwnZC62E9wEByF3burTClmPbW6t8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810975; c=relaxed/simple; bh=VYJ/3Og460FvKVmmzAjxmjg94FV8xklZJeBiFr5mKfo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kp1ZPtn5WPCwvG0Xx3CEZDksrTVOltzWzHriW2eBSZ1n6ieVGjjl+iviMCI+aZWF1R3plJa9zBhFPU+autxfXhHokjCb+4c+gX+vJJBjNvAQVCAaLpZZgS1pDGCa5UUprOsHKR4sg0B1+cUVqPMjs7g0DQciNz+QzvrLV2/VAbY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YEcECcyY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YEcECcyY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F479C4CEEB; Thu, 21 Aug 2025 21:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810974; bh=VYJ/3Og460FvKVmmzAjxmjg94FV8xklZJeBiFr5mKfo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YEcECcyYrBMrAwn6owMjROwcvn9APF9mq3vwMadEfmJU2ImyjMIUaRC9P7kvZhRss aVHetJxVgwampwYPBB4FadtEnyBoG/bo1yYDOyQonjDpKMRDkIiz6fRzQzKNvJ65Ft a+4kXZHE4FSoC0eOP+SdQmJhV+B6iGDSqbM/+qMqG3HipQalah7zqoL+M6rG4GJAVv axkmZXBMpzLCbsR0Vlz3YK8hGXiPrnWCrh8mf1oOz3LwDZnvLNBWDSWleau14QT0PN IhrYXIG8z2Ghko5jyzi4MSTT3JeHiX3FXWFEliLCsFEu4iBKx2Qnrw4eqYMqIxWKxz pgxF3mEu1QR6A== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:44 -0700 Subject: [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-7-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor , Palmer Dabbelt , Alexandre Ghiti , linux-riscv@lists.infradead.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1468; i=nathan@kernel.org; h=from:subject:message-id; bh=VYJ/3Og460FvKVmmzAjxmjg94FV8xklZJeBiFr5mKfo=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe5r1vLOvWH+xsD/gzbyJ2c4hufDL21gxoWk/5C/Je ZgEnwvsKGVhEONikBVTZKl+rHrc0HDOWcYbpybBzGFlAhnCwMUpABNZ/pnhf9aDa9W5X7cVbGQP nTt1j9XCB3rMC9OXPJH+/mFb3ay1cTwM/zRf34m8/Mjsdmd2SBHXLfPrMZeKupg2dz7012Wca/d iIxsA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, there is no need to check the LLD version before selecting ARCH_SUPPORTS_LTO_CLANG{,_THIN} because it will always be true. Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Acked-by: Alexandre Ghiti Reviewed-by: Conor Dooley --- Cc: Palmer Dabbelt Cc: Alexandre Ghiti Cc: linux-riscv@lists.infradead.org Small note, this will conflict with https://lore.kernel.org/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac987= 1ecf@kernel.org/ but I think it is simple enough to deal with. --- arch/riscv/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index a4b233a0659e..1d53bf02d0fa 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -64,9 +64,8 @@ config RISCV select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE select ARCH_SUPPORTS_HUGETLBFS if MMU - # LLD >=3D 14: https://github.com/llvm/llvm-project/issues/50505 - select ARCH_SUPPORTS_LTO_CLANG if LLD_VERSION >=3D 140000 - select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >=3D 140000 + select ARCH_SUPPORTS_LTO_CLANG + select ARCH_SUPPORTS_LTO_CLANG_THIN select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS if 64BIT && MMU select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU select ARCH_SUPPORTS_PER_VMA_LOCK if MMU --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBA022877E0; Thu, 21 Aug 2025 21:16:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810978; cv=none; b=ZHizUsMKHEOkwO4vYNXtOxa5GLwxeHXowQoWFZgBgivEWBjFtuAsA3OCNT47YMWe2vkXDyZGK6DBzWR7kpwJ1k/AfNDtR8siFwAF+1EtZkbtKhNRtnfsZZPBJoLpNVd3e8KxFMC4OPQSqyoTRn3ybPKR5GoaF1dgHXOh81t2m6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810978; c=relaxed/simple; bh=7h8ti9XOt72qE84+ULVgnYhwitUoyvrNFp92nIqSGEA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I7As2xl9nVMpL937CmN5sIlKRQj5blJBM7qNwihgFyljMnox0fa2M1UJd+Th1NvCUFpA8rNBjHgyCXgFw8ZHDYhwhyv/ocGBLHEGbPbHqcmww/6OgeGKkpLiviMbjAu1i1e2Ox5Er3DGruTQFnpHVugpubUv90jctqDOhZOSRk4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vMoIeyFy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vMoIeyFy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 008D6C4CEF4; Thu, 21 Aug 2025 21:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810977; bh=7h8ti9XOt72qE84+ULVgnYhwitUoyvrNFp92nIqSGEA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=vMoIeyFy572B7PTFUhy5H1niwxvd3fwampoMwUF95XRQbNvpYxsqJ4nG3NThTrEDx +BaxNY1b+Qi9FcYnTexNa0ZDcmY2XwO6ATU839IiqBK8jTdHWeSOSusvi/4duRHMvC KEigXlH+5IBOfA1uwyQoL/fy/EYFh83mL0T6WlWp9WRPKE0VlSvhocHbYbckzw4lDs pZ5OYkfterg+rHTumzTu6y8VDNlAG3CjlKdjsXuzBl7xyXgBgRLZQLDVSHTZ5DIin/ XaILz7QpUpC5sSVmkjVR7HS8xMBsYmYchJJWd/NCc4O9qjSfY+H30f2dzquaB/bh79 oxmL3u2cgFWiA== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:45 -0700 Subject: [PATCH v2 08/12] riscv: Unconditionally use linker relaxation Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-8-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor , Palmer Dabbelt , Alexandre Ghiti , linux-riscv@lists.infradead.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2269; i=nathan@kernel.org; h=from:subject:message-id; bh=7h8ti9XOt72qE84+ULVgnYhwitUoyvrNFp92nIqSGEA=; b=kA0DAAoWHWsmkXHAGpYByyZiAGinjIOhQOiqLNj+4gr9X47U1dRdW0L4ONYNUiHHiMK3aXUZK Ih1BAAWCgAdFiEEe+MlxzExnM0B2MqSHWsmkXHAGpYFAminjIMACgkQHWsmkXHAGpYVZAD/dRSq mvKqOGqvjn5OGz9gbrBLdK1f9FTL23YwJ8grFDUBAKe8W5R3ih+p+sgomqLX5Ndj0FbMGv/BrHQ 6tEoLjKYN X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, CONFIG_RISCV_USE_LINKER_RELAXATION will always be enabled, so it can be removed. Signed-off-by: Nathan Chancellor Acked-by: Alexandre Ghiti --- Cc: Palmer Dabbelt Cc: Alexandre Ghiti Cc: linux-riscv@lists.infradead.org --- arch/riscv/Kconfig | 6 ------ arch/riscv/Makefile | 9 +-------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 1d53bf02d0fa..d482236e93f4 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -246,15 +246,9 @@ config HAVE_SHADOW_CALL_STACK # https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a484e843e6e= eb51f0cb7b8819e50da6d2444d769 depends on $(ld-option,--no-relax-gp) =20 -config RISCV_USE_LINKER_RELAXATION - def_bool y - # https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e29= 23e1d680f6985 - depends on !LD_IS_LLD || LLD_VERSION >=3D 150000 - # https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21d= d18e5b0918f6 config ARCH_HAS_BROKEN_DWARF5 def_bool y - depends on RISCV_USE_LINKER_RELAXATION # https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b= 745607ca4de6a depends on AS_IS_LLVM && AS_VERSION < 180000 # https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22= e5471cc5e4a77 diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index df57654a615e..ecf2fcce2d92 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -46,17 +46,10 @@ else KBUILD_LDFLAGS +=3D -melf32lriscv endif =20 -ifndef CONFIG_RISCV_USE_LINKER_RELAXATION - KBUILD_CFLAGS +=3D -mno-relax - KBUILD_AFLAGS +=3D -mno-relax -ifndef CONFIG_AS_IS_LLVM - KBUILD_CFLAGS +=3D -Wa,-mno-relax - KBUILD_AFLAGS +=3D -Wa,-mno-relax -endif # LLVM has an issue with target-features and LTO: https://github.com/llvm/= llvm-project/issues/59350 # Ensure it is aware of linker relaxation with LTO, otherwise relocations = may # be incorrect: https://github.com/llvm/llvm-project/issues/65090 -else ifeq ($(CONFIG_LTO_CLANG),y) +ifeq ($(CONFIG_LTO_CLANG),y) KBUILD_LDFLAGS +=3D -mllvm -mattr=3D+c -mllvm -mattr=3D+relax endif =20 --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82A842EA16A; Thu, 21 Aug 2025 21:16:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810980; cv=none; b=koQqbDSnAYL+/sxlARmbV61AZnbhh9nDx+xCPTkf175ok08M01QCsZ3UGENILADZsfvG0rOH9jI9ujAhRW/OA7NgzIjMY9XklcC8+ATY7j0UaMEsKbii6SICx8DUT4qDZAYiEUl84CBc8wJoMaWiuFGXj+iGQGnFbkQLqA4YXZo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810980; c=relaxed/simple; bh=biYkmUo8TAJXy73mLcX/CFarTLOLNQB3EGVWaVOUDFw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rMKUm8nfaP1HxaLxW+GBiEZpdv2/zuan5zlPZvPHzXNYaufoEF2BDL9jAtamD/cxm8TwXmAhy7D05itpd+lWm3IrwXQN1W/1KwNEoYHb4fVwsh/CiS5tMReJnRTCWcK8SSg0E8jkhD/HZemN6ZBvuWO/44PCa15tWUZK2qNDtow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=j3k96ish; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="j3k96ish" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5031C4CEEB; Thu, 21 Aug 2025 21:16:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810980; bh=biYkmUo8TAJXy73mLcX/CFarTLOLNQB3EGVWaVOUDFw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=j3k96ishoifW0pQeOjVUoRbJPvZXyjS6WKwJSVBdIvp0TRdTESk5Zs8PswhmICClY 5EhhWALMJwWwKNcJcpgA3gdSr/69A+CU1UP80MPQkFrR0ZrqxqSgxJLplA3jLxsh7j VDXCtxRpctonDqejZQMi7JVKG8xoB2TV05rjDM6uSQW56hnEUB6qrfyzv2p5anZA1H UnpytY3hZCs6bG11fcNx8CYKIQwh+y1Sq1r8pKUsiCb+BIDvyq94Hz9Iz5dv6Zu6Oc iJpvWBUDlb8frca/Pzt09TLis1okQ1lP8OSsN6lXZBooOAww9icI5V0wyO8g4kX9Bi SYPZnNDXKvlnA== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:46 -0700 Subject: [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-9-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor , Palmer Dabbelt , Alexandre Ghiti , linux-riscv@lists.infradead.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2502; i=nathan@kernel.org; h=from:subject:message-id; bh=biYkmUo8TAJXy73mLcX/CFarTLOLNQB3EGVWaVOUDFw=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe5pfLeLL/fn86IuTL6Z8f/5Voja6RWfCFCelrJ9ZZ Qmb5smKdJSyMIhxMciKKbJUP1Y9bmg45yzjjVOTYOawMoEMYeDiFICJVJ9jZNjeMa3txeTJZgZa M9J4OfXun5xwfKfWyR3Pvoi2S22NS4plZDgrOPNHRpeL08IkyYbutBzzactYpb4Khm2xfGQdv9u QmxEA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, several ld.lld version checks become tautological, as they are always true. Replace them with a simple CONFIG_LD_IS_LLD check. Signed-off-by: Nathan Chancellor Acked-by: Alexandre Ghiti Reviewed-by: Conor Dooley --- Cc: Palmer Dabbelt Cc: Alexandre Ghiti Cc: linux-riscv@lists.infradead.org --- arch/riscv/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index d482236e93f4..850ba4b4b534 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -620,7 +620,7 @@ config TOOLCHAIN_HAS_V default y depends on !64BIT || $(cc-option,-mabi=3Dlp64 -march=3Drv64imv) depends on !32BIT || $(cc-option,-mabi=3Dilp32 -march=3Drv32imv) - depends on LLD_VERSION >=3D 140000 || LD_VERSION >=3D 23800 + depends on LD_IS_LLD || LD_VERSION >=3D 23800 depends on AS_HAS_OPTION_ARCH =20 config RISCV_ISA_V @@ -721,7 +721,7 @@ config TOOLCHAIN_HAS_ZBB default y depends on !64BIT || $(cc-option,-mabi=3Dlp64 -march=3Drv64ima_zbb) depends on !32BIT || $(cc-option,-mabi=3Dilp32 -march=3Drv32ima_zbb) - depends on LLD_VERSION >=3D 150000 || LD_VERSION >=3D 23900 + depends on LD_IS_LLD || LD_VERSION >=3D 23900 depends on AS_HAS_OPTION_ARCH =20 # This symbol indicates that the toolchain supports all v1.0 vector crypto @@ -736,7 +736,7 @@ config TOOLCHAIN_HAS_ZBA default y depends on !64BIT || $(cc-option,-mabi=3Dlp64 -march=3Drv64ima_zba) depends on !32BIT || $(cc-option,-mabi=3Dilp32 -march=3Drv32ima_zba) - depends on LLD_VERSION >=3D 150000 || LD_VERSION >=3D 23900 + depends on LD_IS_LLD || LD_VERSION >=3D 23900 depends on AS_HAS_OPTION_ARCH =20 config RISCV_ISA_ZBA @@ -771,7 +771,7 @@ config TOOLCHAIN_HAS_ZBC default y depends on !64BIT || $(cc-option,-mabi=3Dlp64 -march=3Drv64ima_zbc) depends on !32BIT || $(cc-option,-mabi=3Dilp32 -march=3Drv32ima_zbc) - depends on LLD_VERSION >=3D 150000 || LD_VERSION >=3D 23900 + depends on LD_IS_LLD || LD_VERSION >=3D 23900 depends on AS_HAS_OPTION_ARCH =20 config RISCV_ISA_ZBC @@ -794,7 +794,7 @@ config TOOLCHAIN_HAS_ZBKB default y depends on !64BIT || $(cc-option,-mabi=3Dlp64 -march=3Drv64ima_zbkb) depends on !32BIT || $(cc-option,-mabi=3Dilp32 -march=3Drv32ima_zbkb) - depends on LLD_VERSION >=3D 150000 || LD_VERSION >=3D 23900 + depends on LD_IS_LLD || LD_VERSION >=3D 23900 depends on AS_HAS_OPTION_ARCH =20 config RISCV_ISA_ZBKB --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 191D52EA731; Thu, 21 Aug 2025 21:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810983; cv=none; b=ux/zTtl2lK+V6kzql03cDAZwoGzqbyD14tL/Zjlr7Pzpb1VTUHPUgst01man4WmnZMbuK5FtouY2xjLSr3SGBGTod38e4G0WpCUvSw81Ooj9QNsUFGjtcaROVS2HiPFl64Q5ahc4F4BgsdQNoNrV8PQq5MSBWVht8C1XcZPPFXc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810983; c=relaxed/simple; bh=GuIUENgqio39t477SDk6C7XaAzb2H0I1l0Wr7BFNzzg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s+rBNK5U8xiFxiNMHJu+3zQRob4jox6fP8SRw7uPqoCXkpwwHrSlCPlRWSCh5g06XY/tQXEKxLBHF3vdsPys6+jIBVmEzP4ojWAFs6BOYXthx7es8O/QOf2nfg/Msoz4IA1QEVzAJ9eOyXSvQzeZMaohQ6uNPqbf6oknqaJFn0Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=S4Aaeztu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="S4Aaeztu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D52F5C4CEF4; Thu, 21 Aug 2025 21:16:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810982; bh=GuIUENgqio39t477SDk6C7XaAzb2H0I1l0Wr7BFNzzg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=S4Aaeztuk95BY5K32AX3hGLidBlzJ0AAYtGVcqV2k3u7yeoJkI/VjVl+35Z7BDjeS 2FiTD9dC5i0NqBluLGUIvTg4hbgsWCfmxO6jo/AFMg9vp+LhOw6nrXtVTRMTx0tFWX 4iXScArRQQOsq1tzVTlnA9iXCEdm+5OSerBuTZ91vVTC0D62Oe6ouBgAn16gNlILrn Wz23u7v7NUo4tZs88KxwecJMGiuaQisRE9zowpusfXWaeF7qpG08GOaUl/xEM//Wwc 9ZD3FpZNqPH+gs0MFl719C6vNqQL0bqiJdL+y/YByLaKaHwI+RAQOiVW3VnLQARWle 2PWbdboTEEeQA== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:47 -0700 Subject: [PATCH v2 10/12] lib/Kconfig.debug: Drop CLANG_VERSION check from DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-10-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1040; i=nathan@kernel.org; h=from:subject:message-id; bh=GuIUENgqio39t477SDk6C7XaAzb2H0I1l0Wr7BFNzzg=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe5qbKjj8E8p+FXEf0rYtsfBiabjJbS6inGxpHRD9b vKRRTkdpSwMYlwMsmKKLNWPVY8bGs45y3jj1CSYOaxMIEMYuDgFYCIHnzD803HkWjJp4ybf6TOV K5/9Topeb171uKX9d9yvZ8+uBbi2ZjMyPLte3m7y1ej28jUnzTdov32d9M2pr/JjPeMMCxtdkUI pRgA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, the CLANG_VERSION check for older than 14.0.0 is always false, so remove it. Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index dc0e0c6ed075..6c12852e77c8 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -259,7 +259,7 @@ config DEBUG_INFO_NONE config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT bool "Rely on the toolchain's implicit default DWARF version" select DEBUG_INFO - depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS= _GNU && AS_VERSION >=3D 23502 && AS_HAS_NON_CONST_ULEB128) + depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >=3D 23= 502 && AS_HAS_NON_CONST_ULEB128) help The implicit default version of DWARF debug info produced by a toolchain changes over time. --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BFB22EA731; Thu, 21 Aug 2025 21:16:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810986; cv=none; b=WsBxgovuLC5r2jnwpQwVDo3VvRgn3iUhdcD2YIKkz0Xba7OIty7KFqGYeSN/ufVKqDbhy1KuyAGtanzSofs1BmanJj6cO5Bw7iUZ/u0DtBKWlt95OA2iHKaaU96oBJ2WskwvBDx1Cr36xPdfHwcT0AnXhqB3kqQ2SxgjR7vHTdI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810986; c=relaxed/simple; bh=edt5ONquqT6iefl+nGEw5FvaJQsAKIBbDF2dxmXAwzw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RCOdRxCLIzupMMuOenw3EFzjqxC9uKHcbz9+pP5Ib8y8SPRk+uzwTithor29XnveXIE4NOYfIGXeMDQnqXtEr8ll/gkCQC1+N3Sw7kb4dJamGl7Sz4WXi3bkR+MfQp8HECQF3sZMIPN1SzklDedAMhpgYMcw8uI8jziNKIZIHqo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PyZwQa5Q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PyZwQa5Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38B8FC113D0; Thu, 21 Aug 2025 21:16:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810985; bh=edt5ONquqT6iefl+nGEw5FvaJQsAKIBbDF2dxmXAwzw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PyZwQa5Q42gL7fCCWeh3RoRfiFAVlwSQniefUY1pvH7Y4HzM42nafXcIbWUrfgemW tiCtzl6n/Ljo4CSzguK19m5W/XWrxQL5X2iDTPnSOuZXXoQ6CiF9VeKCYEodhLs6d+ 9/5Wnp3dPZMBdqIQ6a70Idmsv+E4BRS4xA6I92H5qSAWcvwhIxmtb4p1lr4pZVBYf8 pWtYUttnVycDxQdTexx5S9MQlX/NriKkzdbO7eJFVTFB3ea28Uxw7vxDSWujf1OUHC qVFn/z5C8b8k2ADar1zwSDMAdsAkeW+hiMDFpieco5HFjfFmq04++Q2VGf6rCd2Xkd ZChcLAkfGK6KA== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:48 -0700 Subject: [PATCH v2 11/12] objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-11-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Marco Elver , "Peter Zijlstra (Intel)" , Nathan Chancellor , kasan-dev@googlegroups.com X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2230; i=nathan@kernel.org; h=from:subject:message-id; bh=edt5ONquqT6iefl+nGEw5FvaJQsAKIBbDF2dxmXAwzw=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe1pKmUXsD9i/+j9z9ePwx9LqPVJZDz8/s5gtycyY9 sm6dpp/RykLgxgXg6yYIkv1Y9XjhoZzzjLeODUJZg4rE8gQBi5OAZiIkAUjw+U4rycb7d3Y15z+ +b26TuOmiOx51kfLJoQZbY/yWKm2k5uR4a3eX4Hb6xrrQ3ZM/LHtqZeKibheU0i5ddmN/3mGz1U +cwMA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, __no_kcsan will always ensure that the thread sanitizer functions are not generated, so remove the check for tsan functions in is_profiling_func() and the always true depends and unnecessary select lines in KCSAN_WEAK_MEMORY. Acked-by: Marco Elver Acked-by: Peter Zijlstra (Intel) Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor --- Cc: kasan-dev@googlegroups.com --- lib/Kconfig.kcsan | 6 ------ tools/objtool/check.c | 10 ---------- 2 files changed, 16 deletions(-) diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan index 609ddfc73de5..4ce4b0c0109c 100644 --- a/lib/Kconfig.kcsan +++ b/lib/Kconfig.kcsan @@ -185,12 +185,6 @@ config KCSAN_WEAK_MEMORY bool "Enable weak memory modeling to detect missing memory barriers" default y depends on KCSAN_STRICT - # We can either let objtool nop __tsan_func_{entry,exit}() and builtin - # atomics instrumentation in .noinstr.text, or use a compiler that can - # implement __no_kcsan to really remove all instrumentation. - depends on !ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || \ - CC_IS_GCC || CLANG_VERSION >=3D 140000 - select OBJTOOL if HAVE_NOINSTR_HACK help Enable support for modeling a subset of weak memory, which allows detecting a subset of data races due to missing memory barriers. diff --git a/tools/objtool/check.c b/tools/objtool/check.c index d14f20ef1db1..efa4c060ff4e 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2453,16 +2453,6 @@ static bool is_profiling_func(const char *name) if (!strncmp(name, "__sanitizer_cov_", 16)) return true; =20 - /* - * Some compilers currently do not remove __tsan_func_entry/exit nor - * __tsan_atomic_signal_fence (used for barrier instrumentation) with - * the __no_sanitize_thread attribute, remove them. Once the kernel's - * minimum Clang version is 14.0, this can be removed. - */ - if (!strncmp(name, "__tsan_func_", 12) || - !strcmp(name, "__tsan_atomic_signal_fence")) - return true; - return false; } =20 --=20 2.50.1 From nobody Sat Oct 4 00:26:57 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C1A72EAD16; Thu, 21 Aug 2025 21:16:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810988; cv=none; b=FdizWoHrnXRv+64MxsVwiK2NT0h1MbkUIIYvTt2xFw/PYeFI/m8dBLBanboRi2RZjcKd+2YxnEUPiS1d45GOlMOFPK4TrvVdG7u88yg9MOJZLBADteC0BwJ7aSPBLq86+ZNI33gN58q/TGJy/QYX2JZRlikrQO88X1wi1k3m468= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755810988; c=relaxed/simple; bh=/FaxCgWn3QZynXYwl6BT/KtUuhJScaSVbC/LfUVi4W0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d+cNOFvYApJB85gZ89tgYq5ywTfqegLNYH8Ek3p0EMIv4z0ViCa6bkR99r1ItMoXFxu6aCEUGy2ng4jCwWrgQXG60D655T2HkjLvItuTvQS8U3SklSb1PGfIshL113erCA3MKGhLQjzpcIf5wENFKhRd3apj3EC92u5ZctgmLBE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gDZDpVuf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gDZDpVuf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A358C4CEEB; Thu, 21 Aug 2025 21:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755810988; bh=/FaxCgWn3QZynXYwl6BT/KtUuhJScaSVbC/LfUVi4W0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=gDZDpVuffNi0v19lwBN+668IPRSI9pXSGKcj8YgR1I/mooCWzH1KcC3mLeymG6ipu MlUYE9GPfOHYZxJRF9xwT52Qh7+DlO7opTuWA6Y3XazZhG8KjdXu8+ugvNIwotnMyE GgVFrN5UgVgh8ulOfs8p1TXq5xopkxRm8EPOTys0CySKRQmxK7MGlPxlh2BBHLAG/4 dXRQve0ubBmwwkPpaHDLCzPYYfjob0j8ECMcS/MsQtNCjbo02kO6UarYLITiD1vVmt SdsRXIcQn1ULK6tA6e7ZuxxqkZgnxldiJZQ18j1lxuYNko7LD6p3G3ki/FjKHYayf1 5X1bM/NPMSrlQ== From: Nathan Chancellor Date: Thu, 21 Aug 2025 14:15:49 -0700 Subject: [PATCH v2 12/12] KMSAN: Remove tautological checks Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-bump-min-llvm-ver-15-v2-12-635f3294e5f0@kernel.org> References: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org> To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Kees Cook , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, patches@lists.linux.dev, Marco Elver , Nathan Chancellor , kasan-dev@googlegroups.com X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1830; i=nathan@kernel.org; h=from:subject:message-id; bh=/FaxCgWn3QZynXYwl6BT/KtUuhJScaSVbC/LfUVi4W0=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnLe1pcPUNm9W6MDuLs/myrJcfNFJTLWv9E/6ZRWI+r5 4pje5w7SlkYxLgYZMUUWaofqx43NJxzlvHGqUkwc1iZQIYwcHEKwER0OBj+157XEo/zEZQ9YZU8 z15PkJ858EdhvfS/qz6rSs+b7NykzfDfXe6x0fb3Xy5P/1MXV231eo2pntlbyVJlX8s71sbm1gb sAA== X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Now that the minimum supported version of LLVM for building the kernel has been bumped to 15.0.0, two KMSAN checks can be cleaned up. CONFIG_HAVE_KMSAN_COMPILER will always be true when using clang so remove the cc-option test and use a simple check for CONFIG_CC_IS_CLANG. CONFIG_HAVE_KMSAN_PARAM_RETVAL will always be true so it can be removed outright. Acked-by: Marco Elver Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor --- Cc: kasan-dev@googlegroups.com --- lib/Kconfig.kmsan | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/Kconfig.kmsan b/lib/Kconfig.kmsan index 0541d7b079cc..7251b6b59e69 100644 --- a/lib/Kconfig.kmsan +++ b/lib/Kconfig.kmsan @@ -3,10 +3,7 @@ config HAVE_ARCH_KMSAN bool =20 config HAVE_KMSAN_COMPILER - # Clang versions <14.0.0 also support -fsanitize=3Dkernel-memory, but not - # all the features necessary to build the kernel with KMSAN. - depends on CC_IS_CLANG && CLANG_VERSION >=3D 140000 - def_bool $(cc-option,-fsanitize=3Dkernel-memory -mllvm -msan-disable-chec= ks=3D1) + def_bool CC_IS_CLANG =20 config KMSAN bool "KMSAN: detector of uninitialized values use" @@ -28,15 +25,9 @@ config KMSAN =20 if KMSAN =20 -config HAVE_KMSAN_PARAM_RETVAL - # -fsanitize-memory-param-retval is supported only by Clang >=3D 14. - depends on HAVE_KMSAN_COMPILER - def_bool $(cc-option,-fsanitize=3Dkernel-memory -fsanitize-memory-param-r= etval) - config KMSAN_CHECK_PARAM_RETVAL bool "Check for uninitialized values passed to and returned from function= s" default y - depends on HAVE_KMSAN_PARAM_RETVAL help If the compiler supports -fsanitize-memory-param-retval, KMSAN will eagerly check every function parameter passed by value and every --=20 2.50.1